Do you need a simple way to share large files?

At times you might need a simple way to host large files such as images for an Embedded Linux system. There are lots of ways to do this – GCP cloud storage and AWS S3 offer cost effective file hosting. However, sometimes its a pain to use and setup with all the complex permission models. If you already have $5/mo server in the cloud running Caddy (you do, don’t you?), then set up a new DNS entry and add something like the following to your Caddy config:

files.bec-systems.com {
  file_server * browse {
    root /var/www/files
  }
}

Adding files is as easy as scp'ing them to the server, which is so simple.

The result looks like this:

Put an index.html file in the root directory to hide the directories at the root level, and then you have a semi-secure way to set up private directory shares.

I think too often we reach for solutions like S3, just because we think everyone else is using it and we can’t afford not to. But, S3 is not simple, and sometimes we are much better off doing things ourselves. This keeps things distributed, which is really the original vision of the Internet. Plus, where else are you going to get a file site that looks as nice as the Caddy directory listing?

1 Like