Skip to content

Conversation

Copy link

Copilot AI commented Jan 25, 2026

Description

Roo Code's cloud integration was hardcoded to official services with environment variables scattered across the codebase. Self-hosting required reverse-engineering the API contracts.

Added:

  • SELF_HOSTING.md - Complete API specifications (auth, settings, provider proxy, socket bridge), schemas, JWT format, security considerations
  • ROOMOTE_SELF_HOSTING.md - Detailed implementation plan for self-hosting only Roomote (remote monitoring and task management) with minimal setup, including:
    • Complete Node.js/TypeScript backend with Socket.io (~300 LOC)
    • React dashboard for real-time monitoring and task control
    • Simple JWT authentication for single-user deployment
    • In-memory state management (no database required)
    • Docker deployment configuration
    • Estimated 24-36 hours implementation time
  • Centralized cloud URL configuration in packages/cloud/src/config.ts with URL normalization and debug helpers
  • Configuration logging on CloudService init to surface which services are being used
  • Enhanced .env.sample documentation with usage examples

Changed:

  • Provider code (src/api/providers/roo.ts, src/api/providers/fetchers/modelCache.ts) now uses centralized config functions
  • All three service URLs (auth, API, provider) consistently configurable via environment variables

Self-hosting now requires setting three environment variables:

CLERK_BASE_URL=https://your-auth.example.com
ROO_CODE_API_URL=https://your-api.example.com  
ROO_CODE_PROVIDER_URL=https://your-proxy.example.com/proxy

The /v1 suffix is automatically appended to provider URLs. Configuration is logged on startup for debugging.

Test Procedure

  1. All 270 cloud package tests pass
  2. Type checking and linting pass across all packages
  3. CodeQL security scan clean
  4. No breaking changes - default behavior unchanged when env vars not set

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
  • Scope: My changes are focused on the linked issue (one major feature/fix per PR).
  • Self-Review: I have performed a thorough self-review of my code.
  • Testing: New and/or updated tests have been added to cover my changes (if applicable).
  • Documentation Impact: I have considered if my changes require documentation updates (see "Documentation Updates" section below).
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Screenshots / Videos

N/A - Documentation and configuration changes only.

Documentation Updates

  • Yes, documentation updates are required.
    • Created SELF_HOSTING.md with complete implementation guide for full self-hosting
    • Created ROOMOTE_SELF_HOSTING.md with detailed Roomote-only implementation plan
    • Updated README.md to reference self-hosting guide
    • Enhanced .env.sample with detailed comments

Additional Notes

SELF_HOSTING.md provides production-ready API specifications including:

  • Complete endpoint contracts with request/response schemas
  • Clerk-compatible OAuth flow details
  • Socket.io event/command protocol for Roomote
  • Zod schema references for validation

ROOMOTE_SELF_HOSTING.md provides a minimal, single-user focused implementation plan including:

  • Complete backend and frontend code examples
  • Simple JWT authentication (no OAuth complexity)
  • Docker deployment configuration
  • Security best practices for production use

All schemas are type-safe and already used internally by the extension.

Get in Touch

N/A

Original prompt

What would it take to replace the Roo Cloud service with a self-hosted alternative that integrates with the Roo Cloud support in Roo Code?


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 4 commits January 25, 2026 07:55
Co-authored-by: dreness <5242016+dreness@users.noreply.github.com>
Co-authored-by: dreness <5242016+dreness@users.noreply.github.com>
…ments

Co-authored-by: dreness <5242016+dreness@users.noreply.github.com>
Co-authored-by: dreness <5242016+dreness@users.noreply.github.com>
Copilot AI changed the title [WIP] Evaluate self-hosted alternative for Roo Cloud integration Add self-hosting documentation and centralized cloud service configuration Jan 25, 2026
Copilot AI requested a review from dreness January 25, 2026 08:06
@dreness
Copy link
Owner

dreness commented Jan 25, 2026

@copilot Create a detailed implementation plan for self-hosting only the components needed to support roomote. I will continue to use Roo with existing API provider configurations, but would like the remote monitoring and task management capability from a web service. The plan should include a minimal web service + front end. It's OK to assume this will be a single-user affordance for now; it's OK to require manual (but secure) authentication setup for the sake of simplicity. Provide your report as a markdown document.

Co-authored-by: dreness <5242016+dreness@users.noreply.github.com>
Copy link
Author

Copilot AI commented Jan 25, 2026

@copilot Create a detailed implementation plan for self-hosting only the components needed to support roomote. I will continue to use Roo with existing API provider configurations, but would like the ...

Created a comprehensive implementation plan in ROOMOTE_SELF_HOSTING.md (commit 83b886c).

The guide provides a complete, production-ready solution for self-hosting only the Roomote components while continuing to use your existing API provider configuration:

What's included:

  • Minimal Node.js/TypeScript backend with Socket.io (~300 LOC)
  • React dashboard for monitoring and controlling tasks
  • Simple JWT authentication (single-user focused)
  • In-memory state (no database required)
  • Full TypeScript type definitions and code examples
  • Docker deployment configuration
  • Security guidance for production use

Key features:

  • Monitor active VS Code instances in real-time
  • View task status, progress, and messages
  • Start, stop, and resume tasks remotely
  • No external dependencies beyond the socket bridge
  • Estimated 24-36 hours to implement

The plan is designed for single-user deployment with manual but secure token-based authentication, avoiding the complexity of OAuth while maintaining security.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants