Knowledge Base

Browse our knowledge base for free solutions to common problems

Installing Bitwarden On CentOS 7 (Self Hosted)

Created On: 14 September 2022
Written by: Ben

Minimum Hardware Requirements

Ensure that the machine you wish to install Bitwarden on has the following:

  1. At lease 2 GB of RAM
  2. At least 10 GB Disk Space
  3. 1 CPU Core or more
  4. FQDN resolving to the machines IP e.g (bitwarden.example.com)

Preconfigure the Machine

Before performing the install I personally like to remove any packages I don't use and disable SELinux.

Update all packages:

yum update -y

Remove firewalld:

yum remove firewalld -y

Flush iptables:

iptables -F

Disable SELinux:

setenforce 0

Disabled SELinux inside the startup config:

nano /etc/selinux/config

Before Edit:

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=enforcing
# SELINUXTYPE= can take one of three two values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected.
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted

After Edit:

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three two values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected.
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted

Install some packages we might need:

yum install curl mlocate wget -y

Reboot to apply every change:

reboot

Get an Install ID and Key

  1. Go to the following URL: https://bitwarden.com/host/
  2. Insert the email you plan to use for the admin into the "Admin Email Address" field.
  3. Copy the provided key to a safe place, we will use this when we perform the install.

Install Docker

Install Docker Compose

Install Bitwarden

Ensure you are in the root directory:

cd /root

Pull through the installer and make it executable:

curl -s -o bitwarden.sh \
    https://raw.githubusercontent.com/bitwarden/core/master/scripts/bitwarden.sh \
    && chmod +x bitwarden.sh

Install Bitwarden:

./bitwarden.sh install
./bitwarden.sh start
./bitwarden.sh updatedb

 

ICTU LTD is a company registered England and Wales (Company No. 09344913) 15 Queen Square, Leeds, West Yorkshire, England, LS2 8AJ
Copyright © 2024 ICTU LTD, All Rights Reserved.
exit