Home Docs Deployment

Deployment

Docker, daemon mode, systemd, and production configuration

# Deployment Examples

Choose the deployment strategy that best fits your infrastructure. All examples assume you have already built or downloaded the soli-proxy binary.

# Multi-stage build for minimal image size
FROM rust:latest AS builder

WORKDIR /usr/src/soli-proxy
COPY . .

# Build with optional Lua scripting support
RUN cargo build --release
# Or with Lua 5.4 scripting:
# RUN cargo build --release

# --- Runtime stage ---
FROM debian:bookworm-slim

RUN apt-get update && apt-get install -y ca-certificates && \
    rm -rf /var/lib/apt/lists/*

COPY --from=builder /usr/src/soli-proxy/target/release/soli-proxy /usr/local/bin/
COPY config.toml /etc/soli-proxy/config.toml

EXPOSE 80 443 9090

ENTRYPOINT ["soli-proxy"]
CMD ["--config", "/etc/soli-proxy/config.toml"]

# Privileged Ports

Binding to ports 80 and 443 normally requires root. There are two recommended approaches to avoid running the proxy as root.

1 Linux Capabilities (setcap)

Grant the binary the specific capability to bind to privileged ports. This is the simplest approach for standalone deployments.

terminal
sudo setcap 'cap_net_bind_service=+ep' soli-proxy

2 systemd AmbientCapabilities

When running under systemd, the unit file can grant the capability at runtime. No need to modify the binary itself.

soli-proxy.service
[Service]
AmbientCapabilities=CAP_NET_BIND_SERVICE
NoNewPrivileges=true

# Dev Mode

Development mode streamlines local workflows with automatic .test domain aliases, stdout logging, and dev flags for app start scripts.

terminal
# Start Soli Proxy in development mode
./soli-proxy --dev

Dev Flag for Apps

Adds --dev flag to app start scripts, enabling framework-specific dev features like hot reload and debug logging.

.test Domain Aliases

Automatically registers .test domain aliases (e.g., app.example.test) for each configured app.

Stdout Logging

All logs go to stdout for easy viewing in your terminal. No log files to manage during development.

Use .test, Not .dev

Recommended: use the .test TLD for local development. The .dev TLD is owned by Google and forces HSTS in browsers.

# Project Roadmap

Current feature status and maturity. Soli Proxy ships with a comprehensive feature set; additional capabilities are available through Lua scripting.

Feature Status
HTTP/2 Proxy Stable
Automatic TLS Stable
Let's Encrypt (ACME) Stable
Prometheus Metrics Stable
Hot Config Reload Stable
App Hosting Stable
Blue-Green Deployment Stable
WebSocket Proxy Stable
Lua 5.4 Scripting Stable
Circuit Breaker Stable
Admin REST API Stable
Rate Limiting Via Lua
Authentication Via Lua