In this tutorial, we will show you how to self-host your audiobook library on a Raspberry Pi using the audiobookshelf software.
Audiobookshelf is a special media server that provides a place to store all your audiobooks and podcasts. It is similar to other media servers like Plex with it automatically fetching metadata and cover data for your audio.
Out of the box, Audiobookshelf offers support for ARM devices, meaning we can use our Raspberry Pi to run the software.
The Raspberry Pi is a fantastic platform for self-hosting your audiobooks and podcasts, thanks to it being very affordable to keep running 24/7. While low-powered, there is still more than enough performance to handle processing and serving your library.
This software even has some other neat features, such as its ability to search and download podcasts directly through its interface. You can even provide it with an RSS feed, and it will automatically download new episodes as they are released.
On top of this, while Audiobookshelf is primarily focused on providing a place to store your audiobooks it does also feature some basic support for eBooks.
Please note that this software only provides builds for 64-bit devices. You must be running a 64-bit operating system on your Raspberry Pi to use Audiobookshelf.
Equipment
Below, you will find some of the equipment we used when setting up our Raspberry Pi to self-host our audiobook and podcast library.
Recommended
- Raspberry Pi ( Amazon )
- Micro SD Card ( Amazon )
- Power Supply ( Amazon )
- Ethernet Cable ( Amazon ) or Wi-Fi ( Amazon )
Optional
- Raspberry Pi Case ( Amazon )
- USB Mouse ( Amazon )
- USB Keyboard ( Amazon )
- HDMI Cable ( Amazon )
- Monitor ( Amazon )
This tutorial was tested on a Raspberry Pi 5 using the latest version of Raspberry Pi OS Bookworm.
Installing and Running Audiobookshelf on a Raspberry Pi
Over the next few sections, we will walk you through installing and running the Audiobookshelf software onto your Raspberry Pi.
This whole process is made effortless thanks to the development team providing an ARM Docker container.
Preparing your Raspberry Pi
1. Before we get started with installing Audiobookshelf we should ensure that our Raspberry Pi is up-to-date.
You can update any out-of-date packages by using the following commands within the terminal.
sudo apt update
sudo apt upgrade -y
2. Your next step is to install Docker on to your machine. We will use a Docker container to manage and run Audiobookshelf as it simplifies the setup process.
If you haven’t installed this before, we highly recommend our guide on installing Docker on a Raspberry Pi.
https://pimylifeup.com/raspberry-pi-docker/
3. Once you have Docker installed, your next step is to create a place where Audiobookshelf’s metadata will be stored on your Raspberry Pi. This folder is also where we will keep the Compose file that will be used to manage this software.
You can create a directory at “/opt/stacks/audiobookshelf
” by using the mkdir command within the terminal.
sudo mkdir -p /opt/stacks/audiobookshelf
4. After creating the above directory, you will want to change into it using the cd command. We need to be in this folder for the rest of the tutorial.
cd /opt/stacks/audiobookshelf
Creating a Docker Compose File
5. Now that we have set up a place to store the Compose file, we can begin writing it using the Nano text editor by running the following command in the terminal. Nano is a great terminal-based text editor for beginners.
This file is what Docker will use to launch the Audiobookshelf container on our Raspberry Pi.
sudo nano compose.yaml
6. Within this Compose file, you will want to fill out the following lines. These lines will dictate how Audiobookshelf is run on your Raspberry Pi, as well as the data it has access to.
You will want to specify a volume for each audiobook or podcast library you have on your host machine. You set these under the “volumes:
” option using the following format: “<HOSTPATH>:/<LIBRARYNAME>
“.
<HOSTPATH>
: This is the path to where your audiobook or podcast library is located on your host machine.
For example, ours is located at “/home/pimylifeup/audiobooks
” so that is the path we would use.<LIBRARYNAME>
: On the right-hand side is the path where this should exist within the Docker container.
Typically, you will want to specify the name you want to use for this library, such as “audiobooks
“.
Once you have specified all of your audiobook and podcast libraries, you will have one other placeholder you will want to specify.
<TIMEZONE>
: This placeholder must be replaced with the timezone identifier. You can find a list of these identifiers from Wikipedia.
For example, based on where we live, we would use “Australia/Hobart
” for this value.
services:
audiobookshelf:
image: ghcr.io/advplyr/audiobookshelf:latest
ports:
- 13378:80
volumes:
- <HOSTPATH>:/<LIBRARYNAME>
- ./config:/config
- ./metadata:/metadata
environment:
- TZ=<TIMEZONE>
restart: unless-stopped
For example, below is what your file might look like after adding a podcast and audiobook library.
services:
audiobookshelf:
image: ghcr.io/advplyr/audiobookshelf:latest
ports:
- 13378:80
volumes:
- /home/pimylifeup/audiobooks:/audiobooks
- /home/pimylifeup/podcasts:/podcasts
- ./config:/config
- ./metadata:/metadata
environment:
- TZ=<TIMEZONE>
restart: unless-stopped
7. Once you have filled out the Compose file, you can save and quit out of Nano by pressing CTRL + X, Y, and then ENTER.
Starting up AudioBookShelf on your Raspberry Pi
8. A key advantage of using Docker to run Audiobookshelf on our Raspberry Pi is that it makes starting and managing the software a breeze.
All you need to do now to get this audiobook library up and running is to use the following command within the terminal. Docker will immediately download the latest release of Audiobookshelf and start it.
We use the “-d
” option when starting up this container so that Docker will detach from the terminal once it has been started.
docker compose up -d
Accessing the Audiobookshelf Web Interface
9. Within your favorite web browser, you will want to go to the following address to access the Audiobookshelf web interface.
All you need to do is replace “<IPADDRESS>
” with the IP of your Raspberry Pi. If you are following this tutorial locally, you can get the IP of your Pi by using the hostname command.
http://<IPADDRESS>:13378
Creating and Logging in using the Root User
10. The first time you use Audiobookshelf, you will be asked to create a root user. This user has full control over your audiobook library on your Raspberry Pi, so be sure to set a secure password (1.).
Once you have set a username and password, click the “Submit
” button (2.).
11. You will be taken straight to the login screen.
Type out your new users’ details (1.) and then click the “Submit
” button to log in (2.).
Adding your First Audiobook or Podcast Library on your Raspberry Pi
12. Once logged in, you will be taken to the “Libraries
” tab. At the moment Audiobookshelf doesn’t know where your media is so we must set up a library.
To begin adding your first library to this software, click the “Add your first library
” button.
13. Now that you have the library’s screen open, the first thing you will want to do is set the media type (1.). Use “Books
” for audiobooks or eBooks and “Podcasts
” for podcasts.
Once the media type is set, your next step is to set the name for your library (2.). In our case, we will name this after the media type we are storing within this, so “Audiobooks
“.
Your next step is to specify the directory where your media is stored. In our case we are using the path “/audiobooks
” (3.) as that is what we set in the Docker Compose file earlier.
To save this new library, click the “Save
” button (4.).
14. Audiobookshelf will automatically scan in all of the audiobooks located within the given folders.
You can add as many libraries as you would like; just ensure they have separate folders.
Finishing Up
15. To take this tutorial further, consider setting up something like a Nginx reverse proxy. This will make adding things like SSL to your setup a much easier process.
If you would prefer to avoid having to port forward and open up your firewall, there are many other great solutions, such as Tailscale. Tailscale helps seamlessly make a VPN between your Raspberry Pi and other devices that are a member of the same network.
Another popular option is to use your own domain name and a Cloudflare Tunnel.
Updating Audiobookshelf on your Raspberry Pi
1. To update to the latest release of Audiobookshelf on your Raspberry Pi, you must change to the directory where we wrote the Compose file at the start of this guide.
You can change to this directory using the cd command within the terminal, as shown below.
cd /opt/stacks/audiobookshelf
2. Once you have changed to this file, you can use Docker to pull the latest release of the audiobook library software by running the following command.
This command will download a newer release if one is available. However, it won’t update the existing container yet.
docker compose pull
3. To get Docker to move your current Audiobookshelf container to the latest release, you only need to re-run the Docker Compose up command.
This command will detect that a new version of the image is available and restart the already running container using this new release.
docker compose up -d
Conclusion
Hopefully, by this point in the tutorial, you will have successfully managed to get Audiobookshelf running on your Raspberry Pi.
This software is one of the best ways to self-host your Audiobook or podcast libraries. It is packed with features that help make organizing your library a breeze.
Please comment below if you have had trouble getting Audiobokshelf to run on your Pi.
If you found this project to be helpful, you should definitely take some time to check out our many other Raspberry Pi projects.