allskyhub next to Allsky
DeutschYour Raspberry Pi already runs Allsky ↗? allskyhub installs next to it, without a new SD card. Allsky stays as it is; you switch between the two with one command, because only one program can use the camera at a time.
What you need
- A Raspberry Pi 4 or 5 with Allsky and a ZWO camera (tested with the ASI678MC) or a Raspberry Pi HQ camera (supported, not yet tested on real hardware)
- SSH access to the Pi and about 20 minutes
- An allskyhub account: ask for access
1. Get allskyhub
git and the Python tool uv, then the source code:
sudo apt install -y git
curl -LsSf https://astral.sh/uv/install.sh | sh
source ~/.local/bin/env
git clone https://github.com/benhartwich/allskyhub ~/allskyhub
2. User and folders
allskyhub runs as its own user and keeps its pictures in /var/lib/allskyhub-agent.
sudo useradd --system --home-dir /var/lib/allskyhub-agent --no-create-home \
--shell /usr/sbin/nologin --groups video allskyhub
sudo install -d -o allskyhub -g allskyhub -m 0750 /var/lib/allskyhub-agent /var/lib/allskyhub-agent/data
sudo install -d /opt/allskyhub-agent/lib /etc/allskyhub-agent
With a ZWO camera, also take Allsky’s copy of the ZWO driver:
sudo install -m 0755 ~/allsky/server/assets/asi_sdk/lib/armv8/libASICamera2.so.1.39 /opt/allskyhub-agent/lib/
sudo ln -sfn libASICamera2.so.1.39 /opt/allskyhub-agent/lib/libASICamera2.so
If the version number differs on your Pi, use the file that is there (ls ~/allsky/server/assets/asi_sdk/lib/armv8/).
3. Install
Builds allskyhub into its own folder; this takes a few minutes on a Pi 4 (the build cache stays in /root/.cache/uv).
V=$(git -C ~/allskyhub rev-parse --short=7 HEAD)
R=/opt/allskyhub-agent/releases/$V
sudo install -d $R
cd ~/allskyhub && sudo env UV_PYTHON_DOWNLOADS=never UV_PROJECT_ENVIRONMENT=$R/.venv \
sh -c "$(command -v uv) venv -q --python /usr/bin/python3 $R/.venv && $(command -v uv) sync -q --frozen --no-dev --no-editable --package allskyhub-agent"
sudo ln -sfn releases/$V /opt/allskyhub-agent/current
4. Settings
Your location (decimal degrees; replace the example values), time zone and camera. You can change all of it later on the hub. The file stays readable for allskyhub only.
echo '{"latitude": 50.00, "longitude": 10.00, "timezone": "Europe/Berlin", "camera": "zwo-asi678mc"}' \
| sudo -u allskyhub sh -c 'umask 077; cat > /var/lib/allskyhub-agent/settings.json'
With the Raspberry Pi HQ camera write "camera": "rpi-hq".
echo 'ALLSKYHUB_AGENT_ARGS="--asi-sdk /opt/allskyhub-agent/lib/libASICamera2.so run --data /var/lib/allskyhub-agent/data --settings /var/lib/allskyhub-agent/settings.json --hub https://allskyhub.org --http 0.0.0.0:8080"' \
| sudo tee /etc/allskyhub-agent/allskyhub-agent.env
With the HQ camera leave out "--asi-sdk /opt/allskyhub-agent/lib/libASICamera2.so".
5. Service, switching with Allsky
Starting allskyhub stops Allsky and the other way round. After a reboot the Pi starts with Allsky as before.
sudo cp ~/allskyhub/image/files/etc/systemd/system/allskyhub-agent.service /etc/systemd/system/
sudo install -d /etc/systemd/system/allskyhub-agent.service.d
printf '[Unit]\nConflicts=allsky.service\nAfter=allsky.service\n' \
| sudo tee /etc/systemd/system/allskyhub-agent.service.d/allsky-switch.conf
sudo systemctl daemon-reload
6. Start and pair
sudo systemctl start allskyhub-agent
Open http://<address-of-your-pi>:8080 in a browser on your network. The page shows a pairing code like ABC-DEF; enter it under Pair a camera. The live picture shows up on the hub a minute later.
7. Optional: bring your old pictures
allskyhub takes over Allsky’s nights: images, keograms, star trails, timelapses and meteors. On the same disk it links the files instead of copying them, so it needs hardly any space. First a dry run, then without --dry-run:
sudo /opt/allskyhub-agent/current/.venv/bin/allskyhub-agent import-allsky \
--from ~/allsky --data /var/lib/allskyhub-agent/data \
--settings /var/lib/allskyhub-agent/settings.json --dry-run
Allsky in another folder: adjust --from. Coming from indi-allsky: import-indi-allsky instead, see the guide ↗.
Switching and updating
sudo systemctl start allsky # back to Allsky
sudo systemctl start allskyhub-agent # back to allskyhub
Stay with allskyhub after reboots: sudo systemctl disable allsky && sudo systemctl enable allskyhub-agent. To update, run git -C ~/allskyhub pull and step 3 again, then sudo systemctl restart allskyhub-agent. Note: Allsky starts itself again when the camera is plugged back in.