Skip to content
AsterDriveDeveloper
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

Configuration Overview

  • config.toml - Decides how the service starts: listen address, node mode, database, logging, WebDAV prefix, network trust, and rate limiting
  • Admin -> System Settings - Site-wide rules: public site URL, branding, registration/login, mail, CORS, task scheduling, share streaming playback, media processing, archive preview, trash, version history, WOPI, WebDAV switch, and audit logs
  • Admin -> External Authentication - External identity providers: OIDC / Generic OAuth2 / SSO login entries, redirect URIs, account binding, and auto-create policies
  • Admin -> Storage Policies - Where files are actually stored, and which upload method is used
  • Admin -> Policy Groups - Which storage route different users, teams, or file sizes use
  • Admin -> Follower Nodes - How the primary connects to followers, and where the follower receives objects by default
  • Reverse proxy / object storage configuration - HTTPS, large uploads, WebDAV passthrough, and direct S3 / Azure Blob / COS uploads

The earlier layers are managed by AsterDrive itself. The last layer belongs to the reverse proxy, object storage, and external network environment.

Start service

config.toml / ASTER__ environment variables

Listen address, database, logging, WebDAV prefix, node mode

System settings in the database

Site, registration, cookies, mail, share streaming playback, archive preview, trash, WOPI, audit

External authentication providers

OIDC / Generic OAuth2 / SSO login entries, external identity binding rules

Storage policies + policy groups

File placement, upload method, user/team routing

External environment

HTTPS, reverse proxy, object-storage CORS, WebDAV method passthrough

Start service

config.toml / ASTER__ environment variables

Listen address, database, logging, WebDAV prefix, node mode

System settings in the database

Site, registration, cookies, mail, share streaming playback, archive preview, trash, WOPI, audit

External authentication providers

OIDC / Generic OAuth2 / SSO login entries, external identity binding rules

Storage policies + policy groups

File placement, upload method, user/team routing

External environment

HTTPS, reverse proxy, object-storage CORS, WebDAV method passthrough

I Want to Do This. Where Should I Change It?

Section titled “I Want to Do This. Where Should I Change It?”
What you want to doWhere to change it
Change listen address, port, worker count, temporary directories, or primary / follower modeServer
Change database address, connection pool, or startup retriesDatabase
Pin the login signing secret, MFA encryption key, or first plain-HTTP bootstrapLogin and Sessions
Public site URL, branding, registration, cookies, tokens, scheduling, share streaming playback, archive preview, trash, versions, quotas, WOPI, WebDAV, auditRuntime System Settings
Connect OIDC / Generic OAuth2 / SSO external login and manage external identity providersExternal Authentication / Login and Sessions
Configure SMTP, send test mail, or edit mail templatesMail
Configure link import, the built-in downloader, or aria2 offline downloadOffline Download
Decide where files are stored and how uploads/downloads workStorage Policies
Follow a tutorial for S3 / MinIO / R2 / Azure Blob / Tencent COS / OneDrive / SFTP backendsStorage Policy Backends
Decide which storage route different users/teams useStorage Policies
Connect a follower node and configure the default remote storage targetFollower Nodes
Change the WebDAV path or hard WebDAV upload limitWebDAV
Add rate limiting to the public entry pointRate Limiting
Change cache or log output behaviorCache / Logging
Synchronize system-setting and config CLI changes across instancesConfiguration Synchronization

Where Is config.toml, and How Should I Write It?

Section titled “Where Is config.toml, and How Should I Write It?”

On first startup, if the current working directory does not contain data/config.toml, AsterDrive automatically generates a default configuration file, including random jwt_secret, share_cookie_secret, direct_link_secret, and mfa_secret_key values.

Configuration precedence:

ASTER__ environment variables > config.toml > built-in defaults

Environment variables use double underscores __ to represent nesting:

Terminal window
ASTER__SERVER__PORT=8080
ASTER__DATABASE__URL="postgres://user:pass@localhost/asterdrive"
ASTER__WEBDAV__PREFIX=/dav

If you start the bare binary, the process first reads .env in the current working directory, then starts with the same environment variable rules. For long-running deployments, put .env in the actual working directory of the service and tighten its permissions.

TypeExampleWhen to use
Startup configuration overridesASTER__DEPLOYMENT__PROFILE, ASTER__SERVER__HOST, ASTER__DATABASE__URL, ASTER__SERVER__START_MODEConfiguration that must be decided before the service starts; higher priority than config.toml
First-bootstrap switchesASTER__AUTH__BOOTSTRAP_INSECURE_COOKIESOnly affects the default value written the first time system settings are initialized; after initialization, change it in admin system settings
Follower node auto-enrollmentASTER_BOOTSTRAP_REMOTE_MASTER_URL, ASTER_BOOTSTRAP_REMOTE_ENROLLMENT_TOKENAutomatically enroll a Docker follower on first startup; remove after success
Media processing defaultsASTER_BOOTSTRAP_ENABLE_VIPS_CLI, ASTER_BOOTSTRAP_ENABLE_FFMPEG_CLI, ASTER_BOOTSTRAP_ENABLE_FFPROBE_CLIUsed only when media-processing system settings do not yet exist, to decide initial default processors
Operations CLI argumentsASTER_CLI_DATABASE_URL, ASTER_CLI_OUTPUT_FORMATUse in scripts to avoid writing long arguments every time. See operations CLI
SectionPurpose
deploymentSingle-instance or multi-primary cluster declaration and shared-dependency checks
serverListen address, port, worker count, temporary directories, node mode, follower local target root
databaseDatabase connection, connection pool, startup retries
authLogin signing secret, MFA encryption key, first plain-HTTP bootstrap
cacheMemory cache / Redis
config_syncMulti-instance runtime configuration reload notifications, disabled by default
loggingLog level, format, output file, rotation
webdavWebDAV path prefix and hard upload size limit
[network_trust]Trusted reverse proxy addresses, affecting real client IP detection
rate_limitRate limiting rules for login, public shares, and general access

Admin -> System Settings currently displays these groups:

  • Site Configuration
  • User Management
  • Authentication and Cookies
  • Mail Delivery
  • Network Access
  • Runtime
  • Storage and Retention
  • File Processing
  • WebDAV
  • Audit Logs
  • Custom Configuration
  • Other

See runtime system settings and mail for details.

If the admin console is temporarily unavailable, or you want to inspect, validate, or batch-write system settings offline during a maintenance window, use the operations CLI.

Storage Policies and Policy Groups Are Not in config.toml

Section titled “Storage Policies and Policy Groups Are Not in config.toml”

They are maintained in admin pages and decide:

  • Storage policy - Where files are actually stored, single-file size limit, chunk size, and upload method
  • Policy group - Which storage policy a user or team hits when uploading

See storage policies for details.

If you write relative paths, remember that config-file paths and storage-policy paths use different semantics:

  • Location of data/config.toml - relative to the current working directory
  • Relative paths in [database] and [server] - relative to the directory containing data/config.toml, meaning ./data/
  • A local storage policy base_path created manually in the admin panel - relative to the current working directory. For long-running deployments, prefer an absolute path such as /data/uploads in Docker

In other words, the generated [server].temp_dir = ".tmp" resolves to data/.tmp at runtime. Storage policies do not live in config.toml, so their relative paths are not joined against the data/config.toml directory. First startup does not create a local storage policy automatically.

Default locations by deployment method:

  • Run locally: data/ under the project directory
  • systemd: WorkingDirectory/data/
  • Official Docker image: /data inside the container