advplyr Posted May 14 Author Share Posted May 14 (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. Edited May 14 by advplyr 1 Quote Link to comment
AndreasLindroth Posted May 14 Share Posted May 14 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. Thanks, Worked like a charm! Quote Link to comment
Ericsunraid Posted May 18 Share Posted May 18 (edited) My ISP blocks port 80. Any hope for me? I was really hoping to use the android app on my phone in the car. Edited May 18 by Ericsunraid clarification Quote Link to comment
advplyr Posted May 19 Author Share Posted May 19 1 hour ago, Ericsunraid said: My ISP blocks port 80. Any hope for me? I was really hoping to use the android app on my phone in the car. Port 80 is inside the docker container Quote Link to comment
Ericsunraid Posted May 21 Share Posted May 21 (edited) Yeah, I guess this is more of a reverse proxy problem than an audiobookshelf issue. Ill keep working at it. Update: As a workaround, a Wire Guard tunnel works perfectly fine Edited May 22 by Ericsunraid update Quote Link to comment
WarblingWhales Posted June 3 Share Posted June 3 (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: 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 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 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) run a Force Rescan of the library in the gui (gear wheel -> Libraries -> Force Rescan under the proper library) 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 June 5 by WarblingWhales wrong info Quote Link to comment
advplyr Posted June 3 Author Share Posted June 3 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: 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 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. Quote Link to comment
WarblingWhales Posted June 5 Share Posted June 5 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: I had to tweak fullpath in /config/Libraries/data/data.0.json to point to /audiobooks instead of /usr/share/aduiobookshelf/audiobookshelf 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. 1 Quote Link to comment
drvector Posted Saturday at 04:47 PM Share Posted Saturday at 04:47 PM Outstanding docker, im testing mobile app on ios and is there any way to download books from my server for offline use? It will be great option Quote Link to comment
advplyr Posted Saturday at 05:14 PM Author Share Posted Saturday at 05:14 PM 24 minutes ago, drvector said: Outstanding docker, im testing mobile app on ios and is there any way to download books from my server for offline use? It will be great option Not yet. It is planned but we are lacking in experienced iOS developers that will help. That feature is available for android. Quote Link to comment
Recommended Posts
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.