Operations
Service
sudo systemctl status domainnotice
sudo systemctl restart domainnotice
journalctl -u domainnotice -f # server log
journalctl -u domainnotice-update # self-update log
The unit runs as domainnotice, with NoNewPrivileges, ProtectSystem=strict (writable: data/ only),
ProtectHome, PrivateTmp, ProtectProc=invisible, a restricted set of address families, and
CAP_NET_BIND_SERVICE only, so it can listen on port 443.
Command line
Run these as the service user, with the configuration:
cd /opt/domainnotice/current
sudo -u domainnotice env DOMAINNOTICE_CONFIG=/opt/domainnotice/config/appsettings.Production.json \
ASPNETCORE_ENVIRONMENT=Production ./DomainNotice.Server <option>
| Option | |
|---|---|
--migrate-only |
Apply pending database migrations and exit (also done at every start) |
--create-local-account NAME |
Create a local admin account; the password is read from stdin (first line) |
--print-fingerprint |
Print the agent-link key fingerprint (64 hex characters) |
--reset-local-password NAME |
Set a new password for a local account and enable it; the password is read from stdin. install.sh --reset-password wraps this. |
--list-local-accounts |
Print the local accounts (name, enabled/disabled) |
Health
GET https://127.0.0.1:<console-port>/healthz returns {"status":"ok","version":"…"}, from loopback only.
Other clients get 404. update.sh uses it.
Backup and restore
Backup, restore and update rollbacks work only on DomainNotice’s own database, as its own role. On a PostgreSQL shared with other applications, their databases are neither included nor touched.
/opt/domainnotice/bin/backup.sh (also available as install.sh --backup / --restore) puts everything in one archive:
- the database: a
pg_dumpof DomainNotice’s own database only, made as its role (other databases on a shared PostgreSQL are not included and not touched); - the configuration:
config/, including the Console certificate; - the keys and data:
data/, including the agent-link key and the Data Protection keys; - the running program:
releases/<version>/.
bin/ (update.sh, backup.sh) and the systemd units run as root and are not part of a backup: a restore always
keeps the ones installed on the server. Older archives that contain them are accepted, but those files are ignored.
sudo /opt/domainnotice/bin/backup.sh create # → /opt/domainnotice/backups/domainnotice-backup-<version>-<host>-<time>.tar.gz
sudo /opt/domainnotice/bin/backup.sh create --output /mnt/nas/ # a folder, or a file name ending in .tar.gz
sudo /opt/domainnotice/bin/backup.sh list
sudo /opt/domainnotice/bin/backup.sh restore /mnt/nas/domainnotice-backup-1.0.2-notice-20261116T020000Z.tar.gz
- Where:
/opt/domainnotice/backups/is root-only (root:root 700). An--outputfolder must be one that only root can change: it and every folder above it owned by root and not writable by group or others, and not a symbolic link./tmp, or a folder owned by another user, is refused. The archive is built in a new private folder inside the destination and then renamed into place. - Restore replaces the tables in DomainNotice’s own database (nothing else on the PostgreSQL server), the
configuration, keys, data and program with the backup’s, and makes the backup’s version the running one. It first
checks the whole archive and refuses it if anything is wrong: paths outside the expected folders, hard links,
devices, FIFOs, setuid or setgid entries, links pointing outside the backup, and any link in
config/. Then it writes a backup of the current state (to/opt/domainnotice/backups/), asks you to typerestore(or--yes), starts the server and waits for it to answer. - Moving to a new server: first install DomainNotice there with
install.sh, from the same version as the backup (this installsupdate.sh,backup.shand the units from a verified package), then restore. The new server’s database connection settings are kept, so a backup from another server works. Point DNS (orSERVERHOST) at the new server. Agents keep working, because the agent-link key comes from the backup. - Secrets: archives contain the agent-link key and the database password. They are written with mode 600, owned by
root. Keep copies off the server, for example in a nightly cron job:
0 3 * * * root /opt/domainnotice/bin/backup.sh create --output /mnt/nas/domainnotice/(the mount point must be owned by root and not writable by others). - Before updates:
update.shalso writes a database dump to/opt/domainnotice/backups/pre-update/before every update.
If data/keys/agent-link.pfx is lost and there is no backup, every agent must be reinstalled with the new fingerprint.
Firewall
| Port | From | |
|---|---|---|
Console port (443, or 80 with --console-mode=http) |
Admin browsers | HTTPS (or plain HTTP) |
| 5150/tcp | All PCs with the agent | Agent link |
| Outbound 636 (or 389) | to the DCs | LDAP |
| Outbound 443 | to github.com, api.github.com, objects.githubusercontent.com |
Only when updates are configured |