2026-02-01 13:24:03 +00:00
|
|
|
[Unit]
|
|
|
|
|
Description=Archipelago Backend
|
2026-03-09 17:09:59 +00:00
|
|
|
After=network-online.target archipelago-setup-tor.service
|
2026-02-01 13:24:03 +00:00
|
|
|
Wants=network-online.target
|
|
|
|
|
|
|
|
|
|
[Service]
|
2026-03-14 02:54:59 +00:00
|
|
|
Type=notify
|
2026-03-18 00:42:29 +00:00
|
|
|
User=archipelago
|
2026-02-01 13:24:03 +00:00
|
|
|
Environment="ARCHIPELAGO_BIND=0.0.0.0:5678"
|
2026-03-06 13:00:28 +00:00
|
|
|
Environment="ARCHIPELAGO_DEV_MODE=true"
|
2026-03-18 09:56:40 +00:00
|
|
|
ExecStartPre=/bin/bash -c 'mkdir -p /var/lib/archipelago && echo "ARCHIPELAGO_HOST_IP=$(hostname -I 2>/dev/null | awk "{print $$1}")" > /var/lib/archipelago/host-ip.env'
|
2026-02-01 13:24:03 +00:00
|
|
|
ExecStart=/usr/local/bin/archipelago
|
|
|
|
|
Restart=on-failure
|
|
|
|
|
RestartSec=5
|
2026-03-14 04:30:57 +00:00
|
|
|
WatchdogSec=300
|
|
|
|
|
TimeoutStartSec=300
|
2026-02-01 13:24:03 +00:00
|
|
|
|
2026-03-18 00:42:29 +00:00
|
|
|
# Filesystem protection
|
2026-03-18 12:06:35 +00:00
|
|
|
# ProtectSystem=true protects /usr and /boot only.
|
|
|
|
|
# Cannot use =full or =strict because podman needs write to /etc/containers.
|
|
|
|
|
ProtectSystem=true
|
2026-03-18 00:42:29 +00:00
|
|
|
ProtectHome=yes
|
|
|
|
|
PrivateTmp=yes
|
|
|
|
|
|
|
|
|
|
# Privilege restriction
|
2026-03-18 12:06:35 +00:00
|
|
|
# NOTE: NoNewPrivileges, RestrictAddressFamilies, MemoryDenyWriteExecute, and
|
|
|
|
|
# RestrictRealtime are disabled because they all implicitly set the kernel
|
|
|
|
|
# no_new_privs flag, which blocks sudo — required for podman container management.
|
|
|
|
|
# TODO(TASK-11): Migrate to rootless podman, then re-enable all of these.
|
2026-03-18 10:50:13 +00:00
|
|
|
PrivateDevices=no
|
|
|
|
|
SupplementaryGroups=dialout
|
2026-03-18 00:42:29 +00:00
|
|
|
|
2026-03-18 12:06:35 +00:00
|
|
|
# Filesystem protection remains active (ProtectSystem, ProtectHome, PrivateTmp above)
|
2026-03-18 00:42:29 +00:00
|
|
|
|
|
|
|
|
# Logging
|
|
|
|
|
StandardOutput=journal
|
|
|
|
|
StandardError=journal
|
|
|
|
|
|
2026-02-01 13:24:03 +00:00
|
|
|
[Install]
|
|
|
|
|
WantedBy=multi-user.target
|