acme-companion: Error: nginx-proxy container nginx isn't running.

I see the following error when I do docker logs -f nginx-letsencrypt

Error: nginx-proxy container nginx isn’t running.

Is this expected behaviour? Nothing seems to get created in the certs folder except dhparam.pem. I would expect to see certificates for the last container I start with the "VIRTUAL_HOST=domain.com" variable. Any suggestions?

I also find it strange that the letsencrypt logs says

Generated ‘/app/letsencrypt_service_data’ from 11 containers

Yes, I have a lot of containers running, but only 1 of them has the "VIRTUAL_HOST=domain.com" variable. Are wires getting crossed?

Any help would be appreciated!

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 19 (11 by maintainers)

Commits related to this issue

Most upvoted comments

VIRTUAL_HOST control proxying by nginx-proxy, not certificate creation by this container.

You should probably start by reading the doc.

Ok your issue is completely different than what I thought.

Docker swarm and using several nginx instance are completely unsupported at the moment so what I think I found and fixed in dev probably won’t help you.

NGINX_PROXY_CONTAINER and NGINX_DOCKER_GEN_CONTAINER should be set to a container name, not to a service name.

When using a two container setup, you must not use NGINX_DOCKER_GEN_CONTAINER. This one is used only when nginx and docker-gen are separate containers (three containers setup).

You should not use both the environment variables and the labels, pick either depending on what your setup require.

The order of priority the letsencrypt container uses to get the nginx container ID is label > environment variable > --volumes-from, ie label has the highest priority because it’s the only method that can deal with dynamic names.

OK duchbag, I’ll try reading the docs again!