Josh Valdeleon
05/10/2024, 2:38 PMenv\Scripts\activate.bat
(env) prefect config set PREFECT_SERVER_API_HOST='SERVER-IP-ADDRESS'
(env) prefect server start
___ ___ ___ ___ ___ ___ _____
| _ \ _ \ __| __| __/ __|_ _|
| _/ / _|| _|| _| (__ | |
|_| |_|_\___|_| |___\___| |_|
Configure Prefect to communicate with the server with:
prefect config set PREFECT_API_URL=<http://SERVER-IP-ADDRESS:4200/api>
View the API reference documentation at <http://SERVER-IP-ADDRESS:4200/docs>
Check out the dashboard at <http://SERVER-IP-ADDRESS:4200>
I used NSSM to run the server as a service on Windows. I used a batch file for this.
cd C:\Users\username\Documents\Projects\prefect-server\env\Scripts
call activate.bat
prefect.exe server start
Running this batch file on Command Prompt gives the same output as above.
I created the service using nssm install
with the batch file as parameter. When I run the service either using nssm start
or from Windows Services, Prefect server runs on the default IP address 127.0.0.1:4200 instead. What did I miss here? CouldJosh Valdeleon
05/13/2024, 12:16 PMPREFECT_SERVER_API_HOST=SERVER-IP-ADDRESS
. I ran the service, and Prefect now runs on the machine IP address.
This question is also posted on [Stack OverFlow](https://stackoverflow.com/questions/78460896/unable-to-run-the-prefect-server-on-machines-ip-address-when-using-nssm)