Run Studio or ComfyUI on hosted infrastructure with explicit authentication, persistence, networking, and shutdown requirements.
Before you start #
Choose one setup:
- local Studio connected to remote ComfyUI;
- hosted Studio and ComfyUI in one protected environment;
- hosted Studio connected to another engine.
Write down which service owns the GPU, project storage, profile database, authentication, and public network access.
Build the environment #
- Start from a supported GPU image and driver stack.
- Put persistent Studio and ComfyUI data on provider volumes.
- Expose only the required services, and protect every public address with authentication.
- Configure the direct ComfyUI URL used by Studio.
- Confirm that Studio can read ComfyUI’s nodes, queue, job history, and media.
- Import or create a small project and run one result.
- Restart the instance and prove that profile, models, nodes, and project media survived.
Run the published Studio server #
Sweet Tea publishes a headless server image with the Studio service and built browser interface:
ghcr.io/tea-time-labs/sweet-tea-studio-server:<version>
ghcr.io/tea-time-labs/sweet-tea-studio-server:latestPin a release tag when repeatability matters. The image serves the Studio UI, API, health endpoint, and MCP endpoint on port 8000. It does not include ComfyUI, provider storage automation, models, or custom nodes.
For a local check of the Studio server:
export SWEET_TEA_AUTH_TOKEN="replace-with-a-long-random-token"
docker run --rm \
-p 8000:8000 \
-e SWEET_TEA_AUTH_TOKEN \
-v sweet-tea-data:/data \
ghcr.io/tea-time-labs/sweet-tea-studio-server:latestBecause this example enables token authentication, the first browser visit must include the token once:
http://localhost:8000/?token=<your-token>Replace <your-token> locally with the same value assigned to SWEET_TEA_AUTH_TOKEN. That first request sets the sts_auth cookie; after it succeeds, return to http://localhost:8000 for normal use. Never share, bookmark, screenshot, or paste the completed token URL into logs or support messages. You can also use Studio’s token-authentication screen instead of putting the token in the address bar.
This proves the Studio service, not image generation. Generation also requires a reachable ComfyUI engine with the Pipe’s models and nodes installed. When ComfyUI is not available at http://127.0.0.1:8188 from inside the Studio container, set SWEET_TEA_COMFYUI_URL to the ComfyUI address the container can reach.
Protect the service #
Treat a hosted Studio URL as access to projects, generations, and potentially agent controls. Use product authentication plus provider network restrictions. Rotate credentials after sharing or image capture.
Shut down safely #
Wait for generation and file writes to finish. Confirm that the active profile, ComfyUI installation, models, nodes, and project roots are mounted on persistent storage. For the published Studio image, the /data mount preserves the main Studio state:
/data/meta/profile.db
/data/projects/
/data/outputs_all/Create a database backup under Settings > Backup & recovery, separately back up irreplaceable project media, and then use the provider’s normal stop control. A container layer is disposable; mounting /data and keeping the provider volume are what make Studio state survive a restart.
Diagnose by part #
| Symptom | Part |
|---|---|
| GPU unavailable | Provider image, driver, or allocation |
| Studio cannot reach ComfyUI | URL, network, authentication, or process |
| Work vanishes after restart | Volume mount or storage path |
| Browser exposes Studio publicly | Network access and authentication |
| Media cannot transfer | ComfyUI input/output and project routing |
