Migrating from Rport to OpenRport - openrport/openrport GitHub Wiki

Migrationg from Rport to OpenRport

This guide will walk you through the process of migrating from the Rport project to the OpenRport.

1. Update Pairing service

The first step is to update the server configuration file to include the pairing URL.

  1. Open your server's configuration file (/etc/rport/rportd.conf).
  2. Find the section for pairing settings lines 43-47.
  3. Add the pairing URL for OpenRport. It typically looks like pairing_url = "https://pairing.openrport.io".
  4. Save and close the configuration file and restart the service.

# Example of adding pairing URL to server configuration pairing_url = https://pairing.openrport.io

2. Update Clients

Next, you'll need to update all your clients to the latest version of OpenRport v0.9.14 .

To update the client you can either do it manually or follow the guide on the documentation .

Go to the dashboard of your server in the command section and execute the script. To update the client in the background you must install the at command but not a requirements. However it is recommended for safe upgrade. Execute the following script to update in the background

set -e
if [ $(id -u) -ne 0 ];then
echo "Needs to run from the root account. Activate sudo!"
false
fi
if which at; then
true
else
echo "System is missing the at command."
echo "Try 'dnf -y install at; pidof atd||systemctl start atd' on RHEL"
echo "Try 'DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install at' on Debian/Ubuntu"
false
fi

curl -sf https://pairing.openrport.io/update > /tmp/rport-update.sh
at now << EOF
sleep 5
sh /tmp/rport-update.sh >/tmp/rport-update.log 2>&1
rm /tmp/rport-update.sh
EOF
echo "The rport client update will shortly start in the background."
echo "If update fails, inspect /tmp/rport-update.log"

3. Update Server

Make sure all the clients are updated to the last version of OpenRport before proceeding to the next step. Once all clients are updated, proceed with updating the server part.

Make sure you backup the server and the database before proceeding to upgrade the server

Backup

To backup your rport version execute those command step by step

FOLDERS=(/usr/local/bin/rportd /var/lib/rport /var/log/rport /etc/rport)
BACKUP_FILE=/var/backups/rportd-$(date +%Y%m%d-%H%M%S).tar.gz
sudo tar cvzf "$BACKUP_FILE" "${FOLDERS[@]}"

Install OpenRport

Download the latest version of openrport depends on your architecture on this url Rportd Unzip the file and replace the binary rportd with the old one.

sudo service rportd stop
tar xzf download_rportd.tar.gaz rportd
sudo rportd /usr/local/bin/rportd

After each update you need to allow binding to privileged ports

sudo setcap CAP_NET_BIND_SERVICE=+eip /usr/local/bin/rportd

Restart rportd service and everything should be running fine

sudo service rportd start

Additional Notes

  • Ensure backups of all data before proceeding with the migration.
  • Test the migration in a non-production environment if possible.
  • If you encounter any issues during the migration process, refer to the OpenRport documentation or community support for assistance. Congratulations! You have successfully migrated from Rport to OpenRport. Enjoy the enhanced features and improvements offered by OpenRport.

Upgrade script

We are working on an upgrade script to automate the steps above automatically.