railway waf under-attack commands manage service WAF mode
Introduced 2026-06-20 · score 0.98
HOW TO USE IT
When managing a service’s Under Attack Mode, check its state or enable or disable it. An applied public domain is required; use `--duration` when enabling timed mode.
railway waf under-attack status --service <SERVICE> --jsonrailway waf under-attack enable --service <SERVICE> --duration 1h --jsonrailway waf under-attack disable --service <SERVICE> --jsonWHY THIS HELPS
When managing a service’s Under Attack Mode from the CLI, check its status or enable or disable the mode.
REQUIREMENTS AND LIMITATIONS
- Version: v5.20.0
- --service, -s <SERVICE>: Targets a service by name or ID.
- --environment, -e <ENVIRONMENT>: Selects an environment by name or ID.
- --project, -p <PROJECT_ID>: Selects a project. The WAF-specific docs do not document this selector.
- --json: Outputs results in JSON format.
- --duration <DURATION>: Sets enable duration. WAF docs show `1h`; allowed values from the release note are `forever`, `1h`, `3h`, `12h`, `24h`.
- Prerequisite: An applied public domain is required; Under Attack Mode is service-scoped.
- A service must have an applied public domain before WAF settings can be managed. If no applied domain is available, status reports WAF as unavailable and explains that a public domain is required.
- Docs conflict: The opened Railway CLI documentation is on the current `main` branch and does not establish behavior specifically at v5.20.0. It shows the `1h` duration example but does not document the complete duration set in the release note.
FIRST-PARTY EVIDENCE
- https://github.com/railwayapp/cli/releases/tag/v5.20.0
- https://github.com/railwayapp/cli/pull/983
- https://github.com/railwayapp/railway-skills/blob/main/plugins/railway/skills/use-railway/references/configure.md
- https://docs.railway.com/cli/global-options
Check the installed version and the source before using it. Entry JSON