Skip to main content

ALP-CONNEX Interactive Installer

The ALP-CONNEX project ships with an interactive Bash installer that generates all configuration files required for a Docker Compose deployment. The script is located at:

examples/install.sh

Prerequisites

RequirementMinimum Version
Linux (Bash 4+)Ubuntu 20.04 / Debian 11 / RHEL 8
Docker Engine24.0+
Docker ComposeV2 (plugin)

The installer checks for Docker and Compose V2 automatically and will abort with an error if either is missing.


Quick Start

# Download or copy the script to your server
chmod +x install.sh

# Run the installer
./install.sh

Installation Modes

The installer offers three modes on startup:

ModeDescription
1) Full stackDeploy the complete ALP-CONNEX platform from scratch
2) Add connectorAdd an IEC 104 or MQTT connector to an existing stack
3) Edit UUIDsUpdate connector configuration IDs in an existing deployment

Mode 1 — Full Stack Deployment

This mode walks through all configuration steps and generates the deployment files.

Configuration Steps

1. Installation Directory

The target directory where all generated files will be placed.

  • Default: ./alp-connex

2. Host Configuration

The IP address of the host machine. This is used by the browser to reach the API and is auto-detected when possible.

3. Database Configuration

ParameterDefaultDescription
PostgreSQL userpostgresDatabase username
PostgreSQL password(required)Database password
PostgreSQL databasealpconnexDatabase name

Important: PostgreSQL only reads POSTGRES_PASSWORD during initial database creation. If you re-install with a different password, you must first remove the existing volume: docker volume rm <project>_db-data

4. Image Versions

Enter the image tags provided to you for each component:

  • TAG_MANAGEMENT — Management UI + API
  • TAG_IEC104 — IEC 104 Connector
  • TAG_MQTT — MQTT Connector

5. Connector Configuration IDs

UUIDs generated by the Management UI when creating a connector. You can use placeholder UUIDs (00000000-0000-0000-0000-000000000000) during initial setup and update them later via Mode 3 or by editing the .env file.

6. Service Ports

Configure the host port for each service. Internal container ports remain fixed.

ServiceDefault Host PortInternal Port
Frontend (Management UI)42008080
Backend (Management API)80808080
PostgreSQL54325432
Valkey (Redis)63796379
IEC 104 Connector24042404
Mosquitto (if included)18831883

7. MQTT Broker

Choose between:

  • Local Mosquitto — Deploys Eclipse Mosquitto 2 as part of the stack
  • External broker — Connects to a broker on another machine (you provide hostname/IP and port)

8. Demo / Seed Data

Optionally enable SEED_DATA=true in the backend to have it ingest demo connectors, mappings, and signals on startup.

9. OAuth / Microsoft Entra ID (optional)

Enable OAuth authentication by providing three values from your Azure App Registrations:

InputDescription
Tenant IDAzure AD Directory (tenant) ID
API Client IDBackend app registration client ID
SPA Client IDFrontend app registration client ID

All other OAuth values (audience, scopes, authority, redirect URI) are derived automatically.

See deployment_oAuth.md for detailed Entra ID setup instructions.

Generated Files

FileDescription
.envAll configuration variables
docker-compose.yamlComplete Docker Compose stack definition
mosquitto/config/mosquitto.confMosquitto configuration (only if local broker is selected)

Post-Generation

After generating the files, the installer offers to:

  1. Login to the container registry (registry.alpscale.io)
  2. Start the stack with docker compose up -d and follow logs

Mode 2 — Add Connector

Add an additional IEC 104 or MQTT connector to an existing deployment without regenerating the entire stack.

Workflow

  1. Provide the path to the existing installation (must contain docker-compose.yaml)
  2. Select the connector type (IEC 104 or MQTT)
  3. Configure the new connector:

IEC 104:

ParameterDefault
Service nameiec104-server-2
Image tag(required)
Connector ID (UUID)(required)
Host port2404

MQTT:

ParameterDefault
Service namemqtt-client-2
Image tag(required)
Connector ID (UUID)(required)
Broker hostnamemosquitto
Broker port1883
  1. The new service block is injected into the existing docker-compose.yaml
  2. Optionally restart the stack to apply changes

Note: If an MQTT connector uses mosquitto as its broker and a Mosquitto service exists in the compose file, a depends_on relationship is automatically added.


Mode 3 — Edit Connector UUIDs

Update the configuration IDs of existing connectors without modifying any other settings.

Workflow

  1. Provide the path to the existing installation
  2. The script scans docker-compose.yaml for all services using --id
  3. All discovered connectors are listed with their current UUIDs
  4. Enter new UUIDs for each connector (press Enter to keep the current value)
  5. Changes are applied to the .env file (for variable references) or directly in docker-compose.yaml (for hardcoded UUIDs)
  6. Optionally restart the stack

Example Output

── Discovered Connectors ──

1) iec104-server
Current UUID: 00000000-0000-0000-0000-000000000000
2) mqtt-client
Current UUID: 00000000-0000-0000-0000-000000000000

── Enter new UUIDs ──
[INFO] Enter the UUID for each connector. Press Enter to keep the current value.

1) iec104-server [00000000-0000-0000-0000-000000000000]: a1b2c3d4-...
2) mqtt-client [00000000-0000-0000-0000-000000000000]: e5f6a7b8-...

Generated .env Reference

VariableExampleDescription
HOST_IP192.168.1.100Host IP for browser access
POSTGRES_USERpostgresDatabase user
POSTGRES_PASSWORDsecretDatabase password
POSTGRES_DBalpconnexDatabase name
TAG_MANAGEMENT1.0.0Management image tag
TAG_IEC1040.3.0IEC 104 connector image tag
TAG_MQTT0.1.0MQTT connector image tag
IEC104_CONFIG_IDuuidIEC 104 connector UUID
MQTT_CONFIG_IDuuidMQTT connector UUID
FRONTEND_PORT4200Frontend host port
API_PORT8080Backend API host port
POSTGRES_PORT5432PostgreSQL host port
VALKEY_PORT6379Valkey host port
IEC104_PORT2404IEC 104 host port
MQTT_BROKER_HOSTmosquittoMQTT broker hostname
MQTT_BROKER_PORT1883MQTT broker port
MOSQUITTO_PORT1883Mosquitto host port (local only)
SEED_DATAtrueEnable demo data seeding

OAuth variables (when enabled): AZURE_TENANT_ID, AZURE_API_CLIENT_ID, AZURE_SPA_CLIENT_ID, AZUREAD_INSTANCE, AZUREAD_AUDIENCE, AZUREAD_SCOPES, SCALAR_REDIRECT_URI, MSAL_AUTHORITY, MSAL_SCOPE


Troubleshooting

ProblemCauseSolution
password authentication failed for user "postgres"The db-data volume was initialized with a different passwordRun docker compose down -v to remove volumes, then docker compose up -d
docker-compose.yaml not found (Mode 2/3)Wrong installation pathProvide the correct path containing docker-compose.yaml
Docker Compose V2 is not availableDocker Compose plugin not installedInstall with sudo apt install docker-compose-plugin or update Docker
Port already in useAnother service occupies the portChoose a different host port during configuration
Cannot pull imagesNot logged into registryRun docker login registry.alpscale.io