Skip to main content

This version of GitHub Enterprise Server was discontinued on 2023-09-25. No patch releases will be made, even for critical security issues. For better performance, improved security, and new features, upgrade to the latest version of GitHub Enterprise Server. For help with the upgrade, contact GitHub Enterprise support.

Enabling and scheduling maintenance mode

Some standard maintenance procedures, such as upgrading your GitHub Enterprise Server instance or restoring backups, require the instance to be taken offline for normal use.

About maintenance mode

Some types of operations require that you take your GitHub Enterprise Server instance offline and put it into maintenance mode:

  • Upgrading to a new version of GitHub Enterprise Server
  • Increasing CPU, memory, or storage resources allocated to the virtual machine
  • Migrating data from one virtual machine to another
  • Restoring data from a GitHub Enterprise Server Backup Utilities snapshot
  • Troubleshooting certain types of critical application issues

We recommend that you schedule a maintenance window for at least 30 minutes in the future to give users time to prepare. When a maintenance window is scheduled, all users will see a banner when accessing the site.

When the instance is in maintenance mode, all normal HTTP and Git access is refused. This includes web and API requests, for which the appliance responds with status code 503 (Service Unavailable). Git fetch, clone, and push operations are also rejected with an error message indicating that the site is temporarily unavailable. In high availability configurations, Git replication will be paused. GitHub Actions jobs will not be executed. Visiting the site in a browser results in a maintenance page.

You can perform initial validation of your maintenance operation by configuring an IP exception list to allow access to your GitHub Enterprise Server instance from only the IP addresses and ranges provided. Attempts to access your GitHub Enterprise Server instance from IP addresses not specified on the IP exception list will receive a response consistent with those sent when the instance is in maintenance mode.

Enabling maintenance mode immediately or scheduling a maintenance window for a later time

  1. From an administrative account on GitHub Enterprise Server, in the upper-right corner of any page, click .

  2. If you're not already on the "Site admin" page, in the upper-left corner, click Site admin.

  3. In the " Site admin" sidebar, click Management Console.

  4. In the top navigation bar, click Maintenance.

    Screenshot of the header of the Management Console. A tab, labeled "Maintenance", is highlighted with an orange outline.

  5. Under "Enable and schedule", decide whether to enable maintenance mode immediately or to schedule a maintenance window for a future time.

    • To enable maintenance mode immediately, select the dropdown menu and click now.
    • To schedule a maintenance window for a future time, select the dropdown menu and click a start time.
  6. When you're satisfied with the timing of the window, select the checkbox next to "Enable maintenance mode". If you selected "now", your instance will be put into maintenance mode immediately.

Validating changes in maintenance mode using the IP exception list

The IP exception list provides controlled and restricted access to your GitHub Enterprise Server instance, which is ideal for initial validation of server health following a maintenance operation. Once enabled, your GitHub Enterprise Server instance will be taken out of maintenance mode and available only to the configured IP addresses. The maintenance mode checkbox will be updated to reflect the change in state.

If you re-enable maintenance mode, the IP exception list will be disabled and your GitHub Enterprise Server instance will return to maintenance mode. If you just disable the IP exception list, your GitHub Enterprise Server instance will return to normal operation.

You can also use a command-line utility to configure the IP exception list. For more information, see "Command-line utilities" and "Accessing the administrative shell (SSH)."

  1. From an administrative account on GitHub Enterprise Server, in the upper-right corner of any page, click .

  2. If you're not already on the "Site admin" page, in the upper-left corner, click Site admin.

  3. In the " Site admin" sidebar, click Management Console.

  4. In the top navigation bar, click Maintenance, then confirm maintenance mode is already enabled.

    Screenshot of the header of the Management Console. A tab, labeled "Maintenance", is highlighted with an orange outline.

  5. Under "Enable and configure IP exception list", select Enable IP exception list.

  6. To the right of the checkbox for enabling the list, type a valid list of space-separated IP addresses or CIDR blocks that should be allowed to access your GitHub Enterprise Server instance.

  7. Click Save.

Scheduling maintenance mode with the GitHub Enterprise Server APIs

You can schedule maintenance for different times or dates with the GitHub Enterprise Server APIs. For more information, see "Management Console."