Accounts are optional and off unless ADMIN_PASSWORD is set. See the README for the short version.
Set ADMIN_PASSWORD and restart to turn on the admin area at /admin. There is one sign-in for everyone, on the account page (/account): username and password, and the account’s role (admin or user) decides what you can do afterwards. The server’s own admin is the account named by ADMIN_USERNAME (default admin) with the password ADMIN_PASSWORD; Stashly creates it as an admin account at startup. Open /admin while signed out and it asks you to sign in (and brings you back); open it with a plain user account and it says the account is not an admin. Without ADMIN_PASSWORD the admin area, and with it accounts, are off.
409, “This account is set by ADMIN_USERNAME and ADMIN_PASSWORD in the server environment.”). The Users list shows it as “Set in the server environment”. Change its password by changing ADMIN_PASSWORD and restarting: Stashly rehashes it and signs that account out everywhere; an unchanged password at a restart changes nothing.ADMIN_USERNAME already belongs to a regular user, Stashly refuses to start and tells you to choose another ADMIN_USERNAME or delete that user. If you change ADMIN_USERNAME, the old environment account is kept but turned into an ordinary, disabled user (it is logged at startup) that you can delete under Admin > Users; the new name gets its own account. Because admin is a guessable name, the sign-in lockout and rate limits apply to it like any other account, and ADMIN_PASSWORD should be long and random.The old admin login (POST /api/admin/login with only {password}, which sets the stashly_admin cookie) still works for scripts and keeps all its behaviour; the admin page no longer uses it. Sign out on the admin page ends the account session and clears that cookie too.
UNDO_SECONDS) is here too, under Stashes. Changes apply at once and are kept in the database across restarts. “Reset to defaults” goes back to the environment values. Settings you never touch keep following the environment.GET /api/admin/backup while signed in as admin) streams stashly-backup-<date>.zip with stashly.sqlite, a consistent snapshot of the database taken with SQLite’s VACUUM INTO while the server keeps running, and files/<id> for every uploaded file, plus files/<id>.thumb for each image thumbnail. The snapshot goes through a private temporary file in the files folder’s tmp/ that is always deleted, even when the download fails or the browser disconnects. Limited to 5 per 10 minutes per address. The backup is not encrypted and holds everything readable: every note and file, the stash password hashes, the user accounts with their password hashes and follow lists, and the session secret (so it can sign in as anyone). Keep it as private as the server’s own disk. Making it briefly pauses the server for a large database, so do it at a quiet time; a file uploaded or deleted while it runs may be missing from it or extra in it (extras are removed at the next start).stashly.sqlite and files/ end up where the server expects them (next to each other, or wherever SQLITE_PATH and FILES_DIR point; in Docker that is the /data volume), delete any stashly.sqlite-wal and stashly.sqlite-shm files left next to a database you are replacing, and start Stashly again. Passwords, share links and sign-ins keep working if SESSION_SECRET is the same as before; without it, people just sign in again.USER_SESSION_DAYS. Changing ADMIN_PASSWORD signs the admin account out everywhere. The legacy password-only login (/api/admin/login) keeps its own rate limit (RATE_ADMIN_LOGIN, wrong passwords only) and a 12-hour cookie.Stashly works without accounts, and most people never need one: anyone can create a stash and open any stash they have the name, password or link for, with no login. Accounts are an extra for people who want to follow their stashes and watch them all in one place. They are off unless ADMIN_PASSWORD is set (without it every /api/auth/* and /api/me/* address answers 404 “Accounts are not enabled on this server.”).
ADMIN_USERNAME, see Admin), so there is always someone who can create the first users. The reserved ADMIN_USERNAME cannot be given to a new user. There is no self sign-up.admin role can use the whole admin area (stashes, settings, backup, users), signing in on the same account page (/account) as everyone and then opening /admin (the Admin button is there for admins; /account?next=/admin goes straight on to it after sign-in, and no other next value is followed). A user can sign in, follow stashes and change their own password, and has no access to the admin area (the admin API answers 403). An admin account cannot demote, disable or delete itself, and the environment account cannot be changed by anyone, so it always exists as an admin while accounts are on and the last admin can never lock you out. Changing a role, disabling an account, Sign out and Reset password end every session of that user at once; deleting a user removes their follow list and never touches a stash.Sam and sam are one account). Passwords follow the same length rule as stash passwords (MIN_PASSWORD_LENGTH, at most 200) and are stored as salted scrypt hashes. A wrong sign-in always says “That username or password is not right.”, for an unknown name, a wrong password and a disabled account alike (an unknown name costs the same hashing work, so the answer’s timing does not tell them apart). Wrong passwords are limited per address (RATE_USER_LOGIN, default 10 per 15 minutes) and per username and address with the same lockout as stash passwords (STASH_UNLOCK_FAILURES and STASH_UNLOCK_WINDOW_MIN).stashly_user, Secure like the stash cookies) that lasts USER_SESSION_DAYS (default 7, 1 to 90). It is tied to the user’s password, role and a session counter, so a password change, a role change, a disable or Sign out ends it. Changing your own password (My stashes > Change password) asks for the current one and keeps this browser signed in while signing out the others./account) a signed-in user adds a stash by its name plus its password, or a read-only link (the whole address works), and Stashly checks it once; the password is never stored. A stash with no password is followed by its name. The stash page has a Follow button for the same thing, using the access the browser already has (a read-only link follows as read-only; a drop-box link cannot be followed, there is nothing to read). A user who creates a stash while signed in follows it automatically. Following a stash again updates the grant (a password upgrades a read-only follow, a link downgrades it) without a duplicate./account, GET /api/me/stashes): each followed stash with its name, a lock for password stashes, access (full or read-only), the number of items and files, how many are new since the user last opened it, the time of the latest activity, and when it expires, newest activity first, refreshing every 20 seconds while the tab is visible and again when it comes back (paused while hidden). Burn-after-reading notes count as items but their text is never shown. The stash page marks the stash as seen when it opens and every 30 seconds while it stays open (POST /api/me/stashes/NAME/seen); the dashboard itself never marks anything seen.# part of the address, so it is not sent to servers or logs, and it always points at the public address you set, never at the address of the request. Using it signs the user out everywhere and sends a “your password was changed” notice; changing an address notifies the old one. An admin can also pick Email a reset link in a user’s menu. The ADMIN_USERNAME account is set from the environment and has no reset by email.MIN_OPEN_NAME_LENGTH characters); taking the password off signs everyone out and cancels the share links. Only the owner can change it (PUT /api/stashes/:slug/access with mode and, for a new password, password); a private stash keeps its password for when it is public again. Links to single clips keep working in every mode. A stash made without signing in has no owner, so it can be neither private nor changed this way; if the owner’s account is deleted, a private stash goes back to opening with its password.chrome-windows, so you can filter by device. The admin can turn the whole feature off in Admin > Server Settings > Stash rules > “Let users save their clipboard to a stash”, because clipboards often hold passwords. Stashes that were a “Clipboard stash” in version 7.0 and 7.1 stay as they are: ordinary stashes (still named Clipboard) that remain the chosen stash, and can now be renamed and shared like any other. The opposite direction, Copy from stash to clipboard, is a separate per-tab option in Options (see features)./s/NAME#options, or #options=organize and so on), Pin to sidebar (or Unpin from sidebar), Copy from clipboard to stash (or Stop copying from clipboard to this stash) for a stash you can add to, and Unfollow for a stash someone else made. A stash that needs its password again shows Enter password instead of opening.403 for anyone else, an admin included). On a guest’s stash, which has no owner, anyone with full access manages it as before. A person who only knows the password of an owned stash can still read, add, change the password (with the current one) and sign out other devices.409, and a person who only knows the stash’s password cannot extend it either.REQUIRE_LOGIN_TO_CREATE (or Admin > Server Settings > Stash rules > “Only signed-in users can create stashes”) limits creating to signed-in users and admins; REQUIRE_ADMIN_TO_CREATE keeps its meaning and now allows the ADMIN_PASSWORD admin and users with the admin role. Both are off by default, and “only the admin” wins when both are on. Whatever the setting, opening and using a stash needs no login.