-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.env.example
More file actions
180 lines (147 loc) · 6.5 KB
/
Copy path.env.example
File metadata and controls
180 lines (147 loc) · 6.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
# =============================================================================
# OpenCode Docker Configuration
# =============================================================================
# Copy this file to .env and fill in the values.
# cp .env.example .env
# =============================================================================
# --- Runtime Environment Variables ---
# Config variants:
# Default: openai-chatgpt
# Set this to `zai-coding-plan` for Z.AI Coding Plan defaults.
# OPENCODE_CONFIG_VARIANT=openai-chatgpt
#
# Z.AI Coding Plan API key (required for `zai-coding-plan` variant)
# Get your key from: https://open.bigmodel.cn/
OCD_ZHIPU_API_KEY=
# Google AI Studio API key for the Gemini vision model
# Optional for Compose startup, but needed by the Z.AI variant / OmO visual tasks.
# Get your key at: https://aistudio.google.com/apikey
OCD_GEMINI_API_KEY=
# OpenAI ChatGPT Plus/Pro subscription auth is NOT configured in .env.
# Use OpenCode OAuth/device login after switching to openai-chatgpt:
# task opencode -- auth login --provider openai --method "ChatGPT Pro/Plus (headless)"
# The login is persisted in OPENCODE_HOME_DIR.
#
# OpenAI API-key usage is separate and is not needed for ChatGPT subscription auth.
# OPENAI_API_KEY=
# --- Optional Environment Variables ---
# OpenCode server mode: "web" (browser UI) or "serve" (API server)
# TUI mode is NOT supported as a server mode. For CLI access use:
# docker exec -it <container> -- opencode
# OPENCODE_MODE=web
# OpenCode server port (1024-65535)
# OPENCODE_PORT=4000
# Optional: print OpenCode logs to container stderr
# Accepted values: true, false
# OPENCODE_PRINT_LOGS=false
# Optional: OpenCode log level
# Accepted values: DEBUG, INFO, WARN, ERROR
# OPENCODE_LOG_LEVEL=INFO
# Optional: allow one additional CORS origin for opencode web/serve
# If empty or unset, no --cors flag is added.
# OPENCODE_CORS=https://example.com
# Optional: install a dotfiles repository at first startup and whenever this
# OPENCODE_DOTFILES_REPO URL changes (triggers a reinstall via docker-init.sh).
# The repo is cloned into OPENCODE_HOME_DIR and installed using the same installer
# file order as GitHub Codespaces. Dotfiles scripts can run arbitrary commands;
# only use repositories you trust.
# Private GitHub HTTPS repos can use GH_TOKEN or GITHUB_TOKEN with repository
# read access. SSH URLs require a persisted SSH key or deploy key with access.
# OPENCODE_DOTFILES_REPO=https://github.com/owner/dotfiles.git
# OpenChamber - Alternative Web GUI for OpenCode
# Runs alongside OpenCode in the same container.
#
# Optional: Enable OpenChamber web interface
# Accepted values: true, false
# OPENCHAMBER_ENABLED=false
# Optional: OpenChamber port (default: 4020)
# OPENCHAMBER_PORT=4020
# Optional: Password-protect the OpenChamber browser UI
# OPENCHAMBER_UI_PASSWORD=
# Optional: Allow OpenChamber to bind 0.0.0.0 without UI authentication.
# Keep OPENCODE_BIND_ADDRESS=127.0.0.1 unless you accept unauthenticated LAN access.
# OPENCHAMBER_ALLOW_UNAUTHENTICATED_LAN=true
# OpenCode server authentication
# Optional: Basic auth username. If unset, OpenCode uses its own default username.
# OPENCODE_SERVER_USERNAME=
# WARNING: If OPENCODE_SERVER_PASSWORD is empty, anyone who can reach the port
# can access OpenCode. Ensure OPENCODE_BIND_ADDRESS restricts access.
# OPENCODE_SERVER_PASSWORD=
# Host-level port binding address (Docker Compose ONLY — NOT passed into container)
# Controls which host interface Docker listens on. Container always binds 0.0.0.0.
# Default: 127.0.0.1 (localhost only — safe for development)
# WARNING: Setting to 0.0.0.0 binds to all interfaces. MUST set a password!
# OPENCODE_BIND_ADDRESS=127.0.0.1
# Optional host-side home directory override (Docker Compose ONLY)
# Persists the full container home, including OpenCode config/state, skills,
# workspace, and interactive auth/config for gh, glab, and atlcli.
# OPENCODE_HOME_DIR=./data/home
# Optional platform CLI auth via environment variables.
# Interactive login also works and persists inside OPENCODE_HOME_DIR.
# GH_TOKEN/GITHUB_TOKEN are also passed as optional BuildKit secrets for
# GitHub-hosted CLI downloads during `docker compose build` and can be used to
# clone private GitHub HTTPS dotfiles configured via OPENCODE_DOTFILES_REPO.
# GH_TOKEN=
# GITHUB_TOKEN=
# GLAB_TOKEN=
# GITLAB_TOKEN=
# CNTB_OAUTH2_CLIENT_ID=
# CNTB_OAUTH2_CLIENT_SECRET=
# CNTB_OAUTH2_USER=
# CNTB_OAUTH2_PASSWORD=
# Optional Git identity defaults for commits created in the container.
# These are consumed at startup and written to git config (not exported as
# runtime GIT_* override environment variables).
# GIT_AUTHOR_NAME=Oh-MyOpenAgent
# GIT_AUTHOR_EMAIL=noreply@ohmyopencode.ai
# GIT_COMMITTER_NAME=Oh-MyOpenAgent
# GIT_COMMITTER_EMAIL=noreply@ohmyopencode.ai
# ATLCLI_API_TOKEN=
# ATLCLI_EMAIL=
# ATLCLI_SITE=
# ATLCLI_BASE_URL=
# DOKPLOY_URL=
# DOKPLOY_API_KEY=
# Optional: force skill sync on container start.
# FORCE_SKILL_SYNC=true
# Optional: Docker host delegation.
# Uncomment this block when OpenCode needs to run Docker commands against the
# host daemon. Docker socket access is effectively host-root equivalent.
# Compose derives the container OPENCODE_DOCKER_SOCKET and DOCKER_HOST values
# when this bind is set.
# OPENCODE_DOCKER_SOCKET_BIND=/var/run/docker.sock
# --- Build Arguments (set before docker compose build) ---
# These control which optional language runtimes are installed at build time.
# Changing these requires rebuilding the image.
# Optional: Install Java (Temurin JDK 21)
# INSTALL_JAVA=true
# Optional: Install Ruby 3.3
# INSTALL_RUBY=true
# Optional: Install Swift 6.0
# INSTALL_SWIFT=true
# Optional: Install Elixir + Erlang/OTP 27
# INSTALL_ELIXIR=true
# Optional: Install nvm-managed Node.js in addition to the system Node.js.
# INSTALL_NVM=true
# Optional: Install Rust via rustup.
# INSTALL_RUST=true
# --- Cloudflare Tunnel (optional remote access) ---
# Expose OpenCode over the internet without opening ports.
#
# Quick tunnel:
# COMPOSE_PROFILES=tunnel-quick
#
# Managed tunnel:
# COMPOSE_PROFILES=tunnel-managed
# CF_TUNNEL_TOKEN=...
#
# WARNING: Tunnel URLs are publicly accessible.
# Set OPENCODE_SERVER_PASSWORD before enabling the tunnel!
# Cloudflare tunnel profile. Leave commented unless enabling a tunnel.
# COMPOSE_PROFILES=
# Cloudflare tunnel token (required for managed mode).
# CF_TUNNEL_TOKEN=
# Target host inside Docker (default: opencode container name).
# CF_TUNNEL_TARGET_HOST=opencode
# Target port inside Docker (default: 4000, the OpenCode port).
# CF_TUNNEL_TARGET_PORT=4000