Installing GitHub Enterprise Server on AWS

To install GitHub Enterprise Server on Amazon Web Services (AWS), you must launch an Amazon Elastic Compute Cloud (EC2) instance and create and attach a separate Amazon Elastic Block Store (EBS) data volume.

In this article

Did this doc help you?

Prerequisites

This guide assumes you are familiar with the following AWS concepts:

Hardware considerations

Minimum requirements

We recommend different hardware configurations depending on the number of user licenses for your GitHub Enterprise Server instance. If you provision more resources than the minimum requirements, your instance will perform and scale better.

Minimum requirements for an instance with beta features enabled are bold in the following table. For more information, see "Beta features in GitHub Enterprise Server 2.22."

User licensesvCPUsMemoryAttached storageRoot storage
Trial, demo, or 10 light users2
or 4
16 GB
or 32 GB
100 GB
or 150 GB
200 GB
10 to 3,0004
or 8
32 GB
or 48 GB
250 GB
or 300 GB
200 GB
3,000 to 50008
or 12
64 GB500 GB200 GB
5,000 to 800012
or 16
96 GB750 GB200 GB
8,000 to 10,000+16
or 20
128 GB
or 160 GB
1000 GB200 GB

Beta features in GitHub Enterprise Server 2.22

If you enable beta features in GitHub Enterprise Server 2.22, your instance requires additional hardware resources. For more information about the beta features, see the release notes for the 2.22 series on the GitHub Enterprise website. For more information about adjusting resources for an existing instance, see "Increasing storage capacity" and "Increasing CPU or memory resources."

If you enable the beta for GitHub Actions on your instance, we recommend planning for additional capacity.

The additional CPU and memory resources you need to provision for your instance depend on the number of workflows your users run concurrently, and the overall levels of activity for users, automations, and integrations.

Maximum jobs per minutevCPUsMemory
Light testing430.5 GB
25861 GB
3516122 GB
10032244 GB

Storage

We recommend a high-performance SSD with high input/output operations per second (IOPS) and low latency for GitHub Enterprise Server. Workloads are I/O intensive. If you use a bare metal hypervisor, we recommend directly attaching the disk or using a disk from a storage area network (SAN).

Your instance requires a persistent data disk separate from the root disk. For more information, see "System overview."

If you enable the beta of GitHub Actions in GitHub Enterprise Server 2.22, you'll need to configure external blob storage. For more information, see "Enabling GitHub Actions and configuring storage."

You can resize your instance's root disk by building a new instance or using an existing instance. For more information, see "Increasing storage capacity."

CPU and memory

GitHub Enterprise Server requires more CPU and memory resources depending on levels of activity for users, automations, and integrations.

When you increase CPU resources, we recommend adding at least 6.5 GB of memory for each vCPU (up to 16 vCPUs) that you provision for the instance. When you use more than 16 vCPUs, you don't need to add 6.5 GB of memory for each vCPU, but you should monitor your instance to ensure it has enough memory.

Warning: We recommend that users configure webhook events to notify external systems of activity on GitHub Enterprise Server. Automated checks for changes, or polling, will negatively impact the performance and scalability of your instance. For more information, see "About webhooks."

You can increase your instance's CPU or memory resources. For more information, see "Increasing CPU or memory resources.

Determining the instance type

Before launching your GitHub Enterprise Server instance on AWS, you'll need to determine the type of virtual machine that best fits the needs of your organization.

Supported instance types

GitHub Enterprise Server is supported on the following EC2 instance types. For more information, see the AWS EC2 instance type overview page.

EC2 instance typeModel
C3c3.2xlarge, c3.4xlarge, c3.8xlarge
EC2 instance typeModel
C4c4.2xlarge, c4.4xlarge, c4.8xlarge
EC2 instance typeModel
C5c5.large, c5.xlarge, c5.2xlarge, c5.4xlarge, c5.9xlarge, c5.18xlarge
EC2 instance typeModel
M3m3.xlarge, m3.2xlarge
EC2 instance typeModel
M4m4.xlarge, m4.2xlarge, m4.4xlarge, m4.10xlarge, m4.16xlarge
EC2 instance typeModel
M5m5.large, m5.xlarge, m5.2xlarge, m5.4xlarge, m5.12xlarge, m5.24xlarge
EC2 instance typeModel
R4r4.large, r4.xlarge, r4.2xlarge, r4.4xlarge, r4.8xlarge, r4.16xlarge
EC2 instance typeModel
R5r5.large, r5.xlarge, r5.2xlarge, r5.4xlarge, r5.12xlarge, r5.24xlarge, r5n.large, r5n.xlarge, r5n.2xlarge, r5n.4xlarge, r5n.12xlarge, r5n.24xlarge, r5a.large, r5a.xlarge, r5a.2xlarge, r5a.4xlarge, r5a.12xlarge, r5a.24xlarge
EC2 instance typeModel
X1x1.16xlarge, x1.32xlarge

Based on your user license count, we recommend the following instance types.

User licensesRecommended type
Trial, demo, or 10 light usersr4.large
10 - 3000r4.xlarge
3000 - 5000r4.2xlarge
5000 - 8000r4.4xlarge
8000 - 10000+r4.8xlarge

Note: You can always scale up your CPU or memory by resizing your instance. However, because resizing your CPU or memory requires downtime for your users, we recommend over-provisioning resources to account for scale.

Selecting the GitHub Enterprise Server AMI

You can select an Amazon Machine Image (AMI) for GitHub Enterprise Server using the GitHub Enterprise Server portal or the AWS CLI.

AMIs for GitHub Enterprise Server are available in the AWS GovCloud (US-East and US-West) region. This allows US customers with specific regulatory requirements to run GitHub Enterprise Server in a federally compliant cloud environment. For more information on AWS's compliance with federal and other standards, see AWS's GovCloud (US) page and AWS's compliance page.

Using the GitHub Enterprise Server portal to select an AMI

  1. Navigate to the GitHub Enterprise Server download page.
  2. Click Get the latest release of GitHub Enterprise Server.
  3. In the Select your platform drop-down menu, click Amazon Web Services.
  4. In the Select your AWS region drop-down menu, choose your desired region.
  5. Take note of the AMI ID that is displayed.

Using the AWS CLI to select an AMI

  1. Using the AWS CLI, get a list of GitHub Enterprise Server images published by GitHub's AWS owner IDs (025577942450 for GovCloud, and 895557238572 for other regions). For more information, see "describe-images" in the AWS documentation.
    aws ec2 describe-images \
    --owners OWNER ID \
    --query 'sort_by(Images,&Name)[*].{Name:Name,ImageID:ImageId}' \
    --output=text
  2. Take note of the AMI ID for the latest GitHub Enterprise Server image.

Creating a security group

If you're setting up your AMI for the first time, you will need to create a security group and add a new security group rule for each port in the table below. For more information, see the AWS guide "Using Security Groups."

  1. Using the AWS CLI, create a new security group. For more information, see "create-security-group" in the AWS documentation.

    $ aws ec2 create-security-group --group-name SECURITY_GROUP_NAME --description "SECURITY GROUP DESCRIPTION"
  2. Take note of the security group ID (sg-xxxxxxxx) of your newly created security group.

  3. Create a security group rule for each of the ports in the table below. For more information, see "authorize-security-group-ingress" in the AWS documentation.

    $ aws ec2 authorize-security-group-ingress --group-id SECURITY_GROUP_ID --protocol PROTOCOL --port PORT_NUMBER --cidr SOURCE IP RANGE

    This table identifies what each port is used for.

    PortServiceDescription
    22SSHGit over SSH access. Clone, fetch, and push operations to public/private repositories supported.
    25SMTPSMTP with encryption (STARTTLS) support.
    80HTTPWeb application access. All requests are redirected to the HTTPS port when SSL is enabled.
    122SSHInstance shell access. The default SSH port (22) is dedicated to application git+ssh network traffic.
    161/UDPSNMPRequired for network monitoring protocol operation.
    443HTTPSWeb application and Git over HTTPS access.
    1194/UDPVPNSecure replication network tunnel in high availability configuration.
    8080HTTPPlain-text web based Management Console. Not required unless SSL is disabled manually.
    8443HTTPSSecure web based Management Console. Required for basic installation and configuration.
    9418GitSimple Git protocol port. Clone and fetch operations to public repositories only. Unencrypted network communication.

Creating the GitHub Enterprise Server instance

To create the instance, you'll need to launch an EC2 instance with your GitHub Enterprise Server AMI and attach an additional storage volume for your instance data. For more information, see "Hardware considerations."

Note: You can encrypt the data disk to gain an extra level of security and ensure that any data you write to your instance is protected. There is a slight performance impact when using encrypted disks. If you decide to encrypt your volume, we strongly recommend doing so before starting your instance for the first time. For more information, see the Amazon guide on EBS encryption.

Warning: If you decide to enable encryption after you've configured your instance, you will need to migrate your data to the encrypted volume, which will incur some downtime for your users.

Launching an EC2 instance

In the AWS CLI, launch an EC2 instance using your AMI and the security group you created. Attach a new block device to use as a storage volume for your instance data, and configure the size based on your user license count. For more information, see "run-instances" in the AWS documentation.

aws ec2 run-instances \
  --security-group-ids SECURITY_GROUP_ID \
  --instance-type INSTANCE_TYPE \
  --image-id AMI_ID \
  --block-device-mappings '[{"DeviceName":"/dev/xvdf","Ebs":{"VolumeSize":SIZE,"VolumeType":"TYPE"}}]' \
  --region REGION \
  --ebs-optimized

Allocating an Elastic IP and associating it with the instance

If this is a production instance, we strongly recommend allocating an Elastic IP (EIP) and associating it with the instance before proceeding to GitHub Enterprise Server configuration. Otherwise, the public IP address of the instance will not be retained after instance restarts. For more information, see "Allocating an Elastic IP Address" and "Associating an Elastic IP Address with a Running Instance" in the Amazon documentation.

Both primary and replica instances should be assigned separate EIPs in production High Availability configurations. For more information, see "Configuring GitHub Enterprise Server for High Availability."

Configuring the GitHub Enterprise Server instance

  1. Copy the virtual machine's public DNS name, and paste it into a web browser.
  2. At the prompt, upload your license file and set a management console password. For more information, see "Managing your GitHub Enterprise license."
  3. In the Management Console, configure and save your desired settings. For more information, see "Configuring the GitHub Enterprise Server appliance."
  4. The instance will restart automatically.
  5. Click Visit your instance.

Further reading

Did this doc help you?