Dostęp do interfejsu internetowego
- Otwórz przeglądarkę:
https://SERVER_IP - Zaakceptuj ostrzeżenie SSL (certyfikat self-signed).
- Dane logowania są przechowywane w:
/root/peanut/.env
Zarządzanie usługami
Docker:
cd /root/peanut
docker compose ps
docker compose restart
docker compose logs -f
Nginx:
systemctl status nginx
systemctl restart nginx
Ważne pliki i katalogi
- Katalog główny aplikacji:
/root/peanut/ - Plik Docker Compose:
/root/peanut/docker-compose.yml - Zmienne środowiskowe (dane uwierzytelniające):
/root/peanut/.env - Dane konfiguracyjne aplikacji:
/root/peanut/config/ - Konfiguracja witryny Nginx:
/etc/nginx/sites-available/peanut - Włączona witryna Nginx:
/etc/nginx/sites-enabled/peanut - Certyfikat TLS:
/etc/nginx/ssl/fullchain.pem - Klucz prywatny TLS:
/etc/nginx/ssl/privkey.pem - Dziennik Nginxa:
/var/log/nginx/
Włączanie SSL z domeną
1. Skieruj swoją domenę na IP serwera.
2. Edytuj konfigurację Nginx i zamień oba server_name <IP>; z Twoją domeną (<your-domain>) dla bloków HTTP (port 80) i HTTPS (port 443):
vim /etc/nginx/sites-available/trilium
3. Zainstaluj Certbot:
apt install -y certbot python3-certbot-nginx
4. Uruchom poniższe polecenie, aby wygenerować ważny certyfikat Let’s Encrypt:
certbot certonly --nginx --non-interactive --agree-tos --email [email protected] -d yourdomain.com
5. Zamień ścieżki SSL w konfiguracji 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. Zrestartuj Nginx, aby zastosować zmiany:
systemctl restart nginx
7. Otwórz przeglądarkę i odwiedź: https://yourdomain.com