Development · Article or course
How to self-host a Next.js app on a Hetzner VM using Kamal
Step-by-step tutorial for deploying Next.js to Hetzner using Kamal
A practical guide by LogSnag founder Shayan on deploying containerized Next.js applications to a budget Hetzner virtual machine. It walks through configuring standalone Next.js Docker builds, defining health check routes, and managing deployments with Kamal.
What it's for
- Deploy a production Next.js application to an inexpensive VPS
- Configure multi-stage Docker builds with standalone Next.js output
- Automate container provisioning and zero-downtime updates via Kamal CLI
- Route traffic and SSL to a self-hosted server using Cloudflare
Features
- Next.js health check endpoint configuration
- Optimized multi-stage Dockerfile setup for standalone Next.js
- Hetzner cloud server provisioning guidelines
- Kamal configuration file setup (deploy.yml)
- Server bootstrapping with kamal setup
- Automated app deployment with kamal deploy
- Custom domain routing using Cloudflare DNS proxy
Pricing
Free blog post tutorial
Details
- Type
- Article or course
- Category
- Development
- Topic
- DevOps & Hosting
- Open source
- No
- Platforms
- Web, Linux, Command line
- For
- Indie hackers, full-stack developers, and DevOps engineers looking to cut Next.js hosting costs.
- Alternative to
- Vercel, Railway, Render, Coolify
- Tags
- nextjs, kamal, hetzner, docker, self hosted, deployment
Why it was saved
- @ImSh4yy: Step-by-step guide for a common indie-hacker deployment setup: Hetzner is a cheap VPS provider and Kamal is the popular deployment tool from 37signals.
- @ImSh4yy: Step-by-step guide for a common indie-hacker deployment setup: Hetzner is a cheap VPS provider and Kamal is the popular deployment tool from 37signals.
Compare
Related
Open-source, self-hosted platform alternative to Heroku, Vercel, and Railway
Open-source, self-hosted chat interface for Agno agents and teams
Quick command reference for running n8n via Docker and configuring environments.
CLI tool for instant temporary preview links without GitHub or accounts
Cost-saving hosting strategy using a single VPS and Coolify
Self-hosted WhatsApp REST API configured via Docker in minutes.
Updated