aboutsummaryrefslogtreecommitdiff
path: root/doc/getting-started
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-01-25 18:08:18 +0100
committermetamuffin <metamuffin@disroot.org>2024-01-25 18:08:18 +0100
commitcd6b484d24b638f08221ff1388564d8369d37126 (patch)
treeb820445c91fb811e64cffcc9aaaa35eeac588cbd /doc/getting-started
parent9d08704069f09f185eac0b80653cc39c1335c852 (diff)
downloadjellything-cd6b484d24b638f08221ff1388564d8369d37126.tar
jellything-cd6b484d24b638f08221ff1388564d8369d37126.tar.bz2
jellything-cd6b484d24b638f08221ff1388564d8369d37126.tar.zst
add some mdbook documentation
Diffstat (limited to 'doc/getting-started')
-rw-r--r--doc/getting-started/README.md1
-rw-r--r--doc/getting-started/installation.md24
-rw-r--r--doc/getting-started/launch.md19
-rw-r--r--doc/getting-started/setup.md96
4 files changed, 140 insertions, 0 deletions
diff --git a/doc/getting-started/README.md b/doc/getting-started/README.md
new file mode 100644
index 0000000..bad5562
--- /dev/null
+++ b/doc/getting-started/README.md
@@ -0,0 +1 @@
+# Getting Started
diff --git a/doc/getting-started/installation.md b/doc/getting-started/installation.md
new file mode 100644
index 0000000..7496b16
--- /dev/null
+++ b/doc/getting-started/installation.md
@@ -0,0 +1,24 @@
+# Installation
+
+## From the AUR
+
+This is the recommended option. It will also install a systemd service running
+in its own user.
+
+```sh
+git clone https://aur.archlinux.org/jellything-git.git
+cd jellything-git
+makepkg -si
+```
+
+## From source
+
+```sh
+git clone --recursive https://codeberg.org/metamuffin/jellything.git
+cd jellything
+cargo build --release
+# Global installation
+cp target/release/{jellything,jellytool} /usr/local/bin
+# User installation
+cp target/release/{jellything,jellytool} ~/.local/bin
+``` \ No newline at end of file
diff --git a/doc/getting-started/launch.md b/doc/getting-started/launch.md
new file mode 100644
index 0000000..d1d502f
--- /dev/null
+++ b/doc/getting-started/launch.md
@@ -0,0 +1,19 @@
+# Launch your Platform
+
+> [!TIP]
+> If you used the AUR package, this should be as simple as
+> `systemctl start jellything`.
+
+For other installations, run the `jellything` binary with the configuration
+file's path as its first argument or set it in `JELLYTHING_CONFIG`. Jellything
+will start and serve your library at
+[https://127.0.0.1:8080/](https://127.0.0.1:8080/)
+
+```sh
+jellything /etc/jellything.yaml
+JELLYTHING_CONFIG=/etc/jellything.yaml jellything
+```
+
+It is also advised to use jellything with a reverse proxy. Configure the network
+interface with the environment variables `BIND_ADDR` and `PORT`. Stderr logging
+can be configured with `LOG`.
diff --git a/doc/getting-started/setup.md b/doc/getting-started/setup.md
new file mode 100644
index 0000000..24182fc
--- /dev/null
+++ b/doc/getting-started/setup.md
@@ -0,0 +1,96 @@
+# Setup
+
+## 1. Writing configurations
+
+First write your configuration files whereever you want. The AUR package uses
+`/etc/jellything.yaml`.
+
+```yaml
+# This hostname must be identical to how other instances reach you.
+hostname: example.org
+brand: "Jellything"
+slogan: ""
+
+# All of these paths can be customized. See "Paths"
+media_path: "/srv/media"
+asset_path: "/var/lib/jellything/assets"
+database_path: "/var/lib/jellything/db"
+library_path: "/var/lib/jellything/library"
+temp_path: "/tmp/jellything"
+cache_path: "/var/cache/jellything"
+secrets_path: "/etc/jellysecrets.yaml" # points to the file below
+```
+
+```yaml
+# jellysecrets.yaml; filled with placeholders
+admin_password: "xxxxxx"
+
+# Both these keys should be initialized randomly.
+# Use `head -c 32 /dev/random | base64`
+cookie_key: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx="
+session_key: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx="
+
+# Credentials for remote instances. Keep this empty if you are just starting.
+federation:
+ "example.org": { username: "examplefed", password: "xxxxxxx" }
+
+api:
+ fanart_tv: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ tmdb: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ omdb: xxxxxxxx
+ # This is the Trakt Application `client_id`
+ trakt: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ tvdb: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+```
+
+## 2. Creating required directories
+
+Next create directories in place of `cache_path`, `temp_path`, `media_path`,
+`library_path` if jellything is not permitted to do so itself. Also obtain the
+default assets from git.
+
+```sh
+mkdir -p $cache_path $temp_path $media_path $library_path
+git clone https://codeberg.org/metamuffin/jellything-assets.git $asset_path
+```
+
+## 3. Preparing your first import
+
+In _library\_path_, create files like below. This file provides an entry point
+to your library. Its exact meaning is described in
+[The Import Guide](../import/README.md).
+
+```yaml
+# root.yaml
+id: library
+sources:
+ - !override
+ public:
+ kind: !collection
+ title: "My Library"
+ children:
+ - movies
+```
+
+```yaml
+# movies/directory.yaml
+id: movies
+sources:
+ - !override
+ public:
+ kind: !collection
+ title: "Movies"
+ - !auto_children
+```
+
+Next place your favorite movies in _media\_path_ and use the import helper to
+quickly generate import instructions for it. This requires at least Trakt and
+TMDB keys to work.
+
+```sh
+# This should be run from media_path since the path in -m is relative to that no matter PWD.
+# Jellytool will show an interactive wizard to select the correct metadata.
+jellytool add -m big-buck-bunny.mkv
+jellytool add -m agent-327-operation-barbershop.mkv
+jellytool add -m spring.mkv
+```