How to update a tor relay on docker?

Hello everyone,

I have a Synology NAS and I’m running a Tor relay on a Docker container on Debian, but I’m having trouble updating it with “sudo apt update” and “sudo apt upgrade”. When I try to run these commands, the relay remains at its last version and does not update

Can anyone help me figure out how to update Tor on my Debian Docker container? I’m not very experienced with Docker and I’m not sure what the best way to proceed is.

Thanks in advance for your help!

Where did you get your initial docker-image from?

contains a section which explains it for a container setup by the instructions itself…


it comes from this link.

Hello, I have successfully updated the relay. Now I have this problem

"Looks like your keypair has changed? This authority previously recorded a different RSA identity for this Ed25519 identity (or vice versa.) Did you replace or copy some of your key files, but not the others? You should either restore the expected keypair, or delete your keys and restart Tor to start your relay with a new identity.") response from dirserver Please correct.

In order to keep my metrics score, I pasted my old keys “secret_id_key” et " ed25519_master_id_secret_key ".

But I get this message. What does it mean?

Hello @alcxcor,

I don’t know if it’s still of interest to you, but I just stumbled across this thread while I was researching how to move my Tor-relay from my Raspberry to a container. And because others may have the same problem, here’s a hint:

Normally you don’t update containers. You throw them away and build a new one that already contains the desired Sw version. The customised config etc. Is then added from outside, or is only accessed directy (e.g. via mount). That’s why you had problems upgrading your container with apt.

thank you for your reply, yes, generally you just need to create another docker, with a more recent image. Unfortunately, when the image is no longer maintained, when it no longer receives updates, then it becomes complicated. The best way is to follow the instructions at this link Tor Project | Debian and Ubuntu

I followed the link, and the relay is up to date, while keeping the keys in /var/lib/keys.
And then, if I’ve understood correctly, the installed package automatically installs each new update.
However, even if the keys have not been deleted, don’t forget to back them up to maintain the relay’s reputation. You never know, problems can happen.

1 Like