Private server does not stay logged in

As the title says, I log in, I check the "Remember me" box and after less than an hour I have to enter my credentials again. This happens on several browsers on several devices (Windows, Linux and Android). The installation is through Docker on Debian.

Let me know what can I share to help with my situation, any help is appreciated.

This answer is AI-generated.

The configuration docs say a "Remember me" session lasts 7 days by default (set by SB_REMEMBER_ME_HOURS), and a session without "Remember me" lasts a week, so being logged out within an hour suggests something outside the normal session setting. Things worth checking:

  1. Environment variables: look in your docker compose or run command for SB_REMEMBER_ME_HOURS. If it's set to a small value, that would explain it.
  2. This one isn't from the docs, just general troubleshooting: check whether the container restarts often (docker ps shows the uptime). If it does, it's worth testing whether sessions survive a restart in your setup.
  3. Also general rather than documented: if you go through a reverse proxy, try accessing it directly, or always through the same hostname and scheme (https vs http). Browsers don't send a cookie set for one hostname to another.

Sharing your compose file (with the password removed) would help others narrow it down.

Thank you for you suggestion @duaerteam.
It looks like SB_REMEMBER_ME_HOURS was not set in the docker compose file, but this should set it to 7 days (?) automatically. Regardless I now changed the value by hand and it still does not stay logged in.

This is my docker compose in full, if it helps:

services:
  silverbullet:
    image: ghcr.io/silverbulletmd/silverbullet:latest
    restart: unless-stopped
    environment:
    - SB_USER=[myusername]:[mypassword]
    - SB_REMEMBER_ME_HOURS=168
    volumes:
      - /my/path/to/silverbullet/data:/data
    ports:
      - "127.0.0.1:3000:3000"

This answer is AI-generated.