Deploying CrateDB on balena.io¶
Balena provides a complete set of tools to build, deploy, and manage fleets of connected IoT devices. It lets fleet owners focus on their applications and growth with minimal friction.
The tools work well together as a platform, and you can also pick only the components you need and adapt them to your use case. This usage guide shows how to integrate CrateDB with Balena and run it on a Raspberry Pi 4 (ARM) or a generic x86_64 device.
Requirements¶
To deploy CrateDB on Balena and run it on an IoT device, you need:
Hardware:
Raspberry Pi 4 or other ARM/x86 device
microSD card
Power supply and Wi‑Fi
Software:
balenaCloud account: Create an account
Deploy the code¶
There are two ways to deploy to a balenaCloud fleet: via balena Deploy or via the balena CLI.
To use balena Deploy, click the button:
This usage guide shows how to deploy CrateDB with the balena CLI. For details, see https://balena.io.
Follow these steps to create a new fleet and add a device:
Click
Create FleetName your fleet
Set Device type ->
Raspberry Pi 4Set Application type ->
StarterClick
Create new fleet
Open the fleet and click
Add deviceSet Device type ->
Raspberry Pi 4Select the recommended version
Set edition ->
Development(recommended for first‑time users)Set Network Connection:
Wi‑Fi + EthernetSet your Wi-Fi SSID
Set your Wi-Fi password
You are ready to explore CrateDB. Check our other usage guides to continue.
Log in to your balenaCloud account:
balena loginClone the code repository to your workspace
Deploy the code to your device with:
balena push <application-name>
Now your device is getting updated on balenaCloud and you are set up to run CrateDB on your Raspberry Pi.

Running CrateDB on Raspberry Pi¶
In balenaCloud, click your device, open Host OS Terminal, and run:
sysctl -w vm.max_map_count=262144
This command increases vm.max_map_count (the maximum number of VMAs per process).
The default is usually 65536. Set it to 262144 for CrateDB to start reliably with
memory‑mapped files.
Note
This change is temporary and resets on reboot. To persist it on balenaOS, configure it via a host sysctl drop‑in or an appropriate balena host configuration/label.
At this point, on the balenaCloud Logs component running CrateDB starts
correctly. To start using CrateDB, in the Terminal window choose cratedb
and then Start terminal session:
Use the CLI¶
At this point, we recommend installing Crash CLI to start working with CrateDB. The installation instructions on how to install Crash can be found here.
Start Crash with:
./crash
Add --verbose for more detail or when troubleshooting connection issues.
Open the Admin UI¶
Alternatively, access the CrateDB Admin UI from your workstation:
If you are in a terminal on the device or service container, open
http://localhost:4200.From your workstation, use the device’s local IP (e.g.,
http://<device-ip>:4200) or enable a balena Public URL/port mapping as appropriate.

Now, you are ready to explore CrateDB. Check our other usage guides for a successful start.

