How SSH Tunnels Keep Cloud ComfyUI Inference Isolated for Multiple Users

2026-10-15 · English · https://blog.ymcdirector.com

How SSH Tunnels Keep Cloud ComfyUI Inference Isolated for Multiple Users

If you've ever tried to run ComfyUI on a rented GPU box with more than one person, you already know the pain. Two creators, one server, and suddenly your render is wearing someone else's face, or your queue is full of prompts you never wrote. The problem isn't the GPU — it's the plumbing.

This is where the SSH tunnel quietly does the heavy lifting. It's the unglamorous piece of infrastructure that makes cloud ComfyUI inference actually safe to share, and it's baked into the cloud deploy flow inside 墨川导演台 (MiniMax H3 AI 导演台). Let's walk through how it works, why port isolation matters, and how to set it up on a real cloud instance.

Why Cloud ComfyUI Gets Messy Without Isolation

Think of a GPU cloud server like a shared office kitchen. Everyone has access to the same stove, the same fridge, the same sink. That's fine until someone leaves their lunch on your plate.

ComfyUI, by default, listens on a local port — usually 8188. If you expose that port publicly and two people point their browsers at it, they're literally looking at the same running instance. Same workflow history. Same loaded models. Same queue. If one person hits "Queue Prompt" while another is mid-render, you get collisions, memory spikes, and confusing outputs.

You *could* try to solve this with firewall rules and separate ports, but that gets fragile fast. You'd need to remember which port belongs to whom, and every new user means another exposed door on the public internet.

An SSH tunnel flips the model. Instead of opening doors, you build a private hallway that only you can walk down. The server stays closed to the outside world; your local machine reaches in through an encrypted connection and talks to ComfyUI as if it were running on your own laptop.

What an SSH Tunnel Actually Does

Here's the simplest way to picture it. Imagine the cloud GPU is a building with no front door — just a mail slot that only accepts letters from people holding a specific key. That key is your SSH credentials. The tunnel is the pneumatic tube you push through the slot.

In practice, you're doing a local port forward. Your machine says: "Anything I send to localhost:8188 should actually be delivered to 127.0.0.1:8188 on the remote server, over an encrypted SSH connection."

The result:

  • The cloud server's ComfyUI port is never exposed to the public internet.
  • Each user opens their own tunnel, so their browser session is bound to their own connection.
  • Traffic is encrypted end-to-end.
  • If someone disconnects, their tunnel closes — no lingering session hogging the queue.

This is exactly the pattern 墨川导演台 uses for cloud deploy. You connect to your own rented GPU instance over SSH, the director's console talks to the remote ComfyUI through that tunnel, and the local tunnel port is automatically isolated per user. No cross-talk, no shared queue, no "wait, whose render is that?"

Step-by-Step: Deploying Cloud ComfyUI with SSH Isolation

Let's run through the actual flow using the 仙宫云 test path, since that's the documented route.

1. Register on 仙宫云 with the invite code

Head to the 仙宫云 registration page and sign up fresh — this isn't a public image, so you need to go through the invite flow. Use the registration link and enter invite code B1H9M6. After you register and complete verification, send your 仙宫云 account ID to customer service. It'll look something like ac401472-db02-5df3-xxxx-xxxxxxxxxxx.

Once your test account is activated, the 导演台 image will appear in your dashboard.

2. Deploy the instance

Spin up an instance using the 导演台 image. This image is pre-configured — you're not installing ComfyUI from scratch, you're launching a ready environment. Wait for the instance to reach a running state.

3. Grab your SSH credentials

On the right side of the running instance panel, click SSH. You'll get three things:

  • SSH Host — the remote address
  • SSH Port — the port assigned to your instance
  • SSH Password — your auth credential

Copy all three. Don't screenshot them into a public chat.

4. Fill in the 云部署 page

Open 墨川导演台, go to the 云部署 (Cloud Deploy) page, and paste the host, port, and password into the matching fields. The director console will use these to establish the tunnel.

5. Validate the connection

Click 验证 SSH (Verify SSH). If the credentials and network are correct, you'll get a success confirmation. If it fails, double-check the port — cloud providers sometimes rotate ports on restart, and a stale port is the most common cause of a failed handshake.

6. Start cloud ComfyUI

Click 启动云端 ComfyUI (Start Cloud ComfyUI) and wait for the green success indicator. That green light means the tunnel is up, the remote ComfyUI is responding, and the local port is bound to your session.

7. Test with a real script

Now write a short script in the 剧本库, generate a storyboard, and push a single shot through. If it renders, your tunnel is doing its job.

Practical Tips for Multi-User Setups

A few things worth knowing once you're past the first successful render:

One tunnel per user, always. Don't share a tunnel. The whole point of port isolation is that each creator's browser session is bound to their own connection. If two people share one tunnel, you've recreated the shared-kitchen problem.

Watch the AI 日志 / 系统志 panel. The director console surfaces real-time generation logs and system status. When something feels off — a queue that won't drain, a render that stalls — this panel usually tells you whether it's a tunnel issue or a workflow issue.

Keep your LLM key separate. The AI 编剧 and dialogue features can run on your own LLM API key. That's a separate credential from your SSH access, and it's worth keeping them distinct so you can rotate one without touching the other.

Use the 资产库 for consistency, not the tunnel. Character and scene consistency comes from reference images in the 资产库, not from the network layer. The tunnel just gets your request to the GPU; the reference images are what keep your protagonist looking like the same person across shots.

Batch carefully. 项目库 supports single-shot and batch generation. Batch jobs are great for throughput, but they also occupy the remote queue longer. If you're sharing a GPU box with a teammate, coordinate batch runs.

Re-verify after a restart. Cloud instances restart. Ports change. Passwords rotate. The moment an instance comes back up, re-run 验证 SSH before queuing anything.

If you hit a wall — image not showing up, SSH verification failing, tunnel dropping mid-render — the fastest path is usually the community. Reach the team via 客服微信 ymcandai, or browse the 淘宝店铺 by searching 杨墨川AI. For docs and updates, the official site is www.ymcdirector.com.

The Takeaway

SSH tunneling isn't a flashy feature. It's the kind of thing you only notice when it's missing — when your render comes back wrong, or your queue is full of strangers' prompts. But once it's in place, cloud ComfyUI inference becomes something you can actually share with a team without stepping on each other.

The mental model is simple: keep the server closed, open a private encrypted hallway, and give each user their own hallway. That's port isolation. That's what makes multi-user cloud inference workable.

If you want to try it end-to-end, start with the 仙宫云 test flow, get your SSH credentials, and let the 导演台 handle the tunnel. Then write a short script, generate a shot, and see the whole pipeline move.

MiniMax H3 Director · Official Website →

WeChat QR

WeChat: ymcandai · Taobao: 杨墨川AI

Articles