<@ULVA73B9P> - For Prefect enterprise (pro) , how ...
# ask-marvin
c
@Marvin - For Prefect enterprise (pro) , how to start worker? What are the parameters required to start worker while connecting Prefect cloud/enterprise?
m
thought for 148.5 seconds
For Prefect Cloud / Enterprise, a worker is started the same way as in open-source Prefect 3.x — the main difference is how it authenticates to your Prefect API. Minimum requirement to start a worker:
Copy code
bash
prefect worker start --pool <WORK_POOL_NAME>
But before that, the worker needs to know which Prefect API to talk to and how to authenticate. Required connection parameters For Prefect Cloud / Enterprise Cloud:
Copy code
bash
export PREFECT_API_URL="<https://api.prefect.cloud/api/accounts/<ACCOUNT_ID>/workspaces/<WORKSPACE_ID>>"
export PREFECT_API_KEY="<YOUR_API_KEY>"
Then start the worker:
Copy code
bash
prefect worker start --pool my-pool
For a self-hosted Prefect server / enterprise deployment:
Copy code
bash
export PREFECT_API_URL="https://<your-prefect-server>/api"
If your server also requires auth, set the appropriate auth env vars configured for that deployment. Worker start parameters From the CLI, the key options are: -
--pool
/
-p
required, the work pool name -
--name
/
-n
→ optional worker name -
--work-queue
/
-q
→ optional specific queue(s) to poll -
--type
/
-t
→ optional; often inferred from the pool -
--limit
/
-l
→ optional concurrency limit -
--with-healthcheck
→ optional health endpoint on port 8080 -
--run-once
→ optional, poll once and exit Example:
Copy code
bash
prefect worker start \
  --pool my-pool \
  --name my-worker \
  --limit 5 \
  --with-healthcheck
Typical setup flow 1. Authenticate to Prefect Cloud / Enterprise 2. Create a work pool 3. Start the worker pointing at that pool Example:
Copy code
bash
export PREFECT_API_URL="<https://api.prefect.cloud/api/accounts/<ACCOUNT_ID>/workspaces/<WORKSPACE_ID>>"
export PREFECT_API_KEY="<YOUR_API_KEY>"

prefect work-pool create my-pool --type process
prefect worker start --pool my-pool
Alternative login method for Cloud Instead of manually setting env vars, you can log in with:
Copy code
bash
prefect cloud login --key "<API_KEY>" --workspace "<account_handle>/<workspace_handle>"
Then start the worker:
Copy code
bash
prefect worker start --pool my-pool
Important notes - The worker must point to the same workspace where your deployments/work pools exist. - The work pool type must match your infrastructure, e.g.
process
,
docker
,
kubernetes
, etc. -
--pool
is the main required CLI parameter. - For Cloud,
PREFECT_API_URL
+
PREFECT_API_KEY
are the main required connection settings unless you already logged in via
prefect cloud login
. Verified CLI references -
prefect worker start --help
-
prefect cloud login --help
-
prefect work-pool create --help
Helpful docs: - Workers - Work pools - Prefect Cloud - Prefect Cloud UI If you want, I can also give you: - a full worker startup command for
process
/
docker
/
kubernetes
, or - a systemd/docker/k8s example for running the worker in production.