tor icon indicating copy to clipboard operation
tor copied to clipboard

[bug] Failed to parse/validate config

Open GalacticCheat opened this issue 8 months ago • 1 comments

I encounter an error when launching the container. This error loops every 5 seconds

Apr 18 23:03:50.274 [notice] Tor 0.4.8.16 running on Linux with Libevent 2.1.12-stable, OpenSSL 3.3.2, Zlib 1.3.1, Liblzma 5.6.4, Libzstd 1.5.7 and Unknown N/A as libc.
Apr 18 23:03:50.274 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://support.torproject.org/faq/staying-anonymous/
Apr 18 23:03:50.279 [notice] Configuration file "/etc/tor/torrc" not present, using reasonable defaults.
Apr 18 23:03:50.283 [notice] Opening Socks listener on 127.0.0.1:9050
Apr 18 23:03:50.283 [notice] Opened Socks listener connection (ready) on 127.0.0.1:9050
Apr 18 23:03:50.286 [warn] /var/lib/tor/.tor is not owned by this user (tor, 100) but by root (0). Perhaps you are running Tor as the wrong user?
Apr 18 23:03:50.286 [notice] Closing partially-constructed Socks listener connection (ready) on 127.0.0.1:9050
Apr 18 23:03:50.286 [warn] Failed to parse/validate config: Couldn't create private data directory "/var/lib/tor/.tor"
Apr 18 23:03:50.286 [err] Reading config failed--see warnings above.

Here is my docker compose:

services:
  tor:
    image: dockurr/tor
    container_name: tor
    network_mode: service:gluetun-searxng
    ports:
      - 9050:9050
      - 9051:9051
    volumes:
      - /data/tor/config:/etc/tor
      - /data/tor/data:/var/lib/tor
    restart: always

Please help me solve this problem

GalacticCheat avatar Apr 18 '25 23:04 GalacticCheat

Does it work when you remove the whole volumes part from your compose file?

kroese avatar Apr 20 '25 11:04 kroese