Websites and apps

Deploying a Python app (Django, Flask, FastAPI)

Last updated 14 July 2026

How to run a Python application on 8Deploy, including requirements, start commands, environment variables and static files.

Python apps are available on Pro and above. As with Node.js, you connect a git repository and we build and run it for you.

Setting it up

  1. Go to Apps and choose New app.
  2. Select Python.
  3. Connect your git repository and pick the branch.
  4. Point us at your dependency file, normally requirements.txt.
  5. Set your start command. Typical examples:

Read the port from the environment rather than hard-coding one.

  1. Add your environment variables, including your secret key and database connection details.
  2. Choose the domain or subdomain.
  3. Deploy.

We create the environment, install your dependencies, start the app and serve it over HTTPS.

Django specifics

Databases

Create a PostgreSQL or MySQL database in the Databases section and pass the connection details in as environment variables. Never commit them to the repository.

Background workers and scheduled tasks

If your application needs a worker process or a scheduled job, set it up in the panel alongside the app. If you are not sure how your particular stack should be arranged, email [email protected] and describe what you are running.

Resources

Your app runs within your plan's guaranteed memory and CPU. If a process is killed for using too much memory, either reduce your worker count or move up a plan. Premium gives 3 GB and 4 cores, Platinum 5 GB and 6 cores.

Logs

Build and run-time logs are shown in the panel under the app. Start there whenever a deploy or a request fails.

Still stuck?

The assistant in your control panel can see your actual account and answer about your sites, your plan and your usage. For anything else, email [email protected] and a person will answer.