Hello,
I tried now 10 hours to get this running.
my docker-compose
version: '3'
services:
vaultwarden:
image: vaultwarden/server:latest
container_name: vaultwarden
restart: always
volumes:
- ./vw-data:/data
environment:
WEBSOCKET_ENABLED: "true" # Enable WebSocket notifications.
caddy:
image: caddy:2
container_name: caddy
restart: always
ports:
- 80:80 # Needed for the ACME HTTP-01 challenge.
- 443:443
volumes:
- ./caddy:/home/x/vaultwarden/caddy
- ./Caddyfile:/home/x/vaultwarden/Caddyfile:ro
- ./caddy-config:/config
- ./caddy-data:/data
environment:
DOMAIN: "https://x.duckdns.org" # Your domain.
LOG_FILE: "/home/x/vaultwarden/vaultwarden1.log"
EMAIL: "x@gmail.com"
DUCKDNS_TOKEN: "xxx"
and my Caddyfile
{$DOMAIN}:443{
log {
level INFO
output file {$LOG_FILE} {
roll_size 10MB
roll_keep 10
}
}
# Use the ACME HTTP-01 challenge to get a cert for the configured domain.
tls {
dns duckdns {$DUCKDNS_TOKEN}
}
# This setting may have compatibility issues with some browsers
# (e.g., attachment downloading on Firefox). Try disabling this
# if you encounter issues.
encode gzip
# Notifications redirected to the WebSocket server
reverse_proxy /notifications/hub vaultwarden:3012
# Proxy everything else to Rocket
reverse_proxy vaultwarden:80
}
my docker caddy log (seems like it dont use my caddyfile because its not unser /etc/ and I dont know why)
{“level”:“info”,“ts”:1679753140.3411438,“msg”:“using provided configuration”,“config_file”:“/etc/caddy/Caddyfile”,“config_adapter”:“caddyfile”}
{“level”:“info”,“ts”:1679753140.342131,“logger”:“admin”,“msg”:“admin endpoint started”,“address”:“localhost:2019”,“enforce_origin”:false,“origins”:[“//localhost:2019”,“//[::1]:2019”,“//127.0.0.1:2019”]}
{“level”:“warn”,“ts”:1679753140.3424788,“logger”:“http”,“msg”:“server is listening only on the HTTP port, so no automatic HTTPS will be applied to this server”,“server_name”:“srv0”,“http_port”:80}
{“level”:“info”,“ts”:1679753140.3425548,“logger”:“tls.cache.maintenance”,“msg”:“started background certificate maintenance”,“cache”:“0xc00043b340”}
{“level”:“info”,“ts”:1679753140.342645,“logger”:“http.log”,“msg”:“server running”,“name”:“srv0”,“protocols”:[“h1”,“h2”,“h3”]}
{“level”:“info”,“ts”:1679753140.3427038,“logger”:“tls”,“msg”:“cleaning storage unit”,“description”:“FileStorage:/data/caddy”}
{“level”:“info”,“ts”:1679753140.3427954,“logger”:“tls”,“msg”:“finished cleaning storage units”}
{“level”:“info”,“ts”:1679753140.3428745,“msg”:“autosaved config (load with --resume flag)”,“file”:“/config/caddy/autosave.json”}
{"level":"info","ts":1679753140.3428905,"msg":"serving initial configuration"}
vaultwarden docker log
[INFO] No .env file found.
[2023-03-25 14:18:33.107][vaultwarden::api::notifications][INFO] Starting WebSockets server on 0.0.0.0:3012
[2023-03-25 14:18:33.112][start][INFO] Rocket has launched from http://0.0.0.0:80
I dont know somthing is really off and I dont know why and I’m not good with linux or docker can someone help me please!
Thanks