Skip to content

Environment Variables

This page provides a comprehensive reference for all environment variables used to configure Terrateam Self-Hosted.

Required Variables

These environment variables are required for Terrateam Self-Hosted to function properly:

Database Configuration

VariableDescriptionExample
DB_HOSTDatabase host addresslocalhost, db.example.com
DB_NAMEDatabase nameterrateam
DB_USERDatabase usernameterrateam
DB_PASSDatabase passwordsecure_password_123
DB_PORTDatabase port5432

GitHub Application Settings

Required when using GitHub as your VCS provider:

VariableDescriptionExample
GITHUB_APP_IDGitHub application ID123456
GITHUB_APP_CLIENT_IDGitHub application client IDIv1.8ea942184ee41c0b
GITHUB_APP_CLIENT_SECRETGitHub application client secret8dab6d1de78a2cdbc9o014dubcf4a55ca44a3c81
GITHUB_APP_PEMGitHub application private key (PEM format)-----BEGIN RSA PRIVATE KEY-----\nMIIE...
GITHUB_WEBHOOK_SECRETGitHub webhook secret for security02d87878a0ac61d75d25cz8fec1d1af509f9a6d9

GitLab Application Settings

Required when using GitLab as your VCS provider:

VariableDescriptionExample
GITLAB_APP_IDGitLab application IDabc123def456
GITLAB_APP_SECRETGitLab application secretgloas-1234567890abcdef
GITLAB_ACCESS_TOKENGitLab personal access tokenglpat-xxxxxxxxxxxxxxxxxxxx

Server Configuration

VariableDescriptionExample
TERRAT_API_BASEPublic-facing API base URL (includes /api)https://terrateam.example.com/api
TERRAT_WEB_BASE_URLPublic-facing web base URLhttps://terrateam.example.com
TERRAT_UI_BASEPublic-facing UI base URL (required for UI)https://terrateam.example.com

Optional Variables

These environment variables provide additional configuration options:

GitHub Enterprise Server

For GitHub Enterprise Server deployments:

VariableDescriptionDefaultExample
GITHUB_API_BASE_URLGitHub API base URLhttps://api.github.comhttps://api.github.example.com
GITHUB_WEB_BASE_URLGitHub web base URLhttps://github.comhttps://github.example.com

GitLab Self-Hosted

For self-hosted GitLab instances:

VariableDescriptionDefaultExample
GITLAB_API_BASE_URLGitLab API base URLhttps://gitlab.com/apihttps://gitlab.example.com/api
GITLAB_WEB_BASE_URLGitLab web base URLhttps://gitlab.comhttps://gitlab.example.com

Proxy Configuration

For environments requiring HTTP proxies:

VariableDescriptionExample
HTTP_PROXYURL for HTTP proxyhttps://proxy.local:8080
HTTPS_PROXYURL for HTTPS proxyhttps://proxy.local:8080
NO_PROXYComma-separated list of hosts to bypass proxylocalhost,127.0.0.1,internal.com

Proxy Authentication

For proxies requiring authentication, include credentials in the URL:

Terminal window
HTTP_PROXY=https://username:password@proxy.local:8080
HTTPS_PROXY=https://username:password@proxy.local:8080

For troubleshooting configuration issues, see the Troubleshooting Guide.