ThingWorx Flow > Installation and Configuration > Using ThingWorx Flow Docker > Building and Running ThingWorx Flow Docker Images
Building and Running ThingWorx Flow Docker Images
Building ThingWorx Flow Docker Images 
1. Start the Docker Engine.
2. From ThingWorx Flow 9.0.17, 9.1.12, 9.2.8, 9.3.3, in ThingWorx-Platform-Flow-Dockerfiles\dockerfiles\rabbitmq\definitions.json add the name, user, and password, with the username and password, used for RabbitMQ connection.
{
"users": [
{
"name": "<rabbitMQ username",
"password": "<RabbitMQ password>",
"tags": "administrator"
}
],
"vhosts": [
{
"name": "symphony"
}
],
"permissions": [
{
"user": "<RabbitMQ username>",
"vhost": "symphony",
"configure": ".*",
"write": ".*",
"read": ".*"
}
],
"parameters": [],
"policies": [],
"queues": [],
"exchanges": [],
"bindings": []
}
3. Browse to \ThingWorx-Flow-Dockerfiles-x-x-x\ThingWorx-Platform-Flow-Dockerfiles\dockerfiles and run the ./makeImages.sh command.
Post Building ThingWorx Flow 9.0.17 Docker Images 
Add the username and passwords in the following files after building the images.
File
Parameters
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single/docker-compose-twx-http-mssql-and-flow-mssql.yml
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single/docker-compose-twx-http-postgres-and-flow-postgres.yml
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single/docker-compose-twx-http-postgres-and-flow-azure.yml
THINGWORX_INITIAL_ADMIN_PASSWORD
RABBITMQ_USERNAME
RABBITMQ_PASSWORD
TWX_DATABASE_USERNAME
TWX_DATABASE_PASSWORD
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single/.env
MODEL_DB_CONNECTION_PASSWORD
QUEUE_ADAPTERS_AMQP_CONFIG_CREDENTIALS
MSSQL_POSTGRES_PASSWORD
TWX_DATABSE_USERNAME
TWX_DATABSE_PASSWORD
PLATFORM_SSL_KEYSTORE_PASSWORD
POSTGRES_PASSWORD
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-ha/security-common/keys.json
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single/security-common/keys.json
MODEL_DB.connection.password
QUEUE.ADAPTERS.AMQP.CONFIG.credentials
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single/docker-compose-twx-http-h2-and-flow-postgres.yml
RAABITMQ_USERNAME
RABBITMQ_PASSWORD
TWX_DATABASE_USERNAME
TWX_DATABASE_PASSWORD
THINGWORX_INITIAL_ADMIN_PASSWORD
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-ha/docker-compose-twx-posgres-ha-and-flow-postgres.yml
THINGWORX_INITIAL_ADMIN_PASSWORD
RAABITMQ_USERNAME
RABBITMQ_PASSWORD
HAPROXY_STAT_PASSWORD
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-ha/.env
MODEL_DB_CONNECTION_PASSWORD
QUEUE_ADAPTERS_AMQP_CONFIG_CREDENTIALS
ZK_SSL_TRUSTSTORE_PSWORD
IGNITE_KEYSTORE_PASSWORD
POSTGRES_USER
POSTGRES_PASSWORD
PLATFORM_SSL_KEYSTORE_PASSWORD
CXSERVER_SSL_TRUSTSTORE_PASSWORD
ZK_SSL_KEYSTORE_PASSWORD
CXSERVER_SSL_KEYSTORE_PASSWORD
POSTGRES_SSL_KEYSTORE_PASSWORD
TWX_DATABASE_USERNAME
TWX_DATABASE_PASSWORD
ThingWorx-Platform-Flow-Dockerfiles/dockerfiles/rabbitmq/Dockerfile
RABBITMQ_USER
RABBITMQ_PASSWORD
Post Building ThingWorx Flow 9.1.12 and later Docker Images 
Add the username and passwords in the following files after building the images.
File
Parameters
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single/docker-compose-twx-http-mssql-and-flow-mssql.yml
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single/docker-compose-twx-http-postgres-and-flow-postgres.yml
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single/docker-compose-twx-http-postgres-and-flow-azure.yml
THINGWORX_INITIAL_ADMIN_PASSWORD
RABBITMQ_USERNAME
RABBITMQ_PASSWORD
TWX_DATABASE_USERNAME
TWX_DATABASE_PASSWORD
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single/.env
MODEL_DB_CONNECTION_PASSWORD
QUEUE_ADAPTERS_AMQP_CONFIG_CREDENTIALS
MSSQL_POSTGRES_PASSWORD
TWX_DATABSE_USERNAME
TWX_DATABSE_PASSWORD
PLATFORM_SSL_KEYSTORE_PASSWORD
POSTGRES_PASSWORD
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-ha/security-common/keys.json
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single/security-common/keys.json
MODEL_DB.connection.password
QUEUE.ADAPTERS.AMQP.CONFIG.credentials
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single/docker-compose-twx-http-h2-and-flow-postgres.yml
RAABITMQ_USERNAME
RABBITMQ_PASSWORD
TWX_DATABASE_USERNAME
TWX_DATABASE_PASSWORD
THINGWORX_INITIAL_ADMIN_PASSWORD
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-ha/docker-compose-twx-posgres-ha-and-flow-postgres.yml
THINGWORX_INITIAL_ADMIN_PASSWORD
RAABITMQ_USERNAME
RABBITMQ_PASSWORD
HAPROXY_STAT_PASSWORD
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-ha/.env
MODEL_DB_CONNECTION_PASSWORD
QUEUE_ADAPTERS_AMQP_CONFIG_CREDENTIALS
ZK_SSL_TRUSTSTORE_PSWORD
IGNITE_KEYSTORE_PASSWORD
POSTGRES_USER
POSTGRES_PASSWORD
PLATFORM_SSL_KEYSTORE_PASSWORD
CXSERVER_SSL_TRUSTSTORE_PASSWORD
ZK_SSL_KEYSTORE_PASSWORD
CXSERVER_SSL_KEYSTORE_PASSWORD
POSTGRES_SSL_KEYSTORE_PASSWORD
TWX_DATABASE_USERNAME
TWX_DATABASE_PASSWORD
ThingWorx-Platform-Flow-Dockerfiles/dockerfiles/rabbitmq/Dockerfile
RABBITMQ_USER
RABBITMQ_PASSWORD
ThingWorx-Platform-Flow-Dockerfiles/dockerfiles/db-seed/Dockerfile
POSTGRES_USER
POSTGRES_PASSWORD
Post Building ThingWorx Flow 9.2.8 and later Docker Images 
Add the username and passwords in the following files after building the images.
File
Parameters
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single/docker-compose-twx-http-mssql-and-flow-mssql.yml
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single/docker-compose-twx-http-postgres-and-flow-postgres.yml
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single/docker-compose-twx-http-postgres-and-flow-azure.yml
THINGWORX_INITIAL_ADMIN_PASSWORD
RABBITMQ_USERNAME
RABBITMQ_PASSWORD
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single/.env
MODEL_DB_CONNECTION_PASSWORD
QUEUE_ADAPTERS_AMQP_CONFIG_CREDENTIALS
MSSQL_POSTGRES_PASSWORD
TWX_DATABSE_USERNAME
TWX_DATABSE_PASSWORD
PLATFORM_SSL_KEYSTORE_PASSWORD
POSTGRES_PASSWORD
MSSQL_SA_PASSWORD
INFLUXDB_DATABASE_USERNAME
INFLUXDB_DATABASE_PASSWORD
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single/docker-compose-mqtt.override.yml
MOSQUITTO_USERNAME
MOSQUITTO_PASSWORD
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-ha/security-common/keys.json
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single/security-common/keys.json
MODEL_DB.connection.password
QUEUE.ADAPTERS.AMQP.CONFIG.credentials
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single/docker-compose-twx-http-h2-and-flow-postgres.yml
RAABITMQ_USERNAME
RABBITMQ_PASSWORD
TWX_DATABASE_USERNAME
TWX_DATABASE_PASSWORD
THINGWORX_INITIAL_ADMIN_PASSWORD
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-ha/docker-compose-twx-posgres-ha-and-flow-postgres.yml
THINGWORX_INITIAL_ADMIN_PASSWORD
RAABITMQ_USERNAME
RABBITMQ_PASSWORD
HAPROXY_STAT_PASSWORD
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-ha/.env
MODEL_DB_CONNECTION_PASSWORD
QUEUE_ADAPTERS_AMQP_CONFIG_CREDENTIALS
ZK_SSL_TRUSTSTORE_PSWORD
IGNITE_KEYSTORE_PASSWORD
POSTGRES_USER
POSTGRES_PASSWORD
PLATFORM_SSL_KEYSTORE_PASSWORD
CXSERVER_SSL_TRUSTSTORE_PASSWORD
ZK_SSL_KEYSTORE_PASSWORD
CXSERVER_SSL_KEYSTORE_PASSWORD
POSTGRES_SSL_KEYSTORE_PASSWORD
TWX_DATABASE_USERNAME
TWX_DATABASE_PASSWORD
ThingWorx-Platform-Flow-Dockerfiles/dockerfiles/rabbitmq/Dockerfile
RABBITMQ_USER
RABBITMQ_PASSWORD
ThingWorx-Platform-Flow-Dockerfiles/dockerfiles/db-seed/Dockerfile
POSTGRES_USER
POSTGRES_PASSWORD
Post Building ThingWorx Flow 9.3.3 and later Docker Images 
Add the username and passwords in the following files after building the images.
File
Parameters
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single/docker-compose-twx-http-mssql-and-flow-mssql.yml
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single/docker-compose-twx-http-postgres-and-flow-postgres.yml
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single/docker-compose-twx-http-postgres-and-flow-azure.yml
THINGWORX_INITIAL_ADMIN_PASSWORD
RABBITMQ_USERNAME
RABBITMQ_PASSWORD
THINGWORX_INITIAL_METRICS_USER_PASSWORD
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single/.env
MODEL_DB_CONNECTION_PASSWORD
QUEUE_ADAPTERS_AMQP_CONFIG_CREDENTIALS
MSSQL_POSTGRES_PASSWORD
TWX_DATABSE_USERNAME
TWX_DATABSE_PASSWORD
PLATFORM_SSL_KEYSTORE_PASSWORD
POSTGRES_PASSWORD
MSSQL_SA_PASSWORD
INFLUXDB_DATABASE_USERNAME
INFLUXDB_DATABASE_PASSWORD
KEYSTORE_PASSWORD
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single/docker-compose-mqtt.override.yml
MOSQUITTO_USERNAME
MOSQUITTO_PASSWORD
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-ha/security-common/keys.json
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single/security-common/keys.json
MODEL_DB.connection.password
QUEUE.ADAPTERS.AMQP.CONFIG.credentials
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single/docker-compose-twx-http-h2-and-flow-postgres.yml
RAABITMQ_USERNAME
RABBITMQ_PASSWORD
TWX_DATABASE_USERNAME
TWX_DATABASE_PASSWORD
THINGWORX_INITIAL_ADMIN_PASSWORD
THINGWORX_INITIAL_METRICS_USER_PASSWORD
ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-ha/docker-compose-twx-posgres-ha-and-flow-postgres.yml
THINGWORX_INITIAL_ADMIN_PASSWORD
RAABITMQ_USERNAME
RABBITMQ_PASSWORD
HAPROXY_STAT_PASSWORD
THINGWORX_INITIAL_METRICS_USER_PASSWORD
Running ThingWorx Flow Docker Images 
For single environment
1. Add 127.0.0.1 flow.local.rnd.ptc.com to the /etc/hosts file.
You cannot modify this value: flow.local.rnd.ptc.com.
2. To start ThingWorx with a single ThingWorx Flow engine, browse to /ThingWorx-Flow-Dockerfiles-x-x-x/ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single, and run the appropriate command for your environment:
Environment
Start
ThingWorx Platform H2 with ThingWorx Flow PostgreSQL
./startImages-twx-http-h2-and-flow-postgres.sh
ThingWorx Platform PostgreSQL with ThingWorx Flow PostgreSQL
./startImages-twx-http-postgres-and-flow-postgres.sh
ThingWorx Platform Microsoft SQL Server with ThingWorx Flow Microsoft SQL Server
./startImages-twx-http-mssql-and-flow-mssql.sh
ThingWorx Platform PostgreSQL with ThingWorx Flow Azure PostgreSQL
./startImages-twx-http-postgres-and-flow-azure.sh
3. Once your docker image is running, in your browser go to https://flow.local.rnd.ptc.com/Thingworx/Composer/.
4. Execute the LoadOAuthConfiguration service from ThingWorx Composer to load OAuths to the ThingWorx Flow server.
To stop ThingWorx with a single ThingWorx Flow engine, browse to /ThingWorx-Flow-Dockerfiles-x-x-x/ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-single, and run the appropriate command for your environment:
Environment
Stop
ThingWorx Platform H2 with ThingWorx Flow PostgreSQL
./stopImages-twx-http-h2-and-flow-postgres.sh
ThingWorx Platform PostgreSQL with ThingWorx Flow PostgreSQL
./stopImages-twx-http-postgres-and-flow-postgres.sh
ThingWorx Platform Microsoft SQL Server with ThingWorx Flow Microsoft SQL Server
./stopImages-twx-http-mssql-and-flow-mssql.sh
ThingWorx Platform PostgreSQL with ThingWorx Flow Azure PostgreSQL
./stopImages-twx-http-postgres-and-flow-azure.sh
For High Availability environment
1. Add 127.0.0.1 haproxy to the /etc/hosts file.
By default, haproxy is used. Before you change this value, you must modify the HAProxy host name parameter according to the instructions in Configuring ThingWorx Flow Docker.
2. To start ThingWorx High Availability with a single ThingWorx Flow engine, browse to /ThingWorx-Flow-Dockerfiles-x-x-x/ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-ha, and run the ./startImages-twx-ha-and-flow.sh command.
3. Once your docker image is up and running, in your browser go to https://haproxy:8443/Thingworx/Composer/.
4. Execute the LoadOAuthConfiguration service from ThingWorx Composer to load OAuths to the ThingWorx Flow server.
To stop ThingWorx High Availability with a single ThingWorx Flow engine, browse to /ThingWorx-Flow-Dockerfiles-x-x-x/ThingWorx-Platform-Flow-Dockerfiles/docker-compose-files-ha, and run the ./stopImages-twx-ha-and-flow.sh command.
View logs
To view all logs, run the following command:
docker compose -f <docker compose yml file name> logs -f
To view logs of a specific container, run the following command:
docker compose -f <docker compose yml file name> logs <container name>
Enter CTRL+C to close the logs.
Was this helpful?