Created
July 24, 2023 21:56
-
-
Save WeslieDE/c848ebaa1280e4b8e0eb03dddfde2f1b to your computer and use it in GitHub Desktop.
systemd servicefile for wg-easy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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