Creating a high availability replica
-
Set up a new GitHub Enterprise Server appliance on your desired platform. The replica appliance should mirror the primary appliance's CPU, RAM, and storage settings. We recommend that you install the replica appliance in an independent environment. The underlying hardware, software, and network components should be isolated from those of the primary appliance. If you are a using a cloud provider, use a separate region or zone. For more information, see "Setting up a GitHub Enterprise Server instance".
-
In a browser, navigate to the new replica appliance's IP address and upload your GitHub Enterprise license.
-
Set an admin password that matches the password on the primary appliance and continue.
-
Click Configure as Replica.

-
Under "Add new SSH key", type your SSH key.

-
Click Add key, then click Continue.
-
Connect to the replica appliance's IP address using SSH.
$ ssh -p 122 admin@REPLICA IP -
To generate a key pair for replication, use the
ghe-repl-setupcommand with the primary appliance's IP address and copy the public key that it returns.$ ghe-repl-setup PRIMARY IP -
To add the public key to the list of authorized keys on the primary appliance, browse to
https://PRIMARY-HOSTNAME/setup/settingsand add the key you copied from the replica to the list. -
To verify the connection to the primary and enable replica mode for the new replica, run
ghe-repl-setupagain.$ ghe-repl-setup PRIMARY IP -
To start replication of the datastores, use the
ghe-repl-startcommand.$ ghe-repl-startWarning:
ghe-repl-startcauses a brief outage on the primary server, during which users may see internal server errors. To provide a friendlier message, runghe-maintenance -son the primary node before runningghe-repl-starton the replica node to put the appliance in maintenance mode. Once replication starts, disable maintenance mode withghe-maintenance -u. -
To verify the status of each datastore's replication channel, use the
ghe-repl-statuscommand.$ ghe-repl-status
Creating geo-replication replicas
This example configuration uses a primary and two replicas, which are located in three different geographic regions. While the three nodes can be in different networks, all nodes are required to be reachable from all the other nodes. At the minimum, the required administrative ports should be open to all the other nodes. For more information about the port requirements, see "Network Ports."