Fixing tor (when your onion address doesn't change even after uninstall)

I had an issue that I wasn’t really sure how to fix. Essentially, if you have ToR installed and then all of a sudden the onion address that is auto generated stops working (i think it because i migrated from a Pi to an old dell workstation that caused this).

Then your first though it to uninstall Tor addon and then reinstall it, hoping that a fresh install will give you a fresh onion address, right? Not so!

If like me you keep getting your “faulty” onion address back, it’s because onion hasn’t really cleaned itself up when you uninstalled (All the config files for it are still hidden away).

I found the config files and will list out what you need to do to force a fresh install of Tor addon to provide you with a new onion address:

  1. You need to be able to ssh into HA. either via the app or if you’ve set it up outside of it.
  2. note the slug of your ha installation. You can get this by typing ha ad and then piping the list of addons into less ha ad | less
  3. Here you can search for addon-tor (searching for ‘tor’ returned too many false positives). You search for something in less by typeing /addon-tor. It should be the first thing that comes up, but if not, press n to go to the next “found” item until you see it.
  4. Note the slug name it’ll be some letters and numbers followed by tor. For example: aod4565_tor.
  5. Now that you’ve noted that, change directory cd /ssl , type ls to list the directory, and you should see tor here.
  6. before uninstalling,I’m a woos, so i moved this existing tor folder to a backup called bak.tor/ . using this command mv tor bak.tor
  7. Now you’re ready to uninstall tor using ha ad uninstall <slug>_tor
  8. go back to the ui and install tor. If you are on the tor page, refresh it as it doesn’t update dynamically (it wont show the install button if you were on it while you uninstalled).
  9. start it and check the logs. You should now have a shiny new onion address!!
  10. remove the back up folder if this is the case cd /ssl/ then rm -rf bak.tor