Linux

Where Does Drone CI Store Its Database and Config?

Drone server database file and config locations for Docker and binary installs, plus what agents keep locally.

Last updated

Drone keeps server state in a database and almost nothing on runners. SQLite installs write to /var/lib/drone/drone.sqlite. That file holds repos, builds, and user tokens. Postgres installs move the same data to the external database named by the datasource variable.

Server settings arrive as environment variables. Docker installs pass them through compose or a server env file, commonly /etc/drone/server.env on binary hosts. Agents need only the RPC secret and address. They can be replaced freely, while the server database cannot.

Where Drone CI stores this, by platform

Linux
/var/lib/drone/drone.sqlite

Default SQLite store for binary installs. Holds build history and tokens. Stop the server container before copying it, then copy the env file with it.

Linux
/etc/drone/server.env

Holds DRONE_RPC_SECRET, GitHub OAuth IDs, and database settings. Docker users keep equivalents in compose. This file plus the database is the full server backup.

Frequently asked questions

where is the Drone SQLite file on my server

Inspect the DRONE_DATABASE_DATASOURCE variable in the server env. SQLite installs default to /var/lib/drone/drone.sqlite. Docker installs often hide it in a named volume, so check volume mounts first.

what do i back up before migrating a Drone server

Save the server env file, the SQLite file or Postgres dump, and compose files. Runners keep only ephemeral build containers. A fresh runner with the same RPC secret rejoins without a restore.

Notice an outdated path? Let us know.