RPort
Search…
Updating RPort
RPort is under active development. Keep your installation up-to-date.

Update the RPort server

We keep all major and minor versions of the rportd and the frontend compatible. Do not run different major and minor version of frontend and backend.
The rport server has database migrations built-in. But some tables are excluded from auto-migration. An update consists basically of replacing the old rportd binary by a newer version. If you need to change the database manually, we will provide sql snippets.
rportd-update.sh
1
# Do it from a root shell
2
if (("$(id -u)" > "0"));then
3
1>&2 echo "Open a root shell first"
4
exit 1
5
fi
6
# Stop the RPort server
7
systemctl stop rportd
8
​
9
# Create a backup
10
tar cvzf /var/backups/rportd-$(date +%Y%m%d-%H%M%S).tar.gz \
11
/usr/local/bin/rportd \
12
/var/lib/rport \
13
/var/log/rport
14
​
15
# Update server
16
cd /tmp
17
curl -Ls https://downloads.rport.io/rport/stable/?arch=Linux_x86_64 -o rport.tar.gz
18
tar xzf rport.tar.gz -C /usr/local/bin/ rportd
19
rm rport.tar.gz
20
# After each update you need to allow binding to privileged ports
21
setcap CAP_NET_BIND_SERVICE=+eip /usr/local/bin/rportd
22
​
23
# If you come from a very old version.
24
# Ignore the error if the column exists.
25
sqlite3 /var/lib/rport/user-auth.db \
26
'ALTER TABLE "users" ADD column "token" TEXT(36) DEFAULT NULL'
27
​
28
​
29
# Update the frontend
30
cd /var/lib/rport/docroot/
31
rm -rf *
32
curl -Ls https://downloads.rport.io/frontend/stable/latest.php -o rport-frontend.zip
33
unzip -o rport-frontend.zip && rm -f rport-frontend.zip
34
chown -R rport:rport /var/lib/rport/docroot/
35
​
36
# Start the server
37
systemctl start rportd
38
echo "You are now using RPort $(rportd --version)"
Copied!
πŸ‘‰ After the update, use SHIFT-Reload on your browser to purge the old frontend from the cache.

Update the RPort clients

It's recommended to run your clients with the recent version of rport. We try to always keep server and client compatible, regardless of the version. Basic connectivity and the usage of tunnels should always be possible with clients running and older version than the server.
A fast and easy update of the rport clients can be done through the pairing service. If you have scripting with root privileges enabled, you can trigger a client update through the rport server.

On Linux

1
curl https://pairing.rport.io?update -o rport-update.sh
2
sudo sh rport-update.sh
Copied!

On Windows

1
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
2
$url="https://pairing.rport.io?update"
3
Invoke-WebRequest -Uri $url -OutFile "rport-update.ps1"
4
powershell -ExecutionPolicy Bypass -File .\rport-update.ps1
Copied!
πŸ’‘It's safe to execute the update while being connected via SSH or RDP through an RPort tunnel. On Windows and Linux, the rport client is restarted delayed and from a decoupled background process. You will be disconnected after 2 seconds, but the client reconnects, and you can create a new tunnel.
Last modified 15d ago