Installing Zenivo
This guide installs Zenivo on a Raspberry Pi (Raspberry Pi OS) or on a Debian/Ubuntu mini-PC or laptop. After it you have a service that starts at boot and a web UI on a TCP port.
Contents: Requirements | Install with install.sh | Install by hand | Camera access | systemd | nginx | ADS-B feeder | Upgrading | Existing installs | Uninstall
Requirements
| Item | Requirement |
|---|---|
| OS | Raspberry Pi OS or Debian/Ubuntu (64-bit recommended) |
| Python | 3.10 or newer (python3 --version) |
| Memory | 1.8 GB or more. Tested on a Raspberry Pi 4 with 1.8 GB usable RAM |
| Disk | 8 GB free for the default retention policy (max_data_gb 8, min_free_gb 3) |
| Packages | python3-venv, python3-pip, git or rsync, ffmpeg (timelapse), curl |
| Pi CSI camera | python3-picamera2 (apt) |
| ZWO ASI camera | ./install.sh --camera-sdk zwo (or scripts/install_camera_sdk.sh zwo) installs zwoasi, libASICamera2.so and the udev rules |
| Network | Outbound HTTPS for satellite orbits (CelesTrak), weather balloons (SondeHub), airports and aircraft data. The remote plate solver is on by default: when you run a plate solve and the local star match is not confident, a frame, the station coordinates and the time are sent to https://virtuallab3d.com; to send nothing, set Remote plate solver to Off (never upload) in Settings > Station & Optics. The sync target, Flightradar24 and community sharing are optional and off by default. Every destination is listed in TRANSPARENCY.md |
Install with install.sh
Install the system packages.
sudo apt update sudo apt install -y python3 python3-venv python3-pip git ffmpeg curl # Raspberry Pi CSI camera only: sudo apt install -y python3-picamera2Set the time zone. Zenivo names archive folders and frames by the local date and stamps every time with its offset, so the system time zone must be correct before the first run.
timedatectl list-timezones | grep -i <your city> sudo timedatectl set-timezone Europe/Berlin # example timedatectl # check "Time zone"Get the code.
git clone https://github.com/hoanb1/zenivo.git ~/zenivo cd ~/zenivoPreview the installer, then run it.
./install.sh --dry-run ./install.shinstall.shchecks for Python 3.10+, creates.venv, installs the dependencies and installs, enables and starts a systemd unit namedzenivo(an already running unit of that name is restarted). It never touchesdata/. It usessudofor the unit file when not run as root.Option Default Meaning --dir PATHthe repo directory Install directory (must contain run_allsky.py)--port N8080Port of the web UI and API --host ADDR127.0.0.1Bind address of the installed service. Use 0.0.0.0to open it on the LAN (plain HTTP sends the admin password unencrypted: prefer a TLS reverse proxy)--camera NAMEautoauto,rts5869,picamera,zwo,qhy,v4l2orsimulator--camera-sdk NAMEnone zwo,qhyorall: also download that vendor SDK (intovendor/lib) and its udev rules; asks before usingsudo, which only the udev rules need--user NAME$SUDO_USER, else the current userUser that runs the service --service-name NAMEzenivosystemd unit name --no-systemdoff Only create the venv and install dependencies --dry-runoff Print every action and change nothing On a Raspberry Pi with
python3-picamera2installed, the installer creates the venv with--system-site-packagesso the venv can import the apt-providedpicamera2.Open
http://<host>:8080/and continue with FIRST_RUN.md (admin password, time zone, station position, lens, sky mask). Verify the version:curl http://localhost:8080/api/versionExpected output:
{"product":"Zenivo","version":"<installed version>"}with the version fromsrc/version.py.Set the admin password. Until you do, nobody can change settings. Read the one-time setup code on the station and enter it at
http://<host>:8080/logintogether with a password of 10 characters or more:cat data/admin_setup_code.txt # inside the install directory # or, without the browser: .venv/bin/python run_allsky.py --set-admin-passwordIn Settings > Station & Optics, enter latitude, longitude and elevation. The factory default is a neutral "My station" at 0, 0. Wrong coordinates shift aircraft, satellites and planets in every overlay.
Visitors who are not signed in can watch (with the station location rounded) but cannot change anything;
see SECURITY.md and TRANSPARENCY.md (what Zenivo sends and stores). Use --host 127.0.0.1 with a reverse proxy or tunnel over HTTPS.
Install by hand
Use this if you do not want install.sh.
cd ~/zenivo
# On a Pi with picamera2 from apt, add --system-site-packages:
python3 -m venv .venv # or: python3 -m venv --system-site-packages .venv
.venv/bin/python -m pip install --upgrade pip
.venv/bin/python -m pip install -r requirements.txt
requirements.txt lists every runtime dependency: numpy, Pillow, pillow-avif-plugin, sgp4, urllib3, cryptography, packaging, the web
framework (FastAPI, uvicorn, websockets), requests, httpx and OpenCV. Zenivo opens no GUI windows, so the headless OpenCV
build is enough. Test tools (pytest) are in requirements-dev.txt.
Test it in the foreground:
.venv/bin/python run_allsky.py --camera auto --port 8080
The server binds to 127.0.0.1 (this machine only) by default. Add --host 0.0.0.0 to open it on the LAN.
Stop it with Ctrl+C, then install the service as described below.
Camera access
| Camera | What to do |
|---|---|
USB IMX335 (RTS5869, 0bda:5869) |
The user needs read/write access to /dev/video*: sudo usermod -aG video <user>, then log in again. The shipped unit adds the video group itself. Check with lsusb | grep 0bda:5869 and ls -l /dev/video* |
| Raspberry Pi CSI | sudo apt install python3-picamera2, create the venv with --system-site-packages, enable the camera in raspi-config if needed. Test with rpicam-hello --list-cameras |
| ZWO ASI | Automatic: scripts/install_camera_sdk.sh zwo (or ./install.sh --camera-sdk zwo) does everything below for your CPU: pip install zwoasi into the venv, libASICamera2.so into vendor/lib/ inside the Zenivo folder (no root needed) and 99-asi.rules into /etc/udev/rules.d/. Only the udev rules need sudo: the script asks "Install them now?" and then sudo asks for your password; answer n, or run it with --no-udev or without a terminal, and it saves the file in vendor/ and prints the exact sudo command to run later. Many systems open the camera without the rules, so try Rescan first. The files are downloaded from the INDI 3rd-party repository (pinned commit), which redistributes ZWO's MIT-licensed SDK; nothing is downloaded unless you run the script. Replug the camera afterwards. By hand: Install the ASI SDK from zwoastro.com (software > "ASI Camera SDK"): copy lib/<arch>/libASICamera2.so to /usr/local/lib and run sudo ldconfig, install the SDK's asi.rules into /etc/udev/rules.d/ and replug the camera. Then .venv/bin/pip install zwoasi and start with --camera zwo (--camera-index N for several cameras, or pick one under Settings > Camera; the choice is saved and used at the next start when --camera is left at auto). Set ZWO_ASI_LIB=/path/libASICamera2.so if the library is elsewhere. Frames are read as RAW16, demosaiced on the CPU (colour models) and reduced to 8 bit; --resolution selects hardware binning. Gain is in 0.1 dB units; exposure from 32 µs up to the camera maximum |
| QHY | Automatic: scripts/install_camera_sdk.sh qhy (or ./install.sh --camera-sdk qhy) downloads libqhyccd.so and 85-qhyccd.rules for your CPU from the INDI 3rd-party repository (pinned commit; QHYCCD's own licence applies, see libqhy/ there), puts the library into vendor/lib/ (no root) and asks before using sudo for the udev rules, exactly as for ZWO; models that need firmware still need QHY's firmware files. By hand: Install QHYCCD's SDK from qhyccd.com so that libqhyccd.so is on the loader path (or set QHY_SDK_LIB=/path/libqhyccd.so) and its 85-qhyccd.rules in /etc/udev/rules.d/, then replug the camera. No Python package is needed (Zenivo calls the SDK through ctypes). Start with --camera qhy (--camera-index N for several) or pick it under Settings > Camera. Single-frame mode, 16-bit transfer, colour sensors demosaiced on the CPU. QHY gain is in SDK units: Zenivo maps the camera's range onto 0 to 30 "dB", a monotonic scale for auto-exposure, not a calibrated gain. Mono sensors use hardware 2x2 binning when --resolution asks for half size or less |
| Other UVC webcam | Same video group as the USB camera. Use --camera v4l2 |
| None | --camera simulator |
The repo ships no udev rules. If the camera is not ready at boot, Zenivo keeps retrying in the background (a watchdog tries again every 30 s) and switches over once it opens.
Add --device /dev/videoN to the unit's ExecStart if the wrong video node is chosen.
systemd service
install.sh renders deploy/zenivo.service and writes it to
/etc/systemd/system/<service-name>.service (ExecStart runs .venv/bin/python run_allsky.py --host @HOST@ --port @PORT@ --camera @CAMERA@ --sync-target "" --log-level warning --no-access-log). To do the same by hand, copy the template, replace
@USER@, @INSTALL_DIR@, @HOST@, @PORT@ and @CAMERA@, and run:
sudo cp zenivo.service /etc/systemd/system/zenivo.service
sudo systemctl daemon-reload
sudo systemctl enable --now zenivo
Useful commands:
systemctl status zenivo
journalctl -u zenivo -f
tail -f ~/zenivo/data/logs/allsky.log # rotating file log (5 MB x 3), survives reboots
sudo systemctl restart zenivo
The unit runs with Nice=5, MemoryMax=700M, Restart=always (RestartSec=10), SupplementaryGroups=video, OMP_NUM_THREADS=2 and basic hardening (NoNewPrivileges, PrivateTmp, ProtectSystem=full). Raise MemoryMax on hosts with more RAM. deploy/zenivo-pi.service is a worked example (Pi 4 behind a proxy, port 8095, sync target, --prune-dir), not used by install.sh. The
template starts with --sync-target "" (sync is off by default anyway); see
CONFIGURATION.md.
nginx reverse proxy
Optional. Use it for TLS, a domain name or access control.
sudo apt install -y nginx
sudo cp deploy/nginx-zenivo.example.conf /etc/nginx/sites-available/zenivo
sudo nano /etc/nginx/sites-available/zenivo # set server_name and the port
sudo ln -s /etc/nginx/sites-available/zenivo /etc/nginx/sites-enabled/zenivo
sudo nginx -t && sudo systemctl reload nginx
Run Zenivo with --host 127.0.0.1 when nginx is the only entry point. The settings that matter:
| Setting | Why |
|---|---|
proxy_http_version 1.1, Upgrade and Connection headers |
The live view uses a WebSocket (/ws/live) |
proxy_buffering off |
MJPEG (/api/stream/mjpeg) and SSE (/api/stream/sse) are endless streams |
proxy_read_timeout 3600s, proxy_send_timeout 3600s |
Streams stay open for a long time |
client_max_body_size 20m |
Uploads from the UI |
X-Forwarded-Proto |
Zenivo runs uvicorn with proxy headers trusted, so it sees the original scheme and client |
Zenivo has its own single-admin login (see SECURITY.md); guests can watch but not change anything. Serve it over TLS (or a tunnel such as Cloudflare Tunnel) if the host is reachable from the internet, so the session cookie is Secure.
ADS-B feeder service
Optional. tools/adsb_feeder.py reads the local aircraft list from Zenivo and pushes it to a
ingest endpoint of your choice every few seconds.
Create
feeder.envnext to the code from the template. Never commit this file.cp deploy/feeder.env.example ~/zenivo/feeder.env chmod 600 ~/zenivo/feeder.env nano ~/zenivo/feeder.env # VLAB_URL, VLAB_KEY, VLAB_INTERVALAdapt
deploy/zenivo-adsb-feeder.service(an example unit): replace/home/pi/zenivowith your install directory,User=piwith your user, andAfter=zenivo.servicewith your service name. The feeder reads Zenivo atALLSKY_URL, defaulthttp://127.0.0.1:8095: setALLSKY_URLinfeeder.envto match your--port(the installer default is 8080).VLAB_INTERVALis in seconds (default 3, minimum 2).Install and start it.
sudo cp deploy/zenivo-adsb-feeder.service /etc/systemd/system/zenivo-adsb-feeder.service sudo systemctl daemon-reload sudo systemctl enable --now zenivo-adsb-feeder
The unit starts only when feeder.env exists (ConditionPathExists), runs with Nice=10 and MemoryMax=64M. The feeder sends the aircraft list without the
station position and camera pointing.
Upgrading
Back up first. Never overwrite data/.
# 1. Back up the configuration (small). Back up data/ only if you want the images.
cp ~/zenivo/data/station_config.json ~/station_config.json.bak-$(date +%Y%m%d%H%M%S)
# 2a. Upgrade a git checkout
cd ~/zenivo && git pull
# 2b. Or, from the web (admin): Settings > Admin > Software update > Update (steps 1 to 4 are done for you)
# The station checks for new releases once a day (switch it off there); installing is always by hand.
# 2c. Or deploy from another machine: sync the code only, never data/
rsync -ac --exclude data/ --exclude __pycache__ --exclude '*.pyc' \
./src ./run_allsky.py user@host:/home/user/zenivo/
# 3. Update dependencies if requirements.txt changed
~/zenivo/.venv/bin/python -m pip install -r ~/zenivo/requirements.txt
# 4. Restart once
sudo systemctl restart zenivo
# 5. Verify
curl http://localhost:8080/api/version
journalctl -u zenivo -n 30 --no-pager
If the HTML pages change, the server tags scripts and styles with the version and a hash of the file, so browsers pick up the new files without a hard refresh. Restart the unit once per deploy.
Existing installs
Installs from before 2026-11-13 used the unit and folder name allsky-ng; since then both are zenivo
(~/zenivo), and a legacy symlink ~/allsky-ng -> zenivo keeps old scripts working. Ports are unchanged.
To upgrade a host from a checkout on another machine, use the rsync flow above, then restart the existing unit:
rsync -ac --exclude data/ --exclude __pycache__ --exclude '*.pyc' \
./src ./run_allsky.py pi@<pi-host>:/home/pi/zenivo/
ssh pi@<pi-host> 'sudo systemctl restart zenivo'
install.sh never stops or restarts a unit with a different name. If a host still has an older
allsky-ng or allsky-web unit, the installer warns about it and leaves it untouched: stop and
disable it yourself if it uses the same port or camera, and run install.sh with --dir pointing
at the existing folder (this keeps data/).
Internal identifiers keep the old "allsky" name: logger names allsky.*, the browser storage key
allsky.ui.prefs.v1, upload paths /uploads/allsky/..., the sync API /api/allsky/ingest/* and
the environment variables ALLSKY_*.
Uninstall
sudo systemctl disable --now zenivo
sudo rm /etc/systemd/system/zenivo.service
sudo systemctl daemon-reload
# Optional: nginx and the feeder
sudo rm -f /etc/nginx/sites-enabled/zenivo /etc/nginx/sites-available/zenivo && sudo systemctl reload nginx
sudo systemctl disable --now zenivo-adsb-feeder 2>/dev/null; sudo rm -f /etc/systemd/system/zenivo-adsb-feeder.service
# Remove the code. This deletes data/ too (frames, darks, station_config.json): copy it first if you need it.
rm -rf ~/zenivo
Same text as on GitHub: docs/INSTALL.md @ ee7a834