Skip to content

Environment variables used by GotHub

You can set these in two ways:

  1. Create a .env file in the root directory of GotHub and set the variables there.

  2. Set the variables in your environment.

Instance configuration

GOTHUB_SETUP_COMPLETE

This variable is used by GotHub to check if you've completed setup or not. The GotHub setup wizard sets this to true for you. If it's empty, you will get a banner on GotHub's main page saying you haven't completed setup. Once you're done setting up GotHub, set this to true.

GOTHUB_PROXYING_ENABLED

If you don't want to proxy non-essential things (ie. avatars, repo archives, raw files) through your instance, set this to false.

GOTHUB_IP_LOGGED

If you log IPs on your instance, set this to true. Otherwise, set it to false.

GOTHUB_REQUEST_URL_LOGGED

If you log request URLs on your instance, set this to true. Otherwise, set it to false.

GOTHUB_USER_AGENT_LOGGED

If you log user agents on your instance, set this to true. Otherwise, set it to false.

GOTHUB_DIAGNOSTIC_INFO_LOGGED

If you log diagnostic info on your instance, set this to true. Otherwise, set it to false.

GOTHUB_INSTANCE_PRIVACY_POLICY

URL to your instance's privacy policy. Set to "" if you don't have one. For example: GOTHUB_INSTANCE_PRIVACY_POLICY=https://instance.dev/privacy-policy

GOTHUB_INSTANCE_COUNTRY

Country where your instance is hosted. For example: GOTHUB_INSTANCE_COUNTRY=Norway

GOTHUB_INSTANCE_PROVIDER

Name of your ISP/Hosting provider. For example: GOTHUB_INSTANCE_PROVIDER=Altibox

GOTHUB_INSTANCE_CLOUDFLARE

If you're using Cloudflare, set this to true. Otherwise, set it to false.

GotHub server configuration

GOTHUB_PORT

Port to run GotHub on. For example: GOTHUB_PORT=8080. This gets overwritten by the "--port" flag if you pass it to the "gothub serve" command. Set to 3000 by default, optional.

GOTHUB_USER_AGENT

User agent to use when making requests to GitHub. For example: GOTHUB_USER_AGENT=GotHub/1.0.0. Set to Chrome on Windows 10 by default, optional.