Aniston NexusDocs
Open Aniston Nexus

Deployment

Run Aniston Nexus locally with Docker or on a production server, upgrade it and install the solution packages.

Local (Docker)

Requirements: Docker, JDK 25, Maven 3.9, ~25 GB disk. Docker images copy prebuilt files, so build the sources first:

mvn install -DskipTests -Dlicense.skip=true -Dpkg.package.phase=none -pl application -am   # backend + UI
mvn -f nexus-services/pom.xml package -DskipTests                                         # companion service
docker compose -f docker-local/docker-compose.yml up -d --build
ServicePortNotes
frontend (nginx)4200UI, /docs/, proxies /api/ to the backend and /api/hub/, /api/water/ to nexus-services
backend8080, MQTT 1883Platform
nexus-services8090Catalogue, workspace, Water/BMS services (features off until enabled)
postgres5433Database nexus

Optional: -f docker-local/docker-compose.kafka.yml (Kafka), --profile sim (plant simulator).

The first start creates the schema and demo data. Later starts keep all data in the named volumes nexus_postgres-data, nexus_backend-data, nexus_backend-logs, nexus_services-data. Never use down -v or prune volumes on an installation whose data you need.

Production (one server)

deploy/production/ runs the same images behind a TLS proxy:

cp deploy/production/.env.example deploy/production/.env   # fill in domain, passwords, secrets
deploy/production/deploy.sh check                          # prerequisites, DNS, ports, secrets
deploy/production/deploy.sh                                # backup, build/pull, start, post-check
  • Public origin: NEXUS_DOMAIN in .env. All links (docs, catalogue, API) are same-origin paths, so the UI works under any domain without rebuilding.
  • TLS: deploy/production/tls-proxy/ (Let's Encrypt or your certificates).
  • Health: the backend answers /api/system/info; nexus-services /actuator/health and /api/hub/info; deploy.sh post-check checks all of them through the proxy.
  • Secrets: only in .env (mode 600) or the CI environment; never in the repository. deploy.sh check refuses empty, demo, placeholder and short secrets.
  • No demo data: a production install has no demo tenant or demo users (NEXUS_LOAD_DEMO=false). The system administrator is always created; deploy.sh replaces its default password after the first install and writes the new one to sysadmin-initial-password next to .env (mode 600).
  • Ports: only 80, 443 and 8883 (MQTTS) are published; PostgreSQL, 8080, 1883, 8090 stay inside Docker.
  • Optional services: Kafka overlay; LoRa bridge, notifications, billing, cloud bridge … in nexus-services (environment flags, all off by default).

Automated deploys to AWS EC2: .github/workflows/deploy-ec2.yml and deploy/ec2/README.md.

Upgrades

  1. deploy/production/backup.sh (deploy.sh does it too).
  2. Deploy the new release. The backend migrates its schema on start; nexus-services migrates nexus_water with Flyway.
  3. Install new package versions: python3 -I Database/tools/nexus_content.py install … (updates in place) and updates offered on the IoT Hub page.
  4. Check: log in, open the main dashboards, deploy.sh post-check.

Never replace the platform with an upstream 4.4 or later release: from 4.4 the upstream code is not Apache-2.0.

Clean installation with the packages

docker compose -f docker-local/docker-compose.yml up -d --build
python3 -I Database/tools/nexus_content.py install water bms smartcampus --with-deps \
  --url http://localhost:8080 --user tenant@nexus.anistonav.com --password tenant