Want to relocate my relay with the same key

Hello everyone,

I’m looking to relocate my Tor relay to a new VPS while keeping the same key. I’ve read through the FAQ section, but I ran into numerous errors when attempting to make the transfer. Could someone kindly provide a step-by-step guide on how to successfully move or upgrade a relay to another VPS while retaining the same key? Any help would be greatly appreciated.

Thank you!

Hello,

Al you need to do is setup your new relay on a new VPS and then to copy /var/lib/tor/keys folder from the old machine to the new machine and restart the tor service systemctl restart tor@default

Even if here I want to upgrade/move my relay. How do I keep the same key? | Tor Project | Support is stated that you need to move only keys/ed25519_master_id_secret_key" and “keys/secret_id_key” when i did my migrations I havecopied all the keys folder located at /var/lib/tor and all went smoothly

1 Like

Like SirNeo says, this should work when you copy both torrc and the keys. In my case I tend to just copy the whole DataDirectory and torrc file, always worked fine.

You could use something like rsync to sync the DataDirectory/torrc file (or the archives when you made a zip/tar file first) to your new server. Since you ask for a step-by-step guide, this could look like:

  1. Create or use a existing ssh keypair for rsync between your VPS instances and make sure you can rsync some basic files (i.e. touch file.txt) from the old to the new VPS instance.
  2. Create a archive containing both the torrc configuration file and the DataDirectory. E.g. something like zip -r torbackup.zip /var/lib/tor /etc/tor for Linux and zip -r torbackup.zip /usr/local/etc/tor /var/db/tor on FreeBSD. I’m using FreeBSD so check the Linux locations since I’m not 100% sure these are right ones.
  3. Rsync the file to the new VPS, e.g. something like rsync -avz /home/user/torbackup.zip user@remote_host:/home/user/
  4. Unzip and move the right folders in their new destinations.
  5. Restart the Tor service.
1 Like

@SirNeo @NTH Wow! Thanks a lot, guys; it just worked without any issue; no errors! Have a good one!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.