How to authorize DreamFactory with Google Cloud SQL or Remote Postgres?

It’s easier for me to store my data offsite and use DreamFactory to provide a REST API.

First I tried to do this by loading my data into a Postgres database hosted on a RAMNode Debian VPS. I created a DreamFactory service for a remote database and filled in all of the details. It failed to connect, because I could not specify on the RAMNode/Debian/Postgres side what IP address to allow for the connection. I then tried to edit pg_dba.conf, postgres.conf, and iptables in Debian to allow any IP address to connect, but asides from creating a security issue, it ended up screwing up the database configuration and not working.

As a 2nd attempt, I tried loading the data into Google’s CloudSQL hosted MySQL database. I created a user for DreamFactory and a static IP, then provided those details to DreamFactory via the “Services” tab. Again, the service failed to connect because on Google’s side they require that you specify the external IP addresses allowed to connect to your Cloud SQL instance (and you can’t specify “all IP addresses”).

Is there a solution? I’d like to make Cloud SQL work, but I don’t know what IP DreamFactory will use to connect.

Where do you host your instance of DreamFactory? We can’t control what IP your DreamFactory will connect from, and that’s the one you need to allow. Do you have some sort of hosting that doesn’t offer static IPs?

I’ve tested with PostgreSQL and while the configuration is detailed and sometimes confusing, it’s certainly possible to allow a single IP (in this case, it was my local instance of DreamFactory) to connect to the DB.

However either PostgreSQL or Google’s hosted MySQL should work just fine.

Ah, so this indicates there’s probably a fundemental misunderstanding on my part. I thought that the DreamFactory REST API could just be hosted by DreamFactory (I saw the downloads but I didn’t think it was a requirement to install it elsewhere).

So, what I need to do is download and install DreamFactory onto my own server (or something) and then run it from there?

I did try to install it on Google Cloud via Bitnami yesterday but there was a dead link or error… I can try it again.

That’s the correct understanding if you’re planning to take an app into production.

From your response, I assume you intended your original post to refer to our free developers’ sandbox at As our documentation indicates, you’re welcome to use it for as much and as long as you like, as long as you understand its limitations.

An nslookup on right now indicates the system’s IP address is Were you receiving a different IP lookup result that led you to believe you couldn’t determine the IP?

Oh I see. Yes, I was planning to use the Developer’s sandbox until I got it working.

I didn’t think to try a nslookup (figured you might use different IP’s anyway). Good thinking; thanks for your help. I’ll give that a try.

It’s been at that IP for at least a few months now. Either way, it should be plenty static for dev and testing. If/when you move to hosting your own for production, you will want to lock down your own IP of course. :wink:

1 Like