https://prefect.io logo
Title
p

Prasanth Kothuri

02/20/2023, 10:43 AM
Hi again, unable to set API and UI to external IP
root@dataeng-prefect:~# prefect version
Version:             2.8.2
API version:         0.8.4
Python version:      3.8.16
Git commit:          afbed19d
Built:               Fri, Feb 17, 2023 10:02 AM
OS/Arch:             linux/x86_64
Profile:             default
Server type:         server
set the API and UI to external IP, start the server but no luck
root@dataeng-prefect:~# prefect config set PREFECT_API_URL=<http://172.27.24.162:4200/api>
Set 'PREFECT_API_URL' to '<http://172.27.24.162:4200/api>'.
Updated profile 'default'.
root@dataeng-prefect:~# prefect config set PREFECT_UI_API_URL=<http://172.27.24.162:4200>
Set 'PREFECT_UI_API_URL' to '<http://172.27.24.162:4200>'.
Updated profile 'default'.
root@dataeng-prefect:~# prefect server start

 ___ ___ ___ ___ ___ ___ _____ 
| _ \ _ \ __| __| __/ __|_   _| 
|  _/   / _|| _|| _| (__  | |  
|_| |_|_\___|_| |___\___| |_|  

Configure Prefect to communicate with the server with:

    prefect config set PREFECT_API_URL=<http://127.0.0.1:4200/api>

View the API reference documentation at <http://127.0.0.1:4200/docs>

Check out the dashboard at <http://127.0.0.1:4200>
I had to set the following
prefect config set PREFECT_SERVER_API_HOST=0.0.0.0
and it works ! all a bit confusing why it binds to 127.0.0.1 when PREFECT_API_URL and PREFECT_UI_API_URL is explicitly set !
z

Zanie

02/21/2023, 9:46 PM
We bind to
localhost
for safety to prevent exposing your server to the world by accident
You can also specif this with
prefect server start --host 0.0.0.0