Restic REST Server
Restic REST server for backup repository hosting.
Overview
Restic REST Server is a lightweight HTTP server that provides a REST API backend for the Restic backup program. Restic itself is a modern, fast, and secure backup tool that offers client-side encryption, deduplication, and support for multiple storage backends. The REST server component allows you to create a centralized backup repository that Restic clients can connect to over HTTP/HTTPS, making it ideal for network-based backup scenarios where you want to consolidate backups from multiple machines to a single location.
This deployment runs a single rest-server container that exposes the Restic REST API on port 8000. The server is configured with Prometheus metrics enabled and authentication disabled by default, making it suitable for development and testing environments. The backup data is stored in a dedicated Docker volume that persists across container restarts, ensuring your backup repositories remain intact even when updating or restarting the server.
This setup is perfect for homelab administrators, small businesses, and development teams who need a simple, centralized backup solution without the complexity of cloud storage integration. The REST server approach provides a middle ground between local-only backups and cloud-based solutions, offering network accessibility while maintaining full control over your backup infrastructure and storage location.
Key Features
- HTTP REST API for Restic backup clients with standardized endpoints
- Built-in deduplication support for efficient storage utilization
- Client-side encryption ensuring backup data remains secure in transit and at rest
- Prometheus metrics endpoint for monitoring backup operations and server health
- Configurable authentication and access control for production deployments
- Append-only mode support to protect against ransomware and accidental deletion
- Cross-platform compatibility with Restic clients on Windows, macOS, and Linux
- Lightweight design with minimal resource requirements and fast startup times
Common Use Cases
- 1Centralized backup repository for multiple development workstations and servers
- 2Homelab backup solution replacing external cloud storage dependencies
- 3Small business backup infrastructure with local network storage control
- 4CI/CD pipeline integration for automated build artifact and database backups
- 5Remote office backup consolidation before syncing to primary data center
- 6Development environment backup testing before deploying to production storage
- 7Backup staging area for data verification before long-term archival storage
Prerequisites
- Docker and Docker Compose installed with minimum 1GB available RAM
- Port 8000 available on the host system for REST API access
- Basic understanding of Restic backup client configuration and repository concepts
- Network connectivity between Restic clients and the REST server host
- Sufficient disk space for backup data storage based on retention requirements
- Knowledge of backup authentication and security practices for production use
For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms
docker-compose.yml
docker-compose.yml
1services: 2 rest-server: 3 image: restic/rest-server:latest4 container_name: restic-rest-server5 restart: unless-stopped6 ports: 7 - "${REST_PORT:-8000}:8000"8 environment: 9 - OPTIONS=--prometheus --no-auth10 volumes: 11 - restic_data:/data12 networks: 13 - restic-network1415volumes: 16 restic_data: 1718networks: 19 restic-network: 20 driver: bridge.env Template
.env
1# Restic REST Server2REST_PORT=8000Usage Notes
- 1REST server at http://localhost:8000
- 2Use with restic client
- 3Enable auth for production
- 4Prometheus metrics available
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 rest-server:5 image: restic/rest-server:latest6 container_name: restic-rest-server7 restart: unless-stopped8 ports:9 - "${REST_PORT:-8000}:8000"10 environment:11 - OPTIONS=--prometheus --no-auth12 volumes:13 - restic_data:/data14 networks:15 - restic-network1617volumes:18 restic_data:1920networks:21 restic-network:22 driver: bridge23EOF2425# 2. Create the .env file26cat > .env << 'EOF'27# Restic REST Server28REST_PORT=800029EOF3031# 3. Start the services32docker compose up -d3334# 4. View logs35docker compose logs -fOne-Liner
Run this command to download and set up the recipe in one step:
terminal
1curl -fsSL https://docker.recipes/api/recipes/restic-rest-server/run | bashTroubleshooting
- Connection refused on port 8000: Verify REST_PORT environment variable matches your firewall rules and client configuration
- Permission denied accessing /data directory: Check Docker volume permissions and ensure the container has write access to the mount point
- Repository not found errors from Restic clients: Initialize the repository first using 'restic init' command pointing to the REST server URL
- High memory usage during backup operations: Increase available RAM or adjust Restic client concurrency settings to reduce parallel operations
- Prometheus metrics not accessible: Verify OPTIONS environment variable includes --prometheus flag and metrics endpoint is available at /metrics
- Authentication errors in production: Remove --no-auth from OPTIONS and configure proper HTTP authentication or reverse proxy with SSL termination
Community Notes
Loading...
Loading notes...
Download Recipe Kit
Get all files in a ready-to-deploy package
Includes docker-compose.yml, .env template, README, and license
Components
restic-rest-server
Tags
#restic#backup#rest#deduplication#repository
Category
Storage & BackupAd Space
Shortcuts: C CopyF FavoriteD Download