Skip to content

Running in docker doesnt allow to reload tor for ip change #5

@dmitrisky

Description

@dmitrisky

Hey,

Trying to run tornet in docker compose, and whenever trying to change IP, experience this error:

systemctl reload tor

System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to system scope bus via local transport: Host is down

Versions:

cat /etc/debian_version
13.5

docker --version
Docker version 29.5.2, build 79eb04c

tornet --version
tornet 2.0.2

Dockerfile:

FROM python:3.14

RUN apt-get update && apt-get upgrade -y && apt-get install -y tor
RUN pip install --no-cache-dir tornet

# CRITICAL: by default Tor binds SOCKS to 127.0.0.1, which is unreachable
# from another container. Bind it to all interfaces instead.
RUN echo "SocksPort 0.0.0.0:9050" >> /etc/tor/torrc

EXPOSE 9050

CMD ["tornet", "--interval", "60", "--count", "0"]

Let me know if you need more details or there any other workaround. Thanks and appreciate great app!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions