Tutorials
A vault on a NAS over WebDAV
From an empty NAS share to an iPad and an iPhone that work offline and sync through the NAS. About 20 minutes.
You need: a NAS or server that offers WebDAV over HTTPS, and Sempere on your devices (an iPad and an iPhone here; a Mac works the same way).
The NAS becomes a sync target: each device keeps its own complete copy of the vault, works on it offline, and syncs both ways with the NAS whenever it can reach it.
1. Turn on WebDAV on the NAS
In your NAS’s admin page:
- Turn on its WebDAV service with HTTPS (plain HTTP is refused, except for a server on the same device).
- Make a shared folder for notes, for example
notes, and a user that can read and write it, for examplesempere. Give that user nothing else. - Note the folder’s address, for example
https://nas.example.org:5006/notes/.
About the certificate: a certificate from a public authority (such as Let’s Encrypt) just works. A self-signed one works too, after you trust its fingerprint in the app; look up the fingerprint on the NAS now so you can compare it later.
2. Check the connection (optional, with the CLI)
export SEMPERE_WEBDAV_PASSWORD='the-sempere-user-password'
sempere webdav check https://nas.example.org:5006/notes/ --user sempere
It should say the server is reachable and that there is no vault yet. The CLI trusts only certificates the computer trusts; for a self-signed one, add it to the computer’s trust store or skip this step.
3. Make the vault on the iPad
New Vault…, name it (say Notes), leave Sync With empty (you add the NAS next), Generate a new key, Create. Print the recovery kit on Vault Created. See Create your vault.
4. Add the NAS as a sync target
- On the iPad, with the vault open: sidebar More ▸ Sync Targets… ▸ Add WebDAV Server….
- Server Folder URL: a new folder for this vault, for example
https://nas.example.org:5006/notes/Notes.sempere/. User Name and Password: the NAS user. - Tap Test Connection. It should say “The folder does not exist yet: the first sync creates it.” If the certificate is self-signed, compare the fingerprint in the red box with the one on the NAS, and tap Trust This Certificate… only if they match.
- Tap Add This Server.
The first sync uploads the vault. The bar under the note list shows its progress, then “Synced with the server”.
5. Open it on the iPhone and join
- On the iPhone’s welcome screen, Open from WebDAV….
- Server Folder URL:
https://nas.example.org:5006/notes/(the folder above your vaults works). User name and password, Test Connection, trust the certificate if needed, then Download and Open next toNotes. - The list of notes appears quickly; the notes download in the background. On the unlock screen, Join This Device… ▸ Ask to Join.
- On the iPad: Settings ▸ Sync & Devices ▸ Devices ▸ Add Device…, type the iPhone’s six words, Approve, and type the iPad’s six words back on the iPhone.
Add a second device explains the join in detail.
6. Day to day
- Both devices work offline. Away from home, the bar says “Offline. Changes are kept on this device and sync when the server can be reached.” Nothing is lost.
- Changes sync shortly after you make them, when you open Sempere, and every few minutes. Sync Now in the bar’s menu syncs at once.
- Server Settings… in the bar’s menu changes the password or the trusted certificate.
7. Back it up
A sync target is not a backup. Set up Settings ▸ Backups & History ▸ Backups on one device, and back up the NAS folder like any other data; it holds only encrypted files. See Backup strategy.
Using the CLI too
A computer can join too. Pull a copy, ask to join, and sync again so the request reaches the iPad:
URL=https://nas.example.org:5006/notes/Notes.sempere/
sempere sync webdav $URL --vault ~/Notes.sempere --user sempere # the first run pulls everything
sempere device init --vault ~/Notes.sempere --name "laptop" # prints six words
sempere sync webdav $URL --vault ~/Notes.sempere --user sempere # uploads the request
# approve the six words on the iPad, then:
sempere sync webdav $URL --vault ~/Notes.sempere --user sempere # brings the approval
sempere device confirm --vault ~/Notes.sempere WORD WORD WORD WORD WORD WORD