How to make GitLab docs available offline (similar to a mirror)

I work in a secure environment and can only access the internet on a different floor. Is there a way to make GitLab docs available offline (similar to a mirror)?

FWIW I already have the ability to have repos and images mirrored.

Thanks,
Ann

Hi @annmillikin

This is an interesting problem! I would suggest cloning the gitlab repo and building the docs locally.

1 Like

@snim2 Thanks for your response!

GitLab formally says that they do not have a way to make docs.GitLab available offline at this moment.

I cannot clone gitlab here at work but how do you build the docs locally after cloning?

This is a really good question! I’ve had a quick look around, and I think this might be what you’re looking for, but I’m not entirely sure!

1 Like

That looks promising! I will try to pass that onto our support team and let you know!

Unfortunately, there is no working offline solution to accessing docs.gitlab.com in an offline manner (aka not connected to the internet). This is documented here: Q4FY2022 KR: Determine how to improve/remedy the /help experience for GitLab users (#509) · Issues · GitLab.org / Technical Writing · GitLab

@snim2 we would essentially like a complete offline non internet connected mirror of gitlab docs to host in an on-premise self managed enterprise environment. Currently (that i can find) all of the gitlab/docs/*.md files that are available for offline usage contain thousands of embedded links to internet connected urls i.e.{ https://about.gitlab.com/docs/gitlabrunners/} vs { …/docs/gitlabrunners}. So while some of the documentation is available drilling down into links lead to dead ends. Is this something that gitlab has in their roadmap or other future plans for offering such documentation for self managed enterprise solutions?

Ah, I see what you mean. I’m not sure what the answer is, but maybe @dnsmichi knows?

1 Like

@snim2 Thanks for the tag.

@lindsayk

Self-managed Omnibus packages provide the documentation underneath /help - a public example is GNOME at https://gitlab.gnome.org/help. The documentation UX is not as exhaustive as docs.gitlab.com which provides a documentation platform with enhanced UX, search, and more integrations. It is built using nanorc as static site generator, and the code to build everything is located in GitLab.org / GitLab Docs · GitLab Maybe this can be a start for building it yourself in an offline environment (though I do not advise doing so, it is better to help move the upstream discussion forward)

For feature requests regarding offline documentation, please directly comment on the linked issue Improve the offline documentation experience for air-gapped instances (#214164) · Issues · GitLab.org / GitLab · GitLab and discuss with engineers and technical writers :slight_smile:

2 Likes

@dnsmichi Thank you for you input on the matter. we will definitely look into it.

If you have docker in your offline environment you could also potentially use our offline docs archives: Docs archives | GitLab | GitLab

docker run -it --rm -p 4000:4000 registry.gitlab.com/gitlab-org/gitlab-docs:14.x

Will serve up a copy of the docs at http://<local_IP>:4000.

To get the docker image into your offline environment you can follow the directions here: Offline environments | GitLab

2 Likes