Hey guys, i'm running prefect server on an azure v...
# ask-community
a
Hey guys, i'm running prefect server on an azure vm. 2 issues, first is how I set the --expose flag in the docker-compose.yaml and i'm also struggling to connect to the ui remotely. The ports have been exposed and ip's have been whitelisted to our internal org only
a
Hi @Adam Everington. You need to include the IP of the VM in your config.toml:
Copy code
[server]
  host = "<http://XXX.XXX.XXX.XXX>"
  port = "1234"
  [server.ui]
    apollo_url = "<http://YOUR_MACHINES_PUBLIC_IP:4200/graphql>"
Then, you can set the expose flag when you start the server, i.e.:
Copy code
prefect server start --expose
This commands is equivalent to
docker-compose up
- it will start all components as docker containers on the VM.
a
Hey Anna, I have a backend.toml at $HOME/.prefect, can i just throw this in there?
a
sure, but please hide any sensitive information
a
I assume port needs to be 4200?
and the host the same public ip for the vm?
a
correct, 4200 and same IP since it’s the same instance
it looks good to me, did you configure it before starting the server with --expose flag?
a
i've just added those extra lines in... let me restart
no dice, still can't connect
a
and btw, did you know that Prefect Cloud has 10000 free successful task runs every month, and that there is even an integration with Azure? I’m mentioning this in case you want a much easier and more secure setup
a
I might end up falling back to that if I can't get this to work
has to be the firewall but ports: • 80 • 22 • 8080 • 4200 are all open
a
you mentioned you have it all in backend.toml. Doesn’t it have to be in config.toml? Just an idea, I’m not that familiar with Server
i.e.
~/.prefect/config.toml
I think backend.toml is only saying whether you use Cloud or Server, e.g. this is mine:
Copy code
backend = "cloud"
then, there is auth.toml which stores info about your tenant_id and api_key (Cloud) and all other configuration goes to config.toml, afaik
a
ok, where is config.toml usually found on ubuntu?
a
~/.prefect/config.toml
the same place where all Prefect configuration is stored - all the files I mentioned above
a
yeah I only have backend.toml in there, i'll create my own and re-run
👍 1
Hey anna last q... if i'm running server on my vm, you mentioned I can use the cloud ui. Are there any limits on that? You said 10000 successful task runs... but i'm hosting the server myself?
a
Only the limits of what a single machine can handle. I was referring to Prefect Cloud, and those weren’t any limits, but pricing 🙂 Prefect Cloud has no limits with respect to how many tasks you can run, and is highly available.