Recovery
Lost your password? Make a one-time link on the server and set a new one.
If you can't sign in, make a recovery link on the server. On a Linux server installed with install.sh, run:
sudo -u nifty sh -c 'set -a; . /etc/nifty.env; NIFTY_DATA=/var/lib/nifty /usr/local/bin/nifty recovery-url'
It prints a link. Then:
- Open the link within 15 minutes, in the browser you want to use.
- Type a New password (at least 8 characters) and Confirm new password.
- Choose Set password and sign in.
What to know
- The link works once. Making a new one cancels any earlier unused link.
- Setting the password signs you out on every other device. Sign in again there with the new password.
- API tokens keep working. Revoke any you don't trust in Settings → API tokens.
- Only someone who can run commands on the server can make a link, so it adds no new way in.
Why the long command
nifty recovery-url must use the server's data folder and address, and write as the server's user. The command
runs it as nifty, with the settings from /etc/nifty.env. Started another way, pass the same --data and
--origin that nifty run uses:
nifty recovery-url --data /path/to/data --origin https://notes.example.com
It runs beside the server; there's no need to stop it. Pointed at a folder with no database, it says so.
If the link doesn't work
An expired or used link says so and shows the command again: make a new one. Before first-run setup there's nothing to recover: open Nifty and set it up.
The Mac app signs you in by itself, so it never needs this. See Signing in and recovery.