[Audiobookshelf] audiobook server

Audiobookshelf for YunoHost

Integration level Working status Maintenance status
Install Audiobookshelf with YunoHost

Lire ce readme en français.

This package allows you to install Audiobookshelf quickly and simply on a YunoHost server. If you don’t have YunoHost, please consult the guide to learn how to install it.


Audiobookshelf is a self-hosted audiobook server for managing and playing your audiobooks.


  • Fully open-source, including the android & iOS app (in beta)
  • Stream all audiobook formats on the fly
  • Multi-user support w/ custom permissions
  • Keeps progress per user and syncs across devices
  • Auto-detects library updates, no need to re-scan
  • Upload audiobooks w/ bulk upload drag and drop folders
  • Backup your metadata + automated daily backups
  • Progressive Web App (PWA)
  • Chromecast support on the web app
  • Fetch metadata and cover art from several sources

Shipped version: 2.0.23~ynh1


Screenshot of Audiobookshelf

Disclaimers / important information


  • Audiobookshelf can only be installed on a dedicated domain
  • No LDAP support, YunoHost users needs to register in the app too


  • Default user is root with no password

Documentation and resources


Thanks a lot! Installing was ok, but then I was not able to create my first library. I cannot browse folders. It says “No Folders Available. Note: folders already mapped will not be shown.”

When I add a folderpath, then I get error messages (“Library needs a name” although I gave it a name)

Is it some permission issue? Are there some things to do before using this app?

In the logs it says Verify Token User Not Found

[2022-07-10 17:30:34] ERROR: Verify Token User Not Found bG9yZW56Oitib2hlTTE1eQ==
[2022-07-10 17:30:38] ERROR: JWT Verify Token Failed JsonWebTokenError: jwt malformed
    at Object.module.exports [as verify] (/var/www/audiobookshelf/node_modules/jsonwebtoken/verify.js:63:17)
    at /var/www/audiobookshelf/server/Auth.js:86:11
    at new Promise (<anonymous>)
    at Auth.verifyToken (/var/www/audiobookshelf/server/Auth.js:85:12)
    at Auth.authMiddleware (/var/www/audiobookshelf/server/Auth.js:50:27)
    at Server.authMiddleware (/var/www/audiobookshelf/server/Server.js:120:15)
    at Layer.handle [as handle_request] (/var/www/audiobookshelf/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/var/www/audiobookshelf/node_modules/express/lib/router/index.js:328:13)
    at /var/www/audiobookshelf/node_modules/express/lib/router/index.js:286:9
    at Function.process_params (/var/www/audiobookshelf/node_modules/express/lib/router/index.js:346:12)

Thanks a lot!

I had some issues when connected to Yunohost, if I disconnect, Audiobookshelfs works great, is it the same issue for you ?

1 Like

No, I don’t actually know what you mean with connecting and disconnecting to Yunohost, for we use the app on a Yunohost server.

I also realised that I cannot add a new user, maybe it is best to reinstall and try again from scratch

Can you open an issue on the package repository GitHub - YunoHost-Apps/audiobookshelf_ynh: Audiobookshelf package for YunoHost

done! Cannot create library, cannot create user "Verify Token User Not Found" · Issue #20 · YunoHost-Apps/audiobookshelf_ynh · GitHub

I have updated the issue and the solution to your problem is to purge the app and then reinstall (explanation on GitHub)

sudo yunohost app remove --purge audiobookshelf
sudo yunohost app install audiobookshelf

The purge command deletes everything in /var/www/audiobookshelf and /home/yunohost.app/audiobookshelf so make sure you don’t have any audiobook files there

I had the same issue (same errors in log). Opening my yunohost homepage in another tab to disconnect from the SSO immediately solved the issue. Back in the Audiobookshelf tab, I could create users / library.

So it looks like it’s related to SSOwat.

Yes, after logging out I was able to create the root user and the first library. But the library can only be located in /var/www/audiobookshelf where I cannot upload via sftp (permission issue) and uploading with the web interface resulted in error messages (upload failed).

Are you able to upload?

PS: Now I see, after the failed upload attempt, that both libraries I have created, do not exist anymore, they were deleted

Indeed I had to fiddle with permissions to put files in my library. As I use my Nextcloud app to move files around, I manually added nextcloud to the group owning the directory and changed permissions to group write.

With SFTP, you should use SSH tunneling (aka SSH port forwarding).

Aha, good to know thanks. Fiidling with permissions and ssh tunneling sounds more like a weekend project. Will have a try then!

EDIT: ssh tunneling instructions, not as scary as it sounds: Edit app files over SFTP with admin account - #4 by ljf

The library does not have to be located only in /var/www/audiobookshelf, I have my own library in /media/MyMedia/Audiobooks/ with permissions like this:

ls -la /media/MyMedia
drwxr-xr-x 5 admin root 4096 Jun 30 20:09  .
drwxr-xr-x 5 root  root 4096 Jun  9 17:35  ..
drwxr-xr-x 3 admin 1007 4096 Jun 30 20:27  Audiobooks


ls -la /media/MyMedia/Audiobooks
drwxr-xr-x 3 admin 1007      4096 Jun 30 20:27  .
drwxr-xr-x 5 admin root      4096 Jun 30 20:09  ..
drwxr-xr-x 2 admin 1007      4096 Jun 30 20:10 "Breakfast at Tiffany's by Truman Capote"
-rw-r-xr-x 1 root  root 601008644 Jun 30 20:26  Dune.m4b
-rw-r-xr-x 1 root  root 275387156 Jun 30 20:26  Meditations.m4b

You can always just give the audiobookshelf user read/write permissions using something like the setfacl command. [0]

[0] Give specific user permission to write to a folder using +w notation - Ask Ubuntu

1 Like

That is very strange because I have tested the application on two different servers and don’t seem to have that issue. I will look into this


Important security update! You will need to re-login to all clients after update.

The fact that uninstall script doesn’t remove app data by default causes problems. I’ve tried installing audiobookshelf on yunohost, it didn’t function properly, so I’ve removed it. Next time I try to install it again, it is completely broken. It created root user without password, doesn’t run first-time setup page, allows root to login with empty password and then every request to api fails with 404 error, I can’t change password, create user or anything else.

Also, SSOwat breaks this app completely. Every api request from the web client passes through only if you log out of yunohost and log back in after request is processed. You should just disable SSOwat entirely.

I’m sorry to hear that. Did you try passing the —purge flag to delete everything.

Also, as for the SSOWat, the API should not be even attached to it. I’ve been using this package ever since I packaged it and haven’t had a single issue using the app

But I haven’t tested the web UI in a while, let me look into it

I would like to use this app, but no matter what I do, I cannot create a Library.
Tried Purge, log in from yunohost and so on…

I am sorry to hear that. Can you create an issue on the repository here: Issues · YunoHost-Apps/audiobookshelf_ynh · GitHub