How can we help you today?

Installing Bitwarden On CentOS 7 (Self Hosted)

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

 

Leave a Reply

Your email address will not be published. Required fields are marked *

    ICTU LTD is a company registered England and Wales (Company No. 09344913) 142 Thornes Lane, Wakefield, England, WF2 7RE
    Copyright © 2025 ICTU LTD, All Rights Reserved.