FTP on droplet with private IP and some other stuffs

Posted May 17, 2016 3.6k views
MySQLApachePHPLAMP StackNetworkingVPN

Hello guys,

I have a issue that I’m trying to solve. I already looked on the tutoriais and I didn’t find a 100% answer for my issue.

So I have this droplet above, it’s a small configuration but now I’m worried about my traffic and usage of my resources.

I make a lot of calls to an API and the data that is returned from this API is huge so it is consuming too much resources from my server and by consequence the applications gets slows. I setted a CRON job to make this API call every 90 minutes.

I came up with this possible solution but I may need you help. I’m thinking to create a new droplet with more resources just for mySQL and some PHP code that will make this calls to API. So on this new droplet I’ll set the CRON to run every 90 minutes this PHP script that will make the calls and process the data. With this I’ll isolate the processing and my application that will be on a separated droplet will not get slow.

The server that will have the mySQL and the PHP script I’ll use a private IP.

And this is my question: I know with Private IP I can communicate my APP server with my DB server but on my DB server with the Private IP can I use FTP to upload my PHP script? Can I make a remote connection to mySQL from DB IDE? Can I run the PHP script to make the API calls as well?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Anything that you can do on Linux, you can do on a droplet. Using the public IP would be the only thing necessary to reach your droplet from the Internet.

  • I see but can I access my DB server with private IP from FTP? I have to upload some scripts to this server but I don’t want him on the internet.

    • so far i know u need to create ssh tunnel for this. i also want some details on this.

      • Your machine still has a public IP address assigned to it no matter what you do, so you’ll need to enable your firewall if you want to prevent traffic coming from the internet.

        It would then be trivial to allow FTP traffic to your droplet via it’s public IP, or you can use the private IP from your other droplet.