Kener

基于 SvelteKit 的轻量级状态页面,用于简单、现代的监控。

访问

  1. 打开浏览器并访问: https://<SERVER_IP>
  2. A browser SSL warning is expected (self-signed certificate)
  3. Click Login
  4. 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.

申请详情