- date: 2020-08-21, navidrome 0.30.1, needs go 1.14 and node v14
- update: 2020-10-28, navidrome 0.36.1, needs go 1.15 and node v14; newer go version in repo:
pkg update
,pkg upgrade
followed bypkg install taglib
and the build went through - update: 2021-01-20, FreeBSD 12, navidrome 0.39, needs go 1.15 and node v14; FreeBSD 12 repo contains node v15, installed node14 and npm-node14 instead of node and npm
- update: 2021-04-30, FreeBSD 12, navidrome 0.42, needs go 1.16 (in repo), kept node v14 with a minor update; removed wrapper script from service below
- update: 2021-08-04, FreeBSD 12, navidrome 0.44.1, needs node v16
- Create a navidrome user instead of using root. Even if this is in a jail and the music is mounted read-only.
no logs when stared via servicelog in /var/log/navidrome.log (updated rc script)- add reverse proxy (I have that in another jail)
pkg update
pkg install vim-console git htop
go 1.16 & node v16, taglib, update npm:
FreeBSD 12:
pkg install node go npm taglib
npm install npm@latest -g
ffmpeg with lame
portsnap fetch
portsnap extract # 'portsnap update' later on
cd /usr/ports/multimedia/ffmpeg
make build-depends-list && make run-depends-list
install required packages via pkg
pkg install nasm texi2html frei0r v4l_compat gmake pkgconf perl5 libX11 libxcb aom libass dav1d libdrm fontconfig freetype2 gmp gnutls libxml2 opencv-core opus libtheora libv4l libva libvdpau libvorbis libvpx libx264 x265 xvid
make config
enable lame and nonfree codecs, then
# 'pkg unlock ffmpeg' to update
make install # 'make reinstall' to update
make clean
pkg lock ffmpeg
git clone https://github.com/deluan/navidrome
cd navidrome
# 'git pull' for updates
setenv PATH $PATH\:/root/go/bin
gmake setup
gmake buildall
executable: ./navidrome
default port: 4533
LogLevel = "INFO"
BaseURL = "/music"
ScanInterval = "3600s"
TranscodingCacheSize = "300MiB"
MusicFolder = "/media/music"
LastFM.ApiKey = "..."
LastFM.Secret = "..."
/usr/local/etc/rc.d/navidrome
#!/bin/sh
#
# PROVIDE: navidrome
# REQUIRE: networking
# KEYWORD:
. /etc/rc.subr
name="navidrome"
rcvar="navidrome_enable"
navidrome_user="root"
navidrome_command="/root/navidrome/navidrome --configfile /root/navidrome/navidrome.toml"
navidrome_chdir="/root/navidrome"
pidfile="/var/run/navidrome/${name}.pid"
logfile="/var/log/navidrome.log"
command="/usr/sbin/daemon"
command_args="-P ${pidfile} -r -o ${logfile} ${navidrome_command}"
load_rc_config $name
: ${navidrome_enable:=no}
PATH="${PATH}:/usr/local/bin"
run_rc_command "$1"
chmod +x /usr/local/etc/rc.d/navidrome
echo 'navidrome_enable="YES"' >> etc/rc.conf
service navidrome start
Hello
Thx for this write-up.
The service section didn't work for me (TrueNAS 13, jail 13.1). The pidfile wasn't created. I did not install opencv-core, since it's not available in pkg anymore. For the sake of simplicity I installed ffmpeg from pkg. But that doesn't have to do anything with the service section.
Here is the error msg
daemon: ppidfile ``/var/run/navidrome/navidrome.pid'': No such file or directory /usr/local/etc/rc.d/navidrome: WARNING: failed to start navidrome