Security update: Docker images from v0.4.0-rc.1 fix the high-severity FFmpeg MagicYUV decoder vulnerability (CVE-2026-8461). Upgrade instances using older images immediately.View CVE advisory
Security update: v0.4.0-beta.3 fixes a WebDAV request issue that can terminate the server process. Upgrade older instances promptly.View advisory
Database Configuration
[database]url = "sqlite://asterdrive.db?mode=rwc"pool_size = 10retry_count = 3Choose a Database Type First
Section titled “Choose a Database Type First”- SQLite - Best for single-node, NAS, personal, or small-team deployments. It has the least operational overhead.
- PostgreSQL - Use it if you already run PostgreSQL or want to integrate with an existing operations stack.
- MySQL - Use it if you already use MySQL and want to keep the stack consistent.
Options
Section titled “Options”| Option | Default | Purpose |
|---|---|---|
url | "sqlite://asterdrive.db?mode=rwc" | Database connection string |
pool_size | 10 | Connection pool size |
retry_count | 3 | Number of retries when the database connection fails during startup |
Common Examples
Section titled “Common Examples”SQLite
Section titled “SQLite”url = "sqlite://asterdrive.db?mode=rwc"A more common Docker example:
url = "sqlite:///data/asterdrive.db?mode=rwc"PostgreSQL
Section titled “PostgreSQL”url = "postgres://user:password@localhost:5432/asterdrive"url = "mysql://user:password@localhost:3306/asterdrive"What Happens During Startup
Section titled “What Happens During Startup”On every startup, AsterDrive will:
- Open the database connection
- Apply migrations automatically to update the schema
- Continue starting the service
So daily upgrades do not require you to run migration commands manually.
Do Not Change url Directly When Switching Database Backends
Section titled “Do Not Change url Directly When Switching Database Backends”SQLite Path Semantics
Section titled “SQLite Path Semantics”When SQLite uses a relative path, it is resolved relative to the directory containing data/config.toml.
| Deployment Method | Default Location |
|---|---|
| Run locally | ./data/asterdrive.db |
| systemd | WorkingDirectory/data/asterdrive.db |
Docker (sqlite:///data/asterdrive.db?mode=rwc) | /data inside the container |
For long-running deployments, write the SQLite path as a fixed directory or mount it on a persistent volume to avoid surprises from working directory changes.
How to Tune pool_size and retry_count
Section titled “How to Tune pool_size and retry_count”- Single-node or small-team deployment: keep the defaults
- External database starts slowly, such as when orchestration starts the DB later than AsterDrive: increase
retry_count - High concurrency and the database itself allows more connections: then consider increasing
pool_size
Environment Variables
Section titled “Environment Variables”ASTER__DATABASE__URL="sqlite:///data/asterdrive.db?mode=rwc"ASTER__DATABASE__POOL_SIZE=10ASTER__DATABASE__RETRY_COUNT=3