{"id":31121,"date":"2022-09-04T12:41:04","date_gmt":"2022-09-04T12:41:04","guid":{"rendered":"https:\/\/www.devopsschool.com\/blog\/?p=31121"},"modified":"2022-12-23T05:47:32","modified_gmt":"2022-12-23T05:47:32","slug":"gitlab-tutorials-gitlab-installation-environment-variables","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/gitlab-tutorials-gitlab-installation-environment-variables\/","title":{"rendered":"GitLab Tutorials: Gitlab Installation Environment variables"},"content":{"rendered":"\n<p>GitLab exposes certain environment variables which can be used to override their defaults values.<\/p>\n\n\n\n<p>People usually configure GitLab with&nbsp;<code>\/etc\/gitlab\/gitlab.rb<\/code>&nbsp;for Omnibus installations, or&nbsp;<code>gitlab.yml<\/code>&nbsp;for installations from source.<\/p>\n\n\n\n<p>You can use the following environment variables to override certain values:<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"supported-environment-variables\">Supported environment variables<a href=\"https:\/\/docs.gitlab.com\/ee\/administration\/environment_variables.html#supported-environment-variables\" target=\"_blank\" rel=\"noopener\"><\/a><\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Variable<\/th><th>Type<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td><code>DATABASE_URL<\/code><\/td><td>string<\/td><td>The database URL; is of the form:&nbsp;<code>postgresql:\/\/localhost\/blog_development<\/code>.<\/td><\/tr><tr><td><code>ENABLE_BOOTSNAP<\/code><\/td><td>string<\/td><td>Toggles&nbsp;<a href=\"https:\/\/github.com\/Shopify\/bootsnap\" target=\"_blank\" rel=\"noopener\">Bootsnap<\/a>&nbsp;for speeding up initial Rails boot. Enabled by default for non-production environments. Set to&nbsp;<code>0<\/code>&nbsp;to disable.<\/td><\/tr><tr><td><code>EXTERNAL_URL<\/code><\/td><td>string<\/td><td>Specify the external URL at the&nbsp;<a href=\"https:\/\/docs.gitlab.com\/omnibus\/settings\/configuration.html#specifying-the-external-url-at-the-time-of-installation\" target=\"_blank\" rel=\"noopener\">time of installation<\/a>.<\/td><\/tr><tr><td><code>EXTERNAL_VALIDATION_SERVICE_TIMEOUT<\/code><\/td><td>integer<\/td><td>Timeout, in seconds, for an&nbsp;<a href=\"https:\/\/docs.gitlab.com\/ee\/administration\/external_pipeline_validation.html\" target=\"_blank\" rel=\"noopener\">external CI\/CD pipeline validation service<\/a>. Default is&nbsp;<code>5<\/code>.<\/td><\/tr><tr><td><code>EXTERNAL_VALIDATION_SERVICE_URL<\/code><\/td><td>string<\/td><td>URL to an&nbsp;<a href=\"https:\/\/docs.gitlab.com\/ee\/administration\/external_pipeline_validation.html\" target=\"_blank\" rel=\"noopener\">external CI\/CD pipeline validation service<\/a>.<\/td><\/tr><tr><td><code>EXTERNAL_VALIDATION_SERVICE_TOKEN<\/code><\/td><td>string<\/td><td>The&nbsp;<code>X-Gitlab-Token<\/code>&nbsp;for authentication with an&nbsp;<a href=\"https:\/\/docs.gitlab.com\/ee\/administration\/external_pipeline_validation.html\" target=\"_blank\" rel=\"noopener\">external CI\/CD pipeline validation service<\/a>.<\/td><\/tr><tr><td><code>GITLAB_CDN_HOST<\/code><\/td><td>string<\/td><td>Sets the base URL for a CDN to serve static assets (for example,&nbsp;<code>https:\/\/mycdnsubdomain.fictional-cdn.com<\/code>).<\/td><\/tr><tr><td><code>GITLAB_EMAIL_DISPLAY_NAME<\/code><\/td><td>string<\/td><td>The name used in the&nbsp;<strong>From<\/strong>&nbsp;field in emails sent by GitLab.<\/td><\/tr><tr><td><code>GITLAB_EMAIL_FROM<\/code><\/td><td>string<\/td><td>The email address used in the&nbsp;<strong>From<\/strong>&nbsp;field in emails sent by GitLab.<\/td><\/tr><tr><td><code>GITLAB_EMAIL_REPLY_TO<\/code><\/td><td>string<\/td><td>The email address used in the&nbsp;<strong>Reply-To<\/strong>&nbsp;field in emails sent by GitLab.<\/td><\/tr><tr><td><code>GITLAB_EMAIL_SUBJECT_SUFFIX<\/code><\/td><td>string<\/td><td>The email subject suffix used in emails sent by GitLab.<\/td><\/tr><tr><td><code>GITLAB_HOST<\/code><\/td><td>string<\/td><td>The full URL of the GitLab server (including&nbsp;<code>http:\/\/<\/code>&nbsp;or&nbsp;<code>https:\/\/<\/code>).<\/td><\/tr><tr><td><code>GITLAB_MARKUP_TIMEOUT<\/code><\/td><td>string<\/td><td>Timeout, in seconds, for&nbsp;<code>rest2html<\/code>&nbsp;and&nbsp;<code>pod2html<\/code>&nbsp;commands executed by the&nbsp;<a href=\"https:\/\/gitlab.com\/gitlab-org\/gitlab-markup\/\" target=\"_blank\" rel=\"noopener\"><code>gitlab-markup<\/code>&nbsp;gem<\/a>. Default is&nbsp;<code>10<\/code>.<\/td><\/tr><tr><td><code>GITLAB_ROOT_PASSWORD<\/code><\/td><td>string<\/td><td>Sets the password for the&nbsp;<code>root<\/code>&nbsp;user on installation.<\/td><\/tr><tr><td><code>GITLAB_SHARED_RUNNERS_REGISTRATION_TOKEN<\/code><\/td><td>string<\/td><td>Sets the initial registration token used for runners.<\/td><\/tr><tr><td><code>RAILS_ENV<\/code><\/td><td>string<\/td><td>The Rails environment; can be one of&nbsp;<code>production<\/code>,&nbsp;<code>development<\/code>,&nbsp;<code>staging<\/code>, or&nbsp;<code>test<\/code>.<\/td><\/tr><tr><td><code>UNSTRUCTURED_RAILS_LOG<\/code><\/td><td>string<\/td><td>Enables the unstructured log in addition to JSON logs (defaults to&nbsp;<code>true<\/code>).<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"adding-more-variables\">Adding more variables<a href=\"https:\/\/docs.gitlab.com\/ee\/administration\/environment_variables.html#adding-more-variables\" target=\"_blank\" rel=\"noopener\"><\/a><\/h2>\n\n\n\n<p>We welcome merge requests to make more settings configurable by using variables. Make changes to the&nbsp;<code>config\/initializers\/1_settings.rb<\/code>&nbsp;file, and use the naming scheme&nbsp;<code>GITLAB_#{name in 1_settings.rb in upper case}<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>GitLab exposes certain environment variables which can be used to override their defaults values. People usually configure GitLab with&nbsp;\/etc\/gitlab\/gitlab.rb&nbsp;for Omnibus installations, or&nbsp;gitlab.yml&nbsp;for installations from source. You can use the following&#8230; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[2],"tags":[],"class_list":["post-31121","post","type-post","status-publish","format-standard","hentry","category-uncategorised"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/31121","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=31121"}],"version-history":[{"count":1,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/31121\/revisions"}],"predecessor-version":[{"id":31122,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/31121\/revisions\/31122"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=31121"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=31121"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=31121"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}