From 3e616edf5a36eed51c551819f81db7ce4e7f9183 Mon Sep 17 00:00:00 2001 From: Mathijs van Veluw Date: Tue, 23 Aug 2022 15:42:11 +0200 Subject: [PATCH] Updated Configuration overview (markdown) --- Configuration-overview.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Configuration-overview.md b/Configuration-overview.md index 69efc13..d3c976a 100644 --- a/Configuration-overview.md +++ b/Configuration-overview.md @@ -1,5 +1,13 @@ ## Configuration methods +> ⚠️**NOTE:** The `config.json` file is _**NOT**_ the recommended way to configure your settings! +> Either use environment variables which you can configure in several ways for your container environment (Docker, Docker-Compose, K8s etc..) +> Or, if using a standalone binary (not distributed by Vaultwarden it self) use a `.env` file located in your current work directory. +> The `config.json` file is created and overwritten when saving the settings within the Admin interface! +> + +
+ In vaultwarden, you can perform configuration either via environment variables or an [[admin page|Enabling-admin-page]] (which writes settings to a `config.json` file under your data directory). It's important to note that each setting in `config.json` overrides the corresponding environment variable setting (if it exists). For example, if you set the environment variable `DOMAIN=https://bitwarden.example.com`, but your `config.json` includes `"domain": "https://vw.example.com"`, then vaultwarden will generate various links based on what's in the config file (`https://vw.example.com`). A common source of confusion is enabling the admin page (which creates the `config.json` file), changing some settings via the admin page (which sets the corresponding values in `config.json`), then later trying to change those settings via environment variable (which doesn't work because `config.json` overrides env vars). To avoid this confusion, it's highly recommended to stick to one configuration method or the other; that is, configure entirely via environment variables, or entirely via `config.json` (whether using the admin page or editing `config.json` directly).