Trilium에 액세스하기
- 브라우저를 열고 방문하세요:
https://<SERVER-IP> - SSL 경고 수락 (자체 서명 인증서).
- 초기 설정을 따르십시오.
중요한 파일 및 디렉토리
- 배포 디렉터리:
/opt/trilium - Trilium 데이터(영구):
/opt/trilium/trilium-data - Docker Compose 파일:
/opt/trilium/docker-compose.yml - Nginx 사이트 구성:
/etc/nginx/sites-available/trilium
서비스 관리
Trilium(Docker):
cd /opt/trilium
docker compose ps
docker compose logs -f
docker compose restart
엔진엑스:
systemctl status nginx
systemctl restart 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