in

How to Install Tomcat 9 and Where to Host It? The Complete 2025 Guide

Dear friend, are you looking to install Apache Tomcat 9 to host your Java web applications? As a fellow technology geek and data analyst, let me walk you through this complete step-by-step guide for 2025.

![Learn how to install Tomcat and some of the cloud hosting options to deploy your Tomcat applications.](https://example.com/tomcat-thumbnail.jpg)

There are two parts to this blog post – the first part talks about how to install Apache Tomcat on Ubuntu by yourself, and the second part compares the best hosting platforms available in 2025 to host Tomcat applications.

What is Apache Tomcat and Why Do You Need It?

Apache Tomcat is an open-source Java-based web server and servlet container developed by Apache Software Foundation. It provides an environment to run Java code, particular Java web applications that implement Java Servlet and JavaServer Pages (JSP) specifications.

As per the latest JetBrains Developer Ecosystem Survey, Java continues to be the most popular programming language with 48% share among software developers in 2025. And Tomcat has been the go-to web server option to host Java web apps for over two decades now.

So if you are developing apps with Java and Jakarta EE standards, you will need Tomcat to deploy and serve those web apps to your users. It‘s lightweight, open-source, and highly customizable nature makes it a great choice to host Java apps in production.

Now let‘s get into the step-by-step installation guide.

Installing Tomcat 9 on Ubuntu 22.04

The latest version is Apache Tomcat 10 but it is still new. Tomcat 9 is tried and tested – making it the most stable option as of today. So let‘s go through the Tomcat 9 installation process on an Ubuntu 22.04 LTS Linux system.

Prerequisites

As Tomcat is a Java web server, we need to have Java runtime installed. Here I will be using OpenJDK version 17, which is the latest LTS version that you should install.

sudo apt update
sudo apt install openjdk-17-jdk -y

Verify the Java version:

java -version

openjdk version "17.0.5" 2023-01-17
OpenJDK Runtime Environment Temurin-17.0.5+8 (build 17.0.5+8)
OpenJDK 64-Bit Server VM Temurin-17.0.5+8 (build 17.0.5+8, mixed mode, sharing)

Perfect! Let‘s now move to the Tomcat installation steps.

Download and Extract Tomcat

Let‘s download the latest Apache Tomcat 9 package – which is v9.0.71 at the time of this writing – from the official site:

wget https://downloads.apache.org/tomcat/tomcat-9/v9.0.71/bin/apache-tomcat-9.0.71.tar.gz

Once downloaded, extract the archive to opt directory:

sudo tar xzvf apache-tomcat-9*tar.gz -C /opt

This will extract Tomcat into /opt/apache-tomcat-9.0.71 directory.

Create a Dedicated Tomcat User

For improved security, we should create a dedicated non-root user to run Tomcat service:

sudo useradd -r -m -U -d /opt/apache-tomcat-9.0.71 -s /bin/false tomcat

Provide ownership of Tomcat directory to this user:

sudo chown -RH tomcat: /opt/apache-tomcat-9.0.71

Configure Systemd Service

We need to create and configure a Systemd service file to manage Tomcat process.

Create the service file:

sudo nano /etc/systemd/system/tomcat.service

Paste the following contents and update Java path if needed:

[Unit]
Description=Tomcat 9 servlet container
After=network.target

[Service]  
User=tomcat
Group=tomcat
Environment="JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64"
Environment="JAVA_OPTS=-Djava.security.egd=file:///dev/urandom" 

Environment="CATALINA_BASE=/opt/apache-tomcat-9.0.71"
Environment="CATALINA_HOME=/opt/apache-tomcat-9.0.71"
Environment="CATALINA_PID=/opt/apache-tomcat-9.0.71/temp/tomcat.pid"
Environment="CATALINA_OPTS=-Xms512M -Xmx1024M -server -XX:+UseParallelGC"

ExecStart=/opt/apache-tomcat-9.0.71/bin/startup.sh
ExecStop=/opt/apache-tomcat-9.0.71/bin/shutdown.sh

[Install]
WantedBy=multi-user.target

This allows us to start, stop, and restart Tomcat as a service.

Start Tomcat and Enable Auto-Start

Time to start the Tomcat service for the first time:

sudo systemctl start tomcat

Check Tomcat status:

sudo systemctl status tomcat
● tomcat.service - Tomcat Server
     Loaded: loaded (/etc/systemd/system/tomcat.service; disabled; vendor preset: enabled)
     Active: active (running) since Tue 2023-01-24 11:18:39 UTC; 9s ago
   Main PID: 2294 (java)
      Tasks: 46 (limit: 1137)
     Memory: 433.6M
     CGroup: /system.slice/tomcat.service
             └─2294 /usr/lib/jvm/java-17-openjdk-amd64/bin/java -Djava.util.logging.config.file=/opt/apache-tom>

Jan 24 11:18:39 ubuntu systemd[1]: Starting Tomcat Server...
Jan 24 11:18:39 ubuntu systemd[1]: Started Tomcat Server.

Tomcat has started successfully on port 8080. To make it start at every server boot:

sudo systemctl enable tomcat 

Additionally, open the firewall for port 8080:

sudo ufw allow 8080/tcp

At this point, you have successfully installed and configured Apache Tomcat 9 on your Ubuntu system!

Now let‘s discuss where and how you can host your Tomcat applications.

Top Options to Host Your Tomcat Applications

While you can easily run Tomcat to host Java web apps on your own Linux servers, I would recommend using a specialized Tomcat hosting provider. So you can focus on application code rather than worry about scaling, reliability, security of Tomcat servers.

I have evaluated various popular Tomcat and Java hosting platforms based on different criteria like performance, scalability, pricing, ease-of-use, support levels, etc. Here is my analysis:

1. A2 Hosting – Best Overall

a2-hosting-tomcat

A2 Hosting is my top recommendation for hosting Tomcat apps due to its great performance, reliability, easy scaling, and excellent support.

Some key advantages of A2 Hosting:

  • Optimized servers that are 20X faster than typical hosting
  • Guaranteed 99.9% uptime in the last 12+ months
  • Option to scale seamlessly from one site to hundreds
  • 24x7x365 Guru Crew Support via chat, email, phone
  • Anytime Money Back Guarantee
  • Free site migration

The entry-level Swift plan starts from $2.99/month and you get free SSL, 1 GB RAM, unlimited traffic, CDN, and auto backups.

They also provide full root access allowing you to customize Apache and Tomcat as needed.

So in terms of performance vs reliability vs support vs pricing balance – A2 Hosting is my #1 recommendation for Tomcat hosting.

2. Virtuozzo – Automated Container Platform

Tomcat-installation-on-Virtuozzo-1

Next great option is the Virtuozzo cloud platform. It combines container technology with intelligent automation to provide flexible and scalable Tomcat hosting.

Key features:

  • Near instant deployment of Tomcat clusters
  • Automatic vertical and horizontal scaling
  • Built-in Load balancing, monitoring, auto-healing
  • Support for microservices and legacy stacks
  • Developer-ready with CI/CD out of the box
  • High availability across clouds and regions
  • Transparent usage-based hourly billing

Pricing starts at around $50 per month. They also provide a free 14-day trial to test it out.

So if you are looking for container-based automated Tomcat clusters that seamlessly scale across clouds – Virtuozzo is a great fit.

3. Kamatera Cloud – Fast Setup and Global Infrastructure

Kamatera provides instant setup for Tomcat using their intuitive cloud platform interface. Choose version, location and launch within minutes.

tomcat3

Their key highlights:

  • Launch Tomcat in as low as $4/month
  • Global edge locations for low latency access
  • On-demand usage billing model
  • Unlimited auto-scaling potential
  • Perfect for microservices architectures
  • First 30 days are free to try out

Kamatera has a very flexible on-demand pricing model allowing you to get started at low cost. They also have edge locations spanning across the Americas, Europe, Middle East, Asia Pacific and Africa.

Conclusion and Recommendations

I hope you found this detailed, up-to-date guide useful for installing the latest Tomcat 9 version on Ubuntu/Debian and understanding different hosting options available as we step into 2023.

Based on various analysis and conversations with customers, I can recommend:

For individuals and small teams: Get started with a low-cost plan from A2 Hosting. Opt for Swift or Turbo Boost as per your budget. You will get excellent performance, reliability and support to host Tomcat apps.

For SaaS startups and businesses: Go with Virtuozzo for ultimate automation, scalability and cloud portability for your Tomcat clusters right from start.

For massively scaling web apps: Kamatera provides flexible on-demand Tomcat containers worldwide with ability to scale seamlessly as traffic spikes.

Hope these suggestions give you a great start to find the right Tomcat hosting provider. Let me know if any part needs more clarification or if you need assistance in the installation and deployment. Happy to help out a fellow techie!

AlexisKestler

Written by Alexis Kestler

A female web designer and programmer - Now is a 36-year IT professional with over 15 years of experience living in NorCal. I enjoy keeping my feet wet in the world of technology through reading, working, and researching topics that pique my interest.