Harden before go-live
Close the defaults that make a fresh install unsafe on the internet.
A self-hosted system is only as safe as its deployment. The defaults exist to make development easy; they are not safe defaults for a public server.
The mandatory list
- Change the admin password and remove the public development login.
- Set a real OSMAINT_SECRET. It signs authentication tokens; a known secret means forgeable tokens.
- Set a strong database password in the environment file and do not commit it.
- Terminate TLS. Do not expose plain HTTP to the internet.
- Restrict the API and the web port with a firewall. Expose only what must be public.
- Put the database on a private network, not on a published port.
- Enable the backup timer and verify it ran.
- Disable demo mode on production.
- Review the audit retention and the login throttling.
- Run the vulnerability scan and the dependency audit before the first release.
What good looks like
- The web UI is reachable over HTTPS only.
- The API is reachable only from the network that needs it.
- The database is not reachable from the internet.
- Secrets live in an environment file or a secret store, not in the repository.
- A restore has been tested in the last quarter.
Demo mode
Demo login is fail-closed: it refuses unless demo mode is explicitly enabled, it throttles attempts per IP, and it forces the English locale. Never enable it on an instance that holds real data.
The development default [email protected] / admin must not survive on any internet-facing instance. This is the single most common way a self-hosted system is taken over.
Walk the list against your instance. Every item must have an answer you can point at: a config line, a firewall rule, a timer that ran, a scan that passed.
Terms
- OSMAINT_SECRET
- The HMAC key used to sign authentication tokens. It must be random and private.
- Fail-closed
- A control that denies access when its precondition is missing, instead of allowing it.
OSMAINT Academy · Administration · Harden before go-live · osmaint.org/academy/