| Adding Jellyfin for music. - selfhost - Incus configurations for my self-hosted… | |
| Log | |
| Files | |
| Refs | |
| README | |
| --- | |
| commit 8bec9483eb5f6319c03a8c2f7560ae202f777f4a | |
| parent 2e337e95c067dbadbb8f3bf59c37dc8f6694d111 | |
| Author: Jay Scott <[email protected]> | |
| Date: Tue, 18 Jun 2024 20:49:23 +0100 | |
| Adding Jellyfin for music. | |
| Diffstat: | |
| A jellyfin/files/jellyfin | 6 ++++++ | |
| A jellyfin/files/lighttpd.conf | 34 +++++++++++++++++++++++++++++… | |
| A jellyfin/init.sh | 14 ++++++++++++++ | |
| A jellyfin/jellyfin.yaml | 31 +++++++++++++++++++++++++++++… | |
| 4 files changed, 85 insertions(+), 0 deletions(-) | |
| --- | |
| diff --git a/jellyfin/files/jellyfin b/jellyfin/files/jellyfin | |
| @@ -0,0 +1,6 @@ | |
| +supervisor=supervise-daemon | |
| +datadir="/var/lib/jellyfin" | |
| +cachedir="/var/cache/jellyfin" | |
| +logdir="/var/log/jellyfin" | |
| +webdir="/usr/share/webapps/jellyfin-web" | |
| +opts="" | |
| diff --git a/jellyfin/files/lighttpd.conf b/jellyfin/files/lighttpd.conf | |
| @@ -0,0 +1,34 @@ | |
| +var.basedir = "/var/www/localhost" | |
| +var.logdir = "/var/log/lighttpd" | |
| +var.statedir = "/var/lib/lighttpd" | |
| + | |
| +include "mime-types.conf" | |
| +server.username = "lighttpd" | |
| +server.groupname = "lighttpd" | |
| +server.document-root = var.basedir + "/htdocs" | |
| +server.pid-file = "/run/lighttpd.pid" | |
| +server.errorlog = var.logdir + "/error.log" | |
| +index-file.names = ("index.html") | |
| + | |
| +server.modules += ( "mod_redirect", "mod_openssl", "mod_proxy") | |
| + | |
| +$SERVER["socket"] == ":443" { | |
| + ssl.engine = "enable" | |
| + ssl.pemfile = "/etc/lighttpd/certs/jay.scot.cer" | |
| + ssl.privkey = "/etc/lighttpd/certs/jay.scot.key" | |
| + ssl.openssl.ssl-conf-cmd = ("MinProtocol" => "TLSv1.3", "Options" => "-Ser… | |
| + | |
| + server.name = "dashboard.jay.scot" | |
| + server.document-root = "/srv/www/" | |
| + proxy.server = ( "" => ( | |
| + ( "host" => "127.0.0.1", "port" => 8096 ) | |
| + ) | |
| + ) | |
| + | |
| +} | |
| + | |
| +$HTTP["scheme"] == "http" { | |
| + $HTTP["host"] =~ ".*" { | |
| + url.redirect = (".*" => "https://%0$0") | |
| + } | |
| +} | |
| diff --git a/jellyfin/init.sh b/jellyfin/init.sh | |
| @@ -0,0 +1,14 @@ | |
| +#!/bin/sh | |
| + | |
| +HOST=jellyfin | |
| + | |
| +incus stop $HOST | |
| +incus delete $HOST | |
| +incus launch images:alpine/3.20/cloud $HOST < $HOST.yaml | |
| + | |
| +incus file push ./files/lighttpd.conf $HOST/etc/lighttpd/ -pv --mode 644 | |
| +incus file push ./files/jellyfin $HOST/etc/conf.d/ -pv --mode 644 | |
| +incus exec $HOST -- cloud-init status --wait | |
| +incus exec $HOST -- rc-service lighttpd start | |
| +incus exec $HOST -- rc-service jellyfin start | |
| + | |
| diff --git a/jellyfin/jellyfin.yaml b/jellyfin/jellyfin.yaml | |
| @@ -0,0 +1,31 @@ | |
| +devices: | |
| + media: | |
| + path: /srv/media | |
| + source: /srv/media | |
| + type: disk | |
| + certs: | |
| + path: /etc/lighttpd/certs | |
| + source: /srv/certs | |
| + type: disk | |
| + shift: true | |
| + | |
| +config: | |
| + cloud-init.network-config: | | |
| + version: 2 | |
| + ethernets: | |
| + eth0: | |
| + addresses: | |
| + - 192.168.2.15/24 | |
| + gateway4: 192.168.2.1 | |
| + cloud-init.user-data: | | |
| + #cloud-config | |
| + package_upgrade: true | |
| + hostname: jellyfin.jay.scot | |
| + timezone: Europe/London | |
| + manage_resolv_conf: true | |
| + resolv_conf: | |
| + nameservers: ['192.168.2.10', '1.1.1.1'] | |
| + packages: | |
| + - jellyfin | |
| + - jellyfin-web | |
| + - lighttpd |