From 3239b825edb213fffd39779d853fd2cfc9599189 Mon Sep 17 00:00:00 2001 From: David Newhall II Date: Wed, 31 Jul 2024 16:01:18 -0700 Subject: [PATCH] add arch linux installation instructions --- docs/install/archlinux.md | 40 +++++++++++++++++++++++ docs/install/includes/linuxpermissions.md | 26 +++++++++++++++ docs/install/linux.md | 34 ++----------------- docs/install/seedbox.md | 11 ++++--- sidebars.js | 2 +- 5 files changed, 77 insertions(+), 36 deletions(-) create mode 100644 docs/install/archlinux.md create mode 100644 docs/install/includes/linuxpermissions.md diff --git a/docs/install/archlinux.md b/docs/install/archlinux.md new file mode 100644 index 0000000..49f8120 --- /dev/null +++ b/docs/install/archlinux.md @@ -0,0 +1,40 @@ +--- +id: archlinux +title: Arch Linux Install +pagination_prev: install/choosemethod +pagination_next: install/configuration +description: Install Unpackerr on an Arch Linux server. +--- + +import ArchiveAccess from './includes/archiveaccess.md'; +import Permissions from './includes/linuxpermissions.md'; + +:::info Root Access +This installation method requires root. If you don't have root on your shell, +then check out the non-root directions. +::: + +Arch does not use a repository, so binary packages are built and uploaded to GitHub +for each release. Download the `zst` package for your architecture from the +[releases page](https://github.com/Unpackerr/unpackerr/releases/latest) +and install it with `pacman -U `. Alternatively, you can build +it yourself using the [public AUR](https://aur.archlinux.org/packages/unpackerr). + +If you don't want to bother figuring out which file you need, use the +[install.sh](https://github.com/Unpackerr/unpackerr/blob/main/init/install.sh) script. +It downloads and trusts the [GoLift GPG public key](https://golift.io/gpg) and then +installs the binary Unpackerr package in one command, like this: + +```shell +# Pick curl or wget. Run only one of these: +curl -sL https://raw.githubusercontent.com/Unpackerr/unpackerr/main/init/install.sh | sudo bash +wget -qO- https://raw.githubusercontent.com/Unpackerr/unpackerr/main/init/install.sh | sudo bash +``` + +You can run this script any time to update to the latest version. Run it weekly in cron to keep up to date automatically. + + + +## Permissions + + diff --git a/docs/install/includes/linuxpermissions.md b/docs/install/includes/linuxpermissions.md new file mode 100644 index 0000000..6ed9be4 --- /dev/null +++ b/docs/install/includes/linuxpermissions.md @@ -0,0 +1,26 @@ +On Linux, unpackerr runs as `user:group` `unpackerr:unpackerr`. You will need to give that +user or group read and write access to your archives. That may mean adding the `unpackerr` +user, for example, to the `debian-transmission` group. +You would do that with a command such as `sudo usermod -aG debian-transmission unpackerr` + +It's only suggested you do run `usermod` if you know what it does and how to set a umask. +You probably instead want to change the uid and/or gid as shown next. + +### Change the uid/gid + +If you wish to change the user and/or group that unpackerr runs as you need to do exactly this, **and only this**: + +1. Run this command: + - `sudo systemctl edit unpackerr.service` +1. The previous command opens your `$EDITOR` with a commented out version of the unpackerr service unit. +1. Add the following content to the file editor between the comments. + Replace `newuser` and `newgroup` with your new values. + ```systemd + [Service] + User=newuser + Group=newgroup + ``` +1. Run this to read the new systemd service override file: + - `sudo systemctl daemon-reload` +1. Run this to start unpackerr with the new user and group: + - `sudo systemctl restart unpackerr` diff --git a/docs/install/linux.md b/docs/install/linux.md index 1367684..03c11b5 100644 --- a/docs/install/linux.md +++ b/docs/install/linux.md @@ -1,22 +1,19 @@ --- id: linux -title: Repository +title: Linux Repository pagination_prev: install/choosemethod pagination_next: install/configuration description: Install Unpackerr on a Linux server. --- import ArchiveAccess from './includes/archiveaccess.md'; - -# Linux Repositories +import Permissions from './includes/linuxpermissions.md'; :::info Root Access This installation method requires root. If you don't have root on your shell, then check out the non-root directions. ::: -## Install - Linux binaries are distributed through `yum` and `apt` repositories. Using a repository allows easier upgrades and access to additional software. Use the command (script) below to automatically install the GoLift repo and @@ -38,32 +35,7 @@ sudo systemctl restart unpackerr ## Permissions -On Linux, unpackerr runs as `user:group` `unpackerr:unpackerr`. You will need to give that -user or group read and write access to your archives. That may mean adding the `unpackerr` -user, for example, to the `debian-transmission` group. -You would do that with a command such as `sudo usermod -aG debian-transmission unpackerr` - -It's only suggested you do run `usermod` if you know what it does and how to set a umask. -You probably instead want to change the uid and/or gid as shown next. - -### Change the uid/gid - -If you wish to change the user and/or group that unpackerr runs as you need to do exactly this, **and only this**: - -1. Make this folder: - - `sudo mkdir -p /etc/systemd/system/unpackerr.service.d/` -1. Make this file: - - `sudo touch /etc/systemd/system/unpackerr.service.d/override.conf` -1. Add the following content to the file. Replace `newuser` and `newgroup` with your new values. - ```systemd - [Service] - User=newuser - Group=newgroup - ``` -1. Run this to read the new systemd service override file: - - `sudo systemctl daemon-reload` -1. Run this to start unpackerr with the new user and group: - - `sudo systemctl restart unpackerr` + --- diff --git a/docs/install/seedbox.md b/docs/install/seedbox.md index e3c67b2..fbb2f21 100644 --- a/docs/install/seedbox.md +++ b/docs/install/seedbox.md @@ -1,6 +1,6 @@ --- id: seedbox -title: Seedbox +title: Seedbox Install pagination_prev: install/linux pagination_next: install/configuration description: Install Unpackerr on a Linux server without root. @@ -8,8 +8,6 @@ description: Install Unpackerr on a Linux server without root. import ArchiveAccess from './includes/archiveaccess.md'; -# Linux Seedbox - Learn how to install Unpackerr on your linux shell without root. 1. Download a binary from the [latest release](https://github.com/Unpackerr/unpackerr/releases/latest). @@ -25,6 +23,8 @@ Learn how to install Unpackerr on your linux shell without root. +## Install Script + Here's a simple script that automates the above steps. You should take some time to understand how [screen](https://wiki.archlinux.org/title/GNU_Screen) works if you use this solution. Please read and understand what the script does before running it. @@ -75,7 +75,10 @@ screen -dmS unpackerr $HOME/unpackerr/unpackerr -c $HOME/unpackerr/unpackerr.con crontab - ``` -After you run this script, and exit `nano`, Unpackerr will be running in the background. +After you run this script, and exit `nano` (with `ctrl+x`), Unpackerr will be running in the background. + +## Screen Usage + If you're not familiar with `screen`, here's a quick primer: - Run `screen -r` to re-attach Unpackerr's screen to your terminal. diff --git a/sidebars.js b/sidebars.js index ec6e47a..29483cf 100644 --- a/sidebars.js +++ b/sidebars.js @@ -8,7 +8,7 @@ module.exports = { 'install/freebsd', 'install/macos', 'install/windows', - {"Linux": [ 'install/linux', 'install/seedbox']}, + {"Linux": [ 'install/linux', 'install/archlinux', 'install/seedbox']}, 'install/configuration', ] },