mattermost / mattermost/docker
cannot load certificate "/root/docker/certs/etc/letsencrypt/archive/domain.com/cert1.pem
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 533
- Forks
- 284
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
in my mattermost instance everything was running fine. but after certificate expired it stopped working.
So i have setup using guide,
https://docs.mattermost.com/install/install-docker.html (section Deploy Mattermost on Docker for production use)
all worked well till cert expired and after certificate was expired i tried to renew using,
bash scripts/issue-certificate.sh -d domain.com -o ${PWD}/certs
it did renew it but i was still getting certificate expired so i picked up one of the thread in github issues and changed my cert path in env from,
CERT_PATH=./volumes/web/cert/cert.pem
KEY_PATH=./volumes/web/cert/key-no-password.pem
TO
CERT_PATH=./certs/etc/letsencrypt/live/${DOMAIN}/fullchain.pem
KEY_PATH=./certs/etc/letsencrypt/live/${DOMAIN}/privkey.pem
but i still got error when i try to up the instance using,
sudo docker-compose -f docker-compose.yml -f docker-compose.nginx.yml up
nginx_mattermost | /docker-entrypoint.sh: Configuration complete; ready for start up
nginx_mattermost | nginx: [emerg] cannot load certificate "/root/docker/certs/etc/letsencrypt/archive/domain.com-0001/cert1.pem": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/root/docker/certs/etc/letsencrypt/archive/domain.com-0001/cert1.pem','r') error:2006D080:BIO routines:BIO_new_file:no such file)
How do i fix this ? as it seems i am following commands from matter most documentation but it seems it can't find certs on that path. is there any other issue or path seems strange ?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with scripts/issue-certificate.sh, the documented Docker production deployment, and the CERT_PATH and KEY_PATH settings in the environment configuration. Reproduce the failure with docker-compose.yml and docker-compose.nginx.yml, then compare the configured certificate paths with the mounted certificate files shown in the nginx error. Done means the stack starts successfully and nginx loads the renewed certificate.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, shell
- Domain
- devops, infrastructure, security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100