Open-source project
mainsail-crew/MainsailOS avatar
mainsail-crew/MainsailOS

MainsailOS: a pre-configured Raspberry Pi image for Klipper printers

This Raspberry Pi distribution for managing Klipper 3D printers with Mainsail provides all you need.

747 stars378 forksShellGPL-3.0

At a glance

What is it?
MainsailOS is a Raspberry Pi OS or Armbian image with Klipper, Moonraker, the Mainsail web interface, a webcam streamer, a WiFi keepalive daemon and Nginx already installed and configured. The image is the product, and building a custom one is a GitHub Actions workflow you trigger by pushing a fork.
Who is it for?
Adopt MainsailOS if you are setting up a Klipper printer on a single-board computer and would rather flash a card than assemble Klipper, Moonraker, Mainsail and a reverse proxy by hand, since the image already has UART enabled and the Input Shaper dependencies in place. Keep away if you need a general purpose Linux on that board, because this is a purpose-built image with a fixed stack and a single board target.
Can I use it commercially?
Yes, with conditions. GPL-3.0 is a copyleft licence: if you distribute software that includes it, you must release that software's source code under the same licence. Running it internally without distributing it does not trigger that obligation.
Is it still maintained?
Yes. The repository last received commits 162 days ago.
What is it written in?
Mainly Shell, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 23, 2026, and from our analysis. They are not legal advice.

Editorial analysis

The image is the product, not the code

MainsailOS is a pre-configured operating system for a 3D printer's single-board computer. The stated purpose is to simplify getting started with Klipper and the Mainsail web interface by providing everything needed in one ready-to-use package.

That framing sets the expectation correctly. This is not a library you add to a project, it is an image you write to an SD card and boot. The README says the images come with the necessary software pre-installed and configured so you can focus on printing, and the primary language of the repository is shell, which is what an image build pipeline is written in.

The base systems are named. For Raspberry Pi the images are based on the official Raspberry Pi OS, and for other single-board computers they are based on Armbian or vendor-specific OS builds such as OrangePiOS. The choice of stable, well-supported distributions as the base is a deliberate constraint, and it is why the image can be a fixed set of packages rather than a rolling custom root filesystem.

The project is GPL-3.0 licensed, the default branch is develop, and the release history shows 2.2.0 on 2025-09-07, 2.2.2 on 2025-10-03 and 3.0.0 on 2026-05-06, with the last push on 2026-05-14. A 3.0.0 release followed by the 2.2.x line is the shape of a project that made a major version because something structural changed, and the top level of the tree shows what that structure is: a VERSION file, a config.yml, and separate modules/ and patches/ directories.

The stack, and what each piece is doing there

The feature list names six components, and each has a distinct job in the chain.

Klipper is the core 3D printer firmware, and it is the only component that actually talks to the stepper motors. Moonraker is the API server for Klipper, which is the layer that turns printer state into something a program can query. Mainsail is the web interface for Klipper, and it is the modern one, with the README describing it that way.

Crowsnest is a webcam streamer wrapper, described as a simple and effective one. Sonar is a keepalive daemon to ensure WiFi stability, which is a small thing that solves a large number of support problems, because a printer that drops off the network is a printer nobody can reach from a browser. Nginx is the web server and reverse proxy, there to provide Mainsail and proxy the API.

That last point is the one to understand for anyone planning to put something else behind the same board. Nginx fronts the interface and proxies the API, so the port layout and the reverse proxy configuration are part of what MainsailOS gives you, and anything you add has to live with them rather than around them.

The repository topics list also mentions crowsnest, sonar, webcam, moonraker, klipper, mainsail, sonar and raspberry-pi, and the fact that the webcam and keepalive pieces are separate published projects from the same crew tells you this group builds small tools and assembles them.

The conveniences that save the most time

Three configurations are called out separately from the software stack, and they are the ones that make the difference between a working printer in an afternoon and a weekend of troubleshooting.

The first is the ready-to-use UART. The serial connection is enabled by default, which allows you to connect your printer board directly without a USB cable. On a Klipper setup, the serial connection is the one thing that reliably annoys people, because the board has to be wired to the right UART pins and the console has to be disabled so the port is free. Having it already done in the image is a real saving.

The second is Input Shaper Ready. All required Python dependencies for Klipper's Input Shaper are pre-installed, with the stated effect of saving setup time and letting you start tuning right away. Input Shaper is a Klipper feature that reduces print artefacts from resonance, and pulling in its Python dependencies by hand is a step that a lot of people skip and later regret.

The third is Katapult support, with the python3-serial package included. Katapult, formerly CanBoot, is what you use to flash firmware onto the board, and the serial package is a necessary dependency for it. Including it means the flashing step works out of the box.

So the pattern across all three is the same: the image contains the awkward prerequisites that are easy to miss and annoying to diagnose.

Building a custom image by pushing a fork

The build process is unusual enough to be worth reading carefully, because it inverts the usual relationship between a project and its users. The README says the build has been simplified so you can create your own custom MainsailOS image without needing a complex local development environment, and the steps are three.

You fork the repository, you customise your settings or add your own modules, and you push your changes to your fork. The GitHub Actions workflow then handles the rest.

There are two outcomes, and they map to the two reasons you would want a custom image. On every push a new image is built and uploaded as a workflow artifact, which is described as perfect for testing. For a new release you manually trigger the Release action to publish a formal release with your modifications.

So the fork-and-push workflow is a continuous integration system for images, with the artifact as the inner loop and the tagged release as the outer one. You never need a build environment of your own, a container, a chroot or a cross-compiler, because the workflow runs the build for you.

The mechanism is visible in the tree. A config.yml at the top level is the settings file, the modules/ directory is where you add your own modules, and patches/ is where changes to the base system live. The .github/ directory holds the workflows, and there is a .editorconfig, a .gitignore and a cliff.toml together with a cliff-release.toml, which is the configuration for a changelog generator, alongside a CHANGELOG.md.

Where MainsailOS is the wrong choice

The first wrong case is a board that is not a supported target. The images cover Raspberry Pi, and other single-board computers through Armbian or vendor builds. If your board has no Armbian or vendor image, there is no MainsailOS for it, and the whole value of the project evaporates because you are back to assembling the stack by hand.

The second is a general purpose use of the board. This is an image with a fixed stack and a fixed purpose, so anything you want to run on that single-board computer alongside the printer is a fight with the image rather than with the operating system. If you want a small Linux server with a printer attached, the right answer is a normal Raspberry Pi OS install and a Klipper install script, and the image is the wrong shape.

The third is a sceptic who wants to know exactly what is in the image. Nothing in the documentation describes the full package list, the README points to a features and components section for a complete list of what is included, and the actual answer lives in the build configuration and the module definitions in the repository. For a hobby printer that is a reasonable trade, because the alternative is a long manual install. For anything that goes on a production floor, you would want to audit the image rather than trust it, and the project gives you the source to do that, but the effort is yours.

The fourth is a specific piece of the stack. If you do not want Mainsail, or you prefer a different web interface to Klipper, the image is still a starting point but the value drops sharply, because the image exists to assemble that particular set of pieces. In that case installing the components individually gives you more control and roughly the same effort.

Editorial conclusion

Adopt MainsailOS if you are setting up a Klipper printer on a single-board computer and would rather flash a card than assemble Klipper, Moonraker, Mainsail and a reverse proxy by hand, since the image already has UART enabled and the Input Shaper dependencies in place. Keep away if you need a general purpose Linux on that board, because this is a purpose-built image with a fixed stack and a single board target. Before you flash it, read the installation guide at docs-os.mainsail.xyz and check the release list, since 3.0.0 shipped on 2026-05-06 and the last push was on 2026-05-14, with the repository publishing both tagged releases and downloadable images.

Frequently asked questions

What is MainsailOS and what does the image include?

MainsailOS is a pre-configured operating system for a 3D printer's single-board computer, with Klipper, Moonraker, the Mainsail web interface, the Crowsnest webcam streamer, the Sonar WiFi keepalive daemon and Nginx all pre-installed and configured.

Which base operating systems do the MainsailOS images use?

For Raspberry Pi the images are based on the official Raspberry Pi OS, and for other single-board computers they are based on Armbian or vendor-specific OS builds such as OrangePiOS. The README describes these as stable, well-supported distributions.

How do I build a custom MainsailOS image?

Fork the repository, customise your settings or add your own modules, and push to your fork. GitHub Actions builds an image on every push and uploads it as a workflow artifact for testing, and you can manually trigger the Release action to publish a formal release with your modifications.

What conveniences does MainsailOS configure out of the box?

The UART serial connection is enabled by default so the printer board connects without a USB cable, the Python dependencies for Klipper's Input Shaper are pre-installed, and the python3-serial package needed for flashing firmware with Katapult is included.

Official sources

  1. License: GPL-3.0
  2. mainsail-crew/MainsailOS on GitHub
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/mainsail-crew-mainsailos.svg)](https://hysenlabs.com/projects/mainsail-crew-mainsailos)

Was this useful?