mirror of
https://github.com/gl-inet/glkvm-cloud.git
synced 2026-09-11 21:38:55 +00:00
40a1d23ea2
Add support for the self-hosted firmware WebUI interface. Signed-off-by: GL.iNet-Yongping.Xie <yongping.xie@gl-inet.com>
158 lines
5.5 KiB
Bash
Executable File
158 lines
5.5 KiB
Bash
Executable File
# Images
|
|
GLKVM_IMAGE=glzhitong/glkvm-cloud:latest
|
|
COTURN_IMAGE=coturn/coturn:edge-alpine
|
|
|
|
# Enable reverse proxy mode (e.g. Nginx in front of GLKVM Cloud).
|
|
# When enabled, TLS is handled by the proxy and GLKVM Cloud runs in plain HTTP.
|
|
#
|
|
# Note:
|
|
# In reverse-proxy mode, remote device access depends on the correct forwarded headers
|
|
# from the front-end proxy. If these headers are missing or incorrect, GLKVM Cloud may
|
|
# generate redirect URLs with the internal port (e.g. :10443).
|
|
#
|
|
# Please make sure your Nginx config includes:
|
|
# proxy_set_header Host $host;
|
|
# proxy_set_header X-Forwarded-Host $host;
|
|
# proxy_set_header X-Forwarded-Proto $scheme;
|
|
# proxy_set_header X-Forwarded-Port $server_port;
|
|
# proxy_set_header X-Real-IP $remote_addr;
|
|
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
#
|
|
# Reference (verified working example):
|
|
# https://github.com/gl-inet/glkvm-cloud/blob/main/docker-compose/nginx-reverse-proxy-example.conf
|
|
REVERSE_PROXY_ENABLED=false
|
|
|
|
# =====================================================
|
|
# Selfhost WebUI URL (Optional)
|
|
# =====================================================
|
|
# The full URL (including scheme) of the self-hosted cloud WebUI.
|
|
# This URL is written to the KVM device as /etc/kvmd/user/selfhost-cloud.json
|
|
# so firmware can read it and create a navigation link in the device's web page.
|
|
#
|
|
# If left empty, the URL is automatically derived from the browser's current
|
|
# address when copying the installation script.
|
|
#
|
|
# Examples:
|
|
# SELFHOST_WEBUI_URL=https://kvm.example.com
|
|
# SELFHOST_WEBUI_URL=https://192.168.1.100
|
|
SELFHOST_WEBUI_URL=
|
|
|
|
|
|
# =====================================================
|
|
# Device Remote Access Domain (Reverse Proxy Mode Only)
|
|
# =====================================================
|
|
# This option is used to generate the Remote Control URL for devices when
|
|
# running behind a reverse proxy.
|
|
#
|
|
# Effective ONLY when:
|
|
# REVERSE_PROXY_ENABLED=true
|
|
#
|
|
# When set, GLKVM Cloud will generate device access addresses as:
|
|
# https://<deviceId>.<DEVICE_ENDPOINT_HOST>/... (scheme is taken from X-Forwarded-Proto)
|
|
#
|
|
# Examples:
|
|
# DEVICE_ENDPOINT_HOST=kvm.example.com
|
|
# DEVICE_ENDPOINT_HOST=kvm.example.com:443
|
|
#
|
|
# Notes:
|
|
# - Do NOT include scheme (http:// or https://)
|
|
# - Do NOT include path (/xxx)
|
|
#
|
|
# Leave empty to derive the host/port from X-Forwarded-* headers (auto-detect).
|
|
DEVICE_ENDPOINT_HOST=
|
|
|
|
# =====================================================
|
|
# Platform Access Domain Restriction
|
|
# =====================================================
|
|
# Restrict the domain used to access the GLKVM Cloud platform.
|
|
#
|
|
# When set, only requests with a matching domain are allowed to access
|
|
# the Web UI and API. Requests using other domains will be rejected
|
|
# as invalid access.
|
|
#
|
|
# Examples:
|
|
# WEB_UI_HOST=www.example.com
|
|
#
|
|
# Notes:
|
|
# - Do NOT include scheme (http:// or https://)
|
|
# - Do NOT include path (/xxx)
|
|
# - Leave empty to disable domain restriction (allow access via any domain)
|
|
WEB_UI_HOST=
|
|
|
|
# GLKVM access IP seen by devices/users.
|
|
# Leave empty to auto-detect at container start.
|
|
GLKVM_ACCESS_IP=
|
|
|
|
# rttys
|
|
RTTYS_TOKEN=DeviceTokenYouCanChangeMe
|
|
RTTYS_PASS=StrongP@ssw0rd
|
|
# Admin username (leave empty to default to "admin")
|
|
# Only letters and digits are allowed (e.g. admin, Admin01). No spaces or special characters.
|
|
RTTYS_ADMIN_NAME=
|
|
RTTYS_DEVICE_PORT=5912
|
|
RTTYS_WEBUI_PORT=443
|
|
RTTYS_HTTP_PROXY_PORT=10443
|
|
|
|
# TURN
|
|
TURN_PORT=3478
|
|
TURN_USER=glkvmcloudwebrtcuser
|
|
TURN_PASS=AnotherS3cret
|
|
|
|
# LDAP Authentication (Optional)
|
|
LDAP_ENABLED=false
|
|
LDAP_SERVER=your-ldap-server.com
|
|
LDAP_PORT=389
|
|
LDAP_USE_TLS=false
|
|
LDAP_BIND_DN=cn=service-account,ou=users,dc=company,dc=com
|
|
LDAP_BIND_PASSWORD=service-password
|
|
LDAP_BASE_DN=ou=users,dc=company,dc=com
|
|
|
|
# User filter examples for different LDAP implementations:
|
|
# Active Directory: (&(objectClass=person)(sAMAccountName=%s))
|
|
# OpenLDAP: (&(objectClass=inetOrgPerson)(uid=%s))
|
|
# FreeIPA: (&(objectClass=person)(uid=%s))
|
|
# Generic LDAP: (uid=%s)
|
|
LDAP_USER_FILTER=(uid=%s)
|
|
|
|
LDAP_ALLOWED_GROUPS=admins,operators
|
|
LDAP_ALLOWED_USERS=user1,user2
|
|
|
|
# LDAP admin group: users in these groups are assigned the "admin" role.
|
|
# Comma-separated list of group CNs. Leave empty to default all LDAP users to "user" role.
|
|
LDAP_ADMIN_GROUP=
|
|
# LDAP admin users: these usernames are directly assigned the "admin" role.
|
|
# Comma-separated list of usernames. Leave empty to skip user-based admin assignment.
|
|
LDAP_ADMIN_USERS=
|
|
|
|
# OIDC Authentication (Optional, generic OIDC provider)
|
|
OIDC_ENABLED=false
|
|
OIDC_ISSUER=
|
|
OIDC_CLIENT_ID=
|
|
OIDC_CLIENT_SECRET=
|
|
OIDC_AUTH_URL=
|
|
OIDC_TOKEN_URL=
|
|
|
|
# Redirect URL registered in your OIDC provider.
|
|
# The path part (/auth/oidc/callback) is fixed by GLKVM Cloud and must not be changed.
|
|
# Example:
|
|
# OIDC_REDIRECT_URL=https://your-domain.example.com/auth/oidc/callback
|
|
OIDC_REDIRECT_URL=
|
|
|
|
OIDC_SCOPES="openid profile email"
|
|
|
|
# Email-based whitelist (exact email or domain like @example.com)
|
|
OIDC_ALLOWED_USERS=
|
|
# Subject (sub) whitelist (stable user IDs)
|
|
OIDC_ALLOWED_SUBS=
|
|
# Username whitelist (preferred_username or name)
|
|
OIDC_ALLOWED_USERNAMES=
|
|
# Groups whitelist (e.g. admin, devops)
|
|
OIDC_ALLOWED_GROUPS=
|
|
|
|
# OIDC admin group: users in these groups are assigned the "admin" role.
|
|
# Comma-separated list of group names. Leave empty to default all OIDC users to "user" role.
|
|
OIDC_ADMIN_GROUP=
|
|
# OIDC admin users: these users are directly assigned the "admin" role.
|
|
# Comma-separated list matching preferred_username or email. Leave empty to skip user-based admin assignment.
|
|
OIDC_ADMIN_USERS=
|