2020-04-30, 06:08 PM
(This post was last modified: 2020-04-30, 06:12 PM by snagglewest.)
With all this free time due to CV19 I’ve been cleaning up my install notes and stuff for my various systems and I figured I’d share my "Headless Linux install and update for dummies" instructions for folks like me. These are steps, tricks and tips I’ve collected that work for me and hopefully will help others flatten the learning curve, especially if your new to Linux.
EDIT - I had originally included update info too but the forum software won't let me post more than 10,000 characters so I'll break this into 2 posts.
Let me preface this with I'm running a headless Ubuntu 18.04LTS server in a VM on a FreeNAS server. I only use NextPVR for the back end and I'm only using HDHR Prime tuners. I’m not going to go into tuner setup either which can be found in the Wiki. These instructions are for Debian-based distributions which use the .deb package format such as Ubuntu and since this is about headless installations of the backend, it will also be only CLI.
At this point I’d also be remiss if I didn’t touch briefly on hardware requirements - if you intend to transcode, either to convert recordings to a new format from the .standard TS recording or want to watch Live TV from a web UI, then you need a fairly robust CPU to handle the load. Let me say that again... transcoding is CPU intensive and trying to transcode with a underpowered CPU is a recipe for failure! On the other hand, if you’re only intending to record and watch live TV though a client that plays the stream natively, (ie. nextpvr.exe, Kodi etc) then you can get by with a low power CPU as the stream is played in the original format and does not require transcoding. With all that out of the way, let’s get started.
Installing a fresh installation
SSH into your machine/VM with your favorite SSH client which will take you to your home directory in the terminal.
Check the timezone settings are correct and fix it if needed. If the timezone is off then you’re going to have all sorts of odd issues, especially with EPG and recordings so now is the time to fix it and prevent that headache. Yea, it's not a common issue but it happened to me so I figured I'd pass it along so nobody else has to go through the headache it caused me!
Check the clock settings
# timedatectl
Change the timezone if needed (here I’m using New York, use whatever you need for your location)
# sudo timedatectl set-timezone America/New_York
Update the OS software list and install updates so we start off with a updated system and eliminate that variable
# sudo apt update
# sudo apt upgrade
Not sure if it’s necessary anymore, but make sure libc6-dev is installed
# sudo apt install libc6-dev
Not sure if this necessary anymore either, but just to make sure install hdhomerun-config if you’re using a legacy HDHR device
# sudo apt install hdhomerun-config
Now that we have the prerequisites taken care of let’s get to actually installing NextPVR.
Download the .nextpvr installer .deb file
# curl https://nextpvr.com/nextpvr-helper.deb -O
Install the nextpvr installer .deb file
# sudo apt install ./nextpvr-helper.deb
The installer creates a web server that is run automatically after the install. Give it a half a minute or so to start, then you should be able to open http://xxx.xxx.xxx.xxx:8866 in a browser to setup NextPVR from the web UI.
The default web UI login credentials are - "admin"/"password"
--------------------------------------------------------------------------------
Some helpful commands:
Check status (sudo not required)
# service nextpvr-server status
Stop the NextPVR service
# sudo service nextpvr-server stop
Start the NextPVR service
# sudo service nextpvr-server start
Restart the NextPVR service
# sudo service nextpvr-server restart
To simplify maintenance you can get a shell with the nextpvr user permissions
# sudo -u nextpvr bash
To return to normal user
# su - [your normal user name]
-------- Paths to various stuff --------
Main program stuff (scripts, channel icons etc)
/var/opt/nextpvr
database
/var/opt/nextpvr/npvr.db3
config file
/var/opt/nextpvr/config.xml
Default recording directories
/home/npvr/recordings/livetv
/home/npvr/videos/recordings
logs
/var/opt/nextpvr/logs
channel icons
/var/opt/nextpvr/media/channels
So there ya go, everything I know about installing, updating and maintaining NextPVR on a headless Linux system. I hope someone finds it useful and if anyone sees any mistakes or has easier ways of doing something let me know and I'll update this.
EDIT - I had originally included update info too but the forum software won't let me post more than 10,000 characters so I'll break this into 2 posts.
Let me preface this with I'm running a headless Ubuntu 18.04LTS server in a VM on a FreeNAS server. I only use NextPVR for the back end and I'm only using HDHR Prime tuners. I’m not going to go into tuner setup either which can be found in the Wiki. These instructions are for Debian-based distributions which use the .deb package format such as Ubuntu and since this is about headless installations of the backend, it will also be only CLI.
At this point I’d also be remiss if I didn’t touch briefly on hardware requirements - if you intend to transcode, either to convert recordings to a new format from the .standard TS recording or want to watch Live TV from a web UI, then you need a fairly robust CPU to handle the load. Let me say that again... transcoding is CPU intensive and trying to transcode with a underpowered CPU is a recipe for failure! On the other hand, if you’re only intending to record and watch live TV though a client that plays the stream natively, (ie. nextpvr.exe, Kodi etc) then you can get by with a low power CPU as the stream is played in the original format and does not require transcoding. With all that out of the way, let’s get started.
Installing a fresh installation
SSH into your machine/VM with your favorite SSH client which will take you to your home directory in the terminal.
Check the timezone settings are correct and fix it if needed. If the timezone is off then you’re going to have all sorts of odd issues, especially with EPG and recordings so now is the time to fix it and prevent that headache. Yea, it's not a common issue but it happened to me so I figured I'd pass it along so nobody else has to go through the headache it caused me!
Check the clock settings
# timedatectl
Change the timezone if needed (here I’m using New York, use whatever you need for your location)
# sudo timedatectl set-timezone America/New_York
Update the OS software list and install updates so we start off with a updated system and eliminate that variable
# sudo apt update
# sudo apt upgrade
Not sure if it’s necessary anymore, but make sure libc6-dev is installed
# sudo apt install libc6-dev
Not sure if this necessary anymore either, but just to make sure install hdhomerun-config if you’re using a legacy HDHR device
# sudo apt install hdhomerun-config
Now that we have the prerequisites taken care of let’s get to actually installing NextPVR.
Download the .nextpvr installer .deb file
# curl https://nextpvr.com/nextpvr-helper.deb -O
Install the nextpvr installer .deb file
# sudo apt install ./nextpvr-helper.deb
The installer creates a web server that is run automatically after the install. Give it a half a minute or so to start, then you should be able to open http://xxx.xxx.xxx.xxx:8866 in a browser to setup NextPVR from the web UI.
The default web UI login credentials are - "admin"/"password"
--------------------------------------------------------------------------------
Some helpful commands:
Check status (sudo not required)
# service nextpvr-server status
Stop the NextPVR service
# sudo service nextpvr-server stop
Start the NextPVR service
# sudo service nextpvr-server start
Restart the NextPVR service
# sudo service nextpvr-server restart
To simplify maintenance you can get a shell with the nextpvr user permissions
# sudo -u nextpvr bash
To return to normal user
# su - [your normal user name]
-------- Paths to various stuff --------
Main program stuff (scripts, channel icons etc)
/var/opt/nextpvr
database
/var/opt/nextpvr/npvr.db3
config file
/var/opt/nextpvr/config.xml
Default recording directories
/home/npvr/recordings/livetv
/home/npvr/videos/recordings
logs
/var/opt/nextpvr/logs
channel icons
/var/opt/nextpvr/media/channels
So there ya go, everything I know about installing, updating and maintaining NextPVR on a headless Linux system. I hope someone finds it useful and if anyone sees any mistakes or has easier ways of doing something let me know and I'll update this.
NextPVR V6.1.5.231022 - Ubuntu 22.04 VM / 4 core / 8Gb memory
HDHR Prime X2 / HDFX-2 /Schedule Direct / 2X Pi4 + & 3X Pi3 LibreELEC Kodi clients
Server - TrueNAS/ SuperMicro MBD-X10SL7-F MB / Xeon E3-1246 / 32Gb Unbuffered ECC / 8 X 4TB RAIDZ2
HDHR Prime X2 / HDFX-2 /Schedule Direct / 2X Pi4 + & 3X Pi3 LibreELEC Kodi clients
Server - TrueNAS/ SuperMicro MBD-X10SL7-F MB / Xeon E3-1246 / 32Gb Unbuffered ECC / 8 X 4TB RAIDZ2