Install the OpenRemote plugin

The plugin is optional. Core OpenRemote connection and discovery work without it.

What it adds

  • TUI sidebar QR code for fast OpenRemote connection.
  • Keep-awake while OpenRemote is connected.
  • Connection status visible inside OpenCode.

Setup

Use the setup wizard from Installation, or add the plugin entries manually.

Add the server plugin to opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "plugin": ["opencode-openremote"]
}

Add the TUI sidebar plugin to tui.json:

{
  "$schema": "https://opencode.ai/tui.json",
  "plugin": ["opencode-openremote/tui"]
}

Restart opencode for changes to take effect.

Connect

Restart OpenCode, open the OpenRemote sidebar QR code, then scan it from the app.

Open the getting started guide

Run from source

For unreleased plugin features, clone the repository and point your project-level OpenCode config at the local plugin files.

git clone https://github.com/blairhudson/openremote.git

In your OpenCode project, add opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "plugin": ["/path/to/openremote/packages/opencode-plugin/src/index.ts"]
}

For the TUI sidebar, add tui.json:

{
  "$schema": "https://opencode.ai/tui.json",
  "plugin": ["/path/to/openremote/packages/opencode-plugin/src/tui.tsx"]
}

Replace /path/to/openremote with the cloned repository path, then restart opencode.

Configuration

The TUI QR code includes separate OpenRemote proxy credentials. Leave OpenCode's built-in OPENCODE_SERVER_USERNAME and OPENCODE_SERVER_PASSWORD at their defaults unless you need them for OpenCode itself.

Variable Default Description
OPENCODE_REMOTE_USERNAME opencode QR/proxy username used by OpenRemote.
OPENCODE_REMOTE_SECRET generated Fixed QR/proxy secret. When set, rotation is disabled.
OPENCODE_REMOTE_SECRET_ROTATION_SECONDS 30 Rotation interval from 0 to 3600 seconds before the first app connection. 0 means generate once on start and never rotate. Ignored when OPENCODE_REMOTE_SECRET is set.
OPENCODE_REMOTE_HEARTBEAT_TIMEOUT_SECONDS 30 Connected heartbeat timeout from 5 to 300 seconds. Also controls how long the app waits for the same proxy port and password during a quick opencode restart.
OPENCODE_REMOTE_RESUME true Allows the previous app client id to reconnect with a hidden resume secret after heartbeat loss. A new QR connection or explicit disconnect expires it.
OPENCODE_REMOTE_RESUME_SECONDS 28800 Resume-secret lifetime from 1 to 86400 seconds. Applies in-process and across quick plugin restarts.
OPENCODE_REMOTE_MAX_CLIENTS 1 Maximum authenticated OpenRemote clients allowed through the proxy. 0 allows any number.
OPENCODE_REMOTE_REQUIRE_CLIENT true Requires the app's anonymous client header. Browser opens redirect to the docs. Set to false only for older app versions.
OPENCODE_REMOTE_MAX_CLIENT_ID true Uses the app's anonymous client id when counting clients.
OPENCODE_REMOTE_MAX_CLIENT_IP false Adds client IP address to max-client counting. Missing client ids still fall back to IP when legacy access is allowed.
OPENCODE_REMOTE_MAX_CLIENT_USER_AGENT false Adds user agent to max-client counting. Leave unset to avoid counting the same app as multiple clients.
OPENCODE_REMOTE_ALLOW_NEW_SESSIONS false Shows the app new-session action when set to true. Use false or leave unset to hide it.