GitFlic Application Installation
Download the latest GitFlic self-hosted version.
Installation via Debian Package
Run the installation script:
echo "deb [signed-by=/etc/apt/keyrings/gitflic.asc] https://registry.gitflic.ru/company/gitflic/package/-/deb main stable" | sudo tee -a /etc/apt/sources.list.d/gitflic.list
sudo curl https://registry.gitflic.ru/company/gitflic/package/-/deb/dists/main/public-key.asc -o /etc/apt/keyrings/gitflic.asc
sudo apt update && sudo apt install gitflic-server-onpremise -yq
- Download the
gitflic-server_enterprise_*.deb
package from your account -
Install the package:
sudo apt install ./gitflic-server_enterprise_*.deb -yq
-
Create certificate files and SSH server key:
sudo ssh-keygen -t ed25519 -N "" -q -f /opt/gitflic/cert/key.pem sudo openssl genpkey -algorithm RSA -out /opt/gitflic/cert/private_key.pem -pkeyopt rsa_keygen_bits:2048 sudo openssl rsa -pubout -in /opt/gitflic/cert/private_key.pem -out /opt/gitflic/cert/public_key.pem
-
Set ownership of created certificates to gitflic user:
sudo chown -R gitflic:gitflic /opt/gitflic/cert
Manual Installation
Info
For the application to work, you need to create working directories for:
- User images
- Git repositories
- Release files
- Package Registry files
- CI/CD artifacts
-
Create a temporary directory:
mkdir /tmp/gitflic
-
Extract the downloaded archive to the created directory:
unzip gitflic_*.zip -d /tmp/gitflic
-
Navigate to the created directory:
cd /tmp/gitflic
-
Create directories for static files 1:
for d in cicd repo img releases registry; do sudo mkdir -p "/var/gitflic/$d"; done;
-
Create application directory 1:
sudo mkdir -p /opt/gitflic/bin
-
Create configuration directory 1:
sudo mkdir -p /etc/gitflic
-
Create log directory 1:
sudo mkdir -p /var/log/gitflic
-
Copy gitflic.jar to the directory created in step 5:
Command should be executed from the directory where the application was extracted
sudo cp gitflic.jar /opt/gitflic/bin
-
Copy default configuration file to the directory created in step 6 2:
Command should be executed from the directory where the application was extracted
In versions below 3.0.0, the application.properties file is located in the default-config directory
sudo cp application.properties /etc/gitflic/application.properties
-
Create certificate directory:
This directory can be placed in any convenient location. In this case, you'll need to override the corresponding parameter in the application.properties file
sudo mkdir -p /opt/gitflic/cert
-
Create SSH server certificate and place it in the directory created in step 10:
Default certificate filename is
key.pem
. This parameter can be overridden in the application.properties filesudo ssh-keygen -t ed25519 -N "" -q -f /opt/gitflic/cert/key.pem
-
Create RSA key pair and place them in the directory created in step 10:
sudo openssl genpkey -algorithm RSA -out /opt/gitflic/cert/private_key.pem -pkeyopt rsa_keygen_bits:2048 sudo openssl rsa -pubout -in /opt/gitflic/cert/private_key.pem -out /opt/gitflic/cert/public_key.pem
-
Create gitflic user to run the application:
sudo useradd --no-create-home --system --shell /sbin/nologin gitflic
-
Set ownership of created directories to gitflic user:
sudo chown -R gitflic:gitflic /etc/gitflic /opt/gitflic /var/gitflic /var/log/gitflic