openclaw - 💡(How to fix) Fix Browser Relay: multi-profile switcher for multiple OpenClaw instances [3 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#51509Fetched 2026-04-08 01:10:14
View on GitHub
Comments
3
Participants
3
Timeline
5
Reactions
0
Author
Timeline (top)
commented ×3mentioned ×1subscribed ×1

Error Message

Use case: Users running multiple OpenClaw instances (e.g. home server + VPS, or two AI companions) have to manually re-enter gateway credentials every time they switch — friction-heavy and error-prone.

RAW_BUFFERClick to expand / collapse

Use case: Users running multiple OpenClaw instances (e.g. home server + VPS, or two AI companions) have to manually re-enter gateway credentials every time they switch — friction-heavy and error-prone.

Proposal: Named profile slots in the extension options page. Each profile stores its own connection mode, port/URL, and gateway token. A "Set as Active" button switches the live relay connection instantly — the background service worker reconnects automatically.

Proof of concept we built: https://github.com/unraidBob/browser-relay

The approach is 100% backward-compatible — background.js reads the same flat storage keys (connectionMode, relayPort, remoteUrl, gatewayToken) as before. Only the options layer gains the profile abstraction. ~250 lines of changes, no relay logic touched.

Happy to contribute a PR if there is interest!

extent analysis

Fix Plan

To implement named profile slots in the extension options page, follow these steps:

  • Update the options.html file to include a profile selection dropdown and a "Set as Active" button.
  • Modify the options.js file to store and retrieve profile data from storage.
  • Update the background.js file to read the active profile's connection settings and reconnect automatically when the active profile is changed.

Example Code

// options.js
// Store profile data in storage
function saveProfile(profile) {
  chrome.storage.local.set({ profiles: profile });
}

// Retrieve profile data from storage
function getProfiles() {
  return chrome.storage.local.get('profiles');
}

// background.js
// Read active profile's connection settings
function getActiveProfile() {
  return chrome.storage.local.get('activeProfile');
}

// Reconnect automatically when active profile is changed
chrome.storage.onChanged.addListener(function(changes, area) {
  if (area === 'local' && changes.activeProfile) {
    reconnectRelay();
  }
});

// reconnectRelay function remains the same as before

Verification

To verify that the fix worked, follow these steps:

  • Open the extension options page and create a new profile.
  • Switch to a different profile and verify that the connection settings are updated.
  • Verify that the background service worker reconnects automatically when the active profile is changed.

Extra Tips

  • Make sure to handle errors and edge cases when storing and retrieving profile data.
  • Consider adding a "Delete Profile" button to remove unused profiles.
  • Test the implementation thoroughly to ensure backward compatibility with existing users.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix Browser Relay: multi-profile switcher for multiple OpenClaw instances [3 comments, 3 participants]