Error validating domain: relative URL without a base

Hello,

I’m using vaultwarden in docker with a docker compose file. This morning vaultwarden does’t start because of this :

 /--------------------------------------------------------------------\
bitwarden  | |                        Starting Vaultwarden                        |
bitwarden  | |                           Version 1.25.0                           |
bitwarden  | |--------------------------------------------------------------------|
bitwarden  | | This is an *unofficial* Bitwarden implementation, DO NOT use the   |
bitwarden  | | official channels to report bugs/features, regardless of client.   |
bitwarden  | | Send usage/configuration questions or feature requests to:         |
bitwarden  | |   https://vaultwarden.discourse.group/                             |
bitwarden  | | Report suspected bugs/issues in the software itself at:            |
bitwarden  | |   https://github.com/dani-garcia/vaultwarden/issues/new            |
bitwarden  | \--------------------------------------------------------------------/
bitwarden  |
bitwarden  | [INFO] No .env file found.
bitwarden  |
bitwarden  | Error validating domain: relative URL without a base
bitwarden  | Error loading config:
bitwarden  |    DOMAIN variable needs to contain the protocol (http, https). Use 'http[s]://bw.example.com' instead of 'bw.example.com'
bitwarden  |

Or i’ve checked my .env file and DOMAIN variable is configured fine :

SIGNUPS_ALLOWED=true
DATABASE_URL=data/db.sqlite3
ADMIN_TOKEN=
DOMAIN='https://vault.mydomain.tld'
SMTP_HOST=server imap
SMTP_FROM=no-reply@mydomain.tld
#SMTP_FROM_NAME=vault.mydomain.tld
SMTP_PORT=587         
SMTP_SECURITY=starttls        
SMTP_USERNAME=no-reply@mydomain.tld
SMTP_PASSWORD=*******
SMTP_AUTH_MECHANISM=Login
SMTP_TIMEOUT=15
SIGNUPS_VERIFY=true
EMAIL_ATTEMPTS_LIMIT=3
EMAIL_TOKEN_SIZE=6

I don’t find any solution for my trouble. Anyone as encountred this before ?

Try to remove the single-quotes and see if that fixes it.

Hello,

Thanks for your anwser

I have try with and without single-quotes it don’t fixes it.

Try changing the value in the config directly instead of the environment variables. The values from the environment variables are overwritten by the values inside the config. :slight_smile:

Also it seems like it does not find your env file. Make sure the volume did not move or something.

bitwarden  | [INFO] No .env file found.

Looking at the logs he posted nothing is overridden by the config.json, and there probably isn’t a config.json at all.

Regarding the .env file, that is just an info message, nothing to worry about, and mostly not used with docker containers.

1 Like

Hello,

In first i think the error come from this message but it’s just an information.
I keep searching but I am the only one with this error lol.

Thanks

Finaly i can fix it.

I move my stack and the env file in a dedicated folder and the error vanished. Before this I run all my containers from the same docker-compose and the env was all stored in the same directory. I think the stack doesn’t read correctly the env file. I’m happy to fix it.

Have a nice day