Openfire is an open source real-time collaboration (instant messaging) server, built on the XMPP protocol and available for multiple platforms. This guide will help you get started with Openfire on your Ubuntu 12.04 LTS (Precise Pangolin) Linux VPS.
If you haven't done so already, please follow the steps outlined in our getting started guide before following these instructions, and make sure your system is fully updated. Initial configuration steps will be performed through the terminal; please make sure you're logged into your Linode as root via SSH.
Before installing Openfire, make sure your system is up to date. Enter the following commands, one by one, and install any available updates:
sudo apt-get update sudo apt-get upgrade
Openfire requires a Java runtime engine (JRE). This tutorial uses the OpenJDK provided by the Ubuntu repository. Please note that although alternate Java runtime engines are available, Openfire may not work with them. Enter the following command to install the OpenJDK:
sudo apt-get install openjdk-7-jre
OpenJDK will be installed, along with a series of dependencies it requires.
If you employ a firewall to specify what ports can be accessed on your VPS, verify that you have the following ports open:
Additional ports may need to be opened later to support more advanced XMPP services, but these are the ports that Openfire will use by default.
Installing Openfire is relatively easy and can be completed in just a couple of steps. Here's how to install Openfire:
Visit the download page for the Openfire RTC server and click the link for the .tar.gz file. You will be taken to another page, which will start the download to your workstation. You may cancel this download, as a manual download link will be presented that you may copy to your clipboard and paste in to the wget command in the next step.
Use wget on your Linode to retrieve the package (substitute the link for the current version in the command below).
Change the name of the download by entering the following command:
mv downloadServlet\?filename\=openfire%2Fopenfire_3_7_1.tar.gz openfire_3_7_1.tar.gz
Untar the software by entering the following command:
tar -xvzf openfire_3_7_1.tar.gz
Move the openfire folder to /opt by entering the following command:
mv openfire /opt/
Edit the configuration file /opt/openfire/conf/openfire.xml, inserting your Linode's public IP address in the <interface> section, and removing the "<!-- -->" comment markers that surround the <network> section. While not required, this action is helpful if your Linode has multiple IP addresses, and you wish to limit access to a single address.
Add a symbolic link for the daemon script to /etc/init.d so that you can start the daemon with a call to service:
ln -s /opt/openfire/bin/openfire /etc/init.d/
Start Openfire with the following command:
service openfire start
This completes the initial installation steps for Openfire. Next, we'll continue with configuration through a web browser.
Configuring Openfire is relatively easy and can be completed in just a couple of steps. Here's how to configure Openfire:
Direct your browser to your Linode's IP address or FQDN (fully qualified domain name, if an entry in DNS points to your Linode's IP) on port 9090. As an example, if your Linode's IP address were 126.96.36.199, you would visit http://188.8.131.52:9090 in your web browser. The webpage shown below appears:
Configure your domain and ports for administration. Use the fully qualified domain name you have assigned to your Linode in DNS. For more infomation: configuring DNS with the Linode Manager).
You may choose to use Openfire's internal database for account management, or you may connect to an external database. Most users will want to choose the built-in option.
User profiles may be stored in the server database, or they may be pulled from LDAP or Clearspace. Most users will want to choose the default option.
Enter the email address of the default administrative user and select a strong password.
After the initial web-based configuration is complete, restart the Openfire server before attempting to log in with the default "admin" user account. Enter the following commands, one by one:
service openfire stop service openfire start
If you're experiencing difficulty using the credentials you just created to log in, please use "admin/admin" as the username/password. You'll need to update your credentials immediately afterward for security purposes. Congratulations! You've successfully installed the Openfire RTC server on Ubuntu 12.04 LTS.
You may wish to consult the following resources for additional information on this topic. While these are provided in the hope that they will be useful, please note that we cannot vouch for the accuracy or timeliness of externally hosted materials.
This guide is licensed under a Creative Commons Attribution-NoDerivs 3.0 United States License.
Last edited by Doug Freed on Wednesday, January 23rd, 2013 (r3288).