Category Archives: instalasi

navidrome on ubuntu 18.04

get ready

1. Install ubuntu server version

2. update and upgrade

sudo apt update
sudo apt upgrade
sudo apt install vim ffmpeg

3. Add user and group

sudo adduser navidrome

 


Adding user `navidrome' ...
Adding new group `navidrome' (1001) ...
Adding new user `navidrome' (1001) with group `navidrome' ...
Creating home directory `/home/navidrome' ...
Copying files from `/etc/skel' ...

Enter new UNIX password: 
Retype new UNIX password: 
passwd: password updated successfully
Changing the user information for username
Enter the new value, or press ENTER for the default
	Full Name []: 
	Room Number []: 
	Work Phone []: 
	Home Phone []: 
	Other []: 
Is the information correct? [Y/n] 

4. Create directory


sudo install -d -o  -g  /opt/navidrome
sudo install -d -o  -g  /var/lib/navidrome

 


sudo install -d -o navidrome -g navidrome /opt/navidrome
sudo install -d -o navidrome -g navidrome /var/lib/navidrome

5. Get the Navidrome
5.a. Check the latest version,

on https://github.com/navidrome/navidrome/pkgs/container/navidrome , see they latest version 0.49.3.


docker pull ghcr.io/navidrome/navidrome:0.49.3

5.b. Download the source

wget https://github.com/navidrome/navidrome/releases/download/v0.XX.0/navidrome_0.XX.0_Linux_x86_64.tar.gz -O Navidrome.tar.gz

for 0.49.3 version we write

wget https://github.com/navidrome/navidrome/releases/download/v0.49.3/navidrome_0.49.3_Linux_x86_64.tar.gz -O Navidrome.tar.gz

 


$ wget https://github.com/navidrome/navidrome/releases/download/v0.49.3/navidrome_0.49.3_Linux_x86_64.tar.gz -O Navidrome.tar.gz

--2023-04-08 02:32:42--  https://github.com/navidrome/navidrome/releases/download/v0.49.3/navidrome_0.49.3_Linux_x86_64.tar.gz
Resolving github.com (github.com)... 20.205.243.166
Connecting to github.com (github.com)|20.205.243.166|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-
................................................................................
0filename%3Dnavidrome_0.49.3_Linux_x86_64.tar.gz&response-content-type=application%2Foctet-stream [following]
--2023-04-08 02:32:43--  https://objects.githubusercontent.com/github-production-release-asset-2e65be/52481933/57e7c4d3-2010-446c-992e-e0d7eca6d5ce?X-Amz-Algori
................................................................................
-type=application%2Foctet-stream
HTTP request sent, awaiting response... 200 OK
Length: 14671016 (14M) [application/octet-stream]
Saving to: ‘Navidrome.tar.gz’

Navidrome.tar.gz    100%[===================>]  13.99M  2.37MB/s    in 5.9s

‘Navidrome.tar.gz’ saved [14671016/14671016]

5.c. Extract


sudo tar -xvzf Navidrome.tar.gz -C /opt/navidrome/
sudo chown -R navidrome:navidrome /opt/navidrome

 

6. Create config file


nano /var/lib/navidrome/navidrome.toml

MusicFolder = "/media/navidrome"

7. Create System Service

File: /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 @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 uncomment the following line if you don't have any media in /home/*.
# This will prevent navidrome from ever reading/writing anything there.
#ProtectHome=true

# You can customize some Navidrome config options by setting environment variables here. Ex:
#Environment=ND_BASEURL="/navidrome"

8. Start the Navidrome Service


sudo systemctl daemon-reload
sudo systemctl start navidrome.service
sudo systemctl status navidrome.service

9. Watch the navidrome


http://localhost:4533

 

10. Put navidrome to play on startup


sudo systemctl enable navidrome.service

 

Static IP Address on Ubuntu 18.04 with netplan

Ubuntu replaced the configuration file /etc/network/interfaces with netplan, which uses configuration files in YAML syntax /etc/netplan/01-netcfg.yaml .

Open the YAML configuration file with your text editor :

sudo nano /etc/netplan/01-netcfg.yaml
/etc/netplan/01-netcfg.yaml
network:
  version: 2
  renderer: networkd
  ethernets:
    ens3:
      dhcp4: yes
    ens4:
      dhcp4: no
      addresses:
        - 192.168.121.99/24
      gateway4: 192.168.121.1
      nameservers:
          addresses: [8.8.8.8, 1.1.1.1]

 

Once done save and close the file and apply the changes with:

sudo netplan apply

Verify the changes by typing:

ip addr show dev ens3