Anyone who can reach a self-hosted AnythingLLM server in a browser can open its workspaces, read past chats and change its model providers, because a single-user Docker instance asks for nothing before showing its home screen. Its Password Protection setting puts one shared instance password in front of that interface, and any browser without a signed-in session then stops at a password prompt.

The password applies as soon as it is saved, with no container restart, and it stays in force when the container restarts later. It guards only the browser interface. Developer API keys keep working without it, so a key created earlier still has full API access until it is deleted from the API Keys page. Password Protection exists only in single-user mode, and switching the instance to multi-user mode later replaces it with individual accounts.

AnythingLLM keeps the password unencrypted as AUTH_TOKEN in the .env file of the instance's storage directory. The web interface offers no reset, so that line is the only place to read a forgotten password back, and anyone who can read the file can read the password. A server reached from other machines over plain HTTP also sends the password across the network unencrypted at every sign-in.

Steps to password-protect an AnythingLLM instance:

  1. Open Instance Settings with the wrench icon in the bottom row of the AnythingLLM sidebar.
  2. Select Security near the end of the Instance Settings list.
  3. Turn on the Password Protection switch below the Password Protection heading.
  4. Type the new password in Instance Password.

    The password needs at least eight characters, using letters, numbers and only the symbols _ - ! @ $ % ^ & * ( ) ;. A password with any other character, such as a period or #, is refused with Your password has restricted characters in it. and protection stays off.

  5. Click Save changes to turn on the password.

    From the moment it is saved, every browser needs this password to open the instance, including the one used to set it, and the AnythingLLM interface has no way to reset it. The password belongs in a password manager before saving; otherwise the only copy is the AUTH_TOKEN line in the server's .env file.

    A Your page will refresh in a few seconds. message appears, and the page then reloads to the Welcome screen, which asks this browser for the password as well.

  6. Check that http://localhost:3001 opened in a private browser window shows a Password prompt instead of the AnythingLLM home screen.

    A private window starts with no saved session, so it shows what any new visitor sees. A server on another machine uses that host's address in place of localhost. The Welcome text mentions a username, but single-user mode asks only for the instance password.

  7. Type the instance password in Password.
  8. Click Login to unlock the instance.

    A wrong password keeps the Welcome screen open with Error: Could not validate login. below the field, and AnythingLLM records the attempt as failed_login_invalid_password in its Event Logs.

  9. Confirm that the AnythingLLM home screen opens after the password is accepted.

    Protection can be removed later by turning off the same Password Protection switch on the Security page and clicking Save changes, after which browsers open the home screen without a prompt.

Share this guide