Hi, I am playing with the local UI server. Is ther...
# prefect-community
b
Hi, I am playing with the local UI server. Is there away to specify to the agent the IP of the server to connect to? prefect backend server --help Usage: prefect backend [OPTIONS] API Switch Prefect API backend to either
server
or
cloud
Options: -h, --help Show this message and exit.
z
Hi Benjamin! Right now the UI is hardcoded to reference
localhost
, but we do have an issue open to expand that functionality! https://github.com/PrefectHQ/prefect/issues/2237
b
Thanks Zachary for this. Well noted
💯 1
s
changing that will update the URL the website will attempt to look for to talk to the API. If you want your
.register
to point to a new URL, you'll need to edit the
backend.toml
values to do that .. or you can achieve the same thing with envars:
Copy code
import os

os.environ['PREFECT__BACKEND'] = 'server'
os.environ['PREFECT__SERVER__HOST'] = '<http://api.prefect.local>'
os.environ['PREFECT__SERVER__PORT'] = '80'
os.environ['PREFECT__SERVER_UI__HOST'] = f'<http://prefect.local>'
os.environ['PREFECT__SERVER_UI__PORT'] = '80'