Docs / Pods

Jupyter & web terminal

The Apipods PyTorch images start JupyterLab on port 8888. Expose the port and open it in your browser through the HTTPS proxy, or use the web terminal in the console.

Start JupyterLab

  1. Use a Jupyter-ready image

    apipods/pytorch:2.9.0-py3.12-cuda12.8.1 and the other apipods/* images start JupyterLab on port 8888 with /workspace as the root directory.

  2. Expose port 8888 as HTTP

    Pass { "port": 8888, "protocol": "http" } in ports, or --port 8888/http in the CLI.

  3. Open the proxy URL

    When the pod is RUNNING, open https://8f2k1x9q-8888.proxy.apipods.net, or click Connect → JupyterLab in the console.

Password and token

Set JUPYTER_PASSWORD to choose the login token. Store it as a secret so it never appears in the pod object:

$ apipods secrets set JUPYTER_PASSWORD
$ apipods pods create --gpu L4 --image apipods/pytorch:2.9.0-py3.12-cuda12.8.1 \
    --port 8888/http --env 'JUPYTER_PASSWORD={{ secrets.JUPYTER_PASSWORD }}'

Without JUPYTER_PASSWORD, a random token is generated at start. The console shows it under Connect, and it is printed in the pod logs (apipods logs pod_8f2k1x9q).

Warning: Anyone with the proxy URL and the token can run code on your pod. Do not disable the token.

Web terminal

Every running pod has a browser terminal under Connect → Web terminal in the console. It works with any image that contains /bin/sh, needs no exposed ports and no SSH key, and is a quick way to fix authorized_keys or inspect a pod whose service is not responding. Sessions end after 30 minutes of inactivity.

Tips

  • Keep notebooks and data in /workspace. Anything else lives on the container disk and is wiped when the pod stops. See Pod storage.
  • Long-running cells keep running when you close the browser tab, but output produced while disconnected is not shown. Write progress to a log file for long jobs.
  • The proxy closes requests that are idle for 100 seconds. JupyterLab uses websockets, which are not affected.