Thank you @yoursunny for the suggestions on portlink, some of which have been submitted in Commits on Jan 9, 2026
portlink User Guide
This document applies to scenarios where portlink is deployed based on binary files.
One, Download and Installation
1. Get the Latest Version
portlink is automatically built through GitHub Action. It is recommended to get the latest version link from Releases page.
2. One-Click Installation for Linux amd64
This command includes logic for creating directories, downloading, granting permissions, and moving to the system path:
# Download the binary file
curl -L -o portlink-linux-amd64 https://github.com/runoneall/portlink/releases/download/better-arg/portlink-linux-amd64
# Install to system path
chmod +x portlink-linux-amd64
mv portlink-linux-amd64 /usr/local/bin/portlink
# Verify installation
portlink --version
3. Reinstallation/Update Instructions
It is recommended to stop the service before updating:
# systemd (Ubuntu/Debian)
systemctl stop portlink || true
# OpenRC (Alpine)
rc-service portlink stop || true
rm -f /usr/local/bin/portlink
Two, Running Methods
Direct Start (For Testing):
portlink --server
Note: When running directly, it is recommended to use nohup or screen. In production environments, please use the auto-start service described below.
Three, Auto-Start at Boot
1. Debian / Ubuntu / CentOS (systemd)
A. Create Service File
cat <<EOF > /etc/systemd/system/portlink.service
[Unit]
Description=portlink service
After=network.target network-online.target
Wants=network-online.target
[Service]
Type=simple
ExecStart=/usr/local/bin/portlink --server
Restart=on-failure
RestartSec=5s
# Increase maximum file descriptors to prevent high concurrency connections from being limited
LimitNOFILE=1048576
[Install]
WantedBy=multi-user.target
EOF
B. Management Commands
systemctl daemon-reload
systemctl enable portlink
systemctl start portlink
# Check status and real-time logs
systemctl status portlink
journalctl -u portlink -f
2. Alpine Linux (OpenRC)
A. Create Service Script
cat <<EOF > /etc/init.d/portlink
#!/sbin/openrc-run
name="portlink"
description="portlink service"
command="/usr/local/bin/portlink"
command_args="--server"
command_background=true
pidfile="/run/${RC_SVCNAME}.pid"
# Log for troubleshooting
output_log="/var/log/portlink.log"
error_log="/var/log/portlink.err"
depend() {
need net
}
EOF
B. Management Commands
chmod +x /etc/init.d/portlink
rc-update add portlink default
rc-service portlink start
# Check status
rc-service portlink status
Four, Uninstallation
1. Stop and Remove Service
Debian / Ubuntu:
systemctl stop portlink
systemctl disable portlink
rm -f /etc/systemd/system/portlink.service
systemctl daemon-reload
Alpine Linux:
rc-service portlink stop
rc-update del portlink default
rm -f /etc/init.d/portlink
2. Delete Binary File
rm -f /usr/local/bin/portlink
AI is really useful, isn’t it ()。