Accessing the Web UI
- Otevřete prohlížeč:
https://SERVER_IP - Přijmout varování SSL (vlastnoručně podepsaný certifikát).
- Login credentials are stored in:
/root/peanut/.env
Správa služeb
Docker:
cd /root/peanut
docker compose ps
docker compose restart
docker compose logs -f
Nginx:
systemctl status nginx
systemctl restart nginx
Důležité soubory a adresáře
- Application root:
/root/peanut/ - Soubor Docker Compose:
/root/peanut/docker-compose.yml - Environment variables (credentials):
/root/peanut/.env - Application config data:
/root/peanut/config/ - Konfigurace webu Nginx:
/etc/nginx/sites-available/peanut - Enabled Nginx site:
/etc/nginx/sites-enabled/peanut - TLS certificate:
/etc/nginx/ssl/fullchain.pem - TLS private key:
/etc/nginx/ssl/privkey.pem - Nginx log:
/var/log/nginx/
Povolení SSL s doménou
1. Nasměrujte svou doménu na IP adresu serveru.
2. Upravte konfiguraci Nginx a nahraďte oba server_name <IP>; s vaší doménou (<your-domain>) pro bloky HTTP (port 80) i HTTPS (port 443):
vim /etc/nginx/sites-available/trilium
3. Nainstalujte Certbot:
apt install -y certbot python3-certbot-nginx
4. Spusťte následující příkaz a vygenerujte platný certifikát Let’s Encrypt:
certbot certonly --nginx --non-interactive --agree-tos --email [email protected] -d yourdomain.com
5. Nahraďte cesty SSL v konfiguraci Nginx:
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. Restartujte Nginx, aby se změny projevily:
systemctl restart nginx
7. Otevřete prohlížeč a přejděte na adresu: https://yourdomain.com