docker run -d \
--name storage-server \
--restart unless-stopped \
-p 7100:7100 \
-v /var/lib/storage-data:/data \
-e MASTER_KEY=sk_live_master_secret_key \
devclouddesk/storage-server:latestThe DevCloudDesk Storage Server is distributed as a lightweight, multi-architecture Docker image (linux/amd64 and linux/arm64).
Follow this guide to get it up and running on your local machine or production server.
Step 1: Run with Docker#
Run the container using the command below. Make sure to replace sk_live_master_secret_key with your own secure key:
bashdocker run -d \ --name storage-server \ --restart unless-stopped \ -p 7100:7100 \ -v /var/lib/storage-data:/data \ -e MASTER_KEY=sk_live_master_secret_key \ devclouddesk/storage-server:latest
The storage server is now listening at http://localhost:7100.
Step 2: Verify the Server is Healthy#
Check that the server started successfully and can respond to HTTP requests:
bashcurl http://localhost:7100/health
Expected JSON response:
json{ "status": "healthy", "service": "devclouddesk-media-server", "version": "1.0.0", "uptime": 14, "storage": "local", "timestamp": "2026-10-27T12:00:00.000Z" }
Step 3: Production Docker Compose Setup#
For production servers, use docker-compose.yml to keep configurations declarative and manageable:
yamlversion: '3.8' services: storage-server: image: devclouddesk/storage-server:latest container_name: storage-server restart: unless-stopped ports: - '7100:7100' volumes: - /var/lib/dcd-storage:/data environment: - PORT=7100 - HOST=0.0.0.0 - DATA_DIR=/data - MASTER_KEY=sk_live_your_strong_secret_key - MAX_FILE_SIZE_MB=50 - CACHE_MAX_SIZE_GB=20 - DISK_FREE_THRESHOLD_PERCENT=15
Start the service in the background:
bashdocker compose up -d
Check real-time logs:
bashdocker compose logs -f storage-server
Environment Variables Reference#
| Variable | Type | Default | Description |
|---|---|---|---|
PORT | number | 7100 | HTTP port the server listens on inside the container. |
HOST | string | 0.0.0.0 | Bind IP address (0.0.0.0 allows external connections). |
DATA_DIR | string | /data | Path on disk where uploaded files, cache, and metadata are stored. |
MASTER_KEY | string | (Auto-generated) | Root administrator API key for administrative endpoints and CLI management. |
MAX_FILE_SIZE_MB | number | 50 | Maximum allowed size for a single file upload in megabytes. |
CACHE_MAX_SIZE_GB | number | 5 | Maximum disk size in GB allocated for transformed image variants. |
DISK_FREE_THRESHOLD_PERCENT | number | 15 | Minimum free disk space percentage required before uploads are rejected to prevent disk fill crashes. |
STORAGE_DRIVER | string | local | Storage driver to use: local or s3. |
Practical Production Tips#
[!TIP] Persistent Data Directory: Always mount a host volume (e.g.
/var/lib/dcd-storage:/data). All your original files, metadata, and API keys reside in/data. If you don't mount a volume, data will be lost when the container is recreated!
[!NOTE] Low-Disk Protection: If free disk space drops below
DISK_FREE_THRESHOLD_PERCENT(default 15%), the server automatically protects itself by rejecting new uploads with HTTP 507 Insufficient Storage while continuing to deliver cached files.
Next Steps#
- On-the-Fly Image Transformations →: Resize, crop, and convert image formats in real time.
- Signed Uploads →: Generate secure tokens for client-side browser uploads.
- Install Client SDK →: Connect your Node.js or Python backend to your new Storage Server.