MeTube Print

  • 0

How to Install MeTube on Ubuntu 24.04

MeTube is an open-source web application that provides a simple way to download videos or audio from YouTube and many other supported platforms.
It uses yt-dlp in the background but offers a clean, browser-based interface so you don’t need to deal with command-line tools.

The steps below walk you through installing MeTube on Ubuntu 24.04.

 

Step 1 – Update Your System

 

First, ensure all packages are up-to-date:

sudo apt update && sudo apt upgrade -y

 

Step 2 – Install Required Packages

 

Install essential system packages for Python, Node.js, and media processing:

sudo apt install -y python3-pip python3-venv python3-dev ffmpeg git curl build-essential

 

Step 3 – Install Node.js 20.x

 

MeTube’s frontend UI requires Node.js. Install it from NodeSource:

curl -fsSL https://deb.nodesource.com/setup_20.x | sudo bash -
sudo apt-get install -y nodejs

Check Node.js and npm versions:

node -v
npm -v

 

Step 4 – Create Python Virtual Environment

 

Create a directory for MeTube’s Python environment and initialize it:

sudo mkdir -p /opt/metube-venv
python3 -m venv /opt/metube-venv

Activate the virtual environment:

source /opt/metube-venv/bin/activate

 

Step 5 – Clone MeTube Repository

 

Clone the official MeTube repository:

sudo git clone https://github.com/alexta69/metube.git /opt/metube

 

Step 6 – Build Frontend UI

 

Navigate to the UI folder, install dependencies, and build the frontend:

cd /opt/metube/ui
npm install
npm run build

 

Step 7 – Install Python Dependencies

 

Inside the virtual environment, install all required Python packages:

pip install --upgrade pip
pip install aiohttp flask gunicorn requests python-dotenv yt-dlp python-socketio \
websockets watchfiles flask-socketio eventlet

 

Step 8 – Create Systemd Service

 

Create a systemd service file to manage MeTube:

sudo nano /etc/systemd/system/metube-web.service

Add the following content:

[Unit]
Description=MeTube Web Server
After=network.target

[Service]
Type=simple
User=root
WorkingDirectory=/opt/metube
ExecStart=/opt/metube-venv/bin/python3 /opt/metube/app/main.py
Restart=on-failure
RestartSec=5
Environment=PORT=8081

[Install]
WantedBy=multi-user.target

 

Reload systemd and start the service:

sudo systemctl daemon-reload
sudo systemctl enable --now metube-web

 

Step 9 – Configure Firewall

 

Allow the MeTube web port through UFW:

sudo ufw allow 8081/tcp

 

Step 10 – Verify Installation

 

Wait for MeTube to start and confirm it’s running:

sudo systemctl status metube-web

 

Step 11 – Access MeTube

 

Open your browser and go to:

http://<your-server-ip>:8081

From here, you can paste URLs and start downloading videos or audio files directly through the web interface.


Hjälpte svaret dig?
Back