How to Install JasperReports Server on Ubuntu Linux
JasperReports Server turns raw data into reports and charts that you can read in a browser, save as PDF, or share in Excel. It is a free, Java-based reporting tool that runs on your own server. Once it is installed, you open the dashboard at http://localhost:8080/jasperserver.
This guide installs the Community Edition on Ubuntu Linux. You set up Java, a MariaDB database, the Tomcat web server and a systemd service, then install Jasper itself. You need an Ubuntu machine, a user with sudo rights and a working internet connection. Every step runs in the terminal.
Install OpenJDK, MariaDB, and Tomcat. Create a database user for JasperReports. Download and unzip the JasperReports server installer, update its configuration file with your database credentials, and run the installation script.
Install Java OpenJDK
JasperReports runs on Java, so you install OpenJDK first. Do this before anything else, because Tomcat and the Jasper installer both depend on it.
- Open a terminal on the server, or connect to it over SSH.
- Refresh the package list so Ubuntu fetches the latest package versions.
- Install OpenJDK with the commands in the code blocks below.
Check the release notes for your Jasper version to see which Java version it supports. Not every Java release works with every Jasper release.
sudo apt update sudo apt install default-jdk
Verify the installation with java --version. It should print a version line that mentions OpenJDK. If the terminal says the command is not found, the install did not finish. Run the install step again and read the output for errors.
Related reading: How to install OpenJDK on Ubuntu Linux
Install MariaDB
Jasper needs a database to store its repository, which holds your users, reports and data source settings. MariaDB is a reliable choice and installs straight from the Ubuntu repositories.
- Install the MariaDB server with the commands below.
- Confirm that the database service is running, and enable it so it starts on boot.
- Run the secure installation script that comes with MariaDB.
sudo apt update sudo apt install mariadb-server sudo mysql_secure_installation
Follow the prompts to secure your database instance. The script lets you set a root password, remove anonymous users, block remote root login and delete the test database. Say yes to all of these on a server that other people can reach. How to install MariaDB on Ubuntu Linux
Create database account
Create a dedicated database user for JasperReports. Jasper then never needs the MariaDB root account, and a mistake or a leaked password affects only its own data.
- Log in to the MariaDB console as root.
- Create the database that Jasper will use.
- Create the new user with a strong password.
- Grant that user privileges on the Jasper database only.
- Reload the privileges and exit the console.
Write down the database name, username and password. You need the same values later when you edit the Jasper configuration file.
sudo mysql CREATE DATABASE jasperserver; CREATE USER 'jasperadmin'@'localhost' IDENTIFIED VIA unix_socket; GRANT ALL ON jasperserver.* TO 'jasperadmin'@'localhost'; FLUSH PRIVILEGES; exit;
Install Tomcat server
Tomcat is a web server that runs Java applications. It must be installed before you can set up JasperReports Server on Ubuntu. You create a dedicated user, make an installation folder and download the Tomcat files to your server.
- Create a dedicated system user for Tomcat. Running Tomcat under its own account, not root, limits the damage if the web application is ever compromised.
- Create the installation folder for Tomcat.
- Download the Tomcat archive, extract it into that folder and give the Tomcat user ownership of the files.
Pick a Tomcat version that your Jasper release supports. Check the Jasper documentation before you download. A newer major version of Tomcat can fail with an older Jasper release.
wget https://dlcdn.apache.org/tomcat/tomcat-11/v11.0.0/bin/apache-tomcat-11.0.0.tar.gz
Create a systemd service config for Tomcat
A systemd service file tells Ubuntu how to run a program in the background. With one in place, Tomcat starts automatically when the machine boots, and you can control it with the usual service commands. You create the file in the system folder and add your Java paths so the web server runs correctly.
- Open a new service file in the systemd folder with a text editor, using sudo.
- Paste in the configuration shown below.
- Save the file and close the editor.
sudo nano /etc/systemd/system/tomcat.service
Use this configuration, noting the dynamic path for Java. The Java folder name changes with the CPU architecture and the Java version, so a path that works on one machine can fail on another. The dynamic path avoids that problem. If you hard-code the path instead, check that the folder exists on your system.
Environment="JAVA_HOME=/usr/lib/jvm/default-java"
sudo systemctl daemon-reload sudo systemctl start tomcat
Install JasperReports server
You install JasperReports Server Community Edition by downloading the setup files and unpacking them inside your Tomcat directory. You then work as the Tomcat user, so every file the installer creates has the right owner and permissions.
- Download the Community Edition setup archive to the server.
- Unpack it and move into the unpacked folder.
- Switch to the Tomcat user account.
- Copy the sample database configuration file for MariaDB, if the package includes one, and edit that copy.
sudo su - tomcat wget https://sourceforge.net/projects/jasperserver/files/JasperServer/JasperReports%20Server%20Community%20edition%209.0.0/TIB_js-jrs-cp_9.0.0_bin.zip unzip TIB_js-jrs-cp_9.0.0_bin.zip cd jasperreports-server-cp-9.0.0-bin/buildomatic cp sample_conf/mysql_master.properties default_master.properties nano default_master.properties
Update the default_master.properties file with your database credentials. Enter the database host, the database name, and the username and password you created earlier. Also point the file at your Tomcat folder. A typo here is the most common reason the installer fails, so check each value. Finally, run the installer:
./js-install-ce.sh
Access JasperReports portal
The JasperReports Server portal opens in any web browser once the service is running. Tomcat listens on port 8080 by default.
- Make sure the Tomcat service is running. If you ran the installer while it was stopped, start it now. If it was already running, restart it so it loads the new Jasper application.
- Open a browser and type your server address followed by port 8080 into the address bar, then add /jasperserver. On the server itself, use http://localhost:8080/jasperserver. From another computer, use the server's IP address in place of localhost.
- Wait for the login page. The first start can take a minute or two while Jasper sets itself up.
If the page does not load from another computer, the firewall may be blocking the port. When UFW is active on Ubuntu, allow port 8080 through it.

Log in with the default credentials (username: jasperadmin, password: jasperadmin). You should now see the Jasper home page. Change the password immediately after your first login, because these defaults are public knowledge. In the web interface, go to Manage Users, select the user and set a new password. Check the same list for any other default accounts and change those passwords too.

For advanced setups, you can put a reverse proxy such as Nginx or Apache in front of Tomcat. The proxy handles traffic on the standard web ports, can add HTTPS with a certificate, and lets you give users a clean address with no :8080 on the end. Once the proxy works, you can close port 8080 to outside traffic so that people reach Jasper only through the proxy.
[Unit] [Service] [Install] [echo]Have a question about this guide?
Answered by AI from this guide. Good questions may be added to this page — please don't include personal details.
Did this guide fix your problem?
About the Author
Richard
Tech Writer, IT Professional
Richard is a writer at Geek Rewind who turns complex IT tasks into clear, step-by-step guides. He draws on years of hands-on experience in system administration and enterprise IT operations, focusing on Windows, Linux and WordPress: the problems people actually run into, and the fixes that work. His server and WordPress guides come from systems he runs himself. Richard builds and maintains the platform behind Geek Rewind, from its Ubuntu servers and Nginx configuration to its custom WordPress plugins. Many new tutorials start with readers' questions, and he's always glad to answer them in the comments.
No comments yet — be the first to share your thoughts!