Symlink / share resources between droplets

August 18, 2015 2.3k views
Configuration Management DigitalOcean Getting Started System Tools Networking Linux Basics Nginx

Hi there,

Is there a way of sharing resources between droplets in any way?

What I’m building is a core system with clients which only contain configuration, but fetch all other files from that core installation, which would be installed on a separate droplet.

Any idea and what potential security risk does it come with?

3 Answers

You could use SSHFS or NFS to do this:

For relying on this in production, NFS would be better than SSHFS. That said, unless you’re very experienced with server administration, I actually don’t recommend either. You’re much better off sticking with technologies you understand and are familiar with debugging when things go wrong. For example, use a web server running on the central server and serve files to your other servers over HTTP/HTTPS.

by Paul White
Luckily there is a way to mount your VPS file system to your local computer so you can make changes on the fly and treat your droplet as local storage.

Thanks @jsamuel,

I thought about micro-services, but at present it’s just not feasible for me to do it due to the amount of work this would require. Some of the resources include javascript files, which don’t like sharing over the http/s.

@sebssd That makes sense, there’s always the time constraint.

Have another answer? Share your knowledge.