Config File (.devdbrc)
Use a .devdbrc file when zero-config detection does not find your database.
Create the file
- Create a file with the name
.devdbrcin the root of your workspace. - Add a JSON array. Each item is one connection.
- Save the file. DevDb shows each connection under Config File in the DevDb panel.
WARNING
Add .devdbrc to .gitignore. The file can contain passwords. Each team member can then use a different configuration.
Editor help
The editor gives this help for .devdbrc:
- Validation against the DevDb JSON schema.
- Autocompletion for all keys, including
type. - Snippets. Type the prefix, then press
Tab:
| Prefix | Inserts |
|---|---|
devdb mysql | MySQL connection |
devdb mariadb | MariaDB connection |
devdb postgres | PostgreSQL connection |
devdb sqlite | SQLite file |
devdb mssql | Microsoft SQL Server connection |
devdb duckdb | DuckDB file |
Rules
- The file is JSON. Do not add comments.
- A relative
pathis resolved from the folder that contains.devdbrc. - Each MySQL, MariaDB, PostgreSQL, SQL Server, Redis and ClickHouse entry needs a
name. - Entries for Pro datastores (
duckdb,redis,clickhouse) need a Pro license. Without a license, DevDb shows a warning and skips the entry.
Complete example
[
{
"name": "App (MySQL)",
"type": "mysql",
"host": "127.0.0.1",
"port": 3306,
"username": "root",
"password": "secret",
"database": "my_app"
},
{
"type": "sqlite",
"path": "database/database.sqlite"
},
{
"name": "Cache",
"type": "redis",
"host": "127.0.0.1",
"port": 6379
}
]Reference
This reference comes from the JSON schema schemas/devdbrc.json in the DevDb extension.
SQLite
| Key | Type | Required | Default | Description |
|---|---|---|---|---|
type | "sqlite" | Yes | — | Database type |
path | string | Yes | — | Path to the SQLite database file. Relative to the .devdbrc folder. |
[
{
"type": "sqlite",
"path": "database/database.sqlite"
}
]MySQL / MariaDB
| Key | Type | Required | Default | Description |
|---|---|---|---|---|
name | string | Yes | — | Name of the connection |
type | "mysql", "mariadb" | Yes | — | Database type |
host | string | No | "localhost" | Database host |
port | number | No | 3306 | Database port |
username | string | Yes | — | Database username |
password | string | Yes | — | Database password. Use "" for no password. |
database | string | Yes | — | Database name |
[
{
"name": "Shop (MariaDB)",
"type": "mariadb",
"host": "127.0.0.1",
"port": 3306,
"username": "shop",
"password": "secret",
"database": "shop"
}
]PostgreSQL
| Key | Type | Required | Default | Description |
|---|---|---|---|---|
name | string | Yes | — | Name of the connection |
type | "postgres" | Yes | — | Database type |
host | string | No | "localhost" | Database host |
port | number | No | 5432 | Database port |
username | string | Yes | — | Database username |
password | string | Yes | — | Database password |
database | string | Yes | — | Database name |
[
{
"name": "Analytics (Postgres)",
"type": "postgres",
"host": "localhost",
"port": 5432,
"username": "postgres",
"password": "secret",
"database": "analytics"
}
]For a PostgreSQL server that needs TLS, use a remote connection.
Microsoft SQL Server
| Key | Type | Required | Default | Description |
|---|---|---|---|---|
name | string | Yes | — | Name of the connection |
type | "mssql" | Yes | — | Database type |
host | string | No | "localhost" | Database host |
port | number | No | 1433 | Database port |
username | string | Yes | — | Database username |
password | string | Yes | — | Database password |
database | string | Yes | — | Database name |
options | object | No | — | Driver options, for example trustServerCertificate |
[
{
"name": "Legacy (SQL Server)",
"type": "mssql",
"host": "localhost",
"port": 1433,
"username": "sa",
"password": "YourPassword123",
"database": "master",
"options": {
"trustServerCertificate": true
}
}
]Set trustServerCertificate to true for a local server with a self-signed certificate.
DuckDB Pro
| Key | Type | Required | Default | Description |
|---|---|---|---|---|
type | "duckdb" | Yes | — | Database type |
path | string | Yes | — | Path to the DuckDB file. Relative to the .devdbrc folder. |
readOnly | boolean | No | true | Open the file read-only. Set to false to allow writes. |
[
{
"type": "duckdb",
"path": "data/analytics.duckdb",
"readOnly": true
}
]See DuckDB.
Redis / Valkey Pro
| Key | Type | Required | Default | Description |
|---|---|---|---|---|
name | string | Yes | — | Name of the connection |
type | "redis" | Yes | — | Redis or Valkey |
connectionString | string | No | — | redis:// or rediss:// (TLS) URL. When set, DevDb ignores host, port, username, password, database and tls. |
host | string | No | "localhost" | Server host |
port | number | No | 6379 | Server port |
username | string | No | — | ACL username |
password | string | No | — | Password |
database | number | No | 0 | Database index |
keyPrefix | string | No | — | Show only keys that start with this prefix |
tls | boolean | No | false | Connect over TLS |
[
{
"name": "Local Redis",
"type": "redis",
"host": "127.0.0.1",
"port": 6379,
"database": 0,
"keyPrefix": "myapp:"
},
{
"name": "Managed Valkey",
"type": "redis",
"connectionString": "rediss://default:[email protected]:6380/0"
}
]See Redis / Valkey.
ClickHouse Pro
| Key | Type | Required | Default | Description |
|---|---|---|---|---|
name | string | Yes | — | Name of the connection |
type | "clickhouse" | Yes | — | Database type |
host | string | No | "localhost" | Server host |
port | number | No | 8123 | HTTP(S) port |
protocol | "http", "https" | No | See below | Transport |
username | string | No | "default" | Username |
password | string | No | — | Password |
database | string | No | "default" | Database name |
If you do not set protocol, DevDb uses https for port 8443 or 9440 and for all hosts that are not localhost. It uses http only for localhost, 127.0.0.1 and ::1.
[
{
"name": "Local ClickHouse",
"type": "clickhouse",
"host": "localhost",
"port": 8123,
"protocol": "http",
"username": "default",
"database": "default"
},
{
"name": "ClickHouse Cloud",
"type": "clickhouse",
"host": "abc123.eu-west-1.aws.clickhouse.cloud",
"port": 8443,
"protocol": "https",
"username": "default",
"password": "secret"
}
]See ClickHouse.
Other connection types
These connection types are not available in .devdbrc. Add them from the DevDb panel, or let zero-config detection find them:
- MySQL, MariaDB and PostgreSQL with TLS
- SSH tunnels
- MongoDB
- Cloudflare D1, Turso / libSQL and DynamoDB
See Remote Connections.