server

module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 9, 2026 License: GPL-3.0

README

Panelarr server

The core of Panelarr, a self-hosted, arr-style app for curating, downloading, managing and reading manga, manhwa, manhua and comics, with real multi-user support.

The server owns users and their libraries, works and the sources matched to them, chapters, downloads and the job queue. It serves the REST API that the Panelarr web app (and any other client) uses. Metadata comes from the Panelarr metadata service; sources come from optional, out-of-process source plugins.

Status: early development. The first version is being built in slices; see PROGRESS.md. Nothing is released yet.

Quick start (from source)

You need Go (the version in go.mod) and a PostgreSQL database.

make setup build
export PANELARR_DB='postgres://panelarr:secret@localhost:5432/panelarr?sslmode=disable'
./bin/panelarr serve
curl http://localhost:8900/api/v1/system/info

The server migrates its database on start. On first use, create the admin account:

curl -X POST http://localhost:8900/api/v1/setup/admin \
  -H 'Content-Type: application/json' -d '{"username":"admin","password":"choose a good one"}'

Container image

Releases publish panelarr/server (linux/amd64, linux/arm64): non-root, port 8900, volumes /config (the encryption key for stored secrets, caches; back it up with the database) and /data (the default library), with a built-in health check.

docker run -d --name panelarr -p 8900:8900 \
  -e PANELARR_DB='postgres://panelarr:secret@db:5432/panelarr' \
  -e PANELARR_META_URL='http://meta:8901' -e PANELARR_META_KEY='…' \
  -v panelarr-config:/config -v panelarr-data:/data panelarr/server

The library needs the Panelarr metadata service and PostgreSQL next to it. To build the image from source, make docker (it passes the sibling meta and source-api clones as build contexts until those modules are published, and the web app from ../web/dist when built).

Configuration

Startup settings come from PANELARR_* environment variables or flags; everything else is managed in the app. See docs/configuration.md.

Variable Default
PANELARR_DB (required) PostgreSQL URL
PANELARR_LISTEN :8900 HTTP listen address
PANELARR_CONFIG user config dir the server's own files (/config in containers)
PANELARR_DATA <config>/data default library location (/data in containers)
PANELARR_BASE_URL public URL
PANELARR_LOG_FORMAT / PANELARR_LOG_LEVEL json / info logging
PANELARR_SECRET_KEY key file in config encrypts stored secrets
PANELARR_META_URL / PANELARR_META_KEY (wizard) the metadata service, if not connected in the app
PANELARR_TRUSTED_PROXIES private networks reverse proxies allowed to set X-Forwarded-For
PANELARR_METRICS_ENABLED / PANELARR_METRICS_LISTEN off Prometheus metrics, on a separate listener or behind a metrics:read key

Docs

Licence

GPL-3.0-or-later.

Directories

Path Synopsis
cmd
panelarr command
Command panelarr runs the Panelarr server.
Command panelarr runs the Panelarr server.
internal
api
Package api serves the server's HTTP surface: the REST API under /api/v1 (generated from api/openapi.yaml), the health probes, the metrics and, later, the event stream and the web app.
Package api serves the server's HTTP surface: the REST API under /api/v1 (generated from api/openapi.yaml), the health probes, the metrics and, later, the event stream and the web app.
api/apigen
Package apigen provides primitives to interact with the openapi HTTP API.
Package apigen provides primitives to interact with the openapi HTTP API.
auth
Package auth authenticates callers (browser sessions and personal API keys), hashes passwords, limits login attempts and decides which scopes a caller holds.
Package auth authenticates callers (browser sessions and personal API keys), hashes passwords, limits login attempts and decides which scopes a caller holds.
buildinfo
Package buildinfo holds values stamped into the binary at build time.
Package buildinfo holds values stamped into the binary at build time.
cbz
Package cbz writes and reads comic book archives: a ZIP with the pages stored (not compressed, images already are) as 0001.jpg, 0002.png, … and a ComicInfo.xml that other readers understand.
Package cbz writes and reads comic book archives: a ZIP with the pages stored (not compressed, images already are) as 0001.jpg, 0002.png, … and a ComicInfo.xml that other readers understand.
chapters
Package chapters builds each work's unified chapter list.
Package chapters builds each work's unified chapter list.
config
Package config loads the server's startup settings, *arr-style: from environment variables and command-line flags.
Package config loads the server's startup settings, *arr-style: from environment variables and command-line flags.
downloads
Package downloads downloads chapters into the shared library: one file per chapter, stored once for everyone, as a CBZ with ComicInfo.xml, on the default storage.
Package downloads downloads chapters into the shared library: one file per chapter, stored once for everyone, as a CBZ with ComicInfo.xml, on the default storage.
events
Package events fans server events out to connected clients (the server-sent event stream).
Package events fans server events out to connected clients (the server-sent event stream).
imagecache
Package imagecache fetches remote images (covers) once and keeps them on disk, so browsers never fetch from metadata or source sites themselves: that would leak users' addresses and referrers, and many sites refuse hotlinking anyway.
Package imagecache fetches remote images (covers) once and keeps them on disk, so browsers never fetch from metadata or source sites themselves: that would leak users' addresses and referrers, and many sites refuse hotlinking anyway.
jobs
Package jobs runs the server's named background jobs (plugin sync, cleanups, update checks): on a schedule, at startup or by hand, one run at a time per job, each run recorded with its outcome, counts and notes.
Package jobs runs the server's named background jobs (plugin sync, cleanups, update checks): on a schedule, at startup or by hand, one run at a time per job, each run recorded with its outcome, counts and notes.
library
Package library manages works and users' libraries.
Package library manages works and users' libraries.
limits
Package limits caps work per key (a source, later a host): how many tasks run at once, and how fast requests go.
Package limits caps work per key (a source, later a host): how many tasks run at once, and how fast requests go.
logging
Package logging builds the server's structured logger.
Package logging builds the server's structured logger.
meta
Package meta connects the server to the Panelarr metadata service, which the library needs: every work is created from one of its entries.
Package meta connects the server to the Panelarr metadata service, which the library needs: every work is created from one of its entries.
meta/metatest
Package metatest runs a fake metadata service for tests: the real gRPC API over cleartext HTTP/2, with keys, providers and entries set by the test.
Package metatest runs a fake metadata service for tests: the real gRPC API over cleartext HTTP/2, with keys, providers and entries set by the test.
metrics
Package metrics defines the server's Prometheus metrics.
Package metrics defines the server's Prometheus metrics.
network
Package network keeps the shared network services admins set up once in Panelarr: challenge solvers and proxies, which network profiles use.
Package network keeps the shared network services admins set up once in Panelarr: challenge solvers and proxies, which network profiles use.
plugins
Package plugins hosts source plugins.
Package plugins hosts source plugins.
plugins/pluginstest
Package pluginstest serves made-up source plugins for tests over the real wire (gRPC on cleartext HTTP/2).
Package pluginstest serves made-up source plugins for tests over the real wire (gRPC on cleartext HTTP/2).
queue
Package queue runs the server's tasks: one database row per piece of work (match a work, check it for updates, download a chapter).
Package queue runs the server's tasks: one database row per piece of work (match a work, check it for updates, download a chapter).
reader
Package reader serves what the reader needs: a chapter's pages (from the chosen copy's source, through its plugin), the neighbouring chapters, reading progress synced across devices, history, and each user's reader settings and app preferences.
Package reader serves what the reader needs: a chapter's pages (from the chosen copy's source, through its plugin), the neighbouring chapters, reading progress synced across devices, history, and each user's reader settings and app preferences.
secret
Package secret encrypts small secrets (service keys, plugin keys, storage credentials) before they are stored, with AES-256-GCM.
Package secret encrypts small secrets (service keys, plugin keys, storage credentials) before they are stored, with AES-256-GCM.
storage
Package storage stores downloaded chapter files on configurable backends: the local filesystem (which includes mounted network shares) and S3-compatible object storage.
Package storage stores downloaded chapter files on configurable backends: the local filesystem (which includes mounted network shares) and S3-compatible object storage.
store
Package store is Panelarr's PostgreSQL data layer: a pgx pool, the embedded goose migrations and the sqlc queries in package db.
Package store is Panelarr's PostgreSQL data layer: a pgx pool, the embedded goose migrations and the sqlc queries in package db.
store/storetest
Package storetest gives tests a fresh, migrated PostgreSQL database.
Package storetest gives tests a fresh, migrated PostgreSQL database.
textmatch
Package textmatch compares titles and names across sources and the metadata catalogue: every site writes a title its own way (case, width, accents, punctuation, word order of names).
Package textmatch compares titles and names across sources and the metadata catalogue: every site writes a title its own way (case, width, accents, punctuation, word order of names).
users
Package users manages accounts: creating, changing and deleting users, their grants, invites and the first-run setup that creates the admin.
Package users manages accounts: creating, changing and deleting users, their grants, invites and the first-run setup that creates the admin.
webui
Package webui serves the Panelarr web app next to the API, following the web app's embedding contract: files at the root, a single-page fallback to index.html (never for API, feed, asset or probe paths), long caching for content-hashed assets, and the app's security headers.
Package webui serves the Panelarr web app next to the API, following the web app's embedding contract: files at the root, a single-page fallback to index.html (never for API, feed, asset or probe paths), long caching for content-hashed assets, and the app's security headers.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL