https://prefect.io logo
Title
j

jack

01/06/2021, 4:51 PM
Using a self-hosted server, how do I create an access token? Using the cloud option, I can click User -> User Settings -> Personal Access Tokens. But with the self-hosted server it doesn't even show a User icon in the top right.
n

nicholas

01/06/2021, 4:52 PM
Hi @jack - Prefect Server doesn't have an authentication layer so you shouldn't need to create access tokens to interact with your API. 🙂
j

jack

01/06/2021, 4:56 PM
Hi @nicholas Ok, that sounds easy... How do I tell the agent which machine (hostname) to use for its server?
n

nicholas

01/06/2021, 5:00 PM
I'd recommend you add a section to the
~/.prefect/config.toml
(you may need to create this) file on the machine where the agent is running:
backend="server"

[server]
endpoint = "YOUR_MACHINES_PUBLIC_IP:4200/graphql"
Or if you'd prefer you can set those as environment variables
j

Jim Crist-Harif

01/06/2021, 5:16 PM
Alternatively you can use the
--api
flag on the agent CLI: https://docs.prefect.io/orchestration/agents/overview.html#prefect-api-address
:upvote: 2
j

jack

01/06/2021, 7:44 PM
Got it working---thank you!
😄 1