Skip to content
AsterDrive
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 Synchronization

[config_sync]
backend = "disabled"
endpoint = ""
topic = "aster_drive.config_reload"

When an administrator changes a system setting, the instance handling the write updates its own runtime configuration immediately. Other instances do not automatically know that the database changed.

With configuration synchronization enabled, the writer publishes a reload notification through Redis pub/sub. Other instances receive the notification and reload the full runtime configuration from the authoritative database.

Admin API / config CLI
├─ write shared database
├─ update local process snapshot
└─ publish Redis reload notification
other AsterDrive instances
└─ reload fully from shared database

Redis does not store configuration values and does not replace the database. Keys in a notification are used for observability and derived-cache invalidation; receivers still load authoritative values from the database.

Single-host, NAS, and one-process deployments do not need Redis:

[config_sync]
backend = "disabled"
endpoint = ""
topic = "aster_drive.config_reload"

System settings and CLI writes continue to work when disabled; they simply do not emit cross-process notifications.

Every instance must:

  • connect to the same PostgreSQL, MySQL, or other shared authoritative database
  • connect to the same Redis service
  • use the same topic
  • enable [config_sync]
[config_sync]
backend = "redis"
endpoint = "redis://127.0.0.1:6379/"
topic = "aster_drive.config_reload"

If Redis requires authentication or TLS, use the standard Redis URL form in endpoint and restrict access to the configuration file.

OptionDefaultPurpose
backend"disabled"disabled or redis
endpoint""Redis URL, used only with backend = "redis"
topic"aster_drive.config_reload"Product reload topic; all instances in a group must match

Environment variables:

Terminal window
ASTER__CONFIG_SYNC__BACKEND=redis
ASTER__CONFIG_SYNC__ENDPOINT=redis://127.0.0.1:6379/
ASTER__CONFIG_SYNC__TOPIC=aster_drive.config_reload

Restart the process after changing [config_sync]. It is static startup configuration and is not changed dynamically through system settings.

These paths publish a reload notification after the database write succeeds:

  • system-setting updates and deletes through the admin console or API
  • aster_drive config set
  • aster_drive config delete
  • aster_drive config import

If one operation changes multiple dependent settings, one notification contains all changed keys. Startup migrations, default seeding, and startup configuration repairs do not publish notifications; each instance loads a full snapshot during startup.

[config_sync] and [cache] have different failure behavior:

  • when [cache].backend = "redis" cannot connect, cache can fall back to in-process memory
  • when the backend, endpoint URL, or another [config_sync].backend = "redis" value is invalid and the notification backend cannot be constructed, the instance fails to start
  • when the Redis URL is valid but the service is temporarily unreachable, the instance may finish startup, but the subscription worker records an error and stops, disabling cross-instance reloads
  • if an admin API or CLI database write succeeds but notification publishing then fails, the command returns an error; the local value is already stored, while other instances may remain stale until restart or a later successful notification

After a runtime Redis outage, restore Redis and restart each affected instance so the subscription worker reconnects and every process reloads the full snapshot from the database.

[cache] and [config_sync] may use the same Redis service or different services/URLs, but solve different problems:

  • [cache]: shared cache contents and TTLs
  • [config_sync]: tells other processes to reload database-backed configuration

If a multi-instance deployment configures Redis cache without configuration synchronization, cache state may be shared while system-setting changes still take effect immediately only on the instance that handled the write.

Start at least two instances connected to the same database and Redis, then:

  1. Change a non-restart system setting on instance A, such as the site title.
  2. Refresh the relevant page through instance B and confirm the change appears promptly.
  3. Confirm logs do not repeatedly report runtime config reload subscription stopped.
  4. Change a test custom configuration entry through the CLI and read it from another instance.
  5. Pause Redis and verify the warning and failure behavior; restore Redis, restart the instances, and confirm the next change synchronizes again.

Add Redis availability and topic consistency across instances to the production launch checklist.

Check:

  • every instance enables backend = "redis"
  • endpoint is reachable from inside each host or container
  • topic matches exactly
  • every instance connects to the same database
  • logs do not show subscription termination or Redis connection errors

Not recommended. Every instance serving reads, running background work, or reading runtime settings as a follower should use the same synchronization configuration.

No. It only synchronizes database-backed runtime system settings. Listen addresses, database URLs, node mode, logging, WebDAV prefix, cache, and config sync itself must still be deployed to each instance and require restart after changes.