Skip to content

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
  1. Create a temporary directory:

    mkdir /tmp/gitflic
    
  2. Extract the downloaded archive to the created directory:

    unzip gitflic_*.zip -d /tmp/gitflic 
    
  3. Navigate to the created directory:

    cd /tmp/gitflic 
    
  4. Create directories for static files 1:

    for d in cicd repo img releases registry; do sudo mkdir -p "/var/gitflic/$d"; done;
    
  5. Create application directory 1:

    sudo mkdir -p /opt/gitflic/bin
    
  6. Create configuration directory 1:

    sudo mkdir -p /etc/gitflic
    
  7. Create log directory 1:

    sudo mkdir -p /var/log/gitflic
    
  8. 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
    
  9. 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
    
  10. 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
    
  11. 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 file

    sudo ssh-keygen -t ed25519 -N "" -q -f /opt/gitflic/cert/key.pem
    
  12. 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
    
  13. Create gitflic user to run the application:

    sudo useradd --no-create-home --system --shell /sbin/nologin gitflic
    
  14. Set ownership of created directories to gitflic user:

    sudo chown -R gitflic:gitflic /etc/gitflic /opt/gitflic /var/gitflic /var/log/gitflic
    

  1. These directories can be placed in any convenient location. In this case, you'll need to override the corresponding parameter in the application.properties file. 

  2. The configuration file must have .properties extension! The filename can be arbitrary.