Prepare persistent Agent Zero and LobeHub trials on Unraid

This commit is contained in:
Mikei386 committed 2026-10-18 13:49:49 +02:00
1 parent 35c92886d5
commit 194ff602e1
9 files changed
+3177 -1

No files matched your search

+40
View File
@@ -60,3 +60,43 @@ specific projects and MCPs still require configuration.
- Existing old DockerMan template with matching Name was updated; there was no existing Agent Zero container or user-data directory.
User authentication, reverse proxy/domain and MCP import are not configured by this installation. Initial access is LAN HTTP using upstream onboarding defaults.
## Re-created trial — 2026-10-18
The earlier container/image was absent; the existing 404-KiB user-data folder
and model presets remained. Keep these data; no deletion or new application
source mount. `start-existing.sh` recreates the official image with 1 CPU,
low CPU shares, the existing 4-GiB/no-swap bound and `unless-stopped`.
The persistent DockerMan template now carries the same CPU and restart limits.
The scheduler JSON contained zero tasks before startup. No benchmark, chat,
speech generation, scheduled agent run or MCP tool execution is authorized:
the user's model is busy with coding. Basic web-page availability is the only
acceptance performed during this deployment. No other container is restarted.
18 URL-based MCP definitions were copied internally from the configured Hermes
instance into Agent Zero's own `settings.json`; two disabled, local or
unresolved-placeholder entries were skipped. `copy-remote-mcps.rb` performs a
safe YAML parse and never prints credentials. This is a copy, not a shared
Hermes data mount or a dependency on running Hermes. The same JSON is prepared
privately as LobeHub's `deployment/mcp-import.json` for normal per-account
import after the user signs up. It is not a public artifact or Git file.
Connection discovery/tool usability has not been claimed tested.
The built-in Agent Zero workspace is `/a0/usr/workdir` in this installation.
Webtop's entire home is not mounted or granted access by this deployment.
Speech, mobile clients, scheduled executions and a stop/start or fresh-host
restore are not accepted just because the login/chat page opens. HTTPS and
normal user login setup are still needed before broader/mobile microphone use.
The re-created trial uses the same published image digest as the prior
installation:
`agent0ai/agent-zero@sha256:b0c9763df7b8c4c5ddbdac9c101e8f84de8b7cdf9185203e446e2d7d8ebf2f1c`.
The container started with its official supervisor/entrypoint; no bootstrap
wrapper or dependency installer was added. HTTP readiness is recorded separately
from process state. A running supervisor by itself does not prove UI readiness.
Final HTTP check returned 200 after the first startup. The image downloaded
`en-core-web-sm` during initialization. No dependency installer or application
patch was added by this deployment. Whether a later clean restart needs any
additional download remains untested under the user's no-test instruction.
@@ -0,0 +1,34 @@
require 'psych'
require 'json'
require 'open3'
ssh=['ssh','-i','/Users/mike_i386/.ssh/ha_agent','-o','BatchMode=yes','root@192.168.1.2']
source,_,status=Open3.capture3(*ssh,'cat /mnt/nvme-storage/appdata/Hermes-Agent-Web-UI/home/config.yaml')
abort('Cannot access MCP source') unless status.success?
config=Psych.safe_load(source, permitted_classes: [], permitted_symbols: [], aliases: false)
servers=config['mcp_servers'] || config['mcpServers'] || {}
abort('Unexpected MCP source schema') unless servers.is_a?(Hash)
remote={}; skipped=0
servers.each do |name,s|
next unless s.is_a?(Hash)
url=s['url'] || s['serverUrl']
if !url.is_a?(String) || !url.match?(/\Ahttps?:\/\//) || s['enabled']==false
skipped+=1; next
end
item={'url'=>url}
item['headers']=s['headers'] if s['headers'].is_a?(Hash)
item['type']='sse' if url.split('?')[0].end_with?('/sse')
item['type']='streamable-http' unless item.key?('type')
if JSON.generate(item).match?(/\$\{|\$[A-Z_]/)
skipped+=1;next
end
remote[name]=item
end
if remote.empty?
puts "No transferable remote MCP entries; skipped #{skipped}."
exit
end
payload=JSON.generate({'mcpServers'=>remote})
command=%q{php -r '$p="/mnt/user/appdata/agent-zero/settings.json"; $x=is_file($p)?json_decode(file_get_contents($p),true):[];if(!is_array($x))exit(2);$v=stream_get_contents(STDIN);if(!json_decode($v,true))exit(3);$x["mcp_servers"]=$v;file_put_contents($p,json_encode($x,JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES));chmod($p,0600);file_put_contents("/mnt/user/appdata/lobehub/deployment/mcp-import.json",$v);chmod("/mnt/user/appdata/lobehub/deployment/mcp-import.json",0600);echo "MCP configuration saved.\n";'}
out,_,status=Open3.capture3(*ssh,command,stdin_data:payload)
abort('MCP transfer failed; details withheld') unless status.success?
puts "Independent remote MCP configurations copied: #{remote.size}; skipped entries: #{skipped}. No tools executed."
@@ -13,7 +13,7 @@
<Beta>True</Beta>
<Category>AI: Productivity:</Category>
<WebUI>http://[IP]:50080/</WebUI>
<ExtraParams>--publish=192.168.1.2:50080:80/tcp --cpus=2 --cpu-shares=128 --memory=4g --memory-swap=4g --pids-limit=1024 --shm-size=512m --log-opt=max-size=10m --log-opt=max-file=2</ExtraParams>
<ExtraParams>--restart=unless-stopped --publish=192.168.1.2:50080:80/tcp --cpus=1 --cpu-shares=128 --memory=4g --memory-swap=4g --pids-limit=1024 --shm-size=512m --log-opt=max-size=10m --log-opt=max-file=2</ExtraParams>
<TemplateURL>https://raw.githubusercontent.com/selfhosters/unRAID-CA-templates/master/templates/agent_zero.xml</TemplateURL>
<Icon>https://raw.githubusercontent.com/selfhosters/unRAID-CA-templates/master/templates/img/agent-zero.png</Icon>
<Config Name="Appdata Path" Target="/a0/usr" Default="/mnt/user/appdata/agent-zero" Mode="rw" Description="Persistent user data, chats, projects, memory and skills. Application files remain in the official image." Type="Path" Display="always" Required="true" Mask="false">/mnt/user/appdata/agent-zero</Config>
@@ -0,0 +1,19 @@
#!/bin/bash
set -euo pipefail
base=/mnt/user/appdata/agent-zero
if docker container inspect agent-zero >/dev/null 2>&1; then
echo 'Container exists; no replacement performed.' >&2
exit 1
fi
php -r '$x=json_decode(file_get_contents("/mnt/user/appdata/agent-zero/scheduler/tasks.json"),true); if(count($x["tasks"]??[])!==0)exit(1);'
docker image inspect agent0ai/agent-zero:latest >/dev/null
# Reuse existing user data and its model presets, never mount application code.
docker run -d --name agent-zero --network bridge --restart unless-stopped \
--cpus=1 --cpu-shares=128 --memory=4g --memory-swap=4g \
--pids-limit=1024 --shm-size=512m \
--log-opt max-size=10m --log-opt max-file=2 \
--label net.unraid.docker.managed=dockerman \
--label 'net.unraid.docker.webui=http://[IP]:50080/' \
--label net.unraid.docker.icon=https://raw.githubusercontent.com/selfhosters/unRAID-CA-templates/master/templates/img/agent-zero.png \
-p 192.168.1.2:50080:80 -e TZ=Europe/Berlin \
-v "$base:/a0/usr:rw" agent0ai/agent-zero:latest