Skip to content

Setup JIRA on AWS EC2 using port 80

Hosting JIRA on an Amazon EC2 instance is quite easy and can save you a lot of money. Compare $10 per month to a one-time payment of $10 for the self hosted solution. The setup per se is quite easy but by default JIRA doesn’t allow you to use port 80 as it’s default access port. In this tutorial we are going to look into how to still achieve this using iptables on a Linux system.

I recommend using Amazon RDS as the database for JIRA, to increase redundancy and data safety in general.

The first step is to set up an Amazon RDS database, afterwards you can go ahead fire up an EC2 instance and install JIRA. I used the recommended Amazon Linux Image for my installation.

After the machine is up and running you simply get the latest JIRA binary and execute it.
Get the download link of the latest version here: https://www.atlassian.com/software/jira/download

Afterwards use wget to download the file onto your EC2 instance:

Now all you have to do is make the file executable and then run it and follow the steps in the guided installation:

After you have finished the installation guide, you need to change the port mapping using iptables.

Set the iptables configuration using the following commands:

Afterwards the iptables configuration needs to be stored to a local file, which late on is going to be used to load the configuration at boot of the host system.

Store the configuration under  /etc/iptables.rules

In order to load this file after the system has been booted, edit  /etc/rc.local  and append the following command at the very end of it:

Save the file and reboot your system. Double check if everything is working properly, use sudo iptables -L to see if the custom rules have been loaded during the boot. The output should look similar to this:

Afterwards you can continue to use your JIRA by accessing the web interface through port 80.

Published inDevOps

One Comment

  1. Hi Kevin,
    Thank you for this nice article.
    Which type of hosting are you using for the JIRA server?
    How much does it cost per year?

    Thank you

Leave a Reply

Your email address will not be published.