PVE Medialab
This guide will help you create a suite of PVE CT's and applications for building a Home Media solution.
As with all our guides we have a Easy Script to automate CT creation through to the installation of software.
But first step is to check your network and hardware prerequisite requirements before running our Easy Script. Its important you first read and follow our prerequisite guide.
Prerequisites
Network Prerequisites:
- Layer 2/3 Network Switches
PVE Host Prerequisites:
-
PVE Host is configured to our build
-
PVE Host Backend Storage mounted to your NAS
- nas-0X-backup
- nas-0X-books
- nas-0X-downloads
- nas-0X-music
- nas-0X-photo
- nas-0X-transcode
- nas-0X-video
You must have a running network File Server (NAS) with ALL of the above NFS and/or CIFS backend share points configured on your PVE host pve-01.
Optional Prerequisites:
- pfSense is fully configured including working OpenVPN Gateways VPNGATE-LOCAL and VPNGATE-WORLD.
Easy Scripts are based on bash scripting. Simply `Cut & Paste` our Easy Script command into your terminal window, press `Enter` and follow the prompts and terminal instructions. But PLEASE first read our guide so you fully understand the input requirements. Easy Scripts
Our Easy Scripts assumes your network is VLAN ready. If not, simply decline the Easy Script prompt to accept our default settings ( i.e Proceed with our Easy Script defaults (recommended) [y/n]? enter 'n' ). You can then set your own PVE container variables such as IP address.
Table of Contents
- 1. About our MediaLab CT Applications
- 2. Jellyfin CT
- 3. NZBget LXC
- 4. Deluge LXC
- 5. Jackett LXC
- 6. Flexget LXC
- 7. Sonarr LXC
- 8. Lidarr
- 9. Ahuabooks
# 1. About our MediaLab CT Applications All our MediaLab PVE CTs are built using the PVE Ubuntu 20.10 template.
Shared storage (NAS) is via CT bind mounts with your PVE host(s). All our MediaLab CT applications use our custom Linux User media
and Group medialab
.
1.1. Unprivileged CTs and File Permissions
With unprivileged CT containers you will have issues with UIDs (user id) and GUIDs (group id) permissions with bind mounted shared data. In Proxmox UIDs and GUIDs are mapped to a different number range than on the host machine, usually root (uid 0) became uid 100000, 1 will be 100001 and so on.
This means every CT file and directory will be mapped to "nobody" (uid 65534). This isn't acceptable for host mounted shared data resources. For shared data we want to access the directory with the same, unprivileged, UID as is being used on all other CTs under the same user name.
Our default PVE Users (UID) and Groups (GUID) in all our MediaLab, HomeLab and PrivateLab CTs are common.
- user
media
(uid 1605) and groupmedialab
(gid 65605) accessible to unprivileged LXC containers (i.e JellyFin, NZBGet, Deluge, Sonarr, Radarr, LazyLibrarian, FlexGet); - user
home
(uid 1606) and grouphomelab
(gid 65606) accessible to unprivileged LXC containers (i.e Syncthing, Nextcloud, Unifi); - user
private
(uid 1607) and groupprivatelab
(gid 65606) accessible to unprivileged CT containers (i.e all things private).
Because some people use Synology DiskStations where new Group ID's are in ranges above 65536, outside of Proxmox ID map range, we must pass through our
medialab
(GUID 65605),homelab
(GUID 65606) andprivatelab
(GUID 65607) Group GUIDs mapped 1:1.
Our fix is done in three stages in our Easy Scripts when you create any new MediaLab application CT.
1.1.1. Unprivileged Container Mapping - medialab GUID
To change a PVE containers mapping we change the PVE container UID and GUID in the file /etc/pve/lxc/container-id.conf
after our Easy Script creates all new MediaLab application CT.
# Our CT mapping in /etc/pve/lxc/container-id.conf
lxc.idmap: u 0 100000 1605
lxc.idmap: g 0 100000 100
lxc.idmap: u 1605 1605 1
lxc.idmap: g 100 100 1
lxc.idmap: u 1606 101606 63930
lxc.idmap: g 101 100101 65435
# Below are our NAS Group GUIDs (i.e medialab,homelab) in range from 65604 > 65704
lxc.idmap: u 65604 65604 100
lxc.idmap: g 65604 65604 100
The above change is done automatically in our Easy Script.
1.1.2. Allow a CT to perform mapping on your PVE host
A PVE CT has to be allowed to perform mapping on a PVE host. Since CTs create new containers using root, we have to allow root to use these new UIDs in the new CT.
To achieve this we add lines to /etc/subuid
(users) and /etc/subgid
(groups). We define two ranges:
- One where the system IDs (i.e root uid 0) of the container can be mapped to an arbitrary range on the host for security reasons; and,
- Another where Synology GUIDs above 65536 of the container can be mapped to the same GUIDs on a PVE host. That's why we have the following lines in the /etc/subuid and /etc/subgid files.
# /etc/subuid
root:65604:100
root:1605:1
# /etc/subgid
root:65604:100
root:100:1
The above edits adds a ID map range from 65604 > 65704 in the container to the same range on the PVE host. Next ID maps GUID 100 (default linux users group) and UID 1605 (username media) on the container to the same range on the host.
The above edit is done automatically in our Easy Script.
1.1.3. MediaLab CTs use common UID and GUID
Our PVE User media
and Group medialab
are the defaults in all our MediaLab CTs. This means all new files created by our MediaLab CTs have a common UID and GUID so NAS file creation, ownership and access permissions are fully maintained within the Group medialab
.
The Linux User and Group settings we use in all MediaLab CTs are:
(A) User media without a Home folder
groupadd -g 65605 medialab
useradd -u 1605 -g medialab -M media
usermod -s /bin/bash media
(B) User mediar with a Home folder
groupadd -g 65605 medialab
useradd -u 1605 -g medialab -m media
usermod -s /bin/bash media
The above change is done automatically in our Easy Script.
2. Jellyfin CT
Jellyfin is a Free Software Media System that puts you in control of managing and streaming your media. Jellyfin is an alternative to the proprietary Emby and Plex to provide media from a dedicated server to end-user devices via multiple apps.
Jellyfin is descended from Emby's 3.5.2 release and ported to the .NET Core framework to enable full cross-platform support. There are no strings attached, no premium licenses or features, and no hidden agendas: and at the time of writing this media server software seems like the best available solution (and is free).
2.1. Installation
Our Easy Script will create your Ubuntu Jellyfin CT. Go to your Proxmox PVE host (i.e pve-01) management WebGUI CLI >_ Shell
or SSH terminal and type the following (cut & paste):
bash -c "$(wget -qLO - https://raw.githubusercontent.com/ahuacate/pve-medialab/master/pve_medialab_ct_jellyfin_installer.sh)"
Simply follow our Easy Script installation prompts. We recommend you accept our defaults and application settings to create a fully compatible Medialab build suite.
2.2. Setup Jellyfin
In your web browser URL type http://192.168.50.111:8096
and the applications configuration wizard page will appear. Detailed configuration instructions are available here.
3. NZBget LXC
NZBGet is a binary downloader, which downloads files from Usenet based on information given in nzb-files.
NZBGet is written in C++ and is known for its extraordinary performance and efficiency.
3.1. Installation
Our Easy Script will create your Ubuntu Jellyfin CT. Go to your Proxmox PVE host (i.e pve-01) management WebGUI CLI >_ Shell
or SSH terminal and type the following (cut & paste):
bash -c "$(wget -qLO - https://raw.githubusercontent.com/ahuacate/pve-medialab/master/pve_medialab_ct_nzbget_installer.sh)"
Simply follow our Easy Script installation prompts. We recommend you accept our defaults and application settings to create a fully compatible Medialab build suite.
3.2. Setup NZBget
In your web browser URL type http://192.168.30.112:6789
and the applications web frontend will appear. Detailed configuration instructions are available here.
4. Deluge LXC
Deluge is a lightweight, free software, cross-platform BitTorrent client.
4.1. Installation
Our Easy Script will create your Ubuntu Deluge CT. Go to your Proxmox PVE host (i.e pve-01) management WebGUI CLI >_ Shell
or SSH terminal and type the following (cut & paste):
bash -c "$(wget -qLO - https://raw.githubusercontent.com/ahuacate/pve-medialab/master/pve_medialab_ct_deluge_installer.sh)"
Simply follow our Easy Script installation prompts. We recommend you accept our defaults and application settings to create a fully compatible Medialab build suite.
4.2. Setup Deluge
In your web browser URL type http://192.168.30.113:8112
and the applications web frontend page will appear. Detailed configuration instructions are available here.
5. Jackett LXC
Jackett works as a proxy server: it translates queries from apps (Sonarr, Radarr, Lidarr etc) into tracker-site-specific http queries, parses the html response, then sends results back to the requesting software. This allows for getting recent uploads (like RSS) and performing searches. Jackett is a single repository of maintained indexer scraping & translation logic - removing the burden from other apps.
5.1. Installation
Our Easy Script will create your Ubuntu Jackett CT. Go to your Proxmox PVE host (i.e pve-01) management WebGUI CLI >_ Shell
or SSH terminal and type the following (cut & paste):
bash -c "$(wget -qLO - https://raw.githubusercontent.com/ahuacate/pve-medialab/master/pve_medialab_ct_jackett_installer.sh)"
Simply follow our Easy Script installation prompts. We recommend you accept our defaults and application settings to create a fully compatible Medialab build suite.
5.2. Setup Jackett
In your web browser URL type http://192.168.50.120:9117
and the applications web frontend will appear. Detailed configuration instructions are available here.
6. Flexget LXC
UNDER DEVELOPMENT
7. Sonarr LXC
Sonarr is a PVR for Usenet and BitTorrent users. It can monitor multiple RSS feeds for new episodes of your favorite shows and will grab, sort and rename them. It can also be configured to automatically upgrade the quality of files already downloaded when a better quality format becomes available.
7.1. Installation
Our Easy Script will create your Ubuntu Sonarr CT. Go to your Proxmox PVE host (i.e pve-01) management WebGUI CLI >_ Shell
or SSH terminal and type the following (cut & paste):
bash -c "$(wget -qLO - https://raw.githubusercontent.com/ahuacate/pve-medialab/master/pve_medialab_ct_sonarr_installer.sh)"
Simply follow our Easy Script installation prompts. We recommend you accept our defaults and application settings to create a fully compatible Medialab build suite.
7.2. Setup Sonarr
In your web browser URL type http://192.168.50.115:8989
and the applications web frontend will appear. Detailed configuration instructions are available here.
7.3. Radarr LXC
Radarr is a PVR for Usenet and BitTorrent users. It can monitor multiple RSS feeds for new episodes of your favorite shows and will grab, sort and rename them. It can also be configured to automatically upgrade the quality of files already downloaded when a better quality format becomes available.
7.4. Installation
Our Easy Script will create your Ubuntu Radarr CT. Go to your Proxmox PVE host (i.e pve-01) management WebGUI CLI >_ Shell
or SSH terminal and type the following (cut & paste):
bash -c "$(wget -qLO - https://raw.githubusercontent.com/ahuacate/pve-medialab/master/pve_medialab_ct_radarr_installer.sh)"
Simply follow our Easy Script installation prompts. We recommend you accept our defaults and application settings to create a fully compatible Medialab build suite.
7.5. Setup Radarr
In your web browser URL type http://192.168.50.116:7878
and the applications web frontend will appear. Detailed configuration instructions are available here.
8. Lidarr
Lidarr is a music collection manager for Usenet and BitTorrent users. It can monitor multiple RSS feeds for new tracks from your favorite artists and will grab, sort and rename them. It can also be configured to automatically upgrade the quality of files already downloaded when a better quality format becomes available.
8.1. Installation
Our Easy Script will create your Ubuntu Lidarr CT. Go to your Proxmox PVE host (i.e pve-01) management WebGUI CLI >_ Shell
or SSH terminal and type the following (cut & paste):
bash -c "$(wget -qLO - https://raw.githubusercontent.com/ahuacate/pve-medialab/master/pve_medialab_ct_lidarr_installer.sh)"
Simply follow our Easy Script installation prompts. We recommend you accept our defaults and application settings to create a fully compatible Medialab build suite.
8.2. Setup Lidarr
In your web browser URL type http://192.168.50.117:8686
and the applications web frontend will appear. Detailed configuration instructions are available here.
9. Ahuabooks
Ahuabooks is a suite of software for managing your ebook, audiobook, podcast and magazine requirements.
The software suite includes:
- Lazylibrarian
- Calibre
- Calibre-web (frontend for Calibre)
- Booksonic
9.1. Installation
Our Easy Script will create your Ubuntu Ahuabooks CT. Go to your Proxmox PVE host (i.e pve-01) management WebGUI CLI >_ Shell
or SSH terminal and type the following (cut & paste):
bash -c "$(wget -qLO - https://raw.githubusercontent.com/ahuacate/pve-medialab/master/pve_medialab_ct_ahuabooks_installer.sh)"
Simply follow our Easy Script installation prompts. We recommend you accept our defaults and application settings to create a fully compatible Medialab build suite.
9.2. Setup Ahuabooks
In your web browser URL type to connect and the applications web frontend will appear.
Lazylibrarian
http://192.168.50.118:5299
Calibre-webhttp://192.168.50.118:8083
Booksonichttp://192.168.50.118:4040
Detailed configuration instructions are available here.