pandalanax's digital garden

⌨️ WeTransfer but on my server?

A friend has a file he wants to share. The file is several gigabytes and contains private information that we both don't really feel comfortable having on a random server on the internet. How we gonna share this?

You guessed it. It's Tailscale Time again. I recently came across pingvin-share, which is a WeTransfer alternative to selfhost. Setting it up was a 2 minute job and making it available to the public took another 30 seconds.

docker-compose.yml:

version: '3.8'
services:
  pingvin-share:
    image: stonith404/pingvin-share
    restart: unless-stopped
    volumes:
      - "./data:/opt/app/backend/data"
      - "./data/images:/opt/app/frontend/public/img"

    network_mode: service:ts-pingvin
    depends_on:
      - ts-pingvin

  ts-pingvin:
    image: tailscale/tailscale:latest
    hostname: pingvin
    environment:
      - TS_AUTHKEY=tskey-client-notARealKey-asISaidNotARealKey?ephemeral=false
      - TS_EXTRA_ARGS=--advertise-tags=tag:container
      - TS_SERVE_CONFIG=/config/pingvin.json
      - TS_STATE_DIR=/var/lib/tailscale
    volumes:
      - /dev/net/tun:/dev/net/tun
      - ./ts-pingvin/state:/var/lib/tailscale
      - ./ts-pingvin/config:/config
    cap_add:
      - net_admin
      - sys_module
    restart: unless-stopped

Pingvin-share listens on port 3000 so configure the funnel config like:

pingvin.json:

{
  "TCP": {
    "443": {
      "HTTPS": true
    }
  },
  "Web": {

    "${TS_CERT_DOMAIN}:443": {
      "Handlers": {
        "/": {
          "Proxy": "http://127.0.0.1:3000"
        }
      }
    }
  },
  "AllowFunnel": {
    "${TS_CERT_DOMAIN}:443": true
  }
}

Why does this work? Checkout my other post:

Do not forget to allow the funnel IP to funnel in your ACL!


Recent posts