Where can I deploy a Django app with PostgreSQL for free?
Short answer: on Uppcoder’s free plan. It runs one Django app with one PostgreSQL database on its own HTTPS address, with VS Code in the browser beside it, no card, and no time limit. Django, its database and an editor are live in about a minute, and the database is already connected when the app starts.
What to check in any free Django host
Free tiers differ in ways that only show up later. Before you put a project on one, check three things:
- Does the database expire? Some free databases are deleted after a set number of days.
- Is it a plan or a trial? A trial ends on a date; a free plan keeps running.
- Is anything backed up? On a free tier, often nothing is.
What the Uppcoder free plan includes
- One app with one database: 2 GB of memory and 2 GB of disk
- No card, and no time limit. If the free plan is ever changed or ended, everyone on it hears from us by email at least 60 days before, as the terms say
- Its own HTTPS address from the first minute
- VS Code in the browser and a terminal in the same container as the app, or SSH from your own editor
- Backed up every night to a separate server, the free plan included: a copy from each of the last seven days and one from each of the last four weeks
- The servers apps run on have a public status page
How it works
- Sign up at portal.uppcoder.com and confirm your email; then Billing, Spark, Start free.
- Create a stack: pick Django, add PostgreSQL. It is connected to the app automatically. Fill in an admin username, password and email on the Django card.
- Deploy. Ours was live in 33 seconds.
- About half a minute later Uppcoder has installed the PostgreSQL driver, pointed
DATABASESat the database, runmigrateand created your admin user. The Django admin works on PostgreSQL from the start.
The settings it writes read everything from the environment, so no password sits in your code:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': os.environ['POSTGRES_DB'],
'USER': os.environ['POSTGRES_USER'],
'PASSWORD': os.environ['POSTGRES_PASSWORD'],
'HOST': os.environ['POSTGRES_HOST'],
'PORT': os.environ.get('POSTGRES_PORT', '5432'),
}
}
The full walk-through, with a screenshot of every step, is in the guide: Deploy a Django app with PostgreSQL, free.
Bring your own code
Paste your repository’s address on the Django card (GitHub, GitLab, Bitbucket or any git host, with a token if it is private) and it is cloned into the app; Pull brings in new commits later. To start from something that already works, use the django-postgresql-starter on GitHub: a small Django project on PostgreSQL with its settings read from the environment.
Questions people ask
Is it really free, or a trial? A free plan with no time limit, not a trial. No card is asked for.
Can I use my own domain? On the free plan the app has its own HTTPS address. Your own domain comes with every paid plan, from €5 a month.
Where does it run? On our own infrastructure, which can be kept to the region you choose, such as Europe or the United States.
Is it a good alternative to Heroku, Render or Railway? For a small Django app with a database, yes: one place for the app, the database and the editor, with a free plan that does not run out.
Related: The cheapest way to host a FastAPI app with PostgreSQL · Uppcoder: build, run and teach software in the cloud