Knowledgebase

How To Host File Stream Bot On Hostingup VPS Server Print

  • File Stream Bot, Host File Stream Bot On VPs
  • 0

All Commands

1. Update Your VPS Server

If you create a new server, first update your VPS server:

sudo apt update sudo apt upgrade

2. Install Python3 on Your VPS Server

Install Python3, pip, and git:

sudo apt install python3 python3-pip git

3. Clone Your Repository

Clone your repository to your VPS server:

git clone YOUR-REPO-URL

4. Navigate to Your Repository Folder

Change to the directory of your cloned repository:

cd YOUR-FOLDER-NAME
  • For Ubuntu 24, install and set up the Python virtual environment:
sudo apt install python3-virtualenv virtualenv env source env/bin/activate

5. Install Dependencies

Install the requirements as specified in requirements.txt:

pip install -r requirements.txt

6. Run Your Bot 24/7

Start your bot with the following command:

nohup python -m bot &

Your bot is now running.


How to Close the Bot

1. Identify the Running Process

To close the bot, first find the process ID (PID) of your running bot:

ps -ef

2. Locate the PID and Kill the Process

Find the PID associated with the command python -m bot, and then kill it:

kill -9 PID

Additional Information

  • Custom Domain: If you have your own custom domain, ensure that your domain name is pointing to your VPS IP address.

  • No Domain Name: If you do not have a domain name, you can use the default domain name provided: vps.hostingup.icu.

For More Information: Watch this video: Tutorial Video


This guide provides a clear, step-by-step process for setting up and managing your bot on a VPS, including handling domains and accessing additional resources.

Automatically Set Up Your Server and Deploy Your Bot Running 24/7 with a Single Command

To streamline the deployment of your bot using a single command, choose the appropriate deployment script based on your procfile configuration:

  1. For python bot.py or python3 bot.py:

    Use the following command:

     
    curl -sL https://script.hostingup.in/python_bot_py.sh | sed 's/\r$//' | bash -s -- https://github.com/your-username/your-repo.git
    • Replace https://github.com/your-username/your-repo.git with your actual GitHub repository URL.
    • This command downloads and executes the python_bot_py.sh script, suitable for repositories configured to run bot.py.
  2. For python main.py or python3 main.py:

    Use this alternative command:

     
    curl -sL https://script.hostingup.in/python_main_py.sh | sed 's/\r$//' | bash -s -- https://github.com/your-username/your-repo.git
    • Replace https://github.com/your-username/your-repo.git with the URL of your GitHub repository.
    • This command utilizes the python_main_py.sh script, intended for repositories that execute main.py.

Stop Your Bot

For bot.py or python3 bot.py:

curl -sL https://script.hostingup.in/close_botpy.sh | sed 's/\r$//' | bash

For main.py or python3 main.py:

curl -sL https://script.hostingup.in/close_mainpy.sh | sed 's/\r$//' | bash

Important Notes:

  • Ensure you use the correct script (python_bot_py.sh or python_main_py.sh) based on the script specified in your procfile.
  • Double-check that your GitHub repository URL is correct to facilitate smooth deployment.

By following these instructions, you can deploy your bot efficiently with a single command tailored to your configuration.


Was this answer helpful?
Back