Set up OpenCode as your AI coding agent
OpenCode is an AI-powered coding agent that lets you write, test, and manage code through natural language. It supports multiple AI providers and can run shell commands, create files, and install development environments from a chat interface.
On Olares, you can use OpenCode in two ways:
- Browser: Install OpenCode as an app on Olares and access it through your browser.
- Local CLI: Install OpenCode on your computer and connect it to Ollama on Olares for a native terminal experience.
Prerequisites
- An Olares device with sufficient disk space and memory
- Ollama installed on Olares with at least one model downloaded
- Admin privileges to install apps from Market
- LarePass VPN enabled on your computer (for local CLI usage only)
Run OpenCode in the browser
This option installs OpenCode as an application on your Olares device. You access it through your browser.
Install OpenCode
Open Market and search for "OpenCode".
Click Get, then Install.

Wait for installation to complete, then launch OpenCode from Launchpad.
After installation, OpenCode needs to download dependency packages. This might take 10 to 30 minutes depending on your network conditions.
To track the download progress:
- Open Control Hub and select the OpenCode project from the sidebar.
- Navigate to Deployments > opencode and click the running pod.
- Under Containers, locate the init-packages container, and click article to open the log window.

Get the Ollama endpoint
To connect OpenCode to Ollama, get the shared entrance URL:
Open Settings, then navigate to Applications > Ollama.
In Shared entrances, select Ollama API to view the shared endpoint URL.

Copy the shared endpoint. For example:
plainhttp://d54536a50.shared.olares.com
Connect to Ollama
In OpenCode, click settings in the bottom-left corner.

Select Providers, then scroll down and select Connect next to Custom Provider.

Enter the following details:
- Provider ID: A unique identifier for this provider. For example:
olares-ollama. - Display name: The name shown in the provider list. For example:
Olares Ollama. - Base URL: The endpoint URL you copied above, with
/v1appended. - Models
- Model ID: The model to use. For example:
qwen3.5:9b. - Display Name: The name shown for this model. For example:
Qwen3.5 9B.
- Model ID: The model to use. For example:

- Provider ID: A unique identifier for this provider. For example:
To add multiple models, click Add model and enter the model ID and display name.
Click Submit to save the configuration. Your newly added provider will appear in the provider list.

Create a project
The default workspace is Home/Code in Files. Click + in the left navigation bar to create a project.

To work with multiple projects, create subfolders under Home/Code first:
Open Files and navigate to
Home/Code/.Create a subfolder for each project.

Go back to OpenCode, click +, and open the project with the subfolder name.

Start coding
You can now interact with OpenCode through the chat interface.
Select a project to open the coding agent interface.
Below the chat box, select Big Pickle to open the model selector, and select Qwen3.5 9B from the list.
Type a coding task in natural language.

Click folder_open to open the file browser and review the generated code.

Use
@to mention a file in the chat window and ask OpenCode to edit it.
Use the TUI
OpenCode also offers a terminal-based UI (TUI). To use the TUI in the browser:
Click terminal_2 from the top-right to open the terminal.

Run
opencodeto launch the TUI:
Use the
/modelscommand to switch to Qwen3.5 9B.
Type your prompt directly. For example, ask OpenCode to improve the code.

Run OpenCode from your computer
This option installs the OpenCode CLI on your local machine and connects it to Ollama on Olares via LarePass VPN for a native terminal experience.
Install OpenCode CLI
Install the CLI using the official installer:
curl -fsSL https://opencode.ai/install.sh | shGet the Ollama endpoint
The local CLI requires the Ollama API endpoint. The shared entrance URL does not work for CLI connections.
Open Settings, then navigate to Applications > Ollama.
In Entrances, select Ollama API to view the endpoint URL.

Copy the endpoint URL. For example:
plainhttps://a5be22681.laresprime.olares.com
Configure the connection
Enable LarePass VPN on your computer to connect to Olares.

On the same local network?
If your computer and Olares are on the same LAN, you can skip VPN and use the
.localdomain instead. Replacehttps://a5be22681.{username}.olares.comwithhttp://a5be22681.{username}.olares.localin the config below. For details, see Use.localdomain.Open the OpenCode config file at
~/.config/opencode/config.jsonin a text editor. Add a custom provider with your Ollama endpoint and model. The general format is:json{ "$schema": "https://opencode.ai/config.json", "provider": { "<provider-id>": { "npm": "@ai-sdk/openai-compatible", "name": "<display-name>", "options": { "baseURL": "<your-endpoint>/v1" }, "models": { "<model-id>": { "name": "<model-display-name>" } } } } }For example, to connect to Ollama on Olares with the Qwen3.5 9B model:
json{ "$schema": "https://opencode.ai/config.json", "disabled_providers": [ "ollama" ], "provider": { "olares-ollama": { "name": "olares-ollama", "npm": "@ai-sdk/openai-compatible", "models": { "qwen3.5:9b": { "name": "Qwen3.5 9B" } }, "options": { "baseURL": "https://a5be22681.laresprime.olares.com/v1" } } } }Windows WSL users
If you installed OpenCode in WSL, the config file path is
~/.local/share/opencode/config.json.Save the file.
Launch OpenCode TUI
In your terminal, run
opencodeto launch the TUI:
Use the
/modelscommand to switch to Qwen3.5 9B.
Start chatting with your self-hosted models.

First connection
The first connection might take longer to establish.
Use OpenCode in VS Code
To work with your codebase directly, open a terminal in VS Code and run opencode from your project directory.

Edit the config file
OpenCode stores its configuration in a JSON file. You can edit this file directly to manage providers, models, and tools.
Open Files and navigate to
Application/Data/opencode/.config/opencode/.Right-click
config.jsoncand select Rename.
Rename the file to
config.jsonso you can edit it directly in Files. OpenCode recognizes both extensions.Open
config.jsonand click edit_square to edit it.
Save the changes.
Restart OpenCode from Settings > Applications to apply the changes.
Learn more
- Manage packages: Install system-level and language-specific packages.
- Skills and plugins: Add capabilities through skills and plugins.
- Common issues: Solutions for known problems.
- Connect AI coding assistants to up-to-date docs with Context7: Register Context7 as a remote MCP server in OpenCode.
- OpenCode official documentation