I have installed vaultwarden and caddy as a proxy on my raspberry pi with docker. Now there are problems with the SSL certificate. The automatic update no longer works. The reason is probably that I had changed the password of my email account. I changed the password in the docker-compose.yaml and restarted it, but of course it doesn’t help because the image and container were not updated. The ‘certbot renew’ command is not available in the containers.
What is the easiest way to update the letscpryt certificate? Deleting the container and image and recreating them would certainly work. But there should be a less radical solution?
Thanks for your tips.
version: '3'
services:
bitwarden:
image: vaultwarden/server:latest
container_name: vaultwarden
restart: always
environment:
- WEBSOCKET_ENABLED=true
- SIGNUPS_ALLOWED=false
- DOMAIN=https://xxx.xxx.xx
- SMTP_HOST=xxx
- SMTP_FROM=xxx
- SMTP_PORT=587
- SMTP_SSL=true
- SMTP_USERNAME=xxx
- SMTP_PASSWORD=changed
- ADMIN_TOKEN=xxxx
volumes:
- ./bw-data:/data
labels:
- "com.centurylinklabs.watchtower.enable=true"
caddy:
image: caddy:2
container_name: caddy
restart: always
ports:
- 80:80 # Needed for the ACME HTTP-01 challenge.
- 443:443
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- ./caddy-config:/config
- ./caddy-data:/data
environment:
- DOMAIN=xxxx
- EMAIL=xxxx # The email address to use for ACME registration.
- LOG_FILE=/data/access.log
labels:
- "com.centurylinklabs.watchtower.enable=true"