Guides

These guides are written for a typical “home server on a Raspberry Pi” setup: a dynamic DNS hostname, a router you control, and a mix of apps that should not be public. They assume you want the smallest possible public surface area, with clear separation between content pages and admin/control screens.

DDNS and Port Exposure (What to Open)

With a DDNS hostname, it is tempting to expose multiple ports: one for a dashboard, one for a file manager, one for an API, and so on. That is usually the fastest way to get compromised. The safer pattern is to expose only one public port: HTTPS (443). Everything else should be internal only, reachable via local network, VPN, or a strict allowlist.

Treat “admin” as a different security class from “public content”. If a page can delete files, reboot services, edit configuration, upload plugins, or run commands, it should not be reachable on the open internet. If you must access it remotely, put it behind VPN or strong authentication plus additional restrictions (rate limit, IP allowlist, and audit logs).

Router rules: simple and reviewable

Reverse Proxy (One Front Door)

A reverse proxy gives you one place to do HTTPS, redirects, security headers, caching, and access control. It also lets you keep internal services on non-public ports and networks. Even if you only run one app today, this is worth doing early: it prevents the “random ports everywhere” problem later.

What “good” looks like

Security headers (baseline)

Exact headers depend on your apps, but you generally want a restrictive default and then loosen per application if needed.

Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
X-Content-Type-Options: nosniff
Referrer-Policy: strict-origin-when-cross-origin
Permissions-Policy: geolocation=(), microphone=(), camera=()

Authentication (Separate Public and Private)

The biggest conceptual mistake is treating everything on your server as “one website”. In practice you have: public pages (that can be indexed), private apps (that are useful but not public), and admin endpoints (that should never be public). Use that classification to decide where ads belong and where they do not.

Practical controls

Backups (Prove You Can Restore)

Backups fail quietly. A directory fills up, a retention job stops, or you discover that you backed up the wrong files. The only reliable approach is to practice restore. A monthly restore drill can be small: a single folder and a config file. The point is to confirm that your backup format and your notes are enough to rebuild.

What to include

Restore drill (example)

1) Restore to a separate folder or spare machine
2) Start only one service
3) Verify login + a basic workflow
4) Write down what you forgot and fix the notes

Maintenance (Keep It Boring)

The best home server is the one that does not need weekly attention. That means: schedule updates, check disk space, and keep logs. Avoid “mystery dependencies” by writing down how a service is deployed and where its data lives.