OpenAMT
Stack
OpenAMT Cloud Toolkit
Configuration
TypeComposelinuxPOSTGRES_USER=''POSTGRES_PASSWORD=''MPS_USER=''MPS_PASSWORD=''MPS_COMMON_NAME=''MPS_SECRET=''VAULT_SECRET=''Notes
Services
webui
Configuration
Imageintel/oact-webui:v2.1.0RPS_SERVER=https://${MPS_COMMON_NAME}/rpsMPS_SERVER=https://${MPS_COMMON_NAME}/mpsVAULT_SERVER=https://${MPS_COMMON_NAME}/vaultImage details
rps
Configuration
Imageintel/oact-rps:v2.1.0RPS_WEBSOCKETTLS=trueRPSWEBPORT=8081RPSWEBSOCKETPORT=8080RPS_LOG_LEVEL=sillyRPS_DELAY_TIMER=12RPS_MQTT_ADDRESS=RPS_MPS_SERVER=http://mps:3000RPS_SECRETS_PATH=secret/data/RPS_VAULT_TOKEN=${VAULT_SECRET}RPS_VAULT_ADDRESS=http://vault:8200RPS_CONNECTION_STRING=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/rpsdb?sslmode=no-verifyImage details
mps
Configuration
Imageintel/oact-mps:v2.1.04433:4433/mps-microservice/private : private-volumeMPS_GENERATE_CERTS=trueMPS_COMMON_NAME=${MPS_COMMON_NAME}MPSPORT=4433MPSWEBPORT=3000MPS_DEBUG=trueMPS_WEB_ADMIN_USER=${MPS_USER}MPS_WEB_ADMIN_PASSWORD=${MPS_PASSWORD}MPS_HTTPS=trueMPS_TLS_OFFLOAD=falseMPS_LOG_LEVEL=sillyMPS_JWT_EXPIRATION=1440MPS_JWT_SECRET=${MPS_SECRET}MPS_JWT_ISSUER=9EmRJTbIiIb4bIeSsmgcWIjrR6HyETqcMPS_MQTT_ADDRESS=MPS_INSTANCE_NAME={{.Task.Name}}MPS_SECRETS_PATH=secret/data/MPS_VAULT_TOKEN=${VAULT_SECRET}MPS_VAULT_ADDRESS=http://vault:8200MPS_CONNECTION_STRING=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/mpsdb?sslmode=no-verifyalwaysImage details
mpsrouter
Configuration
Imageintel/oact-mpsrouter:v2.0.0MPS_CONNECTION_STRING=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/mpsdb?sslmode=disablePORT=8003MPS_PORT=3000Image details
db
Configuration
Imageportainer/open-amt-cloud-toolkit-postgres:v2.1.0-c ssl=on -c ssl_cert_file=/var/lib/postgresql/server.crt -c ssl_key_file=/var/lib/postgresql/server.key5432:5432POSTGRES_DB=rpsdbPOSTGRES_USER=${POSTGRES_USER}POSTGRES_PASSWORD=${POSTGRES_PASSWORD}alwaysImage details
vault
Configuration
Imagevault:latest8200:8200VAULT_DEV_ROOT_TOKEN_ID=${VAULT_SECRET}VAULT_DEV_LISTEN_ADDRESS=0.0.0.0:8200Image details
kong
Configuration
Imagekong:2.6kong,start,--vv443:84438001:8001KONG_DATABASE=offKONG_CASSANDRA_CONTACT_POINTS=kong-databaseKONG_ADMIN_LISTEN=0.0.0.0:8001KONG_ADMIN_LISTEN_SSL=0.0.0.0:8444KONG_NGINX_DAEMON=offKONG_DECLARATIVE_CONFIG_STRING={"_format_version":"2.1","_transform":true,"services":[{"name":"mps-rest","host":"mpsrouter","port":8003,"tags":["mps"],"routes":[{"name":"mps-login-route","strip_path":true,"paths":["/mps/login"]},{"name":"mps-relay-route","strip_path":true,"paths":["/mps/ws"]},{"name":"mps-route","strip_path":true,"paths":["/mps"]}]},{"name":"rps-rest","host":"rps","port":8081,"tags":["rps"],"routes":[{"name":"rps-route","strip_path":true,"paths":["/rps"]}]},{"name":"rps-ws","host":"rps","port":8080,"tags":["rps"],"routes":[{"name":"rps-activate-route","strip_path":true,"paths":["/activate"]}]},{"name":"vault-api","host":"vault","port":8200,"tags":["vault"],"routes":[{"name":"vault-route","strip_path":true,"paths":["/vault"]}]},{"name":"web","host":"webui","port":80,"tags":["web"],"routes":[{"name":"web-route","paths":["/"]}]}],"plugins":[{"name":"cors"},{"name":"jwt","route":"rps-route","config":{"claims_to_verify":["exp"]}},{"name":"jwt","route":"mps-route","config":{"claims_to_verify":["exp"]}}],"consumers":[{"username":"admin"}],"jwt_secrets":[{"consumer":"admin","key":"9EmRJTbIiIb4bIeSsmgcWIjrR6HyETqc","secret":${MPS_SECRET}}]}KONG_PROXY_ERROR_LOG=/dev/stderrKONG_PROXY_ACCESS_LOG=/dev/stdoutKONG_ADMIN_ACCESS_LOG=/dev/stdoutKONG_ADMIN_ERROR_LOG=/dev/stderrKONG_DNS_ORDER=LAST,A,CNAMEKONG_UPSTREAM_KEEPALIVE_POOL_SIZE=0alwaysImage details
mosquitto
Configuration
Imageeclipse-mosquitto8883:8883Image details
Standalone Install
Select an install method, to see config/commands for deploying OpenAMT
Install on Portainer
Import all app templates into your Portainer instance, for easy 1-click deploys
- Ensure both Docker and Portainer are installed, and up-to-date
- Log into your Portainer web UI
- Under Settings → App Templates, paste the below URL
- Head to Home → App Templates, and the list of apps will show up
- Select OpenAMT, fill in any config options, and hit Deploy
Template Import URL
https://raw.githubusercontent.com/Lissy93/portainer-templates/main/templates.json
Show Me
Original stackfile
The compose file this template deploys, straight from its repo:
# version: '3.3'
services:
webui:
image: intel/oact-webui:v2.1.0
networks:
- openamtnetwork
environment:
RPS_SERVER: https://${MPS_COMMON_NAME}/rps
MPS_SERVER: https://${MPS_COMMON_NAME}/mps
VAULT_SERVER: https://${MPS_COMMON_NAME}/vault
rps:
image: intel/oact-rps:v2.1.0
networks:
- openamtnetwork
healthcheck:
interval: 12s
timeout: 12s
retries: 3
test: ["CMD", "node", "dist/Healthcheck.js"]
environment:
RPS_WEBSOCKETTLS: "true"
RPSWEBPORT: 8081
RPSWEBSOCKETPORT: 8080
RPS_LOG_LEVEL: silly
RPS_DELAY_TIMER: 12
RPS_MQTT_ADDRESS:
RPS_MPS_SERVER: http://mps:3000
RPS_SECRETS_PATH: secret/data/
RPS_VAULT_TOKEN: ${VAULT_SECRET}
RPS_VAULT_ADDRESS: http://vault:8200
RPS_CONNECTION_STRING: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/rpsdb?sslmode=no-verify
mps:
image: intel/oact-mps:v2.1.0
networks:
- openamtnetwork
restart: always
ports:
- "4433:4433"
healthcheck:
interval: 12s
timeout: 12s
retries: 3
test: ["CMD", "node", "dist/Healthcheck.js"]
environment:
MPS_GENERATE_CERTS: "true"
MPS_COMMON_NAME: ${MPS_COMMON_NAME}
MPSPORT: 4433
MPSWEBPORT: 3000
MPS_DEBUG: "true"
MPS_WEB_ADMIN_USER: ${MPS_USER}
MPS_WEB_ADMIN_PASSWORD: ${MPS_PASSWORD}
MPS_HTTPS: "true"
MPS_TLS_OFFLOAD: "false"
MPS_LOG_LEVEL: silly
MPS_JWT_EXPIRATION: 1440
MPS_JWT_SECRET: ${MPS_SECRET}
MPS_JWT_ISSUER: 9EmRJTbIiIb4bIeSsmgcWIjrR6HyETqc
MPS_MQTT_ADDRESS:
MPS_INSTANCE_NAME: '{{.Task.Name}}'
MPS_SECRETS_PATH: secret/data/
MPS_VAULT_TOKEN: ${VAULT_SECRET}
MPS_VAULT_ADDRESS: http://vault:8200
MPS_CONNECTION_STRING: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/mpsdb?sslmode=no-verify
volumes:
- private-volume:/mps-microservice/private
mpsrouter:
image: intel/oact-mpsrouter:v2.0.0
environment:
MPS_CONNECTION_STRING: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/mpsdb?sslmode=disable
PORT: 8003
MPS_PORT: 3000
healthcheck:
interval: 12s
timeout: 12s
retries: 3
test: ["CMD", "/app","--health"]
networks:
- openamtnetwork
db:
image: portainer/open-amt-cloud-toolkit-postgres:v2.1.0
command: -c ssl=on -c ssl_cert_file=/var/lib/postgresql/server.crt -c ssl_key_file=/var/lib/postgresql/server.key
networks:
- openamtnetwork
restart: always
healthcheck:
test: ["CMD-SHELL", "pg_isready -U rpsdb"]
interval: 2s
timeout: 3s
retries: 30
environment:
POSTGRES_DB: rpsdb
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
ports:
- "5432:5432"
vault:
image: vault:latest
networks:
- openamtnetwork
ports:
- "8200:8200"
environment:
VAULT_DEV_ROOT_TOKEN_ID: ${VAULT_SECRET}
VAULT_DEV_LISTEN_ADDRESS: 0.0.0.0:8200
cap_add:
- IPC_LOCK
kong:
image: kong:2.6
healthcheck:
test:
- CMD
- nc
- -z
- localhost
- "8443"
retries: 10
command:
- "kong"
- "start"
- "--vv"
environment:
- KONG_DATABASE=off
- KONG_CASSANDRA_CONTACT_POINTS=kong-database
- KONG_ADMIN_LISTEN=0.0.0.0:8001
- KONG_ADMIN_LISTEN_SSL=0.0.0.0:8444
- KONG_NGINX_DAEMON=off
- KONG_DECLARATIVE_CONFIG_STRING={"_format_version":"2.1","_transform":true,"services":[{"name":"mps-rest","host":"mpsrouter","port":8003,"tags":["mps"],"routes":[{"name":"mps-login-route","strip_path":true,"paths":["/mps/login"]},{"name":"mps-relay-route","strip_path":true,"paths":["/mps/ws"]},{"name":"mps-route","strip_path":true,"paths":["/mps"]}]},{"name":"rps-rest","host":"rps","port":8081,"tags":["rps"],"routes":[{"name":"rps-route","strip_path":true,"paths":["/rps"]}]},{"name":"rps-ws","host":"rps","port":8080,"tags":["rps"],"routes":[{"name":"rps-activate-route","strip_path":true,"paths":["/activate"]}]},{"name":"vault-api","host":"vault","port":8200,"tags":["vault"],"routes":[{"name":"vault-route","strip_path":true,"paths":["/vault"]}]},{"name":"web","host":"webui","port":80,"tags":["web"],"routes":[{"name":"web-route","paths":["/"]}]}],"plugins":[{"name":"cors"},{"name":"jwt","route":"rps-route","config":{"claims_to_verify":["exp"]}},{"name":"jwt","route":"mps-route","config":{"claims_to_verify":["exp"]}}],"consumers":[{"username":"admin"}],"jwt_secrets":[{"consumer":"admin","key":"9EmRJTbIiIb4bIeSsmgcWIjrR6HyETqc","secret":${MPS_SECRET}}]}
- KONG_PROXY_ERROR_LOG=/dev/stderr
- KONG_PROXY_ACCESS_LOG=/dev/stdout
- KONG_ADMIN_ACCESS_LOG=/dev/stdout
- KONG_ADMIN_ERROR_LOG=/dev/stderr
- KONG_DNS_ORDER=LAST,A,CNAME
- KONG_UPSTREAM_KEEPALIVE_POOL_SIZE=0
networks:
- openamtnetwork
ports:
- "443:8443"
- "8001:8001"
restart: always
mosquitto:
image: eclipse-mosquitto
ports:
- "8883:8883"
networks:
- openamtnetwork
volumes:
app-volume:
private-volume:
networks:
openamtnetwork:
driver: "bridge"Or deploy it directly from the source:
git clone https://github.com/portainer/templates
cd templates
docker compose -f stacks/openamt/docker-compose.yml up -dMore install options in our documentation.
Container Documentation
webui Documentation
Open AMT Cloud Toolkit - Sample Web UI
rps Documentation
Open AMT Cloud Toolkit - Remote Provisioning Server
mps Documentation
Open AMT Cloud Toolkit - Management Presence Server
mpsrouter Documentation
Open AMT Cloud Toolkit - Management Presence Server Router
vault Documentation
Vault is a tool for securely accessing secrets via a unified interface and tight access control.
kong Documentation
The Cloud-Native API Gateway for APIs and Microservices
mosquitto Documentation
Eclipse Mosquitto is an open source message broker which implements MQTT version 5, 3.1.1 and 3.1
Serve OpenAMT on your own domain behind Caddy, Nginx or Traefik. Fill in your domain and copy the result. It's a starting point, some apps need their own base URL or extra headers set too.
Proxying openamt.example.com to https://kong:8443
Add this to your Caddyfile
openamt.example.com {
reverse_proxy https://kong:8443 {
transport http {
tls_insecure_skip_verify
}
}
}Check the logs first
Nine times out of ten the logs tell you exactly what went wrong.
- In Portainer, go to Containers, click the container, then Logs. Or run
docker logs <container> - Exit codes help too:
137means killed, usually out of memory.126or127means the command inside the image is broken.
Port already in use
If deployment fails with "Bind for 0.0.0.0:4433 failed: port is already allocated", something else on your server is using that port.
- Find what's using it:
sudo ss -tlnp | grep :4433 - Stop the other service, or pick a different host port. In
4433:4433only the left number is yours to change, the right one belongs to the app.
Running but the page won't load
The container is up but nothing appears in your browser.
- Use your server's real IP:
http://your-server-ip:4433. The 0.0.0.0 link Portainer shows isn't a real address. - Give it a minute after first deploy, webui can take a while to initialise.
- Make sure your firewall allows the port, e.g.
sudo ufw allow 4433
Image won't pull
Test the pull directly on the host: docker pull intel/oact-webui:v2.1.0
- "manifest unknown" means the tag no longer exists.
- "toomanyrequests" is the Docker Hub rate limit. Log in with
docker loginto raise it. - "no space left on device" means a full disk. Reclaim space with
docker system prune
"exec format error"
This means the image was built for a different CPU architecture than your server.
- Check yours with
uname -m: x86_64 is amd64, aarch64 is arm64. Raspberry Pi and other ARM boards are the usual culprits.
Container keeps restarting
The always restart policy relaunches the app after every crash, so the real error can scroll past.
- Check the logs right after a restart, the last few lines before it died are the useful ones.
- Get the exit code with
docker inspect <container> --format '{{.State.ExitCode}}' - Still stuck? Redeploy once with the restart policy set to
noso the failure stays visible.
Required settings are blank
RPS_MQTT_ADDRESS, MPS_MQTT_ADDRESS have no default value, and webui may crash or misbehave if left empty.
- Fill them in on the deploy screen before hitting deploy.
Stack won't deploy
Compose stacks fail fast on small mistakes, and Portainer shows the reason just above the editor.
- YAML only accepts spaces for indentation, a single tab breaks the whole file.
Raise an issue
Found something which isn't working as it should? Here's how to report it.
- Bug within the app: Open an issue within webui's repo
- Template not working: Open an issue on portainer/templates
- This website not working: Open an issue on lissy93/portainer-templates
A Compose stack
OpenAMT is a Compose stack, a set of containers (8 of them) defined in one file and brought up together by Portainer, then started and stopped as a single app.
The services
This stack is built from 8 containers that run side by side. Here's each one, with the image it runs and anything it waits for first:
webuirunsintel/oact-webui:v2.1.0rpsrunsintel/oact-rps:v2.1.0mpsrunsintel/oact-mps:v2.1.0mpsrouterrunsintel/oact-mpsrouter:v2.0.0dbrunsportainer/open-amt-cloud-toolkit-postgres:v2.1.0vaultrunsvault:latestkongrunskong:2.6mosquittorunseclipse-mosquitto
Ports
A port is the door the app answers on. A mapping like 4433:4433 means it's reachable on port 4433 of your server, where the left number is yours to change and the right one belongs to the app. It opens:
4433:44335432:54328200:8200443:84438001:80018883:8883
Volumes
A volume is where OpenAMT keeps its files so they survive an update or a restart. Without one, anything it saves would sit inside the container and vanish the moment it's recreated. This template mounts:
/mps-microservice/privatekept in theprivate-volumevolume Docker manages
Environment variables
Environment variables are the settings you hand over when you deploy, things like a password or a timezone. OpenAMT takes 52 of them, and 2 need a value before it'll start properly:
RPS_SERVER, defaults tohttps://MPS_COMMON_NAME/rpsMPS_SERVER, defaults tohttps://MPS_COMMON_NAME/mpsVAULT_SERVER, defaults tohttps://MPS_COMMON_NAME/vaultRPS_WEBSOCKETTLS, defaults totrueRPSWEBPORT, defaults to8081RPSWEBSOCKETPORT, defaults to8080RPS_LOG_LEVEL, defaults tosillyRPS_DELAY_TIMER, defaults to12RPS_MQTT_ADDRESS, needs a valueRPS_MPS_SERVER, defaults tohttp://mps:3000RPS_SECRETS_PATH, defaults tosecret/data/RPS_VAULT_TOKEN, pulled from your own environmentRPS_VAULT_ADDRESS, defaults tohttp://vault:8200RPS_CONNECTION_STRING, defaults topostgresql://POSTGRES_USER:POSTGRES_PASSWORD@db:5432/rpsdb?sslmode=no-verifyMPS_GENERATE_CERTS, defaults totrueMPS_COMMON_NAME, pulled from your own environmentMPSPORT, defaults to4433MPSWEBPORT, defaults to3000MPS_DEBUG, defaults totrueMPS_WEB_ADMIN_USER, pulled from your own environmentMPS_WEB_ADMIN_PASSWORD, pulled from your own environmentMPS_HTTPS, defaults totrueMPS_TLS_OFFLOAD, defaults tofalseMPS_LOG_LEVEL, defaults tosillyMPS_JWT_EXPIRATION, defaults to1440MPS_JWT_SECRET, pulled from your own environmentMPS_JWT_ISSUER, defaults to9EmRJTbIiIb4bIeSsmgcWIjrR6HyETqcMPS_MQTT_ADDRESS, needs a valueMPS_INSTANCE_NAME, defaults to{{.Task.Name}}MPS_SECRETS_PATH, defaults tosecret/data/MPS_VAULT_TOKEN, pulled from your own environmentMPS_VAULT_ADDRESS, defaults tohttp://vault:8200MPS_CONNECTION_STRING, defaults topostgresql://POSTGRES_USER:POSTGRES_PASSWORD@db:5432/mpsdb?sslmode=disablePORT, defaults to8003MPS_PORT, defaults to3000POSTGRES_DB, defaults torpsdbPOSTGRES_USER, pulled from your own environmentPOSTGRES_PASSWORD, pulled from your own environmentVAULT_DEV_ROOT_TOKEN_ID, pulled from your own environmentVAULT_DEV_LISTEN_ADDRESS, defaults to0.0.0.0:8200KONG_DATABASE, defaults tooffKONG_CASSANDRA_CONTACT_POINTS, defaults tokong-databaseKONG_ADMIN_LISTEN, defaults to0.0.0.0:8001KONG_ADMIN_LISTEN_SSL, defaults to0.0.0.0:8444KONG_NGINX_DAEMON, defaults tooffKONG_DECLARATIVE_CONFIG_STRING, defaults to{"_format_version":"2.1","_transform":true,"services":[{"name":"mps-rest","host":"mpsrouter","port":8003,"tags":["mps"],"routes":[{"name":"mps-login-route","strip_path":true,"paths":["/mps/login"]},{"name":"mps-relay-route","strip_path":true,"paths":["/mps/ws"]},{"name":"mps-route","strip_path":true,"paths":["/mps"]}]},{"name":"rps-rest","host":"rps","port":8081,"tags":["rps"],"routes":[{"name":"rps-route","strip_path":true,"paths":["/rps"]}]},{"name":"rps-ws","host":"rps","port":8080,"tags":["rps"],"routes":[{"name":"rps-activate-route","strip_path":true,"paths":["/activate"]}]},{"name":"vault-api","host":"vault","port":8200,"tags":["vault"],"routes":[{"name":"vault-route","strip_path":true,"paths":["/vault"]}]},{"name":"web","host":"webui","port":80,"tags":["web"],"routes":[{"name":"web-route","paths":["/"]}]}],"plugins":[{"name":"cors"},{"name":"jwt","route":"rps-route","config":{"claims_to_verify":["exp"]}},{"name":"jwt","route":"mps-route","config":{"claims_to_verify":["exp"]}}],"consumers":[{"username":"admin"}],"jwt_secrets":[{"consumer":"admin","key":"9EmRJTbIiIb4bIeSsmgcWIjrR6HyETqc","secret":MPS_SECRET}]}KONG_PROXY_ERROR_LOG, defaults to/dev/stderrKONG_PROXY_ACCESS_LOG, defaults to/dev/stdoutKONG_ADMIN_ACCESS_LOG, defaults to/dev/stdoutKONG_ADMIN_ERROR_LOG, defaults to/dev/stderrKONG_DNS_ORDER, defaults toLAST,A,CNAMEKONG_UPSTREAM_KEEPALIVE_POOL_SIZE, defaults to0
Restart policy
The restart policy here is always, so Docker brings OpenAMT back up after a crash and again when the server reboots. Good for anything you want running around the clock. You can change this on the deploy screen. The choices are no (never restart), on-failure (only after a crash), unless-stopped (restart unless you stop it), and always (bring it back no matter what).
Networking
Portainer puts these services on one shared private network, so they can find each other by name (like webui) while only the ports above are open to you.
Platform
The platform is linux, the kind of system the container is built to run on. Docker and Portainer handle this on a normal Linux server.
Portainer app templates
Zooming out, this whole page comes from a Portainer app template: a short recipe telling Portainer how to set OpenAMT up. Add the template list to Portainer once, then deploying OpenAMT is a click rather than a wall of config.