Skip to main content

This version of GitHub Enterprise was discontinued on 2022-06-03. 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. For help with the upgrade, contact GitHub Enterprise support.

Configuring DNS nameservers

GitHub Enterprise Server uses the dynamic host configuration protocol (DHCP) for DNS settings when DHCP leases provide nameservers. If nameservers are not provided by a dynamic host configuration protocol (DHCP) lease, or if you need to use specific DNS settings, you can specify the nameservers manually.

The nameservers you specify must resolve your GitHub Enterprise Server instance's hostname.

Warning: Do not change the hostname for GitHub Enterprise Server after initial setup. Changing the hostname will cause unexpected behavior, up to and including instance outages.

Configuring nameservers using the virtual machine console

  1. Using your virtualization platform tools, open the virtual machine console. GitHub Enterprise console
  2. To start your network setup, press S.
  3. Configure nameservers for your instance.
  4. To finish configuring your settings, press D.

Configuring nameservers using the administrative shell

  1. SSH into your GitHub Enterprise Server instance. For more information, see "Accessing the administrative shell (SSH)."

    $ ssh -p 122 admin@HOSTNAME
  2. To edit your nameservers, enter:

    sudo vim /etc/resolvconf/resolv.conf.d/head

    Note: The 127.0.0.1 entry is required to be the first entry in the list. Do not remove the 127.0.0.1 entry, add another entry above the 127.0.0.1 entry, or use options that affect the ordering of entries, such as "options rotate".

  3. Append any nameserver entries, then save the file.

  4. After verifying your changes, save the file.

  5. To add your new nameserver entries to your GitHub Enterprise Server instance, run the following:

    sudo service resolvconf restart
    sudo service dnsmasq restart