How to Safely Upgrade SafeLine WAF (With Backup Steps)

Table of contents
- π Step 1: Back Up Your SafeLine Data
- β‘ Step 2: Automatic Upgrade (Recommended)
- π‘οΈ Upgrade Guide for LTS Version (8.0)
- π οΈ Manual Upgrade Instructions
- 1. Check .env Configuration
- 2. Download Latest Docker Compose Script
- 3. Pull Latest Docker Image
- 4. Restart SafeLine Service
- β Final Step
- π€ Join the Community
Before upgrading SafeLine, please review the SafeLine Changelog.
Upgrading SafeLine will restart the service and cause a brief traffic interruption. Choose an appropriate time based on your business activity.
π Step 1: Back Up Your SafeLine Data
Upgrading usually includes data migration and cannot be undone. If you ever want to restore or downgrade, back up your SafeLine data first.
# Enter SafeLine directory
cd <safeline-directory>
# Stop SafeLine service
docker compose down
# Back up SafeLine data
cp -r <safeline-directory> <backup-path>
# Restart SafeLine service
docker compose up -d
β‘ Step 2: Automatic Upgrade (Recommended)
You do not need to stop SafeLine before this operation.
bash -c "$(curl -fsSLk https://waf.chaitin.com/release/latest/manager.sh)" -- --en
If the command runs successfully, the upgrade is complete.
π‘οΈ Upgrade Guide for LTS Version (8.0)
β οΈ Do NOT run this if youβre on version 8.1 or higher*, as downgrading will corrupt your data.*
To upgrade from versions earlier than 8.x to the 8.0 LTS version:
bash -c "$(curl -fsSLk https://waf-ce.chaitin.cn/release/latest/manager.sh)" -- --en --lts
π οΈ Manual Upgrade Instructions
1. Check .env
Configuration
cd <safeline-directory>
cat .env
Ensure your .env
file includes the following fields:
SAFELINE_DIR=******
IMAGE_TAG=******
MGT_PORT=******
POSTGRES_PASSWORD=******
SUBNET_PREFIX=******
IMAGE_PREFIX=******
ARCH_SUFFIX=******
RELEASE=******
REGION=-g
π¨ Missing fields may cause data corruption. Contact the developers via Discord if needed.
2. Download Latest Docker Compose Script
cd <safeline-directory>
wget "https://waf.chaitin.com/release/latest/compose.yaml"
3. Pull Latest Docker Image
cd <safeline-directory>
docker compose pull
4. Restart SafeLine Service
cd <safeline-directory>
docker compose down --remove-orphans && docker compose up -d
If the command completes without error, your upgrade was successful!
β Final Step
Visit the SafeLine Web Admin Console to confirm the new version is running properly.
π€ Join the Community
Interested in discussing bot protection strategies? Join the SafeLine WAF community:
π GitHub Repository
π Official Docs
π¬ Discord Community
Subscribe to my newsletter
Read articles from Sharon directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
