Linux for Astronomy
Set up KStars, Stellarium, and INDI on Linux for telescope control, automated imaging sequences, and image stacking with Siril.
Before you start
- ▸A working Linux desktop with a supported GPU driver for OpenGL (required by KStars and Stellarium)
- ▸sudo or root access to install packages and udev rules
- ▸Compatible telescope mount, camera, or USB-serial adapter (or use INDI simulators to test without hardware)
- ▸Sufficient disk space for INDI drivers and astrometry index files (index sets can total several gigabytes)
Linux has quietly become the platform of choice for serious amateur astronomers. KStars bundles a full observatory suite, Stellarium delivers planetarium-quality sky simulation, and the INDI framework lets you control nearly any telescope, mount, camera, or focuser from a single interface. This guide walks through installing and connecting all of it — from desktop stargazing to automated imaging runs and post-processing stacked images.
Installing Stellarium
Stellarium is available in every major distribution's repositories. The packaged version is usually recent enough for casual use, but the Flathub build tracks upstream more closely and is Wayland-compatible out of the box.
Package manager install
# Debian / Ubuntu
sudo apt install stellarium
# Fedora
sudo dnf install stellarium
# Arch
sudo pacman -S stellarium
Flatpak (recommended for latest version)
flatpak install flathub org.stellarium.Stellarium
On first launch, set your observing location under Configuration → Location and adjust the landscape and atmosphere settings. Enable the Telescope Control plug-in under Configuration → Plug-ins if you plan to slew a physical mount from Stellarium directly.
Installing KStars and Ekos
KStars is more than a planetarium — its built-in Ekos observatory automation module handles capture sequences, plate-solving, auto-guiding, and focus runs. Ekos communicates with hardware through INDI.
# Debian / Ubuntu
sudo apt install kstars
# Fedora
sudo dnf install kstars
# Arch (AUR)
yay -S kstars-git
# Flatpak
flatpak install flathub org.kde.kstars
The KDE Flatpak version ships INDI libraries bundled, which avoids version-mismatch headaches on non-KDE desktops. If you run GNOME or another compositor, prefer the Flatpak or the INDI PPA/COPR.
Setting Up the INDI Framework
INDI (Instrument-Neutral Distributed Interface) is a client–server protocol. An INDI server loads hardware drivers; clients like Ekos or Cartes du Ciel connect to it over TCP (default port 7624). The server can run on the same machine as your client or on a Raspberry Pi sitting at the telescope.
Install INDI core and drivers
# Ubuntu / Debian — add the official PPA first
sudo add-apt-repository ppa:mutlaqja/ppa
sudo apt update
sudo apt install indi-full gsc
# Fedora — enable the COPR
sudo dnf copr enable yselkowitz/indi
sudo dnf install libindi indi-libs
# Arch (AUR)
yay -S indi
indi-full on Debian/Ubuntu pulls in driver packages for most commercial mounts, cameras, filter wheels, and focusers. If disk space is a concern, install only indi-bin plus the specific driver packages (e.g., indi-asi for ZWO cameras, indi-eqmod for EQMod-compatible mounts).
Start an INDI server manually
# Example: EQMod mount driver + ZWO ASI camera driver
indiserver -v indi_eqmod_telescope indi_asi_ccd
Output will show driver load messages and then block while the server runs. Keep this terminal open, or run indiserver inside tmux or as a systemd user service (see Troubleshooting).
Connect Ekos to the INDI server
- Open KStars and go to Tools → Ekos.
- Create a new profile. Set connection mode to Local if the server is on the same machine, or Remote with the Pi's IP if it's remote.
- Add driver slots for your mount, CCD, guide camera, focuser, and filter wheel.
- Click Start. Ekos launches (or connects to) the INDI server and opens device panels.
Telescope Control and Plate Solving
Once Ekos is connected, the Mount module lets you slew by coordinates, sync, park, and track. For reliable GoTo accuracy you need plate solving — comparing a captured image against a star catalogue to compute the telescope's true pointing position.
Install astrometry.net offline solver
# Debian / Ubuntu
sudo apt install astrometry.net
# Fedora
sudo dnf install astrometry
# Arch
sudo pacman -S astrometry.net
Download index files matching your imaging scale. Wide fields (shorter focal lengths) need large index files; narrow fields need small ones. The astrometry.net data server hosts them. Copy files to /usr/share/astrometry/ or the path shown in /etc/astrometry.cfg.
# Example: download index series 4208 (covers ~2–3 degree fields)
wget -P /usr/share/astrometry/ http://data.astrometry.net/4200/index-4208.fits
In Ekos, go to Align module settings and select Local Astrometry.net as the solver. After a short capture, Ekos solves and syncs the mount automatically — a two- or three-star alignment becomes unnecessary.
Automated Imaging with Ekos Scheduler
The Ekos Scheduler module queues imaging jobs with start/end conditions, altitude constraints, and twilight handling. Set up a capture sequence first.
- In the Capture module, add frames: Light, Flat, Dark, Bias — with exposure time, filter, count, and save path.
- Save the sequence as a
.esqfile. - Open Scheduler, add a job: target name (KStars resolves it to RA/Dec), attach your
.esqsequence, set altitude and Moon-separation constraints. - Enable auto-focus runs at set intervals or on temperature change, and enable dithering in the guide settings to reduce fixed-pattern noise.
- Click Start Scheduler before dark. Ekos handles slewing, plate-solving, focusing, guiding, capturing, and parking at dawn.
Image Stacking with Siril and AstroPixelProcessor
Raw captures need calibration (dark/flat/bias subtraction), registration, and stacking before they look like the images you see online.
Siril (free, native Linux)
# Debian / Ubuntu
sudo apt install siril
# Fedora
sudo dnf install siril
# Arch
sudo pacman -S siril
# Flatpak
flatpak install flathub org.free_astro.siril
Siril includes a scriptable pipeline. The built-in Scripts menu has ready-made workflows for OSC (one-shot colour) and mono cameras. A typical run: point Siril at your folder of lights, darks, flats, and biases, run the appropriate script, and it outputs a calibrated, registered, stacked FITS file in minutes. From there use the histogram stretch, background extraction, and colour calibration tools before exporting to TIFF for further processing in GIMP or RawTherapee.
AstroPixelProcessor (commercial, runs on Linux via JVM)
AstroPixelProcessor is a paid application but runs well on Linux because it targets the JVM. Download the Linux installer from astropixelprocessor.com, make it executable, and run it directly — no Wine required.
chmod +x AstroPixelProcessor_*.sh
./AstroPixelProcessor_*.sh
Verifying the Setup
Before a real imaging night, do a dry run during the day:
- Confirm the INDI server loads all drivers without errors:
indiserver -v indi_simulator_telescope indi_simulator_ccduses built-in simulators that require no hardware. - In Ekos, connect to the simulators, run a simulated capture and plate-solve — Ekos should report a successful sync.
- Run one of Siril's scripts on a small set of test frames to confirm calibration paths are correct.
Troubleshooting
INDI server drops drivers on disconnect
Run indiserver as a systemd user service so it persists and restarts automatically.
mkdir -p ~/.config/systemd/user
cat > ~/.config/systemd/user/indiserver.service << 'EOF'
[Unit]
Description=INDI Server
After=network.target
[Service]
ExecStart=/usr/bin/indiserver -v indi_eqmod_telescope indi_asi_ccd
Restart=on-failure
[Install]
WantedBy=default.target
EOF
systemctl --user daemon-reload
systemctl --user enable --now indiserver
USB device permissions for cameras and mounts
If your camera or serial adapter is not accessible, add udev rules. Most INDI driver packages ship these, but you may need to reload them.
sudo udevadm control --reload-rules && sudo udevadm trigger
# Then re-plug the device and confirm with:
lsusb
Plate solving fails or times out
Check that the index files for your imaging scale are present, and confirm the astrometry config file points to the right directory. In Ekos's Align settings, temporarily lower the search radius or increase the timeout.
KStars crashes on Wayland
KStars 3.6+ is largely Wayland-native via KDE Frameworks 5. If you see crashes on an older build, launch with the XWayland fallback:
QT_QPA_PLATFORM=xcb kstarsFrequently asked questions
- Can I control my telescope from a Raspberry Pi running Linux?
- Yes. Run indiserver and the appropriate drivers on the Pi, connect it to your mount and camera over USB, then point Ekos on your desktop to the Pi's IP address on port 7624 using a Remote profile.
- Does INDI support my mount or camera?
- INDI has drivers for most common mounts (EQMod, Celestron, SkyWatcher, iOptron), ZWO ASI, QHY, Atik, and many other cameras, plus focusers and filter wheels. Check the full device list at indilib.org/devices.
- Is Siril good enough, or do I need AstroPixelProcessor?
- Siril is genuinely capable and free; it handles calibration, registration, stacking, and basic processing for most amateurs. AstroPixelProcessor has advantages for mosaic projects and large DSLR datasets, but it is not required.
- Do I need a dedicated Linux machine at the telescope?
- No, but a small dedicated machine like a Raspberry Pi 4 or an Intel NUC running at the mount keeps USB cable runs short, reduces noise from a full desktop, and lets you connect remotely over SSH from inside.
- Can Stellarium and KStars be used together?
- Yes. You can configure Stellarium's Telescope Control plug-in to connect to the same INDI server that Ekos uses, letting you click an object in Stellarium to issue a GoTo command to your mount.
Related guides
Linux Clipboards Explained (+ Clipboard Managers)
Learn the difference between Linux's PRIMARY and CLIPBOARD selections, use xclip, xsel, and wl-clipboard from the terminal, and manage history with GPaste or Klipper.
Configure LibreOffice for Daily Use
Configure LibreOffice for daily use: set default save formats for MS Office interop, tune autosave, install fonts, and add productivity extensions.
Configure the Touchpad and Multitouch Gestures
Configure Linux touchpad behavior and multitouch gestures using libinput, libinput-gestures, and native GNOME and KDE Plasma settings on both Wayland and X11.
Wayland vs X11: How to Choose and Configure Each
Know when to run Wayland or X11, how to check your current session, switch at login with GDM/SDDM/LightDM, and handle NVIDIA and XWayland edge cases.