Skip to main content

Overview

To update ejabberd you need to remove it, then re-install with the latest version.  However, do check for database changes before initiating this process from the ejabberd documentation site (https://docs.ejabberd.im/admin/upgrade/).

Preparation

Before you begin this process you first need to create a copy of the config file.  Not sure where this file is located?  Then in shell run 

ejabberdctl help

When I run this command the output received is 

Commands to start an ejabberd node:
  start      Start an ejabberd node in server mode
  debug      Attach an interactive Erlang shell to a running ejabberd node
  iexdebug   Attach an interactive Elixir shell to a running ejabberd node
  live       Start an ejabberd node in live (interactive) mode
  iexlive    Start an ejabberd node in live (interactive) mode, within an Elixir shell
  foreground Start an ejabberd node in server mode (attached)

Optional parameters when starting an ejabberd node:
  --config-dir dir   Config ejabberd:    /usr/local/etc/ejabberd
  --config file      Config ejabberd:    /usr/local/etc/ejabberd/ejabberd.yml
  --ctl-config file  Config ejabberdctl: /usr/local/etc/ejabberd/ejabberdctl.cfg
  --logs dir         Directory for logs: /usr/local/var/log/ejabberd
  --spool dir        Database spool dir: /usr/local/var/lib/ejabberd
  --node nodename    ejabberd node name: ejabberd@localhost

The output above notes the config file ejabberd.yml is located in /usr/local/etc/ejabberd directory.

How come I need to create a copy of the config file?  Well shortly we will remove ejabberd from the server.

Create a copy of ejabberd.yml with the following command

cp ejabberd.yml ejabberd_copy.yml

Personally I go as far as downloading the config file copy.

Once you have downloaded a copy of the config file, now you can remove ejabberd from the server.

To move the file, enter the following

mv "ejabberd_copy.yml" ../

Change the ../ to point to the directory you want the file to be relocated.  In this instance, the file is moved to the parent directory.

Removing ejabberd

yum remove ejabberd

Re-installing ejabberd

Go to our install ejabberd documentation

 

Related articles

Andrew Fletcher02 May 2021
Installing Erlang XMPP on Apache
I'm writing these steps primarily for myself as a reference.  However, if someone else finds them useful to great. Adding XMPP framework to your server.  Initially I was going to add Prosody, however as I'm working off an Apache server with Centos 6.10 this quickly proved to a goal that...
Andrew Fletcher12 Jul 2019
Adding ejabbed MYSQL schema to your database
The starting point is to read through and follow the notes outlined on the ejabberd site regarding adding database schema.  The purpose of this documentation is to clarify where the files were located for me. The schema files can be found in ejabberd priv directory.  To find the...