0

I'm using stem library in order to control a running tor instance. Problem is that when I use the create_hidden_service API the service is correctly spawned, but after some hours it strangely disappear and is not available anymore.

Somebody have any clues for why this happen?

Edit: the api is called inside a celery task if that can be helpful...

Utrase
  • 1

1 Answers1

0

Use create_ephemeral_hidden_service() and make sure to specify detached=True in the parameters so that if the control connection drops out the hidden service remains running.

If you want to be able to restart the same hidden service later, make sure to save the private key from the AddOnionResponse it returns so you can start it later with the same key.

I believe this will solve your problem.

drew010
  • 68,777
  • 11
  • 134
  • 162