Package versions change between releases. Run apt-cache policy tomcat10 (Debian) or dnf info tomcat (Rocky and Alma) first to see what you get. The Ubuntu version of this guide is here; Debian is very close to it.
Debian 12 or 13
sudo apt update
sudo apt install -y tomcat10 default-jdk-headless
sudo systemctl enable --now tomcat10
systemctl status tomcat10 --no-pager
Paths on Debian:
| What | Where |
|---|---|
| Configuration | /etc/tomcat10/ (server.xml, tomcat-users.xml) |
| Applications | /var/lib/tomcat10/webapps/ |
| Logs | /var/log/tomcat10/ and journalctl -u tomcat10 |
| JVM options | /etc/default/tomcat10 |
Rocky Linux or AlmaLinux 9
sudo dnf install -y java-17-openjdk-headless tomcat
sudo systemctl enable --now tomcat
systemctl status tomcat --no-pager
The Enterprise Linux package is Tomcat 9, so applications must use the javax.* namespace. For Tomcat 10 or 11 on these systems, use the tarball from tomcat.apache.org and a systemd unit (see the Ubuntu guide for a unit file that works anywhere).
| What | Where |
|---|---|
| Configuration | /etc/tomcat/ |
| Applications | /var/lib/tomcat/webapps/ |
| Logs | /var/log/tomcat/ |
| JVM options | /etc/tomcat/tomcat.conf |
Open the port, or better, do not
Tomcat listens on 8080. The best setup keeps 8080 closed to the internet and puts Nginx in front. If you only want a quick test from your own machine:
# Rocky and Alma
sudo firewall-cmd --add-port=8080/tcp --permanent && sudo firewall-cmd --reload
# Debian with ufw
sudo ufw allow 8080/tcp
Remove that rule again when you are done testing.
Check that it works
curl -I http://localhost:8080/
Any HTTP/1.1 answer means Tomcat is running. A fresh package install may return 404 for / because no ROOT application is installed. That is fine. Deploy yours as described in Deploy a WAR file to Tomcat.
Set the heap before you go live: Tomcat memory settings. Our Tomcat hosting plans come with this already done.
Questions about tomcat on debian or rocky linux
Which Tomcat version should I install?
Use Tomcat 10.1 or 11 for new applications that use jakarta.* packages. Use Tomcat 9 only for older applications that still use javax.*.
Why is there no Tomcat 10 on Rocky Linux?
The Enterprise Linux repositories ship Tomcat 9. For a newer version install the official tarball.
Last updated October 29, 2026.