Main Content

webapps-config

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

Description

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.

example

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\R2026a\apps
                   logs_path: C:\ProgramData\MathWorks\webapps\R2026a\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. Changing this path requires manual permission updates. For details, see Configure Custom Locations and Permissions for Apps and Logs Folders.

logs_path

Path to folder containing the log files. Changing this path requires manual permission updates. For details, see Configure Custom Locations and Permissions for Apps and Logs Folders.

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

Number of minutes the server waits before ending a session that has lost connection. A session is only considered idle when the browser stops communicating with the server, not when the user is simply inactive.

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.

This must be the full path to a certificate in .pem format. The file must be stored in a directory that the server service account has permission to access. It is strongly recommended to use the webapps_private folder because the setup procedure automatically configures this location with the necessary permissions for the service account.

When using intermediate certificates, this file must contain the server certificate followed by the intermediate certificates concatenated in order.

ssl_private_key_file

Location of the SSL private key file.

This must be the full path to a certificate in .pem format. The file must be stored in a directory that the server service account has permission to access. It is strongly recommended to use the webapps_private folder because the setup procedure automatically configures this location with the necessary permissions for the service account.

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 by listing the allowed URLs separated by spaces. For example: "http://url1 http://url2"

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.

metrics_type (since R2026a)

Specify the location to send captured observability metrics. Type can be specified as: off, debug, otlp

metrics_destination (since R2026a)

HTTP endpoint URL for the metrics receiver. This parameter is only required when metrics_type is set to otlp.

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\R2026a\apps
  • Linux®
     /local/MathWorks/webapps/R2026a/apps
  • macOS
    /Library/Application Support/MathWorks/webapps/R2026a/apps

logs_path

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

  • Windows
    C:\ProgramData\MathWorks\webapps\R2026a\logs
  • Linux
     /local/MathWorks/webapps/R2026a/logs
  • macOS
    /Library/Application Support/MathWorks/webapps/R2026a/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 by listing the allowed URLs separated by spaces. For example: "http://url1 http://url2"

 

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\R2026a\config\webapps_private
  • Linux
     /local/MathWorks/webapps/R2026a/config/webapps_private
  • macOS
    /Library/Application Support/MathWorks/webapps/R2026a/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.

metrics_type (since R2026a)

The location to send captured observability metrics. Type can be specified as: off, debug, otlp

off

metrics_destination (since R2026a)

HTTP endpoint URL for the metrics receiver. This parameter is only required when metrics_type is set to otlp.

 

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

More About

collapse all

Version History

Introduced in R2020a