Initial commit
5 files changed
tree: ee0c74c5f97e515a2cdf0fc245a76e0338650e4c
  1. src/
  2. .gitignore
  3. BUILD

One-time redirect for Gerrit out-of-the-box experience

Plugin to provide an out-of-the-box redirect for a fresh Gerrit install


When preparing a native packaging of Gerrit Code Review, the initial “out of the box” experience is necessary.

At the very first access to Gerrit UX, the browser gets redirected to a pre-configured URL which typically points to an introduction page.

How to build

Create a symbolic link to the out-of-the-box repository from the Gerrit source code /plugins directory to the subdirectories of this project.

Then build the out-of-the-box plugin with the usual Gerrit plugin compile command.


$ git clone
$ git clone
$ cd gerrit/plugins
$ ln -s ../../out-of-the-box .
$ cd ..
$ bazel build plugins/out-of-the-box

How to install and configure

This plugin needs to be located in the Gerrit /lib directory and can be configured from the gerrit.config httpd directory as additional servlet filter in the httpd.filterClass setting.

The URL for the initial redirection URL is then configured in the http.firstTimeRedirectUrl setting.

Example gerrit.config:

  filterClass = com.googlesource.gerrit.plugins.manager.FirstTimeRedirect
  firstTimeRedirectUrl =

NOTE: The redirection happens only ONCE at the very first access to Gerrit UX. After that a flag file gets create under $GERRIT_SITE directory (.firstTimeRedirect) and the redirection filter will not be effective anymore.