Deployment guide

OpenBao

Overview

OpenBao is the open-source, community-driven fork of HashiCorp Vault for secrets management. It stores tokens, passwords, certificates and encryption keys securely and tightly controls access to them, with dynamic secrets, leasing and renewal, encryption as a service, and a complete audit trail.

This SecureAnyCloud image installs OpenBao 2.5.5 as a dedicated systemd service, with file storage bound to loopback behind an nginx reverse proxy on port 80. The encrypted store lives on a dedicated Azure data disk, and the vault is initialised and unsealed with unique keys on the first boot of every VM.

What you get:

  • OpenBao 2.5.5 (binary /usr/bin/bao) with file storage and the web UI enabled
  • nginx on :80 fronting the loopback OpenBao listener (OpenBao uses token authentication, not basic authentication)
  • Per-VM initialisation: five unseal keys and a root token generated on first boot and saved to a root-only file
  • Automatic unseal on every boot from the stored keys
  • A dedicated Azure data disk at /var/lib/openbao that holds the encrypted store, separate from the OS disk and re-provisioned with every VM
  • openbao.service and nginx.service as enabled, active systemd units
  • 24/7 SecureAnyCloud support

Prerequisites

You need an active Azure subscription, an SSH key pair, and a VNet with a subnet in the target region.

Standard_B2ms (2 vCPU / 8 GiB RAM) is a good starting size.

Configure the network security group (NSG) to allow inbound 22/tcp from your management network and 80/tcp for the web UI and API. Put TLS in front of port 80 before you expose it publicly (see Enabling HTTPS).

Step 1 - Deploy from the Azure Marketplace

Sign in to the Azure Portal, choose Create a resource, search the Marketplace for OpenBao by SecureAnyCloud, and select Create.

On the Basics tab, pick your subscription, resource group, region and size. Under Administrator account, choose SSH public key and paste your key. Under Inbound port rules, allow SSH (22) and HTTP (80).

Review the dedicated data disk on the Disks tab, then select Review + create and Create.

Step 2 - Deploy from the Azure CLI

# Accept the Marketplace terms once per subscription (required before the first CLI deploy)
az vm image terms accept --urn sac1647283583153:openbao-ubuntu-24-04:default:latest
az vm create \
  --resource-group <your-rg> \
  --name openbao \
  --image sac1647283583153:openbao-ubuntu-24-04:default:latest \
  --size Standard_B2ms \
  --admin-username azureuser \
  --ssh-key-values ~/.ssh/id_ed25519.pub \
  --vnet-name <your-vnet> --subnet <your-subnet> \
  --public-ip-sku Standard
az vm open-port --resource-group <your-rg> --name openbao --port 80 --priority 1010

Step 3 - Connect to your VM

Connect to the VM over SSH as the administrator user:

ssh azureuser@<vm-public-ip>

Step 4 - Confirm the services are running

Check that both services are active:

systemctl is-active openbao.service nginx.service

Both services report active. The vault is initialised and unsealed automatically on first boot.

Step 5 - Retrieve your unseal keys and root token

On first boot, OpenBao is initialised with five unseal keys and a root token. Both are written to a root-only file. Read it as root:

sudo cat /root/openbao-credentials.txt

OPENBAO_ROOT_TOKEN signs you in to the UI and authenticates API calls. OPENBAO_UNSEAL_KEY_1..5 unseal the vault.

Copy these values somewhere safe, then remove the file. Anyone with the keys and root token has full control of your secrets. The vault unseals itself on reboot from the stored keys. For stronger protection, move to an external auto-unseal (KMS) and delete the stored keys.

Step 6 - Check the health endpoint

nginx serves an unauthenticated health endpoint for load balancers and probes. Query it:

curl -s http://localhost/health

It returns ok.

Step 7 - Open the web UI

Browse to http://<vm-public-ip>/ui/ and sign in with the token method, using OPENBAO_ROOT_TOKEN from Step 5.

The UI lists your secrets engines. From there you can create, read and manage secrets, policies and authentication methods.

Step 8 - Confirm the vault from the command line

The API expects the root token in an X-Vault-Token header. Run the following to confirm that the vault is initialised and unsealed:

curl -s -H "X-Vault-Token: <OPENBAO_ROOT_TOKEN>" http://localhost/v1/sys/health | jq '{initialized, sealed, version}'

The output shows "initialized": true, "sealed": false and the running version.

Step 9 - Store and read a secret

Enable the key/value (version 2) secrets engine, write a secret and read it back. All three calls use the API with your root token:

curl -s -H "X-Vault-Token: <OPENBAO_ROOT_TOKEN>" -X POST -d '{"type":"kv","options":{"version":"2"}}' http://localhost/v1/sys/mounts/secret
curl -s -H "X-Vault-Token: <OPENBAO_ROOT_TOKEN>" -X POST -d '{"data":{"db_password":"S3cr3t-Pa55"}}' http://localhost/v1/secret/data/myapp/config
curl -s -H "X-Vault-Token: <OPENBAO_ROOT_TOKEN>" http://localhost/v1/secret/data/myapp/config | jq '.data.data'

The final read returns { "db_password": "S3cr3t-Pa55" }. The same secret is now visible in the web UI under the secret/ engine.

Step 10 - Confirm storage lives on the dedicated disk

The encrypted store sits on the dedicated Azure data disk, so it survives OS changes and can be resized independently. Confirm the mount:

findmnt /var/lib/openbao

The mount is backed by a separate Azure data disk that is captured into the image and re-provisioned on every VM.

Enabling HTTPS

The nginx reverse proxy serves plain HTTP on port 80. OpenBao handles sensitive secrets, so terminate TLS before you expose it.

Add a DNS name for the VM. Then either use the companion SecureAnyCloud nginx-ssl-certbot image as a TLS reverse proxy, or install certbot and extend the existing nginx site with a listen 443 ssl; server block.

Keep OpenBao bound to loopback, so the only public surface is the authenticated, TLS-terminated proxy.

Maintenance

  • Auto-unseal. The vault unseals itself on reboot from the keys in /root/openbao-credentials.txt. Configure an external auto-unseal (cloud KMS) and remove the stored keys for stronger protection.
  • Backups. Snapshot the /var/lib/openbao data disk to back up the encrypted store.
  • Policies and authentication. Create ACL policies and enable auth methods (AppRole, userpass, JWT and others) in the UI under Policies and Access. Stop using the root token for day-to-day work.
  • Upgrades. Install a newer OpenBao package, then run sudo systemctl restart openbao. The vault re-seals on restart, and the unseal service unseals it again.
  • Security patches. unattended-upgrades stays enabled, so the OS keeps receiving security updates automatically.

Support

SecureAnyCloud provides 24/7 expert support for this image. For questions or help with your deployment, contact sales@secureanycloud.com.

Deploy on Azure

Launch OpenBao on Ubuntu 24.04 LTS on Azure with 24/7 support from SecureAnyCloud.

View this image

Need Help?

Our support team is available 24/7.

sales@secureanycloud.com

Deploy on Azure