chore(docs): refactor pages (#1144)

* chore(docs): refactor pages

* fix: links

* fix: broken link

* refactor: post install steps using partials
This commit is contained in:
Jason Rasmussen 2022-12-21 16:01:50 -05:00 committed by GitHub
parent 7966c925ea
commit 752b267399
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
67 changed files with 380 additions and 258 deletions

View file

@ -0,0 +1,4 @@
{
"label": "Features",
"position": 3
}

View file

@ -0,0 +1,40 @@
---
sidebar_position: 2
---
# Automatic Backup
A guide on how the foreground and background automatic backup works.
<img src={require('./img/background-foreground-backup.png').default} width="50%" title="Foreground&Background Backup" />
On iOS, there is only one option for automatic backup
- [Automatic Backup](#automatic-backup)
- [Foreground backup](#foreground-backup)
On Android, there are two options for automatic backup
- [Automatic Backup](#automatic-backup)
- [Foreground backup](#foreground-backup)
- [Background backup](#background-backup)
## Foreground backup
If foreground backup is enabled: whenever the app is opened or resumed, it will check if any photos or videos in the selected album(s) have yet to be uploaded to the cloud (the remainder count). If there are any, they will be uploaded.
## Background backup
Background backup is only available on Android thanks to the contribution effort of [@zoodyy](https://github.com/zoodyy).
If background backup is enabled. The app will periodically check if there are any new photos or videos in the selected album(s) to be uploaded to the cloud. If there are, it will upload them to the cloud in the background.
A native Android notification shows up when the background upload is in progress. You can further customize the notification by going to the app's settings.
:::info Note
- The app must be in the background for the backup worker to start running.
- It is a well-known problem that some Android models are very strict with battery optimization settings, which can cause a problem with the background worker. Please visit [Don't kill my app](https://dontkillmyapp.com/) for a guide on disabling this setting on your phone.
- If you reopen the app and the first page you see is the backup page, the counts will not reflect the background uploaded result. You have to navigate out of the page and come back to see the updated counts.
:::

View file

@ -0,0 +1,76 @@
---
sidebar_position: 3
---
# Bulk Upload (Using the CLI)
You can use the CLI to upload an existing gallery to the Immich server
[Immich CLI Repository](https://github.com/immich-app/CLI)
## Requirements
- Node.js 16 or above
- Npm
## Installation
```bash
npm i -g immich
```
## Quick Start
Specify user's credentials, Immich's server address and port, and the directory you would like to upload videos/photos from.
```bash
immich upload --email testuser@email.com --password password --server http://192.168.1.216:2283/api -d your/target/directory
```
---
### Parameters
| Parameter | Description |
| ---------------- | ------------------------------------------------------------------- |
| --yes / -y | Assume yes on all interactive prompts |
| --delete / -da | Delete local assets after upload |
| --email / -e | User's email |
| --password / -pw | User's password |
| --server / -s | Immich's server address |
| --directory / -d | Directory to upload from |
| --threads / -t | Number of threads to use (Default 5) |
| --album/ -al | Create albums for assets based on the parent folder or a given name |
### Run via Docker
Be aware that as this runs inside a container it mounts your current directory as a volume, and for the -d flag you need to use the path inside the container.
```bash
docker run -it --rm -v $(pwd):/import ghcr.io/immich-app/immich-cli:latest upload --email testuser@email.com --password password --server http://192.168.1.216:2283/api -d /import
```
Optionally, you can create an alias:
```bash
alias immich="docker run -it --rm -v $(pwd):/import ghcr.io/immich-app/immich-cli:latest"
immich upload --email testuser@email.com --password password --server http://192.168.1.216:2283/api -d /import
```
### Run from source
```bash title="Clone Repository"
git clone https://github.com/immich-app/CLI
```
```bash title="Install dependencies"
npm install
```
```bash title="Build the project"
npm run build
```
```bash title="Run the command"
node bin/index.js upload --email testuser@email.com --password password --server http://192.168.1.216:2283/api -d your/target/directory
```

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 KiB

View file

@ -0,0 +1,37 @@
---
sidebar_position: 1
---
import MobileAppDownload from '../partials/_mobile-app-download.md';
import MobileAppLogin from '../partials/_mobile-app-login.md';
import MobileAppBackup from '../partials/_mobile-app-login.md';
# Mobile App
:::tip
To upload from other devices, try using the [Bulk Upload CLI](/docs/features/bulk-upload.md).
:::
## Download
<MobileAppDownload />
:::info Beta Program
The beta release channel allows users to test upcoming changes before they are officially released. To join the channel use the links below.
- Android: Invitation link from [web](https://play.google.com/store/apps/details?id=app.alextran.immich) or from [mobile](https://play.google.com/store/apps/details?id=app.alextran.immich)
- iOS: [TestFlight invitation link](https://testflight.apple.com/join/1vYsAa8P)
:::
## Login
<MobileAppLogin />
## Backup
<MobileAppBackup />
:::info
You can enable automatic backup on supported devices. For more information see [Automatic Backup](/docs/features/automatic-backup.md).
:::

View file

@ -0,0 +1,66 @@
---
sidebar_position: 6
---
# OAuth Authentication
This page contains details about using OAuth in Immich.
## Overview
Immich supports 3rd party authentication via [OpenID Connect][oidc] (OIDC), an identity layer built on top of OAuth2. OIDC is supported by most identity providers, including:
- [Authentik](https://goauthentik.io/integrations/sources/oauth/#openid-connect)
- [Authelia](https://www.authelia.com/configuration/identity-providers/open-id-connect/)
- [Okta](https://www.okta.com/openid-connect/)
- [Google](https://developers.google.com/identity/openid-connect/openid-connect)
## Prerequisites
Before enabling OAuth in Immich, a new client application needs to be configured in the 3rd-party authentication server. While the specifics of this setup vary from provider to provider, the general approach should be the same.
1. Create a new (Client) Application
1. The **Provider** type should be `OpenID Connect` or `OAuth2`
2. The **Client type** should be `Confidential`
3. The **Application** type should be `Web`
4. The **Grant** type should be `Authorization Code`
2. Configure Redirect URIs/Origins
The **Sign-in redirect URIs** should include:
- All URLs that will be used to access the login page of the Immich web client (eg. `http://localhost:2283/auth/login`, `http://192.168.0.200:2283/auth/login`, `https://immich.example.com/auth/login`)
- Mobile app redirect URL `app.immich:/`
:::caution
You **MUST** include `app.immich:/` as the redirect URI for iOS and Android mobile app to work properly.
**Authentik example**
<img src={require('./img/authentik-redirect.png').default} title="Authentik Redirection URL" width="80%" />
:::
## Enable OAuth
Once you have a new OAuth client application configured, Immich can be configured using the Administration Settings page, available on the web (Administration -> Settings).
| Setting | Type | Default | Description |
| ------------------- | ------- | -------------------- | ------------------------------------------------------------------------- |
| OAuth enabled | boolean | false | Enable/disable OAuth2 |
| OAuth issuer URL | URL | (required) | Required. Self-discovery URL for client (from previous step) |
| OAuth client ID | string | (required) | Required. Client ID (from previous step) |
| OAuth client secret | string | (required) | Required. Client Secret (previous step) |
| OAuth scope | string | openid email profile | Full list of scopes to send with the request (space delimited) |
| OAuth button text | string | Login with OAuth | Text for the OAuth button on the web |
| OAuth auto register | boolean | true | When true, will automatically register a user the first time they sign in |
:::info
The Issuer URL should look something like the following, and return a valid json document.
- `https://accounts.google.com/.well-known/openid-configuration`
- `http://localhost:9000/application/o/immich/.well-known/openid-configuration`
The `.well-known/openid-configuration` part of the url is optional and will be automatically added during discovery.
:::
[oidc]: https://openid.net/connect/

View file

@ -0,0 +1,25 @@
---
sidebar_position: 7
---
# Server Commands
The `immich-server` docker image comes preinstalled with an administrative CLI that supports the following commands:
| Command | Description |
| ----------------------------- | ------------------------------------- |
| `immich help` | Display help |
| `immich reset-admin-password` | Reset the password for the admin user |
## How to run a command
To run a command, connect to the container and then execute it. For example:
```bash
docker exec -it immich-server_1 sh
/usr/src/app$ immich reset-admin-password
? Please choose a new password (optional) immich-is-awesome-unlike-this-password
New password:
immich-is-awesome-unlike-this-password
```

View file

@ -0,0 +1,9 @@
---
sidebar_position: 5
---
import StorageTemplate from '../partials/_storage-template.md';
# Storage Template
<StorageTemplate />

View file

@ -0,0 +1,22 @@
---
sidebar_position: 4
---
import RegisterAdminUser from '../partials/_register-admin.md';
import UserCreate from '../partials/_user-create.md';
# User Management
Immich supports multiple users, each with their own library.
## Register the Admin User
<RegisterAdminUser />
## Create a New User
<UserCreate />
## Delete a User
If you need to remove a user from Immich, head to "Administration", where users can be scheduled for deletion. The user account will immediately become disabled and their library and all associated data will be removed after 7 days.