Use Server Uplink on local server -- how to find uplink url

What I’m trying to do:
Use a server uplink while running an anvil app running on the local server.

What I’ve tried and what’s not working:

  1. Run my anvil app with the --uplink-key "<MY KEY>"
  2. Run my Uplink Script with url="ws://localhost:3030/_/uplink" and also replacing localhost with the ip address where I can access my app locally.
  3. Get this error:
Connecting to wss://anvil.works/uplink
Anvil websocket open
Fatal error from Anvil server: Incorrect uplink key
Anvil websocket closed (code 1000, reason=b'')

The original post is two years old as I write. As no one else has replied, and since I thought I was running into the exact same problem yesterday perhaps this account of my foolish error will help someone.

I accidentally created two very similarly named files. One contained my correct URL and the other didn’t specify any URL. I was editing the right one but executing the wrong one from my history in another session. The result was exactly the behaviour shown above, as if the URL was being ignored! Duh.

1 Like