Skip to content

Database Setup

Concourse uses two databases: a primary database for application data and a separate audit database for security event logging.

SQLite is the default and requires no external dependencies. The database file is created automatically in the /data volume.

database:
url: sqlite:///data/concourse.db

Or equivalently:

database:
url: file:///data/concourse.db

SQLite is suitable for single-server deployments. It requires a persistent volume at /data.

For cloud-native deployments, Concourse supports Turso, a distributed SQLite service.

database:
url: libsql://your-database.turso.io

Set the authentication token via environment variable:

Terminal window
-e DATABASE_URL=libsql://your-database.turso.io?authToken=your-token

For development and testing only:

database:
url: ":memory:"

All data is lost when the container stops.

The audit database is configured separately under the audit section:

audit:
enabled: true
database:
url: file:///data/audit.db

Keeping the audit database separate from the primary database provides tamper resistance. An application-level compromise cannot alter audit records through the primary database connection.

Both databases are stored in the /data volume by default. To back up:

Terminal window
# Stop the container (recommended for consistency)
docker stop concourse
# Copy the volume
docker run --rm \
-v concourse-data:/data \
-v $(pwd):/backup \
alpine tar czf /backup/concourse-backup.tar.gz /data
# Restart
docker start concourse

For zero-downtime backups, use SQLite’s .backup command or a filesystem snapshot if your storage supports it.

FormatExampleDescription
sqlite://sqlite:///data/concourse.dbLocal SQLite file
file://file:///data/concourse.dbLocal SQLite file (alias)
libsql://libsql://your-db.turso.ioTurso cloud SQLite
:memory::memory:In-memory (development only)