Run the official LocalSend CLI as a LAN file receiver in a container. Images pre-built by GitHub Act
237
Run the official LocalSend CLI as a LAN file receiver in a podman container. Images are pre-built in the cloud (GitHub Actions) and pulled from Docker Hub — the container itself is never built locally.
config/localsend-cli/config.toml (mirrors the container's ~/.config/localsend-cli), survive rebuilds and recreatesP once per device; paired devices are auto-accepted forever afterHTTP_PROXY/HTTPS_PROXY if GitHub is not directly accessiblePodman, not Docker. This project is written for podman. To run it with Docker instead, see Podman vs Docker.
This project targets podman (podman compose, podman build, podman attach). If you use Docker, apply these changes:
podman with docker in every command:
podman compose up -d --force-recreate → docker compose up -d --force-recreatepodman attach localsend → docker attach localsendpodman image prune -f → docker image prune -fuserns_mode: keep-id from docker-compose.yml — it is a podman-only key. Docker maps container UIDs directly to host UIDs by default, so a bind mount owned by UID 1000 on the host is already writable by the container's UID 1000. Keep everything else in the file as-is.build.sh only pulls, never builds. It resolves the latest release and pulls the pre-built image from Docker Hub (see Auto-update). With Docker, run the equivalent docker pull ywpc05/localsend-cli:<version> + docker tag + docker compose up -d --force-recreate, or convert the script with sed -i 's/\bpodman\b/docker/g' build.sh.:z mount option is harmless on non-SELinux systems and works on SELinux-enabled Docker daemons as well; keep it.Dockerfile, docker-compose.yml, .env.example and the systemd units are fully compatible as-is.cp .env.example .env # then edit if needed
bash build.sh # pulls the latest pre-built image and starts the container
systemctl --user enable --now localsend-update.timer # weekly auto-update (optional)
localsend-nas) and can send files to it.podman attach localsend
Y (accept), N (decline) or P (accept and pair). Paired devices are auto-accepted afterwards.Ctrl+P, Ctrl+Q.Received files land in the directory set in .env (LOCALSEND_DESTINATION).
| File | Purpose |
|---|---|
config/localsend-cli/config.toml | Settings: alias, port, destination (container path /downloads). Edit and run podman compose restart localsend |
.env | LOCALSEND_DESTINATION: host directory mounted at /downloads |
config/localsend-cli/identity.pem, paired-v2.json | Device identity and paired devices, kept across rebuilds |
build.sh fetches the latest release tag from the GitHub API and compares it with the VERSION file (machine state, gitignored). On a new version it pulls the pre-built image from Docker Hub (ywpc05/localsend-cli, built by GitHub Actions) and recreates the container — the image is never built locally. If the CI build is not ready yet it exits with a warning and retries on the next run. Run manually with bash build.sh, or let the included systemd user timer do it weekly:
systemctl --user enable --now localsend-update.timer
The repository ships a GitHub Actions workflow that runs daily (Monday–Sunday 09:00 UTC), on every relevant push and on manual dispatch. It resolves the latest LocalSend release, checks Docker Hub for an existing image of that version and — only when a new version is found — builds and pushes the image (ywpc05/localsend-cli), tagging both latest and the release version.
You can use the pre-built image directly on any machine with Docker:
docker pull ywpc05/localsend-cli:latest
docker run -d --name localsend --network host \
-v "$PWD/downloads:/downloads" \
-v "$PWD/config:/home/localsend/.config" \
ywpc05/localsend-cli:latest
Note the compose file (userns_mode: keep-id) is podman-specific; for Docker omit that key (see Podman vs Docker).
VERSION, .env and config/ are machine-specific and gitignored; commit the rest.├── Dockerfile # multi-stage; version passed via --build-arg (no hardcoding)
├── docker-compose.yml # host network, keep-id userns, persistent config mount
├── build.sh # check latest release → pull pre-built image → recreate
├── .env.example # template for .env (LOCALSEND_DESTINATION)
└── config/ # persistent config & pairing data (gitignored)
└── localsend-cli/
├── config.toml
├── identity.pem
└── paired-v2.json
Content type
Image
Digest
sha256:569e35f66…
Size
31.9 MB
Last updated
12 days ago
docker pull ywpc05/localsend-cli