Self-hosting

How to self-host an app without losing a weekend

A step-by-step walkthrough of putting one open-source app on the internet properly — server, DNS, reverse proxy, backups and updates — including the parts the tutorials skip.

Every self-hosting guide starts with docker run and ends with a screenshot of a login page. The parts that decide whether you are still running the app in three months — DNS, TLS, backups, updates, and what to do when a container will not start — are usually skipped. This is the version with those parts included.

We will use one concrete example throughout: putting a workflow automation tool on a domain you own. The same steps work for almost anything in the directory, because the shape of a self-hosted deployment does not change much between apps.

What you actually need

PieceRealistic minimumCost
Server2 vCPU, 2 GB RAM, 40 GB SSD€5–10 / month
DomainAny registrar, one A record€10 / year
Reverse proxyCaddy or Traefik in DockerFree
BackupsObject storage, nightly snapshot€1–3 / month
Your time2–3 hours first time, 20 min afterThe actual cost

Two gigabytes of RAM is the honest floor for a small stack. One gigabyte servers are sold cheaply and will fall over the first time an app runs a migration while you are also browsing the dashboard.

Step 1 — Create the server, then lock the door

Pick a provider and a location near your users. Choose Ubuntu LTS or Debian, add your SSH key at creation time (do not use a password), and boot it. Before installing anything, do three things:

  • Create a non-root user with sudo and disable direct root SSH login.
  • Turn on the firewall: allow SSH, HTTP and HTTPS, drop the rest.
  • Enable unattended security updates. You will not remember to run them.

This step takes ten minutes and prevents the most common failure mode in self-hosting, which is not a broken app — it is a server that was compromised because it was left on defaults.

Step 2 — Point a domain at it

Add an A record for app.yourdomain.com pointing at the server's IP. Use a subdomain rather than the root domain so you can host several apps later without touching the main site. Wait for DNS to propagate — usually a minute, occasionally an hour — before the next step, because certificate issuance will fail if the name does not resolve yet.

Step 3 — Put a reverse proxy in front

You do not expose the app's port to the internet. You run a proxy that terminates TLS and forwards traffic to the container over a private Docker network. Caddy is the shortest path because it fetches and renews certificates automatically:

app.yourdomain.com {
    reverse_proxy app:5678
}

That is the entire configuration. Caddy gets a Let's Encrypt certificate, redirects HTTP to HTTPS, and renews it without you. Traefik does the same job with more moving parts and better Docker label integration; either is fine.

Step 4 — Run the app with persistent storage

Write a docker-compose.yml with two services: the app and its database. Three rules matter more than the file itself:

  1. Pin the image tag. :latest means an upstream release can break your deployment on a Tuesday with no warning. Pin a minor version and upgrade deliberately.
  2. Mount a named volume for the database and the app's upload folder. Anything not in a volume disappears when the container is recreated.
  3. Set the public URL in the environment on first boot. Several apps bake the base URL into password-reset links and webhooks; changing it later is painful.

Then docker compose up -d and check the logs. If the container restarts in a loop, read the last fifty lines rather than the first — the real error is always near the end.

Step 5 — Back up before you need to

A backup you have never restored is a hope, not a backup. The minimum viable schedule is a nightly database dump plus a copy of the uploads volume, pushed to object storage that lives in a different provider from your server. Keep fourteen days. Once a quarter, restore one into a throwaway container and confirm it opens.

The most common self-hosting disaster is not a hack — it is a disk filling up over eight months and taking the database with it. Add a disk-space alert at 80%.

Step 6 — Decide how you will update

Updates are where self-hosted installs quietly rot. Two workable patterns:

  • Manual, monthly. Read the release notes, change the pinned tag, pull, restart, check the app. Thirty minutes a month per app.
  • Managed. A host that handles image updates and snapshots for you. You trade money for the upkeep.

What does not work is "I will update it when something breaks", because by then you are upgrading across six major versions with a database migration in the middle.

What actually breaks

After a few years of doing this, the failure list is short and predictable: a full disk, an expired certificate because DNS moved, a database container killed by the OOM killer on a 1 GB box, and an app that silently stopped sending mail because the SMTP provider rotated credentials. All four are solved by alerts, not by skill.

When to skip all of this

If you want the software and not the server, a managed container host is the rational choice. You get the app on your domain with backups and TLS included, and you pay roughly what a VPS costs plus a few euros for the convenience. RepoCloud is the one we use for quick deployments of the apps in this directory; it is an affiliate link, and the price is the same for you either way.

The honest test: if you enjoy this, self-host on a VPS and never look back. If you do not, pay the managed host and spend the saved Saturday on your actual business. Both are correct answers.

The ten-minute checklist

  • SSH keys only, root login disabled, firewall on.
  • Subdomain with an A record, propagated before certificates.
  • Reverse proxy terminating TLS; app port never public.
  • Pinned image tags and named volumes.
  • Nightly backups to a second provider, restore tested quarterly.
  • Disk and certificate expiry alerts.
  • A monthly thirty-minute window for updates that you actually keep.
tf
techifyFlow editorial

We research, test and document software for small teams. Guides are written from primary sources — project documentation, licence text and our own installs — and updated when the facts change. How we work.

This guide contains affiliate links. If you sign up through one we may earn a commission at no extra cost to you. Full disclosure.