> Markdown version of [Properties](https://vaadin.com/docs/v23/configuration/properties). Section index: [llms.txt](https://vaadin.com/docs/v23/configuration/llms.txt)

# Configuration Properties

Vaadin applications have configuration properties that change their behavior. Use either system properties or servlet initialization parameters to set them. See the [full list of properties](#properties).

For Spring-based applications, there are [Spring-specific instructions](https://vaadin.com/docs/v23/integrations/spring/configuration.md) available.

## <a id="system-properties"></a>Using System Properties

When using Java’s system properties to set the Vaadin application parameters, the `vaadin.` prefix needs to be specified before the parameter names. The following is an example of how to set a system property when executing a Maven goal from the command-line:

```
mvn jetty:run -Dvaadin.frontend.url.es6=https://mydomain.com/es6/ -Dvaadin.frontend.url.es5=https://mydomain.com/es5/
```

System properties can be configured for Maven plugin executions. For instance, the following sets a Vaadin-specific system property when the Jetty Maven plugin is run:

```xml
<plugin>
    <groupId>org.eclipse.jetty</groupId>
    <artifactId>jetty-maven-plugin</artifactId>
    <configuration>
        <systemProperties>
            <systemProperty>
                <name>vaadin.pushMode</name>
                <value>disabled</value>
            </systemProperty>
        </systemProperties>
    </configuration>
</plugin>
```

## <a id="using-servlet-initialization-parameters"></a>Using Servlet Initialization Parameters

Another option is to use servlet initialization parameters. You can use the Servlet 3.0 `@WebServlet` annotation, which requires you to configure your own servlet. Otherwise, it’s done automatically by Vaadin with default parameter values.

```java
@WebServlet(urlPatterns = "/*", name = "myservlet", asyncSupported = true, loadOnStartup = 1,
    initParams = {
        @WebInitParam(name = "frontend.url.es6", value = "https://mydomain.com/es6/"),
        @WebInitParam(name = "frontend.url.es5", value = "https://mydomain.com/es5/") })
public class MyServlet extends VaadinServlet {
}
```

Yet another approach is to use the `web.xml` file like so:

```xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app
  id="WebApp_ID" version="3.0"
  xmlns="http://java.sun.com/xml/ns/j2ee"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
      http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">

  <servlet>
    <servlet-name>myservlet</servlet-name>
    <servlet-class>
        com.vaadin.flow.server.VaadinServlet
    </servlet-class>
    <load-on-startup>1</load-on-startup>

    <init-param>
      <param-name>frontend.url.es6</param-name>
      <param-value>https://mydomain.com/es6/</param-value>
    </init-param>

    <init-param>
      <param-name>frontend.url.es5</param-name>
      <param-value>https://mydomain.com/es5/</param-value>
    </init-param>
  </servlet>

  <servlet-mapping>
    <servlet-name>myservlet</servlet-name>
    <url-pattern>/*</url-pattern>
  </servlet-mapping>
</web-app>
```

> **Note: System properties override servlet parameters**
>
> When a system property and a servlet parameter have the same name, the system property is used.

## <a id="properties"></a>Configuration Properties

The following list contains the properties that are defined in the `com.vaadin.server.DeploymentConfiguration` and `com.vaadin.server.Constants` classes, in alphabetical order.

> **Note: Spring Boot**
>
> If you use Spring Boot, you should add the `vaadin.` prefix, for example, `vaadin.productionMode=true`.

|                                          |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |                                                          |
| ---------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------- |
| Property name                            | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | Default value                                            |
| `brotli`                                 | Checks whether pre-compressed Brotli files should be used if available.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | `true`                                                   |
| `closeIdleSessions`                      | When set to `true`, the Vaadin session is closed if no UI is active. A UI is active if it is open on the client-side and has some activity in addition to heartbeat requests. By default, heartbeat requests cause the Vaadin session to stay open even if there is no user interaction. If `closeIdleSessions` is `true`, the Vaadin session closes without user interaction.                                                                                                                                                                                                                                                                                                                                                                        | `false`                                                  |
| `devmode.liveReload.enabled`             | If you are using a server-side live reload tool, the browser is automatically refreshed after the code is reloaded on the server.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | `true`                                                   |
| `devmode.optimizeBundle`                 | By default in development mode, all front-end resources found in the classpath are included in the generated bundle. When set to `true`, this creates an optimized bundle by including only front-end resources that are used from the application entry points. It uses bytecode scanning, which increases application start-up time.                                                                                                                                                                                                                                                                                                                                                                                                                | `false` for development mode, `true` for production mode |
| `devmode.sessionSerialization.enabled`   | When session serialization is disabled, `UI` instances and registered `StreamResource` instances are not serialized or deserialized when restarting the development server. Enabling the property allows, for example, access control information to be preserved during development, so that you don’t need to log in again for each individual change.                                                                                                                                                                                                                                                                                                                                                                                              | `false`                                                  |
| `devmode.usageStatistics.enabled`        | Enables Vaadin to collect usage statistics that are used to guide development further. Statistics are collected based on features used in the application. No data is collected in production mode. Some versions of Vaadin also collect usage statistics through the web browser. See the documentation for [the client-side collector](https://github.com/vaadin/vaadin-usage-statistics) for information on how to opt out of that part of the usage statistics collection. Only used in development mode.                                                                                                                                                                                                                                         | `true`                                                   |
| `disable.automatic.servlet.registration` | Configuration name for the parameter that determines whether Vaadin should automatically register servlets that are required for the application to work.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | `false`                                                  |
| `disable-xsrf-protection`                | Cross-site request forgery protection. The protection is enabled by default, but you may want to disable it for a certain type of testing. The check can be disabled by setting the init parameter.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | `false`                                                  |
| `eagerServerLoad`                        | If the client-side bootstrap page should include the initial UIDL fragment.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | `false`                                                  |
| `heartbeatInterval`                      | UIs that are open on the client-side send a regular heartbeat to the server indicating that they are still alive, even when there is no ongoing user interaction. When the server doesn’t receive a valid heartbeat from a given UI within a certain amount of time, it removes that UI from the session. The interval is expressed in `seconds`.                                                                                                                                                                                                                                                                                                                                                                                                     | 300 seconds (this equals 5 minutes)                      |
| `i18n.provider`                          | I18N provider property. To use localization and translation strings, the application only needs to implement `I18NProvider` and define the fully qualified class name in the property `i18n.provider`. See the [Localization](https://vaadin.com/docs/v23/advanced/i18n-localization.md) documentation for more details.                                                                                                                                                                                                                                                                                                                                                                                                                              | `null`                                                   |
| `maxMessageSuspendTimeout`               | In certain cases, for example, when the server sends adjacent `XmlHttpRequest` responses and pushes messages over a low-bandwidth connection, the messages may be received out of sequence by the client. This property specifies the maximum time in `milliseconds` that the client waits for predecessors of a received out-of-sequence message before considering them missing. It then requests a full resynchronization of the application state from the server. You may increase this if your application experiences an undue quantity of resynchronization requests. However, that degrades the UX due to flickering and loss of client-side-only states, such as scroll position.                                                           | 5000 ms                                                  |
| `maxRequestBodySize`                     | Sets the maximum size of a client-to-server UIDL/RPC or push request body that Flow reads before rejecting the request with an HTTP `413` (Request Entity Too Large) response. The value is the number of characters — individual units of text read from the request body. For the ASCII JSON that Flow sends, one character corresponds to roughly one byte, so `1024` allows a request body of about 1 KB and the default of `10485760` allows about 10 MB. It doesn’t affect file uploads, which are streamed in chunks and have their own separate size limits. Set to `-1` to disable the limit. Avoid setting a value too low: protocol overhead and larger component-state changes can cause legitimate interactions to exceed a small limit. | 10485760 (i.e., about 10 MB)                             |
| `pnpm.enable`                            | This flag can be used to enable `pnpm` instead of `npm` to resolve and download front-end dependencies. By default, this flag is set to `false`, and `npm` is used. Setting it to `true` enables `pnpm`. See how to [switch between npm and pnpm](https://vaadin.com/docs/v23/configuration/npm-pnpm.md).                                                                                                                                                                                                                                                                                                                                                                                                                                             | `false`                                                  |
| `productionMode`                         | Sets the application to work in production mode. Production mode disables most of the logged information that appears on the console. Otherwise, logging and other debugging features can have a significant impact on performance. Development-mode JavaScript functions aren’t exported. A `push` is given as a minified JavaScript file instead of a full-size one, and static resources are cached. See [Deploying to Production](https://vaadin.com/docs/v23/production.md) for more information.                                                                                                                                                                                                                                                | `false`                                                  |
| `pushLongPollingSuspendTimeout`          | Specifies how long it accepts responses after each network request in milliseconds when using the long polling transport strategy.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | `-1` (no timeout)                                        |
| `pushMode`                               | The permitted values are "disabled", "manual" or "automatic". See [Server Push](https://vaadin.com/docs/v23/advanced/server-push.md) for more information.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | `disabled`                                               |
| `pushServletMapping`                     | Sets the servlet mapping used for bidirectional ("push") client-server communication.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | `""`                                                     |
| `requestTiming`                          | If set to `true`, the server includes some basic timing information in each response. This can be used for performance testing.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | `true` for development mode, `false` for production mode |
| `sendUrlsAsParameters`                   | Enables or disables sending URLs as GET and POST parameters in requests with content-type `application/x-www-form-urlencoded`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | `true`                                                   |
| `safeUrlSchemes`                         | Comma-separated list of URL schemes that are considered safe in URLs passed to `Anchor.setHref()`, `IFrame.setSrc()`, and `Page.open()`. URLs whose scheme isn’t in the list are rejected with an `IllegalArgumentException`. Relative URLs are always accepted. This validation is opt-in: when the parameter isn’t set, every scheme is accepted. An entry of `*` also marks every scheme as safe, disabling the validation. Starting with Vaadin 25.2, this validation is instead enabled by default, accepting the `http`, `https`, `mailto`, `tel`, and `ftp` schemes. URLs with unsafe schemes can still be set through the dedicated unsafe setters, such as `Anchor.setUnsafeHref()`.                                                         | `*` (validation disabled)                                |
| `syncIdCheck`                            | Enables or disables sync ID checking. The sync ID is used to handle situations where the client sends a message to a connector that has been removed from the server.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | `true`                                                   |
| `useDeprecatedV14Bootstrapping`          | This flag can be used to enable the server-side bootstrapping mode used in Vaadin 14 and earlier versions. This option is only supported if webpack is used as the front-end build tool instead of Vite, which is used by default. You can [enable webpack using its associated feature flag](https://vaadin.com/docs/v23/configuration/live-reload.md#webpack-feature-flag).                                                                                                                                                                                                                                                                                                                                                                         | `false` (mode removed in v24)                            |
| `webComponentDisconnect`                 | Defines the number of seconds that a WebComponent waits for a reconnect before removing the server-side component from memory.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | 300 seconds                                              |

`27BF72FB-1E23-42B0-B540-A602F9AD4571`
