Your Denote notes on the iPhone | Andros Fenollosa
All my notes live in Denote, the fantastic Emacs package by Protesilaos Stavrou. The system is perfect while I am at the computer... but I wanted to read and edit my notes from my phone. I did not find anything that respected the Denote convention, so I built it myself: Dotdenote, an iOS app that reads, edits and creates notes following the Denote naming scheme over WebDAV. It is open source, you can browse the code at git.andros.dev/andros/dotdenote.
The app does not lock your notes anywhere: it talks to any WebDAV server, so they remain plain text files under your control. In this mini tutorial we will set up a WebDAV server with Docker, put an Nginx in front of it, and connect the app to your existing Denote notes. In less than 10 minutes you will be browsing your Zettelkasten from your phone.
What you need
A machine to host the server: a home server, a Raspberry Pi, a VPS, or even your laptop.
Docker with the Compose plugin installed. You don't need to use Docker, you can run the WebDAV server and Nginx directly on your machine, but Docker makes it easier to set up and maintain.
Your Denote notes folder (.org, .md or .txt files).
An iPhone with Dotdenote installed.
Step 1: Create the project structure
We will use hacdias/webdav, a small and solid WebDAV server, behind an Nginx reverse proxy. Both run as containers.
Create a folder for the stack and copy your notes inside data/notes/:
mkdir -p denote-server/data/notes<br>cd denote-server<br>cp -r ~/Documents/notes/* data/notes/<br>The notes subfolder is important: the app uses /notes/ as its default notes path, so this layout works out of the box.
Step 2: Configure the WebDAV server
Create config.yaml with the server settings and your credentials:
address: 0.0.0.0<br>port: 6065<br>directory: /data<br>permissions: CRUD<br>users:<br>- username: denote<br>password: change-me-please<br>A couple of notes:
directory is the key used since v5 of hacdias/webdav (older tutorials mention scope, which no longer works).
permissions: CRUD gives the user full read and write access, which is what the app needs to create and edit notes.
Step 3: Configure Nginx
Create nginx.conf. WebDAV uses HTTP methods and headers that a default proxy config does not forward, so we pass them explicitly:
server {<br>listen 80;<br>client_max_body_size 1g;
location / {<br>proxy_pass http://webdav:6065;<br>proxy_set_header Host $host;<br>proxy_set_header X-Real-IP $remote_addr;
# WebDAV specific headers. Destination arrives as an absolute URL,<br># rewrite it to a path so the backend accepts it.<br>set $destination $http_destination;<br>if ($destination ~ ^https?://[^/]+(/.*)$) {<br>set $destination $1;<br>proxy_set_header Destination $destination;<br>proxy_set_header Depth $http_depth;<br>proxy_set_header Overwrite $http_overwrite;<br>Step 4: The Compose file
Create compose.yaml gluing everything together:
services:<br>webdav:<br>image: hacdias/webdav:latest<br>restart: unless-stopped<br>volumes:<br>- ./config.yaml:/config.yaml:ro<br>- ./data:/data
nginx:<br>image: nginx:alpine<br>restart: unless-stopped<br>ports:<br>- "8080:80"<br>volumes:<br>- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro<br>depends_on:<br>- webdav<br>Your folder should now look like this:
denote-server/<br>├── compose.yaml<br>├── config.yaml<br>├── nginx.conf<br>└── data/<br>└── notes/<br>├── 20240322T131856--my-note-title__emacs_notes.org<br>└── ...<br>Start it:
docker compose up -d<br>Step 5: Test the server
The app checks the connection with a PROPFIND request, so let's do exactly the same with curl (replace the IP with the address of your server):
curl -u denote:change-me-please -X PROPFIND -H 'Depth: 1' http://192.168.1.50:8080/notes/<br>If you get an XML response listing your notes, the server is ready. If you get a 401, check the credentials in config.yaml; if you get a 404, check that your notes live inside data/notes/.
Step 6: Connect the app
Download Dotdenote from the App Store: https://apps.apple.com/us/app/dotdenote/id6773266542
Open the app and fill in the setup form:
Field<br>Value
URL<br>http://192.168.1.50:8080
NOTES PATH<br>/notes/ (the default)
USERNAME<br>denote
PASSWORD<br>change-me-please
Tap [ test connection ]. When you see the check mark, save, and your Denote notes will appear in the list: you can search them, open them, edit them, and create new ones. Every note the app creates follows the Denote convention (IDENTIFIER--title__keywords.ext) with the proper front matter for Org, Markdown or plain text, so everything stays perfectly compatible with Emacs.
The password is stored in the iOS Keychain, and the notes never touch any third-party service: the app only talks to your server.
Optional: expose it to the internet
The setup above is fine inside your home network or over a VPN like WireGuard or Tailscale. If you want to reach your notes from anywhere, do not expose plain HTTP: put a domain in front of the server and add TLS. The quickest path is to run Nginx on the host (or use a proxy like Caddy or Traefik) with a Let's Encrypt certificate from Certbot,...