Přístup
- Otevřít URL:
https://<SERVER_IP> - Přijměte upozornění prohlížeče o certifikátu (certifikát je self-signed)
- Postupujte podle průvodce počátečním nastavením a vytvořte uživatele root
Důležité soubory a adresáře
- Config File:
/etc/default/audiobookshelf - Service File:
/lib/systemd/system/audiobookshelf.service - Konfigurace Nginx:
/etc/nginx/sites-available/audiobookshelf - SSL Certifikát:
/etc/nginx/ssl/fullchain.pem - Soukromý klíč SSL:
/etc/nginx/ssl/privkey.pem - Access Log:
/var/log/nginx/audiobookshelf.access.log - Error Log:
/var/log/nginx/audiobookshelf.error.log
Správa služeb
Zkontrolujte stav služby:
systemctl status audiobookshelf
Restartovat službu:
systemctl restart audiobookshelf
Zastavit službu:
systemctl stop audiobookshelf
Spustit službu:
systemctl start audiobookshelf
Zobrazit logy:
journalctl -u audiobookshelf -f
Správa Nginx
Konfigurace testu:
nginx -t
Restartovat Nginx:
systemctl restart nginx
Přenačíst Nginx:
systemctl reload nginx
Zkontrolovat stav Nginx:
systemctl status nginx
Povolení SSL s doménou
1. Nasměruj svou doménu na IP serveru.
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
Poznámky
- Audiobookshelf běží jako nativní systemd služba
- Nginx acts as a reverse proxy and TLS terminator
- HTTPS je ve výchozím nastavení povoleno s self-signed certifikátem
- Large uploads are supported (
client_max_body_size 10240M) - Audiobookshelf listens on
127.0.0.1:13378and is only accessible through Nginx