Files
ProxmoxVE/install/agentgateway-install.sh
T
push-app-to-main[bot] 00cf085cb1 Add agentgateway (ct) (#19216)
Co-authored-by: push-app-to-main[bot] <203845782+push-app-to-main[bot]@users.noreply.github.com>
2026-11-30 16:27:43 +01:00

60 lines
1.5 KiB
Bash

#!/usr/bin/env bash
# Copyright (c) 2021-2026 community-scripts ORG
# Author: andy-vdg
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://agentgateway.dev/
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
fetch_and_deploy_gh_release "agentgateway" "agentgateway/agentgateway" "singlefile" "latest" "/opt/agentgateway" "agentgateway-linux-$(arch_resolve "amd64" "arm64")"
msg_info "Configuring agentgateway"
mkdir -p /etc/agentgateway /opt/agentgateway_data
cat <<EOF >/etc/agentgateway/config.yaml
# yaml-language-server: \$schema=https://agentgateway.dev/schema/config
# The config agentgateway bootstraps on first run: traffic and the UI on port 4000,
# state in SQLite. The UI has no login until you add policies:
# https://agentgateway.dev/docs/standalone/latest/documentation/setup/ui/secure-ui/
config:
database:
url: sqlite:///opt/agentgateway_data/data.db
gateways:
default:
port: 4000
ui:
gateways: default
EOF
chmod 600 /etc/agentgateway/config.yaml
msg_ok "Configured agentgateway"
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/agentgateway.service
[Unit]
Description=agentgateway
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=root
ExecStart=/opt/agentgateway/agentgateway -f /etc/agentgateway/config.yaml
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now agentgateway
msg_ok "Created Service"
motd_ssh
customize
cleanup_lxc