Guide
Deploy a Django or FastAPI app
Put a Python web app online from your repository: Python installed for you, a fresh environment per version, migrations applied, the app kept running.
Last updated 2 min read7 stepsView as Markdown
What you will end up with
The site page says it is live, and the Updates tab shows the update as Published.
Go to the first stepThis guide puts a Django or FastAPI app online from your Git repository. Python is installed on the server with the first Python site if it is missing.
What you need#
- A Website server that is Online.
- Your project at GitHub, GitLab or Bitbucket, connected under Code hosting, with a
requirements.txtorpyproject.toml. - A database for your data (PostgreSQL or MySQL/MariaDB). A SQLite file inside your code would be replaced by each new version.
Steps#
-
Add the site. Choose Add a site, then Django or FastAPI in the list under Or pick the exact kind of site.
-
Address. Choose the server and type the address.
-
Code and settings. Pick the repository and Branch. Tick Create a database for this site if you want Fuzops to create one on this server. Choose Add site on the Review.
-
Add your settings. Until you publish, your address shows a short "waiting for its first version" page instead of an error. Open Updates › Environment: add your secret key, allowed hosts, database address and anything else your app reads. Choose Save and publish update.
-
Watch the first update. Each update gets the code, installs your Python packages in a fresh environment for that version, and then:
- for Django: collects static files, applies database migrations and starts the app. Static and media files are served directly by the web server;
- for FastAPI: starts the app found in your code (for example
app = FastAPI()inmain.py).
The new version starts beside the running one; visitors move over only when it answers.
-
Add background work if you need it. For a task queue (Celery, for example), add a background process for the site under the server's Background processes. See Background processes.
-
Point your domain and turn on HTTPS. See Point your domain and turn on HTTPS.
What you should see#
The site page says it is live, and the Updates tab shows the update as Published.


If it goes wrong#
- Stopped while installing packages: a package needs a system library or a newer Python. See what went wrong shows the error from pip.
- Stopped at "Restart the app": the app did not start. Read the lines for the Python error (often a missing setting in the Environment, or
ALLOWED_HOSTSin Django), fix it and Publish again. - Static files are missing (Django): open the update page and check that collecting the static files succeeded; the error is shown there.
Still stuck? Get help