การเข้าถึง
- เปิดในเบราว์เซอร์:
https://<SERVER_IP> - ยืนยันคำเตือน SSL (self-signed certificate)
- สร้างบัญชีใหม่ผ่าน web interface
- บัญชีแรกที่สร้างจะได้รับสิทธิ์ admin
การตั้งค่า
ตัวแปรสภาพแวดล้อมเก็บอยู่ใน: /root/karakeep/.env
แก้ไข .env or docker-compose.yml เพื่อใช้การเปลี่ยนแปลง
docker compose -f /root/karakeep/docker-compose.yml up -d
ปิดการสมัครสมาชิกสาธารณะ (ไม่บังคับ)
แก้ไข .env และแก้ไข DISABLE_SIGNUPS:
DISABLE_SIGNUPS=true
นำไปใช้การเปลี่ยนแปลง
docker compose -f /root/karakeep/docker-compose.yml up -d
เปิดใช้งานฟีเจอร์ AI (ไม่บังคับ)
แก้ไข /root/karakeep/docker-compose.yml ภายใต้ web บริการ:
environment:
# OPENAI_API_KEY: "your_openai_api_key_here"
ยกเลิกการคอมเมนต์บรรทัดนั้นแล้วใส่ OpenAI API key ของคุณ:
environment:
OPENAI_API_KEY: "sk-xxxxxxxxxxxxxxxxxxxxxxxx"
นำไปใช้การเปลี่ยนแปลง
docker compose -f /root/karakeep/docker-compose.yml up -d
ไฟล์และไดเรกทอรีสำคัญ
- ไดเรกทอรี่แอปพลิเคชัน:
/root/karakeep - ไฟล์ Docker Compose:
/root/karakeep/docker-compose.yml - ไฟล์สภาพแวดล้อม:
/root/karakeep/.env - KaraKeep ข้อมูล
/var/lib/docker/volumes/karakeep_data/_data - ข้อมูล Meilisearch
/var/lib/docker/volumes/karakeep_meilisearch/_data - Nginx การกำหนดค่า:
/etc/nginx/sites-available/karakeep - ใบรับรอง SSL:
/etc/nginx/ssl/
การเปิดใช้งาน SSL ด้วยโดเมน (ไม่บังคับ)
1. ชี้โดเมนของคุณไปที่ IP ของเซิร์ฟเวอร์
2. แก้ไขไฟล์ /root/karakeep/docker-compose.yml ไฟล์สำหรับตั้งค่าชื่อโดเมนของคุณ: NEXTAUTH_URL=https://your.domain.com
3. สร้างบริการใหม่:
cd /root/karakeep/
docker compose up -d
4. แก้ไขการตั้งค่า Nginx และแทนที่ทั้งสอง server_name <IP>; ด้วยโดเมนของคุณ (<your-domain>) สำหรับทั้งบล็อก HTTP (port 80) และ HTTPS (port 443):
vim /etc/nginx/sites-available/karakeep
๕. ติดตั้ง Certbot:
apt install -y certbot python3-certbot-nginx
6. รันคำสั่งต่อไปนี้เพื่อสร้าง Let's Encrypt certificate ที่ถูกต้อง:
certbot certonly --nginx --non-interactive --agree-tos --email [email protected] -d yourdomain.com
7. แทนที่พาธ SSL ในการตั้งค่า Nginx (ส่วน TLS):
vim /etc/nginx/sites-available/karakeep
# 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;
8. รีสตาร์ท Nginx เพื่อใช้การเปลี่ยนแปลง:
systemctl restart nginx
9. เปิดเบราว์เซอร์และเข้าไปที่: https://yourdomain.com