File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,6 +22,9 @@ LITELLM_KEY=CHANGEME
2222# OpenClaw agent framework token (generate: openssl rand -hex 24)
2323OPENCLAW_TOKEN = CHANGEME
2424
25+ # OpenCode web UI password (generate: openssl rand -base64 16)
26+ OPENCODE_SERVER_PASSWORD = CHANGEME
27+
2528# ═══════════════════════════════════════════════════════════════════
2629# LLM Backend Mode
2730# ═══════════════════════════════════════════════════════════════════
Original file line number Diff line number Diff line change @@ -56,6 +56,8 @@ generate_dream_env() {
5656 dashboard_api_key=$( new_secure_hex 32)
5757 local openclaw_token
5858 openclaw_token=$( new_secure_hex 24)
59+ local opencode_password
60+ opencode_password=$( new_secure_base64 16)
5961 local searxng_secret
6062 searxng_secret=$( new_secure_hex 32)
6163 # macOS: llama-server runs natively, containers reach it via host.docker.internal
@@ -112,7 +114,7 @@ OPENCLAW_TOKEN=${openclaw_token}
112114
113115#=== OpenCode Settings ===
114116OPENCODE_PORT=3003
115- OPENCODE_SERVER_PASSWORD=
117+ OPENCODE_SERVER_PASSWORD=${opencode_password}
116118
117119#=== Voice Settings ===
118120WHISPER_MODEL=base
Original file line number Diff line number Diff line change @@ -243,7 +243,7 @@ MODELS_EOF
243243 LIVEKIT_SECRET=$( _env_get LIVEKIT_API_SECRET " $( openssl rand -base64 32 2> /dev/null || head -c 32 /dev/urandom | base64) " )
244244 DASHBOARD_API_KEY=$( _env_get DASHBOARD_API_KEY " $( openssl rand -hex 32 2> /dev/null || head -c 32 /dev/urandom | xxd -p) " )
245245 DIFY_SECRET_KEY=$( _env_get DIFY_SECRET_KEY " $( openssl rand -hex 32 2> /dev/null || head -c 32 /dev/urandom | xxd -p) " )
246- OPENCODE_SERVER_PASSWORD=$( _env_get OPENCODE_SERVER_PASSWORD " " )
246+ OPENCODE_SERVER_PASSWORD=$( _env_get OPENCODE_SERVER_PASSWORD " $( openssl rand -base64 16 2> /dev/null || head -c 16 /dev/urandom | base64 ) " )
247247
248248 # Preserve user-supplied cloud API keys
249249 ANTHROPIC_API_KEY=$( _env_get ANTHROPIC_API_KEY " ${ANTHROPIC_API_KEY:- } " )
Original file line number Diff line number Diff line change @@ -106,7 +106,8 @@ function New-DreamEnv {
106106 $dashboardApiKey = Get-EnvOrNew " DASHBOARD_API_KEY" (New-SecureHex - Bytes 32 )
107107 $openclawToken = Get-EnvOrNew " OPENCLAW_TOKEN" (New-SecureHex - Bytes 24 )
108108 $searxngSecret = Get-EnvOrNew " SEARXNG_SECRET" (New-SecureHex - Bytes 32 )
109- $difySecretKey = Get-EnvOrNew " DIFY_SECRET_KEY" (New-SecureHex - Bytes 32 )
109+ $difySecretKey = Get-EnvOrNew " DIFY_SECRET_KEY" (New-SecureHex - Bytes 32 )
110+ $opencodePassword = Get-EnvOrNew " OPENCODE_SERVER_PASSWORD" (New-SecureBase64 - Bytes 16 )
110111
111112 # Determine LLM API URL based on backend
112113 # AMD on Windows: llama-server runs natively, containers reach it via host.docker.internal
@@ -207,7 +208,7 @@ LITELLM_KEY=$litellmKey
207208LIVEKIT_API_KEY=$livekitApiKey
208209LIVEKIT_API_SECRET=$livekitSecret
209210OPENCLAW_TOKEN=$openclawToken
210- OPENCODE_SERVER_PASSWORD=
211+ OPENCODE_SERVER_PASSWORD=$opencodePassword
211212OPENCODE_PORT=3003
212213DIFY_SECRET_KEY=$difySecretKey
213214
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ After=network.target
66[Service]
77Type =simple
88WorkingDirectory =__HOME__
9- ExecStart =__HOME__/.opencode/bin/opencode web --port 3003 --hostname 0 .0.0.0
9+ ExecStart =__HOME__/.opencode/bin/opencode web --port 3003 --hostname 127 .0.0.1
1010Restart =on-failure
1111RestartSec =5
1212
You can’t perform that action at this time.
0 commit comments