2026-04-08 15:59:21 +02:00
#!/usr/bin/env bash
2026-08-18 12:38:22 +02:00
_cs_boot = " ${ COMMUNITY_SCRIPTS_CORE_DIR :-$( dirname " ${ BASH_SOURCE [0] } " ) /../../core } /core/build.func"
source " $_cs_boot " 2>/dev/null || source <( curl -fsSL " ${ COMMUNITY_SCRIPTS_CORE_URL :- https ://raw.githubusercontent.com/community-scripts/core/main } /core/build.func" )
2026-04-08 15:59:21 +02:00
# Copyright (c) 2021-2026 community-scripts ORG
# Author: MickLesk (CanbiZ)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/nearai/ironclaw
APP = "IronClaw"
var_tags = " ${ var_tags :- ai ;agent;security } "
2026-06-21 02:56:49 +10:00
var_arm64 = " ${ var_arm64 :- yes } "
2026-04-08 15:59:21 +02:00
var_unprivileged = " ${ var_unprivileged :- 1 } "
2026-08-18 12:38:22 +02:00
if [[ -z " ${ var_os :- } " ]] && command -v pveversion >/dev/null 2>& 1; then
var_os = $( msg_menu "Choose the container OS" \
"debian" "Debian 13" \
"alpine" "Alpine (smaller footprint)" )
fi
if [[ " ${ var_os :- } " == "alpine" ]] ; then
2026-08-23 03:21:42 +02:00
var_cpu = " ${ var_cpu :- 1 } "
2026-08-18 12:38:22 +02:00
var_ram = " ${ var_ram :- 1024 } "
var_disk = " ${ var_disk :- 8 } "
var_version = " ${ var_version :- 3 .24 } "
else
2026-08-23 03:21:42 +02:00
var_cpu = " ${ var_cpu :- 2 } "
2026-08-18 12:38:22 +02:00
var_ram = " ${ var_ram :- 2048 } "
var_disk = " ${ var_disk :- 8 } "
var_version = " ${ var_version :- 13 } "
fi
2026-04-08 15:59:21 +02:00
header_info " $APP "
variables
color
catch_errors
2026-08-18 12:38:22 +02:00
update_deb_based() {
2026-04-08 15:59:21 +02:00
if [[ ! -f /usr/local/bin/ironclaw ]] ; then
msg_error "No ${ APP } Installation Found!"
exit
fi
2026-07-23 23:19:05 +02:00
RELEASE = "ironclaw-v0.29.1"
if check_for_gh_release "ironclaw-bin" "nearai/ironclaw" " ${ RELEASE } " "IronClaw 1.0 (Reborn) is a ground-up rearchitecture with an incompatible CLI/config format; pinned until this script supports it" ; then
2026-04-08 15:59:21 +02:00
msg_info "Stopping Service"
systemctl stop ironclaw
msg_ok "Stopped Service"
msg_info "Backing up Configuration"
cp /root/.ironclaw/.env /root/ironclaw.env.bak
msg_ok "Backed up Configuration"
2026-07-23 23:19:05 +02:00
fetch_and_deploy_gh_release "ironclaw-bin" "nearai/ironclaw" "prebuild" " ${ RELEASE } " "/usr/local/bin" \
2026-05-23 04:13:57 -04:00
"ironclaw- $( uname -m) -unknown-linux-gnu.tar.gz"
2026-04-08 15:59:21 +02:00
chmod +x /usr/local/bin/ironclaw
msg_info "Restoring Configuration"
cp /root/ironclaw.env.bak /root/.ironclaw/.env
rm -f /root/ironclaw.env.bak
msg_ok "Restored Configuration"
msg_info "Starting Service"
systemctl start ironclaw
msg_ok "Started Service"
msg_ok "Updated successfully!"
fi
2026-08-18 12:38:22 +02:00
}
update_alpine() {
if [[ ! -f /usr/local/bin/ironclaw ]] ; then
msg_error "No ${ APP } Installation Found!"
exit
fi
RELEASE = "ironclaw-v0.29.1"
if check_for_gh_release "ironclaw-bin" "nearai/ironclaw" " ${ RELEASE } " "IronClaw 1.0 (Reborn) is a ground-up rearchitecture with an incompatible CLI/config format; pinned until this script supports it" ; then
msg_info "Stopping Service"
rc-service ironclaw stop 2>/dev/null || true
msg_ok "Stopped Service"
msg_info "Backing up Configuration"
cp /root/.ironclaw/.env /root/ironclaw.env.bak
msg_ok "Backed up Configuration"
fetch_and_deploy_gh_release "ironclaw-bin" "nearai/ironclaw" "prebuild" " ${ RELEASE } " "/usr/local/bin" \
"ironclaw- $( uname -m) -unknown-linux-musl.tar.gz"
chmod +x /usr/local/bin/ironclaw
msg_info "Restoring Configuration"
cp /root/ironclaw.env.bak /root/.ironclaw/.env
rm -f /root/ironclaw.env.bak
msg_ok "Restored Configuration"
msg_info "Starting Service"
rc-service ironclaw start
msg_ok "Started Service"
msg_ok "Updated successfully!"
fi
}
function update_script() {
header_info
check_container_storage
check_container_resources
run_os_update
2026-04-08 15:59:21 +02:00
}
start
build_container
description
msg_ok "Completed Successfully!\n"
echo -e " ${ CREATING }${ GN }${ APP } setup has been successfully initialized! ${ CL } "
2026-05-23 04:13:57 -04:00
echo -e " ${ INFO }${ YW } Next Steps: ${ CL } "
echo -e " ${ TAB } 1. Configure remaining settings: ${ CL } "
echo -e " ${ TAB }${ TAB }${ BGN } /usr/local/bin/ironclaw onboard ${ CL } "
echo -e " ${ TAB } 2. Start the service: ${ CL } "
echo -e " ${ TAB }${ TAB }${ BGN } systemctl start ironclaw ${ CL } "
echo -e " ${ TAB } 3. Access the Web UI at: ${ CL } "
2026-06-03 11:03:13 +02:00
echo -e " ${ GATEWAY }${ BGN } http:// ${ IP } :3000 ${ CL } "
2026-05-23 04:13:57 -04:00
echo -e " ${ INFO }${ YW } Use Gateway Authentication Token to login: ${ CL } "
echo -e " ${ TAB }${ TAB }${ BGN } cat /root/.ironclaw/gateway.creds ${ CL } "