ลด 50% ทุกแพลน เวลาจำกัด เริ่มต้นที่ $2.48/mo
พีนัท

พีนัท

PeaNUT คือแดชบอร์ด Network UPS Tools ตรวจสอบแบตเตอรี่ โหลด และรันไทม์ของ UPS ข้ามเซิร์ฟเวอร์จาก UI เว็บที่ดูสะอาดตา ส่วนหน้าที่เป็นมิตรสำหรับ NUT daemon พื้นฐาน ซึ่งเหมาะสำหรับโฮมแล็บที่ใช้หน่วย Cyberpower หรือ APC UPS

เวอร์ชัน

ล่าสุด

ระบบปฏิบัติการ

Ubuntu Server 24.04 LTS

นาที. แรม

1 GB

ประเภท IP

IPV4

การเข้าถึงเว็บ UI

  • เปิด browser ของคุณ: https://SERVER_IP
  • ยอมรับคำเตือน SSL (self-signed certificate)
  • ข้อมูลรับรองการเข้าสู่ระบบจะถูกเก็บไว้ใน: /root/peanut/.env

การจัดการบริการ

Docker:

cd /root/peanut
docker compose ps
docker compose restart
docker compose logs -f

งิงซ์:

systemctl status nginx
systemctl restart nginx

ไฟล์และไดเรกทอรีที่สำคัญ

  • รากของแอปพลิเคชัน: /root/peanut/
  • ไฟล์ Docker Compose: /root/peanut/docker-compose.yml
  • ตัวแปรสภาพแวดล้อม (ข้อมูลรับรอง): /root/peanut/.env
  • ข้อมูลการกำหนดค่าแอปพลิเคชัน: /root/peanut/config/
  • การกำหนดค่าไซต์ Nginx: /etc/nginx/sites-available/peanut
  • เปิดใช้งานไซต์ Nginx: /etc/nginx/sites-enabled/peanut
  • ใบรับรอง TLS: /etc/nginx/ssl/fullchain.pem
  • รหัสส่วนตัว TLS: /etc/nginx/ssl/privkey.pem
  • บันทึก Nginx: /var/log/nginx/

เปิดใช้งาน SSL กับโดเมน

1. ชี้โดเมนของคุณไปยัง IP ของ server

2. แก้ไข config ของ Nginx และเปลี่ยนทั้งคู่ server_name <IP>; กับโดเมนของคุณ (<your-domain>) สำหรับทั้ง HTTP (port 80) และ HTTPS (port 443) blocks:

vim /etc/nginx/sites-available/trilium

3. ติดตั้ง Certbot:

apt install -y certbot python3-certbot-nginx

4. รันคำสั่งต่อไปนี้เพื่อสร้าง Let’s Encrypt certificate ที่ใช้ได้:

certbot certonly --nginx --non-interactive --agree-tos --email [email protected] -d yourdomain.com

5. แทนที่ SSL paths ใน Nginx config:

vim /etc/apache2/sites-available/trilium
# Before:
    # ssl_certificate /etc/nginx/ssl/fullchain.pem;
    # ssl_certificate_key /etc/nginx/ssl/privkey.pem;
# After:
    # ssl_certificate /etc/letsencrypt/live/yourdomain.com/fullchain.pem;
    # ssl_certificate_key /etc/letsencrypt/live/yourdomain.com/privkey.pem;

6. รีสตาร์ท Nginx เพื่อใช้การเปลี่ยนแปลง:

systemctl restart nginx

7. เปิด browser และไปที่: https://yourdomain.com

เพิ่มเติมใน Monitoring

แอปที่เกี่ยวข้อง

ปรับใช้ PeaNUT ทันที เริ่มต้น $2.48/เดือน