docs/v3/how-to-guides/self-hosted/server-docker.mdx
You can use the official Prefect Docker image to run a server in a container.
If you're running a server in a Docker container, you need to:
-p 4200:4200)--host flag on the prefect server start command to 0.0.0.0PREFECT_API_URL, to use Prefect within a container.For example:
docker run -p 4200:4200 -d --rm prefecthq/prefect:3-latest -- prefect server start --host 0.0.0.0
After running this command, verify that your local prefect profile is configured to point at your containerized server.
prefect config view --show-secrets
Open the dashboard in your browser:
prefect dashboard open
For more information, see the Docker topic about Networking using the host network.