Project

General

Profile

Actions

Install

Install

To install Bitwarden on a Proxmox server, you can follow these general steps:

1. Set up a Linux container (LXC) on your Proxmox server. Bitwarden supports various Linux distributions, such as Ubuntu or Debian, so you can choose the one you are most comfortable with. For example, if you want to use Ubuntu, you can create an Ubuntu LXC container.

2. Once the LXC container is created, log in to the container via SSH or the Proxmox web interface.

3. Update the package repositories and upgrade the system by running the following commands:

sudo apt update && sudo apt upgrade -y

4. Install the required dependencies. Bitwarden requires Docker and Docker Compose. Install them using the following commands:

sudo apt install docker.io -y && sudo apt install docker-compose -y

5. Start the Docker service:

sudo systemctl start docker

6. Create a directory to store the Bitwarden configuration and data:

sudo mkdir /opt/bitwarden

7. Change the ownership of the directory to the user running Docker:

sudo chown 1000:1000 /opt/bitwarden

8. Navigate to the Bitwarden directory:

cd /opt/bitwarden

9. Download the Bitwarden Docker Compose file:

   sudo curl -Lso docker-compose.yml https://raw.githubusercontent.com/bitwarden/server/master/docker/docker-compose.yml

10. Open the docker-compose.yml file using a text editor. For instance:

sudo nano docker-compose.yml

Add the following... if you want to make Bitwarden accessible at IP address 192.168.1.69, modify the ports configuration for the

version: '3.7'

services:
  setup:
    image: bitwarden/setup:latest
    # Rest of the service configuration

  bitwarden:
    image: bitwardenrs/server:latest
    container_name: bitwarden
    ports:
      - 0.0.0.0:80:80
    # Other configuration options for the Bitwarden service
    environment:
      - SIGNUPS_ALLOWED=true
      - DOMAIN=https://bitwarden.*******.com
      - SMTP_HOST=smtp.gmail.com
      - SMTP_PORT=587
      - SMTP_FROM=your-email@example.com
      - SMTP_FROM_NAME=Bitwarden
      - SMTP_SSL=true
      - SMTP_USERNAME=your-smtp-username@example.com
      - SMTP_PASSWORD=your-smtp-password
      - SMTP_AUTH=true
    volumes:
      - /opt/bitwarden_data:/data   # Data on host:/data in container

# Other configuration options for the Bitwarden service

if you get this error, In file docker-compose.yml service 'environment' must be a mapping not an array

11. Save and close the Docker Compose file.

12. Start the Bitwarden containers using Docker Compose:

Swich to the docker folder

cd /opt/bitwarden
   sudo docker-compose up -d

13. Wait for the containers to start and initialize. You can check the status by running:

   sudo docker-compose ps
 

14. Once the containers are up and running, you should be able to access Bitwarden by visiting the IP address or domain name of your Proxmox server in a web browser. Make sure to use HTTPS for secure access.

That's it! You have successfully installed Bitwarden on your Proxmox server. Remember to configure any necessary firewall rules to allow external access to the Bitwarden service, and consider setting up SSL/TLS certificates for secure communication.


By default, the Bitwarden containers will not start automatically after a server reboot. However, you can configure them to start automatically on server boot by using systemd services.

Here's a step-by-step guide to setting up systemd services for Bitwarden:

Create a systemd service unit file for Bitwarden. Open a new file with a .service extension using a text editor, such as bitwarden.service:

sudo nano /etc/systemd/system/bitwarden.service

Add the following content to the bitwarden.service file. Make sure to adjust the paths based on your specific configuration:


[Unit]
Description=Bitwarden Service
After=network.target

[Service]
Type=simple
ExecStart=/usr/bin/docker-compose -f /opt/bitwarden/docker-compose.yml up
WorkingDirectory=/opt/bitwarden
User=root
Restart=always

[Install]
WantedBy=multi-user.target

Save the changes and exit the text editor.

Enable the systemd service to start on boot:


sudo systemctl enable bitwarden.service

Start the Bitwarden systemd service:

sudo systemctl start bitwarden.service

With these steps, the Bitwarden containers should now start automatically when the server reboots. The systemd service will ensure that the docker-compose up command is executed with the appropriate configuration.

You can use the following commands to manage the Bitwarden systemd service:

Start the service: sudo systemctl start bitwarden.service

Stop the service: sudo systemctl stop bitwarden.service

Restart the service: sudo systemctl restart bitwarden.service

Check the status of the service: sudo systemctl status bitwarden.service

Remember to adjust the paths and configurations in the bitwarden.service file to match your specific setup.

After configuring the systemd service, you can test it by rebooting the server and verifying that Bitwarden starts automatically.

Updated by Gareth Eaton 2 days ago · 2 revisions