Procfile to define your start command, and a git push to the Miget builder.
Prerequisites
- A Miget account
- Git installed locally
- A FastAPI project with a
requirements.txtthat includesfastapianduvicorn
Every app on Miget must listen on
0.0.0.0:5000. Miget sets an immutable PORT=5000, and public ingress only reaches port 5000. See Ports for details.Prepare your app
The buildpack auto-detects Python from yourrequirements.txt. Unlike Django, FastAPI is not auto-served, so you must define the start command yourself with a Procfile.
Create a Procfile in your project root:
Procfile
main:app to match your module:app (for example, if your app instance lives in app/server.py as app, use app.server:app).
Make sure your requirements.txt includes the essentials:
requirements.txt
Deploy with git push
Create the application
Go to app.miget.com, click New → Application, give your app a name, choose a resource, and click Next.
Add the remote and push
Add the Miget remote and push your code:Replace
<region>, <your-miget-name>, and <app-name> with the values from your app. See Git push to builder for the full flow.5000.
This guide uses git push, but it’s one of several ways to deploy. You can also connect a GitHub repository for auto-deploys and pull request previews, deploy from a public Git repository, or push a prebuilt container image. See all deployment methods.
Connect a database
To add persistence, attach a PostgreSQL addon to your app. Miget provisions the database and auto-injects aDATABASE_URL (a postgres://... connection string) into your app’s environment.
Read it from the environment in your code, for example with SQLAlchemy or asyncpg:
main.py
Next steps
Custom domains
Point your own domain at your FastAPI app.
Ports
Learn how ingress and the immutable port 5000 work.
PostgreSQL
Provision and connect a managed Postgres database.
Fair Scheduler
Understand how Miget shares compute across your apps.

