HTTPfy

Port 7860 (Gradio / Stable Diffusion WebUI)

Default port of Gradio apps, including AUTOMATIC1111 Stable Diffusion WebUI.

Registered (user) port, 1024-49151 TCP Development tools Localhost or LAN only

What port 7860 is used for

Default port of Gradio apps, including AUTOMATIC1111 Stable Diffusion WebUI.

Security: should port 7860 be open?

Localhost or LAN only. --listen or share links put an unauthenticated app online; extensions can run code. Use --gradio-auth or keep local.

IANA assignment

Port 7860 is in the registered range and has no IANA assignment. The usage above is unofficial but widespread.

Check what is listening on port 7860

Linux: is anything listening on TCP 7860?
sudo ss -tlnp 'sport = :7860'
Linux / macOS: which process owns the port
sudo lsof -nP -i :7860
Older Linux / BSD (net-tools)
sudo netstat -tlnp | grep ':7860 '
Windows (Command Prompt)
netstat -ano | findstr :7860
Windows (PowerShell)
Get-NetTCPConnection -LocalPort 7860 -State Listen | Select LocalAddress,OwningProcess

Test it from outside

From another machine
nc -vz -w 5 HOST 7860
From Windows
Test-NetConnection HOST -Port 7860

Block port 7860 in the firewall

ufw
sudo ufw deny 7860/tcp
iptables
sudo iptables -A INPUT -p tcp --dport 7860 -j DROP
nftables
sudo nft add rule inet filter input tcp dport 7860 drop
Windows Firewall
New-NetFirewallRule -DisplayName 'Block TCP 7860' -Direction Inbound -Protocol TCP -LocalPort 7860 -Action Block

Related ports

All port numbers · Open port checker
Assignment data: IANA port number registry (public domain), retrieved 2026-11-10.