Explanation: moving Openfire to a new server

It is quite a common question coming up in the forums “How do i move Openfire to another server?” and there is no official or comprehensive guide about doing it. So i will try to make one and will add every thought i have about it. It can be updated with ideas from other users.


It can be a different process on different operating systems or using different installation variants. Although it is also sometimes very similar.

On Windows you may want keep the connection to system’s registry, so when you run an installer for newer version, it would automatically detect the current installation folder and would run the uninstall process correctly. On Linux you might want to move your startup script to a new machine (especially if you use some custom scripts).

Windows installation

In my opinion the easiest way to move Windows based Openfire installation is:

  • To first install the same version on a new server (if you use older version, you can find the installer here).
  • Not run the usual web setup.
  • Then go to installation folder and delete everything except for .install4j and uninstall.exe.
  • Stop Openfire at original location.
  • Copy everything from the original location folder (except for .install4j and uninstall.exe).
  • If you use a service, run command to install it (it is covered in the installation guide).
  • Run the service (or the launcher) and see if you can login to Admin Console on the server itself.

It might work without keeping .install4j and uninstall.exe at the new location. But i’m not sure what exactly is stored in this folder and in Windows registry and if it won’t confuse new system with some parameters related to the old server.

Linux installation

I suspect it should be very similar to Windows based migration. Install on a new location, copy files from the old location. Although embedded database and config files might be in separate locations. Depends on Linux OS used. But i think most often it installs into /opt/openfire.


If you are using the Embedded database option, then your database will be copied with all the other files as it is stored in the installation folder. Nothing should be required to do.

If external database is in use, it depends whether it is installed on the same server as Openfire and has to be moved also, or maybe it is on some other server. Moving external database can be complex. In short it will involve making a dump/snapshot of your current database. Installing database at a new location and then restoring that dump/snapshot to a new database location. Then you should also edit /openfire/conf/openfire.xml and point to a new location of a database in that file at the ConnectionProvider line.

If external database is not on the same server and is not moving, then it should just work after moving Openfire as the connection string should stay the same and work, no matter where Openfire is moving.


Openfire needs some TCP ports open to operate. You can find them on the first page of Admin Console (5222 for clients, 9090 or 9091 for Admin Console, etc.). You should create rules for needed ports on the new server in advance. Also it is a good idea to try to temporarily disable firewall on a new server, if Openfire can’t be reached on a new server after the migration. This way you will make sure it is not a firewall issue.

Network (DNS)

This is the most complicated part. And it depends on how sophisticated was your initial Openfire setup. If your XMPP Domain name was the same as the machine’s name of your old server, then you will run into problems. You can probably shut down the old machine and rename your new server to use the same name. If not, you will have to re-run the Openfire web setup and set a new XMPP Domain value, but then your clients will have to login to a new domain. It will be even worse if IP address was in use instead. If you had a proper setup with correct DNS entries, then it will only require to change one or two DNS entries. Won’t go into details here, but one can read on proper name resolution setup in my other guide here.


This is perfect. Thank you for this information. I was able to move everything over to my new server with no issues.

1 Like

What is meant by “Not run the usual web setup”?

I’d like to guess “Next, run the usual web setup” but that’s like AssUMeing things

Thank you.


It can probably be worded better, but would have to redo the whole section. It means “Do not run the usual web setup”. Only running Windows installer is enough. This point is added because web setup is the next step in a regular installation, but not required for this migration case.

Thank you!
Glad I did not AssUMe there was a typo and asked for clarification.

Planning on doing this soon.

Much appreciated!

Thank you VERY much for posting this Valuable and useful info!

Successfully migrated Openfire using your instructions - with a couple of tweaks.

Turned off an EIGHT year old computer in the process.

1 Like