255 lines
11 KiB
Markdown
255 lines
11 KiB
Markdown
---
|
|
schema_version: 1
|
|
id: home-server.mercury
|
|
type: reference
|
|
scope: [mercury, vps, hosting, nginx, wireguard, firewall]
|
|
sensitivity: private-infrastructure
|
|
last_reviewed: "2026-10-26"
|
|
sources:
|
|
- kind: owner-report
|
|
reference: "Fasthosts plan, fastfetch, nginx sites, iptables and fail2ban output, 2026-10-06"
|
|
- kind: owner-report
|
|
reference: "nginx/WireGuard apt management and public IPv4/CGNAT rationale, 2026-10-06"
|
|
- kind: owner-report
|
|
reference: "Uptime service confirmed as Uptime Kuma; notifications received in Discord server Jupiter, channel #uptimekuma-alerts, 2026-10-23"
|
|
- kind: owner-report
|
|
reference: "Mercury uptime-kuma.sh supplied with bind mount, resource limits and log rotation, 2026-10-26"
|
|
- kind: owner-report
|
|
reference: "Mercury Uptime Kuma only checks WireGuard tunnel health and whether Jupiter is online; alerts Jay on Discord when down, 2026-10-26"
|
|
- kind: owner-report
|
|
reference: "Mercury monitored in Beszel; CPU above 90% for 10 minutes, memory above 90% for 10 minutes and any failed systemd services alerts configured, 2026-10-26"
|
|
- kind: owner-report
|
|
reference: "fail2ban-client version and status output: Fail2ban 1.1.0 with three active jails (nginx-botsearch, nginx-http-auth, sshd), 2026-10-26"
|
|
- kind: owner-report
|
|
reference: "fail2ban-client get output for each jail: maxretry, findtime, bantime and ignoreip, 2026-10-26"
|
|
- kind: owner-report
|
|
reference: "fail2ban-client logpath, journalmatch and actions output: sshd uses journal match _SYSTEMD_UNIT=ssh.service + _COMM=sshd; nginx jails use error.log/access.log; all three use nftables action, 2026-10-26"
|
|
- kind: owner-report
|
|
reference: "Non-comment jail overrides supplied from /etc/fail2ban/jail.local and /etc/fail2ban/jail.d/defaults-debian.conf, 2026-10-26"
|
|
- kind: owner-report
|
|
reference: "Fail2ban logtarget /var/log/fail2ban.log, dbfile /var/lib/fail2ban/fail2ban.sqlite3, dbpurgeage 86400 seconds and systemctl is-enabled output enabled, 2026-10-26"
|
|
- kind: repository
|
|
repository: jupiter-stacks
|
|
revision: working-tree
|
|
paths:
|
|
- mercury/stacks/uptime-kuma/docker-compose.yml
|
|
- mercury/stacks/uptime-kuma/README.md
|
|
related: [home-server.reference, home-server.host, home-server.networking, home-server.operations]
|
|
update_triggers: [hosting-renewal, vps-resize, os-upgrade, proxy-change, firewall-change, certificate-change, alerting-change]
|
|
unknowns:
|
|
- renewal-price-and-renewal-date
|
|
- creation-timestamp-timezone
|
|
- certificate-renewal-method
|
|
- wireguard-allowedips-and-keepalive
|
|
- backup-and-restore-policy
|
|
- uptime-kuma-exact-probes-and-alert-timing
|
|
- fail2ban-ban-escalation-action-details-log-rotation-and-recovery-access
|
|
---
|
|
|
|
# Mercury VPS
|
|
|
|
## Host / subscription
|
|
|
|
| Field | Configuration |
|
|
| --- | --- |
|
|
| Provider | [Fasthosts](https://www.fasthosts.co.uk/); UK data centre |
|
|
| Role / OS hostname | Mercury / `my-vps` |
|
|
| Plan | `1-1-10`; KVM virtual machine |
|
|
| CPU | 1 vCore; reported AMD EPYC-Milan @ 2.00 GHz |
|
|
| RAM | 1 GB plan; guest reports 864.37 MiB |
|
|
| Disk | 10 GB NVMe SSD plan; guest root ext4, 9.64 GiB |
|
|
| OS | Debian GNU/Linux 13 (trixie); x86_64 |
|
|
| Kernel | `6.12.85+deb13-amd64` |
|
|
| Swap | Disabled |
|
|
| Public interface | `ens6`; `185.230.217.66/32` |
|
|
| WireGuard | Server `10.0.0.1/24`; Jupiter peer `10.0.0.2/24` |
|
|
| Created | `2026-03-01 20:48:51`; timezone unconfirmed |
|
|
| Payment | GBP 10.00 prepaid for one year; renewal terms unconfirmed |
|
|
|
|
Capacities distinguish provider allocation from guest-visible values.
|
|
|
|
## Ingress
|
|
|
|
nginx runs directly in the VM, not in Docker; nginx and WireGuard are
|
|
apt-managed. Mercury provides static public IPv4 ingress because Jupiter's
|
|
home connection uses CGNAT. Residential-IP exposure is avoided by design.
|
|
|
|
| Hostname | Upstream |
|
|
| --- | --- |
|
|
| `umbra.mom`, `*.umbra.mom` | `https://10.0.0.2:443` over WireGuard |
|
|
| `gitea.umbra.mom` | Same; dedicated registry location `/v2/` |
|
|
| `john.gatward.dev`, `samstoreymusic.com` | `https://10.0.0.2:443` |
|
|
| `uptime.umbra.mom` | `http://127.0.0.1:3001` |
|
|
|
|
- HTTP -> HTTPS: `301`; unmatched default server: `418`.
|
|
- TLS terminates at nginx; upstream HTTPS terminates again at Jupiter Traefik.
|
|
- Upstream certificate verification disabled: `proxy_ssl_verify off`.
|
|
- Certificates: `/etc/letsencrypt/live/<domain>/{fullchain.pem,privkey.pem}`;
|
|
`umbra.mom` certificate also serves its subdomains.
|
|
- Preserves `Host`; sets `X-Real-IP`, `X-Forwarded-For`, `X-Forwarded-Proto`;
|
|
forwards WebSocket upgrade headers.
|
|
- Gitea `/v2/`: unlimited request body; proxy timeouts `900s`.
|
|
|
|
## Monitoring / notifications
|
|
|
|
Mercury is now monitored by the **Beszel hub on Jupiter**, confirmed by the
|
|
owner on 2026-10-26. The following Mercury alerts are configured:
|
|
|
|
| Alert | Trigger |
|
|
| --- | --- |
|
|
| CPU usage | Above 90% for 10 minutes |
|
|
| Memory usage | Above 90% for 10 minutes |
|
|
| Failed Services | Any failed systemd service |
|
|
|
|
These are deployed alert settings, not proposed additions. Beszel's Failed
|
|
Services rule detects failed systemd units, not every error-level journal entry.
|
|
Alert settings are stored in the Beszel hub UI/database, not the agent Compose
|
|
file. Beszel cannot deliver these alerts while Jupiter or its hub is down.
|
|
|
|
Uptime Kuma runs on Mercury, served at `https://uptime.umbra.mom` through
|
|
the local upstream `http://127.0.0.1:3001`. Its current monitoring scope is
|
|
**only the health of the WireGuard tunnel and whether Jupiter is online**.
|
|
It notifies **Jay on Discord when either is down**, using the **Jupiter**
|
|
Discord server's `#uptimekuma-alerts` channel. Coverage confirmed by the owner
|
|
on 2026-10-26; notification receipt previously confirmed on 2026-10-23.
|
|
It does not currently monitor individual containers or application health.
|
|
|
|
The supplied `~/uptime-kuma.sh` is now represented by
|
|
`mercury/stacks/uptime-kuma/docker-compose.yml` in `jupiter-stacks`.
|
|
It retains image `louislam/uptime-kuma:2-slim`, container name `uptime-kuma`,
|
|
restart policy `unless-stopped`, loopback port `3001`, and bind mount
|
|
`/opt/uptime-kuma:/app/data`. Limits remain 300 MiB RAM and 0.5 CPU, with
|
|
10 MiB / 3-file log rotation (Compose explicitly selects `json-file`).
|
|
The adjacent README documents a stopped-data backup and migration into the
|
|
Mercury Portainer environment. Migration has not been confirmed; the repository
|
|
change alone does not replace the running container. nginx remains host-managed.
|
|
|
|
Exact probe types, targets and alert timing have not been recorded. A failed
|
|
check over WireGuard can indicate a tunnel/path failure rather than a powered-off
|
|
Jupiter. Mercury monitors independently of Jupiter, but cannot report its own
|
|
complete outage through this instance; an external monitor is not yet confirmed.
|
|
See [Observability](operations.md#observability) for container-alerting guidance.
|
|
|
|
## Firewall / fail2ban
|
|
|
|
- UFW-managed iptables: INPUT/FORWARD `DROP`; OUTPUT `ACCEPT`.
|
|
- UFW allows TCP `22,80,443`; UDP `80,443,51820`.
|
|
- Docker forwarding has separate rules; INPUT policy alone does not define
|
|
container exposure.
|
|
- Fail2ban version: `1.1.0`; three active jails: `nginx-botsearch`,
|
|
`nginx-http-auth`, `sshd`. Confirmed from owner-supplied CLI output on
|
|
2026-10-26.
|
|
|
|
Read-only commands to check the installed version and active jails:
|
|
|
|
```bash
|
|
sudo fail2ban-client version
|
|
sudo fail2ban-client status
|
|
```
|
|
|
|
Effective jail settings from owner-supplied CLI output on 2026-10-26:
|
|
|
|
| Jail | Retry threshold (`maxretry`) | Detection window (`findtime`) | Ban duration (`bantime`) | IP/network exemptions (`ignoreip`) |
|
|
| --- | --- | --- | --- | --- |
|
|
| `sshd` | 5 | 600 seconds (10 minutes) | 600 seconds (10 minutes) | None |
|
|
| `nginx-http-auth` | 3 | 600 seconds (10 minutes) | 600 seconds (10 minutes) | None |
|
|
| `nginx-botsearch` | 2 | 600 seconds (10 minutes) | 3600 seconds (1 hour) | None |
|
|
|
|
These thresholds count filter-matched failures within the detection window,
|
|
not arbitrary requests. No IP/network is explicitly exempt through `ignoreip`
|
|
in any of the three jails; other ignore mechanisms have not been inspected.
|
|
Ban escalation settings and enforcement action details have not yet been
|
|
recorded. Avoid deliberate failed SSH login
|
|
tests without a recovery route: the administrator's IP has no `ignoreip`
|
|
exemption.
|
|
|
|
### Fail2ban log sources / enforcement
|
|
|
|
Owner-supplied runtime output on 2026-10-26 confirms:
|
|
|
|
| Jail | Monitored source | Configured action |
|
|
| --- | --- | --- |
|
|
| `sshd` | systemd journal: `_SYSTEMD_UNIT=ssh.service + _COMM=sshd`; no log file monitored | `nftables` |
|
|
| `nginx-http-auth` | `/var/log/nginx/error.log`; no journal match set | `nftables` |
|
|
| `nginx-botsearch` | `/var/log/nginx/access.log`; no journal match set | `nftables` |
|
|
|
|
The `+` in the SSH journal match is an OR: entries matching `ssh.service` or
|
|
the `sshd` command are selected. All three jails use the `nftables` action;
|
|
the action name alone does not establish the exact blocked ports, chains or
|
|
IPv4/IPv6 coverage. Those action parameters have not yet been inspected.
|
|
|
|
### Fail2ban persistent configuration
|
|
|
|
Owner-supplied non-comment configuration on 2026-10-26:
|
|
|
|
`/etc/fail2ban/jail.local`:
|
|
|
|
```ini
|
|
[nginx-botsearch]
|
|
enabled = true
|
|
port = http,https
|
|
filter = nginx-botsearch
|
|
logpath = /var/log/nginx/access.log
|
|
maxretry = 2
|
|
findtime = 600
|
|
bantime = 3600
|
|
|
|
[nginx-http-auth]
|
|
enabled = true
|
|
filter = nginx-http-auth
|
|
port = http,https
|
|
logpath = /var/log/nginx/error.log
|
|
maxretry = 3
|
|
```
|
|
|
|
`/etc/fail2ban/jail.d/defaults-debian.conf`:
|
|
|
|
```ini
|
|
[DEFAULT]
|
|
banaction = nftables
|
|
banaction_allports = nftables[type=allports]
|
|
|
|
[sshd]
|
|
backend = systemd
|
|
journalmatch = _SYSTEMD_UNIT=ssh.service + _COMM=sshd
|
|
enabled = true
|
|
```
|
|
|
|
The nginx jails explicitly target `http,https`. Defining
|
|
`banaction_allports` does not establish that any active jail uses all-port
|
|
banning. The SSH thresholds and nginx HTTP auth timing in the runtime table
|
|
are not explicitly set in these snippets; they are inherited from other
|
|
configuration/defaults.
|
|
|
|
These host configuration files are outside the Docker Compose stacks. Their
|
|
backup coverage and any direct edits to `jail.conf` or filter/action files
|
|
have not been confirmed.
|
|
|
|
### Fail2ban logging / history
|
|
|
|
Owner-supplied runtime settings on 2026-10-26:
|
|
|
|
| Setting | Value |
|
|
| --- | --- |
|
|
| Fail2ban log destination (`logtarget`) | `/var/log/fail2ban.log` |
|
|
| Persistent database (`dbfile`) | `/var/lib/fail2ban/fail2ban.sqlite3` |
|
|
| Database purge age (`dbpurgeage`) | 86400 seconds (24 hours) |
|
|
| Start at boot (`systemctl is-enabled fail2ban`) | `enabled` |
|
|
|
|
The purge age controls cleanup of old database ban history; it is not the ban
|
|
duration and does not define log-file retention. Log rotation and retained
|
|
log history have not yet been inspected. The database is not an established
|
|
long-term event archive, so a future historical ban-count widget must account
|
|
for cleanup and log rotation rather than treating it as complete history.
|
|
|
|
Boot enablement does not by itself prove service health or successful
|
|
enforcement. Current bans can be inspected without changing configuration:
|
|
|
|
```bash
|
|
sudo fail2ban-client status sshd
|
|
sudo fail2ban-client status nginx-http-auth
|
|
sudo fail2ban-client status nginx-botsearch
|
|
```
|
|
|
|
Rules and versions are supplied snapshots, not live inspection.
|