Skip to content

Repository files navigation

opencode-ollama-cloud-docker-sbx

A custom Docker Sandbox template that securely and easily runs OpenCode with Ollama Cloud as the LLM provider.

Prerequisites

Setup

1. Store your Ollama Cloud API key (one-time)

Get your API key from Ollama Cloud

sbx secret set-custom -g --host ollama.com --host *.ollama.com --env OLLAMA_API_KEY

You'll be prompted to paste your API key interactively — the key never touches your shell history or command line.

2. Allow sbx access to Ollama Cloud (one-time)

# Tip: The `sbx setup` defaults are sufficient for most setups
sbx setup
sbx policy allow network "ollama.com,*.ollama.com"

3. Run the Agent

# Tip: Change Directory (cd) to the directory where you want to run the Agent prior to running the command below
sbx run opencode --template warfront1ococds/opencode-ollama-cloud-docker-sbx:latest

Want to contribute or modify this template?

See DEVELOPERS.md.

About

Securely run OpenCode AI agents with Ollama Cloud in a Docker Sandbox

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages