Skip to content

GitLab App

Custom gitlab.yml

GitLab is customized using GitLab's admin interface. Some options can ony be changed in gitlab.yml. For such situations, use the Web terminal's and create a file named /app/data/gitlab.yml. This way custom configurations will be preserved across updates and will also be backed up.

For example, to add GitHub login and Piwik analytics, add a /app/data/gitlab.yml like below and restart the application:

  <<: *base
    ## Piwik analytics.
    piwik_url: ''
    piwik_site_id: '7'

    # Allow login via Twitter, Google, etc. using OmniAuth providers
    enabled: true
    allow_single_sign_on: ["github"]
    block_auto_created_users: false
    external_providers: [ ]
      - { name: 'github',
          app_id: 'my_app_id',
          app_secret: 'my_app_secret',
          url: "",
          verify_ssl: true,
          args: { scope: 'user:email' } }

Disabling registration

By default, GitLab allows external people to sign up. This can be disabled to restrict use only to Cloudron users as follows:

GitLab > Admin area > Settings > Features > remove the check mark "Sign-up enabled"

GitLab Runner for CI

GitLab CI involves installing one or more GitLab Runners. These runners carry out tasks as instructed by the main GitLab installation. When installing a runner, you have to select the project tags to which the runner will respond and the type of tasks ("executor") it can carry out. For example, there is a Shell executor, Docker execuctor etc.

Once GitLab runner is installed, you have to add the runner in GitLab. When adding the runner in GitLab, you can decide how GitLab schedules tasks in the runner ie. if the runner is exclusive to a project ('Specific Runner') or shared between projects ('Shared Runner) or specific to a group ('Group Runner').

Cloudron's GitLab package can be used with GitLab Runner as follows.

  • First create a new server and install GitLab Runner on it following the instructions at GitLab docs. In short:
    # For ubuntu
    curl -L | sudo bash
    sudo apt-get install gitlab-runner
  • Get the token listed in GitLab under https://<>/admin/runners (under shared runners section).

  • Register the runner with the token from the above step

    root@localhost:~# sudo gitlab-runner register
    Running in system-mode.                            

    Please enter the gitlab-ci coordinator URL (e.g.
    Please enter the gitlab-ci token for this runner:
    Please enter the gitlab-ci description for this runner:
    [localhost]: Shell Jobs Runner
    Please enter the gitlab-ci tags for this runner (comma separated):

    Whether to lock the Runner to current project [true/false]:
    [true]: false
    Registering runner... succeeded                     runner=xzdZgdsX
    Please enter the executor: docker, docker-ssh, shell, ssh, virtualbox, docker-ssh+machine, parallels, docker+machine, kubernetes:
    Runner registered successfully. Feel free to start it, but if it's running already the config should be automatically reloaded! 
  • The Runner should now be listed under https://<>/admin/runners.

  • Now push a .gitlab-ci.yml to your project to start using the runner.

Reset Admin Password

To reset the admin password, run the following commands using the Web terminal:

    su - git  
    cd gitlab  
    bundle exec rails c production # (takes about 10 sec to bring up rails terminal)
    user = User.where(id: 1).first  
    user.password = 'NEW_PASS'  
    user.password_confirmation = 'NEW_PASS'