Run it anywhere

Tempolight in Docker

Docker is a good way to run Tempolight on a Linux server, a NAS or a Raspberry Pi. On a Mac or Windows PC, Docker Desktop works too, with limits: there, the one-file app (install.md) does more.

flowchart TD
  Q{"Where does Docker run?"}
  Q -- "Linux, Raspberry Pi, NAS" --> L["docker-compose.yml<br/>host networking: everything works"]
  Q -- "Docker Desktop on Mac or Windows" --> D["docker-compose.desktop.yml<br/>port 8080 only"]
  D --> X["No discovery, no Apple Home, no now playing,<br/>no Yeelight music mode, no DJ Link / Link"]
  X --> N{"Need those?"}
  N -- "yes" --> APP["Run the one-file app instead"]
  N -- "no" --> OK["Add lights by IP on Devices"]

Linux and Raspberry Pi

With the source (git clone) and Docker Compose:

git clone https://github.com/D4RKGEEK/tempolight.git
cd tempolight
docker compose up -d --build

Then open http://<this machine's address>:8080. docker-compose.yml uses host networking, so Tempolight sees your network as if it ran directly on the machine: it finds WLED and the other lights, streams to them over UDP, and Apple Home, Pro DJ Link and Ableton Link work.

Without the source, with the published image:

docker run -d --name tempolight --network host -v tempolight:/data --restart unless-stopped ghcr.io/d4rkgeek/tempolight

The image is built for amd64 and arm64 (Raspberry Pi 4/5 with a 64-bit OS).

Listening to a USB sound card (Music → Listen on the server): uncomment the devices: - /dev/snd:/dev/snd lines in docker-compose.yml (or add --device /dev/snd to docker run), then docker compose up -d. The image includes ffmpeg and alsa-utils.

Docker Desktop (Mac, Windows)

Docker Desktop runs containers inside a small virtual machine, so the container doesn't see your home network directly. Use the desktop compose file, which maps port 8080 and switches discovery off:

git clone https://github.com/D4RKGEEK/tempolight.git
cd tempolight
docker compose -f docker-compose.desktop.yml up -d --build

Open http://localhost:8080. Then add your lights by IP address on the Devices page (Add a controller): the container can still send to them, it just can't find them.

What doesn't work in Docker Desktop, and why

FeatureWhy notInstead
Scan network, finding lightsdiscovery uses multicast and broadcast on your network (mDNS, Govee, LIFX, …), which doesn't reach the virtual machineadd lights by IP
Apple HomeiPhones find the HomeKit bridge by mDNS and connect to it on its own port; neither crosses the virtual machinerun Tempolight natively
Now playing on this computerthe container is a small Linux system: it can't see the Spotify or Music app on your Mac or PC (it says Install playerctl (or dbus-send) to see what's playing)connect your Spotify account (the Web API works from Docker): spotify.md
Yeelight music modethe light has to connect back into the containerYeelight falls back to one colour a second
Pro DJ Link, Ableton Linkthey're broadcasts and multicast on the networkrun Tempolight natively
Listen on the serverthe container has no access to your computer's sound cardListen live in a browser on the same computer
One-click updatesan image is updated by rebuilding itsee Update

Song files, live listening in the browser, effects, the room, scenes, schedules, Home Assistant (MQTT), the Spotify Web API and streaming to WLED by IP all work.

The Spotify sign-in works from the computer running Docker: its redirect address http://127.0.0.1:8080/api/nowplaying/spotify/callback reaches the container through the mapped port. Keep the mapping 8080:8080 for this: with 8081:8080 the redirect address Tempolight shows would still say 8080.

Everyday commands

WhatCommand
Start (build first if needed)docker compose up -d --build (Desktop: add -f docker-compose.desktop.yml after compose)
Stopdocker compose down (your settings stay in the tempolight volume)
See what it's doingdocker logs -f tempolight (or docker compose logs -f)
Restartdocker restart tempolight
Is it healthy?docker ps shows (healthy); it checks /api/health every 30 s

Update

Settings → About → Check for updates says Running in Docker and shows the command, because a container can't update itself.

  • From the source: git pull, then docker compose up -d --build (with -f docker-compose.desktop.yml on Docker Desktop).
  • From the published image: docker pull ghcr.io/d4rkgeek/tempolight, then docker rm -f tempolight and the same docker run command as before.

Your devices, room, scenes and settings are in the tempolight volume (/data inside the container) and survive both.

Problems

What you seeFix
Conflict. The container name "/tempolight" is already in usean older container has the same name: docker rm -f tempolight (settings are in the volume, not the container), then start again
port is already allocated / Port 8080 is already in usesomething else uses 8080 (perhaps Tempolight running outside Docker). Stop it, or change the left number in ports: ("8081:8080") and open http://localhost:8081
No lights found (Linux)check network_mode: host is in the compose file (or --network host)
No lights found (Docker Desktop)expected: add them by IP
A light shows Offlinefrom the Docker machine, can you open http://<light address>? A VPN or a guest network blocks it
Lost the settings after recreatingthe volume was removed (docker compose down -v or docker volume rm). Restore from Settings → Backup
exec format errorthe image doesn't match the machine: use a 64-bit OS on the Pi, or build it there with --build

Advanced

  • Environment: TEMPOLIGHT_DATA=/data and PORT=8080 are set in the image; TEMPOLIGHT_NO_DISCOVER=1 turns off the first-start search (the Desktop file sets it); TEMPOLIGHT_MQTT_URL, TEMPOLIGHT_MQTT_USER and TEMPOLIGHT_MQTT_PASS connect Home Assistant at every start (see packages/server/src/env-settings.js).
  • Home Assistant OS: use the add-on instead, which runs Tempolight with host networking and finds the Mosquitto broker by itself: smart-home.md.
  • Your own port with host networking: add command: ["node", "packages/server/src/index.js", "--port", "8081"] (port mapping doesn't apply with host networking).
Edit on GitHub