Files
SimpleRemoter/server/go/deploy/yama-server.env.example
T
yuanyuanxianganddeepseek-v4-pro 42df128f62 Feature: Support subpath deployment for Go web UI
Add optional YAMA_WEB_BASE_PATH to mount the whole web UI (index, manifest,
static assets, /health, /api/devices, /ws) under a URL prefix such as
/remoter behind a reverse proxy. index.html now uses a __BASE_PATH__
placeholder substituted at serve time, the PWA manifest start_url is rooted
at the base path, and a mount wrapper redirects the bare prefix to prefix/
and strips it before routing. Include nginx, systemd, and env-file deployment
examples for the subpath setup.

The shared placeholder is also handled by the MFC server, which serves from
the domain root and strips __BASE_PATH__ (to "") so its web remote desktop
URLs stay rooted.

Co-Authored-By: deepseek-v4-pro
2026-09-11 12:48:21 +02:00

65 lines
2.5 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ============================================================
# YAMA 服务端环境变量(完整版)
# systemd 通过 EnvironmentFile=-/etc/yama/server.env 读取
# 行首 "#" = 未启用(保持默认);去掉 "#" 即生效
# ============================================================
# ---------- 账号 / 密码 ----------
# Web 管理员账号 "admin" 的初始密码。回退链:
# YAMA_WEB_ADMIN_PASS → YAMA_PWD → 硬编码 "admin"
# 生产环境务必设置,否则会以 admin/admin 裸奔(启动日志会红色告警)
YAMA_WEB_ADMIN_PASS=ChangeMe_Strong
# 超级密码(明文)。TCP 授权用,也是上面 Web 管理员密码的回退来源
#YAMA_PWD=
# TCP 授权的密码哈希(SHA-256 十六进制)。与 YAMA_PWD 二选一;
# 未设置时用内置占位默认值(生产应覆盖)
#YAMA_PWDHASH=
# 持久化 Web 用户文件路径(默认相对工作目录的 users.json)
#YAMA_USERS_FILE=/opt/yama/users.json
# ---------- 网页端 / 反向代理 ----------
# 子路径部署前缀(方案B)。空 = 根路径(方案A);有值须与 nginx location 一致
YAMA_WEB_BASE_PATH=/remoter
# "1" = 信任反向代理的 X-Forwarded-For(nginx 在 Go 前面时务必开启,
# 否则登录限流会把所有客户端当成 nginx 同一个 IP)
YAMA_WEB_TRUST_PROXY=1
# WebSocket Origin 白名单(逗号分隔)。空 = 仅允许同源
#YAMA_WEB_ALLOWED_ORIGINS=https://你的域名
# ---------- 授权 / 许可(signer)----------
# 优先级:YAMA_SIGN_PASSWORD > YAMA_LICENSE_DISABLED=1 > YAMA_LICENSE_TOKEN > 匿名试用
# 本地签名主密钥(HMAC)。设置即进入 LocalSigner 模式(运营方自部署)
#YAMA_SIGN_PASSWORD=
# "1" = 关闭授权校验(NoOpSigner,离线/开发用;客户端将拒绝屏幕/文件功能)
#YAMA_LICENSE_DISABLED=1
# 许可服务器 URL(RemoteSigner 付费客户 / 试用模式的默认地址)
#YAMA_LICENSE_SERVER=
# 客户 JWT(付费客户解锁设备配额)
#YAMA_LICENSE_TOKEN=
# 缓存 TTL(小时,RemoteSigner 离线缓存,默认 24)
#YAMA_LICENSE_OFFLINE_HRS=24
# ---------- 兼做许可服务器(可选,LocalSigner-as-LS)----------
# issue-token 子命令用:RSA 私钥 PEM 路径(与公钥配对)
#YAMA_LICENSE_PRIVATE_KEY=
# 对外签发许可用:RSA 公钥 PEM 路径 + 监听地址(如 ":8443")
#YAMA_LICENSE_PUBLIC_KEY=
#YAMA_LICENSE_HTTP_ADDR=:8443
# 配额状态持久化文件路径
#YAMA_LICENSE_STATE_PATH=/opt/yama/license_state.json