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

systemd Deployment

systemd is suitable for long-running stable Linux servers. For this type of deployment, the most important thing is to decide the working directory first, then decide where the config file, database, upload directories, and temporary directories should live.

For production launch, do not expose aster_drive directly to the public internet. systemd only starts the process; HTTPS, domains, HSTS, upload limits, and WebDAV / WOPI passthrough should all be handled by the reverse proxy in front. The browser page baseline Content-Security-Policy is returned by AsterDrive, and the proxy layer should preserve that response header instead of overwriting it with an incompatible policy.

Terminal window
sudo useradd -r -s /usr/sbin/nologin asterdrive
sudo mkdir -p /var/lib/asterdrive
sudo chown -R asterdrive:asterdrive /var/lib/asterdrive

Put the aster_drive executable at a fixed path, for example:

Terminal window
sudo install -m 0755 ./aster_drive /usr/local/bin/aster_drive

Put config.toml into the data/ directory:

Terminal window
sudo mkdir -p /var/lib/asterdrive/data
sudo cp config.toml /var/lib/asterdrive/data/config.toml
sudo chown -R asterdrive:asterdrive /var/lib/asterdrive/data

If you continue using default relative paths, the working directory will usually contain:

  • data/config.toml
  • data/asterdrive.db
  • data/uploads
  • data/.tmp
  • data/.uploads

For long-term deployment, database paths, local storage paths, and temporary directories should preferably use absolute paths.

If you plan to run long term, do not only think about “how to start”; plan backup and restore at the same time. SQLite, local storage directories, avatar directories, and any custom local local storage roots should all be included in the same backup strategy. See Backup and Restore.

Create /etc/systemd/system/asterdrive.service:

[Unit]
Description=AsterDrive
After=network.target
[Service]
Type=simple
User=asterdrive
Group=asterdrive
WorkingDirectory=/var/lib/asterdrive
ExecStart=/usr/local/bin/aster_drive
Restart=on-failure
RestartSec=5
Environment=RUST_LOG=info
[Install]
WantedBy=multi-user.target

If you are still in an intranet HTTP test environment, you can temporarily set auth.bootstrap_insecure_cookies to true in config.toml. It only affects the Cookie HTTPS requirement during first initialization. After switching to HTTPS in production, change the corresponding admin setting back to enabled, then remove this static bootstrap option.

Terminal window
sudo systemctl daemon-reload
sudo systemctl enable --now asterdrive
sudo systemctl status asterdrive
Terminal window
journalctl -u asterdrive -f
  • /health returns 200.
  • /health/ready returns 200.
  • The home page response headers include the browser page baseline Content-Security-Policy returned by AsterDrive.
  • First startup logs show database updates and default policy initialization have completed.
  • The default policy group is visible in the admin panel.
  • Browser login works normally.
  • If WebDAV is enabled, the actual mount path matches [webdav].prefix.
  • If external Office / WOPI openers are enabled, at least one real Office file can be opened and saved.
  • If the database, upload directory, or temporary directories are placed on another disk, confirm paths and permissions are correct.
Environment=ASTER__DATABASE__URL=sqlite:///srv/asterdrive/asterdrive.db?mode=rwc
Environment=ASTER__SERVER__HOST=0.0.0.0
Environment=ASTER__AUTH__JWT_SECRET=replace-with-your-own-secret
Environment=ASTER__SERVER__START_MODE=follower
Environment=ASTER__SERVER__FOLLOWER__REMOTE_STORAGE_TARGET_LOCAL_ROOT=/srv/asterdrive/remote-storage-targets

If you also want the follower node to complete one-time enrollment during startup, temporarily add:

Environment=ASTER_BOOTSTRAP_REMOTE_MASTER_URL=https://drive.example.com
Environment=ASTER_BOOTSTRAP_REMOTE_ENROLLMENT_TOKEN=enr_replace_me

After confirming enrollment succeeded, remove these two ASTER_BOOTSTRAP_REMOTE_* values and keep only the long-term ASTER__... overrides required for runtime. See the full flow in Follower Nodes.

systemd only starts the service. If you need HTTPS, domains, WebDAV client access, or external Office / WOPI openers, add a reverse proxy in front. The proxy handles TLS, HSTS, upload limits, and long-connection passthrough while preserving the page CSP returned by AsterDrive. See Reverse Proxy Deployment.