Vaultwarden started up but could not connect

My enviroment: Windows 11 + WSL2 (Ubuntu20.4)+Docker Desktop

I am new to this and recently have set up docker compose file for vaultwarden and caddy…

docker compose up -d started up both services. vaultwarden log have showed no error.

However curl -v 172.20.0.2 to vaultwarden network interface timed out. I cannot tell if the vaultwarden was running.

How can I start investigate this ?

below is my compose file …

version: '3'

services:
  vaultwarden:
    image: vaultwarden/server:latest
    container_name: vaultwarden
    restart: always
    environment:
      WEBSOCKET_ENABLED: "true"  # Enable WebSocket notifications.
#      DOMAIN: "https://ubuntu22"
      SIGNUPS_ALLOWED: "false"
      INVITATIONS_ALLOWED:  "false"
      LOG_LEVEL: "warn"
#      DOMAIN: "localhost"
      SMTP_HOST: "smtp.google.com"
      SMTP_FROM: "myemail"
      SMTP_PORT: "587"
      SMTP_SECURITY: "starttls"
      SMTP_USERNAME: "myemail"
      SMTP_PASSWORD: "nothing"

    volumes:
      - ./vw-data:/data
  caddy:
    image: caddy:2
    container_name: caddy
    restart: always
    ports:
      - 80:80  # Needed for the ACME HTTP-01 challenge.
      - 443:443
    volumes:
      - ./caddy:/usr/bin/caddy      #  Your custom build of Caddy
      - ./Caddyfile:/etc/caddy/Caddyfile:ro
      - ./caddy-config:/config
      - ./caddy-data:/data

    environment:
      DOMAIN: "subdomain.duckdns.org"      # Your domain.
      EMAIL: "zung102@yahoo.com"            # The email address to use for ACME registration.
      DUCKDNS_TOKEN: "token taken from duckdns website"
      LOG_FILE: "/data/access.log"

Docker ps yielded for vaultwarden …

CONTAINER ID   IMAGE                       COMMAND       CREATED       STATUS                 PORTS              NAMES
357011a4014b   vaultwarden/server:latest   "/start.sh"   2 hours ago   Up 2 hours (healthy)   80/tcp, 3012/tcp   vaultwarden

 curl -v 172.20.0.2
*   Trying 172.20.0.2:80...
* TCP_NODELAY set
   ... and no more output

from vaultwarden log  ...

2023-01-19 20:38:25 |                        Starting Vaultwarden                        |
2023-01-19 20:38:25 |                           Version 1.27.0                           |
2023-01-19 20:38:25 |--------------------------------------------------------------------|
2023-01-19 20:38:25 | This is an *unofficial* Bitwarden implementation, DO NOT use the   |
2023-01-19 20:38:25 | official channels to report bugs/features, regardless of client.   |
2023-01-19 20:38:25 | Send usage/configuration questions or feature requests to:         |
2023-01-19 20:38:25 |   https://vaultwarden.discourse.group/                             |
2023-01-19 20:38:25 | Report suspected bugs/issues in the software itself at:            |
2023-01-19 20:38:25 |   https://github.com/dani-garcia/vaultwarden/issues/new            |
2023-01-19 20:38:25 \--------------------------------------------------------------------/
2023-01-19 20:38:25 
2023-01-19 20:38:25 [INFO] No .env file found.


how can we tell the server is running ?

1 Like