Installation and Initialization
Overview
BotManager Fastly Agent is an edge-based bot detection and blocking solution that operates on the Fastly Compute platform.
Key Features:
- Real-time bot/macro detection and blocking
- Session-based user management
- Provides captcha/challenge pages
- Configuration-based bypass logic
What is Fastly Compute?
Fastly Compute is a serverless edge computing platform based on WebAssembly (WASM).
Features:
- Runs at edge locations worldwide
- Ultra-fast response time (sub-millisecond)
- Auto-scaling
- Developer-friendly environment
For more information about Fastly Compute, refer to Fastly Official Documentation.
This guide covers how to add BotManager Agent to an existing environment where Fastly Compute Service is already running.
Installation Methods
Follow these 4 steps in order to install BotManager Fastly Agent.
1. Configure Origins
Register BotManager detection server as an Origin.
-
Navigate to Origins tab of the Compute Services to install
-
Click Create a host
-
Enter the following information:
Field Value Description Name botmanager_serverOrigin name Address botmanager.stclab.comDetection server address Port 443HTTPS port Use SSL ✅ Check Use SSL Certificate hostname botmanager.stclab.comCertificate hostname
After configuring Origin, verify that it connects properly through connection test.
2. Upload Package
Upload BotManager Fastly Agent package.
-
Download BotManager Fastly Agent:
https://cdn-botmanager.stclab.com/agents/cdn/fastly/botmanager-fastly-agent.tar.gz -
Navigate to Package tab
-
Click Upload new package
-
Select the downloaded
botmanager-fastly-agent.tar.gzfile or upload via Drag and drop -
Confirm Upload success message
After package upload, check version information to verify that the correct version was uploaded.
3. Configure Config Stores
Store BotManager Agent configuration values in Config Store.
-
Navigate to Resources → Config stores
-
Click Create store
-
Enter Store name:
bm_config -
Click Add item and add the following configuration items
Select the domain below to accurately verify the domain to apply.
Required Configuration
The following configurations must be added:
| Key | Value | Description |
|---|---|---|
BM_TENANT_ID | {TENANT ID} | Customer identifier (check in BotManager console) |
BM_DOMAIN_NAME | {DOMAIN} | Target domain to apply (e.g., example.com) |
If required configuration is missing, Agent will not operate properly. Be sure to check.
Optional Configuration
The following configurations operate with default values and should only be changed when necessary:
| Key | Default Value | Description |
|---|---|---|
BM_SERVER_URL | https://botmanager.stclab.com/api/v1/macro | Detection server URL |
BM_PROTECTION_URL | https://cdn-botmanager.stclab.com | Block page URL |
BM_STATIC_BYPASS | true | Whether to bypass static resources |
BM_BYPASS | false | Whether to bypass all |
BM_SERVER_TIMEOUT | 1000 | Detection server timeout (ms) |
BM_LOGLEVEL | ERROR | Log level (WARN, INFO, DEBUG) |
BM_EXCLUDED_PATHS | /api,/health | Excluded paths (comma-separated) |
BM_EXCLUDED_QUERYS | user,password | Excluded queries (comma-separated) |
To exclude specific paths or query parameters from detection, use BM_EXCLUDED_PATHS and BM_EXCLUDED_QUERYS.
4. Service Activation
Activate the configured service and initialize cache.
-
Click Add version comment and enter deployment details
Example: "BotManager Agent v1.0.1 deployment" -
Click Activate in Service configuration tab
-
Click Purge all in Service summary tab to initialize cache
After Service activation, verify that Agent headers are properly added in actual requests.
Basic Operation Testing
After installation is complete, verify that Agent is operating properly.
Verify Agent Headers
Check Agent headers through browser developer tools.
-
Open Browser Developer Tools (F12)
-
Select Network tab
-
Access protected site
-
Check the following header in Response Headers:
x-bm-agent: BM-fastly-agent-x.x.x
If header is not visible in the first request, refresh the page or clear cache and try again.
Verify Session Cookies
Check session cookies created by Agent.
-
Select Application tab (Chrome) or Storage tab (Firefox)
-
Check the following cookie in Cookies section:
BM-session-id: [Generated session ID]
- Test via command line:
# Check headers using curl
curl -I https://your-domain.com
# Expected result:
# HTTP/2 200
# x-bm-agent: BM-fastly-agent-1.0.1
# set-cookie: BM-session-id=...
Session cookies are automatically created to track user sessions. They may not be created depending on browser cookie settings.
Troubleshooting
Guidance on problems that may occur during installation and operation and their solutions.
Agent Headers Not Visible
Symptom: x-bm-agent header not displayed in Response Headers
Possible Causes:
- Service not activated
- Package upload failure
- Configuration error
Solutions:
-
Check Service Status
- Check activation status in Service configuration tab
- If inactive, click Activate and retry
-
Re-upload Package
- Check latest version in Package tab
- Re-upload package if necessary
-
Re-verify Config Store Settings
- Check required configuration items (
BM_TENANT_ID,BM_DOMAIN_NAME) - Verify Store name is
bm_config
- Check required configuration items (
If Service is not activated, Agent will not operate. Be sure to check activation status.
Detection Server Connection Failure
Symptom: Following error message displayed in Response Headers
x-bm-error: Detection server timeout
Solutions:
-
Check Origins Configuration
- Verify Backend address is
botmanager.stclab.com - Verify SSL configuration is correct
- Verify Port is
443
- Verify Backend address is
-
Adjust Timeout Settings
- Increase
BM_SERVER_TIMEOUTvalue in Config Store - Default:
1000ms → Increase to2000ms or higher if necessary
- Increase
-
Check Network Connection Status
- Verify connectivity from Fastly to
botmanager.stclab.com
- Verify connectivity from Fastly to
In environments with network latency, it is recommended to appropriately increase the BM_SERVER_TIMEOUT value.
Config Store Access Error
Symptom: Following error message displayed in Response Headers
x-bm-error: Config initialization failed
Solutions:
-
Check Config Store Name
- Verify Store name is exactly
bm_config - Note case sensitivity
- Verify Store name is exactly
-
Check Required Configuration Items
- Verify both
BM_TENANT_IDandBM_DOMAIN_NAMEare set - Verify values are entered correctly
- Verify both
-
Check Service Connection
- Verify Config Store is properly connected to Service
- Check connection status in Resources tab
If Config Store access error occurs, Agent will not operate at all. This must be resolved.