In today’s digital age, password security is of utmost importance. With the increasing number of online accounts and the rise in cyber threats, it has become crucial to have a reliable password management system. Bitwarden, a free and open-source password management service, offers a solution to this problem. In this comprehensive guide, we will walk you through the process of installing Bitwarden on Debian 12, empowering you to safeguard your sensitive information effectively.
Prerequisites
Before we dive into the installation process, let’s ensure that you have all the necessary prerequisites in place. To install Bitwarden on Debian 12, you will need:
- A system with Debian 12 installed and running.
- A minimum of 2GB of RAM.
- Root access to the system.
- Docker installed and running on your Debian Server. If you haven’t installed Docker yet, you can refer to one of our guides on installing Docker on the Debian Server.
Now that we have the prerequisites covered, let’s proceed to the installation and configuration of Bitwarden.
Step 1: Create a User for Bitwarden
To begin, we need to create a dedicated user for Bitwarden. Follow these steps:
- Create a dedicated directory for the Bitwarden user:
mkdir /opt/bitwarden
- Add the user:
adduser bitwarden
- Permit the created directory access to the added user:
chmod -R 700/opt/bitwarden chown -R bitwarden:bitwarden /opt/bitwarden
- Finally, add the user created for Bitwarden to the Docker group to enable it to run Docker commands without requiring sudo or root user access:
usermod -aG docker bitwarden
Step 2: Download and Install Bitwarden
To download and install Bitwarden on Debian 12, follow these steps:
- Install the curl command if you haven’t already:
apt install curl -y
- Switch to the Bitwarden user account:
su - bitwarden
- Download the Bitwarden install script from their official site and initiate the installation:
curl -Lso bitwarden.sh https://go.btwrdn.co/bw-sh && chmod 700 bitwarden.sh ./bitwarden.sh install
The installation process may take approximately 5-10 minutes to complete.
Step 3: Complete the Instructions in the Installer
Once the installation is complete, you will be prompted to enter the necessary information to configure Bitwarden. Follow the instructions provided by the installer:
- Enter your Bitwarden instance’s domain name. Typically, this is the DNS record that has been set up for your server.
- Decide whether you want to generate a free SSL certificate with Let’s Encrypt. If you choose to do so, you will be asked to provide an email address for expiration reminders. Alternatively, if you already have an SSL certificate, you can select the option to use your own certificate.
- Fill in the installation ID and installation key obtained from the Bitwarden website. To obtain these, visit the Bitwarden Host site and enter your email address. You will then be provided with an Installation ID and Key.
Once you have entered the necessary information, the Bitwarden installation process will be completed.
Step 4: Configure Environment Variables
After the installation, it is essential to configure the environment variables to customize Bitwarden’s functionalities. Edit the global.override.env environment file located in ./bwdata/env/global.override.env
and customize the following values:
globalSettings__mail__smtp__host=<placeholder> globalSettings__mail__smtp__port=<placeholder> globalSettings__mail__smtp__ssl=<placeholder> globalSettings__mail__smtp__username=<placeholder> globalSettings__mail__smtp__password=<placeholder>
Replace <placeholder>
with the appropriate values for your SMTP server.
Additionally, if you wish to configure admin settings, modify the adminSettings__admins
value. For example:
adminSettings__admins=dev@bw.domainhere.info
Replace dev@bw.domainhere.info
with your email address.
Step 5: Verify Container Status
To ensure that Bitwarden is running correctly, execute the following commands:
./bitwarden.sh restart ./bitwarden.sh start ./bitwarden.sh rebuild docker ps
The docker ps
command will display the status of all running containers. Verify that all containers related to Bitwarden are active and functioning correctly.
Step 6: Accessing Bitwarden
Now that Bitwarden is installed and running, you can access it through your browser. Open the IP address associated with your server, which will redirect you to the Bitwarden instance.
For example:
https://bw.domainhere.info
Replace bw.domainhere.info
with the actual IP or domain configured on your server.
To access the Bitwarden admin panel, use the following URL:
https://bw.domainhere.info/admin/login?returnUrl=%2Fadmin
Please note that the admin panel uses a passwordless entry. Ensure that you have properly configured SMTP services for email notifications.
Conclusion
Congratulations! You have successfully installed Bitwarden on Debian 12, providing yourself with a robust password management solution. Bitwarden’s free and open-source platform offers a secure and convenient way to store your sensitive information. By following this step-by-step guide, you are now equipped to safeguard your online accounts effectively.
For any further assistance or to explore more cloud hosting solutions, feel free to visit Shape.host. Shape.host provides reliable and scalable Cloud VPS services, backed by 24×7 in-house customer support, ensuring a seamless hosting experience.