Open-source reference project
Self-host Next.js like you mean it.
HostMarshal is a production-grade Next.js app running on a Hostinger VPS with Docker, Caddy, and Postgres. Every feature Vercel sells, from ISR to streaming and image optimization, is working on your own server.
Deployed on Hostinger
The problem
“Self-hosting Next.js is unsupported” is a myth.
Most tutorials stop at npx create-next-app. When it comes to deployment, they hand-wave you toward a managed platform and move on.
You never see how ISR works without Vercel’s CDN. You never see how streaming plays with a reverse proxy. You never see auth, database migrations, and Docker compose working together in one repo.
The solution
A real app you can deploy, inspect, and learn from.
HostMarshal is not a starter template. It’s a running application with auth, a database, and every major App Router feature, deployed to a VPS behind Caddy with Docker Compose.
Each feature has a dedicated demo page that proves it works. Timestamps, live mutations, and streamed HTML are all verifiable in your browser.
Live demos
Don’t take our word for it. Click through and verify.
Every feature below has a dedicated page with timestamps, live state, and step-by-step instructions to prove it works self-hosted.
Incremental Static Regeneration
Pages regenerate on a timer without a full rebuild. The timestamp proves it: no Vercel required.
View demo →Fetch Cache & Revalidation
Per-fetch caching with configurable TTL. Data stays fast, stays fresh, stays on your box.
View demo →Streaming with Suspense
The shell renders instantly. Slow data streams in progressively, and Caddy forwards chunked HTML without flinching.
View demo →Server Actions
A guestbook that mutates server state from a form. No REST client, no SPA fetch layer, no ceremony.
View demo →next/image Optimization
Images resized, converted, and cached on-disk by the built-in optimizer. No third-party CDN needed.
View demo →Better Auth + Postgres
Full sign-up/sign-in flow with email and social providers, backed by your own PostgreSQL database. Sessions, not JWTs.
Try it →The stack
Everything runs on a single Hostinger VPS. No vendor lock-in.
Hostinger
KVM VPS with root access
Next.js
App Router, RSC, standalone output
PostgreSQL
Your own database, your own data
Better Auth
Email + social sign-in, sessions
Caddy
Reverse proxy, automatic HTTPS
Docker
Reproducible, single-command deploys
Prisma
Type-safe ORM, migrations
01 / Build
Multi-stage Docker build produces a minimal standalone Node image. Prisma generates at build time.
02 / Route
Caddy sits in front as a reverse proxy with automatic HTTPS. Streaming and WebSocket-friendly.
03 / Persist
PostgreSQL stores user data. A Docker volume persists the .next/cache for ISR and Data Cache.
Why Hostinger
The VPS behind this entire project.
Everything you see on this site, from the auth flow and streaming demos to the ISR timestamps, is served from a single Hostinger KVM VPS. No serverless functions, no edge network, no hidden infrastructure.
Hostinger gives you a real Linux box with root access, solid performance, and pricing that makes self-hosting a no-brainer for side projects and production apps alike.
What you get
Full root access
SSH in, install Docker, run whatever you want. It's your server.
KVM virtualization
Dedicated resources, not shared containers. Consistent performance under load.
Global data centers
Pick a region close to your users. Low latency without a CDN.
Affordable pricing
Production-ready VPS plans starting at a few dollars a month.
Stop reading tutorials that end at localhost:3000.
Explore the live demos, sign up to test the auth flow, or grab a Hostinger VPS and deploy it yourself in minutes.