Super Java Host
  1. Home
  2. Java hosting
  3. Tomcat hosting

Tomcat hosting on a server of your own

Apache Tomcat installed, tuned for your memory and behind Nginx with SSL. Upload a WAR, run one command, and your application is live.

What Tomcat hosting means on a VPS

Apache Tomcat is the servlet container behind a large share of Java web applications. It runs WAR files, JSP pages and Spring MVC applications, and it starts quickly compared with a full Jakarta EE server. On a VPS you get Tomcat as a service on your own machine instead of a slot in somebody else's JVM.

That matters because a Tomcat process holds its heap for as long as it runs. With your own server you decide the heap size, the Java version, the connector settings and which other services share the machine.

Which Tomcat version should you pick

TomcatServlet APIPackage namespaceMinimum Java
Tomcat 9Servlet 4.0 (Java EE 8)javax.servletJava 8
Tomcat 10.1Servlet 6.0 (Jakarta EE 10)jakarta.servletJava 11
Tomcat 11Servlet 6.1 (Jakarta EE 11)jakarta.servletJava 17

The key line is the namespace. An application written for javax.servlet runs on Tomcat 9. The same application on Tomcat 10 or newer has to be migrated to jakarta.servlet, either by updating the code and libraries or with the Tomcat migration tool. If you are not sure, start on Tomcat 9 for older code and Tomcat 10.1 or 11 for anything new.

What we set up

  • OpenJDK of your choice and the Tomcat version you ask for, running as its own unprivileged system user.
  • JVM options sized to the memory of your server, with the heap set to a safe share of RAM.
  • Nginx as the reverse proxy on ports 80 and 443, with a free Let's Encrypt certificate that renews itself.
  • Tomcat listening on localhost only, so it cannot be reached except through Nginx.
  • A firewall, fail2ban for SSH, and automatic security updates.
  • A deploy-app command that installs your WAR as the root application and restarts Tomcat.

Deploying a WAR

# copy the file to the server
scp target/myapp.war you@your-server:/tmp/

# on the server
sudo deploy-app /tmp/myapp.war

The WAR is deployed to the root of your domain. For a full walk-through, including multiple applications and the Manager app, read how to deploy a WAR file to Tomcat.

How much memory does Tomcat need

A single small application runs in a heap of 256 to 512 MB, so a 2 GB server is enough. Applications with larger caches, many sessions or heavy frameworks need more. With a database on the same server, plan for a JVM heap of about 45% of RAM. The details are in how much RAM a Java app needs.

TomEE

Apache TomEE is Tomcat with Jakarta EE APIs added. If your application needs EJB or JPA on top of servlets, we can install TomEE on request. Many applications that people deploy to TomEE are also happy on Tomcat plus the libraries they bundle, or on WildFly when they need the full platform.

Self-managed or Managed

With Self-managed you have root access and we do the initial installation. Managed starts at €30.30 a month and adds updates, offsite backups, monitoring and JVM tuning. See Managed Java hosting.

Questions about tomcat hosting

Can I run several WAR files on one server?

Yes. Tomcat can host several applications under different context paths or virtual hosts. Give the JVM enough heap for all of them together.

Does Tomcat hosting include a control panel?

No. You manage Tomcat over SSH, with systemctl and the deploy command. This keeps memory free for your application instead of a panel.

Can I use the Tomcat Manager app?

Yes, on request. We keep it off the public internet by default and reach it through an SSH tunnel.

Which Java versions work with Tomcat 10 and 11?

Tomcat 10.1 needs Java 11 or newer. Tomcat 11 needs Java 17 or newer. Tomcat 9 also runs on Java 8.

Your own Java server, billed monthly

Plans from €15.30 a month. Set up for you, or run for you.