first commit

This commit is contained in:
leo committed 2026-11-20 15:16:41 +02:00
commit dd50a0d05e
31 files changed
+5299

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
[Unit]
Description=proxdomain: assign domains to new Proxmox guests
Documentation=file:///opt/proxdomain/README.md
After=network-online.target pve-cluster.service
Wants=network-online.target
[Service]
Type=oneshot
# Secrets live here, not in the config file:
# PROXDOMAIN_PVE_TOKEN=...
# PROXDOMAIN_CF_TOKEN=...
EnvironmentFile=-/etc/proxdomain/env
Environment=PROXDOMAIN_CONFIG=/etc/proxdomain/config.toml
ExecStart=/usr/local/bin/proxdomain watch --once --auto-assign
# The service only talks to the PVE API and local nginx; it needs no home.
NoNewPrivileges=true
PrivateTmp=true
ProtectHome=true
ReadWritePaths=/etc/nginx/conf.d/proxdomain.d /var/lib/proxdomain /var/www/certbot
+11
View File
@@ -0,0 +1,11 @@
[Unit]
Description=Run proxdomain watch every two minutes
[Timer]
OnBootSec=2min
OnUnitActiveSec=2min
AccuracySec=15s
Persistent=true
[Install]
WantedBy=timers.target
+15
View File
@@ -0,0 +1,15 @@
# Example sudoers entry for `webserver.mode = "ssh"` (managing nginx on a
# remote Proxmox host from another machine).
#
# WARNING: `tee`/`mv` into /etc as root makes this account root-equivalent.
# Running proxdomain locally on the Proxmox host (mode = "local", root systemd
# unit) avoids handing out that much power. Prefer that unless you have a
# specific reason to manage the host remotely.
#
# Install with: visudo -f /etc/sudoers.d/proxdomain
proxdomain ALL=(root) NOPASSWD: \
/usr/bin/mkdir, /usr/bin/tee, /usr/bin/chmod, /usr/bin/mv, /usr/bin/rm, \
/usr/bin/test, /usr/bin/cat, /usr/bin/grep, \
/usr/bin/nginx, /usr/bin/caddy, /usr/bin/certbot, \
/usr/bin/systemctl reload nginx, /usr/bin/systemctl reload caddy