← Blog
tutorials

How to Build a Website for $5/Month: Hetzner + Coolify Guide

Build a fast, self-hosted website for $5/month using Hetzner + Coolify. Step-by-step guide for solopreneurs: setup, SSL, deploy from Git, and escape SaaS bloat.

·16 min read
How to Build a Website for $5/Month: Hetzner + Coolify Guide — illustration

TL;DR: Spin up an ~€5 Hetzner VPS, install Coolify, point your domain, deploy from Git, and get free SSL in under an hour. Minimal, fast, under your control.

Introduction

Too many “simple” websites end up chained to bloated SaaS and upsells you never asked for. If you’re a solopreneur or small team, you don’t need $50/month to host a landing page or a fast blog. You can build a website for $5/month—reliably—if you pick the right stack: Hetzner for the VPS and Coolify as your self-hosted PaaS. This guide shows you exactly how to do it without drama or vendor lock-in.

You’ll get the setup steps, realistic costs, performance tips, and a straight answer to “Is $5 actually enough?” Along the way, we keep the BareStack philosophy up front: minimalism, performance, control. Less fluff, more shipping. If you want a cheap self-hosted website that’s fast and in your hands, let’s get it done.

Why this $5/month website matters for solopreneurs

The $5 myth: Here’s what you can actually run. On a ~€5 Hetzner instance (CX11 or CPX11), you can comfortably run static sites (Astro, Next.js static export, Hugo, Vite) and small dynamic stacks (lightweight WordPress or basic PHP). That translates into real-world sites: a designer portfolio with a blog, a coach’s landing page with a booking link, or a micro‑SaaS marketing site with a status page. Static sites barely sip resources; a small WordPress with caching runs fine if you avoid heavy plugins and page builders. The key is picking tools that respect limited RAM and CPU, which most solopreneur sites already do.

SaaS bloat vs owning your stack. SaaS hosting for tiny sites is packed with convenience—until it isn’t. You get arbitrary limits, upsells for SSL or builds or bandwidth, or you pay forever for features you don’t use. With a VPS, you own the system and the trade-offs. Your monthly bill is simple, your performance depends on your code and configuration, and you’re free to move when you want. More importantly, you’re not paying for enterprise-grade whiz‑bang you’ll never touch.

Performance, privacy, control. Your VPS sits close to your users, uses fast disks, and doesn’t share a node with thousands of noisy neighbors like old-school shared hosting. You can run privacy‑friendly analytics (Plausible/Umami), add uptime monitoring, and enforce security the way you want. You can tune caching, gzip/brotli, and avoid the telemetry and trackers that ship by default with many “free” platforms. For solopreneur website hosting, this is the happy path: speed, control, and a bill you can understand.

Owning your stack doesn’t mean complexity. It means minimal, predictable tools you understand and can move in an afternoon.

Definitions that actually help

Hetzner. Hetzner is an EU-based cloud provider known for high performance per dollar (or euro). Their Cloud instances (CX and CPX) are inexpensive, with generous bandwidth, fast NVMe storage, and data centers in Germany, Finland, and the US (Ashburn/Hillsboro availability varies—check their current regions). For a cheap self-hosted website, Hetzner Cloud is the sweet spot for price/performance.

Coolify. Coolify is a self-hosted PaaS. Think “Heroku light, on your server.” It runs on Docker and gives you a GUI to deploy apps straight from Git, manage environment variables, get Let’s Encrypt SSL, set build commands, and even spin up databases. It’s friendly enough for your first self-host, powerful enough not to box you in later.

Static vs dynamic. Static sites are prebuilt—HTML/CSS/JS served directly from Nginx/Traefik. They’re fast, tiny, and perfect for marketing pages, blogs, documentation, and many Next.js/Astro/Vite projects. Dynamic sites run server code on request—think WordPress/PHP, Node SSR, small Flask/Django apps. On ~$5/month, static shines. Dynamic can be fine if you keep it lean: caching, avoid heavy plugins, and watch memory usage. If your site is truly dynamic (e.g., custom dashboards, authenticated content), $10–$15/month may be the right move for headroom.

Rule of thumb: If the content doesn’t change per user, ship it as static. You’ll get speed, simplicity, and fewer moving parts.

Cost and options at a glance

What you pay at $5/month. The baseline is your server (€4–€6 for Hetzner CX11/CPX11) plus a domain (~$10–$20/year). That’s it. Optional: Hetzner’s automated backups (adds ~20% of server cost) or occasional snapshots billed by GB. If you don’t want Hetzner backups, you can run free offsite backups to an S3-compatible bucket (e.g., Backblaze B2) for pennies.

When to budget $10–$15/month. If you need a database (Postgres or MySQL), heavier frameworks, or multiple small apps on one box, add headroom. CPX11 or CPX21 gives more CPU/RAM and storage for a couple bucks more. This also buys you stability under spikes and better build times. WordPress with WooCommerce, Ghost with image-heavy posts, or a small Node SSR site? Budget $8–$15 and sleep better.

Hidden costs to avoid. Egress overage is rare for small sites but know your limits (Hetzner’s included bandwidth is generous). Paid DNS is unnecessary for simple sites—use your registrar or Cloudflare’s free DNS. Avoid surprise add-ons: paid “SiteLock,” “Performance Booster,” or “Premium SSL” are marketing, not necessities. For database backups, don’t rely only on snapshots—do logical backups (SQL dumps) regularly.

ProviderPlanApprox MonthlyCPU/RAMStorageBandwidthNotes
Hetzner CloudCX11/CPX11~$5 (≈€4–€6)1–2 vCPU / 2GB20–40GB SSDHighBest $/perf, EU regions
VultrRegular~$51 vCPU / 1GB25GB2–3TBMany regions, solid baseline
DigitalOceanBasic~$61 vCPU / 1GB25GB1TBSimple UX, pricier per unit
Shared hostingcPanel basic$3–$5 promoSharedShared“Unlimited”*Slow, upsells, noisy neighbors
Netlify/VercelFree tier$0 (limits)n/an/an/aGreat for static, paid tiers scale
  • Always verify current pricing/limits.

The cheapest plan that fits your traffic is the best plan—until your time becomes more expensive than your server. Then upgrade.

Step 1: Create your Hetzner server (10 minutes)

Choose plan and region. Log into Hetzner Cloud, create a new project, and spin up a server. Pick Ubuntu 22.04 LTS or Debian 12 (both solid). Choose CX11 for a single vCPU and 2GB RAM, or CPX11 if you want 2 vCPU for a few cents more. Region: pick the closest data center to your largest audience for lower latency. If your clients are split between EU and US, either is fine; a CDN or Cloudflare can smooth the edges.

One-time setup. Add your SSH key during creation (Hetzner lets you paste your public key). After the server is up:

  • Create a non-root user and grant sudo: ssh root@YOUR_SERVER_IP adduser deploy usermod -aG sudo deploy

  • Copy your SSH key to the new user and disable password auth later: rsync -avz /.ssh/id_rsa.pub deploy@YOUR_SERVER_IP:/.ssh/authorized_keys

  • Basic firewall with UFW: apt update && apt install -y ufw ufw default deny incoming ufw default allow outgoing ufw allow OpenSSH ufw allow 80 ufw allow 443 ufw enable

  • Enable unattended security updates: apt install -y unattended-upgrades dpkg-reconfigure --priority=low unattended-upgrades

Add a small swap file (stability on low RAM boxes). Swap smooths memory spikes (builds, package installs) on 2GB instances:

fallocate -l 1G /swapfile chmod 600 /swapfile mkswap /swapfile swapon /swapfile printf '/swapfile none swap sw 0 0\n' | tee -a /etc/fstab sysctl vm.swappiness=10 printf 'vm.swappiness=10\n' | tee -a /etc/sysctl.conf

Optional hardening (recommended): Disable root SSH login and password auth after verifying your deploy user works.

sed -i 's/^#?PasswordAuthentication./PasswordAuthentication no/' /etc/ssh/sshd_config sed -i 's/^#?PermitRootLogin./PermitRootLogin no/' /etc/ssh/sshd_config systemctl reload ssh

That’s it. You’ve got a minimal, secure base ready for Coolify.

Ten minutes of setup now saves hours of firefighting later. Keys, firewall, updates, swap. Done.

Step 2: Install Coolify (10 minutes)

Coolify’s install is one command. Check the official docs for the current installer to avoid stale commands. As of writing, it looks like:

curl -fsSL https://get.coollabs.io/coolify/install.sh | bash

Follow the on-screen prompts. The installer sets up Docker, pulls the required images, and runs Coolify. When it’s done, you’ll access the Coolify panel via the server’s IP and the port it prints (commonly 8000). For example:

  • Visit http://YOUR_SERVER_IP:8000
  • Create your admin account
  • Complete the onboarding

Secure Coolify. Two easy wins:

  • Set strong admin credentials and enable HTTPS for the panel. Coolify supports securing the dashboard via a domain and Let’s Encrypt. Assign a subdomain like panel.yourdomain.com to your server’s IP, add it in Coolify’s settings, and request SSL.
  • Restrict panel access. At minimum, keep the Coolify port closed to the public internet and only expose via HTTPS on your chosen domain. You can block port 8000 using UFW and only allow 80/443. If you want extra protection, use Cloudflare Access or restrict the dashboard by IP.

Optional: Put the server behind Cloudflare. Cloudflare’s free tier gives you DDoS protection, HTTP/2 and HTTP/3, and caching for static assets. Steps:

  • Point your domain’s nameservers to Cloudflare.
  • Add an A record for your site to the server IP and toggle the orange proxy on.
  • In Cloudflare SSL/TLS, set Full (Strict) if you have valid certs at origin (Coolify will handle Let’s Encrypt for your apps).
  • Enable Brotli and set caching for static content.

Trade-off: Cloudflare adds a hop and some complexity, but you gain resilience and global edge caching for static files.

Coolify turns “I’m not a DevOps person” into “I deployed from Git and got SSL” in one sitting.

Step 3: Deploy your website from Git (20 minutes)

Static sites. In Coolify, add a new application and connect your Git provider (GitHub, GitLab, or Bitbucket). Choose your repo. For frameworks:

  • Next.js (static export): In next.config.js, set output: 'export'. Build command: npm ci && npm run build. Publish directory: out.
  • Astro: Build command: npm ci && npm run build. Publish directory: dist.
  • Hugo: Build command: hugo --minify. Publish directory: public.
  • Vite/React: npm ci && npm run build. Publish directory: dist.

Coolify can serve static sites directly behind its integrated reverse proxy. It handles SSL and routing automatically once you map a domain.

WordPress/PHP. Coolify offers one-click templates for Nginx + PHP + database. Create a new “Template” app, pick WordPress (or generic PHP-FPM + Nginx), and set environment variables (DB name, user, password). Coolify will provision containers for the app and the database. Use a lightweight theme and caching plugin (e.g., Cache Enabler or WP Super Cache). Avoid heavy page builders—your $5 box will thank you.

Connect your domain. In your DNS (Cloudflare or your registrar), add:

  • A record: @ pointing to your server IP (for root domain).
  • A record: www pointing to your server IP (optional).
  • Any subdomains you want (e.g., blog, panel).

In Coolify, open your app, add your domain(s), and request a Let’s Encrypt certificate. It’ll fetch and renew certs automatically. If you’re behind Cloudflare, ensure the proxy is on (orange cloud) and that Coolify can still complete HTTP-01 or ALPN challenges. If DNS-01 is required, follow Coolify’s docs for DNS validation.

Deploy from Git. Configure the branch and set auto-deploy on push. Your app builds and deploys on every commit. If the build fails, Coolify shows logs, so you ship fixes fast.

If your site doesn’t need per‑request server code, make it static. You’ll cut CPU use, remove the need for PHP/DB, and reduce the attack surface.

Step 4: Add essentials (free add-ons)

Backups and snapshots. Protect yourself from fat-finger deletes and plugin disasters:

  • Hetzner backups: Toggle automatic backups in your server settings (+~20% cost). Weekly snapshots you can roll back to in minutes.
  • Manual snapshots: Create before big changes. You pay per GB stored but only while you keep them.
  • App-level backups: For WordPress or any DB-backed app, schedule database dumps. You can run a daily cron in the app container or use Coolify’s backup integrations to push dumps to S3-compatible storage (e.g., Backblaze B2). Keep at least 7 days of rolling backups.

Uptime monitoring with Uptime Kuma. In Coolify, deploy Uptime Kuma from the templates. It’s a dead-simple uptime monitor with HTTP checks, SSL expiry alerts, and notifications. Add your site, set a 1-minute interval, and wire a notification channel (email, Telegram, Slack, etc.). Now you’ll know before your clients do.

Privacy-friendly analytics. Spin up Plausible or Umami on the same box. They’re lightweight and respect user privacy. Add the snippet to your site. You’ll get pageviews, referrers, and conversion goals without shipping your data to ad tech. If your main site is static, Plausible/Umami running on the same server won’t stress resources.

Other free wins:

  • Log viewing is built into Coolify; use it for quick triage.
  • Add a simple backup script that prunes old Docker images weekly to keep disk usage under control.
  • If you must send transactional email, use a cheap SMTP provider (like Postmark or Mailgun free tier) rather than hosting mail on the same box.

A $5/month server can be “professional” if you add just two things: backups and monitoring.

Performance and reliability on a shoestring

Caching and compression. For static sites, you’re already winning—no app servers on each request. Make it even faster:

  • Enable Brotli and gzip. If you’re behind Cloudflare, toggle Brotli; otherwise, ensure the reverse proxy used by Coolify is compressing responses.
  • Long cache headers for static assets. Your framework’s production build usually fingerprints assets; set a long TTL.
  • For WordPress, use a page cache plugin to serve static HTML to anonymous visitors. Avoid dynamic fragments unless you need them.

Logs and monitoring without noise. You don’t need enterprise observability:

  • Coolify logs show build and runtime logs per app.
  • Uptime Kuma catches downtime and SSL expiry.
  • Check basics monthly: df -h for disk, free -h for memory, docker ps to confirm expected containers.
  • Enable email or Telegram alerts for Kuma and for your backup jobs.

When to scale up. Upgrade before pain becomes outage:

  • Sustained CPU above ~70% under normal traffic.
  • Frequent swapping or OOM kills (apps restarting unexpectedly).
  • Database size and active connections grow beyond comfort.
  • Build times creeping from seconds to minutes.

Scaling is easy on Hetzner: shut down, resize to CPX21 or CPX31, power back on. No re-architecture required. If your DB grows rapidly, consider splitting it to a managed DB or a separate small VPS.

The best optimization isn’t a microservice—it’s static output and caching. Start there, then scale only when your revenue says so.

Case studies (short and real)

  1. Designer portfolio + blog. Stack: Astro + MDX for content, deployed as static. Analytics: Umami. Monitoring: Kuma ping. Plan: CX11. Resource usage: peak memory under <1GB during builds, ~150MB at runtime. Result: consistently ~100ms TTFB in-region, more on first byte across the pond—still fast. Update flow: write in Git, push, auto‑deploy, done.

  2. Coach landing page + bookings. Stack: Static site built with Vite, hosted via Coolify. Bookings handled offsite via Cal.com link (no server load). SSL via Let’s Encrypt. Uptime monitoring with Kuma. Plan: CPX11 just for faster builds (optional). Result: zero maintenance besides security updates, essentially unbreakable marketing site that costs less than a latte per week.

  3. Micro‑SaaS marketing site + status. Stack: Next.js static export, plus Uptime Kuma status page on a subdomain. Optional Cloudflare in front for edge caching. Plan: CX11. Result: Lighthouse 100s, global TTFB speed-ups thanks to Cloudflare cache, and transparent status page that builds trust.

The pattern is the same: static where possible, tiny dynamic bits when needed, guardrails (backups, monitoring) that cost nothing.

Decision framework you can apply today

Checklist: Are you a fit?

  • You’re comfortable with Git pushes and basic Linux commands.
  • Your site can be static or mostly-static (marketing pages, blog, docs).
  • If dynamic, the load is low and predictable.
  • You value privacy and control, and you don’t want to pay for bloat.
  • You’re okay spending an hour now to save dozens later.

Self‑host vs managed (rule of thumb). If your site is static or low-load, self-host on Hetzner + Coolify. If it’s mission-critical e‑commerce, heavy plugins, or you need 24/7 support, pay for a managed WordPress host or a bigger instance with a managed DB. It’s not about heroics—it’s about picking the simplest path that won’t wake you up at 3am.

Upgrade path. Start at ~$5. If you need more, go to $10–$15 and keep the same architecture:

  • Bump to CPX21/31 for more CPU/RAM.
  • Split the database to its own small VPS or a managed service if it grows.
  • Add Cloudflare for caching and DDoS if traffic ramps.
  • Keep your Git workflow and Coolify; nothing else changes.

Don’t overthink it. Start small, watch the numbers, upgrade when reality—not fear—demands it.

Frequently asked questions

Is $5/month really enough for a real site?
Yes—if you pick the right workload. Static sites will barely touch CPU or RAM, and even a small WordPress can run fine with caching and a lightweight theme. The limits show up with heavy plugins, big media libraries, or lots of logged‑in users. For most solopreneurs, $5 covers a marketing site, blog, and even a tiny analytics instance. If you’re making money and want cushion, spend $10 and don’t think about it again.

Hetzner vs DigitalOcean vs Vultr: which should I pick?
Pick the one closest to your users and that you trust. Hetzner has the best performance per euro and generous bandwidth. DigitalOcean has great docs and UX, but you pay more per unit. Vultr has many regions and is a solid middle ground. For a Hetzner Coolify guide like this, we prefer Hetzner for the cost/quality. If your audience is mostly US‑based and latency matters, check Hetzner’s US regions availability; if not ideal, Vultr or DO can be fine.

Can I host email on the same server (and should I)?
You can, but you shouldn’t. Running mail well (deliverability, SPF/DKIM/DMARC, IP reputation, spam filtering) is a job. Use a dedicated email provider (Fastmail, Proton, or even Gmail/GSuite) for inboxes, and a transactional provider (Postmark, Mailgun) for app emails. It’s cheap, reliable, and won’t tank your domain’s reputation.

What about security and updates over time?
Keep it boring and consistent:

  • Enable unattended upgrades for security patches.
  • Use SSH keys, disable root login, and turn off password authentication.
  • Restrict Coolify’s dashboard access and keep only ports 80/443 open publicly.
  • Back up daily (database/app) and weekly (server snapshots).
  • Rotate secrets periodically and remove unused apps/containers.
  • Review df -h and container logs monthly.

Is EU hosting okay if my clients are in the US (latency, GDPR)?
Latency to the US from EU will add ~80–150ms TTFB for dynamic responses. For static sites behind Cloudflare, much of your content will be cached at the edge, so it’s a non-issue. Regarding GDPR, hosting in the EU is generally positive for privacy posture. If you need data residency in the US, use a US region. For mixed audiences, weigh CDN caching and your primary target market.

Coolify vs CapRover vs Portainer: what’s the difference?

  • Coolify: PaaS experience with Git deploys, templates, env management, and built‑in reverse proxy + SSL. Great for app hosting without writing Docker Compose.
  • CapRover: Similar spirit, also friendly, with one‑click apps and deploys via tar/Git. Slightly different UX, very capable.
  • Portainer: Excellent Docker management GUI, but not a PaaS. It helps you manage containers and stacks; you’ll handle deploy logic yourself.

If your goal is “deploy from Git with SSL and a GUI,” Coolify or CapRover is ideal. Coolify integrates databases and multi‑app management nicely for this use case.

How do I back up and restore quickly if something breaks?

  • App-level: Nightly logical backups (e.g., mysqldump or pg_dump) stored off‑server (S3/B2). Test restore monthly to a staging container.
  • Server-level: Hetzner backups enabled and a manual snapshot before big changes.
  • Restore: New instance > install Coolify > restore app config > deploy from Git > import database > reattach volumes if needed. Time to recover: 30–60 minutes if you’ve rehearsed it.

You don’t have a backup until you’ve practiced a restore. Do it once. It’s 20 minutes that can save your launch.

Step-by-step quick reference: how to host a website on Hetzner

  • Create Hetzner CX11/CPX11 in the nearest region. Add SSH key.
  • SSH in, create deploy user, UFW allow 22/80/443, enable unattended upgrades, add 1G swap.
  • Install Coolify with the official script and create your admin.
  • Connect Git provider in Coolify, add your app (static or WordPress template).
  • In DNS, point domain A record to server IP; in Coolify, add domain and request Let’s Encrypt.
  • Deploy from Git. Verify logs and SSL.
  • Add Uptime Kuma and Plausible/Umami if needed. Enable backups.
  • Optional: Put Cloudflare in front for cache and DDoS.

That’s it. You’ve just built a cheap self-hosted website and gained full control.

Conclusion: ship faster, own your stack, spend $5—not $50

You don’t need bloated hosting, enterprise plans, or shiny dashboards to put a fast, reliable site on the internet. A Hetzner VPS plus Coolify gives you a clean path: deploy from Git, get free SSL, monitor uptime, and back it up—all for around $5/month. That’s the no‑bullshit way to build a website for $5/month and keep control.

Ship your site today. Keep your stack lean. And when you’re ready to organize leads without the cruft, use BareCRM—the minimalist CRM for solopreneurs who would rather work than babysit software: https://app.barestack.org

Minimal tools. Maximum control. That’s BareStack.

Sources

About the author

Anirudh Prashant · Founder & Lead Engineer, BareStack

Founder of BareStack. Builds custom, no-bloat software, self-hosted tooling, and AI automations for solopreneurs and small teams.

BareBOT

Mountain guide for the stack.

BareBOT online. Ask about BareStackOS, self-hosting, docs, or what kind of custom system fits your workflow.

Free CRM guideDocs