Deploying to Production

Deploying to a production server involves compiling and packaging the application to be suitable and optimized for the server.

While you may have launched your server directly from your IDE during development, for production you need to deploy the application as a WAR file (Java Servlet) or JAR file that includes your application server (Spring Boot & other embedded servers).

By default, Vaadin applications are set up to run in the development mode. This requires a bit more memory and CPU power, but enables easier debugging. When deploying your app to your users, you will want to switch to the production mode instead.

The main difference between the development and production modes is that in the development mode Vaadin uses webpack to serve JavaScript files to the browser, instead of the Java server the app is running on. This is so that if you change a JS or CSS file, your changes are picked up and served automatically. When in production mode, you do not want this extra overhead since the files will not change; it is more efficient to prepare JavaScript and CSS files once, during build, and let one server (the Java Server) serve all requests. At the same time, the client resources can be optimized and minified to reduce the load on the network and browser even further.

Topics

Production Build
Create an optimized build of your application for production deployment.
Servlet Container
Deploy your application to traditional servlet containers, such as Tomcat, Jetty or any Java/Jakarta EE server.
Spring Boot
Deploying a Spring Boot based application.
Cloud Providers
Learn how to deploy your application to 3rd party cloud hosting providers.
Troubleshooting
Guidance if you have problems taking Vaadin applications to production.