Setting up the Broker Server

To enable communication between IntelliJ IDEA and remote Jrebel agents, create the YAML configuration file and add the license file to JRebel Broker.

Create the YAML configuration file

  1. Create a new config.yml file.

  2. Update the file as required. All options are explained below.

config:                 # Server configuration
  connector:            # Defines network interface and protocol for connecting clients
    https               # HTTPS settings (if both http and https are set, https takes priority)
      port:             # HTTPS port (example: 443).
      certificate-file: # PEM format certificate path (example: localhost.crt).
      key-file:         # PEM private key file (example: localhost.key).
      bind:             # (Optional) IP to bind (default: 0.0.0.0).
    http                # HTTP settings (if both http and https are set, https takes priority)
      port:
      bind:
    url                 # Broker public URL (example: https://localhost). Used for self-referential links in web UIs, especially with reverse proxies.
  admin-ui:             # Admin web interface configuration
    http
      port:             # Admin UI port (default: 8000).
      bind:             # Admin UI IP (default: 127.0.0.1).
    url                 # Web access URL (example: http://localhost:8081). By default, uses protocol, host, and port from admin-ui.http.
    token               # Required for authentication (username: admin, password: token value). For REST API, use as Bearer token (authorization: Bearer secret).
  zone:
    public:             # If true, enables access to zones without authentication (use with caution to avoid exposing your service)
    dynamic:            # If true, automatically creates missing zones on first connect (only respected when public is also true)
  log:
    file:               # Log file path (example: <file_path>/tmp/broker.log)

zones:                  # JVM zones configuration. Defines runtime zones and tokens the broker will manage.
  <zone_name>:          # Each entry is a zone name (example: dev, staging)
    token:              # A token or list of tokens for authenticating JVM connections. Use this auth token when setting the JRebel Agent (Drebel.broker.token).
  default:              # Special designation for the default zone (you can omit the token)

acls:                   # IDE Access Control lists (ACLs) configuration. Controls which IDEs can access which zones.
  <acl_rule>            # Each entry is an ACL rule (example: ide-acl-1)
    token:              # Secret token the IDE must use when adding broker to IDE (auth token)
    zone:               # A zone name or list of zone names this ACL grants access to (example: [dev, staging] or staging)

  1. Save the file to the same directory as jrebel-broker.jar, or save it in another directory and specify its path by using the -Dbroker.config JVM option.

For reference, a sample config.yml file is shown below.

config:
  connector:                   # Public HTTP endpoint
    url: http://localhost:7000 # Public HTTP endpoint URL embedded in web content
    http:
      port: 7000
  admin-ui:                    # Admin API
    http:
      port: 8000
    url: http://localhost:8000 # Admin API URL embedded in web content
    token: secret
  zone:
    dynamic: false
    public: false

zones:
  dev:
    token: dev-token           # Use this auth token when setting the JRebel Agent (Drebel.broker.token)
  staging:
    token: staging-token       # Use this auth token when setting the JRebel Agent (Drebel.broker.token)

acls:
  ide-acl-1:                   # ACL for IDE
    token: ide-token           # Use this auth token when adding JRebel Broker to your IDE
    zone: [dev, staging]
  ide-acl-2:                   # ACL for IDE
    token: secret              # Use this auth token when adding JRebel Broker to your IDE
    zone: staging

Add the license file to JRebel Broker

Place your rebelbroker.lic file that you received from your JRebel Sales contact in the following JRebel Broker metadata directory:

  • On Linux or macOS: ~/.jrbroker/

  • On Windows: %USERPROFILE%\.jrbroker\

JRebel Broker will automatically detect the file during startup.

To learn how to mount the license file when using Docker Compose, see Run the broker via a Docker container.