Letsencrypt doesn't follow symlink

Title says it all… And I have absolutely no idea how I should make it follow symlink, the only thing I’ve done (which didn’t work) was adding “disable_symlinks off;” into nginx.conf in the “http” section.

Title doesn’t say it all. We don’t have a crystal ball. What is the symlink target? How is it used? You provided absolutely no information.

It does follow symlinks as evidenced by the ssl certs (they are accessed via two layers of symlinks).

I wasn’t expecting this simple problem needed more information :grin:

This is how I ran letsencrypt image:

docker run
–name=nginx-letsencrypt
–cap-add=NET_ADMIN
-e PUID=1000
-e PGID=1000
-e TZ=UTC
-e URL= url
-e VALIDATION=http
-e EMAIL= my email
-e DHLEVEL=2048
-e ONLY_SUBDOMAINS=false
-e STAGING=false
-p 443:443
-p 80:80
-v /etc/nginx-letsencrypt:/config
–restart unless-stopped
linuxserver/letsencrypt

And also I have rutorrent image which I ran using this command:

docker run \
  --name=rutorrent \
  -e PUID=1000 \
  -e PGID=1000 \
  -p 81:80 \
  -p 5000:5000 \
  -p 51413:51413 \
  -p 6881:6881/udp \
  -v /etc/rutorrent/config:/config \
  -v /etc/rutorrent/downloads:/downloads \
  --restart unless-stopped \
  linuxserver/rutorrent

I want to be able to download downloaded torrents. I decided to make symlink to be able to download them. I created a link using this command:

ln -s /etc/rutorrent/downloads/incoming /etc/nginx-letsencrypt/www/rufiles

Then when I open the address to download file this is what I get

I tried typing the complete path with the file name and nothing changed and I got the same result. Based on what I found so far it means nginx can’t follow symlinks and that’s the problem. Let me know if you need anything else.

Symlink target /etc/rutorrent/downloads/incoming is not accessible inside the letsencrypt container. You need to mount that location.

I used this command and it seems to work fine so far

docker run
–name=nginx-letsencrypt
–cap-add=NET_ADMIN
-e PUID=1000
-e PGID=1000
-e TZ=UTC
-e URL= url
-e VALIDATION=http
-e EMAIL= my email
-e DHLEVEL=2048
-e ONLY_SUBDOMAINS=false
-e STAGING=false
-p 443:443
-p 80:80
-v /etc/nginx-letsencrypt:/config
-v /etc/rutorrent/downloads/incoming:/config/www/rufiles
–restart unless-stopped
linuxserver/letsencrypt

that looks correct to me. You shouldn’t have any issues :slight_smile:

1 Like

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