Tomcat Server

Tomcat Server Cloud Hosting

Apache Tomcat is a widely used Java server for web applications. This guide covers Tomcat installation, version changes, vertical and horizontal scaling, automatic clustering, application deployment, configuration, security, and multiple-domain hosting.

Create Tomcat Server

i

Initialization system

The current Tomcat template uses the modern systemd initialization daemon.

1

Open the environment wizard

Sign in to the dashboard and click New Environment.

2

Select Tomcat

Open the Java tab, select Apache Tomcat, and choose a version available in the list. The platform supports Tomcat releases starting from version 7 through current supported versions.

Create a new Tomcat environment
Select the required Tomcat version in the topology wizard.
3

Create and test the environment

Complete the remaining topology settings and click Create. When provisioning finishes, click Open in Browser next to the Tomcat node.

Tomcat environment created
The Tomcat environment is ready to use.
Tomcat welcome page
The Tomcat welcome page confirms that the server is running correctly.

Each Tomcat server operates inside an isolated container with its own private IP address and unique DNS record.

Change Tomcat Version

The Tomcat and JDK versions can be changed by redeploying the container while preserving supported data and configuration.

1

Open container redeployment

Click Redeploy Container(s) beside the Apache Tomcat server layer.

Tomcat redeploy button
Start redeployment from the Tomcat server layer.
2

Select the target versions

Choose the required Tomcat and JDK engine versions, review the redeployment options, and confirm the change.

Tomcat container redeploy dialog
Select the new Tomcat and JDK versions.

Tomcat Clustering and Scaling

Automatic Vertical Scaling

Set the upper Cloudlet limit in the topology wizard. The platform dynamically increases or reduces RAM and CPU allocation according to Tomcat demand. One Cloudlet represents 128 MiB of RAM and 400 MHz of CPU.

Tomcat vertical scaling Cloudlets
Configure the maximum resource limit for automatic vertical scaling.

Manual Horizontal Scaling

Use the Horizontal Scaling controls in the topology wizard to set the required number of Tomcat nodes.

StatelessCreates all new nodes from the base image template simultaneously.
StatefulCopies the file system of the primary container into the new nodes sequentially.
Load balancingWhen the layer is scaled beyond one node, an NGINX load balancer is added automatically unless another option is selected.
Node limitThe maximum number depends on the hosting provider and is commonly 16 nodes.
Manual horizontal scaling for Tomcat
Set the number of Tomcat nodes in the topology wizard.

Automatic Horizontal Scaling

Create triggers that monitor CPU, RAM, network, or disk usage and automatically add or remove Tomcat nodes when the configured conditions are met.

Tomcat automatic horizontal scaling
Open Auto Horizontal Scaling from the environment settings.

Automatic Tomcat Clustering

Enable Auto-Clustering in the dashboard to configure a reliable Tomcat cluster automatically.

  • Tomcat auto-clustering is available from versions 10.0.5, 9.0.45, 8.5.64, and 7.0.108.
  • TomEE auto-clustering is available from versions 9.0.0-M3 and 8.0.5.
  • Older releases can continue using the previous clustering and session-replication functionality.
Enable Tomcat auto-clustering
Enable automatic clustering in the topology wizard.

Deploy Application to Tomcat Environment

HOT_DEPLOY variable

Tomcat and TomEE support the optional HOT_DEPLOY variable. Values such as true, enabled, or 1 allow deployment without restarting the server. Hot deployment is disabled by default because some applications do not support it.

Tomcat HOT_DEPLOY variable
Configure HOT_DEPLOY when the application supports restart-free deployment.
1

Upload the package

Open Deployment Manager, select the Archive tab, and upload a WAR, EAR, or ZIP package from your computer or an external URL.

2

Deploy to the environment

Hover over the uploaded package, click Deploy to, select the Tomcat environment, and define the deployment context or keep the default ROOT context.

3

Review the deployment

After completion, the application appears in the environment deployment list. Deployment hooks can be added to run scripts before or after deployment.

Deployment Manager
Open Deployment Manager to upload the Java archive.
Tomcat application deployment dialog
Select the Tomcat environment, context, and optional deployment hooks.

Tomcat Configurations

Environment variablesUse default and custom variables instead of hardcoding environment-specific values.
Configuration filesClick Config beside the Tomcat node to edit files directly through the dashboard.
FavoritesFrequently used configuration directories are available in the file manager’s Favorites list.
Tomcat configuration file manager
Edit Tomcat configuration files directly from the dashboard.

Security and Multiple Domains

  • Configure user authentication to restrict access to deployed applications.
  • Deny access from selected IP addresses when required.
  • Use Container Firewall rules to control internal and external connectivity.
  • Configure multiple domain names on one Tomcat server by adjusting the relevant Tomcat configuration files.
Tomcat container firewall
Use container firewall rules to control Tomcat access.
Multiple domains on Tomcat
Host multiple domains through one Tomcat server configuration.

Expected Result

A managed Tomcat environment is created with the required server and JDK versions. It can be scaled vertically or horizontally, clustered automatically, configured through the dashboard, secured with access controls and firewall rules, and used to deploy Java applications from archives or repositories.

Important Notes

  • Check application compatibility before changing the Tomcat or JDK version.
  • Use Stateful scaling when new nodes must inherit the primary node file system.
  • Confirm provider-specific account limits before scaling to many nodes.
  • Enable HOT_DEPLOY only when the application supports deployment without a server restart.
  • Use clustering or shared session storage for multi-node applications that require session continuity.
  • Review firewall and authentication settings before exposing the server publicly.

Common Issues and Solutions

Tomcat welcome page does not openCheck the node status, deployment task, browser URL, load balancer, public IP, and firewall rules.
Application deployment failsVerify the archive type, application context, Tomcat/JDK compatibility, deployment hooks, and server logs.
New nodes miss application filesUse Stateful horizontal scaling or redeploy the application to all nodes.
Sessions are lost between nodesEnable supported clustering or use shared external session storage.
Hot deployment causes errorsDisable HOT_DEPLOY and allow the Tomcat server to restart during deployment.
Version change causes startup failureReview application compatibility, JVM arguments, dependencies, and redeployment logs.