Back to articles
Security & Anti-DDoS

Deploy OpenBao and Vaultwarden: Centralized Security for Secrets and Password Management for Digital Agencies

A technical guide on deploying OpenBao and Vaultwarden to provide a secure, centralized solution for managing secrets and passwords for digital agencies. Step-by-step setup,...

DPTCloud Engineering4 min read
Deploy OpenBao and Vaultwarden: Centralized Security for Secrets and Password Management for Digital Agencies

Introduction to OpenBao and Vaultwarden

In an era where digital agencies increasingly rely on cloud-based applications and services, securing sensitive information such as passwords, API keys, and other secrets has become a top priority. OpenBao and Vaultwarden are two powerful tools that provide secure, centralized management of this sensitive data.

OpenBao is a secrets management platform designed to store and retrieve sensitive information like passwords, SSL certificates, and API keys. It offers strong encryption, fine-grained access control, and seamless integration with various systems and workflows.

Vaultwarden is a lightweight, OpenBao-compatible implementation optimized for password management in both personal and enterprise environments. It features a user-friendly interface, multi-device support, and integration with popular web browsers.

Prerequisites and Setup

To deploy OpenBao and Vaultwarden, you need a VPS with the following requirements:

  • Operating System: Ubuntu 22.04 or later
  • RAM: At least 2GB
  • Storage: At least 10GB
  • Public IP address

Ensure you have a VPS provided by DPTCloud. You may also refer to the guide on hardening Ubuntu 24.04 VPS against SSH brute-force attacks with key-only authentication to improve your server’s security posture.

Deploying OpenBao and Vaultwarden

The deployment process includes the following steps:

  1. Run the following commands to install required packages:
sudo apt update
sudo apt install docker.io docker-compose -y
  1. Create directories to store data:
mkdir -p /opt/openbao/data
mkdir -p /opt/vaultwarden/data
  1. Create a docker-compose.yml file for OpenBao:
version: '3.8'
services:
  openbao:
    image: openbao/openbao:latest
    container_name: openbao
    ports:
      - "8200:8200"
    volumes:
      - /opt/openbao/data:/opt/openbao/data
    environment:
      - VAULT_ADDR=http://localhost:8200
      - VAULT_DEV_ROOT_TOKEN_ID=root
    command: server -dev
  1. Create a docker-compose.yml file for Vaultwarden:
version: '3.8'
services:
  vaultwarden:
    image: vaultwarden/server:latest
    container_name: vaultwarden
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - /opt/vaultwarden/data:/data
    environment:
      - WEB_VAULT_ENABLED=true
      - SIGNUPS_ALLOWED=false
      - ADMIN_TOKEN=your_admin_token
      - LOG_LEVEL=info
  1. Start the services:
cd /opt/openbao
docker-compose up -d
cd /opt/vaultwarden
docker-compose up -d

Security Recommendations and Verification

After deployment, follow these steps to ensure security:

To verify service status, run:

docker ps

Ensure both OpenBao and Vaultwarden containers are running.

Conclusion

Deploying OpenBao and Vaultwarden provides digital agencies with a robust, centralized solution for managing secrets and passwords. With strong security features and easy integration, this setup is ideal for organizations that need to protect sensitive data.

For more information on related security practices, explore automated container security scanning with Trivy.

DPTCloud Tier III Infrastructure

Recommended NVMe Cloud VPS Plans to Deploy This Setup

Enterprise RAID 10 NVMe SSDs, CMC & FPT District 9 uplinks with Anycast Anti-DDoS and 99.99% SLA.

View 22 VPS Plans
ECO · vn-02

VPS-2E

94.600 ₫ / mo

10% VAT included

  • CPU: 2 vCPU
  • RAM: 2 GB
  • SSD: 30 GB NVMe
ECO · vn-02Recommended

VPS-3E

170.500 ₫ / mo

10% VAT included

  • CPU: 2 vCPU
  • RAM: 4 GB
  • SSD: 50 GB NVMe
BASIC · vn-01Recommended

VPS-05

457.600 ₫ / mo

10% VAT included

  • CPU: 4 vCPU
  • RAM: 8 GB
  • SSD: 50 GB NVMe

Related Articles

View all
ZaloZalo SupportDiscord0384 753 478