Skip to content

Instantly share code, notes, and snippets.

@imyelo
Last active September 27, 2025 02:49
Show Gist options
  • Select an option

  • Save imyelo/b6c3d3d9383f7d5623f06a0c11052530 to your computer and use it in GitHub Desktop.

Select an option

Save imyelo/b6c3d3d9383f7d5623f06a0c11052530 to your computer and use it in GitHub Desktop.
run frp client as a service on windows and ubuntu / debian
# 1. put frpc and frpc.ini under /usr/local/frpc/
# 2. put this file (frpc.service) at /etc/systemd/system
# 3. run `sudo systemctl daemon-reload && sudo systemctl start frpc.service`
# Then we can manage frpc with `sudo service frpc {start|stop|restart|status}`
# See also: https://nosame.net/use-frp-to-reverse-proxy-your-nas/
[Unit]
Description=frp client
After=network.target
[Service]
ExecStart=/usr/local/frpc/frpc -c /usr/local/frpc/frpc.ini
[Install]
WantedBy=multi-user.target
: 1. download [nssm](https://github.com/kirillkovalenko/nssm) and set its diretory into the global PATH environment value
: 2. replace the path below with where you placed frpc
nssm install frpc "D:\Tools\frpc\frpc.exe" "-c D:\Tools\frpc\frpc.ini"
nssm set frpc DisplayName "frp client"
nssm start frpc
nssm stop frpc
nssm remove frpc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment