Skip to main content

Configuration

APEX Message Service can be configured through the ams_config.jsonc file or through parameters when AMS is being started.

Server Options

To view all available options, run ./APEXOfficePrintLinux64 -h

The following parameters can be used:


-a or --activate : Activate the software

-r or --reactivate : This reactivates the software.

--generate_lrf : Generate license request file

-h or --help : Show this menu

--license : The location of the license file.

Default looks at the startup directory

--deactivate : This creates a deactivation request file.

AMS can also use a config file. These options can be saved in this config file. AMS generates the config file in the first run if no config file exists. This configuration file is in JSON format. The default configuration is as follows:


{

// Client and Server listen events: these are the events that are used to communicate between the client and the AMS server (you also need to change this on APEX)

"events": {

"clientListenEvent": "uc.event",

"serverListenEvent": "uc.event"

},

// Socket.io options see https://socket.io/docs/v4/server-options/ for more info

// Not supported are: adapter, parser, allowRequest, wsEngine

"io": {

"cors": {

"origin": "*",

"allowedHeaders": "*",

"credentials": false

},

// Webtransport is not yet supported

"transports": [

"websocket",

"polling"

]

},

// Logging options

"logging": {

// The level of logging, possible values are: error, warn, info

"level": "info",

// The directory where the logs are stored

"dir": "logs",

// Set this to true if you want to log to the console as well as to file

"consoleLogs": true

},

// The port on which the server should run

"port": 3000,

// The amount of workers the server starts. If 0, it will use all of the cores available

"numberOfWorkers": 1

}

Testing the connection to AMS

Running curl webserver:port (curl can be downloaded for free for Windows via https://curl.haxx.se/download.html#Win64)


curl 127.0.0.1:3000

If you access the port running AMS, it should return a webpage

webeditor

Security Best Practices

These security best practices apply not only to AMS but also to any other software application.

  • Create a new user specifically to run the AMS SERVER, e.g.

Give only the required privileges: access to incoming requests on the given port.

  • Setup the firewall so that only the database server can connect to the AMS Server port OR use the IP whitelist feature of AMS only to allow access from the IP of the database server
  • Configure HTTPS either using a reverse proxy or behind a load balancer that supports HTTPS.

All suggestions Great job!