DEV Community

Lulu
Lulu

Posted on

Securely Deploy SafeLine WAF: A Step-by-Step Guide

Protecting your web applications from malicious attacks is crucial. SafeLine WAF, developed by Chaitin Technology, is a robust and user-friendly Web Application Firewall designed to safeguard your site. This guide will walk you through a secure deployment of SafeLine WAF using Docker, ensuring your web applications are well-protected.

Step 1: Install Docker

First, you need to have Docker installed. Follow these steps to get the latest version of Docker:

curl -sSL "https://get.docker.com/" | bash
Enter fullscreen mode Exit fullscreen mode

Step 2: Create SafeLine Directory

Create a dedicated directory for SafeLine. This is where SafeLine will store its configuration files and data:

mkdir -p "/data/safeline"
Enter fullscreen mode Exit fullscreen mode

Step 3: Download Docker Compose Script

Next, download the latest Docker Compose configuration for SafeLine:

cd "/data/safeline"
wget "https://waf.chaitin.com/release/latest/compose.yaml"
Enter fullscreen mode Exit fullscreen mode

Step 4: Set Environment Variables

Configure the environment variables needed for SafeLine. Replace {postgres-password} with your actual PostgreSQL password:

 SAFELINE_DIR=/data/safeline
 IMAGE_TAG=latest
 MGT_PORT=9443
 POSTGRES_PASSWORD={postgres-password}
 SUBNET_PREFIX=172.22.222
 IMAGE_PREFIX=chaitin
Enter fullscreen mode Exit fullscreen mode

Step 5: Launch SafeLine

Finally, start SafeLine using Docker Compose:

docker compose up -d
Enter fullscreen mode Exit fullscreen mode

Step 6: Login to SafeLine
Open the backend administration page https://:9443 in your browser. Follow the interface prompts to log in:

Image description


Conclusion

By following these straightforward steps, you’ll have SafeLine WAF up and running, ready to protect your web applications from various threats. Docker simplifies the deployment process, allowing you to focus on ensuring your applications remain secure.

For more details or troubleshooting, refer to the SafeLine documentation.

Feel free to reach out on Discord if you have any questions or need further assistance!

Top comments (0)