Skip to content

Self Hosting and Updates

exzile edited this page May 20, 2026 · 2 revisions

Self Hosting and Updates

Cindr3D builds to static files and can be hosted by any static web server that falls back to index.html for unknown routes.

Cindr3D home overview

Hosting Options

Option Best for
Local dev server Development and testing
Static web server Simple LAN hosting
Orange Pi / small Linux board Printer-adjacent workshop hosting
GitHub release asset updater Device installs that should update without rebuilding locally

Static Build

npm run build

Serve the resulting dist/ directory.

Nginx Example

server {
    listen 80;
    server_name _;

    root /var/www/cindr3d;
    index index.html;

    location / {
        try_files $uri $uri/ /index.html;
    }

    location /assets/ {
        try_files $uri =404;
        access_log off;
        expires 30d;
        add_header Cache-Control "public, immutable";
    }
}

Orange Pi Hosting

Cindr3D can be served from an Orange Pi 3 LTS or similar small Linux board. For small SD cards, build on a development machine and copy only dist/ to the device.

Recommended base packages:

sudo apt update
sudo apt full-upgrade -y
sudo apt install -y nginx git curl ufw fail2ban rsync ca-certificates
sudo systemctl enable --now nginx

Firewall:

sudo ufw allow OpenSSH
sudo ufw allow 'Nginx Full'
sudo ufw enable

Deploy:

npm run build
rsync -av --delete dist/ user@device:/var/www/cindr3d/

Optional Updater Service

The repository includes an optional updater service for self-hosted Orange Pi deployments:

scripts/cindr3d-updater.mjs
scripts/install-orangepi-updater.sh

The service exposes:

Endpoint Purpose
GET /api/update/status Check installed version against the latest GitHub release
POST /api/update/apply Install the latest release asset

Install from a checked-out repo on the Pi:

sudo ./scripts/install-orangepi-updater.sh

Release Asset Layout

For device updates, publish a GitHub release asset named like:

cindr3d-dist.zip

Accepted archive layouts:

index.html
assets/

or:

dist/index.html
dist/assets/

Clone this wiki locally