Last active
January 30, 2024 05:18
-
-
Save guyskk/a9665bc6b2a89b73fae34678b1f6dc6b to your computer and use it in GitHub Desktop.
shadowsocks server systemd service
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=Shadowsocks Server | |
After=network.target | |
[Service] | |
ExecStart=/usr/local/bin/ssserver -c /etc/shadowsocks/ss-config.json | |
Restart=on-abort | |
[Install] | |
WantedBy=multi-user.target |
Restart=on-abort is not stable when someone execute
pkill ssserver
systemd wont restart ssserver
set the Restart=always to ensure the ssserver is available forever
1. copy this file to `/etc/systemd/system/shadowsocks-server.service` 2. edit `/etc/shadowsocks/ss-config.json` to config shadowsocks 3. exec `systemctl enable shadowsocks-server` and `systemctl start shadowsocks-server`
it's work! Thanks!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
/etc/systemd/system/shadowsocks-server.service
/etc/shadowsocks/ss-config.json
to config shadowsockssystemctl enable shadowsocks-server
andsystemctl start shadowsocks-server