Skip to content

Instantly share code, notes, and snippets.

@WeslieDE
Created July 24, 2023 21:56
Show Gist options
  • Save WeslieDE/c848ebaa1280e4b8e0eb03dddfde2f1b to your computer and use it in GitHub Desktop.
Save WeslieDE/c848ebaa1280e4b8e0eb03dddfde2f1b to your computer and use it in GitHub Desktop.
systemd servicefile for wg-easy
[Unit]
Description=WG-Easy Service
After=network.target
[Service]
ExecStart=/usr/bin/node /app/server.js
WorkingDirectory=/app
Restart=always
User=root
Group=nogroup
Environment=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
Environment=NODE_ENV=production
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=nodejs-server
Environment="PASSWORD=REPLACEME"
Environment="WG_HOST=REPLACEME"
Environment="WG_DEVICE=eth0"
Environment="WG_PORT=51820"
Environment="WG_MTU=1420"
Environment="WG_PERSISTENT_KEEPALIVE=25"
Environment="WG_DEFAULT_ADDRESS=192.168.12.x"
Environment="WG_DEFAULT_DNS=8.8.8.8"
Environment="WG_ALLOWED_IPS=192.168.12.0/24"
Environment="WG_PRE_UP="
Environment="WG_POST_UP="
Environment="WG_PRE_DOWN="
Environment="WG_POST_DOWN="
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment