# How to install gitlab

> To install GitLab, download the repository files and the Enterprise Edition package on an internet-connected host. Check the directory files, copy the package to removable media, and transfer it to the offline environment. Finally, install required dependencies and complete the installation using the dpkg command.

Canonical: https://livedemo.ai/tutorials/how-to-install-gitlab/
Apps: GitLab
Updated: 2026-10-05
Interactive demo: https://story-api.livedemo.ai/workspaces/62255d3d3304f17b8f5e2d03/stories/692a4010ab56e05a00fe820b/preview?step=1

## Steps

1. On a host with internet access, download the necessary repository files by running the following command: curl --silent https:// packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.deb.sh | sudo bash.
2. Run the following command to download the GitLab Enterprise Edition package without installing it " sudo apt-get install --download-only gitlab-ee."
3. After downloading, check the files in the directory by running the ls command. This will display a list of files saved in the directory, including any temporary or unused files."
4. Now copy the downloaded GitLab package onto a USB drive or other removable media, then transfer it to the offline environment for installation. Run the command "sudo cp *.deb /mnt/usb"
5. Open your offline environment host and transfer the files you copied earlier.
6. Before installing GitLab, run the command sudo dpkg -i to install any required dependencies.
7. To complete the installation, run the following command: "sudo EXTERNAL_URL="http://<your-gitlab-url>" dpkg -i gitlab-ee_14.7.2-33.0_amd64.deb."
