Skip to content

Python on a VPS

Language for bots and scripts

Category
Bots
Author
Python Software Foundation
License
PSF-2.0
Version
3.14.8

The script is free · VPS from $2.79 per month · installs in about 45 seconds

Install over SSH

root@vps:~# sudo apt update && sudo apt install -y python3 python3-venv python3-pip

  • SystemUbuntu 24.04 · x86_64ok
  • Sourcegithub.com/python/cpythonok
  • Version3.14.8ok

✓ Python 3.14.8 installed · about 45 seconds

root@vps:~#

Install command from the library. Output is shortened and may differ on your server.

What it is

  • Python
  • Telegram bots
  • aiogram
  • Scripts

Python is the most popular language for Telegram bots (aiogram, python-telegram-bot), scrapers, automation scripts and backends built on FastAPI or Django.

On a VPS, scripts and bots run around the clock and don't depend on your computer. Keep each project in its own venv virtual environment and let systemd handle running it.

The command installs Python from the distribution repository along with venv and pip: 3.12 on Ubuntu 24.04, 3.11 on Debian 12, 3.10 on Ubuntu 22.04.

  • Ready for aiogram, python-telegram-bot, FastAPI and Django
  • Per-project venv virtual environments
  • pip for installing packages
  • Security updates via apt
  • Run bots as systemd services

Recommended plan

For Python: at least 1 vCPU, 2 GB RAM and 10 GB NVMe.

Minimum to run
1 vCPU · 1 GB RAM · 10 GB disk
Systems
Ubuntu 22.04 · Ubuntu 24.04 · Debian 11 · Debian 12

How to install

Three steps in the bot or one command over SSH; installation takes about 45 seconds.

  1. 01

    Choose a plan in the bot

    Open @ExpressHost_bot and pay for a VPS. The server will be ready in about 60 seconds.

  2. 02

    Add Python

    At the “Add-ons” step pick the script from the library, or run it later: Server settings → Scripts.

  3. 03

    Create a project environment

    python3 -m venv venv && . venv/bin/activate

Manually over SSH

Connect to the server as root and run the command. Supported systems: Ubuntu 22.04, Ubuntu 24.04, Debian 11, Debian 12.

Install command
sudo apt update && sudo apt install -y python3 python3-venv python3-pip

After installation

  1. 1.Create a project environment: python3 -m venv venv && . venv/bin/activate
  2. 2.Install dependencies: pip install -r requirements.txt
  3. 3.To run 24/7, create a systemd service with ExecStart=/path/venv/bin/python bot.py and enable it: systemctl enable --now bot

Python FAQ

Didn’t find an answer? Message @ExpressHost_SupportBot.

I need the latest Python version. What should I do?

Install the uv manager (curl -LsSf https://astral.sh/uv/install.sh | sh) and run uv python install 3.14. The system Python is left untouched.

Why does pip install return externally-managed-environment?

On recent Ubuntu and Debian, the system Python is protected from pip. Install packages inside a venv.

How many bots can a plan handle?

An aiogram bot uses about 50–100 MB RAM. Several bots run comfortably on 1 vCPU and 2 GB.

Python installs at checkout — in the bot.