Host Your Own Raspberry Pi Audiobook Library With Audiobookshelf

Reading expands the thoughts, however typically, pulling a 600-page tome out of your pocket simply is not sensible. You cannot take pleasure in traditional prose when driving a automobile, for instance. This is the place audiobooks are available in, supplying you with the advantage of a narrated literary expertise with out requiring that you simply take your eyes off the street. With audiobooks, you’ll be able to devour implausible literature whereas driving, doing the dishes and even whilst you’re working.


While there are quite a few audiobook subscription companies out there, it is extra satisfying to create and host your personal library on a Raspberry Pi.

What Is Audiobookshelf?

Audiobookshelf is a self-hosted audiobook and podcast server. This means you could deploy it your self on a VPS (digital personal server) or by yourself {hardware} at dwelling and entry it by way of the web, streaming and downloading tales by way of a cellphone or a devoted app.

A Raspberry Pi is right for this venture. You might want to know its native IP deal with, and also will want a static IP address, and a website identify.

How to Install Audiobookshelf on Raspberry Pi

Once you’ve got installed an operating system on your Raspberry Pi, hook up with it utilizing SSH (Secure Shell).

ssh username@native.pi.ip.deal with

Replace username and native.pi.ip.deal with with your personal Raspberry Pi’s particulars. Now take the next steps to put in Aurdiobookshelf.

  1. Update and improve any put in packages:
    sudo apt replace
    sudo apt improve
  2. Install the Apache2 reverse proxy with the intention to entry Audiobookshelf from outdoors your house:
    sudo apt set up apache2
  3. And certbot, which you’ll later use to generate safety keys and certificates to maintain your connection secure:
    sudo add-apt-repository ppa:certbot/certbot
    sudo apt replace
    sudo apt-get set up python3-certbot-apache
  4. Docker is a way by which builders could make constructing, working, and updating software program packages straightforward for the top person:
    sudo apt set up docker.io
  5. Add your person to the docker group:
    sudo usermod -aG docker your_user_name
  6. Start and allow Docker with:
    sudo systemctl begin docker
    sudo systemctl allow docker
  7. Docker-compose is a device makes managing Docker containers less complicated:
    sudo apt set up docker-compose
  8. From your house listing, create a brand new listing known as audiobookshelf, then cd into it, and create 4 extra directories:
    cd audiobookshelf
    mkdir audiobooks
    mkdir podcasts
    mkdir config
    mkdir metadata
  9. Return to your house listing and create a brand new docker-compose file:
    cd ~
    nano docker-compose.yml

    And paste the next into it:

    model: '3.5'
    companies:
    audiobookshelf:
    container_name: audiobookshelf
    picture: ghcr.io/advplyr/audiobookshelf:newest
    surroundings:
    - AUDIOBOOKSHELF_UID=99
    - AUDIOBOOKSHELF_GID=100
    ports:
    - 13378:80
    volumes:
    - /dwelling/your-user-name/audiobookshelf/audiobooks:/audiobooks
    - /dwelling/your-user-name/audiobookshelf/podcasts:/podcasts
    - /dwelling/your-user-name/audiobookshelf/config:/config
    - /dwelling/your-user-name/audiobookshelf/metadata:/metadata

    The solely components of this you have to to vary are the paths to the directories. Save and exit nano with Ctrl + O then Ctrl + X.

  10. The command:
    docker-compose pull

    will pull all the mandatory photographs onto your Pi, and:

    docker-compose up -d

    will begin the containers. Audiobookshelf is now working.


Setting Up Audiobookshelf From Your Home Network

Audiobookshelf is now accessible from inside your house community however not from the broader web. It is finest observe to carry out preliminary setup earlier than connecting to the web and acquiring SSL certs, as unhealthy actors watch certificates logs to see when new websites go surfing, and they can take management throughout this era.

Access the Audiobookshelf entrance finish by typing your.pi.ip.deal with:13378 into any browser. You will likely be prompted to arrange a root person account and password.

Make positive that you simply choose a strong password which can’t be easily guessed. You will then be prompted to log in with the credentials you simply created.

At this level, Audiobookshelf will immediate you to Add your First Library, and can ask you to pick both books or podcasts, give a reputation to the library, and browse for the library. Because Audiobookshelf solely has entry to the directories laid out in your docker-compose.yml, the situation for that is /audiobooks. Select this, then click on Create New Library.


Audiobookshelf doesn’t have any audiobooks as a result of at this level you have not added any. On the pc the place your audiobooks are saved, use PuTTY or the terminal to switch your library to the proper location on the Raspberry Pi.

scp -r /path/to/your/audiobook/listing

Depending on the scale of your assortment, this course of might take a number of hours. Once it has accomplished and you’re returned to the immediate, head again over to Audiobookshelf in your browser and hit the inexperienced Scan button.

Audiobookshelf will now try and determine your audiobooks utilizing suppliers together with Apple, Audible, and Google to find out chapter markers, creator, narrator, synopsis, and whether or not the books are a part of a collection. When this has completed, your library will likely be populated, categorized and searchable.

You will be capable to navigate simply between screens utilizing buttons arrayed vertically alongside the left fringe of the display. Home is split into sections displaying what you’re at present studying, the following e book within the collection, lately added audiobooks, and lately added collection. At the very backside, there are photographs of authors and narrators. You can click on on these to see a potted biography.

Other screens embrace Library, which reveals particular person covers of each single e book in your audiobooks listing; collection; collections; and authors. All of those will present precisely what you anticipate them to do.

To begin listening to an audiobook, click on on the quilt and press Play. Audiobookshelf will keep in mind your place for you.

Accessing Audiobookshelf From Outside Your Home

Listening to a very good audiobook whereas sitting in an armchair in entrance of the hearth at house is a nice expertise, however you’ll possible wish to entry your narratives from outdoors the house. To do that you have to to direct requests to your area identify to port 13378 in your Raspberry Pi.

  1. In the terminal or SSH consumer:
    cd /and so forth/apache2/sites-available
  2. Create a brand new file with nano:
    sudo nano audiobookshelf.conf
  3. Enter the next:
    <VirtualHost *:80> ServerName your-domain-name.tld ProxyPreserveHost On ProxyPass / http://your.native.pi.ip.deal with:13378/ RewriteEngine on RewriteCond %{HTTP:Upgrade} websocket [NC] RewriteCond %{HTTP:Connection} improve [NC] RewriteRule ^/?(.*) "ws://your.native.pi.ip.deal with:13378/$1" [P,L] </VirtualHost> 

    You might want to change your.native.pi.ip.deal with along with your Pi’s precise native IP deal with, and the worth for ServerName ought to be the area identify you wish to use. Save and exit nano with Ctrl + O then Ctrl +X.

  4. Enable your new conf file with:
    sudo a2ensite audiobookshelf.conf
  5. Restart Apache2:
    sudo service apache2 restart
  6. Your Audiobookshelf occasion is now accessible over the web by way of an HTTP connection. This shouldn’t be safe, so use certbot to acquire certificates and keys from Let’s Encrypt:
    sudo certbot
  7. Select your area identify from an inventory and select redirect when requested.
  8. You might want to restart Apache another time for the adjustments to take impact.
    sudo service apache2 restart

    Any connection makes an attempt remodeled HTTP will routinely be upgraded to HTTPS, making your connection safer.


Where Can You Find Books for Audiobookshelf?

Audiobookshelf can stream all audio codecs on the fly together with the favored MP3, M4A, and M4B codecs. You can discover DRM-free audiobooks at Downpour and LibriVox. A cautious internet search will reveal extra areas and unbiased retailers.

You Successfully Deployed Your Own Audiobook Library on Your Raspberry Pi!

You have entry to a whole world of narrated storytelling at your fingertips. Why not department out along with your studying habits and begin with a brand new style? Detective tales, cozy romances, and explosive thrillers are all there for the taking. You may even be taught a brand new language and hearken to your outdated favorites in one other tongue.

https://www.makeuseof.com/host-raspberry-pi-audiobook-library-audiobookshelf/

Related Posts