Linx: the filesharing server every hacker should know about

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:

  • It's written in Go (which seems to be a plus these days).
  • Has a built in API that is as simple as a file sharing API should be.
  • It supports displaying common file types with proper syntax highlighting if needed:
    • jpg, pdf, txt, c, python, shell, contents of compressed files, etc.
  • No user accounts or bullshit. Basic anonymity is attained with randomized filenames and file expirations.
  • It's open source and was designed for other people to run.

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:

  • Built in https/TLS server
  • API key authentication and generation
  • Content security policies
  • HTTP proxy support
  • Torrenting support

Demo

Check out linx.li!

Conclusion

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

/

Never miss a post