diff --git a/jupyter_server/serverapp.py b/jupyter_server/serverapp.py index ed0738976a..3dedd5634f 100644 --- a/jupyter_server/serverapp.py +++ b/jupyter_server/serverapp.py @@ -1139,8 +1139,9 @@ def _default_cookie_secret_file(self) -> str: b"", config=True, help="""The random bytes used to secure cookies. - By default this is a new random number every time you start the server. - Set it to a value in a config file to enable logins to persist across server sessions. + By default this is generated on first start of the server and persisted across server + sessions by writing the cookie secret into the `cookie_secret_file` file. + When using an executable config file you can override this to be random at each server restart. Note: Cookie secrets should be kept private, do not share config files with cookie_secret stored in plaintext (you can read the value from a file).