- Documentation self-hosting options
- Redirect the
/helplinks to the new docs page
- Known issues
If you are not able to access the GitLab product documentation at
you can host the documentation yourself instead.
To host the GitLab product documentation, you can use:
- A Docker container
- GitLab Pages
- Your own web server
After you create a website by using one of these methods, you redirect the UI links in the product to point to your website.
The following examples use GitLab 14.5.
You can run the GitLab product documentation website in a Docker container:
- Expose port
4000. The Docker image uses this port for the web server.
On the server where you host GitLab, or on any other server that your GitLab instance can communicate with, pull the docs site:
docker run -it --rm -p 4000:4000 registry.gitlab.com/gitlab-org/gitlab-docs:14.5
If you host your GitLab instance using Docker compose, add the following to
version: '3.6' services: docs: image: registry.gitlab.com/gitlab-org/gitlab-docs:14.5 hostname: 'https://gitlab.example.com' ports: - '4000:4000'
You can use GitLab Pages to host the GitLab product documentation.
- Ensure the Pages site URL does not use a subfolder. Because of how the docs
main domain or subdomain. For example, URLs like
https://example.com/docs/are not supported.
To host the product documentation site with GitLab Pages:
- Create a blank project.
Create a new or edit your existing
.gitlab-ci.ymlfile, and add the following
pagesjob, while ensuring the version is the same as your GitLab installation:
image: registry.gitlab.com/gitlab-org/gitlab-docs:14.5 pages: script: - mkdir public - cp -a /usr/share/nginx/html/* public/ artifacts: paths: - public
Optional. Set the GitLab Pages domain name. Depending on the type of the GitLab Pages website, you have two options:
Type of website Default domain Custom domain Project website Not supported Supported User or group website Supported Supported
Because the product documentation site is static, from the container, you can take the contents
/usr/share/nginx/html and use your own web server to host
the docs wherever you want.
Run the following commands, replacing
<destination> with the directory where the
documentation files will be copied to:
docker create -it --name gitlab-docs registry.gitlab.com/gitlab-org/gitlab-docs:14.5 docker cp gitlab-docs:/usr/share/nginx/html <destination> docker rm -f gitlab-docs
After your local product documentation site is running, redirect the help links in the GitLab application to your local site.
Be sure to use the fully qualified domain name as the docs URL. For example, if you
used the Docker method, enter
You don’t need to append the version. GitLab detects it and appends it to documentation URL requests as needed. For example, if your GitLab version is 14.5:
- The GitLab Docs URL becomes
- The link in GitLab displays as
- When you select the link, you are redirected to
To test the setting, select a Learn more link within the GitLab application.
If you self-host the product documentation:
- The version dropdown displays additional versions that don’t exist. Selecting
these versions displays a
404 Not Foundpage.
- The search displays results from
docs.gitlab.comand not the local site.
- By default, the landing page redirects to the
respective version (for example,
/14.5/). This causes the landing page https://docs.gitlab.com to not be displayed.