웹 UI 접속
- 브라우저를 여세요:
https://SERVER_IP - SSL 경고를 수락하세요 (자체 서명 인증서).
- 로그인 자격 증명 저장 위치:
/root/peanut/.env
서비스 관리
Docker:
cd /root/peanut
docker compose ps
docker compose restart
docker compose logs -f
Nginx:
systemctl status nginx
systemctl restart nginx
주요 파일 및 디렉토리
- 애플리케이션 루트:
/root/peanut/ - Docker Compose 파일:
/root/peanut/docker-compose.yml - 환경 변수 (인증 정보):
/root/peanut/.env - 애플리케이션 설정 데이터:
/root/peanut/config/ - Nginx 사이트 설정:
/etc/nginx/sites-available/peanut - 활성화된 Nginx 사이트:
/etc/nginx/sites-enabled/peanut - TLS 인증서:
/etc/nginx/ssl/fullchain.pem - TLS 개인 키:
/etc/nginx/ssl/privkey.pem - Nginx 로그:
/var/log/nginx/
도메인으로 SSL 활성화하기
1. 도메인을 서버 IP로 연결합니다.
2. Nginx 설정을 편집하여 server_name <IP>; 을 실제 도메인으로 교체합니다 (<your-domain>) HTTP (포트 80) 및 HTTPS (포트 443) 블록 모두에 적용합니다:
vim /etc/nginx/sites-available/trilium
3. Certbot 설치:
apt install -y certbot python3-certbot-nginx
4. 다음 명령어를 실행하여 유효한 Let's Encrypt 인증서를 발급받으세요:
certbot certonly --nginx --non-interactive --agree-tos --email [email protected] -d yourdomain.com
5. Nginx 설정의 SSL 경로를 교체합니다:
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. 변경 사항을 적용하기 위해 Nginx를 재시작합니다:
systemctl restart nginx
7. 브라우저를 열고 다음 주소로 접속하세요: https://yourdomain.com