The same Home Assistant server that makes your home smart can also run other services like Bitwarden. All you have to do is set up a self-hosted Bitwarden server as an add-on on top of your Home Assistant installation. You can then use this Bitwarden server to create and store complex passwords on your smartphone or in a web browser on your PC.
The best part is that you never have to pay for the password manager service as it is completely open source and free.
things you need
You need Home Assistant Server running on a Raspberry Pi (preferably on a Raspberry Pi 4 4GB or 8GB). Although you can also install Home Assistant Server on a PC or other hardware, you must install and configure the add-ons manually using the command line shell as this version is not monitored.
After setting up Home Assistant on the Raspberry Pi, follow the steps below to install, configure and deploy Bitwarden.
Install the Bitwarden add-on
Follow these steps to install the Bitwarden add-on in Home Assistant:
- Login to your Home Assistant server and navigate to settings > addons.
- press the ADD ON STORE Button.
- Use the search bar to search and click Vaultwarden (Bitwarden).
- press the To install Button to start installing the Bitwarden add-on on your Home Assistant server. This can take up to a minute.
- After installation, enable Start at Boot, Watchdog, and Auto-Update options.
- Then click beginning.
If you can’t find it, click on it this link > Open connection to add the repository and then find and install the Bitwarden add-on.
You can now call up the IP of your Home Assistant server with port 7277. For example, 192.168.0.111:7277.
You can also click the open web UI button on the add-on page to open the Bitwarden web UI. However, you cannot create an account or register if you do not secure the Bitwarden server.
Configure the SSL with Cloudflared Tunnel
On the Home Assistant server, you can install and use the Cloudflared add-on to expose the local Bitwarden server to the internet with secure SSL/TLS encryption. Once you launch the Cloudflared tunnel, you or other users you create accounts for in Bitwarden can easily access and manage their password vaults from all their devices.
The steps are as follows:
- Register a free domain on Freenom.com or buy a new domain to host your Bitwarden server. Once you have the domain, create an account with Cloudflare and add your domain. Also, enable HTTPS.
- Click on this link and then on the Open connection Possibility. This will open your local Home Assistant instance and you can add this custom repository to your Home Assistant to install the required Cloudflared add-on.
- click Add to to add the repository.
- Under settings > addonslook for Cloudflared and click on it To install.
- Activate after installation Start at boot and guard dog options.
- Then click Construction and then click the three points > Edit in YAML.
- Paste the following code into the Options box. Make sure you’yourdomainname‘ with your domain name and IP address in the Service: with your Home Assistant server IP. Keep the port 7277.
- hostname: bitwarden.YourDomainName.org
- click Save on computer and then click Restart ADD ON.
- Go to Cloudflared’s add-ons page and click the protocol Tab.
- After a few seconds, you’ll see a Cloudflare URL. Copy and paste this URL into your web browser. This will open the Cloudflare page.
- Sign in to Cloudflare, then select the domain name you added.
- click Authorize. After authorization, the add-on creates a secure tunnel for your Bitwarden server.
- Open the file editor and click on the folder icon at top left.
- Click on that Configuration.yaml file and paste the following lines as shown below and click the Save on computer Symbol.
- Go to Developer Tools and click Check Configuration. When Configuration Valid is displayed, click Start anew. Wait for the server to restart.
- After the reboot, you can visit the URL https://bitwarden.yourdomainname.com to access the Bitwarden server on the internet with secure SSL/TLS encryption.
You can now log in and create user accounts for yourself and your family and friends.
Currently anyone can login and create vaults with your Bitwarden URL. To avoid this, you can disable logins. To do this, you need to access the Bitwarden admin panel at the following address:
Then paste the admin token (get the admin token/password in the logs) to open the admin panel. If you don’t see the access token, reinstall the add-on and check the log again after launching the add-on.
The add-on only displays the admin token once. Write it down somewhere safe.
Once you access the admin panel, you can edit and change various settings, including disabling logins. You can also enable two-factor authentication and create policies on how users can access and use their Bitwarden accounts hosted on your Home Assistant server.
Use Bitwarden on Android or iOS devices
To access and use Bitwarden on your Android or iOS device, you need to install the Bitwarden Password Manager app from the Google Play Store or App Store.
After installing the app, follow the steps below on your Android or iOS device:
- Open the Bitwarden Password Manager app and then tap the gear icon in the top left of the app.
- Give her Bitwarden Server URLie https://bitwarden.yourdomainname.com and save it.
- Then tap the log in and enter the username and password to login to your Bitwarden server vault and access all passwords.
Set up Bitwarden in the web browser
In order to access and use the Bitwarden server and accounts in your web browsers, you need to install the Bitwarden Password Manager extension. The extension is available for all major web browsers like Chrome, Edge, Mozilla Firefox, etc.
After installing the extension, follow the steps below to configure it and securely access or store all your passwords in your web browsers on all devices.
- In which chrome Web browser, click the Bitwarden extension and then click the gear Symbol.
- Enter your Bitwarden Server URL i.e. https://bitwarden.yourdomainname.com and click Save on computer.
- click registration and then enter the username and password on your Bitwarden server. If you have two-factor authentication enabled, enter the code to log in.
- You can now access all passwords and securely manage them right from your web browser.
The steps are more or less similar to those of other web browsers.
Free lifetime password manager
After setup is complete, you can export all your passwords from your web browser in JSON or CSV format and import them straight into your BitWarden vault.
With a Bitwarden self-hosted server, you never need to subscribe to a password manager. Secured with SSL/TLS via Cloudflared tunnels and multi-factor authentication (MFA), your server stays secure and passwords stay encrypted across all your devices. Passwords are also automatically synced across all your devices. Plus Bitwarden will also notify you if any of your passwords are found in leaks or data breaches.