The Simplest Way to Make Gerrit and Rocky Linux Work Like They Should
Running Gerrit and Rocky Linux together gives your team a stable code review server. This setup lets developers push changes to a secure host and run automated checks. Gerrit handles Git repos and code reviews for your engineering team. Rocky Linux provides the stable operating system that runs the review app and stores files. When you pair them well, code moves from local laptops to production with clear audit trails. When you rush the setup, permission errors and lost SSH keys slow down every
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
Running Gerrit and Rocky Linux together gives your team a stable code review server. This setup lets developers push changes to a secure host and run automated checks.
Gerrit handles Git repos and code reviews for your engineering team. Rocky Linux provides the stable operating system that runs the review app and stores files. When you pair them well, code moves from local laptops to production with clear audit trails. When you rush the setup, permission errors and lost SSH keys slow down every developer.
How Gerrit and Rocky Linux handle keys and data flow
Data moves between developers and the server through two main paths. Developers use a web browser to read code and leave comments. They use SSH or HTTPS to push and pull Git commits from the host. Both paths need clear rules on the host operating system and inside the review app.
Rocky Linux manages the base system users, disk permissions, and firewall rules. You should run the review app under its own dedicated system account. That system account owns the Git repo files on the local disk. No human user should log in directly as that system account.
Gerrit runs its own internal SSH daemon on a dedicated port. This daemon is separate from the base Rocky Linux SSH service used by system admins. Developers upload their public SSH keys to their review profiles. When a developer pushes a commit, the review app checks the key and maps it to a user role. Then the app writes the new commit objects to the Rocky Linux file system.
Common failure modes and how to scope roles
Many teams make mistakes when they set up service accounts and host access. The most common error is sharing one admin SSH key across the whole ops team. When five admins use the same root or service key on Rocky Linux, your logs break. You cannot tell who changed a repo file or restarted the service.
Another common risk comes from broad tokens for build bots. Teams often give continuous integration bots full admin rights in the review app. If a build server gets compromised, the attacker gains full control over every repo. Unlogged database queries to the review backend also create blind spots during security audits.
End-to-End Encryption + Linux Capabilities Management: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
You can fix these issues by scoping roles and network paths on both systems. First, separate host admin tasks from code review tasks. Keep the Rocky Linux host SSH port closed to the public internet. Only allow system admins to reach the host port from approved admin networks. Require individual user accounts on Rocky Linux with logged privilege elevation instead of shared keys.
Second, lock down the review app roles. Create specific groups for developers, reviewers, and build bots. Give build bots permission only to read open changes and post verification scores. Do not let bots merge code or bypass branch rules. Store the review database on a private network segment that only the app host can reach. Turn on mandatory Security-Enhanced Linux rules on Rocky Linux to confine the Java process to its own folder.
Keeping updates and backups safe across both systems
A review server holds your most valuable source code and review history. You must align Rocky Linux system updates with review app maintenance windows. Since the review app runs on Java, an unplanned Java package update on the host can break the service. Pin your Java runtime version in the package manager so routine security patches do not swap it out.
Backups also require coordination between the app and the operating system. Taking a raw disk snapshot while commits are writing can corrupt the Git repos and the search index. Schedule a brief quiet window or use a warm standby replica on a second Rocky Linux host. Back up both the Git repo directory and the metadata database at the same time so they stay in sync.
Add runtime guardrails and masking beside your databases and APIs
Login rules, role grants, and CI checks govern who connects to your stack. Yet any allowed script, engineer, or AI agent still runs commands with the full scope of its role. For workloads on Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes, SSH, or internal HTTP services, hoop.dev sits beside the service as an open-source proxy, a sidecar for your database or API.
Before a query runs, hoop.dev guardrails check the statement against your rules. An AI Analyzer you configure can score intent or hold risky calls for human review. Next, hoop.dev data masking rewrites sensitive fields in responses, and each verdict is logged per listener. Explore the MIT-licensed project on GitHub.
Frequently asked questions
Should I use the system SSH daemon or the built-in Gerrit SSH daemon?
Use the built-in SSH daemon for all Git pushes and code review tasks. Keep the Rocky Linux system SSH daemon on a separate port strictly for host admins.
How does SELinux on Rocky Linux affect the review server?
SELinux blocks unauthorized file reads and network ports by default. You should keep SELinux active and assign the correct file labels to your Git repo directory.
How should build bots log in to verify code changes?
Create a dedicated bot account with its own SSH key or HTTP token. Grant that account permission only to read target branches and post build labels.
Related guides
In this post