HUB
Sign inSign up

sagardocker890/neo-local

By sagardocker890

•Updated 5 days ago

ComposeImage
0

2.4K

sagardocker890/neo-local repository overview

⁠neo-local: ESP RainMaker Neo on your own computer

Image tags in this repository: emulator-*, glue-*, runner-*, dashboard-*, seeder-* (each for linux/arm64 and linux/amd64) and compose-latest (the stack definition). Use them through the commands below, not one by one.

The whole ESP RainMaker Neo backend running locally in Docker, on the AWS Emulator: admin dashboard, APIs, MQTT for devices and a local mail inbox. Docker is the only requirement: no source code, AWS account, Go or Node. Runs on Apple Silicon and Intel (macOS, Linux, Windows with Docker Desktop).

For local testing only. The stack runs with relaxed security; use test accounts and test devices, never real users.

⁠TL;DR

Run Neo locally (one command, Docker only):

docker compose -f oci://docker.io/sagardocker890/neo-local:compose-latest up -d

Open http://localhost:5174⁠, sign in as [email protected] with Email me a code, and read the code at http://localhost:8025⁠.

ESP32 + phone on the same Wi-Fi (once, ~15 min):

  1. Free domain: sign up at dynv6.com⁠, create a zone (e.g. you.dynv6.net), set its IPv4 and two A records (*, *.s3.us-east-1) to your computer's Wi-Fi IP.
  2. RSA certificate (RSA, not ECDSA: the ESP32 needs it):
    curl https://get.acme.sh | sh && export DYNV6_TOKEN=<dynv6 token>
    ~/.acme.sh/acme.sh --issue --server letsencrypt --dns dns_dynv6 --keylength 2048 -d you.dynv6.net -d '*.you.dynv6.net'
    mkdir -p $HOME/neo-le && ~/.acme.sh/acme.sh --install-cert -d you.dynv6.net --fullchain-file $HOME/neo-le/fullchain.pem --key-file $HOME/neo-le/privkey.pem
    
  3. Start in LAN mode:
    NEO_LAN_HOST=you.dynv6.net NEO_LAN_IP=<Wi-Fi IP> NEO_LAN_CERT_DIR=$HOME/neo-le \
    docker compose -f oci://docker.io/sagardocker890/neo-local:compose-latest up -d
    
  4. Dashboard → Generate nodes → flash the node's fctry at 0x3E0000 → add the device in the RainMaker Home app (private deployment QR at http://<Wi-Fi IP>:5174/__local/ca).

Details for every step follow below.

⁠1. Start it

No files needed; Docker pulls the stack definition and the images (~800 MB) from Docker Hub:

docker compose -f oci://docker.io/sagardocker890/neo-local:compose-latest up -d

The first start takes about 3 minutes (download, then the backend is set up). When it finishes:

WhatAddress
Admin dashboardhttp://localhost:5174⁠
Mail inbox (all sign-up and sign-in codes)http://localhost:8025⁠
APIhttp://localhost:8088⁠ (TLS: https://localhost⁠)

Prefer a file? Save the stack definition once with docker compose -f oci://docker.io/sagardocker890/neo-local:compose-latest config > compose.yml, then run docker compose up -d in that folder. Every command below works the same with -f compose.yml instead of the oci:// address.

⁠2. Sign in to the dashboard

An admin [email protected] is created automatically. On the dashboard, enter that address, click Email me a code, and copy the code from the mail inbox. There is no password; you can set one later under Account settings → Password.

# your own admin address on the first start
[email protected] docker compose -f oci://docker.io/sagardocker890/neo-local:compose-latest up -d

# add more admins at any time
docker compose -f oci://docker.io/sagardocker890/neo-local:compose-latest run --rm seeder admin [email protected]

App users sign up normally in the RainMaker Home app or the web app; their codes also land in the mail inbox.

⁠3. ESP32 and phone on the same Wi-Fi (LAN mode)

A stock ESP32 running RainMaker Neo firmware and the stock RainMaker Home app connect only to a real domain with a publicly trusted certificate. You give the stack a free domain pointing at your computer's Wi-Fi address plus a Let's Encrypt certificate; nothing changes in the firmware, the app or your router.

You need: a domain you control (a free dynv6⁠ zone works), and the computer, ESP32 and phone on the same Wi-Fi. The examples use neolocal123.dynv6.net and Wi-Fi IP 192.168.71.159: use your own.

⁠3.1 Point the domain at your computer (once)
  1. Find your Wi-Fi IP: macOS ipconfig getifaddr en0, Linux hostname -I, Windows ipconfig.
  2. Sign up at dynv6.com, create a zone (e.g. neolocal123.dynv6.net) and set its IPv4 address to that IP.
  3. In the zone's Records tab add two A records with the same IP: name * and name *.s3.us-east-1.
  4. Create an HTTP token under Keys. Treat it as a password: whoever has it can take over your domain.

Check from any computer: nslookup neolocal123.dynv6.net 1.1.1.1 must print your Wi-Fi IP.

⁠3.2 Get the certificate (once; RSA, not ECDSA)

Use RSA 2048. The stock ESP32 firmware leaves out the P-384 curve that Let's Encrypt's ECDSA chain needs, and fails with mbedtls_ssl_handshake returned -0x3A00. The RSA chain ends at ISRG Root X1, which the firmware trusts.

curl https://get.acme.sh | sh                     # installs acme.sh (once)
export DYNV6_TOKEN=<your dynv6 token>

~/.acme.sh/acme.sh --issue --server letsencrypt --dns dns_dynv6 --keylength 2048 \
  -d neolocal123.dynv6.net -d '*.neolocal123.dynv6.net'

mkdir -p ~/neo-le
~/.acme.sh/acme.sh --install-cert -d neolocal123.dynv6.net \
  --fullchain-file ~/neo-le/fullchain.pem --key-file ~/neo-le/privkey.pem

Certificates last 90 days; acme.sh renews them automatically. After a renewal, run the start command of 3.3 again so the stack loads the new one.

⁠3.3 Start in LAN mode
NEO_LAN_HOST=neolocal123.dynv6.net NEO_LAN_IP=192.168.71.159 NEO_LAN_CERT_DIR=$HOME/neo-le \
docker compose -f oci://docker.io/sagardocker890/neo-local:compose-latest up -d

Or put the three settings in a file neo.env and add --env-file neo.env to every command:

NEO_LAN_HOST=neolocal123.dynv6.net
NEO_LAN_IP=192.168.71.159
NEO_LAN_CERT_DIR=/Users/me/neo-le

The stack switches every address (API, MQTT, device credentials, file uploads) to your domain in about a minute. Users and devices already created are kept.

WhatLAN address
API, phone apphttps://neolocal123.dynv6.net⁠
ESP32 MQTTneolocal123.dynv6.net, port 443 (or 8883)
Dashboard (other devices)http://neolocal123.dynv6.net:5174⁠
Phone setup page with the app's QR codehttp://192.168.71.159:5174/__local/ca⁠

Check from your phone's browser (same Wi-Fi): https://neolocal123.dynv6.net/__local/ca opens with a padlock and no warning.

⁠3.4 Add an ESP32
  1. With LAN mode on, reload the dashboard, then Generate nodes → Download → Register nodes. Generate only in LAN mode: the MQTT address is written into each node's data, so a node generated in localhost mode keeps trying 127.0.0.1.
  2. Flash only the node's factory partition from the zip (fctry is at 0x3E0000 in the light, switch and fan examples; the app does not need reflashing):
    esptool.py -p <serial port> write_flash 0x3E0000 <zip>/mfg/bin/<node>.bin
    
  3. Reset the board. Its log shows MQTT endpoint: neolocal123.dynv6.net:443 and then connects.
  4. In the RainMaker Home app: private deployment → scan the QR code from the phone setup page → sign up (code in the mail inbox) → add the device.
⁠3.5 Back to localhost

Start once without the three settings: docker compose -f oci://docker.io/sagardocker890/neo-local:compose-latest up -d.

⁠4. Stop, restart and data

docker compose -f oci://docker.io/sagardocker890/neo-local:compose-latest down     # stop

The AWS Emulator keeps all data in memory. After down, a Docker restart or a reboot, users, devices and files are gone: the next up sets up a fresh, empty backend and recreates your admins. Re-register ESP32 boards from their zip (no reflash) and add them in the app again.

⁠5. Troubleshooting

SymptomCause and fix
ESP32: mbedtls_ssl_handshake returned -0x3A00ECDSA certificate. Reissue with --keylength 2048 (3.2), start again
ESP32: MQTT endpoint: 127.0.0.1:443, connection resetNode generated in localhost mode. Generate a new node in LAN mode and flash its fctry
ESP32: -0x7280 or -0x0050; phone can't connectA VPN or proxy on the computer is cutting port 443. Turn it off, or exclude your Wi-Fi network
Domain resolves to 198.18.x.x on the computerVPN fake DNS: same fix; on the computer use http://<Wi-Fi IP>:5174
Nothing connects after a network changeThe Wi-Fi IP changed: update the dynv6 records and NEO_LAN_IP, start again. A DHCP reservation on the router avoids this
Phone on mobile data can't connectExpected: the domain points to a private Wi-Fi address. Stay on the same Wi-Fi
ports are not availableAnother program uses one of the ports below: stop it

Ports used: 443, 5174, 8025, 8088, 8443, 8883, 8884–8890, 9080, 9297 (on 127.0.0.1, and on the Wi-Fi IP for 443, 5174, 8088 and 8883 in LAN mode).

⁠6. What is inside

ImageContentsLicence
neo-local:emulator-*AWS Emulator (third-party notices in /opt/aws-emulator/THIRD_PARTY_LICENSES)CC0-1.0
neo-local:runner-*, neo-local:dashboard-*ESP RainMaker Neo Lambdas and admin dashboard (/licenses/)Apache-2.0
neo-local:glue-*, neo-local:seeder-*neo-local: the AWS pieces the emulator lacks, and the setup jobneo-local
axllent/mailpitLocal mail inbox (public image)MIT

Every computer generates its own certificates, keys and IDs on first start; none are in the images.

Tag summary
Recent tags
Content type
Image
Digest
sha256:3475eece6…
Size
10.2 MB
Last updated
5 days ago
docker pull sagardocker890/neo-local:glue-latest