Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
fix: Switch proxy socket to directory-level bind mount for stability
rcourtmanc7bb76c12eef
diff --git a/cmd/pulse-temp-proxy/main.go b/cmd/pulse-temp-proxy/main.goindex 5fa1f6531b..504ac26fa3 100644--- a/cmd/pulse-temp-proxy/main.go+++ b/cmd/pulse-temp-proxy/main.go@@ -22,7 +22,7 @@ var ()const (- defaultSocketPath = "/var/run/pulse-temp-proxy.sock"+ defaultSocketPath = "/run/pulse-temp-proxy/pulse-temp-proxy.sock"defaultSSHKeyPath = "/var/lib/pulse-temp-proxy/ssh")diff --git a/internal/tempproxy/client.go b/internal/tempproxy/client.goindex 51f23171b3..1ffa081983 100644--- a/internal/tempproxy/client.go+++ b/internal/tempproxy/client.go@@ -11,7 +11,7 @@ import ()const (- defaultSocketPath = "/var/run/pulse-temp-proxy.sock"+ defaultSocketPath = "/run/pulse-temp-proxy/pulse-temp-proxy.sock"defaultTimeout = 10 * time.Second)diff --git a/scripts/install-temp-proxy.sh b/scripts/install-temp-proxy.shindex 238b09d952..95b5e3c001 100755--- a/scripts/install-temp-proxy.sh+++ b/scripts/install-temp-proxy.sh@@ -71,7 +71,8 @@ print_info "Installing pulse-temp-proxy for container $CTID"BINARY_PATH="/usr/local/bin/pulse-temp-proxy"SERVICE_PATH="/etc/systemd/system/pulse-temp-proxy.service"-SOCKET_PATH="/var/run/pulse-temp-proxy.sock"+RUNTIME_DIR="/run/pulse-temp-proxy"+SOCKET_PATH="/run/pulse-temp-proxy/pulse-temp-proxy.sock"SSH_DIR="/var/lib/pulse-temp-proxy/ssh"# Install binary - either from local file or download from GitHub@@ -152,12 +153,16 @@ ExecStart=/usr/local/bin/pulse-temp-proxyRestart=on-failureRestartSec=5s+# Runtime directory for socket+RuntimeDirectory=pulse-temp-proxy+RuntimeDirectoryMode=0770+# Security hardeningNoNewPrivileges=truePrivateTmp=trueProtectSystem=strictProtectHome=true-ReadWritePaths=/var/lib/pulse-temp-proxy /var/run+ReadWritePaths=/var/lib/pulse-temp-proxy# LoggingStandardOutput=journal@@ -191,28 +196,38 @@ fiprint_info "Socket ready at $SOCKET_PATH"-# Configure LXC bind mount+# Configure LXC bind mount - mount entire directory for socket stabilityLXC_CONFIG="/etc/pve/lxc/${CTID}.conf"-BIND_ENTRY="lxc.mount.entry: /var/run/pulse-temp-proxy.sock var/run/pulse-temp-proxy.sock none bind,create=file 0 0"+BIND_ENTRY="lxc.mount.entry: /run/pulse-temp-proxy run/pulse-temp-proxy none bind,create=dir 0 0"# Check if bind mount already exists-if grep -q "pulse-temp-proxy.sock" "$LXC_CONFIG"; then+if grep -q "pulse-temp-proxy" "$LXC_CONFIG"; thenprint_info "Bind mount already configured in LXC config"+ # Remove old socket-level bind if it exists+ if grep -q "pulse-temp-proxy.sock" "$LXC_CONFIG"; then+ print_info "Upgrading from socket-level to directory-level bind mount..."+ sed -i '/pulse-temp-proxy\.sock/d' "$LXC_CONFIG"+ echo "$BIND_ENTRY" >> "$LXC_CONFIG"+ NEEDS_RESTART=true+ fielseprint_info "Adding bind mount to LXC config..."echo "$BIND_ENTRY" >> "$LXC_CONFIG"+ NEEDS_RESTART=true+fi- # Restart container to apply bind mount+# Restart container to apply bind mount if needed+if [[ "${NEEDS_RESTART:-false}" == "true" ]]; thenprint_info "Restarting container to apply bind mount..."pct stop "$CTID" || truesleep 2pct start "$CTID"- sleep 3+ sleep 5fi# Verify socket is accessible in containerprint_info "Verifying socket accessibility..."-if pct exec "$CTID" -- test -S /var/run/pulse-temp-proxy.sock; then+if pct exec "$CTID" -- test -S /run/pulse-temp-proxy/pulse-temp-proxy.sock; thenprint_info "Socket is accessible in container"elseprint_warn "Socket is not yet accessible in container"