A family diary on your own server: notes by day, the page in the evening, encrypted per person.
901
A diary for the family, on your own server. Jot things down during the day without minding the spelling, and in the evening turn them into a page: by yourself, or with an AI that only orders and smooths. Every person sees only their own diary; single days can be shared with people of the family, and the operator manages the accounts without ever seeing what is written in them.
nexdiary is one of the nex apps and looks like them: warm paper by day, candlelight by night, sage green (or four other colours of your choice).

"Today", in the layout of a single page. The notes of the day, the question of the day, the values of 1 to 10 and the photos taken today; in the evening "Write up" turns them into a page.

Writing a page. Every day has a cover picture, a photo of your own or one of 256 drawn illustrations; a suggestion by season, time of day and tags is already chosen. The notes stay beside the page.

The journal as a blog, or as a timeline by month. Search covers pages and notes.

Reading a day. A day can be shared with chosen people of the family; they read it and may give a heart, nothing more.

Statistics, worked out on the server from your own days only: streaks, half a year as a calendar, a value over time with its seven-day average, the best and the worst day, and what seems to go together (in sentences, with the reminder that together does not mean because).

Shared with me, and what I have shared.
Five colours, each light and dark, kept with the account. On the phone the app starts on the quick note: one field with the keyboard open, and the notes of today above it.
More, in light and dark and on the phone, are in docs/screenshots.
services:
nexdiary:
image: ghcr.io/derkezorm/nexdiary:latest
container_name: nexdiary
restart: unless-stopped
ports:
- "127.0.0.1:8550:8000"
volumes:
- ./data:/data
environment:
PUID: 1000
PGID: 1000
TZ: Europe/Berlin
docker compose up -d
Built from source instead: clone this repository, use docker-compose.yml as it is (it has build: .) and run
docker compose up -d --build. The file has every option explained.
Open http://127.0.0.1:8550 on that machine (the port listens only there; the comment in
docker-compose.yml says how to change that). The first account you create there is the operator.
It needs the setup code from the log, so that nobody who reaches a fresh instance first can take it:
docker logs nexdiary
shows the code, new at every start until nexdiary is set up. To choose it yourself, set NEXDIARY_SETUP_TOKEN. Right
after the password the account sets up its second factor; then the operator invites the others by link. Everything personal (colours, layouts, values, questions, reminders, Immich, tokens) is under "My account" for everybody; "Settings" is the operator's and holds the server.
Many people will put nexdiary on the internet; it is made for that. Before you open it:
127.0.0.1:8550:8000 when
the proxy runs on the same host, or keep both on a Docker network without a published port. Send HSTS from the proxy.NEXDIARY_PUBLIC_URL (the address people use), NEXDIARY_TRUSTED_PROXIES (the
proxy's address or network; without it every sign-in seems to come from the proxy and the brake against guessing
cannot tell people apart, and nexdiary believes no X-Forwarded-Proto) and NEXDIARY_COOKIE_SECURE: "on".
NEXDIARY_TRUSTED_PROXIES is the setting for trusted proxies the authentik card means when it warns that the
server receives a request as http: from a proxy named there, nexdiary takes the rightmost value of
X-Forwarded-Proto (the one the proxy wrote, http or https), from anybody else none.secret.key); try a restore with "Check" now and then.latest, update on purpose, back up before.Optionally keep the operator's settings at home: NEXDIARY_OPERATOR_NETWORKS: "192.168.0.0/16" refuses them from
anywhere else (behind a proxy only together with NEXDIARY_TRUSTED_PROXIES).
Settings, Sign-in has three cards: password sign-in, the public address and the second factor; the list of sign-in
providers; and authentik in one step. Any provider that speaks OpenID Connect can go in the list (authentik, Microsoft
Entra ID, Keycloak, Authelia, Pocket ID), each gets its own button on the sign-in page and its own redirect address,
https://<public address>/api/oidc/<short name>/callback. The provider of nexdiary 0.6 and earlier became the entry
oidc and keeps the address it had, /api/oidc/callback.
Going back to 0.6: 0.6 does not open a database of schema 17. Restore the backup made before the update ("before schema 17") with 0.6; the next update moves the provider over again.
Everything lives in /data:
| Where | What |
|---|---|
nexdiary.db | The SQLite database: accounts, days, notes, values, shares. What people write is sealed in it. |
media/ | Photos, attachments and their small pictures, each sealed in its own file. |
keys/master.key | The master key, made at the first start (mode 0600). It wraps every person's data key. |
secret.key | The server's own secret (the client secrets of the sign-in providers, the mail password and the like). |
backups/, logs/, locales/ | Backups, the log, extra languages as JSON files. |
Mount /data from a local disk, never from an SMB or NFS share: SQLite's locking does not work reliably over network
filesystems.
What people write is encrypted in the database: pages, notes, values, tags, photos, attachments and the Immich key. Each person has a data key of their own, wrapped with the master key. That keeps a copy of the database or of a backup unreadable on its own. The master key lies on the same machine, so this is no protection against somebody who owns the whole server; it is meant for the copies that leave it.
A backup cannot be read without the master key, and the master key is never part of a backup. Settings, Backups, Encryption downloads it (it asks for your password). Keep that file somewhere else than the backups, as carefully as a password. Lose it and every backup is only ciphertext; so is the live database if the key file is gone.
A backup is one ZIP file with the database and the media files, made while nexdiary runs. Moving to a new server:
download a backup and the master key, set up nexdiary there with the key in keys/master.key, upload the backup under
Settings, Backups, check it and restore it.
With an image: docker compose pull && docker compose up -d. Built from source: pull the new code and run
docker compose up -d --build. nexdiary adds what the database lacks at the start and makes a backup first; nothing
needs doing by hand. The way back is under Settings, Backups.
Ask the operator for a link (Settings, Accounts), or use "Forgot your password?" on the sign-in page where a mail server is set up. If you are the operator yourself, make the link on the server:
docker exec -it -u nexdiary nexdiary python -m app.reset_link <your name>
On Unraid, open the container's console instead and run gosu nexdiary python -m app.reset_link <your name>. Without a
name it lists the accounts. It prints a link (or a path, when no public address is set: open it at the address you
use for nexdiary). The link works once and for 24 hours and also ends the wait after too many attempts. Your second
factor stays: after the new password, enter the code from your app or one of your recovery codes. Your diary stays as
it is; it is not sealed with your password.
| Variable | Default | Meaning |
|---|---|---|
NEXDIARY_DATA_DIR | /data | Database, logs, backups, keys and the languages |
NEXDIARY_MEDIA_DIR | <data>/media | The photos |
NEXDIARY_LOCALES_DIR | <data>/locales | Extra languages, one JSON file each |
NEXDIARY_MASTER_KEY_FILE | <data>/keys/master.key | Where the master key lies; keep it outside the backups |
NEXDIARY_SECRET_KEY | made on first start | Protects server-side secrets; when set, it wins over secret.key |
NEXDIARY_PUBLIC_URL | from the request | The address people use, for invitation links and the redirect address of the sign-in providers. The setting in the interface wins |
NEXDIARY_TRUSTED_PROXIES | none | Addresses or networks of reverse proxies whose X-Forwarded-For and X-Forwarded-Proto (its rightmost value) are believed, comma separated |
NEXDIARY_SETUP_TOKEN | made at start | The code the first account needs |
NEXDIARY_OPERATOR_NETWORKS | none | Networks the operator's settings may be changed from, comma separated |
NEXDIARY_SESSION_DAYS | 30 | A session of "stay signed in on this device" ends after this many days without use |
NEXDIARY_COOKIE_SECURE | auto | on, off or auto (from the request, or X-Forwarded-Proto of a trusted proxy) |
NEXDIARY_COOKIE_SUFFIX | none | Appended to the cookie names; keeps two instances on one host apart |
NEXDIARY_LOG_LEVEL | stored setting | quiet, normal, detailed or trace; overrides the setting |
NEXDIARY_API_DOCS | false | Serves /api/docs and /api/openapi.json |
NEXDIARY_DECODE_SLOTS | 1 | How many pictures are unpacked at the same moment (each takes some 150 MB while open) |
NEXDIARY_FFMPEG, NEXDIARY_FFPROBE | from the PATH | Where ffmpeg and ffprobe are, for videos and sounds attached to a day (the image has both) |
NEXDIARY_UPDATE_URL | GitHub | Where the update check asks for the newest release |
NEXDIARY_ARGON2_TIME, NEXDIARY_ARGON2_MEMORY_KIB, NEXDIARY_ARGON2_PARALLELISM | 3, 65536, 2 | Cost of the password hash; only the tests lower it |
NEXDIARY_FRONTEND_DIST | /app/static | Where the built interface lies (set by the image) |
NEXDIARY_DISABLE_BACKGROUND | false | Switches off the background jobs (reminders, backups, update check); for tests |
NEXDIARY_PORT | 8000 | The port inside the container; only for host networking |
PUID, PGID | 1000 | Owner of the files in the data directory |
TZ | The time zone of the container's log. People's own time zones come from their browsers |
The AI is off until the operator chooses a service, for everybody (Settings, AI): none, a local model in
your own network (Ollama or anything that speaks /v1/chat/completions), a service on the internet that speaks the same,
or one that speaks the Messages API. Every person can switch it off for their account.
reasoning_effort: "none"): a thinking model such as Qwen3 or DeepSeek-R1
would otherwise spend the room for its answer on its thoughts and give back nothing. A local server that does not
know the field is asked once more without it.Photos can come from your own Immich. The operator opens this first (Settings, Immich, closed from the start)
and names the hosts that may be reached. Each person then connects their own: the address and an API key with the
permissions asset.read, asset.view and asset.download (and, if you want to browse albums, album.read).
"Today" suggests what was uploaded to Immich lately (it often receives a phone's photos hours late), and "All photos"
opens your whole collection, newest first, with a date or month to jump to, your albums and a search. A photo is
copied into nexdiary only when you take it, and belongs to the day it is taken for, whenever it was shot. The browser
never talks to Immich: the small pictures come through nexdiary. Videos are left out.
Reminders and the notice of a new sign-in arrive by Web Push, to every device a person signs up (My account, Reminders). It needs https (or localhost). On an iPhone it works only for the app added to the home screen (Share, Add to Home Screen) and only from iOS 16.4. The server makes its own keys; the operator can add a contact and further push services. A push never carries anything written in the diary.
Dashboards and scripts can read the version and the name of a token's account with an API token. Off until the operator switches it on; every account then makes its own tokens. Reading only. The routes are in docs/api.md.
HttpOnly and SameSite; the
Content Security Policy only allows the app's own files.How to report a problem: SECURITY.md.
The full README is on GitHub: https://github.com/DerKezorm/nexdiary#readme
Content type
Image
Digest
sha256:036ebed2c…
Size
252.2 MB
Last updated
about 21 hours ago
docker pull derkezorm/nexdiary