Files
notes/docs/home-server/mercury.md
T
2026-11-02 16:47:00 +00:00

8.0 KiB

schema_version, id, type, scope, sensitivity, last_reviewed, sources, related, update_triggers, unknowns
schema_version id type scope sensitivity last_reviewed sources related update_triggers unknowns
1 home-server.mercury reference
mercury
vps
firewall
fail2ban
uptime-kuma
private-infrastructure 2026-10-30
kind reference
owner-report Hosting/firewall snapshot 2026-10-06; Fail2ban CLI/config and Kuma runtime 2026-10-26
kind reference
owner-report SSH moved to TCP 58250; UFW status verbose after TCP-only web rule change, provider incoming firewall, ss -lntup and docker ps supplied 2026-10-30
kind reference
live-inspection Hostname mercury and nginx 1.26.3 inspected 2026-10-27; firewall/hosting not revalidated
kind repository revision paths
repository jupiter-stacks working-tree
mercury/stacks/uptime-kuma/docker-compose.yml
home-server.networking
home-server.operations
home-server.backups
hosting-renewal
vps-resize
os-upgrade
firewall-change
kuma-change
renewal-price-and-date
creation-timestamp-timezone
certificate-renewal-method
mercury-backup-policy
fail2ban-enforcement-details-and-log-retention
docker-firewall-enforcement
sshd-jail-port-after-ssh-move

Mercury VPS

Host

Setting Value
Provider / plan Fasthosts UK; KVM 1-1-10
CPU / RAM 1 vCore, AMD EPYC-Milan reported; 1 GB plan / 864.37 MiB guest
Disk 10 GB NVMe plan / 9.64 GiB ext4 root; no swap
OS / kernel Debian 13 x86_64; 6.12.85+deb13-amd64
Hostname mercury; older snapshot: my-vps
Public interface ens6; 185.230.217.66/32
Created / payment 2026-03-01 20:48:51, timezone unknown; GBP 10 prepaid/year
Administration SSH on TCP 58250: ssh -p 58250 jay@185.230.217.66; from Jupiter: ssh mercury with Port 58250 in that host's SSH client configuration; nginx/WireGuard apt-managed
Certificates /etc/letsencrypt/live/<domain>/{fullchain.pem,privkey.pem}; renewal method unknown
  • Ingress, tunnel addresses and nginx configuration: Networking.
  • Alert scope, thresholds and Discord destinations: Operations.

Uptime Kuma runtime

  • Supplied launch script: ~/uptime-kuma.sh; Compose replacement in mercury/stacks/uptime-kuma/docker-compose.yml is not confirmed deployed.
  • Image louislam/uptime-kuma:2-slim; container uptime-kuma; restart unless-stopped.
  • Bind /opt/uptime-kuma:/app/data; loopback 127.0.0.1:3001.
  • Limits: 300 MiB / 0.5 CPU; json-file logs 10 MiB x 3.
  • Stop before copying state for migration; preserve the bind directory. nginx stays host-managed.

Firewall / Fail2ban

  • Latest owner-supplied ufw status verbose snapshot 2026-10-30: UFW active; public allows for TCP 80,443,58250 and UDP 51820, each for IPv4 and IPv6. The earlier unqualified 80/443 rules have been replaced with TCP-only rules; no port 22 or UDP 80,443 allow remains.
  • UFW defaults: deny incoming, allow outgoing, deny routed; logging on (low); new profiles skip. Docker forwarding has separate rules and published container ports can bypass UFW INPUT filtering; the UFW defaults alone do not prove Docker port filtering.
  • Last supplied provider incoming firewall: TCP 80,443,8443,8447,58250; UDP 51820, all sources. Removal of 8443,8447 has not been confirmed. This is separate from UFW; traffic must pass both layers.

Public port policy

Port Recommendation Reason
TCP 80 Keep for now nginx redirects HTTP to HTTPS. Mercury certificate renewal is unconfirmed; HTTP-01 renewal would also require it. Jupiter's DNS-01 setup does not establish Mercury's renewal method.
TCP 443 Keep Public nginx HTTPS ingress, including Uptime Kuma.
UDP 51820 Keep WireGuard carries Mercury-to-Jupiter application traffic.
TCP 58250 Keep while public SSH is needed Current administration port. Restrict source IPs only if stable administrator addresses and recovery access are available.
TCP 7007 Jupiter over WireGuard only (10.0.0.2 -> 10.0.0.1) Dozzle agent; do not expose publicly.
TCP 8443,8447 Remove provider allows No dependency in the documented ingress or repository configuration; neither has a listener or Docker port publication in the supplied 2026-10-30 output.
UDP 80,443 No allowance needed; removed from UFW Documented nginx uses TCP HTTP/HTTPS, not QUIC/HTTP/3. The supplied provider policy also has no UDP allows for these ports.

Owner-supplied sudo ss -lntup and sudo docker ps --format 'table {{.Names}}\t{{.Ports}}' output on 2026-10-30 confirms:

  • nginx listens on IPv4 TCP 80,443; sshd on IPv4/IPv6 TCP 58250; WireGuard on IPv4/IPv6 UDP 51820. No listener on 22,8443,8447 or UDP 80,443.
  • portainer_agent publishes only 10.0.0.1:9001 over WireGuard; uptime-kuma publishes only 127.0.0.1:3001. Neither requires another public provider allow.
  • DNS 53, SMTP 25 and containerd 33999 listen only on loopback. systemd-resolved listens on TCP/UDP 5355 (LLMNR) on wildcard addresses; do not add a public allow. UDP 68 is the DHCP client, not an application port to disable.
  • beszel-agent is running but no TCP 45876 listener appears. A running container does not establish monitoring connectivity; inspect its logs and effective listener configuration before treating Beszel as healthy.

The TCP-only UFW web rules are confirmed for IPv4 and IPv6. Provider rule removal remains a recommendation, not a confirmed change. Do not close public 58250 until an alternative administration path has been tested with a fresh SSH connection; retain the current session and provider recovery console.

Do not open backend ports publicly: Traefik 8081 is on Jupiter over WireGuard; Kuma 3001 is loopback-only; Portainer agent 9001 is bound to Mercury's WireGuard address. The Dozzle agent listens on TCP 7007 at 10.0.0.1 and must accept only Jupiter (10.0.0.2) over WireGuard; see jupiter-stacks/mercury/stacks/dozzle-agent/README.md. The hub and agent must use the same unique certificate pair; do not use Dozzle's shared built-in certificate. Mercury's Beszel agent is intended to listen on TCP 45876; its rule must be limited to 10.0.0.2 -> 10.0.0.1 over WireGuard, as described in jupiter-stacks/mercury/stacks/beszel-agent/README.md. That rule and listener are absent from the supplied snapshots.

Fail2ban

  • Fail2ban 1.1.0, enabled at boot; effective settings from 2026-10-26:
Jail Source Retries / window Ban
sshd journal: _SYSTEMD_UNIT=ssh.service + _COMM=sshd 5 / 600s 600s
nginx-http-auth /var/log/nginx/error.log 3 / 600s 600s
nginx-botsearch /var/log/nginx/access.log 2 / 600s 3600s
  • All three: action nftables; ignoreip empty. SSH journal + means OR.
  • nginx jails target http,https. Action names do not prove blocked chains, ports or IPv6 coverage.
  • After moving SSH to 58250, verify the sshd jail's effective action targets TCP 58250 (or all ports), not only the default ssh/22. For a multiport action, set port = 58250 in the persistent [sshd] override and reload Fail2ban; inspect the generated nftables rules to confirm enforcement. This has not been revalidated since the port move.
  • Persistent overrides: /etc/fail2ban/jail.local (nginx filters/paths/retries; botsearch timing) and jail.d/defaults-debian.conf (SSH systemd backend/match; nftables defaults).
  • banaction_allports=nftables[type=allports] is defined; active use is unconfirmed. Other timing values are inherited.
  • Log: /var/log/fail2ban.log; DB: /var/lib/fail2ban/fail2ban.sqlite3; dbpurgeage=86400.
  • DB purge age is not ban duration or log retention; escalation, rotation and config backup remain unknown.
  • No administrator IP exemption: retain recovery access before testing failed logins.
sudo fail2ban-client version
sudo fail2ban-client status
sudo fail2ban-client status sshd
sudo fail2ban-client status nginx-http-auth
sudo fail2ban-client status nginx-botsearch