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.
Overview
Audiobookshelf is a self-hosted audiobook server for managing and playing your audiobooks.
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)
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.
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).
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
and
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]
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