TLS-ALPN-01 requires direct TLS passthrough which doesn't work behind nginx ingress or other reverse proxies that terminate TLS. Force HTTP-01 challenge type for better compatibility. |
||
|---|---|---|
| debian | ||
| examples | ||
| migrations | ||
| src | ||
| static | ||
| templates | ||
| tests/docker | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| config.example.toml | ||
| docker-compose.test.yml | ||
| Dockerfile | ||
| Makefile | ||
| README.md | ||
Amity
A lightweight Open Cloud Mesh (OCM) file sharing server written in Rust, with WebDAV, SFTP, and federated sharing support.
Features
Core
- OCM Federation - Share files with users on other OCM-compatible servers (ownCloud, Nextcloud, etc.)
- WebDAV - Access files via any WebDAV client
- SFTP/SSH - Secure file transfer with SSH key or password authentication
- Web Interface - Upload, browse, share, and manage files from your browser
Storage Backends
- Filesystem - Local disk storage
- S3 - Amazon S3 or S3-compatible storage (MinIO, Garage, Wasabi, etc.)
- WebDAV - Remote WebDAV server as backend
- Multiple Backends - Configure multiple storage backends and assign users to different backends
- Storage Migration - Move files between backends with progress tracking
- SSE-C Encryption - Server-side encryption with customer-provided keys for S3 backends
Document Editing
- Collabora Online - Edit documents, spreadsheets, and presentations in the browser via WOPI integration
- Real-time Collaboration - Multiple users can edit documents simultaneously
Database Backends
- SQLite (development/small deployments)
- PostgreSQL (recommended for production)
- MySQL/MariaDB (production)
Security
- TLS with Let's Encrypt (ACME) or static certificates
- HTTP Signature verification for OCM requests
- SSE-C encryption at rest for S3 storage
- Secure session management
User Experience
- Light/Dark/System theme support
- Per-user storage backend selection
- Admin UI for all configuration
Quick Start
Docker Compose (Recommended)
See the examples directory for various deployment configurations:
| Example | Database | Storage | Collabora | Use Case |
|---|---|---|---|---|
| simple-local | SQLite | Filesystem | No | Personal use, testing |
| full-s3-mariadb | MariaDB | S3 (Garage) | Yes | Production |
| full-webdav-postgres | PostgreSQL | WebDAV | Yes | Existing WebDAV infra |
| ha-cluster | MariaDB Galera | Garage (3x) | Yes | High availability |
| kubernetes | MariaDB Galera | Garage (3x) | Yes | Cloud-native HA |
cd examples/simple-local
docker compose up -d
Access at http://localhost:8080. Check logs for the initial admin password.
Building from Source
Prerequisites
- Rust 1.75 or later
- OpenSSL development libraries
cargo build --release
The binary will be at target/release/amity.
Debian Package
dpkg-buildpackage -b -us -uc
sudo dpkg -i ../amity_*.deb
The package installs:
- Binary:
/usr/bin/amity - Config:
/etc/amity/config.example.toml - Data:
/var/lib/amity/ - Systemd service:
amity.service
Configuration
The config file (config.toml) contains only the database connection URL. All other settings are managed via the Admin UI and stored in the database.
sudo cp /etc/amity/config.example.toml /etc/amity/config.toml
sudo editor /etc/amity/config.toml
Example config.toml:
# SQLite (default)
database_url = "sqlite:///var/lib/amity/amity.db?mode=rwc"
# PostgreSQL
# database_url = "postgres://amity:password@localhost/amity"
# MySQL/MariaDB
# database_url = "mysql://amity:password@localhost/amity"
Running
amity serve
Or with systemd:
sudo systemctl enable amity
sudo systemctl start amity
On first run, a temporary admin password is logged to the console.
Storage Backends
Amity supports multiple storage backends that can be configured via Admin > Storage.
Filesystem
Store files on local disk:
Backend Type: Filesystem
Root Directory: /var/lib/amity/data/files
S3 / S3-Compatible
Store files in Amazon S3 or compatible services (Garage, MinIO, Wasabi):
Backend Type: S3
Bucket: my-bucket
Region: us-east-1
Endpoint: https://s3.amazonaws.com (or custom endpoint)
Access Key ID: AKIA...
Secret Access Key: ****
Path Style: Enable for most S3-compatible services
SSE-C Encryption
Enable server-side encryption with customer-provided keys:
- Check "Enable server-side encryption (SSE-C)"
- Either auto-generate a key or provide your own base64-encoded 256-bit key
- Important: If the key is lost, encrypted data cannot be recovered
SSE-C is supported by:
- AWS S3
- Garage
- MinIO (with
MINIO_SSE_CUSTOMER_ENABLED=on)
WebDAV
Use a remote WebDAV server as storage:
Backend Type: WebDAV
Endpoint: https://example.com/dav/
Username: (optional)
Password: (optional)
Per-User Storage
Assign specific users to different storage backends via Admin > Users > Edit User.
Storage Migration
Move files between backends via Admin > Storage > Migration:
- Select source and target backends
- Optionally limit to a single user
- Optionally delete source files after copy
- Monitor progress in real-time
Collabora Integration
Enable document editing with Collabora Online:
- Deploy Collabora CODE (see examples)
- In Admin > Settings, set:
- WOPI Enabled: Yes
- Collabora URL:
http://collabora:9980(internal) or public URL
Supported formats: .docx, .xlsx, .pptx, .odt, .ods, .odp, and more.
Client Access
WebDAV
Connect with any WebDAV client:
URL: https://yourdomain.com/dav/
Username: your-username
Password: your-password
SFTP
Connect via SFTP (default port 9022):
sftp -P 9022 user@yourdomain.com
Or with SSH key authentication.
Web Interface
Access at https://yourdomain.com/ to:
- Upload and download files
- Create folders
- Share files with federated users
- Edit documents (with Collabora)
- Manage shares and friends
OCM Federation
Share files with users on other OCM-compatible servers:
- Add Friends: Exchange invite strings with users on other servers
- Share Files: Right-click a file and select "Share", then choose a friend
- Access Shares: Shared files appear in "Remote Shares" section
Invite strings contain:
- Your username and server
- A cryptographic token for authentication
- Server capabilities
CLI Commands
# Start the server
amity serve
# Migrate from Python Amity
amity migrate
# Manage settings
amity config list
amity config get server.host
amity config set server.port 8080
Environment Variables
Override config file settings:
DATABASE_URL- Database connection stringAMITY_HOST- HTTP server bind addressAMITY_PORT- HTTP server port
Deployment
See examples/README.md for detailed deployment guides:
- Docker Compose - Single server to HA cluster
- Kubernetes - Cloud-native with Kustomize and SealedSecrets
- Bare Metal - Use
backend-onlyexample for database/storage, run Amity directly
Production Checklist
- Use PostgreSQL or MariaDB (not SQLite)
- Enable TLS (ACME or static certificates)
- Configure external URL correctly
- Set up backup for database and storage
- Use SSE-C encryption for sensitive data on S3
- Configure proper session cookie security
License
This project is licensed under the GNU Affero General Public License v3.0 only (AGPL-3.0-only).
See https://www.gnu.org/licenses/agpl-3.0.en.html for details.