Private family location sharing. Self-hosted. One docker compose up.
466
Your family’s live map. On your hardware. In one container.
FamilyTrack is a tiny, self-hosted location-sharing server: PIN-gated login, a live Google Map, optional hCaptcha, one-tap share links, and destination alerts. Built for a Raspberry Pi, a homelab NAS, or any Docker host.
docker pull shounak6942/familytrack:latest
That is the image docker-compose.yml runs (image: shounak6942/familytrack:latest, pull_policy: always).
linux/amd64 and linux/arm64 images (Raspberry Pi 4 / Zero 2 W).docker pull shounak6942/familytrack:latest
Paste docker-compose.yml as a stack. Leave out any build: block — Portainer has no Dockerfile, so a build: line fails with open Dockerfile: no such file or directory.
The stack must look like this (your secrets stay in environment:):
services:
familytrack:
image: shounak6942/familytrack:latest
container_name: familytrack
restart: unless-stopped
ports:
- "5050:5000"
environment:
SECRET_KEY: "paste-your-key"
FAMILYTRACK_PIN: "3325"
GMAPS_KEY: ""
HCAPTCHA_SITEKEY: ""
HCAPTCHA_SECRET: ""
FAMILYTRACK_API_KEY: ""
COOKIE_SECURE: "false"
Then deploy. Portainer will pull shounak6942/familytrack:latest.
docker-compose.yml and edit the environment: block — PIN, Maps key, SECRET_KEY.docker compose up -d
Generate a signing key and paste it into Compose as SECRET_KEY:
openssl rand -hex 32
Same image, without Compose:
docker pull shounak6942/familytrack:latest
docker run -d --name familytrack --restart unless-stopped \
-p 5000:5000 \
-e SECRET_KEY="$(openssl rand -hex 32)" \
-e FAMILYTRACK_PIN="3325" \
-e GMAPS_KEY="your_maps_javascript_api_key" \
-e COOKIE_SECURE=false \
shounak6942/familytrack:latest
Edit values only in docker-compose.yml. Compose does not read a .env file for this app.
| Variable | Required | Purpose |
|---|---|---|
SECRET_KEY | yes | Flask session signing key |
FAMILYTRACK_PIN | yes | Household login PIN (4+ characters recommended) |
GMAPS_KEY | for maps | Google Maps JavaScript API key |
HCAPTCHA_SITEKEY | no | Public hCaptcha site key |
HCAPTCHA_SECRET | no | hCaptcha secret; empty disables CAPTCHA |
FAMILYTRACK_API_KEY | no | Header X-API-Key for scripts / Tasker / GPSLogger |
COOKIE_SECURE | no | "true" when served over HTTPS (default "false") |
Restrict the Maps key by HTTP referrer in Google Cloud Console (e.g. https://your.domain/*).
Put FamilyTrack behind Caddy, nginx, or Traefik for TLS, then set COOKIE_SECURE: "true" in Compose.
watchPosition sends every GPS fix immediately. Other members see it over /ws, or poll /api/ws_poll if a proxy strips WebSocket upgrades.
Tap a name or marker to follow. Tap the same name to unfollow. Speed is shown for the person you follow. After you pan, the map re-centres 5 seconds after the last touch.
/share)/share at any time.Drop a destination on the map. The browser computes haversine distance locally and notifies at 1 km, 500 m, and 200 m.
Send updates without a browser session:
curl -X POST https://your.host/api/update_location \
-H "X-API-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{"name":"Asha","lat":51.5,"lng":-0.12,"accuracy":12,"speed":1.4}'
docker pull shounak6942/familytrack:latest
Image: shounak6942/familytrack:latest — this is what Compose uses.
| Tag | Meaning |
|---|---|
latest | Current v2 / default branch |
sha-<commit> | Immutable build |
v* | Version tags |
The image runs one Gunicorn worker on purpose: locations and share links are in-memory. Do not scale replicas unless you add an external store.
Health check: GET /health → {"ok": true, "ws": true}.
COOKIE_SECURE: "true".docker-compose.yml; rotate them if they leak.git clone https://github.com/dallergy/familytrack.git
cd familytrack
docker build -t shounak6942/familytrack:latest .
Day-to-day runs should pull, not rebuild:
docker pull shounak6942/familytrack:latest
docker compose up -d
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
export SECRET_KEY=$(openssl rand -hex 32)
export FAMILYTRACK_PIN=3325
export GMAPS_KEY=your_key
python app.py --host 0.0.0.0 --port 5000
HCAPTCHA_SECRET is set.FAMILYTRACK_API_KEY is empty.GitHub Actions builds linux/amd64 and linux/arm64 and pushes shounak6942/familytrack on every push to v2 / main and on version tags.
Repository secrets used to log in:
DOCKER_USERNAME — Docker Hub account (shounak6942)DOCKER_PASSWORD — Hub password or access token with Read & WriteThe workflow also copies this README onto the Hub listing.
Use and modify for your household. See the GitHub repository for project history.
Content type
Image
Digest
sha256:f2360aed4…
Size
45.6 MB
Last updated
14 days ago
docker pull shounak6942/familytrack