hi there! I'm working on deploying prefect on a se...
# prefect-community
c
hi there! I'm working on deploying prefect on a server. in the short term I'm just wanting to run a flow as a script rather than run prefect server. that works fine locally but for some reason on the server I keep getting errors because it's expecting an API key to prefect cloud. is there a configuration setting I'm missing?
I'm using the "slack_notifier" state handler which references prefect.Client() to get a flow ID's url. this is what's causing the error - get_cloud_url method fails because it's trying to connect to Prefect Cloud
z
Hi @Chris Goddard, have you run
prefect backend server
?
c
no! I'll try. I think because I've run prefect server locally my local configuration is different
is there a way to configure that without running that command? I'm running the script and prefect within a docker container
z
backend
is stored in
config.toml
, so you should be able to overwrite that with a local config if you'd like!
c
perfect
yup that worked!
🎉 1
z
Glad to hear it!
c
could that be set with an environment variable? i.e.
PREFECT__CONFIG__BACKEND
?
would it be
PREFECT__CONFIG__BACKEND="server"
?
z
That would do the trick as well! Env vars set like that can override the values defined in
config.toml
. In this case I think it'd be
PREFECT__BACKEND