Duplicate Space).| Secret name | Required? | Where to get it |
|---|---|---|
OPENCODE_SERVER_PASSWORD | Yes | Any password you choose — protects the web UI |
ANTHROPIC_API_KEY | One of these | https://console.anthropic.com |
OPENAI_API_KEY | (pick your | https://platform.openai.com/api-keys |
GEMINI_API_KEY | provider) | https://aistudio.google.com/apikey |
OPENCODE_API_KEY | https://opencode.ai/zen (curated models) |
opencode and the password you set.Dockerfile installs OpenCode via the official install script and runs opencode web.0.0.0.0:4096 so HF's reverse proxy can reach it.OPENCODE_SERVER_PASSWORD secret./home/user/workspace inside the container.Tab) → have the agent draft a plan before changing anything/init → generates an AGENTS.md for your project so OpenCode remembers context across sessionscd workspacegit clone https://github.com/your-user/your-repo.gitgit add . && git commit -m "..." && git push before stepping awaygit clone public repos, but you can't expose additional services./share command to save a session URL externally.| Need | Upgrade to |
|---|---|
| Always-on, no sleep | HF Spaces paid CPU ($0.03/hr ≈ $5/mo) |
| Persistent storage | HF Spaces Storage bucket add-on |
| More CPU/RAM | Spaces hardware upgrade to cpu-upgrade or cpu-performance |
| Always-on + git auto-sync | Self-host on Oracle Cloud Always Free (24GB RAM, 4 ARM cores) — different guide |