b

    Benjamin Filippi

    2 years ago
    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.
    Zachary Hughes

    Zachary Hughes

    2 years ago
    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

    Benjamin Filippi

    2 years ago
    Thanks Zachary for this. Well noted
    Scott Zelenka

    Scott Zelenka

    2 years ago
    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:
    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'