Categories
#Setup #Web

Tiny File Server

When Firefox Send shutdown, I started running my own instance of NextCloud to send files to people. It worked as expected, but it also felt slow. It felt like I was using a website that just groggily woke up from a nap whenever I logged into it.

I figured that maybe I could replace it with something leanerespecially since I felt like I didn’t need a lot of the features that NextCloud offered. I’ve recently been learning how to set up static sites on OpenBSD and it occurred to me that I could use OpenBSD’s built-in HTTP server to send files to people.

Web Server Setup

I went through the same process that I listed in my notes on setting up an OpenBSD server using httpd, but this time I configured it with send.jagtalon.com instead of art.jagtalon.com.

Write Permissions

I want to be able to write in the /var/www/htdocs/send.jagtalon.com as a normal user, so I changed the permissions to be owned by my user:

$ doas chown -R jag:jag /var/www/htdocs/send.jagtalon.com

Uploading Files

I don’t want to copy files manually to the remote server using the command line every time I wanted to send a file, so I set up Cyberduck to connect to my server using SFTP. I bet Transmit would work well too if you’re on macOS!

A screenshot of Cyberduck showing some of my remote files.

It was easy to set up. All I needed was my private SSH key, SSH password, my username, and the server’s IP address. And it just works! Now I can drag and drop files into the server without touching the terminal.

I also added a few conveniences:

  • I set Cyberduck to go into /var/www/htdocs/send.jagtalon.com/ every time I connected to my server.
  • I added the URL of my server so that I could right click and copy the URL of any file.
A screenshot of my settings on Cyberduck showing the preferred path and web URL options.

And we’re done! Now I can send files and even host little “pens” for demos. Here are some examples:

Leave a Reply

Your email address will not be published. Required fields are marked *