Skip to main content

PostgreSQL / SQLite

RushDB uses a relational database (separate from Neo4j) to store project metadata, user accounts, and API keys.

Choosing a Backend

SQLitePostgreSQL
SetupZero configRequires a running Postgres instance
Best forSingle-node, low traffic, dev/stagingProduction, HA, multi-instance
PersistenceFile on diskExternal service
ScaleSingle processHorizontal scaling

Use SQLite to get started quickly. Migrate to PostgreSQL before going to production if you need concurrent writes or plan to run multiple RushDB instances.

SQLite Setup

Set in .env:

SQL_DB_TYPE=sqlite
SQL_DB_PATH=./data/rushdb.db

Ensure the data/ directory is persisted via a Docker volume:

# docker-compose.yml (excerpt)
volumes:
- ./data:/app/data

PostgreSQL Setup

The full Compose stack ships with a PostgreSQL 16 service. Set credentials in .env:

SQL_DB_TYPE=postgres
SQL_DB_URL=postgresql://rushdb:your-strong-password@postgres:5432/rushdb

Backups

Always back up the relational database alongside Neo4j. For SQLite, copy the .db file. For PostgreSQL, use pg_dump:

pg_dump -h localhost -U rushdb rushdb > rushdb_backup_$(date +%Y%m%d).sql