Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions dappnode_package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
{
"name": "openclaw.dnp.dappnode.eth",
"version": "0.1.1",
"upstreamVersion": "v2026.3.24",
"upstreamVersion": "v2026.4.5",
"upstreamRepo": "openclaw/openclaw",
"upstreamArg": "UPSTREAM_VERSION",
"shortDescription": "Personal AI assistant gateway with multi-LLM support",
"description": "OpenClaw is a powerful, self-hosted AI agent gateway that runs on your own devices. It provides a unified interface for interacting with multiple LLM providers (OpenAI, Anthropic Claude, Google Gemini, local models via Ollama). Features include:\n\n- **Web UI & API**: Full-featured web interface at port 18789\n- **Multi-Channel Messaging**: WhatsApp, Telegram, Slack, Discord, Matrix, and more\n- **Agent Orchestration**: Claude AI integration with tool use and autonomous agents\n- **Code Execution**: Sandboxed environment for running code\n- **Canvas UI**: Visual interactions and image generation\n- **Voice Support**: Text-to-speech and speech-to-text capabilities\n\nRun your own AI infrastructure with full control over your data and API keys.",
"type": "service",
"architectures": ["linux/amd64", "linux/arm64"],
"architectures": [
"linux/amd64",
"linux/arm64"
],
"author": "DAppNode Association <admin@dappnode.io>",
"license": "Apache-2.0",
"categories": ["AI", "Developer tools", "Communications"],
"categories": [
"AI",
"Developer tools",
"Communications"
],
"keywords": [
"ai",
"llm",
Expand Down Expand Up @@ -89,4 +96,4 @@
"featuredBackground": "linear-gradient(135deg, #667eea 0%, #764ba2 100%)",
"featuredColor": "white"
}
}
}
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
context: .
dockerfile: Dockerfile
args:
UPSTREAM_VERSION: v2026.3.24
UPSTREAM_VERSION: v2026.4.5
image: openclaw.dnp.dappnode.eth:0.1.0
container_name: DAppNodePackage-openclaw.dnp.dappnode.eth
restart: unless-stopped
Expand Down
61 changes: 59 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,16 @@ EOF
else
node -e "
const fs = require('fs');
const JSON5 = require('json5');
const configPath = '$CONFIG_FILE';
const envToken = process.env.OPENCLAW_GATEWAY_TOKEN || 'openclaw';
try {
const config = JSON5.parse(fs.readFileSync(configPath, 'utf8'));
const config = JSON.parse(fs.readFileSync(configPath, 'utf8'));
const gw = (config.gateway = config.gateway || {});
const cui = (gw.controlUi = gw.controlUi || {});
const auth = (gw.auth = gw.auth || {});
let changed = false;

// DAppNode gateway settings
if (gw.port !== 18789) { gw.port = 18789; changed = true; }
if (gw.bind !== 'lan') { gw.bind = 'lan'; changed = true; }
if (!('dangerouslyAllowHostHeaderOriginFallback' in cui) && !('allowedOrigins' in cui)) {
Expand All @@ -50,6 +51,48 @@ try {
if (!('allowInsecureAuth' in cui)) { cui.allowInsecureAuth = true; changed = true; }
if (!('dangerouslyDisableDeviceAuth' in cui)) { cui.dangerouslyDisableDeviceAuth = true; changed = true; }
if (auth.token !== envToken) { auth.token = envToken; changed = true; }

// Migrate legacy channel keys that openclaw doctor --fix cannot fully resolve in one pass:
// streamMode (string) → streaming (string)
// streaming (boolean) → streaming (string: true→\"partial\", false→\"off\")
// discord.botToken → discord.token (Telegram keeps botToken; Discord uses token)
// discord guild channel: allow (bool) → enabled (bool)
const channels = config.channels || {};
for (const [chName, ch] of Object.entries(channels)) {
if (!ch || typeof ch !== 'object') continue;
// streamMode → streaming string
if ('streamMode' in ch) {
ch.streaming = ch.streamMode;
delete ch.streamMode;
changed = true;
}
// boolean streaming → string
if (typeof ch.streaming === 'boolean') {
ch.streaming = ch.streaming ? 'partial' : 'off';
changed = true;
}
// Discord: botToken is not valid — migrate to token (plain string)
if (chName === 'discord' && 'botToken' in ch) {
if (!ch.token) ch.token = ch.botToken;
delete ch.botToken;
changed = true;
}
// discord guild channel: allow (bool) → enabled (bool)
if (ch.guilds && typeof ch.guilds === 'object') {
for (const guild of Object.values(ch.guilds)) {
if (guild && guild.channels && typeof guild.channels === 'object') {
for (const chan of Object.values(guild.channels)) {
if (chan && 'allow' in chan) {
chan.enabled = chan.allow;
delete chan.allow;
changed = true;
}
}
}
}
}
}

if (changed) {
fs.writeFileSync(configPath, JSON.stringify(config, null, 2));
console.log('Updated OpenClaw config for DAppNode HTTP deployment');
Expand All @@ -58,6 +101,20 @@ try {
" || true
fi

# ---------------------------------------------------------------------------
# Run doctor --fix for any remaining migrations not handled above
# ---------------------------------------------------------------------------
echo "Running openclaw doctor --fix..."
OPENCLAW_STATE_DIR="$OPENCLAW_DIR" openclaw doctor --fix || true

# ---------------------------------------------------------------------------
# Ensure WhatsApp plugin is installed (from npm, no interactive prompts)
# ---------------------------------------------------------------------------
echo "Ensuring WhatsApp plugin is installed..."
if ! OPENCLAW_STATE_DIR="$OPENCLAW_DIR" openclaw plugins list 2>/dev/null | grep -q "@openclaw/whatsapp"; then
OPENCLAW_STATE_DIR="$OPENCLAW_DIR" openclaw plugins install @openclaw/whatsapp || true
fi

# ---------------------------------------------------------------------------
# Start setup wizard web UI in the background on port 8080
# ---------------------------------------------------------------------------
Expand Down
Loading
Loading