How to Install MediaHut on Debian Latest
MediaHut is a free and open-source web application for streaming and downloading media content from various sources. In this tutorial, we will guide you through the installation of MediaHut on Debian latest using the command line.
Prerequisites
Before installing MediaHut, make sure that you have the following prerequisites:
- A server running the latest version of Debian.
- A non-root user with sudo privileges.
Step 1: Update System Packages
First, to ensure that your system is up to date, update the apt package index and upgrade the system packages using the following commands:
sudo apt-get update
sudo apt-get upgrade
Step 2: Install Required Dependencies
Before installing MediaHut, you need to install some required dependencies. Run the following command to install them:
sudo apt-get install python3 python3-pip python3-setuptools python3-wheel python3-dev python3-lxml python3-libtorrent nginx
Step 3: Install MediaHut
Now, you can start installing MediaHut. Follow the steps below:
- Clone the MediaHut repository from GitHub using the following command:
git clone https://github.com/Fortyseven/MediaHut.git
- Change the directory to the MediaHut folder using the following command:
cd MediaHut
- Install MediaHut and its requirements using the following command:
sudo pip3 install -r requirements.txt
python3 setup.py install
Step 4: Configure MediaHut
After installing MediaHut, you need to configure it. Follow the steps below:
- Copy the
config.example.pyfile toconfig.pyusing the following command:
cp config.example.py config.py
- Open the
config.pyfile using a text editor:
nano config.py
Modify the parameters in the
config.pyfile as per your requirements. For example, set theAPI_KEYparameter to a secure random string.Save and exit the
config.pyfile.
Step 5: Configure Nginx
Next, you need to configure Nginx as a reverse proxy for MediaHut. Follow the steps below:
- Open the Nginx configuration file using a text editor:
sudo nano /etc/nginx/sites-available/mediahut
- Add the following configuration to the file:
server {
listen 80;
server_name your_domain_name;
location / {
proxy_pass http://127.0.0.1:5002;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
Replace your_domain_name with your actual domain name.
Save and close the file.
Remove the default Nginx configuration file using the following command:
sudo rm /etc/nginx/sites-enabled/default
- Enable the MediaHut Nginx configuration file using the following command:
sudo ln -s /etc/nginx/sites-available/mediahut /etc/nginx/sites-enabled/
- Restart Nginx to apply the changes:
sudo systemctl restart nginx
Step 6: Start MediaHut
Finally, start the MediaHut service using the following command:
mediabox start
Conclusion
Now you have successfully installed MediaHut on Debian Latest. You can now access the application by navigating to your domain name in a web browser. If you encounter any issues, please consult the MediaHut documentation or seek help from the community.