Highly opinionated server setup to cater to my needs
NOTE: If things dont work for some reason, try restarting and seeing if that fixes it.
Probably get a VM from Oracle Always Free Tier stuff.
Use your own server
https://linuxize.com/post/how-to-enable-ssh-on-ubuntu-18-04/
sudo apt update
sudo apt install openssh-server
sudo systemctl enable ssh
sudo systemctl start ssh
sudo ufw enable
sudo ufw allow ssh
This is to make sure it doesnt turn off mid install or when idle. If its a laptop, make sure power off when lid is closed is also turned off.
You can do this via the UI or refer to this stackoverflow post.
ssh-keygen -t ed25519 -C "primary-key"
file ~/.ssh/id_ed25519.pub
ssh-copy-id -p <ssh-port> <remote-user>@<server-ip>
If youre using a machine that only allows for publickey auth, then you can upload your key that you just generated with the following command
ssh-copy-id -i ~/.ssh/id_ed25519.pub -o 'IdentityFile ~/.ssh/<your-existing-private-key-for-access>.key' -p <ssh-port> <remote-user>@<server-ip>
sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository --yes --update ppa:ansible/ansible
sudo apt install ansible
ansible-galaxy collection install kubernetes.core
group_vars/all
file to fill out the required information thereAt the very least, search for the items with tags # FILL OUT
Websites
Zone
(basically the website you used in the group_vals/all
file)Overview
page
Zone ID
group_vars/all
fileGo to the DNS
page
Type | Name | Content | Proxy Status | TTL |
---|---|---|---|---|
A |
<YOUR_DOMAIN_NAME> |
<YOUR_PUBLIC_IP> |
DNS only |
Auto |
A |
*.<YOUR_DOMAIN_NAME> |
<YOUR_PUBLIC_IP> |
DNS only |
Auto |
<YOUR_DOMAIN_NAME>
in the group_vars/all
file instead of the server's IP addressZone
(or website) from Zone Resources
section
Zone:DNS:Edit
Zone
informationZone:Zone:Read
group_vars/all
filesetup.yaml
- import_playbook: install-and-configure-cloudflare-dns-updater-service.yaml
hosts.yaml
file to fill out the template./run.sh
-vvvv
to get more verbose outputAdd the recommended dashboards (Make sure you select the correct job in the variables section, you can default to kubernetes-service-scraper
)
Would recommend adding a panel with the following query as it is useful to monitor pods as well
avg(irate(container_cpu_usage_seconds_total[2m])) by (pod,container)
Initial setup is just following on-screen instructions.
Point Jellyfin to use the directories mentioned in the playbooks for shows, movies, music and books.
/media/data/shows
/media/data/movies
/media/data/music
/media/data/books
Add any other config required.
Admin > Dashboard > Playback
Hardware acceleration
Video Acceleration API (VAAPI)
which is setup already to use the integrated Intel GPU. Not tested with anything else (like a dedicated AMD/Nvidea GPU)intel-gpu-tools
package to monitor (notice GPU usage when hardware encoding is enabled, and no GPU usage when it is disabled) at least the intel GPU by running the command below on the host:
sudo intel_gpu_top
HEVC 10bit
because for some reason that breaks itAdd any plugins you may want
Admin > Dashboard > Plugins > Catalogue
Dashboard
and k8s will restart, or delete the pod)Admin > Dashboard > Plugins > Trackt
Authorize Device
Admin > Dashboard > Scheduled Tasks > Trackt
Default login credentials are randomly generated, you need to look at ansible logs to get the default login credentials.
You can log into qBittorrent
in the logs to find the creds in the form admin/<RANDOM_PASSWORD>
<RANDOM_PASSWORD>
is not seen, that means that a password was found to be set already and that a randomly generated password was not used. Please try to remeber the password or reinstall to override configuration to use default passwords again.Change the default login details
Tools > Options > Web UI > Authentication
Set default download location to one the mentioned directories (or make sure to put it in the right directory when downloading for ease)
Tools > Options > Downloads > Default Save Path
/media/data/downloads
Set seeding limits
Tools > Options > BitTorrent > Seeding Limits
Set torrent download/upload limits
Tools > Options > BitTorrent > Torrent Queueing
Do base setup
/media/data/books
and select Yes
for it to rebuild the library if asked.Go to Preferences > Sharing over the net
Require username and password to access the Content server
Run the server automatically when calibre starts
Start server
User accounts tab
and create a userReadarr
setupCTRL + R
on the main screenDefault login is admin/admin123
Set folder to be /media/data/books
To enable web reading, click on Admin
(case sensitive) on the top right
admin
Allow ebook viewer
Service function
Service | Purpose |
---|---|
Readarr | Books |
Sonarr | TV Shows |
Radarr | Movies |
Lidarr | Music |
Go to Settings
and click on Show Advanced
Enable authentication
Settings > General
Authentication
to Forms (Login Page)
Authentication Required
to Enabled
Add torrent client
Settings > Download Clients > Add > qBittorent > Custom
qbittorrent
10095
<qBittorrent_username>
<qBittorrent_password>
Remove Completed
option.Set the root directories to be the following
Settings > Media Management
Service | Root Directory |
---|---|
Readarr | /media/data/books/ |
Sonarr | /media/data/shows/ |
Radarr | /media/data/movies/ |
Lidarr | /media/data/music/ |
Adjust quality definitions
Settings > Quality
Size Limit
or Megabytes Per Minute
(or equivalent) to appropriate numbers2-3GiB/h
would usually be sufficient as the Preferred
value, and you can leave the Max
value a bit higher to ensure a better chance of download grabsRadarr/Sonarr specific config
Settings > Custom Formats
Language
ConditionLanguage: Original
Required: True
Settings > Profiles
Minimum Custom Format Score
to 0
(sum of the custom formats scores)-1000
(something crazy low)Readarr specific config
Settings > Media Management
/media/data/books/
Use Calibre
options the the following defaultscalibre-webserver
8081
<calibre_username>
<calibre_password>
Rename Books
and use the defaultsEnable authentication
Settings > General
Authentication
to Forms (Login Page)
Authentication Required
to Enabled
Add FlareSolverr
service as a proxy, refer to this guide for help
Settings > Indexers
FlareSolverr
flaresolverr
http://flaresolverr:8191/
Follow the official Quick Start Guide
1337x
Add "flaresolverr" tag
LimeTorrents
The Pirate Bay
EZTV
Anidex
Add with higher priority, example "1", since it has good english subtitled content
Add "flaresolverr" tag
Bangumi Moe
AniRena
Nyaa.si
Tokyo Toshokan
Add Sonarr, Radarr, Lidarr and Readarr to the Settings > Apps > Application
section using the correct API token and kubernetes service names
http://prowlarr:9696
http://sonarr:8989
http://radarr:7878
http://lidarr:8686
http://readarr:8787
Sync Catagories
for each application if requiredSonarr
and Radarr
, it might be worthwhile using both TV
and Movies
categoriesEnable authentication
Settings > General
Security
select Form
as the form of Authentication
Follow the official Setup Guide
Settings > Radarr
and Settings > Sonarr
Enable
Fill out the details and save
Settings > General > Security > API Key
Service Name | Port |
---|---|
radarr | 7878 |
sonarr | 8989 |
70
is fineSettings > Languages
Settings > Provider
and add providers for subtitlesSettings > Subtitles
and make changes if neededNOTE:
One stop shop for Sonarr/Radarr/Lidarr requests
Get the API keys for Jellyfin, Sonarr and Radarr
Admin > Dashboard > API Keys
Settings > General > Security > API Key
Set credentials for login
Go to Settings
Use the correct API keys, hostnames and ports for the services | Service Name | Port |
---|---|---|
jellyfin | 8096 | |
sonarr | 8989 | |
radarr | 7878 | |
lidarr | 8686 |
Load Profiles
and Load Root Folders
buttons and use the appropriate defaults as used in the services seen here.Movies
using Radarr
TV
using Sonarr
Enable season folders
optionV3
optionMusic
using Lidarr
Media Server
using Jellyfin
Enable
for each of those setups as wellGo to Users
Request Tv
Request Movie
Request Music
Auto Approve Tv
Auto Approve Movie
Auto Approve Music
Use the kubeconfig file copied over to the current working directory by exporting it
export KUBECONFIG=<KUBECONFIG_LOCATION>
Optionally, edit your local ~/.kube/config
and incorporate the information from the copied over kubeconfig into it
NOTE:
ansible_host
from the hosts.yaml
file is used as the IP in the kubeconfig file. It is strongly recommended that you change that to the LAN IP of the server (to not have to port forward this on your router to access it)Use the username and password from the group_vars/all
file to use this as a proxy server
The address would be <PUBLIC_IP>:<GROUP_VARS_PORT>
or <DOMAIN_NAME>:<GROUP_VARS_PORT>
or <LAN_IP>:<GROUP_VARS_PORT>
For external access:
sudo ufw status verbose | grep -i samba
on the server which lists what ports were exposed as part of sudo ufw allow samba
139
445
137
138
To authenticate
<ANSIBLE_USER>
you used in the hosts.yaml
filegroup_vars/all
file (smb.password
section).In Windows, connect to it using \\<LAN_IP>\<SHARE_NAME_FROM_GROUP_VARS_ALL>
More information here
You need to create DNS entries to access the Ingress services. The following entries are recommended:
*.<DOMAIN_NAME>
<DOMAIN_NAME>
You can port forward the following ports on your router to gain external access. On your router:
all
file defaults for port forwarding, feel free to tweak to your needs.Service | Default access | Where | Server port | Public facing port |
---|---|---|---|---|
ssh | ssh | <LAN_IP> or <DOMAIN_NAME> |
22 | <IN_LINE_WITH_HOSTS_FILE_OR_22> |
samba | proxy | \\<LAN_IP>\<SHARE_NAME> or \\<DOMAIN_NAME>\<SHARE_NAME> |
TCP: 139,445 , UDP: 137,138 |
<BEST_NOT_TO_EXPOSE_THIS> |
squid | proxy | <LAN_IP>:<GROUP_VARS_PORT> or <DOMAIN_NAME>:<GROUP_VARS_PORT> |
<IN_LINE_WITH_ALL_FILE> |
<YOU_DECIDE> |
grafana | Ingress | grafana.<DOMAIN_NAME> |
8080 | 80 |
jellyfin | Ingress | jellyin.<DOMAIN_NAME> |
8080 | 80 |
ombi | Ingress | ombi.<DOMAIN_NAME> |
8080 | 80 |
prowlarr | Ingress | prowlarr.<DOMAIN_NAME> |
8080 | 80 |
bazarr | Ingress | bazarr.<DOMAIN_NAME> |
8080 | 80 |
radarr | Ingress | radarr.<DOMAIN_NAME> |
8080 | 80 |
sonarr | Ingress | sonarr.<DOMAIN_NAME> |
8080 | 80 |
readarr | Ingress | readarr.<DOMAIN_NAME> |
8080 | 80 |
lidarr | Ingress | lidarr.<DOMAIN_NAME> |
8080 | 80 |
librespeed | Ingress | librespeed.<DOMAIN_NAME> |
8080 | 80 |
calibre-web | Ingress | calibre-web.<DOMAIN_NAME> |
8080 | 80 |
calibre | LAN | <LAN_IP>:3002 (No ingress rules defined) |
3002 | <YOU_DECIDE> |
minikube | LAN api-access | <LAN_IP>:3001 |
3001 | <YOU_DECIDE> |
NOTE: Security is an unkown when exposing a service to the internet.