---
title: "A two-server self-hosted stack for a solo SaaS · CloudSat"
description: "Plan a self-hosted stack for a solo SaaS on two servers: the app and PostgreSQL on one, analytics, errors and uptime on the other, and what to keep off both."
url: https://cloudsat.io/learn/self-hosted-stack-for-a-solo-saas
updated: 2026-11-18T12:00:00Z
source: CloudSat (https://cloudsat.io/). Prices in USD.
---

[Self-hosting](https://cloudsat.io/learn/topic/self-hosting)

# A two-server self-hosted stack for a solo SaaS

Plan a self-hosted stack for a solo SaaS on two servers: the app and PostgreSQL on one, analytics, errors and uptime on the other, and what to keep off both.

CloudSat team November 18, 2026 7 min read

A one-person product has plenty of hardware and very little attention. Every service you host yourself is one more thing that can page you at 3 a.m., and there is nobody to hand the pager to. The goal is not to self-host everything. It is the smallest set of moving parts that you can understand, monitor and restore on your own. For most bootstrapped products, that means two servers with clear jobs, plus a short list of things that should never run on either of them.

## Two servers, two jobs

Putting everything on one machine looks efficient until the day it fails, because the monitoring, the error tracker and the status page fail with it. Split by job instead:

| Server | Runs | Starting size | When it breaks |
| --- | --- | --- | --- |
| Production | Your app, PostgreSQL, the reverse proxy, background workers | 2 vCPU, 4 GB RAM | Customers notice. You restore from backup or fix forward. |
| Tools | Analytics, error tracking, uptime checks, the status page, newsletters | 1 vCPU, 2 GB RAM | Only you notice. Production keeps serving. |

Put the two servers in different regions. A check that runs from the same data center as the app misses the outages you most need to hear about, and a status page that goes dark with the app tells customers nothing.

## The production server

Keep it boring: one reverse proxy on ports 80 and 443, your app in containers, PostgreSQL bound to localhost or a private Docker network, and workers for email and scheduled jobs. Everything is described in a Compose file kept in Git, so the server can be rebuilt from the repository and a backup. The proxy setup is covered in [Caddy or Nginx as a reverse proxy](https://cloudsat.io/learn/caddy-or-nginx-reverse-proxy), and the uptime habits that keep a single server healthy are in [keep a business app online on a VPS](https://cloudsat.io/learn/keep-a-business-app-online-on-a-vps).

### Plain Compose or a self-hosted PaaS

A PaaS gives you push-to-deploy, rollbacks, managed databases and certificates from a web panel. Two common choices:

- **Coolify** is Apache-2.0 licensed and deploys from a Git host, a Dockerfile, a Compose file or an image, with scheduled backups. It needs at least 2 CPU cores, 2 GB of RAM and 10 GB of disk.
- **Dokploy** is Apache-2.0 outside a separate proprietary directory, routes traffic through Traefik, and schedules database backups to external storage.

Both install with a script piped to `bash`, so download it and read it before running it. A PaaS adds its own containers and database to your server, and its upgrades become part of your maintenance. If you deploy one app a few times a week, `git pull` and `docker compose up -d --build` in a small script may be all you need.

### PostgreSQL stays on the same box, for now

A separate database server adds a network hop, another machine to patch and more cost. Keep PostgreSQL next to the app until you can name the reason to move it: the database needs more memory than the app can share, or you want a replica in another region. Until then, the rule that matters is that the database port is never published to the internet.

## The tools server

| Job | Tool | License | Notes |
| --- | --- | --- | --- |
| Product analytics | Umami | MIT | Cookie-free, runs on PostgreSQL |
| Error tracking | GlitchTip | MIT | Accepts events from Sentry's open-source SDKs, adds uptime checks, PostgreSQL 14 or newer |
| Error tracking, lighter | Bugsink | PolyForm Shield 1.0.0 | Sentry-SDK compatible; source-available, with a noncompete clause |
| Uptime and status page | Uptime Kuma | MIT | Version 2, many notification services, multiple status pages |
| Uptime as code | Gatus | Apache-2.0 | Checks defined in a YAML file you can review in Git |
| Newsletters | listmonk | AGPL-3.0 | Single binary on PostgreSQL; sends through SMTP servers you configure |

Pick one tool per row. Several of them need PostgreSQL, so run one PostgreSQL container with a separate database and user for each tool instead of one database server per tool. GlitchTip recommends 512 MB of RAM, which leaves room on a 2 GB server for the rest of the table.

Bugsink's license deserves a second look before you choose it: PolyForm Shield allows any use except providing a product that competes with Bugsink. Tracking errors in your own product is fine; reselling error tracking is not.

## Keep these off your servers

Some jobs are cheap to rent and expensive to get wrong. Leave them with a specialist:

1. **Transactional email delivery.** Password resets and receipts must arrive. Send them through an SMTP relay or a provider you already pay for, as in [send app email through Microsoft 365](https://cloudsat.io/learn/send-app-email-through-microsoft-365). [Sending email from a server](https://cloudsat.io/docs/sending-email) explains why a relay is the simpler route.
2. **Payment processing.** Use your payment provider's hosted checkout or hosted fields, so card data never touches your servers, and react to its webhooks.
3. **Authoritative DNS.** Keep DNS at your registrar or a DNS provider. When a server dies, you repoint a record from anywhere, without that server.
4. **The offsite copy of your backups.** At least one copy must live with another provider, or at least another region, under credentials that the production server cannot use to delete it.
5. **One external check.** Your tools server watches production; something outside both of them should watch the tools server.

## Backups you can restore alone

Snapshots are handy before an upgrade, but they live with the server, so they do not count as the offsite copy. Dump the database every night and send dumps plus uploaded files to another machine with restic, which encrypts and deduplicates:

```bash
#!/usr/bin/env bash
set -euo pipefail
export RESTIC_REPOSITORY="sftp:backup@203.0.113.20:/srv/restic/prod"
export RESTIC_PASSWORD_FILE="/root/.restic-pass"

mkdir -p /var/backups/db
docker compose -f /srv/app/compose.yaml exec -T db \
  pg_dump -U app -Fc app > "/var/backups/db/app-$(date +%F).dump"
find /var/backups/db -name '*.dump' -mtime +3 -delete

restic backup /var/backups/db /srv/app/uploads /srv/app/compose.yaml
restic forget --keep-daily 7 --keep-weekly 4 --keep-monthly 6 --prune
```

Run it from a systemd timer or cron, and have it ping your uptime tool on success so a silent failure turns into an alert. Once a month, restore onto a fresh server: pull the repository, restore the latest snapshot, load the dump, start the app and log in.

```bash
restic restore latest --target /srv/restore
docker compose up -d db
docker compose exec -T db pg_restore -U app -d app --clean --if-exists \
  < /srv/restore/var/backups/db/app-2026-11-18.dump
```

Time the drill. The number of minutes it takes is your real recovery time, and it is usually longer than you guessed. [Back up your data off the server](https://cloudsat.io/docs/backup-your-data) walks through the same restic setup step by step.

## A 20-minute weekly routine

- Apply security updates on both servers and reboot if the kernel changed.
- Read the error tracker's new issues before reading email.
- Check that last night's backup ran and that free disk space is above your threshold.
- Look at the uptime history for slow responses, not only outages.
- Update one container image at a time, starting with the tools server.

## Plan for the week you are unavailable

A solo product has a bus factor of one. Lower the damage instead of pretending it away. Keep a runbook in the repository: where things run, how to restart them, how to restore. Store every credential in a password manager with emergency access for one trusted person, as described in [choose a self-hosted password manager](https://cloudsat.io/learn/choose-a-self-hosted-password-manager). Give that person a read-only login to the status page, and write down which provider holds the domain, the DNS and the payment account.

On CloudSat, this layout fits a 4 GB Cloud VPS for production at $11.58/mo and a 2 GB tools server at $5.98/mo in another region, and [Umami](https://cloudsat.io/apps/deploy-umami), [Uptime Kuma](https://cloudsat.io/apps/deploy-uptime-kuma) and [Coolify](https://cloudsat.io/apps/deploy-coolify) are one-click apps.

## FAQ

### Can it all run on one server at the start?

Yes, if you accept that an outage also takes your monitoring down. In that case, add an external uptime check from day one and move the tools to their own server before you have paying customers.

### When should PostgreSQL get its own server?

When the database and the app compete for memory, when you need a replica for faster recovery, or when backups and restores slow the app. Measure first; a bigger plan is often the simpler fix.

### Is a PaaS worth it for a single app?

It pays off when you deploy often, run preview environments or manage several services. For one app with a small Compose file, a deploy script and a written runbook are less to maintain.

### What should I monitor first?

The public HTTPS endpoint, certificate expiry, free disk space and the nightly backup job. All four are cheap to watch and expensive to miss.

**Run it on CloudSat.** Cloud VPS on AMD EPYC and NVMe from $1.98/mo in 13 regions, delivered in under 5 minutes and paid in crypto. [See plans](https://cloudsat.io/plans) or [deploy a server](https://dash.cloudsat.io/console/deploy).

## Keep reading

[All guides in Self-hosting](https://cloudsat.io/learn/topic/self-hosting)

- [Keep a business app online: uptime on a single VPS](https://cloudsat.io/learn/keep-a-business-app-online-on-a-vps): Cloud and hosting Keep a business app online: uptime on a single VPS 7 min read
- [Self-hosted workflow automation: n8n, Activepieces and more](https://cloudsat.io/learn/self-hosted-workflow-automation-tools): Self-hosting Self-hosted workflow automation: n8n, Activepieces and more 7 min read
- [Self-hosted helpdesk and live chat software compared](https://cloudsat.io/learn/self-hosted-helpdesk-and-live-chat): Self-hosting Self-hosted helpdesk and live chat software compared 6 min read
- [Run a self-hosted newsletter with listmonk](https://cloudsat.io/learn/run-a-newsletter-on-listmonk): Self-hosting Run a self-hosted newsletter with listmonk 6 min read
