Guide
Noctura Server
Your Noctura library in every browser at home: the phone, the TV or another laptop. Each person signs in with their own account and keeps their own history. The web page only answers inside your home network.
Run it
The simplest way is inside the Noctura app: Settings → Home server. To run it on its own, on a computer that stays on, download the program for your system from the latest release: Linux (x64, or ARM like a Raspberry Pi), macOS (Apple silicon) or Windows. Unpack it and start it.
$ tar -xzf noctura-server-linux-x64.tar.gz
$ cd noctura-server-linux-x64
$ ./noctura-server --port 8787
On Windows it's noctura-server.exe. The Mac program isn't
signed, so macOS blocks it the first time; run
xattr -d com.apple.quarantine noctura-server once. On Linux it needs
OpenSSL 3 (Debian 12, Ubuntu 22.04 or newer). To build it from source instead, use
cargo run --release -- in place of ./noctura-server.
Then open http://<this computer's address>:8787 on another device.
A server with no accounts yet opens with a short setup in the browser: make the
administrator account and choose where the movies live, a folder (created if
missing) or an S3 bucket (tried before it is saved). Once the first account
exists, the setup is gone for good.
You can also make accounts from the command line instead. The first account is the administrator.
$ ./noctura-server add-user alice # asks for a password
$ ./noctura-server add-user bob --role editor
| Option | What it does |
|---|---|
--port 8787 | The port of the web page. |
--data DIR | Where accounts, settings and the library live. |
--cache DIR | Where torrent downloads go. |
--vpn INTERFACE | Sends torrent traffic through your VPN's network interface. Add --kill-switch to stop it when the VPN drops. |
--proxy socks5://… | Sends torrent traffic through your SOCKS5 proxy. |
Other commands: set-role NAME ROLE, set-password NAME,
remove-user NAME, users, and journal (who
published, rematched or deleted what, and when).
The server doesn't provide a VPN or a proxy. It uses the one you already have.
Docker (Linux)
$ mkdir -p data/server movies
$ echo 'folder = "/movies"' > data/server/noctura-server.toml
$ docker compose up -d --build
$ docker compose run --rm noctura add-user alice
compose.yaml uses host networking on purpose: the server then sees each
device's real address, so the web page still answers only inside the home network.
With published ports Docker makes every request look local, so don't add
ports:. ./data keeps accounts, settings and the library,
./cache the torrent downloads and ./movies your files. The
image includes FFmpeg.
Accounts
Each account has one of three roles, checked on every request:
- Administrator: everything, including the Accounts page.
- Editor: adds, renames and deletes movies and series.
- Member: watches.
On the Accounts page an administrator adds accounts, changes roles, sets new passwords, deletes accounts and reads the journal. They also see how much space the films and photos take, and what is still free on the disk. An administrator can't change their own role or delete themselves, so the server always keeps one.
Nobody signs up on their own. An administrator makes an invite link with the role already chosen; the person opens it, picks a name and a password, and is signed in. A link works once, for 7 days, and can be withdrawn before that.
Adding movies
Editors and administrators get an Add button on the home page:
- Files: drop movies, or a folder with a whole season, onto the page.
- Links: paste a magnet, a
.torrentlink or a direct link to a video. From a torrent the server takes the largest video; a season pack brings every episode, each with its own preview. It won't fetch links that lead into the home network.
Each one then shows what the server recognised: title, year, episode
(S01E04) and poster, from the file name and Cinemeta. "Not this one?"
searches again, and nothing reaches the catalog before Publish, which files it
as Title (Year)/Title (Year).mkv or
Show/Season 01/Show S01E04.mkv. Uploads left unfinished are deleted
after two days.
If ffprobe (part of FFmpeg) is
installed, the server also shows the codecs and warns about what a browser can't
play: HEVC video, AC3 or DTS sound, or an MKV that Safari and iPhones won't open.
VLC plays them all.
On a title's page, editors can pick another Cinemeta title, fix the name and year by hand (Rename), add a subtitle (Subtitles) or delete the file.
Watching
- The server's movies and series show up under On this server on the home page and play in the browser, or in VLC.
- Continue watching resumes where each account stopped, and shows the next episode once you finish one.
- When an episode ends, the player offers the next one with a 10-second countdown.
Films split into pieces (
CD1,CD2) work the same way. - Films whose names say they are parts (Dune: Part Two) are grouped into one row per collection, in order.
- Subtitles next to a video, named after it (
Movie (2010).ro.srt,Movie (2010).en.vtt), play in the browser. Old Romanian SRT files in Windows-1250 are read correctly. - Editors can Share a single movie or episode with someone who has no account. The link plays only that file, with its subtitles, for 7 days, and can be withdrawn on the Accounts page. Like invites, it only works inside the home network for now.
Libraries and limits
An administrator can make Libraries, say "Kids" or "Dan's movies", and give each one to some accounts. Editors put a title into a library, with an age (7+, 12+, 15+, 18+), from the title's page; a whole series moves at once. Everyone sees a title with no library; a library's titles are seen only by the accounts it was given to, and by administrators.
Each account also has Limits: an age limit (titles with no age are hidden from it, since nobody checked them), whether it may Share or Download files, and a space quota for what it uploads or fetches.
Your movies in Stremio
The server also offers its own movies and series as a Stremio add-on, at
/addon/manifest.json, for Stremio and Noctura alike. Its settings live in
server/noctura-server.toml, in the data folder (on macOS,
~/Library/Application Support/Noctura).
[addon]
mode = "private" # or "public"
stremio_links = true # private mode: allow personal Stremio links
public_url = "https://movies.example.com" # optional
- Private (the default): nothing answers without signing in. The Noctura app
signs in with the account's name and password. Stremio has no accounts, so each
person gets a personal link that can be revoked; set
stremio_links = falseto allow only Noctura. - Public: anyone with the link can browse and play, with no account. They see only titles that are in no library.
$ ./noctura-server addon-link alice # a new link replaces the old one
$ ./noctura-server addon-revoke alice
At home, the link on port 8787 works as it is. To use it away from home, put an HTTPS
reverse proxy in front of the add-on port, which only listens on
127.0.0.1:8788 and serves nothing but the add-on. With Caddy:
movies.example.com {
reverse_proxy 127.0.0.1:8788
}
Never point a proxy at port 8787: that port trusts every local address.
S3 buckets
Movies can live in a folder, in an S3-compatible bucket (AWS, Cloudflare R2,
Backblaze B2, MinIO), or both. Put this in server/noctura-server.toml and
chmod 600 it:
folder = "/srv/movies" # a folder, a bucket, or both
[s3]
endpoint = "https://<account>.r2.cloudflarestorage.com"
region = "auto"
bucket = "movies"
access_key = "…" # never leaves the server
secret_key = "…"
In private mode, files from the bucket are streamed through the server, so no S3 link ever reaches a device. In public mode they redirect to a signed link that lasts six hours. With a bucket and no folder, uploads go into the bucket in 64 MB parts, so large movies work too; with both, uploads go to the folder.
Photos
Every account, members too, can make photo albums under Photos and upload JPEG, PNG, WebP, GIF, TIFF or BMP files, up to 80 MB each, within the account's quota. The server keeps the original and makes a thumbnail and a screen-sized copy, turned the right way up. The date and the camera come from the photo's EXIF, and the album is sorted by date.
An album is private: only its owner sees it, administrators included, until the owner shares it with other accounts or makes a link for people without an account (1, 7 or 30 days, with an optional password; it can be withdrawn). Photos stay in the server's web page: Stremio has no photo gallery, and the Noctura app's gallery doesn't show them yet.
Seeding on BitTorrent
Off by default. When it is on, the server shares every film from the folder that is in no library on the public BitTorrent network. Anyone with the magnet link can download it, and other peers see the server's IP address. Only turn it on for films you have the right to share.
[seed]
enabled = true
port = 51413 # open this port in your router; no UPnP
trackers = [] # optional; the DHT is always on
- The server makes a
.torrentfor each film once, and a new one when the file changes. A film is seeded only when the file on disk is whole. - A title's page shows Magnet and .torrent links for seeded films, and Stremio gets a second stream for them, so it can also download from other peers.
- With
public_urlset, torrents and magnets also carry a web seed, so a client can download from the server over HTTPS even with no peers. The Noctura app uses it too. - Films in a bucket are seeded only with
s3_cache_gb = 50(or any size) under[seed]: the server copies them into a local cache, one at a time, as long as they fit. - The setting is read at startup, so restart the server after you change it.
More detail, and the source code, in the server's README.