Audiobookshelf - Self-Hosted Audiobook and Podcast Server
Table of Contents
Overview
Audiobookshelf is a self-hosted audiobook and podcast server deployed in the Fako cluster. It provides a comprehensive media management system with features like automatic metadata fetching, progress syncing across devices, and a beautiful web interface. Audiobookshelf supports various audio formats and offers mobile apps for iOS and Android, making it a complete solution for managing and enjoying your audio library.
Key Features
- Multi-Format Support: MP3, M4A, M4B, FLAC, OGG, and more
- Automatic Metadata: Fetches cover art, descriptions, and metadata
- Progress Sync: Syncs playback position across all devices
- Mobile Apps: Native iOS and Android applications
- Multi-User: Support for multiple users with individual progress
- Series Management: Organize books by series and authors
- Podcast Support: Subscribe and manage podcast feeds
- Sleep Timer: Built-in sleep timer for bedtime listening
- Variable Playback Speed: Adjust playback speed to preference
Architecture
Components
- Deployment: Single-replica deployment
- Service: ClusterIP service on port 3005
- Storage: Three PersistentVolumeClaims:
- Config: Application configuration and database
- Metadata: Cover images and cached metadata
- Audiobooks: Media library storage
- ConfigMap: Basic configuration settings
- Security Context: Runs as user 1000
Resource Requirements
- Memory: 512Mi (request), 1Gi (limit)
- CPU: 250m (request), 1000m (limit)
- Storage:
- Config volume for database
- Metadata volume for images/cache
- Audiobooks volume for media files
Configuration
Deployment Settings
| Parameter | Value | Description |
|---|---|---|
| Image | ghcr.io/advplyr/audiobookshelf:2.26.0 | Audiobookshelf version |
| Port | 3005 | Web interface port |
| User/Group | 1000 | Non-root user |
| Volumes | 3 mounts | Config, metadata, and media |
Volume Mounts
/config: Database and configuration files/metadata: Cover art and metadata cache/audiobooks: Media library root directory
Usage
Accessing Audiobookshelf
Internal access:
http://audiobookshelf.audiobookshelf.svc.cluster.local:3005
Port forwarding for local access:
kubectl port-forward -n audiobookshelf svc/audiobookshelf 3005:3005
# Access at http://localhost:3005
External access (requires ingress configuration)
Initial Setup
- Access the web interface
- Create admin account on first visit
- Configure library folders:
- Add audiobook folders
- Add podcast folders
- Set up users if needed
- Configure server settings
Library Management
Adding Books
Upload files to the audiobooks volume:
- Via web interface upload
- Direct file copy to PVC
- Network share mount
Organize structure:
/audiobooks/ ├── Author Name/ │ ├── Book Title/ │ │ ├── track01.mp3 │ │ ├── track02.mp3 │ │ └── cover.jpg │ └── Another Book/ └── Podcasts/Scan library:
- Settings → Libraries → Scan
Metadata Management
- Automatic matching: Uses Google Books, OpenLibrary
- Manual editing: Edit any metadata field
- Cover art: Auto-fetch or upload custom
- Series grouping: Organize books in series
Mobile App Setup
- Install app from App Store/Play Store
- Server connection:
- Enter server URL
- Use external URL or VPN
- Login with your credentials
- Download books for offline listening
Operations
Checking Service Status
# Check pod status
kubectl get pods -n audiobookshelf
# View logs
kubectl logs -n audiobookshelf deployment/audiobookshelf
# Monitor resource usage
kubectl top pod -n audiobookshelf
Backup and Restore
Database Backup
# Backup SQLite database
kubectl exec -n audiobookshelf deployment/audiobookshelf -- \
cp /config/absdatabase.sqlite /config/absdatabase.sqlite.backup
# Copy to local
kubectl cp audiobookshelf/audiobookshelf-pod:/config/absdatabase.sqlite.backup \
./audiobookshelf-backup.sqlite
Full Backup
# Create tarball of config
kubectl exec -n audiobookshelf deployment/audiobookshelf -- \
tar -czf /tmp/config-backup.tar.gz /config
# Copy locally
kubectl cp audiobookshelf/audiobookshelf-pod:/tmp/config-backup.tar.gz \
./audiobookshelf-config-backup.tar.gz
Library Maintenance
Scan for New Books
- Via UI: Settings → Libraries → Scan
- Force rescan for metadata updates
Clean Missing Files
- Remove entries for deleted files
- Update file paths if moved
Manage Storage
# Check storage usage
kubectl exec -n audiobookshelf deployment/audiobookshelf -- \
df -h /audiobooks /metadata /config
Troubleshooting
Cannot Access Web Interface
- Check pod status:
kubectl describe pod -n audiobookshelf -l app=audiobookshelf
- Verify service:
kubectl get endpoints -n audiobookshelf
- Check logs:
kubectl logs -n audiobookshelf deployment/audiobookshelf --tail=100
Playback Issues
- Check file format: Ensure supported audio format
- Verify permissions: Files readable by user 1000
- Browser compatibility: Try different browser
- Network speed: Check bandwidth for streaming
Metadata Not Fetching
- Internet access: Verify pod can reach external APIs
- API limits: Some providers have rate limits
- Manual match: Try different search terms
- Custom metadata: Add manually if needed
Mobile App Connection Issues
- Server URL: Ensure correct external URL
- SSL/TLS: Valid certificate for HTTPS
- Firewall: Port accessible from internet
- Authentication: Correct username/password
Security Considerations
Authentication
- Local user accounts with bcrypt passwords
- No default credentials
- Session-based authentication
- API tokens for mobile apps
Network Security
- Use HTTPS for external access
- VPN for internal network access
- Implement firewall rules
- Rate limiting on API endpoints
Data Privacy
- All data stored locally
- No cloud dependencies
- User listening data private
- Optional anonymous statistics
Best Practices
- Strong passwords: Enforce password requirements
- HTTPS only: Use TLS for external access
- Regular updates: Keep Audiobookshelf updated
- Backup data: Regular automated backups
- Monitor access: Check logs for unusual activity
Performance Optimization
Transcoding
- Pre-transcode if needed
- Optimize audio bitrates
- Use efficient codecs
Caching
- Metadata cache in separate volume
- Browser cache for cover art
- CDN for static assets
Database
- Regular VACUUM operations
- Index optimization
- Query performance monitoring
Resource Scaling
# For larger libraries
resources:
requests:
memory: "1Gi"
cpu: "500m"
limits:
memory: "2Gi"
cpu: "2000m"
Monitoring
Key Metrics
- Active users/sessions
- Playback statistics
- Storage usage growth
- API response times
- Transcoding load
Health Checks
livenessProbe:
httpGet:
path: /ping
port: 3005
initialDelaySeconds: 30
periodSeconds: 10
readinessProbe:
httpGet:
path: /ping
port: 3005
initialDelaySeconds: 10
periodSeconds: 5
Integration Examples
With File Sync
Sync audiobooks from NAS:
# Add NFS volume mount
volumes:
- name: nas-audiobooks
nfs:
server: nas.local
path: /audiobooks
Reverse Proxy Setup
Nginx configuration:
location /audiobooks/ {
proxy_pass http://audiobookshelf:3005/;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $host;
# WebSocket support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
Backup Automation
#!/bin/bash
# backup-audiobookshelf.sh
NAMESPACE="audiobookshelf"
TIMESTAMP=$(date +%Y%m%d_%H%M%S)
# Backup database
kubectl exec -n $NAMESPACE deployment/audiobookshelf -- \
sqlite3 /config/absdatabase.sqlite ".backup /tmp/backup.db"
# Copy to persistent backup location
kubectl cp $NAMESPACE/audiobookshelf-pod:/tmp/backup.db \
/backups/audiobookshelf/db_$TIMESTAMP.sqlite
Maintenance
Regular Tasks
Daily:
- Monitor disk usage
- Check failed uploads
- Review error logs
Weekly:
- Backup database
- Update metadata
- Clean temp files
Monthly:
- Update Audiobookshelf
- Optimize database
- Review user activity
Upgrade Procedure
Backup everything:
- Database
- Configuration
- Cover art cache
Update deployment:
image: ghcr.io/advplyr/audiobookshelf:2.27.0
- Monitor startup:
kubectl logs -n audiobookshelf deployment/audiobookshelf -f
Future Improvements
- Implement SSO with Keycloak
- Add automated metadata enrichment
- Create backup CronJob
- Add Prometheus metrics
- Implement CDN for cover art
- Add support for comics/ebooks
- Create recommendation engine
- Add social features
- Implement bandwidth limiting
- Add parental controls