The Capsule server is the backend for the project. It accepts uploads, serves downloads, reports file status, and deletes files on request. Files are stored temporarily and cleaned up automatically.
- listens on
http://localhost:9001by default - stores file metadata in SQLite
- writes uploaded files under
uploads/ - exposes the HTTP API used by the Web UI, CLI, and Android app
- removes expired files in the background
Main API routes:
POST /uploadGET /download/:file_idGET /status/:file_idDELETE /delete/:file_idGET /ping
There are also HTML form routes used by the hosted Web UI.
cargo build --release
./target/release/capsule-serverFor local development:
cargo runThe server binary will start on port 9001.
- uploads are currently limited by the server body limit
- files expire automatically after roughly one hour
- request rate limiting is enabled
- client-side encryption is handled by clients, not by the server
Run the full test suite with:
cargo test -- --nocaptureSome tests expect the local server behavior and are written as integration-style checks rather than isolated unit tests.