Skip to content


Ever wanted to quickly share a screenshot, but don't want to use imgur, sign up for a service, or have your image tracked across the internet for all time?

Want to privately share some log output with a password, or a self-destructing cat picture?

Linx Screenshot

Linx is self-hosted file/media-sharing service, which features:

  • ✅ Display common filetypes (image, video, audio, markdown, pdf)
  • ✅ Display syntax-highlighted code with in-place editing
  • ✅ Documented API with keys for restricting uploads
  • ✅ Torrent download of files using web seeding
  • ✅ File expiry, deletion key, file access key, and random filename options



Already deployed:


  • Traefik Forward Auth to secure your Traefik-exposed services with an additional layer of authentication


Setup data locations

First we create a directory to hold the data which linx will serve:

mkdir /var/data/linx

Create config file

Linx is configured using a flat text file, so create this on the Docker host, and then we'll mount it (read-only) into the container, below.

mkdir /var/data/config/linx
cat << EOF > /var/data/config/linx/linx.conf
# Refer to for details
cleanup-every-minutes = 5

Setup Docker Swarm

Create a docker swarm config file in docker-compose syntax (v3), something like this:


I automatically and instantly share (with my sponsors) a private "premix" git repository, which includes necessary docker-compose and env files for all published recipes. This means that sponsors can launch any recipe with just a git pull and a docker stack deploy 👍.

🚀 Update: Premix now includes an ansible playbook, so that sponsors can deploy an entire stack + recipes, with a single ansible command! (more here)

version: "3.2" #

    image: andreimarcu/linx-server
    command: -config /linx.conf
      - /var/data/linx/:/files/
      - /var/data/config/linx/linx.conf:/linx.conf:ro
        # traefik common
        - traefik.enable=true

        # traefikv1
        - traefik.port=8080     

        # traefikv2
        - "traefik.http.routers.linx.rule=Host(``)"
        - "traefik.http.routers.linx.entrypoints=https"
        - "" 

      - traefik_public

    external: true


Launch the Linx!

Launch the Linx stack by running docker stack deploy linx -c <path -to-docker-compose.yml>

Chef's notes 📓

  1. Since the whole purpose of media/file sharing is to share stuff with strangers, this recipe doesn't take into account any sort of authentication using Traefik Forward Auth

Tip your waiter (sponsor) 👏

Did you receive excellent service? Want to make your waiter happy? (..and support development of current and future recipes!) Sponsor me on Github / Patreon, or see the contribute page for more (free or paid) ways to say thank you! 👏

Flirt with waiter (subscribe) 💌

Want to know now when this recipe gets updated, or when future recipes are added? Subscribe to the RSS feed, or leave your email address below, and we'll keep you updated. (*double-opt-in, no monkey business, no spam)

Notify me 🔔

Be the first to know when recipes are added / improved!

    We won't send you spam. Unsubscribe at any time. No monkey-business.

    Powered By ConvertKit

    Your comments? 💬

    Last update: February 4, 2021