Skip to main content
By default, Repoch uses SQLite for storage. PostgreSQL is recommended for production deployments where you need multi-process support or want to enable semantic search.
SQLite works well for single-process setups. You only need PostgreSQL if you’re running distributed workers or want semantic search.

Prerequisites

  • Docker installed and running
  • PostgreSQL dependencies: uv pip install repoch[postgres]

Start PostgreSQL

Repoch includes a CLI command that starts a PostgreSQL container with pgvector pre-installed:
repoch db up --password your_secure_password
This pulls the pgvector/pgvector:pg16 image, creates a persistent volume (repoch-postgres-data), and starts the container on port 5432.
Use --port to change the port if 5432 is already in use: repoch db up --password your_password --port 5433

Configure Repoch

Create a config file or use the provided configs/postgres.toml:
[database]
backend = "postgres"

[database.postgres]
# password should be set via environment variable for security
Start the server with:
REPOCH__DATABASE__POSTGRES__PASSWORD=your_secure_password repoch server --config configs/postgres.toml

Connection Options

All PostgreSQL connection settings have sensible defaults:
SettingDefaultEnvironment Variable
HostlocalhostREPOCH__DATABASE__POSTGRES__HOST
Port5432REPOCH__DATABASE__POSTGRES__PORT
DatabaserepochREPOCH__DATABASE__POSTGRES__DB
UserrepochREPOCH__DATABASE__POSTGRES__USER
Password(required)REPOCH__DATABASE__POSTGRES__PASSWORD
Pool size5REPOCH__DATABASE__POSTGRES__POOL_SIZE
Max overflow10REPOCH__DATABASE__POSTGRES__MAX_OVERFLOW

Migrate Existing Data

If you have existing data in SQLite, you can migrate it directly to PostgreSQL:
repoch db migrate --from repoch_data/database.db --to configs/postgres.toml
Use --dry-run to preview what will be migrated without making changes:
repoch db migrate --from repoch_data/database.db --to configs/postgres.toml --dry-run

Manage the Container

Check the container status:
repoch db status
Stop the container (data is preserved):
repoch db down
Stop and remove the container (data is still preserved in the volume):
repoch db down --remove
Remove everything including data:
repoch db purge
Container logs are available with repoch db logs or repoch db logs --follow.

Next Steps

Semantic Search

Enable natural language search over your recording sessions