I'm Conor Patrick. I made U2F Zero which is currently on Amazon. I write to share what I've learned and to get feedback. In my last project, I started making a clock with levitating arms. Let's stay in touch. You can subscribe here.

Linx: the filesharing server every hacker should know about

09 November 2015

Linx

Many file sharing servers already exist; a lot of them come and go. Services Google Drive and Drop Box are the big ones. Also there’s have more lightweight options like pastebin or python -m SimpleHTTPServer.

Linx is a recent, open source file sharing server that I’ve recently started using. It makes it easy for sharing files or quickly written scripts that won’t be tied to any public account. It’s also nice if I’m hacking on a project and don’t want to deal with setting up large web scale file storing accounts/API’s (AWS, Firebase, etc).

So Linx really sticks out for the following reasons:

Setting up your own Linx server

Right now I’m running my own Linx server on one of my Digital Ocean instances.

It was pretty easy to set up since there are builds for all majors platforms (except mobile). It has all the configuration details I care about and nothing more. For my setup, I have it sitting behind my Nginx server with fast-cgi and HTTPS.

Easiest way to setup (64-bit Linux):

wget https://github.com/andreimarcu/linx-server/releases/download/v1.1.4/linx-server-v1.1.4_linux-amd64
./linx-server-v1.1.4_linux-amd64

You should pick out the build for your system and try it out. If you’re setting up your own Linx server for real, make sure you cover a couple configurations:

./linx-server -bind 0.0.0.0:8080 \
  -siteurl "http://0x123.xyz/" \
  -remoteuploads \
  -maxsize 1048576

If you want Linx to be public, you should tell it to bind to 0.0.0.0. It’s also very important to let Linx know the siteurl - not only so Linx can correctly generate links, but also to prevent hotlinking by checking the origin or referer.

Hotlinking is sometimes a serious problem that small services face. As we can see from The Oatmeal, it can seriously increase server bills.

seriously increase server bills

Wouldn’t have been a problem if the image was hosted with Linx!

More features of Linx:

Demo

Here is a shell script for geolocating IP addresses I wrote some time ago:

A barcode from a to-go food container at my school [PDF]:

A picture of a deer I took once:

All files can be uploaded simply by doing:

curl -kT <filename> https://0x123.xyz/upload

You’re free to upload anything to my server under that is under 5 MiB.

Conclusion

Linx has everything I want from a file sharing server. If there’s something that’s missing, you should contribute.

Have any questions or comments? Contact me or comment below!