Maintenance mode

Maintenance mode returns HTTP 503 for all routes except framework assets at /__pionia/*. Visitors see a configurable message; API clients get a JSON envelope.

CLI

php pionia maintenance:on --message="Deploying" --retry-after=300 --bypass="$(openssl rand -hex 16)"
php pionia maintenance:off

Use a unique random bypass token each time. Do not copy example tokens from documentation into production.

Aliases: down / up.

Configuration

environment/settings.ini:

[maintenance]
ENABLED = true
MESSAGE = We will be back shortly.
RETRY_AFTER = 120
; Set MAINTENANCE_BYPASS in environment/.env — do not commit the real value
BYPASS =
# environment/.env (gitignored)
MAINTENANCE_BYPASS=your-generated-random-string

Map MAINTENANCE_BYPASS into settings in your provider, or set BYPASS locally only on machines that need it.

SettingPurpose
ENABLEDGate active when true
MESSAGEBody text / JSON message
RETRY_AFTERRetry-After header (seconds)
BYPASSQuery ?bypass=<token> or header X-Maintenance-Bypass: <token>

Or set MAINTENANCE_MODE=true in .env.

RoadRunner

Workers re-read settings.ini on each request — toggle maintenance without restarting RR.

What stays available

  • /__pionia/* — framework CSS, logos, welcome assets
  • Bypass URL/header when configured

Static files under /static/ and the API are blocked while maintenance is on.

Related: RoadRunner · CLI commands.