add systemd documentation

pull/4776/head
Dmitry Malinin 2025-04-29 09:16:37 +03:00
parent 75edea3370
commit 92794353fd
2 changed files with 35 additions and 0 deletions

View File

@ -1285,6 +1285,9 @@ To enable an experimental feature, add the feature gate to your configuration:
```toml
featureGates = { VirtualNet = true }
```
### Enable as systemd service
Read the [document](/doc/systemd_service.md).
### Feature Lifecycle

32
doc/systemd_service.md Normal file
View File

@ -0,0 +1,32 @@
# Install systemd unit
## install binary
```sudo install ./frps /usr/local/bin```
## Create systemd unit
```sudo vi /lib/systemd/syste.frps.service```
```[Unit]
Description=FRP Server Service
After=network.target
[Service]
Type=simple
ExecStart=/usr/local/bin/frps -c /usr/local/etc/frp/frps.toml
Restart=on-failure
RestartSec=15s
[Install]
WantedBy=multi-user.target
## Enable service
```sudo systemctl daemon-reload
sudo systemctl enable frps.service
sudo systemctl start frps.service
sudo systemctl status frps.service```