PostgreSQL (CloudNativePG)
| Description / name | Input element |
|---|---|
| Container Registry | |
| Container Configuration Root Path | |
| PostgreSQL (CloudNativePG) Host Port | |
| PostgreSQL (CloudNativePG) /var/lib/postgresql/data Path |
PostgreSQL on FreeBSD, compatible with the CloudNativePG Kubernetes operator. Includes pgvector, pgaudit, and pg_failover_slots.
| Port | 5432 |
| Registry | ghcr.io/daemonless/cnpg-postgres |
| Daemonless | daemonless/cnpg-postgres |
| Source | www.postgresql.org/ |
| Website | cloudnative-pg.io |
Version Tags
| Tag | Description | Best For |
|---|---|---|
17 / 17-standard |
FreeBSD Quarterly. Uses stable, tested packages. | Production stability. |
18 / 18-standard / latest / standard |
FreeBSD Quarterly. Uses stable, tested packages. | Most users — recommended. |
Before deploying, ensure your host environment is ready. See the Quick Start Guide for host setup instructions, including the security model for host vs. container privileges.
Deployment
Save as compose.yaml, then run podman-compose up -d.
Save as run.sh, then run sh run.sh.
Save as cnpg-postgres-deploy.yaml, then run ansible-playbook cnpg-postgres-deploy.yaml.
Warning
Exposing ports in AppJail means that your service can be reached from remote hosts. If that is not your intention, do not expose the ports and communicate with the service using the jail's IPv4 address or hostname assigned by the virtual network.
Save the files above, then run appjail-director up.
template.conf:
Save the files above, then run sh run.sh.
Experimental
Bastille's OCI support is experimental. It requires buildah and shares the host network stack (inherit). Mount volumes with --volume HOST JAIL; without it, image-declared volumes are stored under ${bastille_volumesdir}/${jail}.
Save as bastille-compose.yml, then run bastille up.
Interactive Configuration
Parameters
Volumes
| Path | Description |
|---|---|
/var/lib/postgresql/data |
Database data directory |
Ports
| Port | Protocol | Description |
|---|---|---|
5432 |
TCP | PostgreSQL port |
Implementation Details
- Architectures: amd64
- User:
bsd(UID/GID set via PUID/PGID). Defaults to1000:1000. - Base: Built on
ghcr.io/daemonless/base(FreeBSD 15.1). - sysvipc: Requires
--annotation 'org.freebsd.jail.allow.sysvipc=true'(ocijail 0.5.0+)
Need help? Join our Discord community.