You don't need to be a security engineer to deploy a WAF. If you can run docker compose up, you can have SafeLine protecting your applications in under 15 minutes.
What You'll Need
- A Linux server (Ubuntu 20.04+, Debian 11+, CentOS 7+)
- Docker 20.10.6+ and Docker Compose 2.0.0+
- 1 CPU core, 1 GB RAM, 5 GB free disk space
- A domain or public IP pointing to your server
Step 1: Install Docker
If Docker isn't already installed:
curl -fsSL https://get.docker.com | bash
Verify:
docker --version
docker compose version
Step 2: Install SafeLine
bash -c "$(curl -fsSLk https://waf.chaitin.com/release/latest/manager.sh)" -- --en
This single command handles everything — pulls the Docker images, creates the containers, sets up the network, configures PostgreSQL, and starts all services. It takes 2-3 minutes.
The containers that get created:
- Tengine — the reverse proxy (Nginx fork) that handles incoming traffic
- Detector — the semantic analysis engine that inspects requests
- PostgreSQL — stores configuration and attack logs
- Management — the web dashboard
Step 3: Access the Dashboard
Open https://<your-server-ip>:9443 in your browser. The first time, you'll be prompted to set up TOTP authentication — scan the QR code with any authenticator app.
Step 4: Add Your First Site
- In the dashboard, go to Sites -> Add Site
- Enter your domain name
- Set the backend address (e.g.,
localhost:3000if your app runs on the same server) - Choose the port — SafeLine defaults to 80/443, or set a custom port if you're chaining it behind another proxy
Protection starts immediately. No rule configuration required.
Step 5: Configure DNS
Point your domain's A record to your server's IP. Traffic flows through SafeLine and gets inspected before reaching your app.
Step 6: Verify Protection
Test with a simple SQL injection attempt:
curl "http://yourdomain.com/?id=1' OR '1'='1"
Open the SafeLine dashboard -> Attack Logs. You should see the blocked request.
Step 7: Basic Configuration
What to set up on day one:
- Rate limiting — Set per-IP request limits under Rules
- Geo-blocking — Block countries you don't serve under IP Groups
- Bot protection — Enable under Bot Management for login pages and forms
- SSL — Upload your certificate or enable Let's Encrypt auto-renewal
Keeping It Updated
docker compose -f /path/to/safeline/docker-compose.yml pull
docker compose -f /path/to/safeline/docker-compose.yml up -d
SafeLine releases updates every 2-3 weeks. Run these commands to stay current.
FAQ
Do I need to change my existing Nginx config?
If SafeLine is your primary reverse proxy — point Nginx to an internal port and let SafeLine handle 80/443. If you want Nginx in front — set SafeLine to a custom port and proxy to it.
Can I run it on a Raspberry Pi?
Yes, if it runs Docker. Resource requirements are low: a Pi 4 with 4 GB RAM easily handles SafeLine plus a few lightweight apps.
Will it conflict with Certbot or Let's Encrypt?
SafeLine and an external reverse proxy can both manage SSL. Just make sure only one service handles TLS per domain.
What if I break something?
Stop SafeLine (docker compose down), and traffic bypasses the WAF. Your app stays online. Fix the config, restart.
Related reads:
- SafeLine vs Cloudflare WAF: An Honest, Detailed Comparison — benchmarks, pricing, data privacy breakdown
- SafeLine WAF Behind Cloudflare and Nginx Proxy Manager — production stack tutorial with three-layer defense
What's the first app you'd put behind SafeLine?
Try SafeLine yourself: Live Demo | Website | Deploy Guide | Discord Community | More from CyberServal | LinkedIn
Top comments (0)