Jupyter & web terminal
Start JupyterLab
- Use a Jupyter-ready image
apipods/pytorch:2.9.0-py3.12-cuda12.8.1and the otherapipods/*images start JupyterLab on port 8888 with/workspaceas the root directory. - Expose port 8888 as HTTP
Pass
{ "port": 8888, "protocol": "http" }inports, or--port 8888/httpin the CLI. - Open the proxy URL
When the pod is
RUNNING, openhttps://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).
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.