Concepts
A handful of small ideas show up across every vibepg command. Understanding them up front makes the rest of the docs trivial to skim.
Instance
An instance is a single Postgres database managed by vibepg. Each instance has:
- A user-chosen name (e.g.
demo,analytics,scratch) - A container named
vibepg-pg-<name> - A host port mapping to Postgres'
5432inside the container - A database and user (default to the instance name)
- A password stored in your OS keychain
- A persistence mode: persistent (default, backed by a Docker volume) or ephemeral
Registry
vibepg keeps lightweight metadata about each instance in a JSON file:
| Platform | Path |
|---|---|
| macOS / Linux | ~/.config/vibepg/instances.json |
| Windows | %APPDATA%\vibepg\instances.json |
The exact location follows the directories crate's config_dir() rules. Passwords are never stored here — they live in the OS keychain.
vibepg doctor prints the resolved path on your machine.
Naming rules
- Instance names: lowercase letters, digits,
-,_ --db,--user,--schema,--columns,<table>: PostgreSQL identifier-safe names — letters, digits,_, must start with a letter or_
vibepg validates these client-side before talking to Docker or Postgres, so you'll see clear errors instead of cryptic SQL syntax failures.
Default Postgres version
vibepg new pulls postgres:16 from Docker Hub by default. Override per-instance with --version:
vibepg new pg15 --version 15
vibepg new pg17 --version 17
vibepg new alpine --version 16-alpineAny tag from the official postgres image is fair game.
Port allocation
If you don't pass --port, vibepg picks the first free TCP port on 127.0.0.1 for you. To pin a port (e.g. for a config file your app already uses):
vibepg new myapp --port 5433Inside the container, Postgres always listens on 5432. The published host port is what shows up in vibepg ls, vibepg status, and vibepg url.
State model
vibepg ls reports one of three states per instance:
| State | Meaning |
|---|---|
running | Container exists and is running |
stopped | Container exists but is stopped — vibepg up <name> to start it |
missing | Registry has the instance but the container is gone (e.g. removed manually with docker rm). Recover with vibepg rm <name> to clean up the registry entry |
Where things live (TL;DR)
| Thing | Location |
|---|---|
| Instance metadata | ~/.config/vibepg/instances.json (or platform equivalent) |
| Passwords | OS keychain, key id vibepg/<name>/postgres_password |
| Persistent data | Docker volume vibepg-pg-<name>-data |
| Container | vibepg-pg-<name> |
| Logs | Docker's log driver (vibepg logs <name>) |