Available Backends
| Backend | Persistence | Multi-Instance | Use Case |
|---|---|---|---|
memory | No | No | Development/testing |
bbolt | Yes | No | Single-instance production |
valkey | Yes | Yes | Multi-instance deployments |
s3api | Yes | Yes | Cloud/serverless |
Memory Backend
In-memory hashmap storage. Data is lost on restart.Configuration
When to Use
β Use for:- Local development
- Testing
- Single-instance with low traffic
- Ephemeral environments
- Production with high traffic
- Multi-instance deployments
- When you need persistence across restarts
Limitations
- No size limits (memory grows unbounded)
- Data lost on process restart
- Cannot share state between instances
BoltDB Backend
Embedded key-value database using bbolt. Data persists to disk.Configuration
| Parameter | Type | Required | Description |
|---|---|---|---|
path | string | Yes | Filesystem path to database file |
When to Use
β Use for:- Single-instance production deployments
- High-traffic single-instance setups
- When persistent storage is required
- VPS/dedicated server deployments
- Multi-instance deployments (Kubernetes, etc.)
- Environments without persistent filesystem
- Multiple Anubis instances sharing a backend
File System Requirements
Anubis requires:- Write access to the directory containing the database file
- Exclusive lock on the database file (one process only)
Cleanup
BoltDB runs hourly cleanup to remove expired entries. No manual maintenance required.Docker Example
Valkey/Redis Backend
Remote key-value store using Valkey or Redis compatible servers.Configuration
Standalone
Cluster
Sentinel (High Availability)
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | Yes* | Redis connection URL |
cluster | bool | No | Enable cluster mode |
sentinel | object | No | Sentinel configuration (see below) |
url or sentinel must be provided.
Sentinel Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
masterName | string | Yes | Sentinel master name |
addr | string or list | Yes | Sentinel server addresses |
username | string | No | Auth username |
password | string | No | Auth password |
clientName | string | No | Client identifier |
When to Use
β Use for:- Multi-instance deployments
- Kubernetes/Docker Swarm
- High-availability requirements
- Shared state across instances
- Single-instance deployments (use bbolt instead)
- If you donβt already have Redis/Valkey
- Low-traffic sites (overhead not justified)
URL Format
Kubernetes Example
S3 API Backend
Object storage backend using S3-compatible APIs.Configuration
Environment Variables
S3 credentials are read from environment:Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
bucketName | string | Yes | S3 bucket name |
pathStyle | bool | No | Use path-style URLs (default: false) |
When to Use
β Use for:- Serverless deployments (AWS Lambda, Cloud Run)
- Multi-instance without managing Redis
- Cloud-native deployments
- When object storage is already available
- High-frequency traffic (S3 API calls are expensive)
- Latency-sensitive applications
- If you can use Redis/Valkey instead
Supported Providers
- AWS S3
- Cloudflare R2
- Minio
- Tigris
- Backblaze B2
- DigitalOcean Spaces
- Any S3-compatible service
Lifecycle Policy
Configure bucket lifecycle to auto-delete old objects:Example: Cloudflare R2
Storage Interface
All backends implement the same interface:Choosing a Backend
Decision Tree
Comparison
| Feature | memory | bbolt | valkey | s3api |
|---|---|---|---|---|
| Persistence | β | β | β | β |
| Multi-instance | β | β | β | β |
| Setup complexity | None | Low | Medium | Medium |
| Performance | Fastest | Fast | Fast | Slower |
| Operational overhead | None | Low | Medium | Low |
| Cost | Free | Free | $-$$ | $$-$$$ |
Key Generation Warning
When using persistent storage (bbolt, valkey, s3api), always configure a signing key to prevent challenge invalidation on restart:
Validation Errors
BoltDB
Valkey
S3 API
Next Steps
- Policy Configuration - Configure storage in policy files
- Security - Key generation for persistent storage
- Monitoring - Monitor storage backend health