Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
45ee720
docs: enhance documentation with comprehensive content expansions and…
Oct 14, 2025
4bb42ed
Merge branch 'main' of https://github.com/unraid/docs
Oct 14, 2025
ba26e71
Merge branch 'main' of https://github.com/unraid/docs
Oct 14, 2025
55a491e
docs: apply CodeRabbit formatting and clarity improvements
Oct 15, 2025
f09af34
docs: fix VM snapshot memory dump guidance (CodeRabbit)
Oct 15, 2025
8c00d78
Merge remote-tracking branch 'upstream/main'
Oct 15, 2025
c5d59fe
docs: Fix VM paths, icon organization, and rebuild instructions
Oct 24, 2025
d8ce64c
docs: Organize notification agent icons in dedicated static directory
Oct 24, 2025
b35b7ac
Merge remote-tracking branch 'upstream/main'
Oct 28, 2025
41581ba
docs: Flatten tabbed content and improve documentation accessibility
Oct 31, 2025
9c55e3f
refactor: update sidebar sorting and improve documentation clarity
Oct 31, 2025
393e605
fix: update iframe attributes to JSX camelCase format
Oct 31, 2025
52f84c7
Merge upstream/main: resolve conflicts in release notes and documenta…
Oct 31, 2025
914b829
Merge upstream/main: sync with 7.2.0 release notes update
Oct 31, 2025
28bf859
docs: Update FAQ structure and table of contents settings
Oct 31, 2025
122f77d
docs: Update FAQ and Licensing FAQ for improved structure and accessi…
Oct 31, 2025
3a63f3a
Merge branch 'main' of https://github.com/grizzlechips/docs
Oct 31, 2025
ccb57e8
Merge upstream/main: Bring in Unraid Account section and latest changes
Nov 4, 2025
d582a4b
chore: update documentation for API and configuration improvements
Nov 7, 2025
5e539e5
fix: update documentation and image paths for ZFS storage
Nov 7, 2025
47b247f
fix: update image paths in ZFS storage documentation
Nov 7, 2025
9f89784
fix: update release notes for Unraid OS 7.2.0
Nov 7, 2025
3f0fc6b
fix: update Docusaurus configuration and release notes formatting
Nov 7, 2025
62f14f5
Merge branch 'main' into main
ljm42 Nov 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ jobs:
git push origin HEAD:${{ github.event.pull_request.head.ref }} || echo "Unable to push lint fixes (likely due to branch permissions)."

deploy-preview:
if: ${{ github.event.action != 'closed' }}
runs-on: ubuntu-latest
permissions:
contents: write
Expand Down
46 changes: 14 additions & 32 deletions docs/API/api-key-app-developer-authorization-flow.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# API Key Authorization Flow
# API key authorization flow

This document describes the self-service API key creation flow for third-party applications.

Expand All @@ -10,11 +10,11 @@ Applications can request API access to an Unraid server by redirecting users to

1. **Application initiates request**: The app redirects the user to:

```
```text
https://[unraid-server]/ApiKeyAuthorize?name=MyApp&scopes=docker:read,vm:*&redirect_uri=https://myapp.com/callback&state=abc123
```

2. **User authentication**: If not already logged in, the user is redirected to login first (standard Unraid auth)
2. **User authentication**: If not already logged in, the user is redirected to login first (standard Unraid auth).

3. **Consent screen**: User sees:
- Application name and description
Expand All @@ -23,51 +23,33 @@ Applications can request API access to an Unraid server by redirecting users to
- Authorize & Cancel buttons

4. **API key creation**: Upon authorization:
- API key is created with approved scopes
- Key is displayed to the user
- If `redirect_uri` is provided, user is redirected back with the key
- API key is created with approved scopes.
- Key is displayed to the user.
- If `redirect_uri` is provided, user is redirected back with the key.

5. **Callback**: App receives the API key:
```

```text
https://myapp.com/callback?api_key=xxx&state=abc123
```

## Query Parameters
## Query parameters

- `name` (required): Name of the requesting application
- `description` (optional): Description of the application
- `scopes` (required): Comma-separated list of requested scopes
- `redirect_uri` (optional): URL to redirect after authorization
- `state` (optional): Opaque value for maintaining state

## Scope Format

Scopes follow the pattern: `resource:action`

### Examples:

- `docker:read` - Read access to Docker
- `vm:*` - Full access to VMs
- `system:update` - Update access to system
- `role:viewer` - Viewer role access
- `role:admin` - Admin role access

### Available Resources:

- `docker`, `vm`, `system`, `share`, `user`, `network`, `disk`, etc.

### Available Actions:
## Scope format

- `create`, `read`, `update`, `delete` or `*` for all
Scopes follow the pattern: `resource:action`. Examples include `docker:read` (read access to Docker), `vm:*` (full access to VMs), `system:update` (update access to system), `role:viewer` (viewer role access), and `role:admin` (admin role access).

## Security Considerations
Available resources include `docker`, `vm`, `system`, `share`, `user`, `network`, `disk`, and others. Available actions are `create`, `read`, `update`, `delete`, or `*` for all.

1. **HTTPS required**: Redirect URIs must use HTTPS (except localhost for development)
2. **User consent**: Users explicitly approve each permission
3. **Session-based**: Uses existing Unraid authentication session
4. **One-time display**: API keys are shown once and must be saved securely
Redirect URIs must use HTTPS (except localhost for development). Users explicitly approve each permission, and the flow uses existing Unraid authentication sessions. API keys are shown once and must be saved securely.

## Example Integration
## Example integration

```javascript
// JavaScript example
Expand Down
81 changes: 28 additions & 53 deletions docs/API/cli.mdx
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
---
title: CLI Reference
title: CLI reference
description: Complete reference for all Unraid API CLI commands
sidebar_position: 4
---

# CLI Commands
<!-- markdownlint-disable MD025 -->

:::info[Command Structure]
# CLI commands

All commands follow the pattern: `unraid-api <command> [options]`
All commands follow the pattern: `unraid-api <command> [options]`.

:::

## 🚀 Service Management
## Service management

### Start

Expand Down Expand Up @@ -40,7 +38,7 @@ unraid-api stop [--delete]

Stops the Unraid API service.

- `--delete`: Optional. Delete the PM2 home directory
- `--delete`: Optional. Delete the PM2 home directory.

### Restart

Expand Down Expand Up @@ -70,7 +68,7 @@ View the API logs.

- `-l, --lines`: Optional. Number of lines to tail (default: 100)

## ⚙️ Configuration Commands
## Configuration commands

### Config

Expand All @@ -80,46 +78,38 @@ unraid-api config

Displays current configuration values.

### Switch Environment
### Switch environment

```bash
unraid-api switch-env [-e <environment>]
```

Switch between production and staging environments.

- `-e, --environment`: Optional. Target environment (production|staging)

### Developer Mode
- `-e, --environment`: Optional. Target environment (production|staging).

:::tip[Web GUI Management]
### Developer mode

You can also manage developer options through the web interface at **Settings** → **Management Access** → **Developer Options**

:::
You can also manage developer options through the web interface at ***Settings → Management Access → Developer Options*** in the %%WebGUI|web-gui%%.

```bash
unraid-api developer # Interactive prompt for tools
unraid-api developer --sandbox true # Enable GraphQL sandbox
unraid-api developer --sandbox false # Disable GraphQL sandbox
unraid-api developer --sandbox true # Enable %%GraphQL|graphql%% sandbox
unraid-api developer --sandbox false # Disable %%GraphQL|graphql%% sandbox
unraid-api developer --enable-modal # Enable modal testing tool
unraid-api developer --disable-modal # Disable modal testing tool
```

Configure developer features for the API:

- **GraphQL Sandbox**: Enable/disable Apollo GraphQL sandbox at `/graphql`
- **%%GraphQL|graphql%% Sandbox**: Enable/disable Apollo %%GraphQL|graphql%% sandbox at `/graphql`
- **Modal Testing Tool**: Enable/disable UI modal testing in the Unraid menu

## API Key Management

:::tip[Web GUI Management]
## API key management

You can also manage API keys through the web interface at **Settings****Management Access****API Keys**
You can also manage API keys through the web interface at ***Settings → Management Access → API Keys*** in the %%WebGUI|web-gui%%.

:::

### API Key Commands
### API key commands

```bash
unraid-api apikey [options]
Expand All @@ -135,21 +125,17 @@ Options:
- `-p, --permissions <permissions>`: Comma-separated list of permissions
- `-d, --description <description>`: Description for the key

## SSO (Single Sign-On) Management

:::info[OIDC Configuration]

For OIDC/SSO provider configuration, see the web interface at **Settings** → **Management Access** → **API** → **OIDC** or refer to the [OIDC Provider Setup](./oidc-provider-setup.mdx) guide.
## %%SSO|sso%% (Single Sign-On) management

:::
For OIDC/%%SSO|sso%% provider configuration, see the web interface at ***Settings → Management Access → API → OIDC*** in the %%WebGUI|web-gui%% or refer to the [OIDC Provider Setup](./oidc-provider-setup.mdx) guide.

### SSO Base Command
### SSO base command

```bash
unraid-api sso
```

#### Add SSO User
**Add SSO user:**

```bash
unraid-api sso add-user
Expand All @@ -159,9 +145,7 @@ unraid-api sso add
unraid-api sso a
```

Add a new user for SSO authentication.

#### Remove SSO User
**Remove SSO user:**

```bash
unraid-api sso remove-user
Expand All @@ -171,9 +155,7 @@ unraid-api sso remove
unraid-api sso r
```

Remove a user (or all users) from SSO.

#### List SSO Users
**List SSO users:**

```bash
unraid-api sso list-users
Expand All @@ -183,9 +165,9 @@ unraid-api sso list
unraid-api sso l
```

List all configured SSO users.
**Validate SSO token:**

#### Validate SSO Token
Validates an SSO token and returns its status.

```bash
unraid-api sso validate-token <token>
Expand All @@ -195,11 +177,9 @@ unraid-api sso validate
unraid-api sso v
```

Validates an SSO token and returns its status.

## Report Generation
## Report generation

### Generate Report
### Generate report

```bash
unraid-api report [-r] [-j]
Expand All @@ -210,9 +190,4 @@ Generate a system report.
- `-r, --raw`: Display raw command output
- `-j, --json`: Display output in JSON format

## Notes

1. Most commands require appropriate permissions to modify system state
2. Some commands require the API to be running or stopped
3. Store API keys securely as they provide system access
4. SSO configuration changes may require a service restart
Most commands require appropriate permissions to modify system state. Some commands require the API to be running or stopped. Store API keys securely as they provide system access. %%SSO|sso%% configuration changes may require a service restart.
Loading
Loading