mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-04-25 17:25:57 +03:00
[GH-ISSUE #533] Custom location of .env file? #339
Labels
No labels
SSO
Third party
better for forum
bug
bug
documentation
duplicate
enhancement
future Vault
future Vault
future Vault
good first issue
help wanted
low priority
notes
pull-request
question
troubleshooting
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vaultwarden#339
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @MrMEEE on GitHub (Jul 15, 2019).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/533
Hi..
Is there any way to specify a custom location of the .env file??
@dani-garcia commented on GitHub (Jul 15, 2019):
You can use the
CONFIG_FILEenvironment variable, which should point to the exact JSON file.The exact line of code:
github.com/dani-garcia/bitwarden_rs@05a1137828/src/config.rs (L14)@MrMEEE commented on GitHub (Jul 15, 2019):
Yeah.. I saw that.. but it doesn't seem to work (me anyways):
If I rename the file to .env and put it in the same folder or do a symlink with the name of .env, it works
@dani-garcia commented on GitHub (Jul 15, 2019):
The
.envfile is only read from the current directory. The config file is another method and needs to be JSON format.So what in a .env file you'd configure as:
in the config JSON file you'd have to do
You could also load the settings into the environment variables yourself (I'm prety sure this works, you might need to add
exportbefore every key though):@mqus commented on GitHub (Jul 15, 2019):
If you use systemd, you can also set the .env file in your .service file with
I already did that for archlinux, you can see the resulting service file in the wiki
@MrMEEE commented on GitHub (Jul 15, 2019):
Cool..thanks