Knowledgebase

How To Host Mirror Lecch Bot On Hostingup VPS Server Print

  • 0

Deployment Guide

Tutorial Video: Watch the tutorial video here. Watch Now


1. Clone the Repository

Run the following commands to clone the repository and navigate into the mirrorbot directory:

git clone https://github.com/weebzone/WZML-X mirrorbot/ cd mirrorbot

For Debian-based distributions, install Python and pip:

sudo apt install python3 python3-pip

For Arch Linux and its derivatives, install Docker and Python:

sudo pacman -S docker python

For Ubuntu 24, set up the Python virtual environment and install dependencies:

sudo apt install python3-virtualenv virtualenv virtualenv env source env/bin/activate pip3 install -r requirements-cli.txt

2. Install Docker

Follow the official Docker documentation for installation instructions.


3. Setting Up the Config File

Copy the sample configuration file and edit it:

cp config_sample.env config.env

Remove the first line:

_____REMOVE_THIS_LINE_____=True

Fill out the rest of the fields. All values must be enclosed in quotes, even if they are integers, booleans, or lists.


4. Build and Run the Docker Image

Ensure Docker is installed and the app folder is mounted. There are two methods to build and run the Docker image:

Build and Run Using Official Docker Commands
  1. Start Docker Daemon: (Skip if already running)

    sudo dockerd
  2. Build Docker Image:

    sudo docker build . -t wzmlx
  3. Run the Image:

    sudo docker run -p 80:80 -p 8080:8080 wzmlx
  4. To Stop the Running Image:

    sudo docker ps sudo docker stop <container_id>
Build and Run Using Docker Compose (Recommended)

Note: To use ports other than 80 and 8080, modify the docker-compose.yml file accordingly.

  1. Install Docker Compose:

    sudo apt install docker-compose
  2. Build and Run Docker Image or View Running Image:

    sudo docker-compose up
  3. Rebuild Image After Editing Files:

    sudo docker-compose up --build
  4. To Stop the Running Image:

    sudo docker-compose stop
  5. To Start the Image:

    sudo docker-compose start
  6. To Get Latest Logs:

    sudo docker-compose up

Docker Notes

IMPORTANT NOTES:

  • Set BASE_URL_PORT and RCLONE_SERVE_PORT to desired ports. Default is 80 and 8080, respectively.
  • Stop the running image before deleting the container, and delete the container before deleting the image.

To Delete the Container:

sudo docker container prune

To Delete the Images:

sudo docker image prune -a

This guide outlines the steps required to set up and run the Docker container for your project. Ensure to follow each step carefully for a successful deployment.


Was this answer helpful?
Back