Skip to content

Maintenance Mode

core

Close the site to visitors while admins keep working

Included in core

Core "Site closed" feature on the Website access page: non-admin visitors are redirected to a /maintenance LiveView page while admins and owners see the real site. A start/end window can be scheduled, the page shows a countdown, and connected users are redirected back automatically when maintenance ends.

Use it when

  • You are deploying or migrating and need to show visitors a maintenance page
  • You want to announce a scheduled maintenance window with a countdown

What it gives you

  • 302 redirect of non-admin users to a /maintenance LiveView page, with Retry-After when the end time is known
  • Scheduled start/end window in UTC
  • Countdown timer and PubSub auto-redirect when maintenance ends
  • Admins and owners bypass it
  • Configurable header and subtext; all admin actions logged to the activity feed

Maintenance Mode news

Nothing posted about Maintenance Mode yet. Read its changelog or see all PhoenixKit news.

Install

Included in phoenix_kit. Nothing extra to install.

New app
$ mix igniter.install phoenix_kit
Releases
  1. 3.4.0
  2. 3.3.0
  3. 3.0.0

Related modules

What it needs, what builds on it, and its neighbours in Core.