官方使用的docker部署, 这里折腾了下改为系统直接安装了
安装好后丢caddy或者nginx反向代理一下就好了, 我这直接用cloudflare的隧道进行代理了.
cd /tmp
git clone "https://github.com/ConvoyPanel/coterm.git"
cd coterm
npm install
npm run build
cd ./src-rust
cargo run
cargo build --release
mkdir /home/coterm/public -p
install target/release/coterm /home/coterm/
cat>/home/coterm/.env<<EOF
CONVOY_URL=https://XXX.XXXX. XX #面板地址
COTERM_TOKEN="2|3tRjlqBJYXuBmjhCSjLJexQtebA1"
BACKEND_URL=0.0.0.0:2056
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