Files
Docwell/Docs-Site/guide/administration.md
T
tajniak81andClaude Opus 5.5 8c39b0aacb
CI / go (Media) (push) Successful in 11m59s
CI / go (Server) (push) Failing after 18m26s
CI / go (Web-App) (push) Canceled after 0s
CI / frontend (push) Failing after 8m35s
CI / desktop (ubuntu-latest) (push) Successful in 1h10m6s
CI / mobile (push) Failing after 3m43s
CI / docker (push) Successful in 1h2m44s
Docs / build (push) Successful in 11m58s
Docs / deploy (push) Skipped
CI / desktop (macos-latest) (push) Canceled after 0s
CI / desktop (windows-latest) (push) Canceled after 0s
Run ffmpeg in its own docwell-media service
ffmpeg parses untrusted uploads, so it moves out of the server image
into a container of its own (ADR-15):

- Media/: docwell-media, a small Go wrapper around ffmpeg.
  POST /v1/split takes a recording and returns the 16 kHz mono MP3
  pieces as multipart/mixed. ffmpeg may only open local files and
  common audio/video demuxers (no playlists); optional shared token,
  a job limit, a timeout and a 1 GB cap.
- Server: DOCWELL_MEDIA_URL and DOCWELL_MEDIA_TOKEN send recordings
  over 25 MB to the service. When it is blank or unreachable, the
  server uses a local ffmpeg if it has one, else cuts MP3 and WAV in
  Go. The server image no longer installs ffmpeg; the all-in-one
  image keeps it to stay one container.
- Compose: a media service in every stack, read-only, no
  capabilities, on an internal network only docwell-server joins.
- CI tests the new module and checks that only the server reaches
  media; the release workflow publishes docwell-media.
- Docs, ADR-15 and the .env examples.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 10:52:34 +01:00

75 lines
5.4 KiB
Markdown

# Admin panel
The admin panel is at `/admin/` on the API server (or on the web app's address in the all-in-one setup).
Superadmins and organization admins can sign in; organization admins see only their organization.
| Section | What it is for |
| --- | --- |
| **Overview** | Number of users, workspaces, spaces, pages and files, storage used, pages open right now, and (for superadmins) version, uptime and database health. |
| **Users** | Find, create, edit, disable and delete accounts; invite people by email; send a password-reset email; turn off someone's two-step sign-in when they lost their phone. |
| **Organizations** | Create, rename and delete organizations (superadmins), or manage your own. |
| **Authentication** | Turn self-service sign-up on or off, limit it to email domains, enable sign-in links by email, and add sign-in with Google, GitHub, Microsoft or any OpenID Connect provider. |
| **Branding** | The server's name, accent colour and logo, shown on sign-in pages and in emails. |
| **Email** | The SMTP server for all emails, with a test button. |
| **Storage** | Keep uploaded files on docwell-db's disk or in an S3-compatible bucket, with a test button. |
| **Security** | The audit log (sign-ins and every change, with who, when and from where; searchable, exportable as CSV) and everyone's API tokens. |
| **Maintenance** | Create, download and delete backups; see the background jobs (search indexing) and run them by hand. |
The panel speaks English, Polish, German, French and Spanish: it follows the browser's language, and the picker
under your name in the sidebar chooses another on this device (the web app's picker uses the same setting where both
share an address).
Everything except Users, Organizations and Security is for superadmins only. Organization admins see their own organization's people, audit log and tokens.
## Sign-in providers
Under *Authentication → Sign-in providers*, turn a provider on and enter the client ID and secret you get when you
register Docwell with it. Register the callback address shown on that page (`DOCWELL_WEB_URL/oauth/callback`). For
OpenID Connect (Keycloak, Authentik, Okta, Entra ID and others), also enter the authorization, token and user info
URLs from the provider's discovery document (`/.well-known/openid-configuration`).
New accounts made through a provider follow the sign-up rules above: with sign-up off or the email's domain not
allowed, the sign-in is refused. People can turn on two-step sign-in with an authenticator app under *Your account*;
it applies to every way of signing in.
## Sign-in links
With **Sign-in links by email** on, the sign-in page offers *Email me a sign-in link*. The email holds a link and
an 8-digit code; both work once, for 15 minutes. Email must be set up first.
## Moving to S3
Switching storage does not move files that were uploaded before: copy them from `pb_data/storage` to the bucket
with your usual tools (for example `rclone`), keeping the folder structure, before switching.
## AI
Docwell brings no AI of its own: you choose a provider, and nothing is sent anywhere until one is set up.
- **Providers.** *Admin panel → AI* holds the server's default providers; each workspace can add its own under
*Workspace settings → AI* and use them before (or instead of) the server's. A provider is an OpenAI-compatible
API (OpenAI, Azure, OpenRouter, LiteLLM, vLLM, LocalAI…), Anthropic, or Ollama, with a chat model and, except
for Anthropic, optionally an embedding model; OpenAI-compatible providers can also have a speech-to-text model
(for example `whisper-1`, or a self-hosted faster-whisper or LocalAI server) for transcribing recordings;
Anthropic and Ollama have no speech-to-text API. Recordings over 25 MB are cut into pieces with ffmpeg, which runs
in the docwell-media container of the compose stacks (or inside the all-in-one image); without it only MP3 and
WAV can be cut. Providers are tried from the top: when one fails, the next one
answers. **Test** checks a provider; requests and tokens are counted per provider.
- **Search by meaning.** *Index pages for AI* in a workspace's settings sends every page's text to the first
provider with an embedding model and keeps the vectors in `DOCWELL_DATA_DIR`. Without it, the chat finds sources
with keyword search. Pages can be left out (with their subpages), and extra text, Markdown, HTML, Word or PDF files
can be added as sources; a scanned PDF without a text layer is read by an Anthropic or OpenAI chat model that
handles documents. Changing the embedding model indexes the workspace again.
- **Limits.** Usage is counted per workspace and month (UTC). A workspace admin can set a monthly token limit for
the workspace; a superadmin can cap what each workspace may use through the server's providers (*Admin panel →
AI*, which also lists every workspace's usage). When the server's cap is reached, a workspace's own providers
still answer.
- **Keys** are encrypted with `DOCWELL_SECRET_KEY` (see *Configuration*) and never shown again.
- **MCP.** AI agents and tools (Claude, IDEs, …) can use Docwell as an MCP server at `https://<server>/mcp` with a
personal API token: read-only tokens can list, search and read pages and ask the workspace's AI; write tokens can
also create and update pages. Changes made through MCP are in the audit log.
## Rebuilding the search index
Search follows edits within a few seconds. If results ever look wrong, run **search.rebuild** in *Maintenance*.