Host Your Personal Raspberry Pi Audiobook Library With Audiobookshelf

Studying expands the thoughts, however typically, pulling a 600-page tome out of your pocket simply is not sensible. You possibly can’t take pleasure in traditional prose when driving a automobile, for instance. That is the place audiobooks are available, providing you with the good thing about a narrated literary expertise with out requiring that you simply take your eyes off the highway. With audiobooks, you’ll be able to eat unbelievable literature whereas driving, doing the dishes and even when you’re working.

Whereas there are quite a few audiobook subscription providers out there, it’s miles 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 implies you could deploy it your self on a VPS (digital personal server) or by yourself {hardware} at house 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 undertaking. You will have to know its native IP tackle, and also will want a static IP tackle, and a site identify.

Learn how to Set up Audiobookshelf on Raspberry Pi

Upon getting put in an working system in your Raspberry Pi, hook up with it utilizing SSH (Safe Shell).

ssh username@native.pi.ip.tackle

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

  1. Replace and improve any put in packages:
    sudo apt replace
    sudo apt improve
  2. Set up the Apache2 reverse proxy so as to entry Audiobookshelf from outdoors your private home:
    sudo apt set up apache2
  3. And certbot, which you’ll later use to generate safety keys and certificates to maintain your connection protected:
    sudo add-apt-repository ppa:certbot/certbot
    sudo apt replace
    sudo apt-get set up python3-certbot-apache
  4. Docker is a method by which builders could make constructing, working, and updating software program packages simple for the top consumer:
    sudo apt set up
  5. Add your consumer to the docker group:
    sudo usermod -aG docker your_user_name
  6. Begin 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 private home 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 private home listing and create a brand new docker-compose file:
    cd ~
    nano docker-compose.yml

    And paste the next into it:

    model: '3.5'
    container_name: audiobookshelf
    - 13378:80
    - /house/your-user-name/audiobookshelf/audiobooks:/audiobooks
    - /house/your-user-name/audiobookshelf/podcasts:/podcasts
    - /house/your-user-name/audiobookshelf/config:/config
    - /house/your-user-name/audiobookshelf/metadata:/metadata

    The one components of this you’ll need 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 required photographs onto your Pi, and:

    docker-compose up -d

    will begin the containers. Audiobookshelf is now working.

Setting Up Audiobookshelf From Your Dwelling Community

Audiobookshelf is now accessible from inside your private home community however not from the broader web. It’s best apply 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.

Entry the Audiobookshelf entrance finish by typing your.pi.ip.tackle:13378 into any browser. You may be prompted to arrange a root consumer account and password.

Just be sure you select a powerful password which may’t be simply guessed. You’ll 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 out both books or podcasts, give a reputation to the library, and browse for the library. As a result of Audiobookshelf solely has entry to the directories laid out in your docker-compose.yml, the situation for that is /audiobooks. Choose 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 right location on the Raspberry Pi.

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

Relying on the dimensions of your assortment, this course of could take a number of hours. As soon as it has accomplished and you might be returned to the immediate, head again over to Audiobookshelf in your browser and hit the inexperienced Scan button.

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

It is possible for you to to navigate simply between screens utilizing buttons arrayed vertically alongside the left fringe of the display screen. Dwelling is split into sections displaying what you might be at the moment studying, the subsequent e book within the sequence, lately added audiobooks, and lately added sequence. On the very backside, there are photographs of authors and narrators. You possibly can click on on these to see a potted biography.

Different screens embody Library, which exhibits particular person covers of each single e book in your audiobooks listing; sequence; 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 bear in mind your place for you.

Accessing Audiobookshelf From Outdoors Your Dwelling

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

  1. Within the terminal or SSH shopper:
    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.tackle:13378/ RewriteEngine on RewriteCond %{HTTP:Improve} websocket [NC] RewriteCond %{HTTP:Connection} improve [NC] RewriteRule ^/?(.*) "ws://your.native.pi.ip.tackle:13378/$1" [P,L] </VirtualHost> 

    You will have to exchange your.native.pi.ip.tackle together with your Pi’s precise native IP tackle, and the worth for ServerName needs to be the area identify you wish to use. Save and exit nano with Ctrl + O then Ctrl +X.

  4. Allow 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 isn’t safe, so use certbot to acquire certificates and keys from Let’s Encrypt:
    sudo certbot
  7. Choose your area identify from an inventory and select redirect when requested.
  8. You will have to restart Apache yet another time for the modifications to take impact.
    sudo service apache2 restart

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

The place Can You Discover Books for Audiobookshelf?

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

You Efficiently Deployed Your Personal Audiobook Library on Your Raspberry Pi!

You could have entry to a complete world of narrated storytelling at your fingertips. Why not department out together 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 might even study a brand new language and hearken to your outdated favorites in one other tongue.

See also  The right way to Set up and Use the DotClear Running a blog Platform on Your Raspberry Pi