Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ACME Companion not running at startup #966

Open
SyphonxZA opened this issue Sep 13, 2022 · 0 comments
Open

ACME Companion not running at startup #966

SyphonxZA opened this issue Sep 13, 2022 · 0 comments

Comments

@SyphonxZA
Copy link

SyphonxZA commented Sep 13, 2022

I am using nginx-proxy and nginx-proxy-acme (along with other services). All services run at startup except for nginx-proxy-acme. To get it running I need to manually run docker compose up on my server (Debian 11). It then runs fine and renews my certs, however 3 months later it becomes an issue again as the certs expire because the service never runs.

Is this the default behaviour? I can't find anything in the docs to explain why it does not run at startup.

Below is my compose file:

 version: "2.4"
 
services:
  nginx-proxy:
    image: nginxproxy/nginx-proxy
    container_name: nginx-proxy
    environment:
    - PUID=${PUID}
    - PGID=${PGID}
    - TZ=${TZ}
    volumes:
    - /var/run/docker.sock:/tmp/docker.sock:ro
    - ${USER_DIR}/.docker/nginx/certs:/etc/nginx/certs:rw
    - ${USER_DIR}/.docker/nginx/vhost.d:/etc/nginx/vhost.d
    - ${USER_DIR}/.docker/nginx/html:/usr/share/nginx/html
    - ${USER_DIR}/.docker/nginx/conf:/etc/nginx/conf.d
    ports:
    - 80:80
    - 443:443
    restart: always
  nginx-acme:
    image: nginxproxy/acme-companion
    container_name: nginx-proxy-acme
    environment:
    - PUID=${PUID}
    - PGID=${PGID}
    - TZ=${TZ}
    - DEFAULT_EMAIL=${EMAIL}
    volumes_from:
    - nginx-proxy
    volumes:
    - /var/run/docker.sock:/var/run/docker.sock:ro
    - ${USER_DIR}/.docker/nginx/certs:/etc/nginx/certs:rw
    - ${USER_DIR}/.docker/nginx/vhost.d:/etc/nginx/vhost.d
    - ${USER_DIR}/.docker/nginx/html:/usr/share/nginx/html
    - ${USER_DIR}/.docker/nginx/acme:/etc/acme.sh
    restart: always

Container logs once manually started:

docker-compose logs nginx-acme
Attaching to nginx-proxy-acme
nginx-proxy-acme | Info: running acme-companion version v2.2.1
nginx-proxy-acme | Info: A custom dhparam.pem file was provided. Best practice is to use standardized RFC7919 Diffie-Hellman groups instead.
nginx-proxy-acme | Reloading nginx proxy (c03764d10903e7de5783d79a37fe9ba6be728fe3c60499bf2e5aa3c54ed16853)...
nginx-proxy-acme | 2022/09/13 10:50:26 Generated '/etc/nginx/conf.d/default.conf' from 16 containers
nginx-proxy-acme | 2022/09/13 10:50:26 [notice] 66#66: signal process started
nginx-proxy-acme | 2022/09/13 08:50:27 Generated '/app/letsencrypt_service_data' from 16 containers
nginx-proxy-acme | 2022/09/13 08:50:27 Running '/app/signal_le_service'
nginx-proxy-acme | 2022/09/13 08:50:27 Watching docker events
nginx-proxy-acme | 2022/09/13 08:50:28 Contents of /app/letsencrypt_service_data did not change. Skipping notification '/app/signal_le_service'
nginx-proxy-acme | Reloading nginx proxy (c03764d10903e7de5783d79a37fe9ba6be728fe3c60499bf2e5aa3c54ed16853)...
nginx-proxy-acme | 2022/09/13 10:50:34 Generated '/etc/nginx/conf.d/default.conf' from 16 containers
nginx-proxy-acme | 2022/09/13 10:50:34 [notice] 93#93: signal process started
nginx-proxy-acme | Creating/renewal deluge.streamz.co.za certificates... (example.com)
nginx-proxy-acme | 2022/09/13 08:50:35 Received event die for container 76d7ef0afd07
nginx-proxy-acme | 2022/09/13 08:50:36 Received event stop for container 76d7ef0afd07
nginx-proxy-acme | [Tue Sep 13 08:50:36 UTC 2022] Using CA: https://acme-v02.api.letsencrypt.org/directory
nginx-proxy-acme | [Tue Sep 13 08:50:37 UTC 2022] Creating domain key
nginx-proxy-acme | 2022/09/13 08:50:38 Received event start for container 4ab677ebd9c0
nginx-proxy-acme | [Tue Sep 13 08:50:42 UTC 2022] The domain key is here: /etc/acme.sh/[email protected]/example.com/example.com.key
nginx-proxy-acme | [Tue Sep 13 08:50:42 UTC 2022] Single domain='example.com'
nginx-proxy-acme | [Tue Sep 13 08:50:42 UTC 2022] Getting domain auth token for each domain
nginx-proxy-acme | 2022/09/13 08:50:43 Debounce minTimer fired
nginx-proxy-acme | 2022/09/13 08:50:44 Contents of /app/letsencrypt_service_data did not change. Skipping notification '/app/signal_le_service'
nginx-proxy-acme | [Tue Sep 13 08:50:47 UTC 2022] Getting webroot for domain='example.com'
nginx-proxy-acme | [Tue Sep 13 08:50:47 UTC 2022] Verifying: example.com
nginx-proxy-acme | [Tue Sep 13 08:50:52 UTC 2022] Success
nginx-proxy-acme | [Tue Sep 13 08:50:52 UTC 2022] Verify finished, start to sign.
nginx-proxy-acme | [Tue Sep 13 08:50:52 UTC 2022] Lets finalize the order.
nginx-proxy-acme | [Tue Sep 13 08:50:52 UTC 2022] Le_OrderFinalize='https://acme-v02.api.letsencrypt.org/acme/finalize/124991341/125647874517'
nginx-proxy-acme | [Tue Sep 13 08:50:54 UTC 2022] Downloading cert.
nginx-proxy-acme | [Tue Sep 13 08:50:54 UTC 2022] Le_LinkCert='https://acme-v02.api.letsencrypt.org/acme/cert/033d14714941b646bb17f5a94678b7269825'
nginx-proxy-acme | [Tue Sep 13 08:50:55 UTC 2022] Cert success.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant