Main Content

webapps-config

Configure MATLAB Web App Server from the command line on Windows, Linux, and macOS systems

Since R2020a

Description

example

webapps-config get returns the current MATLAB® Web App Server™ configuration.

example

webapps-config get keyname returns the value associated with the key keyname.

example

webapps-config set keyname val assigns the value val to the key keyname.

example

webapps-config help keyname displays help for the key keyname.

Examples

Get Current Server Configuration

To retrieve the current server configuration, at the system command line, type:

webapps-config get 
                        port: 9988
                   apps_path: C:\ProgramData\MathWorks\webapps\R2024a\apps
                   logs_path: C:\ProgramData\MathWorks\webapps\R2024a\logs
               logging_level: normal
     log_archive_max_size_mb: 50
        log_rotation_size_mb: 10
            maximum_sessions: 63
session_idle_timeout_minutes: 5
     startup_timeout_seconds: 45
                 ssl_enabled: false
        ssl_certificate_file:
        ssl_private_key_file:

Get Configuration Value for Specific Key

To retrieve a configuration value for a specific key, at the system command line, type:

webapps-config get port
9988

Set Configuration Value for Specific Key

To set a configuration value for a specific key, at the system command line, type:

webapps-config set port 9999
Successfully changed "port". Changes will be applied the next time the server is started.

Verify that the port has been changed.

webapps-config get port
9999

Get Help for Specific Configuration Key

To get help for a specific configuration key, at the system command line, type:

webapps-config help logs_path
Folder where server logs are written

Enable SSL and Set Location to Certificate File and Private Key File

To enable SSL, at the system command line, type:

webapps-config set ssl_enabled true
webapps-config set ssl_certificate_file /home/user/my_server_certificate.pem
webapps-config set ssl_private_key_file /home/user/my_private_key.pem

Input Arguments

collapse all

keynameDescription

port

Port that the server runs on.

license

Host name and port of the license server or a path to the license file.

apps_path

Path to folder containing the web apps.

logs_path

Path to folder containing the log files.

logging_level

Level of logging granularity. The options are: 'normal' | 'verbose' | 'minimal'

log_archive_max_size_mb

Maximum size of all log files in megabytes (MB) in the log directory.

log_rotation_size_mb

Maximum size of a log file in megabytes (MB) before it rolls over into another file.

maximum_sessions

Maximum number of sessions allowed by server.

session_idle_timeout_minutes

Timeout in minutes before terminating a session when idle.

startup_timeout_seconds

Timeout in seconds when starting a new session.

ssl_enabled

Verify if SSL is enabled.

ssl_certificate_file

Location of the SSL certificate file.

ssl_private_key_file

Location of the SSL private key file.

start_nolminit

Specify whether server can start without initializing license manager

app_session_full_screen (since R2022b)

Specify whether app sessions start in full-screen mode.

app_session_show_footer (since R2022b)

Specify whether to show app session footer and logs to specific users. Users can be specified as: all, authors, none

allowed_frame_ancestors (since R2023b)

Specify which websites are allowed to embed a web app within an iframe HTML element.

allowed_event_origins (since R2023b)

Specify websites from which the web app that is embedded in an iframe HTML element can receive data.

vault_storage_path (since R2024a)

Folder containing secrets hosted by the server.

vault_password (since R2024a)

Password that protects secrets hosted by the server.

keynamevalDefault Value

port

Port number specified as a positive integer between 1 and 65535.

9988

licenseHost name and port number of the license server or a path to the license file.

For examplea:

  • 27000@myLicenseServer

  • C:\myLicenses\license.lic

  • C:\myLicenses\license.dat

apps_path

Path to folder containing the web apps. Specify as a string.

  • Windows®
    C:\ProgramData\MathWorks\webapps\R2024a\apps

  • Linux®
     /local/MathWorks/webapps/R2024a/apps
  • macOS
    /Library/Application Support/MathWorks/webapps/R2024a/apps

logs_path

Path to folder containing the log files. Specify as a string.

  • Windows
    C:\ProgramData\MathWorks\webapps\R2024a\logs
  • Linux
     /local/MathWorks/webapps/R2024a/logs
  • macOS
    /Library/Application Support/MathWorks/webapps/R2024a/logs

logging_level

Level of logging granularity. Specify as a string. The options are: 'normal' | 'verbose' | 'minimal'

normal

log_archive_max_size_mb

Maximum size of all log files in megabytes (MB) in the log directory. Specify as a positive integer.

50 MB

log_rotation_size_mb

Maximum size of a log file in megabytes (MB) before it will roll over into another file. Specify as a positive integer.

10 MB

maximum_sessions

Maximum number of sessions allowed by server. Specify as a positive integer.

1 session per gigabyte (GB) of RAM.

session_idle_timeout_minutes

Timeout in minutes before terminating a session when idle. Specify as a positive integer.

5

startup_timeout_seconds

Timeout in seconds when starting a new session. Specify as a positive integer.

45

ssl_enabled

Verify if SSL is enabled specified as Boolean.

false

ssl_certificate_file

Location of the SSL certificate file. Specify as a string.

 

ssl_private_key_file

Location of the SSL private key file. Specify as a string.

 

start_nolminit

Specify whether server can start without initializing license manager. Specify as boolean.

false

app_session_full_screen (since R2022b)

Specify whether app sessions start in full-screen mode. Specify as boolean.

false

app_session_show_footer (since R2022b)

Specify whether to show app session footer and logs to specific users. Users can be specified as: all, authors, none

all

allowed_frame_ancestors (since R2023b)

Specify which websites are allowed to embed a web app within an iframe HTML element.

 

allowed_event_origins (since R2023b)

Specify websites from which the web app that is embedded in an iframe HTML element can receive data.

 

vault_storage_path (since R2024a)

Folder containing secrets hosted by the server.

  • Windows
    C:\ProgramData\MathWorks\webapps\R2024a\config\webapps_private
  • Linux
     /local/MathWorks/webapps/R2024a/config/webapps_private
  • macOS
    /Library/Application Support/MathWorks/webapps/R2024a/config/webapps_private

vault_password (since R2024a)

Password that protects secrets hosted by the server.

A password is randomly generated each time webapps-setup is run.

a To know the difference between license.lic and license.dat files, see MATLAB Answers.

More About

collapse all

MATLAB Web App Server Command-Line Script Location

The command-line scripts are located in the script folder in your MATLAB Web App Server installation folder. For instance, the default locations for R2024a are as follows:

Operating SystemDefault Location of Command-Line Scripts

Windows (Administrator)

C:\Program Files\MATLAB\MATLAB Web App Server\R2024a\script

Linux (sudo)

/usr/local/MATLAB/MATLAB_Web_App_Server/R2024a/script

macOS (Intel® processor) (sudo)

/Applications/MATLAB/MATLAB_Web_App_Server/R2024a/script

Version History

Introduced in R2020a