Bỏ qua để đến nội dung

Cài đặt Native

Không cần Docker. Truy cập binary host như claude, git, gh, v.v.

Terminal window
sudo apt install ttyd tmux
# Hoặc: sudo snap install ttyd
  1. Cài đặt dependencies (xem ở trên)

  2. Chạy lệnh deploy

    Terminal window
    ./scripts/termote.sh install native
  3. Truy cập tại http://localhost:7680

  • Cần truy cập binary host (claude, git, gh, v.v.)
  • Không có Docker/Podman
  • Kiểm soát đầy đủ dịch vụ
Terminal window
# Kiểm tra processes
ps aux | grep ttyd
ps aux | grep tmux-api
# Khởi động lại
./scripts/termote.sh install native
Terminal window
./scripts/termote.sh health # Kiểm tra sức khỏe
ss -tlnp | grep -E "7680|7681" # Kiểm tra cổng
Terminal window
ps aux | grep ttyd # Kiểm tra ttyd đang chạy
ps aux | grep tmux-api # Kiểm tra tmux-api đang chạy
lsof -i :7680 # Xác minh cổng chính
lsof -i :7681 # Xác minh cổng ttyd

Chế độ native mặc định không ghi logs. Để xem logs:

Terminal window
# Dừng dịch vụ
./scripts/termote.sh uninstall native
# Chạy ttyd với logs (terminal 1)
ttyd -W -i lo -p 7681 tmux new-session -A -s main
# Chạy tmux-api với logs (terminal 2)
cd tmux-api
TERMOTE_PORT=7680 TERMOTE_BIND=127.0.0.1 \
TERMOTE_PWA_DIR=../pwa/dist ./tmux-api-native
LỗiGiải pháp
Cổng đang dùnglsof -i :7680 rồi kill process
Thiếu ttydbrew install ttyd (macOS) hoặc apt install ttyd
Thiếu binarycd tmux-api && go build -o tmux-api-native .
PWA chưa buildcd pwa && pnpm build
Terminal window
tmux list-sessions # Liệt kê sessions
tmux attach -t main # Kết nối vào session
tmux kill-session -t main # Reset session
Terminal window
curl http://localhost:7680/api/tmux/health
curl http://localhost:7680/api/tmux/sessions

Chạy lại installer - sẽ so sánh version và hỏi trước khi cập nhật:

Terminal window
curl -fsSL https://raw.githubusercontent.com/lamngockhuong/termote/main/scripts/get.sh | bash

Tùy chọn:

  • --yes - Tự động cập nhật không hỏi
  • --download-only - Chỉ tải về, không cài đặt
Terminal window
./scripts/termote.sh uninstall native
git pull origin main
./scripts/termote.sh install native
Terminal window
./scripts/termote.sh uninstall native