# Docker relay stopped working after pull today

**URL:** <https://forum.torproject.org/t/docker-relay-stopped-working-after-pull-today/11599>\
**Category:** Relay Operator\
**Created:** [February 17, 2024, 5:06pm UTC](https://forum.torproject.org/t/docker-relay-stopped-working-after-pull-today/11599 "2024-02-17T17:06:21Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![hanscees](https://forum.torproject.org/user_avatar/forum.torproject.org/hanscees/32/1097_2.png) [@hanscees](https://forum.torproject.org/u/hanscees)\
**Post date:** [February 17, 2024, 5:06pm UTC](https://forum.torproject.org/t/docker-relay-stopped-working-after-pull-today/11599/1 "2024-02-17T17:06:21Z")

</div>

Hi, I have a tor relay thats been running for years.  
Today did a pull and it stops working claiming:

relay\_1 | Feb 17 15:56:43.072 [warn] Directory /var/lib/tor cannot be read: Permission denied

Noting has changed on my server, but the image

root@tor [~/containers/tor]# docker images  
REPOSITORY TAG IMAGE ID CREATED SIZE  
thetorproject/obfs4-bridge latest 062bae9696c6 3 weeks ago 143MB  
thetorproject/obfs4-bridge d0a5213e109d 16 months ago 136MB

does the docker process need more permissions?

---

<div class="post-metadata">

**Author:** ![FranklyFlawless](https://forum.torproject.org/user_avatar/forum.torproject.org/franklyflawless/32/4366_2.png) [@FranklyFlawless](https://forum.torproject.org/u/FranklyFlawless)\
**Post date:** [February 18, 2024, 3:57am UTC](https://forum.torproject.org/t/docker-relay-stopped-working-after-pull-today/11599/2 "2024-02-18T03:57:09Z")

</div>

> [@hanscees](#):
>
> does the docker process need more permissions?

Looks like it.

---

<div class="post-metadata">

**Author:** ![edge7](https://forum.torproject.org/letter_avatar_proxy/v4/letter/e/49beb7/32.png) [@edge7](https://forum.torproject.org/u/edge7)\
**Post date:** [March 4, 2024, 11:47am UTC](https://forum.torproject.org/t/docker-relay-stopped-working-after-pull-today/11599/3 "2024-03-04T11:47:22Z")

</div>

same here.  
It’s for sure a permission issue.  
Anyone has elegantly solved it?

---

<div class="post-metadata">

**Author:** ![edge7](https://forum.torproject.org/letter_avatar_proxy/v4/letter/e/49beb7/32.png) [@edge7](https://forum.torproject.org/u/edge7)\
**Post date:** [March 4, 2024, 12:52pm UTC](https://forum.torproject.org/t/docker-relay-stopped-working-after-pull-today/11599/4 "2024-03-04T12:52:57Z")

</div>

My way of fixing it:

New Dockerfile:

```auto
FROM thetorproject/obfs4-bridge:0.15
 
USER root
 
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
 
ENTRYPOINT ["/entrypoint.sh"]

```

entrypoint.sh:

```auto
#!/bin/bash
chown -R debian-tor:debian-tor /var/lib/tor || exit 1
# Then switch to debian-tor and run the main command
su debian-tor -s /bin/bash -c "/usr/local/bin/start-tor.sh"

```

and then use that image in the docker compose file

---

<div class="post-metadata">

**Author:** ![hanscees](https://forum.torproject.org/user_avatar/forum.torproject.org/hanscees/32/1097_2.png) [@hanscees](https://forum.torproject.org/u/hanscees)\
**Post date:** [March 5, 2024, 7:24pm UTC](https://forum.torproject.org/t/docker-relay-stopped-working-after-pull-today/11599/5 "2024-03-05T19:24:01Z")

</div>

thanks edge7, but I think the tor docker maintainers should solve this decently.

---

<div class="post-metadata">

**Author:** ![hanscees](https://forum.torproject.org/user_avatar/forum.torproject.org/hanscees/32/1097_2.png) [@hanscees](https://forum.torproject.org/u/hanscees)\
**Post date:** [March 5, 2024, 7:57pm UTC](https://forum.torproject.org/t/docker-relay-stopped-working-after-pull-today/11599/6 "2024-03-05T19:57:43Z")

</div>

solved it by doing a chown on the data dir

chown -R 100:101 /var/lib/docker/volumes/tor\_tordata/  
chown -R 100:101 /var/lib/docker/volumes/tor\_tordata/\_data/  
chown -R 100:101 /var/lib/docker/volumes/tor\_tordata/\_data/keys/

now it works

---

<div class="post-metadata">

**Author:** ![meskio](https://forum.torproject.org/user_avatar/forum.torproject.org/meskio/32/26_2.png) [@meskio](https://forum.torproject.org/u/meskio)\
**Post date:** [March 6, 2024, 11:14am UTC](https://forum.torproject.org/t/docker-relay-stopped-working-after-pull-today/11599/7 "2024-03-06T11:14:12Z")

</div>

Looks like there were changes in debian provoking a change on the UID of the debian-tor user. I created a merge request to fix it:

> **[Have a hardcoded UID/GID to run the image (!12) · Merge requests · The Tor...](https://gitlab.torproject.org/tpo/anti-censorship/docker-obfs4-bridge/-/merge_requests/12)**
>
> If debian changes the UID/GID of the debian-tor user we should maintain it stable. For backward compatibility we keep it set to 101. Closes:...

I’m happy to hear ideas if there is better ways to fix this.

---

<div class="post-metadata">

**Author:** ![meskio](https://forum.torproject.org/user_avatar/forum.torproject.org/meskio/32/26_2.png) [@meskio](https://forum.torproject.org/u/meskio)\
**Post date:** [March 6, 2024, 1:12pm UTC](https://forum.torproject.org/t/docker-relay-stopped-working-after-pull-today/11599/8 "2024-03-06T13:12:41Z")

</div>

There is a new version of the container in dockerhub: [Docker](https://hub.docker.com/layers/thetorproject/obfs4-bridge/0.16/images/sha256-05a83051c6619ae9cabe8358808af70d1091b07d8bd0d1d9606f2e1ef0aca2f7?context=explore)

Be aware that the UID:GID are back to 101:101, you might need to change them back in your datadir.

Let me know if you find any more problems with it.  
Sorry for the problem.

---

<div class="post-metadata">

**Author:** ![system](https://forum.torproject.org/uploads/default/original/2X/d/d3424bed34f4ec18b2e99178c2801ba6dfb655d6.png) [@system](https://forum.torproject.org/u/system)\
**Post date:** [March 7, 2024, 1:13pm UTC](https://forum.torproject.org/t/docker-relay-stopped-working-after-pull-today/11599/9 "2024-03-07T13:13:19Z")

</div>

Closed on March 7, 2024, 1:13pm UTC

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
