Yaron Levi
06/19/2024, 2:15 PMMarvin
06/19/2024, 2:15 PMPREFECT_API_URL
based on whether you're using Prefect Cloud, a local Prefect server instance, or another specific environment. Here's how:
1. Prefect Cloud:
sh
PREFECT_API_URL="<https://api.prefect.cloud/api/accounts/[ACCOUNT-ID]/workspaces/[WORKSPACE-ID]>"
You can find your Account ID and Workspace ID in your browser's URL when you're on a Prefect Cloud workspace page.
2. Local Prefect Server:
sh
PREFECT_API_URL="<http://127.0.0.1:4200/api>"
You typically see this prompt when you start a local server with `prefect server start`:
sh
prefect config set PREFECT_API_URL=<http://127.0.0.1:4200/api>
3. Remote Environments (e.g., VMs, Docker):
Ensure that PREFECT_API_URL
is set to the correct environment URL where your Prefect server is running.
4. Using Workers:
If you're using workers, the PREFECT_API_URL
must be set for the environment where the worker is running.
For more details, you can check the Prefect settings guide.
If you are facing issues or need further clarification, you might want to look at these relevant GitHub issues:
- Issue on configuring PREFECT_API_URL
with local API server #14127
- Pull request making PREFECT_API_URL
requirement for workers #13942
Feel free to let me know if you need further assistance.