Merge pull request #1536 from BillyOutlast/LocalAGI

feat: add LocalAGI LXC helper script
This commit is contained in:
CanbiZ (MickLesk)
2026-03-06 09:03:32 +01:00
committed by GitHub
4 changed files with 207 additions and 0 deletions

6
ct/headers/localagi Normal file
View File

@@ -0,0 +1,6 @@
__ __ ___ __________
/ / ____ ________ _/ / / | / ____/ _/
/ / / __ \/ ___/ __ `/ / / /| |/ / __ / /
/ /___/ /_/ / /__/ /_/ / / / ___ / /_/ // /
/_____/\____/\___/\__,_/_/ /_/ |_\____/___/

71
ct/localagi.sh Normal file
View File

@@ -0,0 +1,71 @@
#!/usr/bin/env bash
source <(curl -sSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
# Copyright (c) 2021-2026 community-scripts ORG
# Author: BillyOutlast
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
# Source: https://github.com/mudler/LocalAGI
APP="LocalAGI"
var_tags="${var_tags:-ai}"
var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-4096}"
var_disk="${var_disk:-20}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
var_unprivileged="${var_unprivileged:-1}"
var_gpu="${var_gpu:-no}"
header_info "$APP"
variables
color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if check_for_gh_release "localagi" "mudler/LocalAGI"; then
msg_info "Stopping LocalAGI service"
$STD systemctl stop localagi
msg_ok "Stopped LocalAGI service"
if [[ -f /opt/localagi/.env ]]; then
msg_info "Backing up existing LocalAGI configuration"
cp /opt/localagi/.env /tmp/localagi.env.backup
fi
msg_info "Fetching and deploying latest LocalAGI release"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "localagi" "mudler/LocalAGI" "tarball" "latest" "/opt/localagi"
msg_info "Restoring LocalAGI configuration"
if [[ -f /tmp/localagi.env.backup ]]; then
msg_info "Restoring LocalAGI configuration"
cp /tmp/localagi.env.backup /opt/localagi/.env
rm -f /tmp/localagi.env.backup
fi
cd /opt/localagi/webui/react-ui
$STD bun install
$STD bun run build
cd /opt/localagi
$STD go build -o /usr/local/bin/localagi || {
msg_ok "Updated LocalAGI successfully"
msg_info "Starting LocalAGI service"
systemctl daemon-reload
systemctl start localagi
msg_ok "Started LocalAGI service"
exit
}
fi
exit
}
start
build_container
description
msg_ok "Completed successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}"

View File

@@ -0,0 +1,52 @@
{
"name": "LocalAGI",
"slug": "localagi",
"categories": [
20
],
"date_created": "2026-03-03",
"type": "ct",
"updateable": true,
"privileged": false,
"interface_port": 3000,
"documentation": "https://github.com/mudler/LocalAGI#installation-options",
"website": "https://github.com/mudler/LocalAGI",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/localagi.webp",
"config_path": "/opt/localagi/.env",
"description": "LocalAGI is a self-hostable AI agent platform with a web UI, OpenAI-compatible APIs, and local-first model orchestration.",
"install_methods": [
{
"type": "default",
"script": "ct/localagi.sh",
"resources": {
"cpu": 2,
"ram": 4096,
"hdd": 20,
"os": "Debian",
"version": "13"
}
}
],
"default_credentials": {
"username": null,
"password": null
},
"notes": [
{
"text": "This script builds LocalAGI from source (Go + Bun) and runs it as a systemd service.",
"type": "info"
},
{
"text": "This Proxmox script runs LocalAGI in external-backend mode and does not provision local ROCm/NVIDIA runtimes.",
"type": "info"
},
{
"text": "By default, LocalAGI is configured to call an OpenAI-compatible backend at `http://127.0.0.1:11434/v1` (Ollama-compatible) via `LOCALAGI_LLM_API_URL`.",
"type": "info"
},
{
"text": "To use an external Ollama host, edit `/opt/localagi/.env` and set `LOCALAGI_LLM_API_URL=http://<ollama-host>:11434/v1`, then restart LocalAGI with `systemctl restart localagi`.",
"type": "info"
}
]
}

View File

@@ -0,0 +1,78 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2026 community-scripts ORG
# Author: BillyOutlast
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
# Source: https://github.com/mudler/LocalAGI
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
APP="LocalAGI"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing Dependencies"
$STD apt install -y build-essential
msg_ok "Installed Dependencies"
NODE_VERSION="24" setup_nodejs
setup_go
msg_info "Installing Bun"
export BUN_INSTALL="/root/.bun"
curl -fsSL https://bun.sh/install | $STD bash
ln -sf /root/.bun/bin/bun /usr/local/bin/bun
ln -sf /root/.bun/bin/bunx /usr/local/bin/bunx
msg_ok "Installed Bun"
msg_info "Fetching and deploying LocalAGI"
fetch_and_deploy_gh_release "localagi" "mudler/LocalAGI" "tarball" "latest" "/opt/localagi"
msg_ok "Fetched and deployed LocalAGI"
mkdir -p /opt/localagi/pool
cat <<'EOF' >/opt/localagi/.env
LOCALAGI_MODEL=gemma-3-4b-it-qat
LOCALAGI_MULTIMODAL_MODEL=moondream2-20250414
LOCALAGI_IMAGE_MODEL=sd-1.5-ggml
LOCALAGI_LLM_API_URL=http://127.0.0.1:11434/v1
LOCALAGI_STATE_DIR=/opt/localagi/pool
EOF
msg_info "Building LocalAGI from source"
cd /opt/localagi/webui/react-ui
$STD bun install
$STD bun run build
cd /opt/localagi
$STD go build -o /usr/local/bin/localagi
msg_ok "Built LocalAGI from source successfully"
msg_info "Creating LocalAGI systemd service"
cat <<'EOF' >/etc/systemd/system/localagi.service
[Unit]
Description=LocalAGI
After=network.target
[Service]
User=root
Type=simple
EnvironmentFile=/opt/localagi/.env
WorkingDirectory=/opt/localagi
ExecStart=/usr/local/bin/localagi
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF
msg_ok "Created LocalAGI systemd service"
msg_info "Enabling and Starting LocalAGI service"
systemctl enable -q --now localagi
msg_ok "Enabled and Started LocalAGI service"
motd_ssh
customize
cleanup_lxc