diff --git a/src/freedombone-app-xmpp b/src/freedombone-app-xmpp
index ee4a28958b33a9a844b66a80ae819d87b391c9b4..e125531475ab0881426c06343a4f8e87a1ec486e 100755
--- a/src/freedombone-app-xmpp
+++ b/src/freedombone-app-xmpp
@@ -697,6 +697,17 @@ function upgrade_xmpp {
     xmpp_contact_info /etc/prosody/prosody.cfg.lua
     xmpp_server_blacklist /etc/prosody/prosody.cfg.lua
 
+    # add word filter to muc
+    if ! grep -q '"filter_words"' /etc/prosody/prosody.cfg.lua; then
+        sed -i '/"muc_limits"/a "filter_words";' /etc/prosody/prosody.cfg.lua
+        sed -i 's|"filter_words"|        "filter_words"|g' /etc/prosody/prosody.cfg.lua
+        xmpp_restart=1
+    fi
+    if ! grep -q 'filter_words =' /etc/prosody/prosody.cfg.lua; then
+        echo 'filter_words = {}' >> /etc/prosody/prosody.cfg.lua
+        xmpp_restart=1
+    fi
+
     # remove muc logging
     if grep -q '"muc_log"' /etc/prosody/prosody.cfg.lua; then
         sed -i '/"muc_log"/d' /etc/prosody/prosody.cfg.lua
@@ -1258,6 +1269,7 @@ function xmpp_create_config {
       echo '    name = "Chatrooms"';
       echo '    modules_enabled = {';
       echo '        "muc_limits";';
+      echo '        "filter_words";';
       echo '        "muc_block_pm";';
       echo '        "tls";';
       echo '        "vcard_muc";';
@@ -1277,6 +1289,7 @@ function xmpp_create_config {
           echo "    }"; } >> /etc/prosody/prosody.cfg.lua
     fi
     { echo 'storage = { muc_log = "sql"; }';
+      echo 'filter_words = {}';
       echo 'sql = { driver = "SQLite3", database = "prosody.sqlite" }';
       echo 'muc_event_rate = 0.5;';
       echo 'muc_burst_factor = 10;';