From 4335af1b61abaf353a62d827fa2f26e077bd8615 Mon Sep 17 00:00:00 2001 From: Josh Ashton Date: Tue, 4 Mar 2025 18:59:01 -0700 Subject: [PATCH] minor setup script and jellyfin installation --- jellyfin.sh | 17 +++++++++++++++++ setup.sh | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 jellyfin.sh create mode 100644 setup.sh diff --git a/jellyfin.sh b/jellyfin.sh new file mode 100644 index 0000000..5f7c253 --- /dev/null +++ b/jellyfin.sh @@ -0,0 +1,17 @@ +# Get a Docker image, a pre-defined and configured application. +docker pull jellyfin:jellyfin + +# Create virtual persistent partitions to store information for Jellyfin +docker volume create jellyfin-config +docker volume create jellyfin-cache + +# Start a Docker container with the Jellyfin image. +docker run -d \ + --name jellyfin \ + --user 1000:1000 \ + --net=host \ + --volume jellyfin-config:/config \ + --volume jellyfin-cache:/cache \ + --mount type=bind,source=/home/jellypi/media,target=/media \ + --restart=unless-stopped \ + jellyfin/jellyfin diff --git a/setup.sh b/setup.sh new file mode 100644 index 0000000..8361ede --- /dev/null +++ b/setup.sh @@ -0,0 +1,37 @@ +# Add the repository to install cloudflared. +curl -L https://pkg.cloudflare.com/cloudflare-main.gpg | sudo tee /usr/share/keyrings/cloudflare-archive-keyring.gpg >/dev/null +echo "deb [signed-by=/usr/share/keyrings/cloudflare-archive-keyring.gpg] https://pkg.cloudflare.com/cloudflared $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/cloudflared.list + +# Add the repository to install Docker. +sudo apt-get install ca-certificates curl +sudo install -m 0755 -d /etc/apt/keyrings +sudo curl -fsSL https://download.docker.com/linux/raspbian/gpg -o /etc/apt/keyrings/docker.asc +sudo chmod a+r /etc/apt/keyrings/docker.asc + +# Add the repository to Apt sources: +echo \ + "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/raspbian \ + $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ + sudo tee /etc/apt/sources.list.d/docker.list > /dev/null + +# Update the repository of available packages (applications and software utilities) and upgrade all packages. This will take a while. +sudo apt update && sudo apt upgrade; + +# Install some basic applications and utilities. +# - tldr: a helpful and concise utility for explaining commands, with examples. +# +# - tmux: a terminal multiplexer, allowing you to have multiple panes of a terminal +# open at the same time. +# +# - neovim: a text editor. Alternatively (and pre-installed) use nano. +# +# - cloudflared: a utility used to securely expose processes to the internet. +# +# - docker: a utility used for quickly, easily, and securely deploying pre-built applications. +sudo apt install tldr tmux neovim cloudflared docker; + +# Systemctl is a tool used to manage underlying system processes, called daemons. Enable will start the docker +# daemon at startup, and start starts the daemon now. +sudo systemctl enable docker; + +restart;