close
|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

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

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

Enable Under Attack Mode

Enables Under Attack Mode until you turn it off.

Enable Under Attack Mode for a set duration

Enables Under Attack Mode for 1 hour.

Disable Under Attack Mode

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