[Support] Audiobookshelf


Recommended Posts

Posted (edited)
1 hour ago, AndreasLindroth said:

Hello, Quick question: 

Is there a way to reset the root password when you do not know it via CLI or so?

My password manager overwrote my generated password when i created a new account so now i don't know the root password anymore..

 

Im still able to log in to it via auto sign-in from one of my computers so i've made an other Admin account, but would still like to recover the root password.

 

Best regards

Currently the only way to do this is to open up the JSON file containing the root user and manually change the password.
The JSON files are located in /config/users/data and then you need to find the data.json file that has a JSON object id root.

These are not actually valid JSON files because each line will have a JSON object for each user, so don't edit these files in anything that will auto-format on save.

Once you find the root user object the attribute after id and username is "pash". Update the value of pash to empty quotes "".

Make sure you have turned down the server for this and do a backup of that data file you are updating so if something weird happens you can just copy in the old one and try again.


image.thumb.png.8fdf666dd92b291de6fae7de4a5d7b13.png

Edited by advplyr
  • Like 1
Link to comment
4 hours ago, advplyr said:

Currently the only way to do this is to open up the JSON file containing the root user and manually change the password.
The JSON files are located in /config/users/data and then you need to find the data.json file that has a JSON object id root.

These are not actually valid JSON files because each line will have a JSON object for each user, so don't edit these files in anything that will auto-format on save.

Once you find the root user object the attribute after id and username is "pash". Update the value of pash to empty quotes "".

Make sure you have turned down the server for this and do a backup of that data file you are updating so if something weird happens you can just copy in the old one and try again.


image.thumb.png.8fdf666dd92b291de6fae7de4a5d7b13.png

 

Thanks, Worked like a charm!

Link to comment
  • advplyr changed the title to [Support] Audiobookshelf
  • 2 weeks later...
Posted (edited)

Wanted to provide an update. Was able to get the Docker container up and running, have it run under a Linux service id, and can hit both from a browser AND the android app.

 

Here is my docker run command:

docker run  \
    -d \
    --user 999:999 \
    -p 14231:80 \
    -v <path to my audiobooks folder>:/audiobooks \
    -v <path to my config folder>:/config \
    -v <path to my metadata folder>:/metadata \
    -v <path to my podcasts folder>:/podcasts \
     --name audiobookshelf \
    ghcr.io/advplyr/audiobookshelf

 

A few things to note:

  1. I'm not using `-e AUDIOBOOKSHELF_UID` and `-e AUDIOBOOKSHELF_GID`. Using those two enviromental variables resulted in the container running as root, which is a security concern. By using `--user 999:999`, the container is able to run as user id 999 (which is the UID/GID of a system user called audiobookshelf), and is limited to only locations where that users has access
  2. If your copying a library/filesystems over from a install on server into a container, Then you need to do two things.  If you don't do the below, then you'll run into permission issues and books not being found
    1. change the fullpath string in /config/Libraries/data/data.0.json to point to /audiobooks instead of /where it currently points to (for example /usr/bin/share/audiobookshelf/somefolder/audiobooks to /audiobooks)
    2. run a Force Rescan of the library in the gui (gear wheel -> Libraries -> Force Rescan under the proper library)
    3.  

To access the docker container from a website, I just had to do http://MY_SERVER_ID_ADDRESS:14231. To use the app with this container, I used the same URL - http://MY_SERVER_ID_ADDRESS:14231.

 

Next steps:

 

What I'm working on now is trying to set it up a reverse proxy with a subfolder using nginx. Do note, this isn't a subdomain (audiobookshelf.cooldomain.com), this is a subfolder (cooldomian.com/audiobookshelf). There are two aspects to this. First, hitting the container through a website's subfolder. Say https://www.cooldomain.com/audiobookshelf . Second, using nginx to stream from an external port (59322) to the port exposed above (14231).

 

When I figure that out, I'll post to this site for all y'all.

Edited by WarblingWhales
wrong info
Link to comment
36 minutes ago, WarblingWhales said:

Wanted to provide an update. Was able to get the Docker container up and running, have it run under a Linux service id, and can hit both from a browser AND the android app.

 

Here is my docker run command:

docker run  \
    -d \
    --user 999:999 \
    -p 14231:80 \
    -v <path to my audiobooks folder>:/usr/share/audiobookshelf/audiobooks \
    -v <path to my config folder>:/config \
    -v <path to my metadata folder>:/metadata \
    -v <path to my podcasts folder>:/podcasts \
     --name audiobookshelf \
    ghcr.io/advplyr/audiobookshelf

 

A few things to note:

  1. I'm not using `-e AUDIOBOOKSHELF_UID` and `-e AUDIOBOOKSHELF_GID`. Using those two enviromental variables resulted in the container running as root, which is a security concern. By using `--user 999:999`, the container is able to run as user id 999 (which is the UID/GID of a system user called audiobookshelf), and is limited to only locations where that users has access
  2. The audiobooks path within the container is different then what is shown on the github site. I had to map my audiobooks specifically  to /usr/share/audiobookshelf/audiobooks (NOT /audiobooks)

To access the docker container from a website, I just had to do http://MY_SERVER_ID_ADDRESS:14231. To use the app with this container, I used the same URL - http://MY_SERVER_ID_ADDRESS:14231.

 

Next steps:

 

What I'm working on now is trying to set it up a reverse proxy with a subfolder using nginx. Do note, this isn't a subdomain (audiobookshelf.cooldomain.com), this is a subfolder (cooldomian.com/audiobookshelf). There are two aspects to this. First, hitting the container through a website's subfolder. Say https://www.cooldomain.com/audiobookshelf . Second, using nginx to stream from an external port (59322) to the port exposed above (14231).

 

When I figure that out, I'll post to this site for all y'all.

 

You are mistaken about #2, but that path is not necessary to map anymore the /audiobooks one. the /usr/share/audiobookshelf/audiobooks is your own path not the path inside the docker container.

You cannot use a subfolder yet, it is not supported. This is something being worked on now but you are limited to using a subdomain.

Link to comment
On 6/3/2022 at 12:24 PM, advplyr said:

 

You are mistaken about #2, but that path is not necessary to map anymore the /audiobooks one. the /usr/share/audiobookshelf/audiobooks is your own path not the path inside the docker container.

You cannot use a subfolder yet, it is not supported. This is something being worked on now but you are limited to using a subdomain.

 

That's what I thought as well. (See my earlier post about it trying to work with the andriod app). A bit of background, I had  audiobookshelf installed directly on my host machine (a ubuntu server) and wanted to move it to a docker container.

 

After much banging of head on wall, I finally got it to work, with an incorrect mapping of the audiobooks folder. Everything was hunky dory.

 

And then you left a comment and it got me thinking. I did a little more digging in the config folder to see what was going on. All my audiobooks had their full path mapped within the *.json files  (IE /usr/share/audiobookshelf/audiobook/Paradise Lost/ ). Which works fine for the bare metal install, however, the docker container tried to read those json and went "Hey, there is no /usr/share/audiobookshelf folder, permission denied".  By mapping my audiobooks to /usr/share/audiobookshelf/audiobooks in the container, everything worked out.

 

However, to have the container match the documentation of volume mapping

-v <my audiobook folder>:/audiobooks

 

I had to do two things:

  1. I had to tweak fullpath in /config/Libraries/data/data.0.json to point to /audiobooks instead of /usr/share/aduiobookshelf/audiobookshelf
  2. run a Force Rescan of the library in the gui (gear wheel -> Libraries -> Force Rescan under the proper library)

I'll fix my answer above to reflect this.

 

  • Like 1
Link to comment
  • 4 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.