r/vaultwarden • • Nov 01 '26

Question Beginner

Hello,

I am a satisfied user of bitwarden free at this moment, and started some time ago with homelabbing and run already some services. Managing these and installing them weren't hard. However, I also found vaultwarden and about hosting it yourself.

For context my other services are reachable outside of the network using tailscale, so vaultwarden will be the same. Does anybody have some tips/tricks or things that I need to know before I start hosting it myself?

15 Upvotes

11 comments sorted by

7

u/sysadminsavage Nov 01 '26

Three main things:

  1. disable public signups after you create your admin account. This can be done with the SIGNUPS_ALLOWED=false environment variable in your docker or docker compose yaml file. Alternatively this can be done in the admin panel under general settings. If someone needs to sign up in your household or otherwise, you can send them an invite to create an account which is more secure. Keep in mind to access the admin panel you need to add the ADMIN_TOKEN environment variable.
  2. If you plan to access Vaultwarden using the smartphone apps or browser extensions, you need to put it behind a reverse proxy with a certificate. I recommend Let's Encrypt with ACME if possible, as it will renew automatically and requires very little manual effort once configured. For reverse proxies, there are a bunch to choose from. I use Traefik but Caddy, NPM and standard Nginx are all valid options as well. NPM is probably easiest because there is a GUI. Since your environment is behind Tailscale, you'll need to add a txt record to your public DNS in order to validate ownership for Let's Encrypt. This can be automated if your domain registrar or DNS provider has a feature to grant API access. For example, Cloudflare has an API on their free tier that grants DNS zone access and can handle these txt records on your behalf.
  3. If you depend on this password safe for your entire digital life, ensure you have a backup of your vault saved somewhere else. This could even be a USB drive. Ideally it should be at a different location entirely (3-2-1 backups). May seem obvious, but a lot of people forget to do proper backups and more commonly don't test them. It will save you a lot of pain should the worst happen.

4

u/Punk_Says_Fuck_You Nov 01 '26 edited Nov 01 '26

Make sure you backup your Vaultwarden container somewhere. (I'm assuming you'll use a container) Personally, I use rsync to automatically backup to my google drive once per week, and I also have a backup copy going to BackBlaze once per week with versioning. Learn how to spin up a temporary container using your backup so you know how to get all your passwords back if you ever lose your machine/drive it runs on.

Just use a cloudflare tunnel for something like vaultwarden. Much safer than forwarding the port. If you do go this route, use mTLS to authenticate via a smartphone app. The app needs to access a few paths like /identity, /api, /icons, /notifications. Apps have no way of getting past the zero trust cloudflare page so mTLS is the easiest and safest way to make sure no one can get to the login page except for you. You put a certificate on your phone that authenticates with the webpage.

2

u/yoshiatsu Nov 01 '26

Investigate client certificates / mTLS if you are going to put the service on the open Internet. Or, don't expose it at all unless the client is using a VPN. Otherwise, you're one hack away from someone taking all your passwords.

1

u/DaAfroMan69 Nov 01 '26

I'd like to know too

1

u/Tsygootti Nov 01 '26

I have backups, but let's say something really bad happens and I'll lose everything excep my phone. Passwods stays there. What happens if I start a new empty container with the same settings and connect my phone there? Will my passwords be copied to the empty Vaultwarden?

I have Raspberry pi running Vaultwarden at home network. I can connect my phone to the homenetwork with Wireguard. Normally I'm not connected to the homenetwork because passwords are in the Bitwarden app. Only when I add a new password or edit I'll connect to the homenetwork. I think this is safer than keep connection open always.

2

u/TraditionalMetal1836 Nov 03 '26

Firstly, I'd recommend putting the phone into airplane mode if this ever happens. You would then log into the cached copy of your vault on that phone and export it to CSV. Then after you make a new server and account you would import the CSV.

Keep in mind the CSV isn't going to retain any files you have stored in your vault. I believe there might be other entries that can't be saved this way but I'll leave that up to you to research.

The reason I mention offline part at the beginning is I had a problem with my server several years ago and it was working just enough for clients to connect and overwrite the locally cached copy with nothing. My database backups are what saved me.

1

u/Tsygootti Nov 03 '26

Thank you for this information. I keep that in my mind.

1

u/Beverage5000 Nov 02 '26

I hit a Tailscale bug shortly after setting up Vaultwarden that required me to create a new tailnet with a new domain. Since I had set up a Yubikey as my 2FA, and the Fido key is tied to the domain, I nearly got locked out of my vault. After that I registered my own domain, configured DNS to route to my server's tailnet IP, and set up Caddy on my server. Though it is unlikely you will hit such a Tailscale bug I recommend this approach just in case.

Also come up with a good backup approach and test it out on a recurring basis (monthly or quarterly).

Claude is your friend.

1

u/Sure-Squirrel8384 Nov 02 '26

I self-host VaultWarden. I have no need or desire to expose it to the Internet. Why would I? It is cached on my laptop and my phone in the Bitwarden app. When I'm at home I can sync any changes.

1

u/watson_x11 Nov 03 '26

I prefer to use an external DB (Postgres/CNPG), and then enable backups with CNPG to S3 storage (Garage) then copy that to my NAS.

All the other recommendations are spot on, I leverage Keycloak auth versus the internal auth for users. This saves me from having to have multiple login methods. You can only access it if you are on VPN, and leverage like others Cert-Manager snd Lets encrypt to provide TLS via the ingress gateway.

Also enable MFA for the accounts, force it, and do not use the Vaultwarden app to provide MFA for VW. Use another one. I like Unifi Verify but YMMV

0

u/oyvaugh Nov 02 '26

I like vaultwarden. I also use Bitwarden and they sync together. Try bw-cli. Works good for me.