GitKraken Self-Hosted runs on a Linux virtual machine (CentOS, Ubuntu, or RHEL7) inside Docker containers, so before we can boldy go where no Kraken has gone before, we’ll have to install Docker.

Jump to CentOS

Jump to Ubuntu

Jump to RedHat Enterprise Linux 7


Install Docker CE on CentOS

These instructions can also be found on Docker’s documentation site.

With internet access

1. Install required packages:

sudo yum install -y yum-utils device-mapper-persistent-data lvm2

2. Use the following command to set up the stable repository:

sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

3. Update the yum package index:

sudo yum makecache fast

4. Install the latest version of Docker:

sudo yum install docker-ce

5. Edit /etc/docker/daemon.json. If it does not yet exist, create it:

{
"storage-driver": "devicemapper"
}

6. Start Docker:

sudo systemctl start docker

7. Switch to root user:

sudo su

8. Download Docker Compose:

curl -L https://github.com/docker/compose/releases/download/1.14.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose

9. Apply executable permissions:

sudo chmod +x /usr/local/bin/docker-compose

10. Install GitKraken Self-Hosted – jump to Installation section.

Without internet access

1. Download Docker CE and Docker Compose packages from a machine with internet access.

2. Get the 3 files over to the host server where Docker will be installed.

3. Install Docker (change the path to where you copied the files, and the package names appropriately):

sudo yum install /path/to/docker-ce-selinux-package.rpm
sudo yum install /path/to/docker-ce-package.rpm

4. Copy and rename the Docker Compose file to /usr/local/bin/docker-compose:

sudo mv docker-compose-Linux-x86_64 /usr/local/bin/docker-compose

5. Change access permission for docker-compose:

chmod +x /usr/local/bin/docker-compose

6. Edit /etc/docker/daemon.json. If it does not yet exist, create it:

{
"storage-driver": "devicemapper"
}

7. Start Docker:

sudo systemctl start docker

8. Install GitKraken Self-Hosted – jump to Installation section.

Install Docker CE on Ubuntu

These instructions can also be found on Docker’s documentation site.

With internet access

1. Install packages to allow apt over HTTPS:

sudo apt-get install apt-transport-https ca-certificates curl software-properties-common

2. Add Docker’s GPG key:

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

You can verify the key with:

   sudo apt-key fingerprint 0EBFCD88

3. Set up the stable repository:

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu
$(lsb_release -cs) stable"

4. Update apt package index:

sudo apt-get update

5. Install Docker:

sudo apt-get install docker-ce

6. Switch to root user:

sudo su

7. Download Docker Compose:

curl -L https://github.com/docker/compose/releases/download/1.14.0/docker-compose-
`uname -s`-`uname -m` > /usr/local/bin/docker-compose

8. Apply executable permissions:

sudo chmod +x /usr/local/bin/docker-compose

9. Install GitKraken Self-Hosted – jump to Installation section.

Without internet access

1. Download Docker CE package from a machine with internet access.

2. Download Docker Compose package from a machine with internet access.

3. Get the 2 files over to the host server where Docker will be installed.

4. Install Docker (change the path to where you copied the files, and change the package names appropriately):

sudo dpkg -i /path/to/package.deb`
(e.g. `sudo dpkg -i docker-ce_17.06.0-ce-0-ubuntu_amd64.deb`)

5. Move Docker Compose file and rename it:

sudo mv docker-compose-Linux-x86_64 /usr/local/bin/docker-compose

6. Apply executable permissions:

sudo chmod +x /usr/local/bin/docker-compose

Install Docker CE on RHEL7

With internet access

1. Install required packages:

sudo yum install -y yum-utils device-mapper-persistent-data lvm2

2. Use the following command to set up the stable repository:

sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

3. Update the yum package index:

sudo yum makecache fast

4. Install the latest version of Docker:

sudo yum install --setopt=obsoletes=0 docker-ce-17.03.2.ce-1.el7.centos.x86_64 docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch

5. Edit /etc/docker/daemon.json. If it does not yet exist, create it:

{
"storage-driver": "devicemapper"
}

6. Start Docker:

sudo systemctl start docker

7. Switch to root user:

sudo su

8. Download Docker Compose:

curl -L https://github.com/docker/compose/releases/download/1.14.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose

9. Apply executable permissions:

sudo chmod +x /usr/local/bin/docker-compose

10. Install GitKraken Self-Hosted – jump to Installation section.

Without internet access

1. Download Docker CE and Docker Compose packages from a machine with internet access.

2. Get the 3 files over to the host server where Docker will be installed.

3. Install Docker (change the path to where you copied the files, and the package names appropriately):

sudo yum install /path/to/docker-ce-selinux-package.rpm
sudo yum install /path/to/docker-ce-package.rpm

4. Copy and rename the Docker Compose file to /usr/local/bin/docker-compose:

sudo mv docker-compose-Linux-x86_64 /usr/local/bin/docker-compose

5. Change access permission for docker-compose:

chmod +x /usr/local/bin/docker-compose

6. Edit /etc/docker/daemon.json. If it does not yet exist, create it:

{
"storage-driver": "devicemapper"
}

7. Start Docker:

sudo systemctl start docker

8. Install GitKraken Self-Hosted – jump to Installation section.

Install GitKraken Self-Hosted

1. Extract GitKrakenEnterpriseServer.zip in a folder of your choosing
(all commands in the following instructions will be performed in that folder).

2. Load the images into Docker:

sudo sh loadImages.sh

3. Configure what port GitKraken Self-Hosted should run on the host server.
By default GitKraken Self-Hosted server will run on port 3000.

You can change the port by opening up the docker-compose.yml file and making a few modifications.
First, find the ports section under gk-enterprise-controller:

    ports:
      "3000:3000"

Modify the first 3000 to the desired port
For example, to use port 80 change it to:

    ports:
      "80:3000"

Then update the GITKRAKEN_ENTERPRISE_URL environment variable to use the desired port. Again, for port 80 it would look like:

    environment:
        GITKRAKEN_ENTERPRISE_URL: http://localhost:80

Finally, find the GITKRAKEN_ENTERPRISE_URL environment variable in the gk-services section and modify the port. For port 80, this would look like:

    environment:
        GITKRAKEN_ENTERPRISE_URL: http://localhost:80

4. Configure where GitKraken client releases are stored on your host server.
By default the releases folder is set to ./gk-data/release. You can change the location by opening up
the docker-compose.yml file and finding the section under gk-enterprise-controller:

volumes:
 ./gk-data/release:/controller/release # The volume where GitKraken Self-Hosted clients go.

and modifying ./gk-data/release to point to another directory on your host server.

5. Create the folder specified in the above step on your host server.

6. Extract release.zip in the folder you created on your host server
(releases will always be extracted in this folder).

7. In the same folder containing the docker-compose.yml file, run the following command:

sudo docker-compose up

8. Navigate to http://localhost:3000 and complete the setup
(the port in the URL should match the port from step 3, if it was changed).