DEV Community

Lulu
Lulu

Posted on

3 1 1 1 1

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!

Sentry blog image

How I fixed 20 seconds of lag for every user in just 20 minutes.

Our AI agent was running 10-20 seconds slower than it should, impacting both our own developers and our early adopters. See how I used Sentry Profiling to fix it in record time.

Read more

Top comments (0)

Billboard image

Try REST API Generation for Snowflake

DevOps for Private APIs. Automate the building, securing, and documenting of internal/private REST APIs with built-in enterprise security on bare-metal, VMs, or containers.

  • Auto-generated live APIs mapped from Snowflake database schema
  • Interactive Swagger API documentation
  • Scripting engine to customize your API
  • Built-in role-based access control

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay