用面板的起因很简单:我个人名下有 6 台 VPS 小鸡,每台都手动搭了 Xray 以此来给我和我的几个朋友用代理,但我们共用的同一个 UUID。搭建那会儿用的很方便但这实际上并不靠谱,因为流量没监测,我也不能确定有没有外人使用我的代理。遂决定上面板统一管理。
选了 Remnawave,主要是它的 Panel + Node 分离架构比较干净(以及监控UI做的比较好看),支持每个用户独立 UUID 和订阅。
架构
Panel 中控面板单独跑在一台机器上,docker compose 部署,本身不跑 Xray,只负责管理配置和用户。 Node 作为节点需要装在每台落地的 VPS 上,一个容器(remnanode),从面板拉配置、跑 Xray、上报流量。两者通过加密端口(默认 20000)通信。
配置层面:维护一份全局 Xray JSON,所有节点的 inbound 都写在里面,每个 inbound 有唯一 tag。每台 Node 在面板里只勾选属于自己的 tag,只跑自己那部分。
用户层面是三层关系:inbound(流量入口)→ Host(把 inbound 发布出去,生成订阅链接)→ Internal Squad(用户组,决定哪个用户能看到哪些 Host)。用户必须属于含目标 Host 的 Squad,否则订阅返回空.
上图是接入完成后面板的状态
两种密钥
节点密钥(环境变量 SECRET_KEY):让 Node 和 Panel 互相认证、建立连接用的。面板创建节点时自动生成,填到 Node 的 docker-compose 里。
REALITY 私钥(X25519 密钥对):让客户端和节点做握手认证用的。用 docker exec -it remnanode xray x25519 生成,填在配置 JSON 的 privateKey 字段。可以多节点共用一个,公钥由面板自动算出来下发给客户端。
两个密钥完全独立,和 dest / SNI 也没关系。REALITY 的 dest 是借大厂证书做流量伪装,私钥是协议自己用来区分自己人与探测者的
遇到的问题
sing-box 不支持 VMess 入站。有台节点核心跑的是 sing-box,直接把原来的 VMess inbound 贴进去报错。直接删掉 2 个遗留 VMess 改成了 对应的VLESS
端口冲突。从旧节点迁移的机器,旧 Xray 还在宿主机上跑着占着端口,新容器起不来,报 bind: address already in use。ss -tlnp | grep <端口> 找到占用进程,systemctl stop 停掉 重启容器。
订阅返回空。订阅链接里全是占位提示(No hosts found / Check Hosts / Check Internal Squads),原因是 Host 没建,或者用户没放进含 Host 的 Squad 里。
Oracle 双层防火墙。Oracle 那台一开始死活连不上,本机 curl 127.0.0.1:port 是通的,面板那边就是 EHOSTUNREACH 或者 timeout。后来才发现它有两层防火墙,一层是云控制台的 Security List,另一层是机器里的 iptables(Oracle 镜像默认开着,优先级还比 ufw 高)。两层都得放行业务端口和 20000。
Cloudflare 规则选错。想让面板域名不带端口访问,用了 Redirect Rule(301 跳转),结果不对。应该用 Origin Rule, 只改 CF 回源端口,对访客 URL 透明。面板域名开橙云代理,节点域名必须灰云直连,不然REALITY 和真 TLS 过不了 CF 代理。
TLS 证书自动续期
有 2 台绑了自有域名、走真 TLS 的节点
证书要挂进容器,直接在 docker-compose 里用 volume 把证书目录挂进去,容器内路径对应配置里的 certificateFile / keyFile。不能用软链接, 容器看不到软链接目标。
acme.sh 默认续期只更新自己的工作目录,不会自动把新证书送到容器用的路径,结果就是节点拿着过期证书直到挂掉。解法是用 --install-cert 把搬运规则永久写进 acme.sh:
acme.sh --install-cert -d 你的域名 --ecc \
--fullchain-file /节点证书目录/fullchain.pem \
--key-file /节点证书目录/key.pem \
--reloadcmd "sudo docker restart 容器名"
此后每次续期:自动把新证书复制到容器目录 → 执行 reloadcmd 重启容器。acme.sh 自己会定时续期,这条命令只是告诉它续完要干嘛。跑完看日志出现 Installing full chain + Running reload cmd + Reload successful 就算配好了。
结果
目前 6 台全接进来,每个朋友都拥有其独立 UUID + 独立订阅,流量各自统计,TLS 续期也不用管。
The reason was simple enough. I personally own 6 budget VPS servers, each one running Xray manually as a proxy for me and a few friends, all sharing the same UUID. It worked fine at first, but it was not a great setup. I had no way to monitor traffic, and no way to know whether someone outside my group was using my proxy. So I decided to set up a panel to manage everything properly.
I went with Remnawave. The main reason is the clean Panel plus Node separation architecture (and the monitoring UI actually looks quite nice), plus it gives every user their own UUID and subscription link.
How It Works
The Panel runs as the control center on one dedicated machine, deployed with docker compose. It does not run Xray itself. It just manages config and users. Each VPS runs a Node container (remnanode) that pulls config from the Panel, runs Xray, and reports traffic back. The two communicate over an encrypted port (default 20000).
On the config side: you maintain one global Xray JSON file. Every node’s inbound is written in this one file, each with a unique tag. In the Panel, each Node picks only the tags that belong to it, so it only runs its own part of the config.
On the user side, there are three layers: inbound (the traffic entry point), then Host (publishes an inbound and generates a subscription link), then Internal Squad (a user group that controls which Hosts a user can see). A user has to belong to a Squad that contains the right Host, otherwise their subscription comes back empty.
The screenshot above shows the Panel after everything was connected.
Two Keys
Node key (environment variable SECRET_KEY): Used for the Node and Panel to authenticate each other and establish a connection. The Panel generates this automatically when you create a node entry. You paste it into the Node’s docker-compose file.
REALITY private key (X25519 key pair): Used for the client and node to do a handshake. Generate it with docker exec -it remnanode xray x25519 and put it in the privateKey field of your config JSON. Multiple nodes can share one key pair. The Panel calculates the public key automatically and pushes it to clients.
These two keys are completely independent from each other, and neither has anything to do with dest or SNI. The REALITY dest is just a big site’s domain used to disguise your traffic. The private key is what the protocol itself uses to tell real users apart from probes.
Problems I Hit
sing-box does not support VMess inbound. One of my nodes was running sing-box as its core. When I pasted in the old VMess inbound config it threw an error. I just deleted the 2 leftover VMess inbounds and switched them to VLESS.
Port conflict. On machines migrated from old nodes, the old Xray was still running on the host and holding the port. The new container would not start, giving bind: address already in use. Use ss -tlnp | grep <port> to find what is using it, systemctl stop to stop it, then restart the container.
Subscription returns empty. The subscription link just shows placeholder text (No hosts found / Check Hosts / Check Internal Squads). The cause is either the Host was not created, or the user was not added to a Squad that contains that Host.
Oracle’s two-layer firewall. At first I just could not connect to the Oracle box. curl 127.0.0.1:port worked on the machine itself, but the Panel kept getting EHOSTUNREACH or a timeout. It turned out Oracle has two firewalls: the Security List in the cloud console, and iptables on the machine itself (Oracle’s image turns it on by default, and it takes priority over ufw). Both layers need the business ports and port 20000 opened.
Wrong Cloudflare rule type. I wanted the Panel domain to be accessible without typing the port number in the URL. I used a Redirect Rule (301 redirect), which was wrong. The right tool is an Origin Rule, which only changes what port Cloudflare connects to on the backend, without touching the URL the visitor sees. Also, the Panel domain should go through Cloudflare’s proxy (orange cloud). Node domains must be DNS-only (grey cloud), otherwise REALITY and real TLS will not work through CF’s proxy.
TLS Certificate Auto-Renewal
Two of my nodes use real TLS with custom domains.
The certificate needs to be mounted into the container. In docker-compose, use a volume to map the certificate folder into the container, then point certificateFile and keyFile in your config to the paths inside the container. Do not use symlinks. The container cannot see what a symlink is pointing to.
By default, acme.sh only updates its own working directory when it renews a cert. It does not automatically copy the new certificate to wherever the container is reading from. The result is the node keeps using the expired certificate until things break. The fix is to use --install-cert to permanently register what acme.sh should do after each renewal:
acme.sh --install-cert -d your-domain --ecc \
--fullchain-file /path/to/node/certs/fullchain.pem \
--key-file /path/to/node/certs/key.pem \
--reloadcmd "sudo docker restart container-name"
After this, every renewal goes like this: acme.sh copies the new cert to the container’s folder, then runs the reloadcmd to restart the container. acme.sh renews on its own schedule. This command just tells it what to do once it has renewed. You know it is set up correctly when the log shows Installing full chain then Running reload cmd then Reload successful.
Result
All 6 servers are now connected to one panel. Each friend has their own UUID and subscription link, traffic is tracked per person, and TLS renewal takes care of itself.