Powerful, enterprise-ready web server with automatic HTTPS. .
SafeLine
GPL-3.0 Docker Ready ★ 23,480 Stars Active · 2026-11-23Web application firewall / reverse proxy to protect your web apps from attacks and exploits. , Source Code.
- Category
- Web Servers
- Tech Stack / Runtime
- Docker · Go
- Open-Source License
- GPL-3.0
- GitHub Health
- ★ 23,480 · 1,634 forks
Quick Docker Compose Reference for SafeLine
networks:
safeline-ce:
name: safeline-ce
driver: bridge
ipam:
driver: default
config:
- gateway: ${SUBNET_PREFIX:?SUBNET_PREFIX required}.1
subnet: ${SUBNET_PREFIX}.0/24
driver_opts:
com.docker.network.bridge.name: safeline-ce
services:
postgres:
container_name: safeline-pg
restart: always
image: ${IMAGE_PREFIX}/safeline-postgres${ARCH_SUFFIX}:15.2
volumes:
- ${SAFELINE_DIR}/resources/postgres/data:/var/lib/postgresql/data
- /etc/localtime:/etc/localtime:ro
environment:
- POSTGRES_USER=safeline-ce
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:?postgres password required}
networks:
safeline-ce:
ipv4_address: ${SUBNET_PREFIX}.2
command: [postgres, -c, max_connections=600]
healthcheck:
test: pg_isready -U safeline-ce -d safeline-ce
mgt:
container_name: safeline-mgt
restart: always
image: ${IMAGE_PREFIX}/safeline-mgt${REGION}${ARCH_SUFFIX}${RELEASE}:${IMAGE_TAG:?image tag required}
volumes:
- /etc/localtime:/etc/localtime:ro
- ${SAFELINE_DIR}/resources/mgt:/app/data
- ${SAFELINE_DIR}/logs/nginx:/app/log/nginx:z
- ${SAFELINE_DIR}/resources/sock:/app/sock
- /var/run:/app/run
ports:
- ${MGT_PORT:-9443}:1443
healthcheck:
test: curl -k -f https://localhost:1443/api/open/health
environment:
- MGT_PG=postgres://safeline-ce:${POSTGRES_PASSWORD}@safeline-pg/safeline-ce?sslmode=disable
# Optional override for the control channel token that tcontrollerd has to
# present before it may subscribe. Leave it empty to use
# ${SAFELINE_DIR}/resources/sock/mgt_grpc_token, which this container
# creates and the tengine container reads.
- MGT_GRPC_TOKEN=${MGT_GRPC_TOKEN:-}
# Token required on GET /api/OTPUrl as X-Bootstrap-Token. Leave empty
# to let the process generate one into
# ${SAFELINE_DIR}/resources/sock/tfa_bootstrap_token (0600) and log the
# path. The console must send that value; until it does, bind with curl.
- MGT_BOOTSTRAP_TOKEN=${MGT_BOOTSTRAP_TOKEN:-}
# How long the account may be bound without a credential, measured from
# the moment the installation was set up (or from `mgt -reset_user
# admin`, which opens it again). Defaults to 30m; set it to 0 to leave
# the bootstrap open until the first login, which is what older releases
# did. A console that is bound after the window closed answers with an
# error that names the command to reopen it, and never rejects a pending
# secret that is already bound to the address that asks for it.
- MGT_BOOTSTRAP_WINDOW=${MGT_BOOTSTRAP_WINDOW:-}
depends_on:
- postgres
- fvm
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "5"
networks:
safeline-ce:
ipv4_address: ${SUBNET_PREFIX}.4
detect:
container_name: safeline-detector
restart: always
image: ${IMAGE_PREFIX}/safeline-detector${REGION}${ARCH_SUFFIX}${RELEASE}:${IMAGE_TAG}
volumes:
- ${SAFELINE_DIR}/resources/detector:/resources/detector
- ${SAFELINE_DIR}/logs/detector:/logs/detector
- /etc/localtime:/etc/localtime:ro
environment:
- LOG_DIR=/logs/detector
networks:
# ... (see full file in official GitHub repository) SafeLine System Requirements & Self-Hosting Guide
Deploy SafeLine (512 MB – 1 GB RAM) →Recommended VPS
512 MB – 1 GB RAM
1 vCPU · $4 – $6/mo VPS
Deployment Method
Beginner-Friendly
Docker / Docker Compose (Recommended)
Commercial Use (GPL-3.0)
Yes — free to self-host commercially for your team without per-seat fees.
Maintenance Status
Active
Last commit: 2026-11-23
Frequently Asked Questions about SafeLine
Is SafeLine free to self-host for commercial use?
SafeLine is released under the GPL-3.0 license. Yes — free to self-host commercially for your team without per-seat fees. It has 23,480 GitHub stars and was last updated on 2026-11-23.
What VPS specifications do I need to self-host SafeLine?
Based on its Docker runtime and Web Servers workload, we recommend at least 512 MB – 1 GB RAM and 1 vCPU (typically $4 – $6/mo VPS).
Does SafeLine support Docker deployment?
Yes — SafeLine supports Docker / Docker Compose (Recommended), making it beginner-friendly to spin up on any Linux VPS.
Deploy SafeLine on your own VPS
Run SafeLine privately with full data control. Recommended starting footprint: 512 MB – 1 GB RAM ($4 – $6/mo VPS).
Best Value · 1-Click Docker
1 vCPU · 4 GB RAM · 50 GB NVMe
Includes built-in Docker & Coolify templates — ideal for beginners.
Lowest Cost / Performance
2 vCPU · 4 GB RAM · 40 GB NVMe
Unbeatable EU/US cloud pricing for high-traffic self-hosted stacks.
$200 Free Credit
1 vCPU · 1 GB RAM · 25 GB SSD
Clean developer UX with 1-click Marketplace Docker droplets.
More Open-Source Web Servers
View all →HTTP reverse proxy and load balancer that makes deploying microservices easy. .
Docker container for managing Nginx proxy hosts with a simple, powerful interface. .
HTTP and reverse proxy server, mail proxy server, and generic TCP/UDP proxy server. .
Identity-aware tunneled reverse proxy with dashboard UI, access control, and WireGuard-based tunnels (alternative to Cloudflare Tunnel, Tailscale). ).
Next-gen Web Application Firewall (WAF) that will protect your web services. , Source Code, Clients).