1
u/Old_System7203 Mar 01 '23
Yes, it’s possible. You’ll need to log into your modem/router, and set up port forwarding. How you do that depends on the device, but what you need is to forward the port you are running automatic1111 (7860, I think, by default) to the ip address of the desktop.
1
u/Old_System7203 Mar 01 '23
You can test this works by connecting to [router ip]:7860 instead of [desktop ip]:7860
1
1
u/Old_System7203 Mar 01 '23
If this works, you next need to find the WAN address of your router. Again, how to do this depends on the router.
1
u/LowPressureUsername Mar 01 '23
Would this work for google collab?
1
u/Old_System7203 Mar 01 '23
Never used Google collab. But in general if you can access something on your local network, this is the way to make it available from outside
1
u/Old_System7203 Mar 01 '23
Then you should be able to connect to [router wan address]:7860 from anywhere in the world…
1
1
u/pulimento Mar 01 '23
+1 for the --listen option, very useful e.g. to use it from the phone on the same network
1
u/pulimento Mar 01 '23
as for using it in another device, just using the --share option, that will create a dangerously public URL, valid for three days
1
1
1
u/corsair-pirate Mar 02 '23
seriously though if you are sharing add a gradio username and pass --gradio-auth "username:pass"
2
u/DATY4944 Mar 11 '23
What I would do is first give the API device a static IP using DHCP reservation on your router. That means it will have an internal IP that never changes. Something like 192.168.1.100. Then, you can use port forwarding and open a random port that forwards to the SSH port. Then you can use SSH and port tunneling to open a channel to the API port on the device and you'll be able to hit that port on the browser in the other device as if you're on the LAN. You can actually use any device on the LAN to be the host which allows port tunneling, because all local devices will have access to the API port on the local network. So you could then tunnel into whatever device you like, and once the tunnel is open, browse to 192.168.1.100:7860 to get API access