ConvoyPanel整合coterm的novnc代理服务

官方使用的docker部署, 这里折腾了下改为系统直接安装了

安装好后丢caddy或者nginx反向代理一下就好了, 我这直接用cloudflare的隧道进行代理了.

安装

mkdir  /home/coterm/public -p
cd  /home/coterm/public 
git clone https://github.com/novnc/noVNC

cd /tmp
git clone "https://github.com/ConvoyPanel/coterm.git"
cd coterm
npm install
npm run build
cp -rf  ./build/*   /home/coterm/public/
#编译coterm主程序
cd ./src-rust
cargo run
cargo build --release
install  target/release/coterm /home/coterm/

 环境变量配置

cat>/home/coterm/.env<<EOF
CONVOY_URL=https://XXX.XXXX. XX    #面板地址
COTERM_TOKEN="XXXXX"
BACKEND_PORT=2600
DANGEROUS_DISABLE_TLS_VERIFICATION=false
RUST_BACKTRACE="full"
EOF

系统服务

cat>/etc/systemd/system/coterm.service<<EOF
[Unit]
Description=Coterm Service
After=network.target nss-lookup.target

[Service]
Type = simple
EnvironmentFile=/home/coterm/.env
ExecStart=/home/coterm/coterm
Restart=on-failure

[Install]
WantedBy=multi-user.target
EOF

添加新评论 »