Raspberry Pi BuildsSeptember 8, 2026

Backend (Pi, Mac or PC)

Detailed walkthrough video

Check out this detailed video walkthrough on deploying the Dune Weaver backend on a Raspberry Pi:

The Software That Should Come With Every Sand TableWatch on YouTube

Overview

The Dune Weaver system consists of two main components:

Dune Weaver Backend (Raspberry Pi or your computer)

  • Hosts the web interface you use to control the table
  • Stores and manages pattern files (.thr files)
  • Handles pattern logic, playlists, scheduling, and automation
  • Converts patterns into G-code commands
  • Communicates with FluidNC over USB (or UART)

DLC32 / ESP32 (FluidNC Firmware)

  • Receives G-code commands from the backend
  • Controls the stepper motor drivers
  • Handles real-time motor timing and movement
  • Manages homing, acceleration, and motor parameters

The two devices should be connected via USB cable. The backend sends G-code commands to FluidNC, which translates them into precise motor movements.


┌─────────────────┐         USB          ┌─────────────────┐
│  Dune Weaver    │ ◄──────────────────► │  DLC32 / ESP32  │
│  Backend        │                      │  (FluidNC)      │
│  (Pi or PC)     │                      │                 │
└─────────────────┘                      └─────────────────┘
        │                                        │
        │ Wi-Fi                                  │ Motor signals
        ▼                                        ▼
   Web Browser                            Stepper Motors
   (Control UI)                           (Theta & Rho)

If using a Raspberry Pi, you can also use UART over GPIO pins to connect to the DLC32/ESP32 instead of USB.

Deployment Options

DeploymentDeviceRecommended For
One-Line Install (Recommended)Raspberry PiPermanent installation in your sand table
ManualPC / Mac / LinuxTesting, development, or running without a Pi

Raspberry Pi is the recommended way to run Dune Weaver. The Pi lives inside your sand table and runs 24/7, allowing you to control the table from any device on your network. The installer sets up a native systemd service with nginx — no Docker required.

If you want to test patterns or don't have a Raspberry Pi, you can run the backend on your computer using the manual deployment below.

Supported Devices

  • Raspberry Pi Zero 2W, 3B, 4, 5 (one-line install)
  • Any PC / Mac / Linux (manual deployment)

Note: The Pi 3B+ has an unstable serial (UART) connection and can suffer intermittent disconnects from the DLC32. It still works, but if you're buying a Pi for the connection (especially over UART or for Dune Weaver Touch), the Pi 4 is the recommended choice.

Raspberry Pi Setup

Initial Configuration

Users should employ the Raspberry Pi Imager to install Raspberry Pi OS Lite (64-bit). The Lite version is recommended because it uses fewer resources and doesn't include a desktop environment that isn't needed for headless operation. Key setup steps include:

  • Selecting appropriate hardware and SD card
  • Choosing "Raspberry Pi OS Lite (64-bit)" under "Raspberry Pi OS (other)"
  • Enabling SSH during advanced configuration
  • Setting hostname to your preference (e.g., dwp or dwmp)
  • Configuring Wi-Fi credentials

Raspberry Pi Imager Setup

Advanced Options Configuration

SSH Access

Connect remotely using: ssh [email protected] (or replace raspberrypi with your hostname/IP address).

Once connected to your Pi via SSH, run this single command to install everything:

curl -fsSL https://raw.githubusercontent.com/tuanchris/dune-weaver/main/setup-pi.sh -o setup-pi.sh
bash setup-pi.sh

This script will:

  • Install system dependencies (Python, nginx, etc.)
  • Clone the Dune Weaver repository
  • Set up a systemd service and nginx reverse proxy
  • Set up autohotspot for plug-and-play WiFi (creates a "Dune Weaver" hotspot if no known network is found)
  • Apply WiFi stability fixes
  • Optionally configure UART for GPIO pin connection
  • Start the Dune Weaver backend
  • Install the dw CLI tool for easy management

After installation completes, log out and back in (type exit then reconnect via SSH) for the CLI to be available.

Access the interface at <raspberrypi_ip_address> and confirm that the backend is up.

Web Interface Access

Open up a browser on your phone or on your computer to access the web UI.

  • If you run your backend on your computer, you can access the UI by going to localhost.
  • If deployed onto a Raspberry Pi, the address should be <hostname>.local or <raspberrypi_ip_address>

Finding Your Pi's IP Address

To find your Raspberry Pi's IP address, run this command on the Pi:

ifconfig

Look for the wlan0 section (for WiFi) and find the inet address (e.g., 192.168.1.100).

For reliable access, configure your router to assign a fixed IP address to your Raspberry Pi. This prevents the IP from changing after reboots or power outages.

  1. Log into your router's admin panel (usually 192.168.1.1 or 192.168.0.1)
  2. Find the DHCP or LAN settings section
  3. Look for "Address Reservation", "Static IP", or "DHCP Reservation"
  4. Add your Pi's MAC address and assign a fixed IP (e.g., 192.168.1.100)

This way, you can always access your Dune Weaver at the same address.

Changing the Port

By default, Dune Weaver runs on port 80. Some networks or systems block port 80, or it may already be in use by another service. If you can't access the web interface, you can change it to a different port (e.g., 8000).

SSH into your Pi and create a .env file in the dune-weaver directory:

cd ~/dune-weaver
nano .env

Add the following line:

FRONTEND_PORT=8000

Note: Do not use port 8080 (used by the Dune Weaver backend) or common system ports like 22 (SSH), 53 (DNS), or 443 (HTTPS).

Save the file (Ctrl + X, then Y, then Enter) and restart Dune Weaver:

dw restart

You can now access the web interface at <raspberrypi_ip_address>:8000 instead.

DW CLI

The installation includes a command-line tool called dw for managing your Dune Weaver installation:

CommandDescription
dw installInitial setup (Docker + WiFi fix)
dw startStart Dune Weaver
dw stopStop Dune Weaver
dw restartRestart Dune Weaver
dw updatePull latest version and restart
dw logsView live logs (useful for troubleshooting)
dw logs <n>View last n lines of logs (e.g., dw logs 100)
dw touch installInstall touch app on Pi (for touchscreen displays)

Common CLI Usage

Check if Dune Weaver is running:

dw status

View logs for troubleshooting:

dw logs

View last 100 lines of logs:

dw logs 100

Update to the latest version:

dw update

Manual Pi Deployment

If the one-line installer doesn't work, you can set up manually:

Install Dependencies

sudo apt update && sudo apt install -y python3 python3-venv python3-pip git nginx

WiFi Stability Fix

To prevent WiFi disconnection issues, run the following:

sudo raspi-config

Navigate to: Advanced Options -> WLAN Power Save -> No

Alternatively, add the following to your /boot/firmware/cmdline.txt file: brcmfmac.feature_disable=0x82000 and reboot. (Add a space before pasting it at the end of the line. Don't add a new line.)

Here's a quick guide on how to use nano to edit a file on Linux.

Clone and Set Up

git clone https://github.com/tuanchris/dune-weaver --single-branch
cd dune-weaver
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

Set Up systemd Service and nginx

Copy the service file and nginx config:

sudo cp dune-weaver.service /etc/systemd/system/
sudo cp nginx/dune-weaver.conf /etc/nginx/sites-available/dune-weaver
sudo ln -sf /etc/nginx/sites-available/dune-weaver /etc/nginx/sites-enabled/
sudo rm -f /etc/nginx/sites-enabled/default
sudo systemctl daemon-reload
sudo systemctl enable dune-weaver
sudo systemctl start dune-weaver
sudo systemctl restart nginx

Access the interface at <raspberrypi_ip_address> and confirm that the backend is up.

Manual Software Deployment

What does npm run dev do? It uses concurrently to start both the Vite frontend dev server (port 5173 with hot reload) and the Python FastAPI backend (port 8080) in a single command. The frontend proxies API requests to the backend automatically.

Note: DW LED features (direct GPIO NeoPixel control) are not available on non-Pi devices. WLED (network-based LED control) works on all platforms — and on the Dune Weaver Firmware the DLC32 drives the strip itself, so LEDs work whatever host you run the backend on.

macOS / Linux

Step 1: Install Prerequisites

macOS:

# Install Homebrew if you don't have it
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# Install Python, Node.js, and Git
brew install [email protected] node git

Git is also included with the Xcode Command Line Tools: xcode-select --install

Linux (Ubuntu/Debian):

# Install Python and Git
sudo apt update && sudo apt install -y python3 python3-venv python3-pip git

# Install Node.js
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt install -y nodejs

Verify everything is installed:

python3 --version   # Should be 3.11+
node --version      # Should be 18+

Step 2: Clone, Install, and Run

git clone https://github.com/tuanchris/dune-weaver --single-branch
cd dune-weaver
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements-nonrpi.txt
npm install
cd frontend && npm install && cd ..
npm run dev

Open http://localhost:5173 in your browser. Press Ctrl + C to stop.

Subsequent Runs

cd dune-weaver
source .venv/bin/activate
npm run dev

Systemd Service (Linux)

If you want Dune Weaver to start automatically on a Linux machine, you can set it up as a systemd service.

Create /etc/systemd/system/dune-weaver.service with the following content:

[Unit]
Description=Dune Weaver Backend
After=network.target

[Service]
ExecStart=/home/pi/dune-weaver/.venv/bin/python /home/pi/dune-weaver/main.py
WorkingDirectory=/home/pi/dune-weaver
Restart=always
User=pi

[Install]
WantedBy=multi-user.target

Then run:

sudo systemctl daemon-reload
sudo systemctl enable dune-weaver
sudo systemctl start dune-weaver

If you see Failed to start dune-weaver.service - Dune Weaver Backend., check if another service is already using the same port. Run dw logs to see the error details.

Windows

Step 1: Install Git

If you already have Git installed, skip to Step 2.

  1. Download the installer from git-scm.com/downloads/win
  2. Run the installer — the default options are fine for most users
  3. When asked about the default editor, you can leave it as Vim or pick something you're familiar with (e.g., Notepad)
  4. When asked about PATH, choose "Git from the command line and also from 3rd-party software" (the default)
  5. Finish the installer — you should now have Git Bash available in your Start menu

Step 2: Install Python

If you already have Python 3.11+ installed, skip to Step 3.

  1. Download the latest Python 3.x installer from python.org/downloads
  2. Important: On the very first screen of the installer, check the box that says "Add python.exe to PATH" before clicking anything else
  3. Click Install Now and wait for it to finish
  4. To verify, open Command Prompt (search "cmd" in the Start menu) and run:
    python --version
    
    You should see something like Python 3.11.x or newer. If you get python is not recognized, restart your computer and try again.

Step 3: Install Node.js

If you already have Node.js 18+ installed, skip to Step 4.

  1. Download the LTS installer from nodejs.org
  2. Run the installer — the default options are fine, just click Next through the wizard
  3. When asked about "Tools for Native Modules", you can skip it (leave the checkbox unchecked)
  4. To verify, open a new Command Prompt window and run:
    node --version
    npm --version
    
    You should see version numbers for both (e.g., v22.x.x and 10.x.x). If not, restart your computer and try again.

Step 4: Clone the Repository

Open Git Bash (search for it in the Start menu) — you'll use Git Bash for all remaining steps.

Navigate to where you want to store the project. For example, to put it on your Desktop:

cd ~/Desktop

Clone the repository:

git clone https://github.com/tuanchris/dune-weaver --single-branch

You should see files downloading. Once it says "done", continue in the same Git Bash window.

Step 5: Set Up the Environment

Run each of the following commands one at a time in Git Bash.

Navigate to the dune-weaver folder:

cd ~/Desktop/dune-weaver

Create a Python virtual environment:

python -m venv .venv

Activate the virtual environment (you should see (.venv) appear at the start of your prompt):

source .venv/Scripts/activate

Install Python dependencies:

pip install -r requirements-nonrpi.txt

This may take a minute. Wait until you see the prompt again before continuing.

Install Node dependencies:

npm install

Install frontend dependencies:

cd frontend && npm install && cd ..

Step 6: Start Dune Weaver

npm run dev

You should see output from both the backend and frontend starting up. Once you see messages about Vite and Uvicorn running, open your browser and go to:

http://localhost:5173

To stop the application, press Ctrl + C in the Git Bash window.

Subsequent Runs

After the first-time setup, you only need to activate the environment and start the app:

  1. Open Git Bash
  2. Navigate to the dune-weaver folder:
    cd ~/Desktop/dune-weaver
    
  3. Activate the virtual environment:
    source .venv/Scripts/activate
    
  4. Start the application:
    npm run dev
    
  5. Open http://localhost:5173 in your browser

Tip: If you get errors about npm or python not being recognized, make sure you completed Steps 1–3 above and restart your computer so the PATH changes take effect.

UART Over Pin Configuration

If using UART over pin, follow the instructions in UART over pin to set up the connection.

Critical requirement: Establish shared ground connection between Raspberry Pi and DLC32 device.