Self-Hosting

Upgrading from v1

NetIgnite v2 is a rewrite of the server and the agents. Your v1 data is imported once into the new database; the v1 database stays untouched. Agents have to be set up again: v1 agents can't connect to a v2 server, and ESP32 boards need the v2 firmware.

Using the latest image? Since 2.0.0, ghcr.io/netignite-project/server:latest is v2. A v1 server that pulls it, by hand or with an auto-updater such as Watchtower, starts v2 with an empty database next to the v1 one: users, agents and devices seem to be gone, but they're still in data/db.sqlite, and the server log says Found a NetIgnite v1 database … that hasn't been imported. Continue at Try the import. To stay on v1 for now, use the image ghcr.io/netignite-project/server:0.1.3.
v1 (0.1.x)v2
Databasedata/db.sqlitedata/netignite.sqlite (the import reads db.sqlite)
First adminPassword in data/initial_admin_credentialsPassword link in config/initial_admin_password_reset_token.txt
Settingsconfig/config.jsonNETIGNITE_* environment variables (NETIGNITE_APP_URL is required)
Agent connection/api/agent-control-service, ID and secret from the dashboard/ws/agent, credential generated by the agent at enrollment
ESP32 setupconfig.h, built with PlatformIOWeb installer in the dashboard, settings in flash
Port, image, volumes18232, ghcr.io/netignite-project/server, /opt/netignite/data and /opt/netignite/configunchanged

What is migrated

v1In v2
UsersImported with their username, password and role. They get a placeholder email address <username>@imported.netignite.invalid. Passwords are converted to the new hash format at the first login.
The v1 adminMerged into the v2 admin. If nobody has set the v2 admin password yet (the password link is unused), it takes over the v1 password and the link stops working.
AgentsImported with name and description, but not set up (status Not set up): v1 secrets can't be used in v2. Microcontroller agents become ESP32 agents, Server agents become Linux agents.
DevicesImported with name, type, description, MAC address, Wake-on-LAN port and agent. Their status check is MAC (IPv6 link-local), the check v1 used. Devices without an agent get no status check.
FavoritesImported.

Not migrated: v1 agent secrets, v1 logins (users log in again), config/config.json (set NETIGNITE_LOG_LEVEL instead) and the v1 admin password file. Devices with an invalid MAC address are skipped and listed in the import's output.

Back up

Stop the v1 server and copy its data and config:

Terminal
docker compose down
sudo cp -a /opt/netignite /opt/netignite-v1-backup

Start v2 next to the v1 data

Change the image to v2 and add NETIGNITE_APP_URL with the address users open the dashboard at. Keep the volumes:

docker-compose.yml
services:
  netignite-server:
    image: ghcr.io/netignite-project/server:latest
    container_name: netignite-server
    restart: unless-stopped
    ports:
      - "18232:18232"
    environment:
      NETIGNITE_APP_URL: https://netignite.example.com
    volumes:
      - /opt/netignite/data:/opt/netignite/data
      - /opt/netignite/config:/opt/netignite/config
Terminal
docker compose pull
docker compose up -d

v2 creates its own database data/netignite.sqlite next to the v1 data/db.sqlite, and a new admin with a password link. Don't use the link yet if you want the v1 admin password to carry over.

If you use a reverse proxy, check that it forwards WebSockets on /ws/agent and /ws/console (v1 only needed /api/agent-control-service). See HTTPS & Reverse Proxy.

Try the import

A dry run imports everything inside a transaction and rolls it back, so nothing changes:

Terminal
docker exec netignite-server bun /opt/netignite/app/.output/import-v1.mjs \
  --from /opt/netignite/data/db.sqlite --dry-run
Output
Dry run — nothing was changed.

Users imported: 2
Users merged:   admin
Agents imported: 2
Devices imported: 5
Favorites imported: 3
Imported users got a placeholder email (…@imported.netignite.invalid) and are asked to change it after logging in.

Users whose username already exists in v2 (other than admin) are skipped: skipped user alice: username already exists in v2 (use --merge-users to merge them). With --merge-users, such a v1 user is merged into the existing v2 user instead; the v2 user takes over the v1 password only if nobody has logged in to it in v2 yet.

Import

Terminal
docker exec netignite-server bun /opt/netignite/app/.output/import-v1.mjs \
  --from /opt/netignite/data/db.sqlite

The import uses the container's NETIGNITE_* settings and writes to the running server's database. Running it again is safe: records that were already imported are skipped. When the admin takes over the v1 password, the import deletes config/initial_admin_password_reset_token.txt.

Running the server from source? Run the import from the repository root: bun scripts/import-v1.ts --from <path to db.sqlite> [--dry-run] [--merge-users].

Log in

Log in as admin with the v1 password (or, if you set a v2 password with the link before the import, with that one). Every user gets the welcome page at the first login; ask your users to enter their real email address under Settings → General.

Set up the agents again

Open Agents. The imported agents show Not set up; their devices still point at them.

  • ESP32 boards need the v2 firmware once over USB: open the agent's Install tab and follow the web installer. v2 uses a new partition table with two firmware slots, so it can't be installed over the network on a v1 board. After that, updates come over the network. Your old config.h isn't needed anymore: the installer sets the server and the Wi-Fi.
  • Server agents (your own v1 agents) don't work with v2: the protocol changed. Install the Linux agent on the machine instead (turn on Wake-on-LAN mode to wake other devices), or update your agent to protocol v2.

As each agent comes online, its devices can be woken again.

Check the devices

The imported devices keep the v1 status check, which doesn't work for most Windows and many Linux machines. Open each device and choose a better status check, for example its IPv4 address. While you're there, consider sharing, shutdown through the Linux agent or over SSH.

Going back

The v1 database data/db.sqlite is never modified. To go back, run the v1 image again (for example ghcr.io/netignite-project/server:0.1.3) with the same volumes. Agents you set up for v2 don't work with v1: flash the v1 firmware onto ESP32 boards again.

Once you're happy with v2, you can delete data/db.sqlite, data/initial_admin_credentials and config/config.json.