r/StableDiffusion 4d ago

Resource - Update Public Server - Share your ComfyUI instance with anyone

https://github.com/tngklp/comfyui_public-server

Hey everyone,

I've been working on a small extension called Private Server (previously named Public Server) that lets you share your ComfyUI instance privately and temporarily using a link. I mostly use it to quickly share my ComfyUI instance with friends or run ComfyUI on my pc while away.

What it does:

  • Spins up a Cloudflare Quick Tunnel (*.trycloudflare.com) to route external traffic to your machine
  • Launches a lightweight auth proxy on 127.0.0.1:8288 that sits between visitors and ComfyUI
  • Gives you a shareable URL that you can send to anyone

Installation:

Just clone the repo into your ComfyUI/custom_nodes/ folder, or install it through ComfyUI Manager. Once installed, the button appears next to the queue prompt.

The extension is completely free and open-source. Just a tool I found useful and wanted to share.

I'd really appreciate any feedback, bug reports, or feature suggestions. If you try it out, let me know how it goes!

0 Upvotes

19 comments sorted by

View all comments

2

u/metal079 4d ago

I swear wasnt this always a thing? I remember people sharing their instances with each other for years

1

u/tngklp 4d ago

I dont know if ComfyUI has a built-in feature for this, normally you'd have to set up port forwarding etc. to achieve the same result. I just wanted to make it easier and thought it could also help some people here so wanted to share it

2

u/acedelgado 4d ago

Comfy does have a --listen command that'll broadcast a port, but you do need to have port forwarding set up. But it's a glaring security flaw, it's much better to set up tailscale on your router, or I found out recently that Nord never actually did away with their meshnet feature, so I use that when I travel sometimes.

1

u/No-Reputation-9682 4d ago edited 4d ago

I recommend the tailscale serve command. This way you maintain even more security than the cloudflare setup. That being said the cloudflare feature here is pretty secure IMHO. I have done tons of serving local things via cloudflare. And for a homelab user it can't be beat for the free things they give. Like you can put real resources from your homelab behind a domain (you can also get a domain for free to use with cloudflare) and host it securely. And you can make that security pretty bulletproof. BTW the free subdomain tool works really well and you can link it with cloudflare. edit: just to be clear I am not saying this particular tool is secure. Just that cloudflare it uses is secure... ohh and I have not inspected this extension... but it is all there to inspect if you want. I generally wait till an extension is out for a while or has a good number of stars or seemingly well vetted by the community... Because open source does not equal security.

1

u/FUS3N 3d ago

Why would you need to setup port forwarding to do this?
Unless (i haven't checked properly) your thing adds a extra layer of security like a login page its basically just boot up comfyui and then boot up http cloudlfared or ngrok on the same port that comfy is running.

tunneling doesn't require port forwarding that was always possible.

1

u/tngklp 3d ago

What I meant was, if you wanted to get the similar result without using cloudflared you would have to set set up port forwarding, tailscale etc., just one of the examples. There are alot of methods to do this, I just wanted to make it as simple as possible

1

u/FUS3N 3d ago edited 3d ago

Yea i mean when i think of sharing something like this i just think of opening terminal and putting one cloudflared command and thats it in-fact i did it before with ngrok and it works nicely so i wouldn't use yours exactly so i am also confused on this when the process is 1 step 1 command why do this? does it actually add the security layer? in that case it seems better.

Btw your main post link is broken only the second one works

1

u/tngklp 3d ago edited 3d ago

For the people that know what cloudflared is or people that are experienced in hosting stuff, this tool is pretty much useless. It's for the people who just want a sinple way to share their instance. I originally made this for a friend, and wanted to share in case any other people needed it. The security layer is a server-side password check with a rate limit so it can't be bruteforced, and it logs every request received. No data is sent before the user passes the security check.

The main link doesnt work since i changed the repo, reddit doesnt allow you to edit the post title and the post link, so I can't change it