FastAPI hosting without Docker or server setup

You built an API with FastAPI - now what: a server, uvicorn, nginx, a domain? Connect your repo and Dada Cloud detects FastAPI in requirements.txt, builds the app and runs it. An HTTPS domain is issued right away. If it crashes, it restarts itself. Free tier, servers in Russia.

Why FastAPI apps run on Dada Cloud

FastAPI auto-detection

The platform finds fastapi in requirements.txt or pyproject.toml and builds the app itself. No Dockerfile needed.

Port read from your code

If uvicorn.run sets a port, the platform picks it up; otherwise it defaults to 8000. Your app must listen on 0.0.0.0 and the PORT env variable.

HTTPS domain right away

After deploy the API is live at name.dada-tuda.ru with a working certificate. A custom domain takes a couple of minutes.

PostgreSQL next door

A managed database is one click away, with DATABASE_URL injected into your environment automatically.

Crashes restart themselves

If the process dies, the platform restarts it automatically.

Free tier to start

Your first app can run for free, no card required.

How to deploy FastAPI in five minutes

Six steps from a repo to a live HTTPS API.

01

Check your dependencies

requirements.txt (or pyproject.toml) must list fastapi and uvicorn - that is what the platform reads to recognise the project and pick port 8000.

02

Bind to 0.0.0.0 and PORT

The start command should be uvicorn main:app --host 0.0.0.0 --port $PORT. An app bound to 127.0.0.1 builds fine but stays unreachable from outside.

03

Create the app and connect your code

Name the app inside a project and connect a GitHub repo - or upload a zip if you don't use git. Every push builds a new version.

04

Add PostgreSQL

A managed database is created in one click and DATABASE_URL lands in the environment. Read it with os.environ instead of hardcoding a connection string.

05

Set environment variables

API keys and secrets are set in the console and injected at start. They never touch the repo or the built image.

06

Open the address and attach a domain

In a minute or two the API answers at name.dada-tuda.ru over HTTPS. A custom domain takes a couple of minutes, the certificate is issued automatically.

What FastAPI hosting costs

Real platform tiers, and an honest comparison with renting your own VPS.

TierPriceWhat you get
Free0 ₽/moOne app with a database and a domain, no card required. The limit is resources, not a trial clock.
Startup990 ₽/mo5 apps, 2 databases, 7-day backups - an API with real users plus a background worker.
Business2,900 ₽/mo20 apps, 10 databases, 30-day backups, priority support.
Your own VPScomparable on hardwareA VPS is cheaper per unit of hardware. But uvicorn under systemd, nginx, certificates, database backups and restarts after a crash cost your time.

Worth knowing up front

Three places a FastAPI deploy usually trips.

The port comes from the environment

A hardcoded port or a bind to localhost passes the build and fails in production. Always use --host 0.0.0.0 --port $PORT.

The app disk is wiped on every build

Uploaded files and a local SQLite file do not survive the next deploy. Keep data in PostgreSQL and files in object storage.

Migrations do not run themselves

The platform never guesses when to touch your schema. Put the migration command in the start command, or run it by hand after deploy.

FastAPI hosting - FAQ

Where do I deploy FastAPI if I can't configure servers?

On Dada Cloud: connect the repo, the platform detects FastAPI, builds and runs the app. No server, nginx or certificates to configure.

Do I need a Dockerfile?

No. requirements.txt or pyproject.toml with fastapi is enough. If you do have a Dockerfile, it will be used.

What port should the app listen on?

Listen on 0.0.0.0 and the PORT env variable the platform injects. If your code sets a port in uvicorn.run, it is picked up automatically; the default is 8000.

How do I add a database?

Create a managed PostgreSQL next to the app - DATABASE_URL appears in the environment automatically.

Is there free FastAPI hosting?

Yes - the first app with PostgreSQL and a domain runs on the free tier, no card required.

Are /docs and /redoc available after deploy?

Yes, the interactive docs FastAPI generates are served from your app as usual. If you don't want them public, disable them with docs_url=None in production - the platform does not add or remove routes.

How do I run Alembic migrations?

Put alembic upgrade head in the start command, before uvicorn. It runs on every deploy and brings the schema up to date; the platform executes your command as written.

Can I deploy without git?

Yes. Zip the project folder (up to 100MB) and drop it into the console - the platform reads requirements.txt exactly as it would from a repo. You can switch to GitHub later without changing the address.

What about background tasks and workers?

Short jobs fit FastAPI's BackgroundTasks. For a real queue, run the worker as a separate app in background-worker mode - no public domain is issued for it, and it shares the same database.

Give your code a public address

Create an account and deploy your first app. The Free plan costs $0.

Create account