2026-05-21 09:50:06 +07:00
2026-05-21 13:28:04 +07:00
2026-05-03 20:43:26 +07:00
2026-05-03 20:43:26 +07:00
2026-05-21 13:50:13 +07:00
2026-05-21 13:50:51 +07:00
2026-05-03 20:43:26 +07:00
2026-05-15 21:04:37 +07:00

CLIProxyAPI Installer (Orange Pi / ARM64)

Script này giúp bạn:

  • Tự động tải bản mới nhất của CLIProxyAPI
  • Giải nén và cài binary cli-proxy-api
  • Tạo và quản lý systemd user service
  • Tự động chạy khi khởi động

Hỗ trợ:

  • Ubuntu / Debian
  • Kiến trúc ARM64 (aarch64) — phù hợp Orange Pi

🚀 Cài đặt nhanh

git clone https://git.ttcorp.net/orangepivietnam/CLIProxyAPI-auto-install-on-Orange-Pi cliproxyapi
cd cliproxyapi
cp config.example.yaml config.yaml
chmod +x setup.sh
./setup.sh

📦 Script sẽ làm gì?

1. Tải binary mới nhất

  • Gọi GitHub API để lấy release mới nhất
  • Lọc file: linux_aarch64.tar.gz
  • Tải về thư mục tạm

2. Giải nén & cài đặt

  • Extract vào thư mục tạm
  • Tìm file cli-proxy-api
  • Copy vào thư mục hiện tại
  • Set quyền executable

3. Dọn dẹp

  • Xóa file .tar.gz
  • Xóa thư mục tạm

4. Tạo systemd user service

Nếu chưa tồn tại:

  • Tạo file service tại: ~/.config/systemd/user/cliproxyapi.service
  • Enable + start service

Nếu đã tồn tại:

  • Chỉ restart service

⚙️ Sau khi cài đặt

Kiểm tra trạng thái service

systemctl --user status cliproxyapi


Xem log realtime

journalctl --user -u cliproxyapi -f


Restart service

systemctl --user restart cliproxyapi


Stop service

systemctl --user stop cliproxyapi


Disable auto start

systemctl --user disable cliproxyapi


⚠️ Quan trọng: Auto start khi boot

Nếu bạn chạy trên Orange Pi headless (không login):

👉 BẮT BUỘC chạy:

loginctl enable-linger $(whoami)

Nếu không:

  • Service không tự chạy khi reboot

📁 Cấu trúc sau khi cài

Ví dụ:

/home/orangepi/cliproxyapi/ ├── cli-proxy-api

Service sẽ dùng:

  • WorkingDirectory = thư mục bạn chạy script
  • HOME = $HOME hiện tại

Lỗi thường gặp

1. Không tìm thấy file download

Nguyên nhân:

  • GitHub API thay đổi
  • Không có file linux_aarch64

Cách xử lý:

  • Kiểm tra lại release

2. Permission denied khi chạy binary

chmod +x cli-proxy-api


3. Service không start

systemctl --user status cliproxyapi

Nguyên nhân:

  • Sai đường dẫn
  • Binary không tồn tại
  • Thiếu quyền execute

4. Service không chạy sau reboot

loginctl enable-linger $(whoami)


5. systemctl --user không hoạt động

export XDG_RUNTIME_DIR=/run/user/$(id -u)


6. Port đã bị chiếm

sudo lsof -i :PORT

kill -9


🔄 Cập nhật

./install.sh


📌 Yêu cầu hệ thống

  • ARM64 (aarch64)
  • Ubuntu / Debian
  • Có curl, wget, tar, systemd

🧾 License

Copyright (c) 2026 [Tran Thanh Tan / TTAI Solutions Software] All rights reserved.

No part of this software or its source code may be reproduced, distributed, or transmitted in any form or by any means, including photocopying, recording, or other electronic or mechanical methods, without the prior written permission of the copyright holder.

S
Description
Sử dụng repo này để cài tự động CLIProxyAPI sau đó chạy như một service trên Orange Pi. Trong mã nguồn có cả dashboard management.html
https://orangepi.vn
Readme 2.2 MiB
Languages
Python 48.1%
HTML 47.7%
Shell 4.2%