접근
- URL 열기:
https://<SERVER_IP> - 브라우저 인증서 경고를 수락하세요 (인증서는 자체 서명입니다)
- 초기 설정 마법사를 따라 root 사용자를 만드세요
중요한 파일과 디렉토리
- Config File:
/etc/default/audiobookshelf - Service File:
/lib/systemd/system/audiobookshelf.service - Nginx 설정:
/etc/nginx/sites-available/audiobookshelf - SSL 인증서:
/etc/nginx/ssl/fullchain.pem - SSL 개인 키:
/etc/nginx/ssl/privkey.pem - Access Log:
/var/log/nginx/audiobookshelf.access.log - Error Log:
/var/log/nginx/audiobookshelf.error.log
서비스 관리
서비스 상태 확인:
systemctl status audiobookshelf
서비스 다시 시작:
systemctl restart audiobookshelf
서비스 중지:
systemctl stop audiobookshelf
서비스 시작:
systemctl start audiobookshelf
로그 보기:
journalctl -u audiobookshelf -f
Nginx 관리
테스트 구성:
nginx -t
Nginx 재시작:
systemctl restart nginx
Nginx 다시 로드:
systemctl reload nginx
Nginx 상태 확인:
systemctl status nginx
도메인으로 SSL 활성화
1. 도메인을 서버 IP로 지정하세요.
2. Install Certbot:
apt install -y certbot python3-certbot-nginx
3. Generate a Let's Encrypt certificate:
certbot certonly --nginx --non-interactive --agree-tos --email [email protected] -d yourdomain.com
4. Replace SSL paths in Nginx config:
vim /etc/nginx/sites-available/audiobookshelf
# 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;
5. Replace server_name _; with your domain in both HTTP and HTTPS blocks:
vim /etc/nginx/sites-available/audiobookshelf
# Before:
server_name: _;
# After:
server_name: yourdomain.com;
6. Reload Nginx:
systemctl reload nginx
참고
- Audiobookshelf는 네이티브 systemd 서비스로 실행됩니다
- Nginx acts as a reverse proxy and TLS terminator
- HTTPS는 기본적으로 자체 서명 인증서를 사용하여 활성화됩니다
- Large uploads are supported (
client_max_body_size 10240M) - Audiobookshelf listens on
127.0.0.1:13378and is only accessible through Nginx