|Docs

railway waf

Manage Under Attack Mode for a service.

Under Attack Mode requires an applied public domain. Add a Railway-provided or custom domain before you enable it.

Usage

railway waf under-attack <COMMAND> [OPTIONS]

Subcommands

SubcommandDescription
statusShow Under Attack Mode status
enableEnable Under Attack Mode
disableDisable Under Attack Mode

Options

FlagDescription
-s, --service <SERVICE>Service name or ID
-e, --environment <ENVIRONMENT>Environment to use
-p, --project <PROJECT_ID>Project ID to use
--jsonOutput in JSON format

Examples

Show Under Attack Mode status

railway waf under-attack status --service web

Shows whether Under Attack Mode is active for the selected service.

Enable Under Attack Mode

railway waf under-attack enable --service web

Enables Under Attack Mode until you turn it off.

Enable Under Attack Mode for a set duration

railway waf under-attack enable --service web --duration 1h

Enables Under Attack Mode for 1 hour.

Disable Under Attack Mode

railway waf under-attack disable --service web

Disables Under Attack Mode for the selected service.

Options for

Use railway waf under-attack enable with an optional duration.

FlagDescription
--duration <forever|1h|3h|12h|24h>How long Under Attack Mode stays active