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
APP="GoDoxy"
var_tags="${var_tags:-reverse-proxy;go;webui}"
var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-2048}"
var_disk="${var_disk:-8}"
var_tags="${var_tags:-reverse-proxy;agent;proxmox}"
var_cpu="${var_cpu:-1}"
var_ram="${var_ram:-512}"
var_disk="${var_disk:-2}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
var_unprivileged="${var_unprivileged:-1}"
@@ -31,22 +31,13 @@ function update_script() {
if check_for_gh_release "godoxy" "yusing/godoxy"; then
msg_info "Stopping Service"
systemctl stop godoxy
systemctl stop godoxy-agent
msg_ok "Stopped Service"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "godoxy" "yusing/godoxy" "tarball" "latest" "/opt/godoxy-src"
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"
fetch_and_deploy_gh_release "godoxy" "yusing/godoxy" "singlefile" "latest" "/usr/local/bin" "godoxy-agent-linux-amd64"
msg_info "Starting Service"
systemctl start godoxy
systemctl start godoxy-agent
msg_ok "Started Service"
msg_ok "Updated successfully!"
fi
@@ -59,5 +50,5 @@ description
msg_ok "Completed Successfully!\n"
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 "${TAB}${GATEWAY}${BGN}http://${IP}:8888${CL}"
echo -e "${INFO}${YW} Configure certs and AGENT_PORT in:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}/etc/godoxy-agent.env${CL}"

View File

@@ -13,90 +13,42 @@ setting_up_container
network_check
update_os
msg_info "Installing Dependencies"
$STD apt install -y \
make \
libcap2-bin
msg_ok "Installed Dependencies"
fetch_and_deploy_gh_release "godoxy" "yusing/godoxy" "singlefile" "latest" "/usr/local/bin" "godoxy-agent-linux-amd64"
GO_VERSION="1.24" 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
msg_ok "Installed Bun"
fetch_and_deploy_gh_release "godoxy" "yusing/godoxy" "tarball" "latest" "/opt/godoxy-src"
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}
msg_info "Configuring GoDoxy Agent"
mkdir -p /var/lib/godoxy-agent
cat <<EOF >/etc/godoxy-agent.env
AGENT_NAME=$(hostname)
AGENT_PORT=8890
AGENT_CA_CERT=
AGENT_SSL_CERT=
DOCKER_SOCKET=/var/run/docker.sock
RUNTIME=docker
EOF
cat <<EOF >/opt/godoxy/config/config.yml
entrypoint:
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"
chmod 600 /etc/godoxy-agent.env
msg_ok "Configured GoDoxy Agent"
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/godoxy.service
cat <<EOF >/etc/systemd/system/godoxy-agent.service
[Unit]
Description=GoDoxy Reverse Proxy
Description=GoDoxy Agent
After=network.target
[Service]
Type=simple
User=root
WorkingDirectory=/opt/godoxy
EnvironmentFile=/opt/godoxy/.env
ExecStart=/usr/local/bin/godoxy
EnvironmentFile=/etc/godoxy-agent.env
WorkingDirectory=/var/lib/godoxy-agent
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now godoxy
systemctl enable -q --now godoxy-agent
msg_ok "Created Service"
motd_ssh
customize
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",
"updateable": true,
"privileged": false,
"interface_port": 8888,
"interface_port": null,
"documentation": "https://docs.godoxy.dev",
"website": "https://github.com/yusing/godoxy",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/godoxy.webp",
"config_path": "/opt/godoxy/config/config.yml",
"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.",
"config_path": "/etc/godoxy-agent.env",
"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": [
{
"type": "default",
"script": "ct/godoxy.sh",
"resources": {
"cpu": 2,
"ram": 2048,
"hdd": 8,
"cpu": 1,
"ram": 512,
"hdd": 2,
"os": "Debian",
"version": "13"
}
}
],
"default_credentials": {
"username": "admin",
"password": "Generated during install"
"username": null,
"password": null
},
"notes": [
{
"text": "The initial build from source takes several minutes.",
"type": "info"
"text": "This installs the GoDoxy Agent only. A running GoDoxy main server is required to connect to.",
"type": "warning"
},
{
"text": "Docker auto-discovery is not available in this bare-metal install. Configure routes manually via YAML files in /opt/godoxy/config/.",
"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.",
"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"
}
]