[Unit] Description=TT-Tagebuch Node.js Service After=network.target mysql.service [Service] Type=simple User=www-data Group=www-data WorkingDirectory=/var/www/tt-tagebuch.de/backend ExecStart=/usr/bin/node server.js Restart=always RestartSec=10 StandardOutput=journal StandardError=journal SyslogIdentifier=tt-tagebuch # Umgebungsvariablen Environment=NODE_ENV=production # PORT: HTTP-Server für API (wird von Apache auf Port 443 proxied) Environment=PORT=3050 # HTTPS_PORT: HTTPS-Server für Socket.IO (direkt erreichbar auf Port 3051) Environment=HTTPS_PORT=3051 # Sicherheit NoNewPrivileges=true PrivateTmp=true [Install] WantedBy=multi-user.target