Database Setup
Concourse uses two databases: a primary database for application data and a separate audit database for security event logging.
SQLite (default)
Section titled “SQLite (default)”SQLite is the default and requires no external dependencies. The database file is created automatically in the /data volume.
database: url: sqlite:///data/concourse.dbOr equivalently:
database: url: file:///data/concourse.dbSQLite is suitable for single-server deployments. It requires a persistent volume at /data.
Turso (cloud SQLite)
Section titled “Turso (cloud SQLite)”For cloud-native deployments, Concourse supports Turso, a distributed SQLite service.
database: url: libsql://your-database.turso.ioSet the authentication token via environment variable:
-e DATABASE_URL=libsql://your-database.turso.io?authToken=your-tokenIn-memory
Section titled “In-memory”For development and testing only:
database: url: ":memory:"All data is lost when the container stops.
Audit database
Section titled “Audit database”The audit database is configured separately under the audit section:
audit: enabled: true database: url: file:///data/audit.dbKeeping the audit database separate from the primary database provides tamper resistance. An application-level compromise cannot alter audit records through the primary database connection.
Backup
Section titled “Backup”Both databases are stored in the /data volume by default. To back up:
# Stop the container (recommended for consistency)docker stop concourse
# Copy the volumedocker run --rm \ -v concourse-data:/data \ -v $(pwd):/backup \ alpine tar czf /backup/concourse-backup.tar.gz /data
# Restartdocker start concourseFor zero-downtime backups, use SQLite’s .backup command or a filesystem snapshot if your storage supports it.
Database URLs
Section titled “Database URLs”| Format | Example | Description |
|---|---|---|
sqlite:// | sqlite:///data/concourse.db | Local SQLite file |
file:// | file:///data/concourse.db | Local SQLite file (alias) |
libsql:// | libsql://your-db.turso.io | Turso cloud SQLite |
:memory: | :memory: | In-memory (development only) |