• Get Review Board
  • What's New
  • Products
  • Review Board Code review, image review, and document review
  • Documentation
  • Release Notes
  • Power Pack Enterprise integrations, reports, and enhanced document review
  • Try for 60 Days
  • Purchase
  • RBCommons Review Board as a Service, hosted by us
  • Pricing
  • RBTools Command line tools and Python API for Review Board
  • Documentation
  • Release Notes
  • Review Bot Automated code review, connecting tools you already use
  • Documentation
  • Release Notes
  • RB Gateway Manage Git and Mercurial repositories in your network
  • Documentation
  • Release Notes
  • Learn and Explore
  • What is Code Review?
  • Documentation
  • Frequently Asked Questions
  • Support Options
  • Third-Party Integrations
  • Demo
  • Review Board RBTools Power Pack Review Bot Djblets RB Gateway
    1. RB Gateway 2.x
    2. Version 2.x
    3. Version 1.0
    4. Configuring Review Board Gateway
  • Home
  • Installing Review Board Gateway
  • Configuring Review Board Gateway
  • Running rb-gateway
  • General Index
  • Release Notes
  • Configuring Review Board Gateway¶

    rb-gateway is configured with two files: a configuration file and a password file.

    Configuration File¶

    The configuration file is a JSON file which defines the basic settings for the service, and includes an array listing each of the local repositories which rb-gateway should allow access to:

    {
        "htpasswdPath": "/etc/rb-gateway/htpasswd",
        "port": 8888,
        "tokenStorePath": "/var/lib/rb-gateway/tokens.dat",
        "webhookStorePath": "/etc/rb-gateway/webhooks.json",
        "repositories": [
            {"name": "repo1", "path": "/path/to/repo1.git", "scm": "git"},
            {"name": "repo2", "path": "/path/to/repo2.hg", "scm": "hg"}
        ]
    }
    

    Relative paths in the configuration file are resolved relative to the directory containing the configuration file.

    The available configuration keys are as follows:

    htpasswdPath (string)

    The path to the password file.

    Defaults to htpasswd.

    port (int)

    The port for rb-gateway to listen on.

    Defaults to 8888.

    repositories (array of object)

    The list of all repositories to host with rb-gateway. This key is required.

    Each repository in the configuration file is a JSON object with the following keys:

    name (string)

    The name to use for the repository. This is used for the configuration in the Review Board admin UI when linking the repository, and appears in API URLs.

    path (string)

    The path on disk to the local repository.

    scm (string)

    The type of repository. This can be either git or hg.

    sslCertificate (string)

    The path to the SSL public certificate to use when HTTPS is enabled.

    Required if useTLS is true.

    sslKey (string)

    The path to the SSL private key to use when HTTPS is enabled.

    Required if useTLS is true.

    tokenStorePath (string)

    The path to a file where rb-gateway will store authentication sessions. The directory for this file must exist and be writable.

    Defaults to tokens.dat.

    useTLS (boolean)

    Whether to use HTTPS for communication. This requires a valid certificate specified in the sslCertificate and sslKey config options.

    Defaults to false.

    webhookStorePath (string)

    The path to the WebHook configuration file.

    Defaults to webhooks.json.

    Password File¶

    The password file uses the htpasswd format to store authentication credentials. These credentials are used by the Review Board server to connect to the service. This file can be created or updated with Apache’s htpasswd tool or other widely-available third party tools.

    Passwords may be stored as bcrypt hashes (recommended) or in plain text. For example, to create a new htpasswd file with a bcrypt-hashed password:

    $ htpasswd -Bc /etc/rb-gateway/htpasswd myuser
    

    WebHooks File¶

    The WebHook configuration file is a JSON file containing a list of configurations for WebHooks which should be emitted when new code is pushed.

    The available configuration keys are as follows. All keys are required.

    enabled (boolean)

    Whether the WebHook is enabled.

    events (array of string)

    The set of events to notify on. This currently only supports "push".

    id (string)

    A unique ID for the WebHook.

    repos (array of string)

    The set of repositories to trigger this WebHook configuration for.

    secret (string)

    A secret to use for generating an HMAC-SHA1 signature for the payload.

    url (string)

    The URL to dispatch the WebHook to.

    Example¶

    [
        {
            "enabled": true,
            "events": ["push"],
            "id": "repo1-reviewboard",
            "repos": ["repo1"],
            "secret": "<secret from Review Board>",
            "url": "https://reviewboard.example.com/repos/1/rbgateway/hooks/close-submitted/"
        }
    ]
    

    Keep up with the latest Review Board releases, security updates, and helpful information.

    About
    News
    Demo
    RBCommons Hosting
    Integrations
    Happy Users
    Support Options
    Documentation
    FAQ
    User Manual
    RBTools
    Administration Guide
    Power Pack
    Release Notes
    Downloads
    Review Board
    RBTools
    Djblets
    Power Pack
    Package Store
    PGP Signatures
    Contributing
    Bug Tracker
    Submit Patches
    Development Setup
    Wiki
    Follow Us
    Mailing Lists
    Reddit
    Twitter
    Mastodon
    Facebook
    YouTube
    Copyright © 2006-2026 Beanbag, Inc. All rights reserved.
    Terms of Service — Privacy Policy — AI Ethics Policy — Branding

    On this page

    • [Top]
    • Configuration File
    • Password File
    • WebHooks File
      • Example