Because kcptun does not support daemon option for now, if you want it running at background, you may need to use something like nohup, which seems more like a testing method. Using systemd to manage it is a better way to handle such situation.
git clone https://github.com/colorfulshark/kcptun-daemon.git
cd kcptun-daemon
chmod +x install.sh
sudo ./install.sh
- download the latest prebuild program from KCPtun according to your platform.
- uncompress the program, you will get both client and server
- rename server program to kcp-server
- move server program to
/usr/bin
the config file locates at /etc/kcptun/config.json
, you can find more options from KCPtun Usage.
reboot system to take effect
sudo systemctl enable kcptun.service # enable auto start
sudo systemctl disable kcptun.service # disable auto start
sudo systemctl start kcptun.service # start service
sudo systemctl stop kcptun.service # stop service
sudo systemctl restart kcptun.service # restart service
sudo systemctl status kcptun.service # get service status