Python Hosting

Most Python hosting is cPanel with a Python selector - it runs scripts, not servers. Django, Flask, and FastAPI need persistent WSGI or ASGI processes, proxied by Nginx and managed by systemd. Bitfoo VPS gives you a clean Linux environment to build that stack exactly as it needs to be built, with full root access from the moment your server is live.

How Python web applications run on a VPS

Python web applications do not handle HTTP requests directly - they need an application server in between. The right server depends on whether your application is synchronous (WSGI) or asynchronous (ASGI). Both patterns use Nginx to handle incoming traffic and systemd to keep the application server running.

Gunicorn - WSGI server for Django and Flask

Django and Flask are synchronous WSGI applications. Gunicorn runs as a pre-fork worker process manager - it spawns multiple worker processes, each handling one request at a time. Gunicorn installs into your virtual environment (pip install gunicorn), runs as a systemd service, and accepts connections from Nginx on an internal port or Unix socket. The Gunicorn documentation recommends 2 x vCPU + 1 workers as a starting point for synchronous applications. If you're specifically running Django, see the Django hosting page for Django-specific deployment guidance including Channels and production settings.

Uvicorn - ASGI server for FastAPI and async Django

FastAPI, Starlette, and Django with async views use ASGI. Uvicorn is the standard ASGI server - it handles concurrent connections on a single process using an event loop rather than forking a new process per worker, consuming fewer resources per concurrent request than Gunicorn's synchronous model. For production deployments, Uvicorn is commonly run under Gunicorn using Uvicorn's `UvicornWorker` class, which gives you Gunicorn's process management with Uvicorn's async request handling. Configure via systemd the same way as a WSGI deployment.

Virtual environments - dependency isolation per project

Every Python project on your VPS runs in its own virtual environment. Create one with `python3 -m venv venv`, activate it, and install your project's dependencies with pip. Your application server (Gunicorn or Uvicorn) is installed inside the virtual environment, not globally. This means different applications on the same server can use different package versions, different Python versions, and different Django releases without conflict.

Nginx - reverse proxy, SSL termination, and static file serving

Nginx handles incoming traffic on ports 80 and 443, terminates SSL, and proxies requests to Gunicorn or Uvicorn on an internal port. It also serves static files directly - Django's `collectstatic` writes your static assets to a directory; Nginx serves them without involving Python at all. Configure Certbot with Let's Encrypt for SSL, or install any paid certificate. One Nginx server block per application; multiple applications run on different internal ports.

systemd - process management

Gunicorn and Uvicorn run as systemd services. Your application restarts on crash and survives server reboots automatically. `systemctl start`, `systemctl stop`, and `systemctl restart` manage the application server without needing a separate process manager. `journalctl -u your-app` reads logs. Standard Linux service management - nothing additional to install.

pyenv - Python version management

pyenv installs any Python version into your home directory and lets you switch between them per project. Use it if your applications require different Python versions, or if your distribution's default Python is behind the version your project needs. Alternatively, on Ubuntu and Debian, the deadsnakes PPA provides clean apt-managed installs of specific Python 3.x versions (`python3.11`, `python3.12`) without the overhead of pyenv.

Plans

Plan sizing for Python applications depends primarily on how many Gunicorn or Uvicorn workers you need and whether you're running additional services - PostgreSQL, Redis, or Celery workers - alongside your application. All plans run on KVM with dedicated AMD Ryzen 9 9900X resources.

VPS-1 Simple Flask or FastAPI APIs, low-traffic Django sites, or development environments VPS-2 Medium Django or FastAPI applications with Celery and Redis, or 5-worker Gunicorn deployments VPS-4 Higher-traffic applications, Django + PostgreSQL under real load, or larger Celery worker pools VPS-6 High-traffic production workloads, multiple Python applications, or resource-intensive ML inference endpoints
vCPU1246
RAM1GB DDR52GB DDR54GB DDR58GB DDR5
Storage25GB NVMe50GB NVMe100GB NVMe200GB NVMe
Bandwidth1TB2TB4TB6TB
IPv41111
Price[price][price][price][price]
Deploy your VPS. Deploy your VPS. Deploy your VPS. Deploy your VPS.

These are renewal prices. What you pay today is what you pay next year.

All VPS plans are unmanaged. Bitfoo handles the hardware and network; your Python environment, application server configuration, and deployments are your responsibility.

If your server exceeds its monthly bandwidth allocation, throughput is throttled for the remainder of the billing cycle - no additional charges.

Gunicorn's recommended worker formula is 2 x vCPU + 1. That's 3 workers on VPS-1, 5 on VPS-2, 9 on VPS-4, and 13 on VPS-6. Each worker holds your application in memory - factor your application's per-worker memory footprint into your plan choice, particularly if you're also running PostgreSQL and Redis on the same server.

Getting started

The typical setup for a Django or Flask application:

  1. Choose Ubuntu or Debian as your OS
    Both are well-supported for Python development and have straightforward paths to installing specific Python versions - either via the deadsnakes PPA (Ubuntu) or backports (Debian). AlmaLinux, Rocky Linux, and CentOS Stream work but have less current Python packaging outside of pyenv.
  2. Install Python and create a virtual environment
    Install your target Python version (sudo apt install python3.12 on Ubuntu with the deadsnakes PPA), create a virtual environment in your project directory (python3.12 -m venv venv), activate it (source venv/bin/activate), and install your dependencies (pip install -r requirements.txt). Install Gunicorn or Uvicorn inside the virtual environment, not globally.
  3. Configure Nginx as a reverse proxy
    Install Nginx, write a server block that proxies your domain to Gunicorn or Uvicorn's internal port (or Unix socket), and use Certbot to issue a Let's Encrypt SSL certificate. For Django, configure Nginx to serve your STATIC_ROOT and MEDIA_ROOT directories directly.
  4. Create a systemd service for your application server
    Write a systemd unit file for Gunicorn or Uvicorn that points to your virtual environment's executable and your application's entry point. Enable and start the service with systemctl enable and systemctl start. Your application now restarts automatically on crash and on server reboot.

Django's deployment checklist at docs.djangoproject.com covers settings to review before going live - DEBUG = False, ALLOWED_HOSTS, SECRET_KEY from environment variables, and database configuration. Run it with python manage.py check --deploy.

What every VPS plan includes

Relevant features for Python applications, from the VPS hosting page:

Full root access and SSH from first boot - install any Python version, application server, database, and supporting services without restriction

KVM virtualization - your own kernel; virtual environments, systemd service management, and Gunicorn/Uvicorn worker processes operate without host-imposed limits

AMD Ryzen 9 9900X - strong single-core performance for synchronous Gunicorn workers processing Python requests; relevant for ORM-heavy Django views and CPU-bound request handling

NVMe SSD storage - fast disk I/O for database queries, Django's ORM, and media file access; measurable on read-heavy applications with large datasets

10Gbps network ports on all plans

IPv6 included on every plan

Self-service control panel - OS reinstall, power control, SSH key management, resource monitoring, and browser-based emergency console

99.9% uptime SLA - measured monthly, service credit issued for any shortfall

Automated provisioning - server ready within minutes of payment

5 datacenter locations at order time: US East, US West, UK, EU, Asia-Pacific

Who uses this

Python is one of the most widely deployed languages for web applications and APIs - Django powers content platforms and internal tools, Flask and FastAPI power APIs and microservices, and Celery handles background processing across all of them.

Developers · SaaS companies · Startups · Agencies

Common questions

Can I run Django, Flask, or FastAPI on Bitfoo shared hosting?

No. Django, Flask, and FastAPI need to run as persistent server processes - Gunicorn or Uvicorn - that stay alive between requests and listen on a port. Shared hosting is built around PHP's request-and-exit model; it does not support persistent Python application servers or arbitrary port binding. Some shared hosts offer a Python selector through cPanel, which allows CGI or limited WSGI module configurations, but this is not a proper application server environment and is not suitable for production Django, Flask, or FastAPI deployments. A VPS is the correct environment.

How do I manage Python versions and virtual environments?

For Python version management, the two common approaches on Ubuntu are: install specific versions via the deadsnakes PPA (sudo add-apt-repository ppa:deadsnakes/python3.12, then sudo apt install python3.12), or use pyenv, which installs any Python version from source into your home directory. Once you have your Python version, create a virtual environment with python3.12 -m venv venv and activate it. Install all project dependencies - including Gunicorn or Uvicorn - inside the virtual environment. Each application on your server gets its own virtual environment, isolating its packages and Python version from everything else.

How do I serve static files in production with Django?

In development, Django serves its own static files. In production, it does not - and should not. Run python manage.py collectstatic to gather all static files into the directory specified by STATIC_ROOT in your settings. Then configure Nginx to serve that directory directly at your STATIC_URL path. Static file requests never reach Gunicorn - Nginx handles them before the proxy pass. The same pattern applies to user-uploaded media files via MEDIA_ROOT and MEDIA_URL. This is covered in Django's official deployment documentation.

How do I run background tasks with Celery?

Celery requires a message broker - Redis is the most common choice for Django applications. Install Redis on your VPS (sudo apt install redis-server), install Celery and the Redis driver in your virtual environment (pip install celery redis), configure the CELERY_BROKER_URL in your Django settings, and create a systemd service for your Celery worker process. Multiple Celery workers run in parallel as separate processes - size the number of workers based on your task volume and available RAM. For monitoring Celery workers, Celery Flower provides a web interface. If you're using Celery Beat for scheduled tasks, run it as a separate systemd service.

Should I use Gunicorn or Uvicorn for my application?

It depends on your framework. Gunicorn is the right choice for Django (without async views) and Flask - both are synchronous WSGI applications and Gunicorn's pre-fork worker model handles them well. Uvicorn is the right choice for FastAPI, Starlette, and Django applications using async views - these are ASGI applications and need an async-capable server. For production FastAPI deployments, the common approach is running Uvicorn workers managed by Gunicorn (gunicorn -k uvicorn.workers.UvicornWorker), which gives you Gunicorn's process management with Uvicorn's async handling. Django's ASGI deployment documentation covers the equivalent setup for async Django.

Can I use PostgreSQL for my Python application?

Yes. PostgreSQL installs cleanly on Ubuntu and Debian via apt. Django's ORM supports PostgreSQL natively - install psycopg2-binary (or psycopg for the newer driver) in your virtual environment and configure DATABASES in your settings to point to your local PostgreSQL instance. PostgreSQL is the recommended production database for Django; it supports Django's full feature set including ArrayField, JSONField, and full-text search. MySQL is also supported by Django and installs equally cleanly. For low-traffic applications, SQLite is available but not recommended for multi-process production deployments - Gunicorn's multiple workers would compete for the same SQLite file.

Which plan should I choose for my Python application?

Start with your Gunicorn worker count and then add the memory footprint of any additional services. Gunicorn's recommended formula is 2 x vCPU + 1 workers. VPS-1 (3 workers) suits simple APIs or low-traffic Django sites where you're not running PostgreSQL and Redis on the same server. VPS-2 (5 workers) handles most production Django or FastAPI applications with Redis and a moderate Celery setup - it's the recommended starting point. VPS-4 (9 workers) suits higher-traffic applications or deployments running Django, PostgreSQL, Redis, and Celery workers together with comfortable headroom. VPS-6 (13 workers) suits large-scale deployments, resource-intensive workloads, or servers running multiple Python applications. When in doubt, start on VPS-2 - you can upgrade without migrating your data.