HTTPS
For phones you need HTTPS. There are three common ways; choose what fits your network.
Why
- Browsers only allow offline use, installing as an app and notifications (reminders in the browser) on a secure address. The only exception is
localhost, and on a phone that is the phone itself. - Without HTTPS your password and your session travel over the network unencrypted.
So without HTTPS Tickory does work in your phone's browser, as long as there is a connection, but not offline, not as an installed app and without notifications. The Android app does not need HTTPS for reminders.
Tailscale
The simplest, and nothing ends up on the open internet. Your devices together form a private, shielded network.
- Install Tailscale on the server and on your phone, and sign both in to the same tailnet.
- Enable HTTPS for your tailnet (in the Tailscale admin console).
- On the server, run:
tailscale serve --bg 8787
You get an address ending in .ts.net, with a valid certificate, that only your own devices can reach. The port in docker-compose.yml can stay at 127.0.0.1:8787.
Reverse proxy with your own domain
If you have a domain name and already run a reverse proxy (Caddy, Traefik, Nginx Proxy Manager), point it at 127.0.0.1:8787 and let it take care of the certificate. With Caddy this is the entire configuration:
tasks.example.org {
reverse_proxy 127.0.0.1:8787
}
If the proxy itself runs in a container, 127.0.0.1 is that container for the proxy and not your server. In that case put both in the same Docker network, for example, and point the proxy at tickory:8787.
Large files (attachments)
With attachments users send files of tens of megabytes to the server (up to 25 MB by default, see MAX_UPLOAD_MB). A proxy that does not allow that answers 413 and the upload fails. Set the proxy's limit at least as high. Caddy and Traefik have no limit by default. Nginx only allows 1 MB by default:
location / {
proxy_pass http://127.0.0.1:8787;
client_max_body_size 30m;
proxy_request_buffering off;
proxy_read_timeout 300s;
}
proxy_request_buffering off passes the file on while it arrives, instead of first keeping all of it in nginx. An upload may take longer than 30 seconds as long as it makes progress.
TRUST_PROXY
Behind your own reverse proxy, put this in .env:
TRUST_PROXY=1
and restart with docker compose up -d. The server then counts the visitor's address (from the X-Forwarded-For header the proxy adds) when limiting sign-in attempts, instead of the address of the proxy.
Is there more than one proxy in front, for example a CDN and then nginx? Set TRUST_PROXY to the number of proxies (TRUST_PROXY=2). The server then takes the address that many places from the end of X-Forwarded-For. With 1 while there are two proxies, all visitors share the address of the first proxy and one person with many wrong attempts can block signing in for everyone.
Only switch TRUST_PROXY on when there really is a proxy in front and Tickory cannot be reached directly. Otherwise a visitor can supply an address themselves and get around the limit on sign-in attempts that way.
Cloudflare Tunnel
Useful when you do not want to open ports on your router. The tunnel connects to Cloudflare from the inside, and Cloudflare provides HTTPS on your domain. Point the tunnel at http://127.0.0.1:8787. Your traffic does pass through Cloudflare then.
Checking
- Open the
https://address on your phone and sign in. - Put the phone in flight mode and open the address again: the app should start and show your tasks, with Offline in the top right.
- See whether your browser offers to install the app; see Install as an app.
- Turn on notifications (Reminders) and choose Send a test notification.
Good to know
- The app keeps a connection open over which the server signals that something changed. A proxy that buffers responses delays that; the server therefore asks proxies not to. If syncing between devices only happens after half a minute or more, look at your proxy's settings for long-lived connections.
- The password and the session are never part of an address, so they do not end up in your proxy's log either.
- A certificate is handled by the proxy, Tailscale or the tunnel. Tickory itself only speaks plain HTTP on port 8787.