Question

Using Droplet as S3/Space

Posted March 3, 2021 300 views
Server OptimizationDigitalOcean SpacesDigitalOcean Droplets

Can you please suggest me an approach how I can transform a droplet into something that will behave like S3 ot Spaces, no CDN required. We just want to serve files from Droplet via Caddy server which will be sent to user browsers.

Like: Droplet (as S3/Spaces)->Caddy Server (another droplet)->User browser

I am avoiding Spaces for its very low limit :|

Your suggestions are highly appreciated!

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

I think you can:

  1. Just simply serve static files on that droplet using some http server (i.e nginx, apache). Here’s a docs from nginx on how to serve static file https://docs.nginx.com/nginx/admin-guide/web-server/serving-static-content/

  2. You can go the more complex way of hosting an S3 compatible object open source object storage solution like minio https://github.com/minio/minio if you want to mimic S3 / Spaces functionality (uploads, etc)

Hope that helps, thanks

  • Thanks for your answer. I think it’s better to follow the 1 as it has less dependency and maintenance?

    • Yeah, the first options has less dependency and maintenance, but if you have a lot of assets (say user generated) you’ll have to handle it yourself, either by uploading the images manually or by providing an service / api for the users to upload.

      • We have no assets for now, just building the platform and kinda stuck with server architecture. Yes, there will be so many user generated contents for sure. So, exploring available options depending on pricing and efficiency. Spaces was perfect for us but their rate limit sucks.