Skip to main content

How to run local Utopia over LAN/connect from outside network

Why

At times it may be helpful to connect to your local instance of Utopia from other devices to be able to debug/test:

  • Mobile device
  • Apply garbage
  • SalesForce
  • Other integrations

To name a few.  Also, it just feels cool.

How to setup Utopia over LAN

The key here is to set up IIS properly.properly and then open whatever ports are needed on your firewall.

  1. Lets first get your local IP
    1. Run command prompt
    2. Type ipconfig
    3. Copy and save your IPv4 Address
      • image.png

  2. Inside of Visual Studios, click on the IIS Express dropdown arrow and select Utopia Debug Properties
    • image.png
  3. Scroll down until you see App URL.  Replace localhost with the saved IPv4 Address
    • image.png

  4. Close the window
  5. Find the .vs hidden folder of the Utopia solution and then go into Utopia\Config and open applicationhost.config
    1. For me it's C:\src\Utopia\Utopia\.vs\Utopia\config\applicationhost.config
  6. Inside of applicationhost.config, find where it sets up it's bindings
    1. Usually around line 162
    2. Searching for binding and it should go straight to it
  7. Duplicate the two lines that bind the two ports to localhost.  Replace localhost with your saved IPv4 Address on those duplicated lines.
    • image.png

  8. Next, open up the ports inside of your windows firewall
    1. You will need to open up port 44334 for both UDP and TCP
      • Actually not sure if you need both but I did just in case
      • Allow the connection
      • Have Domain, Private, and Public all checked
      • Give it a meaningful name
      • image.png

  9. Close out Visual Studio completely
  10. Open Visual Studio as administrator
    • image.png

  11. Finally, open Utopia and run it with IIS Express

 

Note: 
  • If you get an error that looks like this
    • image.png

    • Then you need to shut down Visual Studio completely and relaunch it as administrator

How to connect from outside network

This one is actually really simple.  All you need to do is do some port forwarding.  I'm not going to get into how to do this since each router is unique (basics is to log into the router and go to advanced).

 

Note:
  • To connect, make sure the device you're connecting from is NOT on the local network
  • You'll need your external IP 
    • Replace the internal IP with the external one on the connecting device