heyer.systems Open Source

Piik

Private screen sharing and watch-together for a host and up to 20 friends in the browser, peer-to-peer first, with an own STUN server.

Install

On the Proxmox node as root:

bash -c "$(curl -fsSL https://iac.heyer.systems/piik/ct.sh)"

Container from the Debian 13 template · default: 1 CPU, 512 MiB RAM, 4 GiB disk

Customise the commandYour own values for CPU, RAM, network and modules – no dialog

Then: Behind an HTTPS reverse proxy for piik_url → http://<IP>:8787 (WebSocket), UDP 3478 forwarded to <IP>. Site password in the guest: grep piik_site_password /etc/iac/settings.env

More steps are needed outside the guest – see the setup guide.

Settings per instance

SettingMeaning
piik_urlPublic HTTPS address – Address friends open, e.g. https://share.example.org – its host must resolve directly to you (STUN on UDP 3478).
piik_open_siteOpen site – true = no site password (rooms keep their own invitations); default: site password from piik_site_password.

When creating a container, as var_<setting>:

var_piik_url="<value>" bash -c "$(curl -fsSL https://iac.heyer.systems/piik/ct.sh)"

Set or change later, in the guest: a line piik_url=<value> in /etc/iac/settings.env – no quotes, the last line of a setting wins – then:

update

With NetBox: the same line piik_url=<value> in the field Settings of the VM – it takes effect at the next update. Secrets stay in the guest.

Missing or empty = the app's default. Do not edit the configuration files iac writes – update overwrites them; their first lines name the file for local changes.

Setup guide

Screen sharing in the browser needs HTTPS, and participants need to find each other: Piik wants a public HTTPS address, a reverse proxy with WebSocket support in front of the guest, and STUN on UDP 3478 directly at the guest. Picture and sound then go directly between the participants (P2P).

browser ──HTTPS :443──▶ reverse proxy ──HTTP + WebSocket :8787──▶ Piik guest
browser ──STUN UDP :3478──▶ router ─────────────────────────────▶ Piik guest
browser ◀────────────── picture and sound (P2P) ──────────────────▶ browser

Before you start

WhatExample
Public addresshttps://share.example.org, an A record to your public IP
HTTPS reverse proxyTraefik (e.g. iac-traefik), nginx, Caddy
Port forwarding3478/udp → Piik guest

Cloudflare: set the record to DNS only (grey cloud). Piik advertises STUN under the same name, and the Cloudflare proxy does not pass UDP.

1. Create the guest

On the Proxmox node:

var_piik_url=https://share.example.org \
  bash -c "$(curl -fsSL https://iac.heyer.systems/piik/ct.sh)"

piik_url must be exactly the address people open – with https://, and with the port if it is not 443. Without it, Piik runs in development mode on the guest only.

For Docker see the header of docker-compose.yml.

2. Reverse proxy

Piik needs WebSockets for signaling.

Traefik

http:
  routers:
    piik:
      rule: Host(`share.example.org`)
      entryPoints: [websecure]
      service: piik
      tls:
        certResolver: letsencrypt
  services:
    piik:
      loadBalancer:
        servers:
          - url: "http://192.0.2.40:8787"

Traefik passes WebSockets without extra settings.

nginx

location / {
    proxy_pass http://192.0.2.40:8787;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection $http_connection;
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto https;
    proxy_read_timeout 1h;
    add_header Permissions-Policy "camera=(self), microphone=(self), geolocation=()" always;
}

A Permissions-Policy with empty camera=() / microphone=() blocks capture in the browser even when the user allows it – keep self.

3. Ports

PortToWhy
443/tcpreverse proxythe site
3478/udpPiik guestSTUN – participants find their public address

The guest opens 8787/tcp for private networks only (the reverse proxy) and 3478/udp for everyone.

4. Use it

Open the address and enter the site password – in the guest:

grep piik_site_password /etc/iac/settings.env

Create a room, start sharing, and send the invitation. Friends need the invitation; the site password only keeps strangers from creating rooms. To open the site without a password, set piik_open_site=true in /etc/iac/settings.env and run update.

5. Optional: media through the server (SFU)

On strict networks a direct connection may fail. Piik can then forward media through the server. In /etc/piik/piik.local.env (iac never changes it):

SFU_UDP_PORT=7882
SFU_PUBLIC_IP=203.0.113.10     # your public IPv4, when the guest is behind NAT

Open the port in the guest and forward it on the router (same port outside and inside):

echo 'add rule inet iac input udp dport 7882 accept comment "Piik SFU"' >>/etc/nftables.d/90-local.nft
nft -c -f /etc/nftables.conf && systemctl reload nftables
systemctl restart piik

The host turns off Privacy mode before sharing to allow this route. Media through the server uses its upload bandwidth for every viewer on that route.

Check it

In the guest: bash /var/lib/iac/src/core/bin/iac-smoke – configuration, site password, STUN.

From outside: curl -fsS https://share.example.org/healthz returns {"status":"ok"}. Then share a screen and join from another network (mobile hotspot).

Updates

update stays within the installed major version and copies rooms.sqlite to /var/lib/piik-backup/ before switching. Piik is young and releases often; read the release notes before a jump over several versions.

Troubleshooting

SymptomCause
“Start sharing” does nothing / no screen choicethe site is not on HTTPS, or a Permissions-Policy of the proxy blocks capture
403 when creating a roomthe address in the browser differs from piik_url (scheme, host, port)
Friends see “connecting” foreverSTUN does not reach the guest (UDP 3478), or both sides are behind strict NATs – try the SFU
Service does not start after an updatePiik removed a setting you use in piik.local.env: journalctl -u piik names it

Logs: journalctl -u piik.

Source: docs/GUIDE.md of iac-piik – corrections welcome.

Update

In the guest (LXC/VM):

update

Debian packages, Piik, modules and the iac configuration. Major versions never change automatically.

Add modules – any time, in containers and VMs alike:

update --list-modules
update --add-modules node-exporter

All modules · More about update

With Docker, in the directory of the docker-compose.yml:

docker compose pull && docker compose up -d