Migrations Migrating from Heroku, Render, Hatchbox or Cloud 66? We move your production app within 48 hours →

Deploy guides

Deploy Next.js to Hetzner

Run your Next.js app on a Hetzner server in your own account, with Postgres or Redis, HTTPS and zero-downtime releases. Hetzner bills you for the server directly, and Railyard adds no markup.

Steps

  1. 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. 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. 3

    Deploy your Next.js repository

    Paste the GitHub link. Railyard reads the repository, detects Next.js and fills in the build, the port, the release command, workers and Postgres or Redis.

  4. 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 Next.js to Hetzner

What Railyard sets up for Next.js

Hetzner regions

Nuremberg, Falkenstein and Helsinki keep your data in the EU.

Questions

Which Hetzner server size should I start with?
Railyard preselects cx22 (2 vCPU, 4 GB of memory). Builds run on a separate build server, so the app server only has to run your app. You can resize or add servers later.
Where does my Next.js app's data live?
On the Hetzner server in your account, in the region you pick. Nuremberg, Falkenstein and Helsinki keep your data in the EU.
What does it cost to run Next.js on Hetzner?
Hetzner bills you for the server at its own price. Railyard adds no markup on compute and charges one flat price per team: Launch is $22 a month with 2 servers, Scale is $45 with 5, and every plan starts with a 14-day trial.

Deploy Next.js 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.

Theme
Colors