Quick Start: Gerrit
Quick Start: Gerrit
Note (2026-08-14): Re-verified against current Gerrit
3.14.x. The image tag is now pinned (gerritcodereview/gerrit:3.14.2); the two-step flow (command: init, then daemon) still matches the current image entrypoint. The[index] type = LUCENE,[download] schema = http/ssh,[receive] enableSignedPush, LDAP keys (accountPattern/accountFullName/accountEmailAddress) andsmtpEncryption = SSLare all still valid settings in the 3.14 config docs. Note the current image runs asgerrit(uid 1000) by default and ships on ubuntu/almalinux bases — keepuser: roothere because the mounted/opt/gerrit/*volumes are root-owned. PlaintextsmtpPassis a placeholder; use a real credential or docker secret.
Prerequisite
OR
Note: If using HTTP, remove the
tls: {}in dynamic configuration.
Preparation
create some dirs and files
1 | sudo install -d /opt/gerrit; cd /opt/gerrit; sudo install -d etc git db index cache plugins |
vim /opt/gerrit/etc/gerrit.config
1 | [gerrit] |
vim /opt/gerrit/etc/secure.config
1 | [ldap] |
compose.yml
1 | services: |
gerrit.yml in dir dynamic-conf
You should touch
gerrit.ymlin traefik dir dynamic-conf.For much more information, please reference the Prerequisite.
1 | http: |
DNS Configuration
Configure your DNS or modify your hosts file:
- For Unix-like systems: Edit
/etc/hosts - For Windows: Edit
C:\Windows\System32\drivers\etc\hosts
Add the following line:
1 | 127.0.0.1 gerrit.x.internal |
Run
STEP-1: Run Gerrit docker init setup from docker
Uncomment the command: init option in compose.yml and run Gerrit with docker-compose in foreground.
1 | docker compose up gerrit |
Wait until you see in the output the message Initialized /var/gerrit and then the container will exit.
STEP-2: Start Gerrit in daemon mode
Comment out the command: init option in docker-compose.yaml and start all the docker-compose nodes:
1 | docker compose up -d |
Access: https://gerrit.x.internal