การเข้าถึง
- เปิดในเบราว์เซอร์:
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 - ไฟล์ environment:
/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 certificates:
/etc/nginx/ssl/
การเปิดใช้งาน SSL ด้วยโดเมน (ไม่บังคับ)
1. ชี้โดเมนของคุณไปยัง IP ของ server
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) blocks:
vim /etc/nginx/sites-available/karakeep
๕. ติดตั้ง Certbot:
apt install -y certbot python3-certbot-nginx
6. รันคำสั่งต่อไปนี้เพื่อสร้างใบรับรอง Let’s Encrypt ที่ใช้งานได้:
certbot certonly --nginx --non-interactive --agree-tos --email [email protected] -d yourdomain.com
7. แทนที่ paths ของ SSL ใน Nginx config (ส่วน 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. เปิด browser และไปที่: https://yourdomain.com