Deploy Django to Hetzner
Run your Django app on a Hetzner server in your own account, with Postgres, HTTPS and zero-downtime releases. Hetzner bills you for the server directly, and Railyard adds no markup.
Steps
- 1
Create a Hetzner API token
In the Hetzner Cloud Console, open your project, then Security, then API tokens, and generate a token with Read & Write permission. Paste it into Railyard and tick Save it to the team, so it's reused for every server after this one.
- 2
Add a Hetzner server
In Railyard, open Servers, then Add a server, then Create on your cloud, and pick Hetzner, a region and a size. Railyard preselects cx22 (2 vCPU, 4 GB of memory). It creates the server in your Hetzner account and finishes setup in about two minutes.
- 3
Deploy your Django repository
Paste the GitHub link. Railyard reads the repository, detects Django and fills in the build, the port, the release command, workers and Postgres.
- 4
Go live on HTTPS
Railyard builds your app, runs the release command, health-checks the new version and moves traffic only when it answers. Add your domain and the certificate is issued and renewed for you.
Want every command, the manual way and the Railyard way? Deploy Django with Celery to Hetzner
What Railyard sets up for Django
- Detected from requirements.txt, pyproject.toml or manage.py.
- python manage.py migrate runs before every release.
- gunicorn serves the app on $PORT.
- Celery and RQ are offered as workers when they are dependencies.
- psycopg becomes Postgres, with DATABASE_URL injected.
Hetzner regions
Nuremberg, Falkenstein and Helsinki keep your data in the EU.
- Nuremberg
- Falkenstein
- Helsinki
- Ashburn
- Hillsboro
- Singapore
Questions
Which Hetzner server size should I start with?
Where does my Django app's data live?
What does it cost to run Django on Hetzner?
Django on other clouds
Deploy Django to your own Hetzner server.
14-day trial on every plan. Your provider bills you for servers at its own price.
14-day trial on every plan. One flat price per team, your servers at your provider's price.