本文资源都来源网络只是整合修改
家里使用PC搭建了NAS配置N3160低功耗U 8快8TBSAS硬盘 平时使用频率并不是很高出于对数据的保护和节能的目的将私有云盘及私人音乐服务器迁移至ARM ubuntu上
arm ubuntu 使用M301H 刷写最新64位系统 外置硬盘使用3.5寸硬盘盒加2TB希捷硬盘 电源使用12V3A 1拖2 5.5MM适配器 经过测试盒子加硬盘盒满载14W 待机2W左右
私有云请参照论坛里可道云的安装此处不在重复下面开始Navidrome安装
1.新建一个组和用户用来运行Navidrome,官方不推荐使用root用户运行Navidrome
groupadd -r navidrome 创建组
useradd -r -g navidrome -s /sbin/nologin -M -c "Navidrome Daemons" navidrome 创建用户
- 创建Navidrome的安装目录与运行目录。
install -d -o navidrome -g navidrome /opt/navidrome 安装目录
install -d -o navidrome -g navidrome /var/lib/navidrome 运行目录
3.从github下载Navidrome最新的二进制文件,重命名为Navidrome.tar.gz解压至安装目录并且设置运行权限。
https://github.com/navidrome/navidrome/releases github地址
下面是下载地址清按需下载 我刷了64位系统使用arm64 其他的清按需下载
https://github.com/navidrome/navidrome/releases/download/v0.47.5/navidrome_0.47.5_Linux_arm64.tar.gz
https://github.com/navidrome/navidrome/releases/download/v0.47.5/navidrome_0.47.5_Linux_armv7.tar.gz
https://github.com/navidrome/navidrome/releases/download/v0.47.5/navidrome_0.47.5_Linux_armv6.tar.gz
https://github.com/navidrome/navidrome/releases/download/v0.47.5/navidrome_0.47.5_Linux_armv5.tar.gz
https://github.com/navidrome/navidrome/releases/download/v0.47.5/navidrome_0.47.5_Linux_i386.tar.gz
https://github.com/navidrome/navidrome/releases/download/v0.47.5/navidrome_0.47.5_Linux_x86_64.tar.gz
https://github.com/navidrome/navidrome/releases/download/v0.47.5/navidrome_0.47.5_macOS_x86_64.tar.gz
https://github.com/navidrome/navidrome/releases/download/v0.47.5/navidrome_0.47.5_Windows_i386.zip
https://github.com/navidrome/navidrome/releases/download/v0.47.5/navidrome_0.47.5_Windows_x86_64.zip
sudo tar -xvzf Navidrome.tar.gz -C /opt/navidrome/ 解压文件
sudo chown -R navidrome:navidrome /opt/navidrome 给与权限
创建Navidrome的配置文件
https://www.navidrome.org/docs/usage/configuration-options/ 官方给出的配置文件可用选项
vim /var/lib/navidrome/navidrome.toml 创建编辑
MusicFolder = "<library_path>" 文件内容<library_path>修改为音乐文件存放路径
如果家里有IPV6可添加大于10000以上端口并在路由器上放开对应IPV6端口可实现直接远程连接
port = "32400" 此项不是必须因我使用PLEX路由器以开放32400端口 如无此项默认使用4533端口
- 创建启动服务项目
vim /etc/systemd/system/navidrome.service 创建编辑
下为内容
[Unit]
Description=Navidrome Music Server and Streamer compatible with Subsonic/Airsonic
After=remote-fs.target network.target
AssertPathExists=/var/lib/navidrome
[Install]
WantedBy=multi-user.target
[Service]
User=navidrome
Group=navidrome
Type=simple
ExecStart=/opt/navidrome/navidrome --configfile "/var/lib/navidrome/navidrome.toml"
WorkingDirectory=/var/lib/navidrome
TimeoutStopSec=20
KillMode=process
Restart=on-failure
#See https://www.freedesktop.org/software/systemd/man/systemd.exec.html
DevicePolicy=closed
NoNewPrivileges=yes
PrivateTmp=yes
PrivateUsers=yes
ProtectControlGroups=yes
ProtectKernelModules=yes
ProtectKernelTunables=yes
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
RestrictNamespaces=yes
RestrictRealtime=yes
SystemCallFilter=~@clock @debug @module @mount @obsolete @"reboot"#42 @setuid @swap
ReadWritePaths=/var/lib/navidrome
# You can uncomment the following line if you're not using the jukebox This
# will prevent navidrome from accessing any real (physical) devices
#PrivateDevices=yes
# You can change the following line to `strict` instead of `full` if you don't
# want navidrome to be able to write anything on your filesystem outside of
# /var/lib/navidrome.
ProtectSystem=full
# You can comment the following line if you don't have any media in /home/*.
# This will prevent navidrome from ever reading/writing anything there.
#ProtectHome=true
- 更新并启动Navidrome
systemctl daemon-reload 更新服务列表
systemctl start navidrome.service 启动服务
systemctl status navidrome.service 查看服务状态
如出现 Active: active (running) 服务以启动
使用 ip:4533 访问服务器
一切正常以后添加开启启动服务
sudo systemctl enable navidrome.service
支持应用
iOS:play:Sub、 substreamer、 Amperfy和 iSub
安卓:DSub, Subtracks, substreamer, Ultrasonic和 Audinaut
网络:Subplayer、 Airsonic Refix、 Aurial、 Jamstash和 Subfire
桌面:Sublime Music (Linux) 和Sonixd (Windows/Linux/macOS)
CLI:Jellycli (Windows/Linux) 和STMP (Linux/macOS)
连接的扬声器:
Sonos: bonob Alexa:AskSonic
其他:
Subsonic Kodi 插件、 Navidrome Kodi 插件、 HTTP目录文件系统