> ## Content Index
> Fetch the complete content index at: https://www.stirup.si/llms.txt
> Use this file to discover other available public pages before exploring further.

# Vaire's PostgreSQL 18 Deployment and Management Features
- URL: https://www.stirup.si/vaire-s-postgresql-18-deployment-and-management-features-5940ad1c/
- Published: 2026-11-20T17:07:12.000Z
- Updated: 2026-11-20T17:07:12.000Z
- Description: Vaire offers multiple PostgreSQL 18 installation options via CLI, including edge, alpha, beta, rc, and stable channels, with deployment managed through shell scripts and workspace-specific commands.
- Author: Satish Das
- Tags: Community, News, Stirup Research

## Installation and Configuration Options

Vaire provides multiple installation and configuration options for deploying PostgreSQL 18 on a VPS through a single CLI interface. Users can choose from different channels, including edge for rolling master builds and alpha/beta releases, rc for release candidates, and stable or stable-1.x for final releases. Installation is performed via shell scripts retrieved from specific URLs, such as `https://vaire.mbvlabs.com/edge/install.sh` for edge builds. Once installed, users can initialize a server with commands like `vaire server init`, specifying parameters such as the workspace name, node name, and host. Additional commands like `vaire workspace list` and `vaire workspace show` allow users to manage and inspect their workspaces. The `--workspace` or `-w` flag is used to select a workspace for subsequent commands, with priority given to the flag, then the `VAIRE_WORKSPACE` environment variable, and finally the saved current workspace.

## Workspace Management and Local Access

Vaire's workspace management system allows users to define and switch between different environments with commands like `vaire workspace list` and `vaire workspace use prod`. Workspace configuration files are stored locally in `~/.config/vaire/workspaces/<name>/`, including `workspace.toml` and owner-only credential files. A `config.toml` file tracks the current workspace selection. Versioned IDs, such as `tls-v1` and `postgres-config-v1@app`, are used to identify steps in the deployment process, and a journal logs all executed steps. This enables upgrades to only re-run steps that have changed, improving efficiency and reducing errors.

## Database Clusters and Resource Management

Vaire’s approach to PostgreSQL 18 management emphasizes isolation and control through database clusters. Each database created with `vaire db create app` forms its own cluster, complete with unique data directories, sockets, WAL streams, and configuration settings. This isolation ensures that resources like memory and CPU are managed independently for each cluster, allowing for fine-grained control over performance and scalability.

Clusters communicate via Unix sockets, with network access handled by transaction and session poolers that route connections based on database names. This architecture allows for distinct memory allocations, as specified by the `--memory` flag or through resizing commands like `vaire db resize app --size large`. Changes to memory and other settings are applied live without requiring a full restart, and when necessary, only the affected database is restarted, minimizing downtime.

## Security and Network Exposure

Vaire's security and network exposure design emphasizes minimal public access and controlled updates. After bootstrap, the server only opens specific public ports: 51820/udp for WireGuard, 80/tcp and 443/tcp for HTTPS (with HTTP-01 metrics restricted to WireGuard peers), and 22/tcp for SSH—but only over WireGuard. This setup ensures that all external traffic is routed through the WireGuard interface, limiting exposure to approved IPs and reducing attack surfaces.

Additionally, unattended-upgrades is configured to install only security updates, while PostgreSQL, PgBouncer, and nginx are held back for controlled updates. This approach minimizes the risk of unexpected disruptions from untested patches. The use of ufw with a default deny policy enforces these restrictions, ensuring that no unnecessary ports remain open.

## Certificate Management and Metrics

Vaire's certificate management system automates the issuance and renewal of TLS certificates for PostgreSQL 18 nodes via an hourly `vaire-certs` timer, using HTTP-01 challenges. This process ensures that the certificate for the node's hostname (`db1.<domain>`) is installed and applied to PgBouncers, nginx, and every cluster, with subsequent reloads to maintain secure communication. For this to function, the DNS record must directly point to the server without any proxying, as stated in the documentation.

Vaire also provides detailed metrics through authenticated HTTPS endpoints, including `/metrics/node`, `/metrics/postgres/<db>`, `/metrics/pgbouncer`, and `/metrics/pgbouncer-session`. These metrics offer insights into node health, PostgreSQL database performance, and PgBouncer operations, enabling administrators to monitor and optimize their PostgreSQL 18 deployment effectively.

## Sources and reporting notes

- [Hacker News Show](https://github.com/mbvlabs/vaire?ref=stirup.si)

Based on published source material. No independent hands-on testing is claimed.