sincecutoff.com
← all changes

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> --json
railway waf under-attack enable --service <SERVICE> --duration 1h --json
railway waf under-attack disable --service <SERVICE> --json

WHY 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

Check the installed version and the source before using it. Entry JSON

Report a problem with this card