เข้าถึง
- เปิดเบราว์เซอร์ของคุณและเข้าไปที่:
https://<SERVER_IP> - คาดว่าจะมีการแจ้งเตือน SSL จากเบราว์เซอร์ (ใบรับรองที่ลงนามด้วยตนเอง)
- Click Login
- Create your admin account
ไฟล์และไดเร็กทอรีที่สำคัญ
- Kener installation directory:
/root/kener - ไฟล์สภาพแวดล้อม:
/root/kener/.env - ไฟล์ Docker Compose:
/root/kener/docker-compose.yml - ปริมาณข้อมูล Redis:
/var/lib/docker/volumes/kener_redis/_data - ปริมาณข้อมูลของ PostgreSQL:
/var/lib/docker/volumes/kener_postgres/_data - การตั้งค่าเว็บไซต์ Nginx:
/etc/nginx/sites-available/kener - Enabled site:
/etc/nginx/sites-enabled/kener - ใบรับรอง SSL:
/etc/nginx/ssl/fullchain.pemและ/etc/nginx/ssl/privkey.pem
การจัดการบริการ
# View logs
docker compose -f /root/kener/docker-compose.yml logs -f
# Restart services
docker compose -f /root/kener/docker-compose.yml restart
# Stop services
docker compose -f /root/kener/docker-compose.yml down
# Start again
docker compose -f /root/kener/docker-compose.yml up -d
การเปิดใช้งาน SSL กับโดเมน
1. ชี้โดเมนของคุณไปยังที่อยู่ IP ของเซิร์ฟเวอร์
2. Edit /root/kener/.env to set your domain as ORIGIN: ORIGIN=https://yourdomain.com
3. สร้างบริการขึ้นมาใหม่:
cd /root/kener/
docker compose up -d
4. แก้ไขไฟล์การตั้งค่า Nginx และแทนที่ทั้งสองส่วน server_name <IP>; ด้วยโดเมนของคุณ (<your-domain>สำหรับทั้งบล็อก HTTP (พอร์ต 80) และ HTTPS (พอร์ต 443):
vim /etc/nginx/sites-available/kener
5. ติดตั้ง 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. Replace SSL paths in Nginx config:
vim /etc/nginx/sites-available/kener
# 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
10. After logging in, go to Site Configuration and update the Site URL field to match your domain (https://yourdomain.com-
หมายเหตุ
- Redis is used for queues and caching
- PostgreSQL stores all application data
- Public URL is defined via
ORIGINใน.env(required for CSRF protection) - Nginx handles HTTPS and reverse proxy
- Once you configure a proper domain name and SSL certificate, update Kener’s Site URL to match your domain. Make sure the domain and SSL are active first—updating the Site URL before that may not work correctly.
