# A boring production box: nginx, systemd, backups

> One restorable VPS with nginx in front, a systemd unit for the app, and backups you have actually restored.

Source: https://fullbytedeveloper.com/blog/boring-production-box-checklist
Published here: 2026-12-03, updated 2026-12-03

A boring production box is one restorable VPS: nginx terminates HTTP, systemd keeps the app up, backups restore onto a clean machine. Climb later. Ladder neighbors: [cloud complexity you do not need](/blog/cloud-complexity-you-do-not-need), [Compose is enough longer](/blog/compose-is-enough-longer), [when you need Kubernetes](/blog/when-you-need-kubernetes).

## Quick start (under a minute)

Draw three layers: browser to nginx on port 80 or 443, nginx `proxy_pass` to your app on a loopback port, app started by systemd with `Restart=on-failure` [1] [2].

If you cannot describe those three layers on one index card, pause before you add a fourth orchestration product.

## Traffic path on one host

nginx's beginner guide: a master process reads configuration; worker processes handle connections; `nginx -s reload` applies a valid new config without dropping the pattern the guide documents [1].

<figure aria-label="nginx proxy to systemd app with off-box backup">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 360 240" role="img" aria-hidden="true">
  <defs>
    <marker id="boringproductionboxcheck-box-arr" markerWidth="8" markerHeight="8" refX="7" refY="4" orient="auto">
      <path d="M0,0 L8,4 L0,8 Z" fill="#14b8a6"/>
    </marker>
  </defs>
  <rect x="0" y="0" width="360" height="240" rx="12" fill="#0b1f3a"/>
  <text x="36" y="28" text-anchor="middle" font-size="12" font-weight="600" fill="#e6edf7" font-family="system-ui,sans-serif">client</text>
  <rect x="15.4286" y="31" width="41.1429" height="50" rx="4" fill="#123052" stroke="#14b8a6" stroke-width="0.964286"/>
  <text x="36" y="62" text-anchor="middle" font-size="12" fill="#e6edf7" font-family="system-ui,sans-serif">:443 [1]</text>
  <rect x="90" y="-1" width="180" height="210" rx="6" fill="#123052" stroke="#14b8a6" stroke-width="1.28571" stroke-dasharray="6 4"/>
  <text x="180" y="40" text-anchor="middle" font-size="12" font-weight="600" fill="#e6edf7" font-family="system-ui,sans-serif">one VPS</text>
  <rect x="102.857" y="50" width="64.2857" height="60" rx="4" fill="#123052" stroke="#14b8a6" stroke-width="0.964286"/>
  <text x="135" y="76" text-anchor="middle" font-size="12" fill="#e6edf7" font-family="system-ui,sans-serif">nginx</text>
  <text x="135" y="92" text-anchor="middle" font-size="12" fill="#e6edf7" font-family="system-ui,sans-serif">workers [1]</text>
  <rect x="192.857" y="50" width="64.2857" height="60" rx="4" fill="#123052" stroke="#14b8a6" stroke-width="0.964286"/>
  <text x="225" y="76" text-anchor="middle" font-size="12" fill="#e6edf7" font-family="system-ui,sans-serif">app</text>
  <text x="225" y="92" text-anchor="middle" font-size="12" fill="#e6edf7" font-family="system-ui,sans-serif">127.0.0.1:8000</text>
  <rect x="141.429" y="114.5" width="77.1429" height="55" rx="4" fill="#123052" stroke="#14b8a6" stroke-width="0.964286"/>
  <text x="180" y="140" text-anchor="middle" font-size="12" fill="#e6edf7" font-family="system-ui,sans-serif">systemd</text>
  <text x="180" y="154" text-anchor="middle" font-size="12" fill="#e6edf7" font-family="system-ui,sans-serif">Restart=on-failure [2]</text>
  <rect x="295.714" y="65" width="51.4286" height="70" rx="4" fill="#123052" stroke="#14b8a6" stroke-width="0.964286"/>
  <text x="321.429" y="96" text-anchor="middle" font-size="12" fill="#e6edf7" font-family="system-ui,sans-serif">backup</text>
  <text x="321.429" y="112" text-anchor="middle" font-size="12" fill="#e6edf7" font-family="system-ui,sans-serif">off-box</text>
  <line x1="56.5714" y1="56" x2="100.286" y2="80" stroke="#14b8a6" stroke-width="0.964286" marker-end="url(#boringproductionboxcheck-box-arr)"/>
  <line x1="167.143" y1="80" x2="190.286" y2="80" stroke="#14b8a6" stroke-width="0.964286" marker-end="url(#boringproductionboxcheck-box-arr)"/>
  <line x1="225" y1="104" x2="187.714" y2="118" stroke="#14b8a6" stroke-width="0.771429" marker-end="url(#boringproductionboxcheck-box-arr)"/>
  <line x1="257.143" y1="100" x2="293.143" y2="96" stroke="#14b8a6" stroke-width="0.771429" stroke-dasharray="4 3" marker-end="url(#boringproductionboxcheck-box-arr)"/>
</svg>
</figure>

Serve static assets with a `root` location when you can; proxy dynamic traffic to the app port [1]. Reload only after a config that parses; the guide treats a failed reload as a signal to fix the file before you touch production traffic again [1].

## Put nginx in front

Minimal reverse-proxy shape from nginx proxy documentation referenced in the beginner guide [1]:

```nginx
server {
    listen 80;
    server_name example.com;

    location /static/ {
        root /var/www/myapp;
    }

    location / {
        proxy_pass http://127.0.0.1:8000;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
    }
}
```

Per nginx docs, test configuration before reload. On a host with nginx installed you would run `nginx -t` then `nginx -s reload` [1]. This draft host does not ship nginx in the image, so those commands are not reproduced here as observed output.

## Run the app under systemd

`systemd.service` documents unit files that describe services: `ExecStart` runs the process; `Type` controls how readiness is judged (for many simple apps, `simple` or `exec`) [2]. A minimal sketch:

```ini
[Unit]
Description=my app
After=network-online.target
Wants=network-online.target

[Service]
WorkingDirectory=/opt/myapp
ExecStart=/opt/myapp/.venv/bin/python -m myapp
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target
```

Enable and start with `systemctl enable --now myapp.service` on distributions that use systemd (paths and unit names vary). Read the unit's man page for `User=`, environment files, and hardening options before you invent flags [2].

## Confirm systemd on this draft host

Observed on this draft host (systemd 255.4-1ubuntu8.18, 2026-12-03):

```bash
systemctl --version | head -1
```

```text
systemd 255 (255.4-1ubuntu8.18)
```

That version line is only proof this VM runs systemd, not that your VPS matches. Pin your own `systemctl status yourapp.service` output in your runbook after you deploy.

## Prove backups with a restore drill

Checklist item that fails most audits: a restore you actually ran.

```text
  RESTORE DRILL (write dates in your runbook)
  -------------------------------------------

  [ ] Inventory: app data, TLS material, nginx conf, unit files, env templates
  [ ] Off-box copy: object storage or second host (not the same disk)
  [ ] Blank VM: restore from backup, install nginx + unit, start app
  [ ] Smoke: curl health URL from outside; compare to pre-fail snapshot
  [ ] Record: who ran drill, ISO date, time to green
```

Name the backup tool in your private runbook; this page stays on the requirement, not a vendor recipe. Without step three, you have replication, not recovery.

## Firewall and published ports

Default-deny inbound on the VPS firewall except SSH from your IP or tailnet, HTTP, and HTTPS to nginx. The app on `127.0.0.1:8000` should not accept the public internet directly. Providers differ on whether ufw, firewalld, or cloud security groups own that rule; pick one layer and document it in the same runbook as nginx.

Outbound rules matter less for a first boring box, but note if your app must reach a managed database or object storage so you can debug egress failures without guessing.

## Operate without heroics

Automatic OS security updates belong on the box when your distro supports them safely. Still read maintenance mail from your provider. Disk alerts should page before the database does ([cloud complexity you do not need](/blog/cloud-complexity-you-do-not-need) names the one-VPS start).

Logs: nginx access and error logs plus journald for the unit (`journalctl -u myapp.service -f` per your distro docs). One aggregate health URL keeps external monitors dumb and cheap.

TLS: use your provider's documented path (Certbot, Caddy, or load balancer termination). nginx beginner material assumes you terminate TLS somewhere; do not publish port 8000 directly to the internet if the app is not built for that threat model.

Document renewal: who gets email from Let's Encrypt, which cron or timer runs renewal, and what command proves a cert still covers your apex and `www` hostnames. A boring box that serves HTTP on day ninety-one because renewal failed is still a production incident.

## Hand off without folklore

Write a one-page runbook: provider login, DNS registrar, backup location, systemd unit name, nginx paths, and the health URL. Future you at 02:00 Dubai should not need chat scrollback. Link the runbook from the repo README or an internal doc, not from a Post-it on one laptop.

When a teammate joins, they clone the repo, read `AGENTS.md` or your Cursor rules if you use them, and follow the runbook to deploy to staging. Staging can be the same compose or unit files with different env files; the boring shape stays identical.

## Stay boring until evidence says climb

One host with nginx, systemd, and tested backups is the documented first production shape for many apps. Compose on that host is still one machine ([compose is enough longer](/blog/compose-is-enough-longer)). Multi-node triggers live in [when you need Kubernetes](/blog/when-you-need-kubernetes).

Opinion with a reason: a boring box you can rebuild beats a clever cluster you cannot explain at 02:00 Dubai.

## Mistakes that waste a week

Proxying without health checks. nginx will happily forward to a dead upstream until something else notices. Add app health checks or monitor the loopback port.

Reloading broken nginx config. Test with `nginx -t` before reload per nginx guidance [1]. A syntax error during reload can leave you in a worse state than before you edited.

Running the app as root because it was faster. Create a service user, tighten file permissions, and set `User=` in the unit when the man page allows it [2].

Backups that only live on the same volume. Disk failure then kills app and backup together. Off-box is the point.

Skipping the restore drill because snapshots exist. Snapshots help operators; restores help customers. Schedule the drill.

Jumping to Kubernetes because the résumé needs the word. Rewrite the résumé or wait for a measured trigger [5].

Schedule the restore drill on your calendar before you tune nginx worker counts. A passing health URL on a blank VM beats any architecture diagram. If the box stays healthy on one host, [cloud complexity you do not need](/blog/cloud-complexity-you-do-not-need) explains when extra control planes are vanity; multi-container on the same metal stays in [Compose is enough longer](/blog/compose-is-enough-longer). Pair weekly patches with [developer security hygiene weekly](/blog/developer-security-hygiene-weekly) so the VPS you rebuild is not the weak link in the repo.

Send this to the friend whose production box has no restore drill.

Image: Internet-side teal disc arrow into a glass pyramid on a black box, with an orange path from a ringed cylinder past a teal-edged cube, plus dark key-like rods, no people.
https://fullbytedeveloper.com/media/boring-production-box-checklist/boring-production-box-checklist-venice.webp
nginx terminates HTTP, systemd runs the app, backups leave the disk.

## Sources

1. [nginx: Beginner's Guide, accessed 2026-12-03](https://nginx.org/en/docs/beginners_guide.html)
2. [systemd.service man page, accessed 2026-12-03](https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html)
3. [Full Byte Developer: Cloud complexity you do not need](https://fullbytedeveloper.com/blog/cloud-complexity-you-do-not-need)
4. [Full Byte Developer: Compose is enough longer](https://fullbytedeveloper.com/blog/compose-is-enough-longer)
5. [Full Byte Developer: When you need Kubernetes](https://fullbytedeveloper.com/blog/when-you-need-kubernetes)
