To set up the frp client to start automatically on boot in Raspberry Pi


To set up the frp client to start automatically on boot in Raspberry Pi:

  1. Open a terminal or SSH into your Raspberry Pi.

  2. Switch to the root user:

sudo -i
  1. Navigate to the systemd directory:
cd /lib/systemd/system
  1. Create a new service file for frp client:
nano frpc.service
  1. Add the following content to the file:
ini
[Unit]
Description=frpc
After=network.target

[Service]
User=root
Type=simple
ExecStartPre=/bin/sleep 10
ExecStart=/usr/local/frp/frpc -c /usr/local/frp/frpc.ini

[Install]
WantedBy=multi-user.target

Note: Make sure to adjust the paths for frpc and its configuration file (frpc.ini) according to your setup.

  1. Save the file and close the nano editor.

  2. Start the frpc service:

systemctl start frpc
  1. Enable frpc to start on boot:
systemctl enable frpc

Now, the frp client (frpc) will automatically start on boot in your Raspberry Pi. It ensures that the client establishes a connection with the frp server, allowing you to access the monitoring and remote functionality from external networks.


评论

此博客中的热门博文

Windows下使用Privoxy转换socks5代理为Http代理

OCBC华侨银行相关信息整理及使用指南

Tiptrans国际包裹转运服务:轻松购物全球,便捷快速收货