Docs

Documentation versions (currently viewingVaadin 25)
Documentation translations (currently viewingEnglish)

Take Your Application to Production

Take a Vaadin application from your development machine to production.

These guides take a Vaadin application from your development machine to production. They assume a Spring Boot application built with Maven, such as a project from start.vaadin.com. Each guide covers the essentials and the pitfalls that are specific to Vaadin, and links to the Deploying to Production reference for the details.

Before you start, read How a Vaadin Application Works. A Vaadin application keeps the UI state of each user in server memory. This affects most of the decisions in these guides: how much memory to give the JVM, how to configure the proxy, which URLs to use for health checks, and what happens to users when an instance stops.

Reading Order

Read the guides in this order. Each one builds on the previous ones.

  1. Build for Production creates a JAR that runs in production mode, and explains when the build needs Node.js and a license key.

  2. Configure the Application keeps production settings in a Spring profile, and secrets out of the source code.

  3. Build a Container Image packages the JAR in an image, and gives the JVM enough memory for the sessions.

  4. Deploy Behind a Proxy terminates TLS in a reverse proxy, and lets server push through it.

  5. Add Health Checks gives the load balancer and the container platform URLs to check, without creating sessions.

  6. Collect Logs & Metrics makes logs machine-readable, and exposes metrics on a port that users can’t reach.

  7. Build on CI builds, tests, and packages the application on every change.

Running More Than One Instance

These guides deploy a single instance. To run several instances behind a load balancer, you need sticky sessions, so that all requests of a user reach the instance that holds their session. When an instance stops, its users lose their UI state, unless the sessions are replicated to other instances. Measure Capacity and Test Failover shows how to measure what an instance can hold, and how to choose between accepting the reload, draining instances, and replicating sessions. For the architecture, see Distributed Deployment Architecture.

To deploy to a servlet container instead of running an executable JAR, to a specific cloud provider, or as a GraalVM native image, see the Deploying to Production reference.

Topics

Build for Production
Create a JAR that runs in production mode, and understand what the build needs.
Configure the Application
Keep production settings in a Spring profile, and secrets out of the source code.
Build a Container Image
Package a Vaadin application in a container image, and give the JVM enough memory.
Deploy Behind a Proxy
Run a Vaadin application behind a reverse proxy that handles TLS, let server push through it, and keep users on the same instance.
Add Health Checks
Give load balancers and container platforms URLs to check, without creating user sessions.
Collect Logs & Metrics
Make logs machine-readable, and expose metrics on a port that users can't reach.
Build on CI
Build, test, and package a Vaadin application on every change, with a license key when needed.