Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

BobaFett's avatar

Running an API server on Digital Ocean Connecting from APP server.

I'm setting up an API droplet running lumen and will have an app droplet. I would like to connect to the database on the api droplet from the app droplet. Anyone have any advice or tutorials for accomplishing this. Should I connect directly (they are in the same datacenter) or should I use the API to pull data over to the app droplet?

Thanks in advance.

0 likes
1 reply
kfirba's avatar

@BobaFett you should definitely use your API as the the source for the app. Don't bypass the API using your app. If you configure both the API and APP servers to have a private connection, you only add a few MS to the request

Please or to participate in this conversation.