Stream Any Format
Play all audio formats directly in your browser or mobile app
Audiobookshelf is a powerful, open-source, self-hosted audiobook and podcast server that puts you in complete control of your audio library. With native mobile apps for Android and iOS, multi-user support, and seamless progress synchronization across all your devices, Audiobookshelf delivers a premium listening experience without subscription fees.
Built with Node.js and featuring a beautiful Vue.js web interface, Audiobookshelf can stream any audio format on-the-fly, automatically fetch metadata and cover art, and even manage podcasts with auto-download capabilities. With over 10,000 GitHub stars, it’s become the go-to solution for self-hosted audiobook enthusiasts.
Stream Any Format
Play all audio formats directly in your browser or mobile app
Mobile Apps
Native Android and iOS apps with offline listening support
Multi-User
Separate progress tracking and permissions per user
Podcast Support
Subscribe to podcasts with automatic episode downloads
Audiobookshelf provides a comprehensive audiobook and podcast management solution:
| Feature | Description |
|---|---|
| Chromecast Support | Cast to Chromecast devices from web and Android apps |
| Progress Sync | Automatic sync across all devices per user |
| Metadata Fetching | Automatically fetch book info and covers from multiple sources |
| Chapter Editor | Edit chapters with lookup via Audnexus API |
| Audio Merge | Combine multiple audio files into a single m4b |
| Embed Metadata | Write metadata and covers into your audio files |
| Ebook Support | Read ePub, PDF, CBR, CBZ with send-to-device (Kindle) |
| RSS Feeds | Generate RSS feeds for podcasts and audiobooks |
| Auto-Detection | Library auto-updates without manual rescanning |
| Audio | Ebooks |
|---|---|
| MP3, M4A, M4B | ePub |
| FLAC, OGG, OPUS | |
| WAV, WMA | CBR, CBZ |
| AAC, AIFF |
Before deploying Audiobookshelf on Klutch.sh, ensure you have:
Set up your Audiobookshelf deployment:
Create a Dockerfile for your Audiobookshelf deployment:
FROM ghcr.io/advplyr/audiobookshelf:latest
# Set timezone (adjust to your timezone)ENV TZ=America/New_York
# Expose the internal port (container listens on port 80)EXPOSE 80
# Create necessary directoriesRUN mkdir -p /audiobooks /podcasts /config /metadata
# Default command is already set in base imageFor more control over your deployment:
FROM ghcr.io/advplyr/audiobookshelf:latest
# Environment configurationENV TZ=America/New_YorkENV NODE_ENV=production
# Create directory structureRUN mkdir -p /audiobooks /podcasts /ebooks /config /metadata
# Set permissionsRUN chmod -R 755 /audiobooks /podcasts /ebooks /config /metadata
# Health checkHEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \ CMD wget --no-verbose --tries=1 --spider http://localhost:80/ || exit 1
EXPOSE 80Audiobookshelf supports extensive configuration through environment variables:
| Variable | Default | Description |
|---|---|---|
TZ | UTC | Server timezone |
CONFIG_PATH | /config | Path to configuration directory |
METADATA_PATH | /metadata | Path to metadata directory |
PORT | 80 | Internal listening port |
HOST | 0.0.0.0 | Host to bind to |
ACCESS_TOKEN_EXPIRY | 43200 | Access token expiry in seconds (12 hours) |
REFRESH_TOKEN_EXPIRY | 604800 | Refresh token expiry in seconds (7 days) |
ALLOW_CORS | 0 | Enable CORS (set to 1) |
Test your Audiobookshelf setup locally:
services: audiobookshelf: image: ghcr.io/advplyr/audiobookshelf:latest container_name: audiobookshelf ports: - "13378:80" volumes: - ./audiobooks:/audiobooks - ./podcasts:/podcasts - ./ebooks:/ebooks - audiobookshelf-config:/config - audiobookshelf-metadata:/metadata environment: - TZ=America/New_York restart: unless-stopped
volumes: audiobookshelf-config: audiobookshelf-metadata:Push your repository to GitHub
git initgit add .git commit -m "Initial Audiobookshelf configuration"git remote add origin https://github.com/yourusername/audiobookshelf.gitgit push -u origin mainCreate a new app on Klutch.sh
Configure environment variables
| Variable | Value |
|---|---|
TZ | Your timezone (e.g., America/New_York) |
Configure the internal port
Set up persistent storage
| Mount Path | Size | Purpose |
|---|---|---|
/audiobooks | 100 GB+ | Your audiobook library (adjust based on collection) |
/podcasts | 50 GB | Podcast episodes |
/ebooks | 10 GB | Ebook files |
/config | 1 GB | Database and user settings |
/metadata | 10 GB | Covers, cache, backups, and logs |
Deploy your application
https://your-app.klutch.shCreate your admin account
After your first login:
/audiobooks/podcasts/ebooks to an audiobook libraryOrganize your audiobooks for optimal metadata detection:
/audiobooks/├── Terry Goodkind/ # Author folder│ └── Sword of Truth/ # Series folder│ ├── Vol 1 - 1994 - Wizards First Rule/│ │ ├── Audio Track 1.mp3│ │ ├── Audio Track 2.mp3│ │ └── cover.jpg│ └── Vol 2 - 1995 - Stone of Tears/│ └── Audiobook.m4b└── Steven Levy/ └── Hackers - Heroes of the Computer Revolution/ └── Audiobook.m4aAudiobookshelf parses folder names for metadata:
| Pattern | Example |
|---|---|
| Title only | Wizards First Rule |
| With narrator | Wizards First Rule {'{'}Sam Tsoutsouvas{'}'} |
| With year | 1994 - Wizards First Rule |
| With series | Vol 1 - 1994 - Wizards First Rule |
| Full format | Vol. 1 - 1994 - Wizards First Rule - Subtitle {'{'}Narrator{'}'} |
https://your-app.klutch.sh| Setting | Description |
|---|---|
| Auto Download | Enable automatic episode downloads |
| Max Episodes | Limit downloaded episodes to save space |
| Schedule | Set check interval (hourly, daily, etc.) |
| Type | Description |
|---|---|
| Admin | Full server access and configuration |
| User | Can access assigned libraries and features |
| Guest | Limited access, view-only |
Audiobookshelf provides a comprehensive REST API for integrations:
# Get all librariescurl "https://your-app.klutch.sh/api/libraries" \ -H "Authorization: Bearer YOUR_TOKEN"
# Get library itemscurl "https://your-app.klutch.sh/api/libraries/{library-id}/items" \ -H "Authorization: Bearer YOUR_TOKEN"
# Get listening progresscurl "https://your-app.klutch.sh/api/me/listening-sessions" \ -H "Authorization: Bearer YOUR_TOKEN"Full API documentation: api.audiobookshelf.org
Write metadata directly into your audio files:
Audiobookshelf creates automatic daily backups:
/metadata/backupsStrong Passwords
Use complex passwords for all user accounts
HTTPS Enabled
Klutch.sh provides automatic SSL certificates
Rate Limiting
Built-in protection against brute force attacks
Token Security
Secure JWT tokens with configurable expiry
# Add to your Dockerfile for additional securityENV ACCESS_TOKEN_EXPIRY=43200ENV REFRESH_TOKEN_EXPIRY=604800ENV RATE_LIMIT_AUTH_MAX=40ENV RATE_LIMIT_AUTH_WINDOW=600000Common issues and solutions:
| Issue | Cause | Solution |
|---|---|---|
| Library not scanning | Wrong folder permissions | Ensure proper permissions on mounted volumes |
| No cover art | Metadata not fetched | Use Match feature to fetch from providers |
| Mobile app can’t connect | WebSocket issues | Verify HTTPS is working correctly |
| Progress not syncing | Token expired | Log out and back in on the mobile app |
| Audio not playing | Codec not supported | Convert to a supported format like M4B |
Access logs in /metadata/logs or through the web interface:
# Add SQLite optimizations for large librariesENV SQLITE_MMAP_SIZE=268435456ENV SQLITE_CACHE_SIZE=10000Audiobookshelf transcodes audio on-the-fly. For better performance: