Running a shared server

noodlelab serve on your own machine needs no setup: no logins, one local user. This page is for a server other people use.

Which pages may use the server

A browser lets any website send requests to a server on your machine, so the server checks where they come from:

  • Without logins (the default on your own machine), it answers only to this machine’s names: localhost, a loopback address and the --host it was started with. With --host 0.0.0.0 --auth none it also answers to IP addresses, so reach it from other machines as http://192.168.1.5:8000, not by a host name. This stops DNS rebinding, where another site points its own name at your machine.

  • Pages from other websites cannot open the editor’s WebSocket or save, run, upload or delete anything: those requests must come from the editor’s own page. On a shared server, the page’s host name must be the one the request was sent to (Host, or X-Forwarded-Host from a reverse proxy that rewrites Host).

Programs (the CLI, the MCP server, scripts) send no Origin header and are not affected.

Remote storage

Admins can mount S3, Google Cloud Storage, Azure, SFTP or a network share under a short name that graphs use in file paths (lab-s3://2026/run1.csv), for every workspace or only some. Remote storage explains how. A folder on the server itself is a mount too, with the URL local:///data/shared: on a shared server this is the only way to reach files outside a workspace.

Slurm clusters

A shared server can send runs to a Slurm cluster as batch jobs. Turn it on under Admin → Cluster: set the partition, account, time limit and resources, add setup lines such as module load, and press Test connection. People who may run graphs then get a Run on menu next to Run, with the choices On the server and On the cluster.

A cluster run looks the same in the editor: progress, previews and reports show up as usual, with the job state (Slurm job 1234 · pending) until it starts, and Stop cancels the job.

It needs:

  • the workspaces on a file system shared with the compute nodes;

  • noodlelab installed where the jobs run;

  • a server that can run sbatch, directly or through ssh.

docs/slurm.md explains the setup and what a job looks like.

Docker

docker build -t noodlelab .
docker run -d -p 8000:8000 -v noodlelab-data:/data \
  -e NOODLELAB_ADMIN_TOKEN='<token>' noodlelab

Or run make docker-up (docker compose up -d --build, with the version taken from the git tag) with NOODLELAB_ADMIN_TOKEN set in .env; plain docker compose builds report version 0.0.0. The compose file also installs Claude Code for the Agent panel. For a public demo, set NOODLELAB_DEMO=1, which gives you guests only, one run at a time and a 25 MB file limit. render.yaml deploys it on Render’s free plan.

The Agent panel on a shared server

The Agent panel runs Claude Code or Codex CLI as the server’s user, so it is offered to admins only when logins are on, never on a demo server (NOODLELAB_DEMO=1), and only while Admin → Settings → agent terminal is on. Each agent session gets an API token of its own, revoked when the session ends.