LetsEncrypt run/Nginx directory doesn't exist on update

Hi, just wondering if I am doing something wrong or if there is a way to do something automatically.

My problem is that whenever my OMV server’s Watchtower updates the LetsEncrypt container I can access my sites anymore for OMV, Emby etc externally. The fix I have figured out is that when home I have to go into the bash and create an Nginx folder in the run directory, the moment I do that everything comes to life again. I have my sites set up as reverse proxy subdomains (really hope I got the terminology correct there).

Is there a way for me to automate this when a new image starts up so I don’t have to wait till I get home to create the folder?

Alternatively am I doing some thing wrong?

I don’t follow. What is the run directory? What parameters did you use to create the container? Logs?

No logs relevant I don’t think. Will have to wait for it to break again to get the error message but it complains about not being able to either access or find the Nginx directory. So I use the command “docker exec -it letsencrypt bash”, “cd run”, “mkdir nginx” And that sorts my problem out giving me access to my sites externally. I use the docker plugin within openmediavault so I don’t actually type any commands in. Thanks for replying!

Our image does not use folder /run/nginx for anything. You must have an incorrect config file, perhaps something you got from a guide or a website.

With the little info you provided, we can’t help you more

Just had a look in the directory. The error message complains about nginx.pid not being found if I remember correctly, that is the only file in run/nginx. As soon as I create the nginx directory, something creates that file and I’m good to go.

Like I said, our image does not use that location, ours uses /run/nginx.pid, without an nginx folder: https://github.com/linuxserver/docker-letsencrypt/blob/master/root/defaults/nginx.conf#L5

You must have modified your config files.

Ok thank you, pretty sure I didn’t as I don’t know what I would need to modify. I changed the proxy subdomain confs but I think that’s about it. You’ve given me some info so I can go from there and start trouble shooting from that. Will post here if I figure it out incase anyone else comes across it. Thanks for the help.


This is the error I get from the logs, it happens so fast that text flies past the screen, only readable when stopping it.

Try using a fresh location for /config the only way this can occur is if you’ve messed around with a config file.

Pastebin what you have for /config/nginx/nginx.conf

https://pastebin.com/Utm5dWna

I don’t remember ever editing this, though I have a pretty terrible memory.

You commented out the pid statement on line 5. That’s why you’re having issues