Running Unblu in standalone mode
There are a number of scenarios—testing, development, or demos, for example—where it may be useful to deploy an Unblu server to your local machine. In such cases, you can deploy Unblu in standalone mode.
Standalone mode isn’t suitable for production use. |
Requirements
Any reasonably modern machine should be capable of running Unblu in standalone mode. For example, a machine with the following specifications will do the job:
-
1 recent CPU core running at 2.4GHz
-
4 GB RAM
-
10 GB hard drive space
You will also need:
-
Java 21 installed on the computer where you want to run Unblu
-
The Unblu installation package, consisting of the following elements:
-
The Unblu WAR file
-
A valid Unblu license key
-
-
An Unblu properties file (optional)
Deployment
As an Unblu customer, you’re typically granted access to a downloadable file with a name like product.com.unblu-<version>-<guid>.war
. The Unblu WAR file can also be used as an executable JAR. In standalone mode, it runs using an embedded Jetty-based web server.
java -jar product.com.unblu-<version>-<guid>.war
The embedded Jetty web server automatically selects a TCP port in the range of 6060—7070. To specify the TCP port yourself, add -Dport=
on the command line:
java -Dport=6789 \
-jar product.com.unblu-<version>-<guid>.war
Command line options
The following command line options are available when you run the executable JAR file:
-e,--export <arg> Type of export. Possible options: 'ear' or 'wjar'
-h,--help Display this help message
-l,--list Format of output: ( version: build: branch: )
-m,--migrationOnly use to shutdown the product after database migration is complete
-o,--output <arg> File to write the exported product to. If not given, output will default to STDOUT.
-p,--product <arg> ID of the product to start, for example product.com.unblu.enterprise (default) (1)
-t,--test Include test bundles into the product execution/export (not available in production versions).
-d,--diag Include diagnostics bundles in the product execution/export (not available in production versions).
1 | The --product switch is also available via System Properties. |
These options are placed after -jar product.com.unblu-<version>-<guid>.war
:
java
-jar product.com.unblu-<version>-<guid>.war \
--help
Configuration
All configuration can be placed in a separate properties file.
com.unblu.runtime.jetty.port=7777
# Create a superadmin on DB setup
com.unblu.storage.createSuperAdmin=true
com.unblu.storage.superAdminUsername=
com.unblu.storage.superAdminPassword=superadmin
If you don’t specify the property com.unblu.storage.superAdminUsername, Unblu generates a random superadmin username.
To use your properties file, include its name in the command line argument -Dcom.unblu.propertyoverlay
:
unblu-config.properties
java -Dcom.unblu.propertyoverlay=unblu-config.properties \
-Dport=7070 \
-jar product.com.unblu-<version>-<guid>.war
If you need to use the Unblu JavaScript demo page, you can activate it by setting com.unblu.server.resources.enableDemoResources to true
. If you also want the Unblu docs available locally, set com.unblu.server.resources.enableDocResources to true
.