Deployment Guide
Shortlinker supports multiple deployment methods, from simple local running to production containerized deployment.
Suggested Reading Order
- Docker Deployment Overview
- Docker Quick Start and Compose
- Reverse Proxy Overview
- Systemd Service Overview
For production operations details:
- Docker Operations and Security
- Reverse Proxy Performance and Monitoring
- Systemd Docker Compose and Operations
Deployment Options at a Glance
| Option | Best For | Recommendation |
|---|---|---|
| Docker | Most production environments | ⭐⭐⭐⭐⭐ |
| Prebuilt binary | Fast local validation / lightweight deploy | ⭐⭐⭐⭐ |
| Source build | Custom build features | ⭐⭐⭐ |
Prerequisites
- OS: Linux, macOS, Windows
- Architecture: x86_64, ARM64
- For source builds: Rust
>= 1.88.0(Edition 2024), Git
Deployment Architecture
User Request → Reverse Proxy → Shortlinker Service → Data Storage
↓ ↓ ↓ ↓
Browser Nginx Docker SQLite(default)
curl Caddy systemd MariaDB
API Apache Binary MySQL/PostgreSQLSecurity Recommendations
- Network Security: Expose service through reverse proxy
- File Permissions: Set appropriate data file permissions
- Process Management: Use system service managers
- Data Backup: Regular backup of link data (SQLite can directly backup .db files)
Performance Characteristics
- Response Time: < 1ms (SQLite local storage)
- Concurrency Support: Thousands of concurrent connections
- Memory Usage: Extremely low memory footprint
- Storage Format: SQLite database (default), supports MySQL, PostgreSQL, MariaDB
Next Steps
- 📦 Docker Deployment Overview
- ⚡ Docker Quick Start and Compose
- 🛠️ Docker Operations and Security
- 🔀 Reverse Proxy Overview
- 📈 Reverse Proxy Performance and Monitoring
- ⚙️ Systemd Service Overview
- 🔧 Systemd Docker Compose and Operations
Need configuration help? Check Configuration Guide for config.toml (startup config) and DB-backed runtime config.