Docker-letsencrypt-nginx-proxy-companion: Check that '/etc/nginx/vhost.d' directory is export as a writable volume.

Created on 1 Mar 2018  路  4Comments  路  Source: nginx-proxy/docker-letsencrypt-nginx-proxy-companion

Hey guys,

because of some errors I pulled the latest version of the companion and now it won't even start..
The error I get:

Error: can't write to the '/etc/nginx/vhost.d' directory !
Check that '/etc/nginx/vhost.d' directory is export as a writable volume.

My docker init

docker run -d \
--name nginx-letsencrypt \
-v /srv/nginx/certs:/etc/nginx/certs:rw \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
--volumes-from nginx-proxy \
--network=web \
jrcs/letsencrypt-nginx-proxy-companion

And of course my nginx-proxy docker init

docker run -d -p 80:80 -p 443:443 \
--name nginx-proxy \
-v /srv/nginx/certs:/etc/nginx/certs:ro \
-v /etc/nginx/vhost.d:/etc/nginx/vhost.d:ro \
-v /usr/share/nginx/html \
-v /var/run/docker.sock:/tmp/docker.sock:ro \
-v /etc/nginx/conf.d/my_proxy.conf:/etc/nginx/conf.d/my_proxy.conf:ro \
--label com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy \
--network=web \
jwilder/nginx-proxy

I don't quite get it, what I should do to fix it..

Most helpful comment

The error message is self explanatory, /etc/nginx/vhost.d has to be writable and yours is not because it's declared in nginx-proxy as ro.

All 4 comments

Hi, looks like your nginx-proxy has no volume for /etc/nginx/vhost.d
https://github.com/JrCs/docker-letsencrypt-nginx-proxy-companion#usage

Can you share your docker command for nginx-proxy?

@matt-hh well my docker command for nginx-proxy is just above or do you want something different?
And it "worked" until now, so it's kind of strange for me it doesn't anymore..
(Well I couldn't really create certificates or renew the one I somehow got)

The error message is self explanatory, /etc/nginx/vhost.d has to be writable and yours is not because it's declared in nginx-proxy as ro.

@buchdag damn it's incredible how stupidly blind I am.. Thanks a lot!

Was this page helpful?
0 / 5 - 0 ratings