Self-hosted cloud storage built with Rust and React.
Single-binary delivery, Alpine container support, storage policies, WebDAV, sharing, version history, trash, and three upload modes.
- Single binary delivery - frontend assets are embedded into the Rust server with
rust-embed - Multi-database - SQLite by default, with MySQL and PostgreSQL support through SeaORM
- Pluggable storage policies - local filesystem and S3-compatible object storage, with user-level and folder-level overrides
- Three upload modes -
direct,chunked, andpresigned, negotiated by policy and file size - Sharing - file and folder sharing with password, expiration time, download limits, public share page, and shared child-file download support
- WebDAV - dedicated WebDAV accounts, scoped root folder access, database-backed locks, and custom properties
- Lifecycle management - trash, version history, thumbnails, locks, periodic cleanup jobs, and runtime config management
- Admin console - manage users, storage policies, runtime settings, WebDAV accounts, and audit logs from the frontend panel
git clone https://github.com/AptS-1547/AsterDrive.git
cd AsterDrive
cd frontend-panel
bun install
bun run build
cd ..
cargo runOn first startup, AsterDrive will automatically:
- generate
config.tomlin the current working directory if it does not exist - create the default SQLite database when using the default database URL
- run all database migrations
- create the default local storage policy
- initialize built-in runtime configuration items
Default address:
http://127.0.0.1:3000
The first registered user becomes admin.
# Build image
docker build -t asterdrive .
# Run container
docker run -d \
--name asterdrive \
-p 3000:3000 \
-e ASTER__SERVER__HOST=0.0.0.0 \
-e "ASTER__DATABASE__URL=sqlite:///data/asterdrive.db?mode=rwc" \
-v asterdrive-data:/data \
asterdrive
# Or use Compose
docker compose up -dThe current container image is an Alpine runtime image. The recommended persistent volume is /data.
See docker-compose.yml and docs/deployment/docker.md for a complete deployment example.
- hierarchical folders
- file upload, download, rename, move, copy, delete
- inline search and batch operations
- thumbnails and file previews
- Monaco-based text editing with lock awareness
- blob deduplication with SHA-256 + reference counting
- local storage and S3-compatible storage policies
- user default policy + folder override
- streaming upload/download paths to avoid full-buffer transfers
- HttpOnly cookie auth and Bearer JWT support
- public share pages at
/s/:token - password-protected and expiring shares
- WebDAV accounts with independent passwords and root-folder restriction
- health endpoints:
/health,/health/ready - runtime config stored in
system_config - audit logs for key actions
- hourly cleanup tasks for uploads, trash, locks, and audit log retention
- Rust
1.91.1+ - Bun
- Node.js
24+for the current Docker frontend build stage
# Backend
cargo run
cargo check
cargo test
cargo test --test generate_openapi
# Frontend
cd frontend-panel
bun install
bun run dev
bun run build
bun run check- Type checking uses
tsgo, nottsc - Linting uses
biome, not ESLint - TypeScript
enumis not allowed; useas constobjects - Type-only imports must use
import type
Static configuration is loaded with this priority:
Environment variables > config.toml > built-in defaults
Examples:
ASTER__SERVER__HOST=0.0.0.0
ASTER__SERVER__PORT=3000
ASTER__DATABASE__URL="postgres://aster:secret@127.0.0.1:5432/asterdrive"
ASTER__WEBDAV__PREFIX="/webdav"Runtime configuration is stored in the database and can be updated from the admin API / admin panel.
src/ Rust backend
migration/ Sea-ORM migrations
frontend-panel/ React admin/file panel
docs/ Architecture, deployment, API, and user docs
tests/ Integration tests
MIT - Copyright (c) 2026 AptS-1547