Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to migrate the hidden service from one PC to another?

I have tried to put hiddenservice folder with host and private key in another tor, but got this error:

Dec 24 00:11:38.793 [warn] /home/bibi/.hidden_service1/ is not owned by this user (debian-tor, 115) but by bibi (1000). Perhaps you are running Tor as the wrong user?
Dec 24 00:11:38.793 [warn] Error loading rendezvous service keys
Dec 24 00:11:38.794 [err] set_options(): Bug: Acting on config options left us in a broken state. Dying.
share|improve this question

migrated from Dec 24 '11 at 23:22

This question came from our site for professional and enthusiast programmers.

belongs on ubuntu – Daniel A. White Dec 23 '11 at 22:24

All information about Tor Hidden Services are inside the directory /var/lib/tor (assuming Tor is installing as Ubuntu package). So you should do the following steps to migrate your hidden service.

  1. Open a terminal.
  2. Stop your Tor service: sudo service tor stop
    This step is not necessary. It is just a cautionary measure.
  3. Inside the directory /var/lib/tor is a subdirectory hidden_service. If this is not the case, have a look into your /etc/tor/torrc. There is a variable called HiddenServiceDir. This tells you the actual location of the subdirectory. I will assume that the correct directory is /var/lib/tor/hidden_service.
  4. Make a backup of the files
    1. /etc/tor/torrc
    2. /var/lib/tor/hidden_service/private_key and /var/lib/tor/hidden_service/hostname
  5. Change to the other machine and stop the Tor service there.
  6. Create a hidden service directory on your new machine: sudo -u debian-tor mkdir /var/lib/tor/hidden_service and change permissions: sudo -u debian-tor chmod 2700 /var/lib/tor/hidden_service.
  7. Copy the private_key and hostname to the new directory and make sure that only the user debian-tor can read and write both files.
  8. Edit your /etc/tor/torrc. You should at least set HiddenServiceDir and HiddenServicePort. Another possibility is to use your backup. You can just copy it to /etc/tor.
  9. Start the Tor service.

Now you are finished migrating the hidden service and it is reachable again.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.