BIENVENUE10valid for the first month only! on all offersView plans
Skip to content
← Knowledge base

Deploy a Python application on onesubnet

Deploy Flask/Django/FastAPI in Python: dependencies, build/start command, port and environment variables.

Deploy a Python application on onesubnet

onesubnet runs your Python applications (Flask, Django, FastAPI, scripts, bots…). Deploy via Git from the panel.

1. Prepare the project

  • List dependencies in requirements.txt (or pyproject.toml).
  • Make your app listen on the port from the PORT environment variable:
import os
port = int(os.environ.get("PORT", 8000))
app.run(host="0.0.0.0", port=port)

2. Deploy

  1. In the panel, connect your Git repository (or upload the code).
  2. Build command: pip install -r requirements.txt
  3. Start command (per framework):
    • FastAPI: uvicorn app:app --host 0.0.0.0 --port $PORT
    • Flask: gunicorn app:app -b 0.0.0.0:$PORT
    • Django: gunicorn myproject.wsgi -b 0.0.0.0:$PORT

3. Environment variables

Set DATABASE_URL, secrets, etc. in Settings → Environment in the panel.

4. Logs

Live console and log files in the panel to diagnose a startup crash.

References

Related products

oneSubnet

French hosting provider in Paris. High-performance game and voice servers.

SERVICES

Resources

LEGAL

All systems operational