I would dearly like to see Audiobookshelf ported to FreeBSD. Then you can toy with an audiobook server on FreeBSD. It's one of the things I would like to do with a ZFS mirror-0 raid setup.
I would dearly like to see Audiobookshelf ported to FreeBSD. Then you can toy with an audiobook server on FreeBSD. It's one of the things I would like to do with a ZFS mirror-0 raid setup.
# cat dev.js
// Using port 3333 is important when running the client web app separately
const Path = require('path')
module.exports.config = {
Port: 3333,
ConfigPath: Path.resolve('config'),
MetadataPath: Path.resolve('metadata'),
FFmpegPath: '/usr/local/bin/ffmpeg',
FFProbePath: '/usr/local/bin/ffprobe',
SkipBinariesCheck: true
}
Just to add to this, I also installed Audiobookshelf manually in a FreeBSD 15.1-Release jail, in my user directory. I couldn't get theAudiobookshelf is easy enough to install manually if you're still keen:
Dependencies:
- ffmpeg
- git
- node24
- npm-node24
Follow the instructions for Manual Environment Setup (https://github.com/advplyr/audiobookshelf#manual-environment-setup), putting this into your dev.js file in the audiobookshelf folder:
Code:# cat dev.js // Using port 3333 is important when running the client web app separately const Path = require('path') module.exports.config = { Port: 3333, ConfigPath: Path.resolve('config'), MetadataPath: Path.resolve('metadata'), FFmpegPath: '/usr/local/bin/ffmpeg', FFProbePath: '/usr/local/bin/ffprobe', SkipBinariesCheck: true }
I haven't got around to setting up a custom rc script - but I can post back once I've got it working if you need it.
npm ci command mentioned in Manual Environment Setup to work just with the deps brendans-bits mentioned so I had to pkg install py312-pip in addition as well as ln -s /usr/local/bin/python3.12 /usr/local/bin/python. Again as my user in the jail, I ran pip install setuptools (to get distutils) and finally npm install before I could follow the instructions on Github. Verify it works after this by running npm run dev. I'm fine with keeping the install in my home directory and run it from there./usr/local/etc/rc.d/audiobookshelf:#!/bin/sh# PROVIDE: audiobookshelf# REQUIRE: LOGIN# KEYWORD: shutdown. /etc/rc.subrname="audiobookshelf"rcvar="${name}_enable"load_rc_config $name: ${audiobookshelf_enable:="NO"}: ${audiobookshelf_user:="myusername"}: ${audiobookshelf_dir:="/home/myusername/audiobookshelf"}pidfile="/home/myusername/audiobookshelf/audiobookshelf.pid"start_cmd="${name}_start"stop_cmd="${name}_stop"status_cmd="${name}_status"audiobookshelf_start(){ if [ -f "${pidfile}" ]; then echo "${name} already running?" return 1 fi echo "Starting ${name}." su -m "${audiobookshelf_user}" -c \ "cd ${audiobookshelf_dir} && /usr/local/bin/node index.js --dev > ${audiobookshelf_dir}/audiobookshelf.log 2>&1 & echo \$! > ${pidfile}"}audiobookshelf_stop(){ if [ -f "${pidfile}" ]; then echo "Stopping ${name}." kill "$(cat ${pidfile})" rm -f "${pidfile}" else echo "${name} is not running." fi}audiobookshelf_status(){ if [ -f "${pidfile}" ] && kill -0 "$(cat ${pidfile})" 2>/dev/null; then echo "${name} is running (pid $(cat ${pidfile}))." else echo "${name} is not running." return 1 fi}run_rc_command "$1"service audiobookshelf enable, service audiobookshelf start and you should have it running as your user at http://yourip:3333. Good to go! That's going to bite you when the python version changes. Install lang/python3 instead.in addition as well asln -s /usr/local/bin/python3.12 /usr/local/bin/python
Thanks! Will do!That's going to bite you when the python version changes. Install lang/python3 instead.