Join us for Render's 6/18 conference in SF

Get your ticket

Opencode on Render

Deploy opencode on Render for a hosted AI coding agent with browser UI, remote TUI access, and persistent storage.

Why deploy opencode on Render?

opencode on Render is a deployment template that runs opencode as a hosted AI coding agent with a browser-based UI and remote terminal access. It solves the problem of running an AI coding assistant persistently in the cloud, allowing developers to access their AI-powered development environment from any browser or terminal without local setup.

This template gives you a fully configured opencode AI coding agent with persistent disk storage, automatic repo cloning, and the Render OpenCode plugin pre-installed—no need to wire up auth.json, configure MCP servers, or manage workspace persistence yourself. Render's one-click deploy handles the web service setup with environment variables already mapped to opencode's expected locations, plus you get the Render MCP tools baked in for blueprint validation and deployment commands. Skip the Docker configuration and startup script debugging; just add your API keys and start coding with a hosted agent you can access from any browser or attach to from your local terminal.

Architecture

What you can build

You'll have a hosted OpenCode instance with a browser-based UI for interacting with an AI coding agent, plus the ability to connect from your local terminal using opencode attach. The service comes with 1 GB of persistent storage for your working tree and can optionally clone a repo on first boot, so you can start editing code immediately. If you set a Render API key, the pre-installed Render plugin lets the agent validate and manage your Render deployments directly.

Key features

  • Remote TUI access: Connect to the hosted agent from your local terminal using opencode attach with password authentication.
  • Persistent disk storage: A 1 GB disk at /root/project-data preserves opencode state, SQLite sessions, and your working tree across restarts.
  • Auto repo cloning: Set REPO_URL and optionally GITHUB_TOKEN to clone public or private repos into the workspace on first boot.
  • Render MCP integration: Pre-configured Render MCP server enables the agent to validate blueprints, deploy services, and manage Render resources via RENDER_API_KEY.
  • Multi-provider API keys: Supports Anthropic, OpenRouter, and Render API keys written to opencode's auth.json for model and tool access.

Use cases

  • Solo dev accesses AI coding agent from iPad while traveling
  • Team lead demos opencode to stakeholders without local setup
  • Contractor works on client repo from locked-down corporate laptop
  • Developer manages Render deployments through AI agent with MCP integration

What's included

Service
Type
Purpose
opencode-data
Web Service
Application service

Prerequisites

  • Anthropic API Key: API key to access Anthropic's Claude models for AI coding assistance.
  • OpenRouter API Key: API key to access various AI models through OpenRouter's unified API.
  • Render API Key: API key to enable opencode to manage and interact with your Render resources.
  • GitHub Token: Personal access token required to clone private GitHub repositories.

Next steps

  1. Open the Render service URL in your browser and log in with username 'opencode' and the OPENCODE_SERVER_PASSWORD from your Render Dashboard — You should see the opencode web UI with your workspace loaded (either your cloned repo or the default Git project)
  2. Test the Render MCP integration by asking opencode to list your Render services or validate a blueprint — You should see opencode use the render_validate_blueprint tool or return information about your Render account (requires RENDER_API_KEY to be set)
  3. Configure your AI provider by adding ANTHROPIC_API_KEY or OPENROUTER_API_KEY in the Render Dashboard environment variables, then restart the service — You should be able to start a conversation with opencode and receive AI responses without authentication errors

Resources

Stack

typescript

Tags

ai-agent
ai

For AI agents

Drop into your coding agent to explore and deploy this template.