.env.template 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649
  1. # shellcheck disable=SC2034,SC2148
  2. ## Vaultwarden Configuration File
  3. ## Uncomment any of the following lines to change the defaults
  4. ##
  5. ## Be aware that most of these settings will be overridden if they were changed
  6. ## in the admin interface. Those overrides are stored within DATA_FOLDER/config.json .
  7. ##
  8. ## By default, Vaultwarden expects for this file to be named ".env" and located
  9. ## in the current working directory. If this is not the case, the environment
  10. ## variable ENV_FILE can be set to the location of this file prior to starting
  11. ## Vaultwarden.
  12. ####################
  13. ### Data folders ###
  14. ####################
  15. ## Main data folder
  16. ## This can be a path to local folder or a path to an external location
  17. ## depending on features enabled at build time. Possible external locations:
  18. ##
  19. ## - AWS S3 Bucket (via `s3` feature): s3://bucket-name/path/to/folder
  20. ##
  21. ## When using an external location, make sure to set TMP_FOLDER,
  22. ## TEMPLATES_FOLDER, and DATABASE_URL to local paths and/or a remote database
  23. ## location.
  24. # DATA_FOLDER=data
  25. ## Individual folders, these override %DATA_FOLDER%
  26. # RSA_KEY_FILENAME=data/rsa_key
  27. # ICON_CACHE_FOLDER=data/icon_cache
  28. # ATTACHMENTS_FOLDER=data/attachments
  29. # SENDS_FOLDER=data/sends
  30. ## Temporary folder used for storing temporary file uploads
  31. ## Must be a local path.
  32. # TMP_FOLDER=data/tmp
  33. ## HTML template overrides data folder
  34. ## Must be a local path.
  35. # TEMPLATES_FOLDER=data/templates
  36. ## Automatically reload the templates for every request, slow, use only for development
  37. # RELOAD_TEMPLATES=false
  38. ## Web vault settings
  39. # WEB_VAULT_FOLDER=web-vault/
  40. # WEB_VAULT_ENABLED=true
  41. #########################
  42. ### Database settings ###
  43. #########################
  44. ## Database URL
  45. ## When using SQLite, this is the path to the DB file, and it defaults to
  46. ## %DATA_FOLDER%/db.sqlite3. If DATA_FOLDER is set to an external location, this
  47. ## must be set to a local sqlite3 file path.
  48. # DATABASE_URL=data/db.sqlite3
  49. ## When using MySQL, specify an appropriate connection URI.
  50. ## Details: https://docs.diesel.rs/2.1.x/diesel/mysql/struct.MysqlConnection.html
  51. # DATABASE_URL=mysql://user:password@host[:port]/database_name
  52. ## When using PostgreSQL, specify an appropriate connection URI (recommended)
  53. ## or keyword/value connection string.
  54. ## Details:
  55. ## - https://docs.diesel.rs/2.1.x/diesel/pg/struct.PgConnection.html
  56. ## - https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING
  57. # DATABASE_URL=postgresql://user:password@host[:port]/database_name
  58. ## Enable WAL for the DB
  59. ## Set to false to avoid enabling WAL during startup.
  60. ## Note that if the DB already has WAL enabled, you will also need to disable WAL in the DB,
  61. ## this setting only prevents Vaultwarden from automatically enabling it on start.
  62. ## Please read project wiki page about this setting first before changing the value as it can
  63. ## cause performance degradation or might render the service unable to start.
  64. # ENABLE_DB_WAL=true
  65. ## Database connection retries
  66. ## Number of times to retry the database connection during startup, with 1 second delay between each retry, set to 0 to retry indefinitely
  67. # DB_CONNECTION_RETRIES=15
  68. ## Database timeout
  69. ## Timeout when acquiring database connection
  70. # DATABASE_TIMEOUT=30
  71. ## Database max connections
  72. ## Define the size of the connection pool used for connecting to the database.
  73. # DATABASE_MAX_CONNS=10
  74. ## Database connection initialization
  75. ## Allows SQL statements to be run whenever a new database connection is created.
  76. ## This is mainly useful for connection-scoped pragmas.
  77. ## If empty, a database-specific default is used:
  78. ## - SQLite: "PRAGMA busy_timeout = 5000; PRAGMA synchronous = NORMAL;"
  79. ## - MySQL: ""
  80. ## - PostgreSQL: ""
  81. # DATABASE_CONN_INIT=""
  82. #################
  83. ### WebSocket ###
  84. #################
  85. ## Enable websocket notifications
  86. # ENABLE_WEBSOCKET=true
  87. ##########################
  88. ### Push notifications ###
  89. ##########################
  90. ## Enables push notifications (requires key and id from https://bitwarden.com/host)
  91. ## Details about mobile client push notification:
  92. ## - https://github.com/dani-garcia/vaultwarden/wiki/Enabling-Mobile-Client-push-notification
  93. # PUSH_ENABLED=false
  94. # PUSH_INSTALLATION_ID=CHANGEME
  95. # PUSH_INSTALLATION_KEY=CHANGEME
  96. # WARNING: Do not modify the following settings unless you fully understand their implications!
  97. # Default Push Relay and Identity URIs
  98. # PUSH_RELAY_URI=https://push.bitwarden.com
  99. # PUSH_IDENTITY_URI=https://identity.bitwarden.com
  100. # European Union Data Region Settings
  101. # If you have selected "European Union" as your data region, use the following URIs instead.
  102. # PUSH_RELAY_URI=https://api.bitwarden.eu
  103. # PUSH_IDENTITY_URI=https://identity.bitwarden.eu
  104. #####################
  105. ### Schedule jobs ###
  106. #####################
  107. ## Job scheduler settings
  108. ##
  109. ## Job schedules use a cron-like syntax (as parsed by https://crates.io/crates/cron),
  110. ## and are always in terms of UTC time (regardless of your local time zone settings).
  111. ##
  112. ## The schedule format is a bit different from crontab as crontab does not contains seconds.
  113. ## You can test the format here: https://crontab.guru, but remove the first digit!
  114. ## SEC MIN HOUR DAY OF MONTH MONTH DAY OF WEEK
  115. ## "0 30 9,12,15 1,15 May-Aug Mon,Wed,Fri"
  116. ## "0 30 * * * * "
  117. ## "0 30 1 * * * "
  118. ##
  119. ## How often (in ms) the job scheduler thread checks for jobs that need running.
  120. ## Set to 0 to globally disable scheduled jobs.
  121. # JOB_POLL_INTERVAL_MS=30000
  122. ##
  123. ## Cron schedule of the job that checks for Sends past their deletion date.
  124. ## Defaults to hourly (5 minutes after the hour). Set blank to disable this job.
  125. # SEND_PURGE_SCHEDULE="0 5 * * * *"
  126. ##
  127. ## Cron schedule of the job that checks for trashed items to delete permanently.
  128. ## Defaults to daily (5 minutes after midnight). Set blank to disable this job.
  129. # TRASH_PURGE_SCHEDULE="0 5 0 * * *"
  130. ##
  131. ## Cron schedule of the job that checks for incomplete 2FA logins.
  132. ## Defaults to once every minute. Set blank to disable this job.
  133. # INCOMPLETE_2FA_SCHEDULE="30 * * * * *"
  134. ##
  135. ## Cron schedule of the job that sends expiration reminders to emergency access grantors.
  136. ## Defaults to hourly (3 minutes after the hour). Set blank to disable this job.
  137. # EMERGENCY_NOTIFICATION_REMINDER_SCHEDULE="0 3 * * * *"
  138. ##
  139. ## Cron schedule of the job that grants emergency access requests that have met the required wait time.
  140. ## Defaults to hourly (7 minutes after the hour). Set blank to disable this job.
  141. # EMERGENCY_REQUEST_TIMEOUT_SCHEDULE="0 7 * * * *"
  142. ##
  143. ## Cron schedule of the job that cleans old events from the event table.
  144. ## Defaults to daily. Set blank to disable this job. Also without EVENTS_DAYS_RETAIN set, this job will not start.
  145. # EVENT_CLEANUP_SCHEDULE="0 10 0 * * *"
  146. ## Number of days to retain events stored in the database.
  147. ## If unset (the default), events are kept indefinitely and the scheduled job is disabled!
  148. # EVENTS_DAYS_RETAIN=
  149. ##
  150. ## Cron schedule of the job that cleans old auth requests from the auth request.
  151. ## Defaults to every minute. Set blank to disable this job.
  152. # AUTH_REQUEST_PURGE_SCHEDULE="30 * * * * *"
  153. ##
  154. ## Cron schedule of the job that cleans expired Duo contexts from the database. Does nothing if Duo MFA is disabled or set to use the legacy iframe prompt.
  155. ## Defaults to every minute. Set blank to disable this job.
  156. # DUO_CONTEXT_PURGE_SCHEDULE="30 * * * * *"
  157. #
  158. ## Cron schedule of the job that cleans sso nonce from incomplete flow
  159. ## Defaults to daily (20 minutes after midnight). Set blank to disable this job.
  160. # PURGE_INCOMPLETE_SSO_NONCE="0 20 0 * * *"
  161. ########################
  162. ### General settings ###
  163. ########################
  164. ## Domain settings
  165. ## The domain must match the address from where you access the server
  166. ## It's recommended to configure this value, otherwise certain functionality might not work,
  167. ## like attachment downloads, email links and U2F.
  168. ## For U2F to work, the server must use HTTPS, you can use Let's Encrypt for free certs
  169. ## To use HTTPS, the recommended way is to put Vaultwarden behind a reverse proxy
  170. ## Details:
  171. ## - https://github.com/dani-garcia/vaultwarden/wiki/Enabling-HTTPS
  172. ## - https://github.com/dani-garcia/vaultwarden/wiki/Proxy-examples
  173. ## For development
  174. # DOMAIN=http://localhost
  175. ## For public server
  176. # DOMAIN=https://vw.domain.tld
  177. ## For public server (URL with port number)
  178. # DOMAIN=https://vw.domain.tld:8443
  179. ## For public server (URL with path)
  180. # DOMAIN=https://domain.tld/vw
  181. ## Controls whether users are allowed to create Bitwarden Sends.
  182. ## This setting applies globally to all users.
  183. ## To control this on a per-org basis instead, use the "Disable Send" org policy.
  184. # SENDS_ALLOWED=true
  185. ## HIBP Api Key
  186. ## HaveIBeenPwned API Key, request it here: https://haveibeenpwned.com/API/Key
  187. # HIBP_API_KEY=
  188. ## Per-organization attachment storage limit (KB)
  189. ## Max kilobytes of attachment storage allowed per organization.
  190. ## When this limit is reached, organization members will not be allowed to upload further attachments for ciphers owned by that organization.
  191. # ORG_ATTACHMENT_LIMIT=
  192. ## Per-user attachment storage limit (KB)
  193. ## Max kilobytes of attachment storage allowed per user.
  194. ## When this limit is reached, the user will not be allowed to upload further attachments.
  195. # USER_ATTACHMENT_LIMIT=
  196. ## Per-user send storage limit (KB)
  197. ## Max kilobytes of send storage allowed per user.
  198. ## When this limit is reached, the user will not be allowed to upload further sends.
  199. # USER_SEND_LIMIT=
  200. ## Number of days to wait before auto-deleting a trashed item.
  201. ## If unset (the default), trashed items are not auto-deleted.
  202. ## This setting applies globally, so make sure to inform all users of any changes to this setting.
  203. # TRASH_AUTO_DELETE_DAYS=
  204. ## Number of minutes to wait before a 2FA-enabled login is considered incomplete,
  205. ## resulting in an email notification. An incomplete 2FA login is one where the correct
  206. ## master password was provided but the required 2FA step was not completed, which
  207. ## potentially indicates a master password compromise. Set to 0 to disable this check.
  208. ## This setting applies globally to all users.
  209. # INCOMPLETE_2FA_TIME_LIMIT=3
  210. ## Disable icon downloading
  211. ## Set to true to disable icon downloading in the internal icon service.
  212. ## This still serves existing icons from $ICON_CACHE_FOLDER, without generating any external
  213. ## network requests. $ICON_CACHE_TTL must also be set to 0; otherwise, the existing icons
  214. ## will be deleted eventually, but won't be downloaded again.
  215. # DISABLE_ICON_DOWNLOAD=false
  216. ## Controls if new users can register
  217. # SIGNUPS_ALLOWED=true
  218. ## Controls if new users need to verify their email address upon registration
  219. ## On new client versions, this will require the user to verify their email at signup time.
  220. ## On older clients, it will require the user to verify their email before they can log in.
  221. ## The welcome email will include a verification link, and login attempts will periodically
  222. ## trigger another verification email to be sent.
  223. # SIGNUPS_VERIFY=false
  224. ## If SIGNUPS_VERIFY is set to true, this limits how many seconds after the last time
  225. ## an email verification link has been sent another verification email will be sent
  226. # SIGNUPS_VERIFY_RESEND_TIME=3600
  227. ## If SIGNUPS_VERIFY is set to true, this limits how many times an email verification
  228. ## email will be re-sent upon an attempted login.
  229. # SIGNUPS_VERIFY_RESEND_LIMIT=6
  230. ## Controls if new users from a list of comma-separated domains can register
  231. ## even if SIGNUPS_ALLOWED is set to false
  232. # SIGNUPS_DOMAINS_WHITELIST=example.com,example.net,example.org
  233. ## Controls whether event logging is enabled for organizations
  234. ## This setting applies to organizations.
  235. ## Disabled by default. Also check the EVENT_CLEANUP_SCHEDULE and EVENTS_DAYS_RETAIN settings.
  236. # ORG_EVENTS_ENABLED=false
  237. ## Controls which users can create new orgs.
  238. ## Blank or 'all' means all users can create orgs (this is the default):
  239. # ORG_CREATION_USERS=
  240. ## 'none' means no users can create orgs:
  241. # ORG_CREATION_USERS=none
  242. ## A comma-separated list means only those users can create orgs:
  243. # [email protected],[email protected]
  244. ## Allows org admins to invite users, even when signups are disabled
  245. # INVITATIONS_ALLOWED=true
  246. ## Name shown in the invitation emails that don't come from a specific organization
  247. # INVITATION_ORG_NAME=Vaultwarden
  248. ## The number of hours after which an organization invite token, emergency access invite token,
  249. ## email verification token and deletion request token will expire (must be at least 1)
  250. # INVITATION_EXPIRATION_HOURS=120
  251. ## Controls whether users can enable emergency access to their accounts.
  252. ## This setting applies globally to all users.
  253. # EMERGENCY_ACCESS_ALLOWED=true
  254. ## Controls whether users can change their email.
  255. ## This setting applies globally to all users
  256. # EMAIL_CHANGE_ALLOWED=true
  257. ## Number of server-side passwords hashing iterations for the password hash.
  258. ## The default for new users. If changed, it will be updated during login for existing users.
  259. # PASSWORD_ITERATIONS=600000
  260. ## Controls whether users can set or show password hints. This setting applies globally to all users.
  261. # PASSWORD_HINTS_ALLOWED=true
  262. ## Controls whether a password hint should be shown directly in the web page if
  263. ## SMTP service is not configured and password hints are allowed.
  264. ## Not recommended for publicly-accessible instances because this provides
  265. ## unauthenticated access to potentially sensitive data.
  266. # SHOW_PASSWORD_HINT=false
  267. #########################
  268. ### Advanced settings ###
  269. #########################
  270. ## Client IP Header, used to identify the IP of the client, defaults to "X-Real-IP"
  271. ## Set to the string "none" (without quotes), to disable any headers and just use the remote IP
  272. # IP_HEADER=X-Real-IP
  273. ## Icon service
  274. ## The predefined icon services are: internal, bitwarden, duckduckgo, google.
  275. ## To specify a custom icon service, set a URL template with exactly one instance of `{}`,
  276. ## which is replaced with the domain. For example: `https://icon.example.com/domain/{}`.
  277. ##
  278. ## `internal` refers to Vaultwarden's built-in icon fetching implementation.
  279. ## If an external service is set, an icon request to Vaultwarden will return an HTTP
  280. ## redirect to the corresponding icon at the external service. An external service may
  281. ## be useful if your Vaultwarden instance has no external network connectivity, or if
  282. ## you are concerned that someone may probe your instance to try to detect whether icons
  283. ## for certain sites have been cached.
  284. # ICON_SERVICE=internal
  285. ## Icon redirect code
  286. ## The HTTP status code to use for redirects to an external icon service.
  287. ## The supported codes are 301 (legacy permanent), 302 (legacy temporary), 307 (temporary), and 308 (permanent).
  288. ## Temporary redirects are useful while testing different icon services, but once a service
  289. ## has been decided on, consider using permanent redirects for cacheability. The legacy codes
  290. ## are currently better supported by the Bitwarden clients.
  291. # ICON_REDIRECT_CODE=302
  292. ## Cache time-to-live for successfully obtained icons, in seconds (0 is "forever")
  293. ## Default: 2592000 (30 days)
  294. # ICON_CACHE_TTL=2592000
  295. ## Cache time-to-live for icons which weren't available, in seconds (0 is "forever")
  296. ## Default: 2592000 (3 days)
  297. # ICON_CACHE_NEGTTL=259200
  298. ## Icon download timeout
  299. ## Configure the timeout value when downloading the favicons.
  300. ## The default is 10 seconds, but this could be too low on slower network connections
  301. # ICON_DOWNLOAD_TIMEOUT=10
  302. ## Block HTTP domains/IPs by Regex
  303. ## Any domains or IPs that match this regex won't be fetched by the internal HTTP client.
  304. ## Useful to hide other servers in the local network. Check the WIKI for more details
  305. ## NOTE: Always enclose this regex within single quotes!
  306. # HTTP_REQUEST_BLOCK_REGEX='^(192\.168\.0\.[0-9]+|192\.168\.1\.[0-9]+)$'
  307. ## Enabling this will cause the internal HTTP client to refuse to connect to any non-global IP address.
  308. ## Useful to secure your internal environment: See https://en.wikipedia.org/wiki/Reserved_IP_addresses for a list of IPs which it will block
  309. # HTTP_REQUEST_BLOCK_NON_GLOBAL_IPS=true
  310. ## Client Settings
  311. ## Enable experimental feature flags for clients.
  312. ## This is a comma-separated list of flags, e.g. "flag1,flag2,flag3".
  313. ## Note that clients cache the /api/config endpoint for about 1 hour and it could take some time before they are enabled or disabled!
  314. ##
  315. ## The following flags are available:
  316. ## - "inline-menu-positioning-improvements": Enable the use of inline menu password generator and identity suggestions in the browser extension.
  317. ## - "inline-menu-totp": Enable the use of inline menu TOTP codes in the browser extension.
  318. ## - "ssh-agent": Enable SSH agent support on Desktop. (Needs desktop >=2024.12.0)
  319. ## - "ssh-key-vault-item": Enable the creation and use of SSH key vault items. (Needs clients >=2024.12.0)
  320. ## - "export-attachments": Enable support for exporting attachments (Clients >=2025.4.0)
  321. ## - "anon-addy-self-host-alias": Enable configuring self-hosted Anon Addy alias generator. (Needs Android >=2025.3.0, iOS >=2025.4.0)
  322. ## - "simple-login-self-host-alias": Enable configuring self-hosted Simple Login alias generator. (Needs Android >=2025.3.0, iOS >=2025.4.0)
  323. ## - "mutual-tls": Enable the use of mutual TLS on Android (Client >= 2025.2.0)
  324. # EXPERIMENTAL_CLIENT_FEATURE_FLAGS=fido2-vault-credentials
  325. ## Require new device emails. When a user logs in an email is required to be sent.
  326. ## If sending the email fails the login attempt will fail!!
  327. # REQUIRE_DEVICE_EMAIL=false
  328. ## Enable extended logging, which shows timestamps and targets in the logs
  329. # EXTENDED_LOGGING=true
  330. ## Timestamp format used in extended logging.
  331. ## Format specifiers: https://docs.rs/chrono/latest/chrono/format/strftime
  332. # LOG_TIMESTAMP_FORMAT="%Y-%m-%d %H:%M:%S.%3f"
  333. ## Logging to Syslog
  334. ## This requires extended logging
  335. # USE_SYSLOG=false
  336. ## Logging to file
  337. # LOG_FILE=/path/to/log
  338. ## Log level
  339. ## Change the verbosity of the log output
  340. ## Valid values are "trace", "debug", "info", "warn", "error" and "off"
  341. ## Setting it to "trace" or "debug" would also show logs for mounted routes and static file, websocket and alive requests
  342. ## For a specific module append a comma separated `path::to::module=log_level`
  343. ## For example, to only see debug logs for icons use: LOG_LEVEL="info,vaultwarden::api::icons=debug"
  344. # LOG_LEVEL=info
  345. ## Token for the admin interface, preferably an Argon2 PCH string
  346. ## Vaultwarden has a built-in generator by calling `vaultwarden hash`
  347. ## For details see: https://github.com/dani-garcia/vaultwarden/wiki/Enabling-admin-page#secure-the-admin_token
  348. ## If not set, the admin panel is disabled
  349. ## New Argon2 PHC string
  350. ## Note that for some environments, like docker-compose you need to escape all the dollar signs `$` with an extra dollar sign like `$$`
  351. ## Also, use single quotes (') instead of double quotes (") to enclose the string when needed
  352. # ADMIN_TOKEN='$argon2id$v=19$m=65540,t=3,p=4$MmeKRnGK5RW5mJS7h3TOL89GrpLPXJPAtTK8FTqj9HM$DqsstvoSAETl9YhnsXbf43WeaUwJC6JhViIvuPoig78'
  353. ## Old plain text string (Will generate warnings in favor of Argon2)
  354. # ADMIN_TOKEN=Vy2VyYTTsKPv8W5aEOWUbB/Bt3DEKePbHmI4m9VcemUMS2rEviDowNAFqYi1xjmp
  355. ## Enable this to bypass the admin panel security. This option is only
  356. ## meant to be used with the use of a separate auth layer in front
  357. # DISABLE_ADMIN_TOKEN=false
  358. ## Number of seconds, on average, between admin login requests from the same IP address before rate limiting kicks in.
  359. # ADMIN_RATELIMIT_SECONDS=300
  360. ## Allow a burst of requests of up to this size, while maintaining the average indicated by `ADMIN_RATELIMIT_SECONDS`.
  361. # ADMIN_RATELIMIT_MAX_BURST=3
  362. ## Set the lifetime of admin sessions to this value (in minutes).
  363. # ADMIN_SESSION_LIFETIME=20
  364. ## Allowed iframe ancestors (Know the risks!)
  365. ## https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/frame-ancestors
  366. ## Allows other domains to embed the web vault into an iframe, useful for embedding into secure intranets
  367. ## This adds the configured value to the 'Content-Security-Policy' headers 'frame-ancestors' value.
  368. ## Multiple values must be separated with a whitespace.
  369. # ALLOWED_IFRAME_ANCESTORS=
  370. ## Allowed connect-src (Know the risks!)
  371. ## https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/connect-src
  372. ## Allows other domains to URLs which can be loaded using script interfaces like the Forwarded email alias feature
  373. ## This adds the configured value to the 'Content-Security-Policy' headers 'connect-src' value.
  374. ## Multiple values must be separated with a whitespace. And only HTTPS values are allowed.
  375. ## Example: "https://my-addy-io.domain.tld https://my-simplelogin.domain.tld"
  376. # ALLOWED_CONNECT_SRC=""
  377. ## Number of seconds, on average, between login requests from the same IP address before rate limiting kicks in.
  378. # LOGIN_RATELIMIT_SECONDS=60
  379. ## Allow a burst of requests of up to this size, while maintaining the average indicated by `LOGIN_RATELIMIT_SECONDS`.
  380. ## Note that this applies to both the login and the 2FA, so it's recommended to allow a burst size of at least 2.
  381. # LOGIN_RATELIMIT_MAX_BURST=10
  382. ## BETA FEATURE: Groups
  383. ## Controls whether group support is enabled for organizations
  384. ## This setting applies to organizations.
  385. ## Disabled by default because this is a beta feature, it contains known issues!
  386. ## KNOW WHAT YOU ARE DOING!
  387. # ORG_GROUPS_ENABLED=false
  388. ## Increase secure note size limit (Know the risks!)
  389. ## Sets the secure note size limit to 100_000 instead of the default 10_000.
  390. ## WARNING: This could cause issues with clients. Also exports will not work on Bitwarden servers!
  391. ## KNOW WHAT YOU ARE DOING!
  392. # INCREASE_NOTE_SIZE_LIMIT=false
  393. ## Enforce Single Org with Reset Password Policy
  394. ## Enforce that the Single Org policy is enabled before setting the Reset Password policy
  395. ## Bitwarden enforces this by default. In Vaultwarden we encouraged to use multiple organizations because groups were not available.
  396. ## Setting this to true will enforce the Single Org Policy to be enabled before you can enable the Reset Password policy.
  397. # ENFORCE_SINGLE_ORG_WITH_RESET_PW_POLICY=false
  398. #####################################
  399. ### SSO settings (OpenID Connect) ###
  400. #####################################
  401. ## Controls whether users can login using an OpenID Connect identity provider
  402. # SSO_ENABLED=false
  403. ## Prevent users from logging in directly without going through SSO
  404. # SSO_ONLY=false
  405. ## On SSO Signup if a user with a matching email already exists make the association
  406. # SSO_SIGNUPS_MATCH_EMAIL=true
  407. ## Allow unknown email verification status. Allowing this with `SSO_SIGNUPS_MATCH_EMAIL=true` open potential account takeover.
  408. # SSO_ALLOW_UNKNOWN_EMAIL_VERIFICATION=false
  409. ## Base URL of the OIDC server (auto-discovery is used)
  410. ## - Should not include the `/.well-known/openid-configuration` part and no trailing `/`
  411. ## - ${SSO_AUTHORITY}/.well-known/openid-configuration should return a json document: https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfigurationResponse
  412. # SSO_AUTHORITY=https://auth.example.com
  413. ## Authorization request scopes. Optional SSO scopes, override if email and profile are not enough (`openid` is implicit).
  414. #SSO_SCOPES="email profile"
  415. ## Additional authorization url parameters (ex: to obtain a `refresh_token` with Google Auth).
  416. # SSO_AUTHORIZE_EXTRA_PARAMS="access_type=offline&prompt=consent"
  417. ## Activate PKCE for the Auth Code flow.
  418. # SSO_PKCE=true
  419. ## Regex for additional trusted Id token audience (by default only the client_id is trusted).
  420. # SSO_AUDIENCE_TRUSTED='^$'
  421. ## Set your Client ID and Client Key
  422. # SSO_CLIENT_ID=11111
  423. # SSO_CLIENT_SECRET=AAAAAAAAAAAAAAAAAAAAAAAA
  424. ## Optional Master password policy (minComplexity=[0-4]), `enforceOnLogin` is not supported at the moment.
  425. # SSO_MASTER_PASSWORD_POLICY='{"enforceOnLogin":false,"minComplexity":3,"minLength":12,"requireLower":false,"requireNumbers":false,"requireSpecial":false,"requireUpper":false}'
  426. ## Use sso only for authentication not the session lifecycle
  427. # SSO_AUTH_ONLY_NOT_SESSION=false
  428. ## Client cache for discovery endpoint. Duration in seconds (0 to disable).
  429. # SSO_CLIENT_CACHE_EXPIRATION=0
  430. ## Log all the tokens, LOG_LEVEL=debug is required
  431. # SSO_DEBUG_TOKENS=false
  432. ########################
  433. ### MFA/2FA settings ###
  434. ########################
  435. ## Yubico (Yubikey) Settings
  436. ## Set your Client ID and Secret Key for Yubikey OTP
  437. ## You can generate it here: https://upgrade.yubico.com/getapikey/
  438. ## You can optionally specify a custom OTP server
  439. # YUBICO_CLIENT_ID=11111
  440. # YUBICO_SECRET_KEY=AAAAAAAAAAAAAAAAAAAAAAAA
  441. # YUBICO_SERVER=http://yourdomain.com/wsapi/2.0/verify
  442. ## Duo Settings
  443. ## You need to configure the DUO_IKEY, DUO_SKEY, and DUO_HOST options to enable global Duo support.
  444. ## Otherwise users will need to configure it themselves.
  445. ## Create an account and protect an application as mentioned in this link (only the first step, not the rest):
  446. ## https://help.bitwarden.com/article/setup-two-step-login-duo/#create-a-duo-security-account
  447. ## Then set the following options, based on the values obtained from the last step:
  448. # DUO_IKEY=<Client ID>
  449. # DUO_SKEY=<Client Secret>
  450. # DUO_HOST=<API Hostname>
  451. ## After that, you should be able to follow the rest of the guide linked above,
  452. ## ignoring the fields that ask for the values that you already configured beforehand.
  453. ##
  454. ## If you want to attempt to use Duo's 'Traditional Prompt' (deprecated, iframe based) set DUO_USE_IFRAME to 'true'.
  455. ## Duo no longer supports this, but it still works for some integrations.
  456. ## If you aren't sure, leave this alone.
  457. # DUO_USE_IFRAME=false
  458. ## Email 2FA settings
  459. ## Email token size
  460. ## Number of digits in an email 2FA token (min: 6, max: 255).
  461. ## Note that the Bitwarden clients are hardcoded to mention 6 digit codes regardless of this setting!
  462. # EMAIL_TOKEN_SIZE=6
  463. ##
  464. ## Token expiration time
  465. ## Maximum time in seconds a token is valid. The time the user has to open email client and copy token.
  466. # EMAIL_EXPIRATION_TIME=600
  467. ##
  468. ## Maximum attempts before an email token is reset and a new email will need to be sent.
  469. # EMAIL_ATTEMPTS_LIMIT=3
  470. ##
  471. ## Setup email 2FA on registration regardless of any organization policy
  472. # EMAIL_2FA_ENFORCE_ON_VERIFIED_INVITE=false
  473. ## Automatically setup email 2FA as fallback provider when needed
  474. # EMAIL_2FA_AUTO_FALLBACK=false
  475. ## Other MFA/2FA settings
  476. ## Disable 2FA remember
  477. ## Enabling this would force the users to use a second factor to login every time.
  478. ## Note that the checkbox would still be present, but ignored.
  479. # DISABLE_2FA_REMEMBER=false
  480. ##
  481. ## Authenticator Settings
  482. ## Disable authenticator time drifted codes to be valid.
  483. ## TOTP codes of the previous and next 30 seconds will be invalid
  484. ##
  485. ## According to the RFC6238 (https://tools.ietf.org/html/rfc6238),
  486. ## we allow by default the TOTP code which was valid one step back and one in the future.
  487. ## This can however allow attackers to be a bit more lucky with there attempts because there are 3 valid codes.
  488. ## You can disable this, so that only the current TOTP Code is allowed.
  489. ## Keep in mind that when a sever drifts out of time, valid codes could be marked as invalid.
  490. ## In any case, if a code has been used it can not be used again, also codes which predates it will be invalid.
  491. # AUTHENTICATOR_DISABLE_TIME_DRIFT=false
  492. ###########################
  493. ### SMTP Email settings ###
  494. ###########################
  495. ## Mail specific settings, set SMTP_FROM and either SMTP_HOST or USE_SENDMAIL to enable the mail service.
  496. ## To make sure the email links are pointing to the correct host, set the DOMAIN variable.
  497. ## Note: if SMTP_USERNAME is specified, SMTP_PASSWORD is mandatory
  498. # SMTP_HOST=smtp.domain.tld
  499. # [email protected]
  500. # SMTP_FROM_NAME=Vaultwarden
  501. # SMTP_USERNAME=username
  502. # SMTP_PASSWORD=password
  503. # SMTP_TIMEOUT=15
  504. ## Choose the type of secure connection for SMTP. The default is "starttls".
  505. ## The available options are:
  506. ## - "starttls": The default port is 587.
  507. ## - "force_tls": The default port is 465.
  508. ## - "off": The default port is 25.
  509. ## Ports 587 (submission) and 25 (smtp) are standard without encryption and with encryption via STARTTLS (Explicit TLS). Port 465 (submissions) is used for encrypted submission (Implicit TLS).
  510. # SMTP_SECURITY=starttls
  511. # SMTP_PORT=587
  512. # Whether to send mail via the `sendmail` command
  513. # USE_SENDMAIL=false
  514. # Which sendmail command to use. The one found in the $PATH is used if not specified.
  515. # SENDMAIL_COMMAND="/path/to/sendmail"
  516. ## Defaults for SSL is "Plain" and "Login" and nothing for Non-SSL connections.
  517. ## Possible values: ["Plain", "Login", "Xoauth2"].
  518. ## Multiple options need to be separated by a comma ','.
  519. # SMTP_AUTH_MECHANISM=
  520. ## Server name sent during the SMTP HELO
  521. ## By default this value should be is on the machine's hostname,
  522. ## but might need to be changed in case it trips some anti-spam filters
  523. # HELO_NAME=
  524. ## Embed images as email attachments
  525. # SMTP_EMBED_IMAGES=true
  526. ## SMTP debugging
  527. ## When set to true this will output very detailed SMTP messages.
  528. ## WARNING: This could contain sensitive information like passwords and usernames! Only enable this during troubleshooting!
  529. # SMTP_DEBUG=false
  530. ## Accept Invalid Certificates
  531. ## DANGEROUS: This option introduces significant vulnerabilities to man-in-the-middle attacks!
  532. ## Only use this as a last resort if you are not able to use a valid certificate.
  533. ## If the Certificate is valid but the hostname doesn't match, please use SMTP_ACCEPT_INVALID_HOSTNAMES instead.
  534. # SMTP_ACCEPT_INVALID_CERTS=false
  535. ## Accept Invalid Hostnames
  536. ## DANGEROUS: This option introduces significant vulnerabilities to man-in-the-middle attacks!
  537. ## Only use this as a last resort if you are not able to use a valid certificate.
  538. # SMTP_ACCEPT_INVALID_HOSTNAMES=false
  539. #######################
  540. ### Rocket settings ###
  541. #######################
  542. ## Rocket specific settings
  543. ## See https://rocket.rs/v0.5/guide/configuration/ for more details.
  544. # ROCKET_ADDRESS=0.0.0.0
  545. ## The default port is 8000, unless running in a Docker container, in which case it is 80.
  546. # ROCKET_PORT=8000
  547. # ROCKET_TLS={certs="/path/to/certs.pem",key="/path/to/key.pem"}
  548. # vim: syntax=ini