<@ULVA73B9P> I have self hosted Prefect instance -...
# ask-marvin
j
@Marvin I have self hosted Prefect instance - can I secure my Prefect API with API key, so I might let external users run my deployments via API?
m
To secure your self-hosted Prefect instance and allow external users to run deployments via the API, Prefect has a feature known as API keys. These keys enable authentication of local environments to work with Prefect Cloud, and they might be similarly applicable to self-hosted instances for secure access. However, the document extracts I found focus on Prefect Cloud rather than self-hosted instances specifically. You might be able to adapt the same concepts to your self-hosted setup. For more details, you can refer to the Prefect Cloud API keys documentation. If you are hosting your own Prefect Server, you might also want to consider other security features such as Single Sign-On (SSO) and Audit Log, as these features provide additional layers of security and compliance. For configuring your Prefect Server API URL, which is a step towards setting up your environment, you can use the following command:
Copy code
shell
prefect config set PREFECT_API_URL="<http://127.0.0.1:4200/api>"
Note that you will need to replace
<http://127.0.0.1:4200/api>
with the actual API URL of your self-hosted Prefect service. You can read more about configuring a Prefect server instance in their hosting documentation. If you require further details or assistance, I'd recommend reaching out to Prefect's support or checking their community forums for more specific guidance regarding self-hosted instances and API key authentication.