{"id":885,"library":"jupyter-server","title":"Jupyter Server","description":"Jupyter Server provides the backend services, APIs, and REST endpoints for Jupyter web applications like Jupyter Notebook, JupyterLab, and Voila. It is a replacement for the Tornado Web Server in older Jupyter Notebook installations. Currently at version 2.17.0, it maintains an active release cadence with frequent minor updates and bug fixes.","status":"active","version":"2.17.0","language":"python","source_language":"en","source_url":"https://github.com/jupyter-server/jupyter_server","tags":["jupyter","server","web-application","backend","extension","notebook"],"install":[{"cmd":"pip install jupyter_server","lang":"bash","label":"Install latest version"}],"dependencies":[{"reason":"Required to run the Jupyter Server.","package":"python","version":">=3.9","optional":false}],"imports":[{"symbol":"ServerApp","correct":"from jupyter_server.serverapp import ServerApp"},{"note":"Used for developing Jupyter Server extensions.","symbol":"ExtensionApp","correct":"from jupyter_server.extension.application import ExtensionApp"}],"quickstart":{"code":"import asyncio\nimport os\nfrom jupyter_server.serverapp import ServerApp\n\nasync def start_jupyter_server():\n    # Instantiate the server application\n    # For a quickstart, we disable browser opening and token/password for simplicity.\n    # In production, ALWAYS secure your Jupyter Server with tokens/passwords.\n    app = ServerApp(\n        open_browser=False,\n        port=os.environ.get(\"JUPYTER_SERVER_PORT\", 8888),\n        port_retries=0,\n        token=\"\", # IMPORTANT: Do NOT use empty token in production.\n        password=\"\" # IMPORTANT: Do NOT use empty password in production.\n    )\n    \n    await app.initialize()\n    await app.start()\n\n    print(f\"Jupyter Server running at: {app.url} (Access via web browser if not using --no-browser, use the printed URL including token if applicable)\")\n    print(\"Press Ctrl+C to stop the server.\")\n\n    try:\n        # Keep the server running until interrupted\n        await asyncio.Event().wait()\n    except KeyboardInterrupt:\n        print(\"\\nServer stopping...\")\n    finally:\n        await app.stop()\n\nif __name__ == \"__main__\":\n    # To run this, save as a Python file (e.g., `run_server.py`) and execute `python run_server.py`.\n    # Alternatively, for a basic command-line start, simply run `jupyter server` in your terminal.\n    asyncio.run(start_jupyter_server())\n","lang":"python","description":"The most common way to start Jupyter Server is via the command line with `jupyter server`. For programmatic control, the `ServerApp` can be initialized and started within a Python script. This example demonstrates a minimal programmatic startup, explicitly disabling browser opening and authentication for demonstration purposes. **For production use, it is critical to enable and properly configure authentication (tokens/passwords).**"},"warnings":[{"fix":"Migrate `jupyter_notebook_config.py|json` to `jupyter_server_config.py|json`, changing `c.NotebookApp` references to `c.ServerApp`. Update import paths from `from notebook.x import Y` to `from jupyter_server.x import Y`. Specifically, `ServerApp.preferred_dir` is deprecated; use `FileContentsManager.preferred_dir` instead. Also note that `ServerApp.token` is deprecated, use `IdentityProvider.token` instead, and `ServerApp.password` is deprecated, use `PasswordIdentityProvider.hashed_password` instead.","message":"Migrating from Jupyter Notebook (pre-7) to Jupyter Server (v2+) involves significant breaking changes. Configuration files moved from `jupyter_notebook_config.py` to `jupyter_server_config.py`, and server-related imports from the `notebook` package should be updated to `jupyter_server`.","severity":"breaking","affected_versions":"2.x and later (from 1.x or older `notebook` versions)"},{"fix":"When starting, note the token printed in the console and use it in the URL (`?token=your_token`). For persistent password authentication, use `jupyter server password` to set a hashed password or configure it in `jupyter_server_config.py`.","message":"Jupyter Server defaults to token-based authentication for security. If you try to access the server without a token or a configured password, you will be prompted for authentication. Direct password login is not enabled by default when token authentication is active.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Ensure that the desired Python packages and kernel environments are correctly installed and accessible by the Jupyter Server. Use `jupyter kernelspec list` to verify available kernels and their paths. Often, installing packages into the same environment where `jupyter_server` is installed resolves this.","message":"Mismatches between the Python environment where Jupyter Server is running and the environment where kernels are sourced can lead to `ImportError` or `ModuleNotFound` exceptions within notebooks.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Monitor memory usage. For large datasets, consider processing in chunks. For persistent issues, you may need to adjust Jupyter's configuration, such as `c.ServerApp.max_buffer_size` in `jupyter_server_config.py`, or allocate more system resources.","message":"Jupyter Server (and its kernels) can crash due to excessive memory usage, often caused by very large datasets, long-running computations, or extensive cell outputs.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Configure your firewall to allow TCP connections on the specified server port and the ephemeral port range (49152-65535). Consult your operating system or cloud provider's firewall documentation.","message":"For remote access or specific deployments, firewall configuration is essential. The server's main port (`ServerApp.port`) must be open, as well as a range of ephemeral ports (typically 49152 to 65535) used by ZeroMQ for kernel communication.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"search_vec":"'2.17.0':40 'activ':44 'api':9 'applic':16,58 'backend':7,59 'bug':52 'cadenc':46 'current':37 'endpoint':12 'extens':60 'fix':53 'frequent':48 'instal':36 'jupyt':1,3,14,18,34,54 'jupyterlab':20 'like':17 'maintain':42 'minor':49 'notebook':19,35,61 'older':33 'provid':5 'releas':45 'replac':26 'rest':11 'server':2,4,31,55 'servic':8 'tornado':29 'updat':50 'version':39 'voila':22 'web':15,30,57 'web-appl':56","created_at":"2026-03-29T06:06:12.738111+00:00","updated_at":"2026-04-16T18:57:08.621781+00:00","problems":[{"fix":"Install `jupyter-server` using `pip install jupyter-server` or `conda install jupyter-server`, and ensure your environment's `Scripts` or `bin` directory is correctly added to your system's PATH.","cause":"The `jupyter-server` package is either not installed in your active Python environment or its executable script is not located in your system's PATH.","error":"jupyter-server: command not found"},{"fix":"Either terminate the process currently using the port, or launch Jupyter Server on an alternative port using `jupyter lab --port 8889` or `jupyter notebook --port 8889`.","cause":"Another process or another instance of Jupyter Server is currently listening on the default port (8888) or the specific port you attempted to use.","error":"[W ServerApp] Port 8888 is already in use"},{"fix":"Try clearing your browser's cache and cookies, using an incognito window, or ensuring any reverse proxy configurations are correctly passing authentication headers; if the issue persists, consider regenerating server configuration files or restarting the server.","cause":"This error typically indicates a problem with the authentication handshake between the client (browser) and the Jupyter Server, often due to expired tokens, incorrect security settings, or issues with reverse proxy configurations.","error":"Invalid JSON received for authentication"},{"fix":"For self-signed certificates, configure your browser to trust the certificate, or provide the path to the certificate authority (CA) bundle in your client configuration; temporarily disabling SSL verification might also be an option for development (though not recommended for production).","cause":"This error occurs when the Jupyter Server is configured to use SSL/TLS, but the client (usually the web browser or another tool) cannot verify the authenticity of the server's SSL certificate, often because it's self-signed or from an untrusted authority.","error":"SSL: CERTIFICATE_VERIFY_FAILED"}],"ecosystem":"pypi","meta_description":null,"install_score":85,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"2.19.0","cli_name":"jupyter-server","cli_version":"2.18.2","type":"library","homepage":"https://jupyter-server.readthedocs.io","github":"https://github.com/jupyter-server/jupyter_server","docs":"https://jupyter-server.readthedocs.io","changelog":null,"pypi":"https://pypi.org/project/jupyter-server/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["web-framework","data","http-networking"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-28","last_verified":"2026-06-28","next_check":"2026-07-28","install_tag":"verified"}}