This commit is contained in:
MickLesk
2026-03-24 21:41:34 +01:00
parent b218d07e99
commit 5ee4a927d9
3 changed files with 37 additions and 102 deletions

View File

@@ -6,10 +6,10 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
# Source: https://github.com/yusing/godoxy # Source: https://github.com/yusing/godoxy
APP="GoDoxy" APP="GoDoxy"
var_tags="${var_tags:-reverse-proxy;go;webui}" var_tags="${var_tags:-reverse-proxy;agent;proxmox}"
var_cpu="${var_cpu:-2}" var_cpu="${var_cpu:-1}"
var_ram="${var_ram:-2048}" var_ram="${var_ram:-512}"
var_disk="${var_disk:-8}" var_disk="${var_disk:-2}"
var_os="${var_os:-debian}" var_os="${var_os:-debian}"
var_version="${var_version:-13}" var_version="${var_version:-13}"
var_unprivileged="${var_unprivileged:-1}" var_unprivileged="${var_unprivileged:-1}"
@@ -31,22 +31,13 @@ function update_script() {
if check_for_gh_release "godoxy" "yusing/godoxy"; then if check_for_gh_release "godoxy" "yusing/godoxy"; then
msg_info "Stopping Service" msg_info "Stopping Service"
systemctl stop godoxy systemctl stop godoxy-agent
msg_ok "Stopped Service" msg_ok "Stopped Service"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "godoxy" "yusing/godoxy" "tarball" "latest" "/opt/godoxy-src" fetch_and_deploy_gh_release "godoxy" "yusing/godoxy" "singlefile" "latest" "/usr/local/bin" "godoxy-agent-linux-amd64"
msg_info "Building GoDoxy (Patience)"
export PATH="/usr/local/go/bin:/root/.bun/bin:$PATH"
cd /opt/godoxy-src
sed -i '/^module github\.com\/yusing\/godoxy/!{/github\.com\/yusing\/godoxy/d}' go.mod
sed -i '/^module github\.com\/yusing\/goutils/!{/github\.com\/yusing\/goutils/d}' go.mod
$STD make build
cp /opt/godoxy-src/bin/godoxy /usr/local/bin/godoxy
msg_ok "Built GoDoxy"
msg_info "Starting Service" msg_info "Starting Service"
systemctl start godoxy systemctl start godoxy-agent
msg_ok "Started Service" msg_ok "Started Service"
msg_ok "Updated successfully!" msg_ok "Updated successfully!"
fi fi
@@ -59,5 +50,5 @@ description
msg_ok "Completed Successfully!\n" msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW} Access the WebUI using the following URL:${CL}" echo -e "${INFO}${YW} Configure certs and AGENT_PORT in:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8888${CL}" echo -e "${TAB}${GATEWAY}${BGN}/etc/godoxy-agent.env${CL}"

View File

@@ -13,90 +13,42 @@ setting_up_container
network_check network_check
update_os update_os
msg_info "Installing Dependencies" fetch_and_deploy_gh_release "godoxy" "yusing/godoxy" "singlefile" "latest" "/usr/local/bin" "godoxy-agent-linux-amd64"
$STD apt install -y \
make \
libcap2-bin
msg_ok "Installed Dependencies"
GO_VERSION="1.24" setup_go msg_info "Configuring GoDoxy Agent"
mkdir -p /var/lib/godoxy-agent
msg_info "Installing Bun" cat <<EOF >/etc/godoxy-agent.env
export BUN_INSTALL="/root/.bun" AGENT_NAME=$(hostname)
curl -fsSL https://bun.sh/install | $STD bash AGENT_PORT=8890
ln -sf /root/.bun/bin/bun /usr/local/bin/bun AGENT_CA_CERT=
msg_ok "Installed Bun" AGENT_SSL_CERT=
DOCKER_SOCKET=/var/run/docker.sock
fetch_and_deploy_gh_release "godoxy" "yusing/godoxy" "tarball" "latest" "/opt/godoxy-src" RUNTIME=docker
msg_info "Building GoDoxy (Patience)"
export PATH="/usr/local/go/bin:/root/.bun/bin:$PATH"
cd /opt/godoxy-src
sed -i '/^module github\.com\/yusing\/godoxy/!{/github\.com\/yusing\/godoxy/d}' go.mod
sed -i '/^module github\.com\/yusing\/goutils/!{/github\.com\/yusing\/goutils/d}' go.mod
$STD make build
cp /opt/godoxy-src/bin/godoxy /usr/local/bin/godoxy
msg_ok "Built GoDoxy"
msg_info "Configuring GoDoxy"
mkdir -p /opt/godoxy/{config,data/metrics,certs}
JWT_SECRET=$(openssl rand -base64 32)
GODOXY_PASS=$(openssl rand -base64 12 | tr -dc 'a-zA-Z0-9' | cut -c1-16)
cat <<EOF >/opt/godoxy/.env
TZ=UTC
GODOXY_HTTP_ADDR=:80
GODOXY_HTTPS_ADDR=:443
GODOXY_API_ADDR=0.0.0.0:8888
GODOXY_API_JWT_SECURE=false
GODOXY_API_JWT_SECRET=${JWT_SECRET}
GODOXY_API_USER=admin
GODOXY_API_PASSWORD=${GODOXY_PASS}
EOF EOF
cat <<EOF >/opt/godoxy/config/config.yml chmod 600 /etc/godoxy-agent.env
entrypoint: msg_ok "Configured GoDoxy Agent"
support_proxy_protocol: false
defaults:
healthcheck:
interval: 5s
timeout: 15s
retries: 3
providers:
include: []
homepage:
use_default_categories: true
timeout_shutdown: 5
EOF
msg_ok "Configured GoDoxy"
msg_info "Creating Service" msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/godoxy.service cat <<EOF >/etc/systemd/system/godoxy-agent.service
[Unit] [Unit]
Description=GoDoxy Reverse Proxy Description=GoDoxy Agent
After=network.target After=network.target
[Service] [Service]
Type=simple Type=simple
User=root User=root
WorkingDirectory=/opt/godoxy
EnvironmentFile=/opt/godoxy/.env
ExecStart=/usr/local/bin/godoxy ExecStart=/usr/local/bin/godoxy
EnvironmentFile=/etc/godoxy-agent.env
WorkingDirectory=/var/lib/godoxy-agent
Restart=on-failure Restart=on-failure
RestartSec=5 RestartSec=5
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
EOF EOF
systemctl enable -q --now godoxy systemctl enable -q --now godoxy-agent
msg_ok "Created Service" msg_ok "Created Service"
motd_ssh motd_ssh
customize customize
cleanup_lxc cleanup_lxc
echo -e "${TAB}${GATEWAY}${BGN}WebUI:${CL} http://${LOCAL_IP}:8888"
echo -e "${TAB}${GATEWAY}${BGN}Username:${CL} admin"
echo -e "${TAB}${GATEWAY}${BGN}Password:${CL} ${GODOXY_PASS}"

View File

@@ -8,44 +8,36 @@
"type": "ct", "type": "ct",
"updateable": true, "updateable": true,
"privileged": false, "privileged": false,
"interface_port": 8888, "interface_port": null,
"documentation": "https://docs.godoxy.dev", "documentation": "https://docs.godoxy.dev",
"website": "https://github.com/yusing/godoxy", "website": "https://github.com/yusing/godoxy",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/godoxy.webp", "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/godoxy.webp",
"config_path": "/opt/godoxy/config/config.yml", "config_path": "/etc/godoxy-agent.env",
"description": "GoDoxy is a lightweight, performant reverse proxy written in Go with a WebUI, automatic SSL certificate management, Docker auto-discovery, OpenID Connect support, and Proxmox integration.", "description": "GoDoxy Agent is a lightweight system agent that connects Proxmox nodes and LXC containers to a GoDoxy main server, enabling automatic route binding, LXC lifecycle control, and real-time log streaming.",
"install_methods": [ "install_methods": [
{ {
"type": "default", "type": "default",
"script": "ct/godoxy.sh", "script": "ct/godoxy.sh",
"resources": { "resources": {
"cpu": 2, "cpu": 1,
"ram": 2048, "ram": 512,
"hdd": 8, "hdd": 2,
"os": "Debian", "os": "Debian",
"version": "13" "version": "13"
} }
} }
], ],
"default_credentials": { "default_credentials": {
"username": "admin", "username": null,
"password": "Generated during install" "password": null
}, },
"notes": [ "notes": [
{ {
"text": "The initial build from source takes several minutes.", "text": "This installs the GoDoxy Agent only. A running GoDoxy main server is required to connect to.",
"type": "info" "type": "warning"
}, },
{ {
"text": "Docker auto-discovery is not available in this bare-metal install. Configure routes manually via YAML files in /opt/godoxy/config/.", "text": "After install, set AGENT_PORT and configure AGENT_CA_CERT / AGENT_SSL_CERT in /etc/godoxy-agent.env using certs generated by your GoDoxy main server.",
"type": "info"
},
{
"text": "The admin password is shown at the end of the installation log.",
"type": "info"
},
{
"text": "For HTTPS support, configure autocert in /opt/godoxy/config/config.yml and set GODOXY_API_JWT_SECURE=true in /opt/godoxy/.env.",
"type": "info" "type": "info"
} }
] ]