NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support Linux v
« Previous 1 … 18 19 20 21 22 … 34 Next »
Headless Linux install and update for dummies

 
  • 0 Vote(s) - 0 Average
Headless Linux install and update for dummies
snagglewest
Offline

Senior Member

VA USA
Posts: 361
Threads: 60
Joined: Jul 2011
#1
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.
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
snagglewest
Offline

Senior Member

VA USA
Posts: 361
Threads: 60
Joined: Jul 2011
#2
2020-04-30, 06:11 PM
Installing updates:

Here’s how to install updates from the terminal when a new version is released

Updates should not change your config.xml or npvr.db3 files with all your recording info and settings, but before you get too far down the road, it's recommended to make a snapshot or backup in case something doesn't go exactly as planned. 

When SSHing in you are normally taken to your home directory, but check by listing the directory with the ls -la command.  You should see the NextPVR files to include nextpvr-helper.deb. If not a "locate" (locate nextpvr-helper.deb) will show you the correct path.  Once you're in the correct directory move on.

Stop the NextPVR service
# sudo service nextpvr-server stop

Though not really needed, I like to error on the side of caution so check the status of NextPVR.  It should show its stopped now.

# service nextpvr-server status

If you've installed past updates you'll see several nextpvr-helper.deb versions indicated by 1, 2 exc.  Since these aren't needed anymore, lets do some housekeeping and delete them all while we're in there.

# sudo rm nextpvr-helper.*

Not really necessary, but I like to check and make sure it's gone by taking another peek at the directory

# ls -la

Download the new nextpvr-helper.deb file
# curl https://nextpvr.com/nextpvr-helper.deb -O

Just to be on the safe side confirm that it is the correct version with
# dpkg-deb -I nextpvr-helper.deb

If everything checks out and it’s reporting the correct version run the newly downloaded installer
# sudo dpkg -i nextpvr-helper.deb

Give everything a few minutes to settle down and check the status of NextPVR to make sure it’s running and everything looks good
# service nextpvr-server status

If everything went as expected you should be back up and running and you can open the web UI at http://xxx.xxx.xxx.xxx:8866 in a browser.
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
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,648
Threads: 767
Joined: Nov 2003
#3
2020-04-30, 06:36 PM
Good info Smile
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,814
Threads: 954
Joined: May 2006
#4
2020-04-30, 06:50 PM
Since 1.1 checks have been in place to make sure the server and deb versions are in sync, so I don't agree that you have to remove the old deb file unless you are told that a new version exists. It doesn't hurt but it is an extra step.

Also I don't understand the rm instruction since the installer doesn't create version specific files, that must be something that you are doing so that could be confusing.

Martin
Pseudomax
Offline

Junior Member

UK
Posts: 5
Threads: 0
Joined: May 2021
#5
2021-06-12, 10:25 AM
(2020-04-30, 06:11 PM)snagglewest Wrote: Installing updates:

Here’s how to install updates from the terminal when a new version is released

Updates should not change your config.xml or npvr.db3 files with all your recording info and settings, but before you get too far down the road, it's recommended to make a snapshot or backup in case something doesn't go exactly as planned. 

When SSHing in you are normally taken to your home directory, but check by listing the directory with the ls -la command.  You should see the NextPVR files to include nextpvr-helper.deb. If not a "locate" (locate nextpvr-helper.deb) will show you the correct path.  Once you're in the correct directory move on.

Stop the NextPVR service
# sudo service nextpvr-server stop

Though not really needed, I like to error on the side of caution so check the status of NextPVR.  It should show its stopped now.

# service nextpvr-server status

If you've installed past updates you'll see several nextpvr-helper.deb versions indicated by 1, 2 exc.  Since these aren't needed anymore, lets do some housekeeping and delete them all while we're in there.

# sudo rm nextpvr-helper.*

Not really necessary, but I like to check and make sure it's gone by taking another peek at the directory

# ls -la

Download the new nextpvr-helper.deb file
# curl https://nextpvr.com/nextpvr-helper.deb -O

Just to be on the safe side confirm that it is the correct version with
# dpkg-deb -I nextpvr-helper.deb

If everything checks out and it’s reporting the correct version run the newly downloaded installer
# sudo dpkg -i nextpvr-helper.deb

Give everything a few minutes to settle down and check the status of NextPVR to make sure it’s running and everything looks good
# service nextpvr-server status

If everything went as expected you should be back up and running and you can open the web UI at http://xxx.xxx.xxx.xxx:8866 in a browser.

Great help! I have to agree that the 'housekeeping' helped me with my upgrade. When I initially tried to install using sudo apt install (after downloading the latest nextpvr-helper) the system did not seem to understand that I wanted to do an upgrade the server but seemed to rather think I wanted to update the 'nextpvr-helper' file. Following your steps (including deleting all remaining helper files) then successfully upgraded the server!

Thank you!!
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,814
Threads: 954
Joined: May 2006
#6
2021-06-12, 01:37 PM (This post was last modified: 2021-06-12, 02:30 PM by mvallevand.)
You are correct sudo apt install does not do an update, that would requiring bunding NextPVR in the package, but that long process described abovr is unnecessary.

As explained here https://forums.nextpvr.com/showthread.ph...#pid523891 in point #2 all you need to do is

sudo dpkg -i nextpvr-helper.deb

On my headless setup, I just keep the deb file in my user root since the deb file will verify it is the correct version, then it stops the server, downloads a new .NET if necessary, downloads and installs the current version and restarts the server.

Martin
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Linux Command Line To Initiate SchedulesDirect EPG Update LinuxDVR 1 170 2025-04-13, 06:35 PM
Last Post: mvallevand
  Linux install failed -- permission denied? FrogFan 4 405 2025-03-26, 12:39 AM
Last Post: FrogFan
  Is there a 'recommended' version/release of Linux? Bobthegoldfish 1 363 2024-12-24, 12:28 AM
Last Post: mvallevand
  update of the media database kfmf 9 532 2024-11-17, 12:09 PM
Last Post: mvallevand
  latest update superray2 7 539 2024-11-08, 02:16 PM
Last Post: superray2
  Downgrade on Linux eriberg 3 433 2024-09-04, 08:46 PM
Last Post: mvallevand
  linux mint 22 bccicone 2 529 2024-08-01, 10:10 PM
Last Post: bccicone
  Client Recommendations on Linux devarionarias 6 1,567 2024-06-18, 04:31 PM
Last Post: devarionarias
  Linux setup - Help a Windows user... prothed 18 2,362 2024-06-03, 11:08 AM
Last Post: Rod Hutchinson
  Install NexPVR backend in Buildroot based Linux Tnix 3 973 2024-03-14, 11:50 AM
Last Post: mvallevand

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode