Version 1.0.0
Language EN

Database

Drone requires the use of a database backend for persistence. Drone uses an embedded sqlite database by default, which does not require any additional configuration. This article provides a basic overview of alternate database configurations.

MySQL

Drone supports mysql 5.6 and higher as the database engine. The below example demonstrates mysql database configuration. Please reference the official driver documentation for connection string configuration details.

DRONE_DATABASE_DRIVER=mysql
DRONE_DATABASE_DATASOURCE=root:password@tcp(1.2.3.4:3306)/drone?parseTime=true

Postgres

Drone supports postgres 9.6 and higher as the database engine. The below example demonstrates postgres database configuration. Please reference the official driver documentation for connection string configuration details.

DRONE_DATABASE_DRIVER=postgres
DRONE_DATABASE_DATASOURCE=postgres://root:password@1.2.3.4:5432/postgres?sslmode=disable

Encryption

Drone supports aesgcm encryption of secrets stored in the database. You must enable encryption before any secrets are stored in the database.

Create an encryption key:

$ openssl rand -hex 16
0c549fd39ae397333761d2cb0c53c219

Provide the encryption key to the Drone server:

DRONE_DATABASE_SECRET=0c549fd39ae397333761d2cb0c53c219

S3 Storage

Drone stores large text files (e.g. build logs) in the database by default. You can configure Drone to store large files externally in S3. This can significantly reduce the size of your database, and may improve overall performance and scalability.

Provide the Drone server with your AWS credentials:

AWS_ACCESS_KEY_ID=AC7CBED7971FDCD0
AWS_SECRET_ACCESS_KEY=1fb023a72bd510053ab88ec3dd50a8eb5b8a1d58d9
AWS_DEFAULT_REGION=us-east-1
AWS_REGION=us-east-1

Provide the Drone server with your Bucket name:

DRONE_S3_BUCKET=name-of-your-bucket

On This Page:

Getting Help

Mailing List
Search for information in the mailing list archives, or post a question.
Chat Support
Real-time chat support from maintainers and community members.