Autobase (formerly “postgresql_cluster”) is a web console for building and running highly available PostgreSQL clusters. In your browser, you choose where the cluster should run, how many servers it should use, and which PostgreSQL version you want. Autobase then uses Ansible to set up PostgreSQL with Patroni on the target servers, optionally adding HAProxy as a load balancer and a shared cluster address. If the primary server fails, a replica takes over automatically.
One important thing to understand: the console itself is not the database. It runs on your VPS and manages other servers where the actual clusters are created: your own servers over SSH or new servers at AWS, Google Cloud, Microsoft Azure, DigitalOcean, or Hetzner Cloud.
This guide shows you two ways to get started: the easy way with the One-Click App and a manual installation with Docker Compose. Then you’ll add credentials for your servers and prepare your first cluster.
Autobase is a good fit if:
- You want to run PostgreSQL with failover protection, using a primary server and replicas that take over automatically if the primary fails.
- You have multiple servers (at least three for true high availability) and don’t want to configure them manually with Patroni, etcd, and HAProxy.
- You want to manage clusters across multiple providers in one place, such as your own servers and Hetzner Cloud.
- You want to manage an existing Patroni cluster through a web interface. To do this, select the Cluster exists option when creating it.
Autobase is less suitable if you only need a single PostgreSQL database for an app. In that case, PostgreSQL running directly on the VPS is enough. See Set Up Databases on a Linux Server, and use pgAdmin to manage it in your browser. Also note the license: Autobase’s automation is open source (MIT), but the console is not. It starts with the free Starter plan, which the vendor says allows up to two clusters. The console describes it as “Up to 2 clusters · small instances only”.
The fastest way to access the Autobase console is through your VPS’s One-Click Apps. The app installs the console (the interface, API, and an internal PostgreSQL database for its settings) along with the database tool dbdesk-studio. If you use a domain, you can access the console directly over HTTPS.
- A Linux VPS (Debian or Ubuntu) with One-Click Apps set up. See VPS: One-Click Apps for instructions.
- At least 1 vCPU, 1 GB RAM, and 5 GB of storage. We recommend 2 vCPU, 2 GB RAM, and 20 GB. In our test, the four containers used only around 160 MB of RAM in total right after startup.
- Just over 5.5 GB of free storage for the images. On first startup, the console also downloads the
autobase/automationimage (just under 3 GB), which it uses later to set up clusters. - For a cluster: target servers that your VPS can reach over SSH, or an account with one of the supported cloud providers.
- Open your VPS in the ZapX Dashboard and go to the One-Click Apps tab.
- Search for “Autobase” in the App catalog and click Install app next to Autobase.
- Use a custom subdomain or zap.cloud is already selected. Leave it enabled or enter a custom name, such as
autobase. - You don’t need to enter anything under App configuration.
PG_CONSOLE_LOGGER_LEVELcontrols the level of detail in the logs (defaultinfo), whileCORS_ORIGINapplies to dbdesk-studio (default*). - Click Queue installation.
After one or two minutes, the app card will show Online.
No console account exists immediately after installation. The first time you access Autobase, it asks you to create the first Owner account. Whoever completes this form will manage the console.
Until the Owner account exists, anyone who visits your app’s address can fill out the form and take over the console. The automatically generated token does not protect this form. So open Autobase as soon as the app shows Online.
- Open the console using the Access link on the app card. You’ll see “Create the first Owner account to complete setup.”
- Enter your Company name, Full name, Email, and a long, secure Password.
- Click Complete setup. You’ll land on the cluster overview.
After that, sign in at the same address with your email address and password. Add other users under Settings > Users.
In the app settings (gear icon), you’ll find three values under App environment > Automatically generated values:
| Value | Purpose |
|---|---|
SERVICE_PASSWORD_UI | Token for the Autobase API (PG_CONSOLE_AUTHORIZATION_TOKEN). You only need this for scripts, not to sign in through the browser. |
SERVICE_PASSWORD_POSTGRES | Password for the console’s internal database |
SERVICE_BASE64_ENCRYPTIONKEY | Key Autobase uses to encrypt stored credentials |
Use the token to call the API directly, for example, to check the version:
curl -H "Authorization: Bearer API_TOKEN" https://autobase.example.com/api/v1/version
The console API has access to Docker on your VPS. For every cluster action, it starts a separate container running Ansible. This means that anyone using the console can start containers on your VPS. Give Owner permissions and the API token only to people you would trust with your VPS.
To update Autobase, go to App update in the app settings. Click Check for updates, then install a new version by clicking Apply update. If you see “The app is already up to date.”, there isn’t a newer version in the app catalog yet. When a new version starts, the API automatically updates the internal database. So back up your VPS beforehand, for example, in the Backups tab.
Settings, accounts, and encrypted credentials are stored in the internal database in the autobase-db-data volume. Don’t change the SERVICE_BASE64_ENCRYPTIONKEY key, or Autobase won’t be able to decrypt stored credentials. Your clusters run on the target servers and aren’t affected by a console update.
If you don’t use One-Click Apps, you can install the console using the vendor’s Docker Compose file. This guide follows the instructions in the Autobase repository for version 2.12.0.
| Minimum | Recommended | |
|---|---|---|
| CPU | 1 vCPU | 2 vCPU |
| RAM | 1 GB | 2 GB |
| Storage | 5 GB | 20 GB |
You’ll also need Docker with the Compose plugin. See Set Up Docker on a Linux Server, and make sure you have root access over SSH. See First Access via SSH.
The console listens on port 80. Only open the port after creating the Owner account or putting a reverse proxy in front of it. Until then, SSH access is enough:
ufw allow OpenSSH
ufw enable
For more about ports and the network firewall in the Dashboard, see Open Ports and Manage the Firewall on Linux.
Download the vendor’s files and create a .env file with your own values. Without this file, Autobase uses publicly known default values.
git clone --depth 1 https://github.com/autobase-tech/autobase.git
cd autobase/console
cat > .env <<EOF
PG_CONSOLE_AUTHORIZATION_TOKEN=$(openssl rand -hex 32)
PG_CONSOLE_ENCRYPTIONKEY=$(openssl rand -hex 32)
PG_CONSOLE_DB_PASSWORD=$(openssl rand -hex 32)
EOF
chmod 600 .env
To keep the console accessible only locally until you set up HTTPS, change the - 80:80 line for the autobase-console-ui service in docker-compose.yml to - 127.0.0.1:8080:80. Then start the console:
docker compose up -d
docker compose ps
The file starts four containers: autobase-console-api (with access to /var/run/docker.sock and /tmp/ansible), autobase-console-ui, autobase-console-db, and dbdesk-studio.
Open an SSH tunnel from your computer and visit http://localhost:8080:
ssh -L 8080:127.0.0.1:8080 root@SERVER_IP
Create the Owner account as described above.
To access the console through a domain, put nginx in front of it. See Reverse Proxy with nginx and SSL Certificate with Let's Encrypt:
server {
listen 80;
server_name autobase.example.com;
location / {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
Then open ports 80 and 443 and get the certificate with Certbot. Alternatively, the vendor provides a docker-compose.ssl.yml file with Caddy (set the DOMAIN and EMAIL values in .env).
Back up the internal database and the .env file (which contains the PG_CONSOLE_ENCRYPTIONKEY key):
docker exec autobase-console-db pg_dumpall -U postgres > autobase-console-$(date +%F).sql
After backing up, update the console using the vendor’s instructions:
cd autobase/console
git pull --ff-only
docker compose pull
docker pull autobase/automation:2.12.0
docker compose up -d
The automation image version is listed in the latest instructions. After running git pull, check that your port change is still in docker-compose.yml.
Under Settings > Secrets, click Add secret to add the credentials Autobase needs for your servers and cloud providers. The available Secret type options are aws, gcp, azure, digitalocean, hetzner, ssh_key, and password. For your own servers, choose ssh_key (the private key of a user with root permissions on the target servers) or password. Autobase stores these values in encrypted form. For instructions on creating a key pair, see Create and Use SSH Keys for Linux Servers.
- Click Create cluster on the cluster overview.
- Under Select deployment destination, select the Your Own Machines tile.
- Under Database servers, enter the Hostname, IP Address, and SSH port for each server, and optionally enter a Location. Autobase requires at least three servers for high availability.
- Optional: Under Cluster VIP address, enter an available IP address as a shared access point, and enable HAProxy load balancer to add a load balancer.
- Select an Environment, enter a Cluster name, choose the Postgres version, and click Create cluster.
Supported target systems include Debian 11 through 13 and Ubuntu 22.04 through 26.04. For cloud providers, choose the region, instance type, number of instances, and storage instead. Autobase shows you an estimated cost; payment is made directly to the provider.
- Starter plan: Without a subscription, the console allows up to two clusters and small instances. It regularly connects to the vendor’s licensing service.
- Reachability: Your VPS must be able to reach the target servers over SSH. A cluster VIP only works where you can assign additional IP addresses, not in cloud environments.
- A VPS is not a cluster: High availability requires multiple separate servers. The console itself isn’t highly available, but your clusters keep running if it goes down.
Autobase lets you create PostgreSQL clusters with automatic failover through a web interface, instead of configuring Patroni, etcd, and HAProxy manually. The fastest way to get started is with the One-Click App: install it, create the Owner account right away, add credentials under Secrets, and create your first cluster.
