Skip to content

Forms and slices

Most self-hosted media stacks are one compose file with a dozen services in it: all or nothing. Wanting to look one thing up means booting a media server, a request portal, a subtitle daemon and four automation services.

That is not really a resource problem. It is that the tooling has no vocabulary for I only need part of this right now. A form is that vocabulary.

There are two layers, and only one of them is yours.

A profile is a fact about a service. Each service carries exactly one, and it states what the service is: Sonarr is tv, SABnzbd is usenet, Jellyfin is media. You never select a profile directly. Both tables below are read from the stack manifest this site pins.

A form is an intent. It is a named combination of profiles, and it is what you type. tv is a form meaning “I want automated television”, which happens to need the search, usenet, torrent, tv and subs profiles — because Sonarr without indexers and a download client is not much use.

ProfileWhat it coversServices
searchFinding thingsProwlarr, FlareSolverr, NZBHydra2
usenetUsenet downloadingSABnzbd
torrentTorrent downloading, VPN-isolatedGluetun, qBittorrent
tvTV automationSonarr
moviesFilm automationRadarr
musicMusic automationLidarr
booksBook and audiobook automationBindery
subsSubtitle automationBazarr
mediaServing what you haveJellyfin, Seerr, Request gate, Decline service, Calibre-Web-Automated, Audiobookshelf, Navidrome
tuningQuality profiles and extractionRecyclarr, Unpackerr
dashA page linking everythingHomepage
proxyFriendly hostnamesCaddy

Acquiring and serving are split deliberately. Bindery acquires books and sits in books alongside the other automation services; Calibre-Web-Automated and Audiobookshelf serve them and sit in media alongside Jellyfin. That is what keeps library meaningful — you can serve an existing book collection without running an acquisition service you have no indexers for.

FormWhat it is forProfiles it expands to
searchFind things. Nothing else runs.search
dlYou have a link — fetch it.usenet, torrent
huntSearch and grab, manually.search, usenet, torrent
tvSearch, download and automate televisionsearch, usenet, torrent, tv, subs
moviesSearch, download and automate filmsearch, usenet, torrent, movies, subs
musicSearch, download and automate musicsearch, usenet, torrent, music
booksSearch, download and automate books and audiobookssearch, usenet, torrent, books
autoEverything automated, nothing servedsearch, usenet, torrent, tv, movies, music, books, subs, tuning
libraryServe what exists. Requires no third-party accounts.media
fullThe lot.search, usenet, torrent, tv, movies, music, books, subs, media, tuning, dash
proxyFriendly hostnames. Layers onto any other form.proxy

library is the one worth noticing. It needs no indexer, no provider and no VPN, which makes it the zero-cost end state for someone who already has a folder of media.

Naming a form without starting anything tells you what starting it would come to:

Terminal window
$ lemonfiber forms
$ lemonfiber forms tv

The first lists every form the stack declares and what each is for. The second describes just tv — the services it holds, and anything your configuration leaves out.

That second part matters. A form’s profiles are intersected with the protocols you actually configured, so lemonfiber up dl on a Usenet-only setup starts SABnzbd and does not try to start Gluetun with VPN credentials that do not exist. Without that, every torrent-containing form would break for the large number of people who run Usenet only.

So the number of services a form starts depends on your configuration, not just on the form. lemonfiber forms <name> is the honest answer for your machine.

Naming several forms starts the union of them:

Terminal window
$ lemonfiber up full proxy

A service that appears in more than one active form starts exactly once. Duplicates are ignored. This is what makes proxy viable as a form rather than a flag — a reverse proxy is an orthogonal concern that layers onto anything else.

Changing the shape without tearing it down

Section titled “Changing the shape without tearing it down”

To move from one set of forms to another, use switch rather than a down followed by an up:

Terminal window
$ lemonfiber switch tv movies

Only what falls outside the new shape is stopped. A service both the old shape and the new one hold keeps running rather than being restarted, so a download in flight is not interrupted just to change the stack around it.

An unknown form name gets you the list of valid forms, led by the one you probably meant where a declared form is close enough to say so, never a bare “not found”. A form whose every profile has been filtered out by your configuration is refused, naming the configuration that is missing.

If one service in a form fails to start, the rest keep running and you are told which capability is degraded. A single failure never rolls back the whole form.

Forms and profiles are declared in the stack manifest, not in lemonfiber’s code. Adding or changing one is a data change that needs no new release of the binary — see The stack manifest and Adding a service.