diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..bed3c5d2 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,43 @@ +name: ci + +on: + push: + branches: + - master + +permissions: + contents: write + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Configure Git Credentials + run: | + git config user.name github-actions[bot] + git config user.email 41898282+github-actions[bot]@users.noreply.github.com + - uses: actions/setup-python@v5 + with: + python-version: 3.x + - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV + - uses: actions/cache@v4 + with: + key: mkdocs-material-${{ env.cache_id }} + path: .cache + restore-keys: | + mkdocs-material- + - run: pip install mkdocs-material \ + "mkdocs-material[imaging]" \ + mkdocs-material-extensions \ + mkdocs-htmlproofer-plugin \ + mkdocs-redirects \ + mkdocs-with-pdf \ + beautifulsoup4 + - run: make home + - run: make pdf + - run: make zip + #- run: make test + - run: mkdocs gh-deploy --force diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..672f4d71 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +*.swp +__pycache__ +content/ejabberd-docs-*.pdf +content/ejabberd-docs-*.zip +.venv/* +site/* +temp/* diff --git a/Makefile b/Makefile index 63f28555..ad6732fa 100644 --- a/Makefile +++ b/Makefile @@ -1,146 +1,301 @@ +#' definitions +# + EJA = `pwd`/../ejabberd/ +DOCKER = `pwd`/../docker-ejabberd/ VERSIONPRE = $(shell git tag --sort=creatordate | tail -n 2 | head -n 1) VERSION = $(shell git tag --sort=creatordate | tail -n 1) -VERSION_ = $(shell git tag --sort=creatordate | tail -n 1 | tr . _) VERSION- = $(shell git tag --sort=creatordate | tail -n 1 | tr . -) VERSIONU = $(shell git tag --sort=creatordate | tail -n 1 | tr -d .) -ARCHIVE = archive/$(VERSION_) +ARCHIVE = archive/$(VERSION) DEST = content/$(ARCHIVE) -ARCHIVESTRING=" If you are using an old ejabberd release, please refer to the corresponding archived version of this page in the [Archive](/archive/)." +ARCHIVESTRING=" If you are using an old ejabberd release, please refer to the corresponding archived version of this page in the [Archive](../../archive/index.md)." -all: api man +READMES=content/README-DOCS.md -api: - ejabberdctl gen_markdown_doc_for_tags `pwd`/admin-tags.md - # Convert *`something`* API into a link to API Reference - sed -i 's|\*`\([a-z0-9_]*\)`\*|[\1](/developer/ejabberd-api/admin-api/#\1)|g' admin-tags.md - sed -i 's|#\([a-z0-9-]*\)_\([a-z0-9_-]*\))|#\1-\2)|g' admin-tags.md - sed -i 's|#\([a-z0-9-]*\)_\([a-z0-9_-]*\))|#\1-\2)|g' admin-tags.md - sed -i 's|#\([a-z0-9-]*\)_\([a-z0-9_-]*\))|#\1-\2)|g' admin-tags.md - sed -i 's|#\([a-z0-9-]*\)_\([a-z0-9_-]*\))|#\1-\2)|g' admin-tags.md - sed -i 's|#\([a-z0-9-]*\)_\([a-z0-9_-]*\))|#\1-\2)|g' admin-tags.md - mv admin-tags.md content/developer/ejabberd-api - ejabberdctl gen_markdown_doc_for_commands `pwd`/admin-api.md "runtime" json - # Remove three consecutive empty lines after Tags: and Modules: - sed -i 's/^__Tags:__/__Tags:__\nCLEANLINES/g' admin-api.md - sed -i 's/^__Module:__/__Module:__\nCLEANLINES/g' admin-api.md - sed -i '/^CLEANLINES/{N;N;N;//d}' admin-api.md - # Add disclaimer about Archive page for older ejabberd releases - sed -i 's|\(This section.*\)|> \1'$(ARCHIVESTRING)'|g' admin-api.md - # Make URL when mentioning an ejabberd release - sed -i 's| \([0-9][0-9]\)\.\([0-9][0-9]\)| \1.\2|g' admin-api.md - # Convert tricky absolute URLs into valid relative URLS - sed -i 's|http://\./\(#.*\)\(\[[_a-z0-9]*\]\)|\2(/developer/ejabberd-api/admin-api/\1)|g' admin-api.md - # Convert *`mod_something`* into a link to modules section - sed -i 's|\*`mod_\([a-z0-9_]*\)`\*|[mod_\1](/admin/configuration/modules/#mod-\1)|g' admin-api.md - # Convert *`something`* into a link to tags section - sed -i 's|\*`\([a-z0-9_]*\)`\*|[\1](/developer/ejabberd-api/admin-tags/#\1)|g' admin-api.md - # Anchors must use -, not _ characters - sed -i 's|#\([a-z0-9-]*\)_\([a-z0-9_-]*\))|#\1-\2)|g' admin-api.md - sed -i 's|#\([a-z0-9-]*\)_\([a-z0-9_-]*\))|#\1-\2)|g' admin-api.md - sed -i 's|#\([a-z0-9-]*\)_\([a-z0-9_-]*\))|#\1-\2)|g' admin-api.md - mv admin-api.md content/developer/ejabberd-api +TTOPLEVEL=temp/toplevel.md +TTOPLEVELO=$(TTOPLEVEL).orig +TOPLEVEL=content/admin/configuration/toplevel.md -test: - # URLs without trailing slash like this cause broken links: [Basic](basic) - git grep "\[.*\]([-\.\/a-z0-9]*[a-z])" content/ | grep -v ".png" - linkchecker --no-status http://localhost:8080/ +TMODULES=temp/modules.md +TMODULES0=$(TMODULES).orig +MODULES=content/admin/configuration/modules.md + +TAPI=temp/admin-api.md +TAPI0=$(TAPI).orig +API=content/developer/ejabberd-api/admin-api.md + +TTAGS=temp/admin-tags.md +TTAGS0=$(TTAGS).orig +TAGS=content/developer/ejabberd-api/admin-tags.md + +PDFNAME=ejabberd-docs-$(VERSION).pdf +PDF=content/ejabberd-docs.pdf +PDFV=content/$(PDFNAME) + +ZIPNAME=ejabberd-docs-$(VERSION).zip +ZIP=content/ejabberd-docs.zip +ZIPV=content/$(ZIPNAME) + +#. +#' help +# + +help: + @echo "" + @echo " [help] Show this help" + @echo "" + @echo " all clean + extract + site + pdf + zip (requires ejabberd running)" + @echo "" + @echo " clean Remove temporary files" + @echo "" + @echo " extract Extract some documentation from ejabberd (requires ejabberd running)" + @echo "" + @echo " site Generate site as HTML files" + @echo " pdf Generate PDF file of the offline site" + @echo " zip Generate ZIP file of the offline site" + @echo "" + @echo " serve Start MkDocs web server" + @echo " dev Start MkDocs web server in development mode" + @echo "" + @echo " test Test URLs" + @echo "" + @echo " archive Copy some files and generate Archive page" + @echo "" + +all: clean extract site zip pdf -man: +#. +#' extract +# + +extract: temp home livebooks $(READMES) $(TOPLEVEL) $(MODULES) $(API) $(TAGS) + +#. +#' copy markdown files +# + +home: + sed -i 's|\(ejabberd-docs-[0-9\.]*.zip\)|$(ZIPNAME)|g' overrides/home.html + sed -i 's|\(ejabberd-docs-[0-9\.]*.pdf\)|$(PDFNAME)|g' overrides/home.html + +livebooks: + cd content/livebooks/ && for i in $$(ls *.livemd); do cp $$i $${i%.livemd}.md; done + cd content/livebooks/ && for i in $$(ls *.md); do sed -i '2r markdown_head.txt' $$i ; done + cd content/livebooks/ && for i in $$(ls *.md); do sed -i "s|NAME|$${i%.md}.livemd|" $$i ; done + +$(READMES): + cp README.md content/README-DOCS.md + cp $(EJA)/CONTAINER.md content/CONTAINER.md + cp $(EJA)/CONTRIBUTING.md content/contributing/index.md + cp $(EJA)/CODE_OF_CONDUCT.md content/contributing/CODE_OF_CONDUCT.md + cp $(EJA)/CONTRIBUTORS.md content/contributing/CONTRIBUTORS.md + cp $(EJA)/README.md content/README-GIT.md + sed -i '1i# Readme\n' content/README-GIT.md + sed -i 's|(COMPILE.md)|(admin/install/source.md)|g' content/README-GIT.md + sed -i 's|(COPYING)|(COPYING.md)|g' content/README-GIT.md + sed -i 's|(CONTRIBUTING.md)|(contributing/index.md)|g' content/README-GIT.md + cp $(EJA)/CHANGELOG.md content/CHANGELOG.md + sed -i '1i# ChangeLog\n' content/CHANGELOG.md + sed -i 's|^\([a-zA-Z0-9_ ]*:\)|#### \1\n|g' content/CHANGELOG.md + cp $(DOCKER)/ecs/README.md content/README-ECS.md + sed -i 's|# ejabberd Community Server|# `ecs` Container Image|g' content/README-ECS.md + sed -i 's|HUB-README.md|README-HUB.md|g' content/README-ECS.md + cp $(DOCKER)/ecs/HUB-README.md content/README-HUB.md + +#. +#' get files +# + +temp: + mkdir temp + +TTXT=temp/ejabberd.yml.5.txt + +$(TTXT): ejabberdctl man + mv $(EJA)/ejabberd.yml.5.txt $(TTXT) +TXML=temp/ejabberd.yml.5.xml + +$(TXML): $(TTXT) # This prevents suboptions (like acl->ip, ...) to get a TOC entry: - sed -E 's/\*(.*)\*: (.*):::/- *\1*: \2/g' $(EJA)/ejabberd.yml.5.txt >ejabberd.yml.5.txt + sed -E 's/\*(.*)\*: (.*):::/- *\1*: \2/g' $(TTXT) >$(TTXT).1 + mv $(TTXT).1 $(TTXT) - a2x -f docbook ejabberd.yml.5.txt + a2x -f docbook $(TTXT) # Workaround required since Pandoc 2.8 # https://github.com/jgm/pandoc/commit/9b5082b086359a63b92bdb40166fa59dea27afe1 # Alternate workaround would be: https://github.com/jgm/pandoc/issues/6906 - sed -i 's|\(.*\)|
Warning\1
|g' ejabberd.yml.5.xml - sed -i 's|\(.*\)|
Note\1
|g' ejabberd.yml.5.xml + sed -i 's|\(.*\)|
Warning\1
|g' $(TXML) + sed -i 's|\(.*\)|
Note\1
|g' $(TXML) - pandoc -f docbook -t markdown_strict --markdown-headings=setext ejabberd.yml.5.xml -o man-tmp1.md +temp/man-02 temp/man-03: $(TXML) + pandoc -f docbook -t markdown_strict+fenced_code_blocks --markdown-headings=setext $(TXML) -o temp/man-tmp1 # Also required by the Pandoc 2.8 workaround - sed -i 's|> \*\*\(.*\)\.\*\*|> **\1**|g' man-tmp1.md + sed -i 's|> \*\*\(.*\)\.\*\*|> **\1**|g' temp/man-tmp1 # Allow to split the man page in sections: # for pandoc 2.9.2, or pandoc 3 with --markdown-headings=setext - sed -E '$!N;s/[A-Z ]+\n===+/===---===/;P;D' man-tmp1.md >man-tmp2.md + sed -E '$!N;s/[A-Z ]+\n===+/===---===/;P;D' temp/man-tmp1 >temp/man-tmp2 # for pandoc 2.17.1 - #sed -E '$!N;s/^# [A-Z ]+/===---===/;P;D' man-tmp1.md >man-tmp2.md + #sed -E '$!N;s/^# [A-Z ]+/===---===/;P;D' man-tmp1 >man-tmp2 + + csplit temp/man-tmp2 /===---===/ {*} -f temp/man- --suppress-matched + +$(TTOPLEVEL): temp/man-02 + mv temp/man-02 $(TTOPLEVEL) - csplit man-tmp2.md /===---===/ {*} -f man- --suppress-matched +$(TMODULES): temp/man-02 + mv temp/man-03 $(TMODULES) - echo "---\ntitle: Top-Level Options\ntoc: true\nmenu: Top-Level Opts\norder: 80\n---" >toplevel.md - cat man-02 >>toplevel.md +$(TAPI): + ejabberdctl gen_markdown_doc_for_commands `pwd`/$(TAPI) "runtime" json + +$(TTAGS): + ejabberdctl gen_markdown_doc_for_tags `pwd`/$(TTAGS) + +#. +#' process markdown +# + +$(TOPLEVEL): $(TTOPLEVEL) + mv $(TTOPLEVEL) $(TTOPLEVELO) + echo "# Top-Level Options" >$(TTOPLEVEL) + cat $(TTOPLEVELO) >>$(TTOPLEVEL) # Add headers to options so they get TOC entries: - sed -i 's/^\*\*\(.*\)\*\*: \(.*\)/## \1\n\n\2\n/g' toplevel.md + sed -i 's/^\*\*\(.*\)\*\*: \(.*\)/## \1\n\n\2\n/g' $(TTOPLEVEL) # Split paragraph of suboptions, it's nicer to read - sed -i 's/^- \*\*\(.*\)\*\*: \*\([^*]*\)\* \(.*\)/- **\1**: *\2* \n \3/g' toplevel.md + sed -i 's/^- \*\*\(.*\)\*\*: \*\([^*]*\)\* \(.*\)/- **\1**: *\2* \n \3/g' $(TTOPLEVEL) # Add disclaimer about Archive page for older ejabberd releases - sed -i 's|\(This section.*\)|> \1'$(ARCHIVESTRING)'|g' toplevel.md - # Convert tricky absolute URLs into valid relative URLS - sed -i 's|http://\.\.|/admin/configuration|g' toplevel.md - # Convert tricky absolute URLs into valid relative URLS - sed -i 's|http://\.\.|/admin/configuration|g' toplevel.md + sed -i 's|\(This section.*\)\. |> \1. '$(ARCHIVESTRING)' |g' $(TTOPLEVEL) # Convert *`mod_something`* into a link to modules section - sed -i 's|\*`mod_\([a-z_]*\)`\*|[mod_\1](/admin/configuration/modules/#mod-\1)|g' toplevel.md + sed -i 's|\*`mod_\([a-z_]*\)`\*|[mod_\1](modules.md#mod_\1)|g' $(TTOPLEVEL) # Convert *`something`* API into a link to API Reference - sed -i 's|\*`\([a-z0-9_]*\)`\* API|[\1](/developer/ejabberd-api/admin-api/#\1) API|g' toplevel.md + sed -i 's|\*`\([a-z0-9_]*\)`\* API|[\1](/developer/ejabberd-api/admin-api/#\1) API|g' $(TTOPLEVEL) # Convert *`something`* into a link to top-level options - sed -i 's|\*`\([a-z0-9_]*\)`\*|[\1](/admin/configuration/toplevel/#\1)|g' toplevel.md - # Anchors must use -, not _ characters - sed -i 's|#\([a-z0-9-]*\)_\([a-z0-9_-]*\))|#\1-\2)|g' toplevel.md - sed -i 's|#\([a-z0-9-]*\)_\([a-z0-9_-]*\))|#\1-\2)|g' toplevel.md - sed -i 's|#\([a-z0-9-]*\)_\([a-z0-9_-]*\))|#\1-\2)|g' toplevel.md + sed -i 's|\*`\([a-z0-9_]*\)`\*|[\1](#\1)|g' $(TTOPLEVEL) # Convert note to div HTML elements - sed -i 's|\*Note\* about the next option: \(.*\):|
\1
|g' toplevel.md - # Make URL when mentioning an ejabberd release - sed -i 's| \([0-9][0-9]\)\.\([0-9][0-9]\)| \1.\2|g' toplevel.md + sed -i 's|\*Note\* about this option: \(.*\)\. |\n\n|g' $(TTOPLEVEL) + # Convert _`url|something`_ into a relative link + sed -i 's|\*`\(.*\)\|\(.*\)`\*|[\2](\1)|g' $(TTOPLEVEL) + # Link to Archive when mentioning an ejabberd release 2x.xx + sed -i 's| \([2-9][0-9]\)\.\([0-9][0-9]\)| [\1.\2](../../archive/\1.\2/index.md)|g' $(TTOPLEVEL) + cp $(TTOPLEVEL) $(TOPLEVEL) - echo "---\ntitle: Modules Options\ntoc: true\nmenu: Modules Opts\norder: 95\n---" >modules.md - cat man-03 >>modules.md +$(MODULES): $(TMODULES) + mv $(TMODULES) $(TMODULES0) + echo "# Modules Options" >$(TMODULES) + cat $(TMODULES0) >>$(TMODULES) # Remove second-level headers so they don't get TOC entries: - sed -i 's/^### \(.*\)/__\1__/g' modules.md + sed -i 's/^### \(.*\)/__\1__/g' $(TMODULES) # Prepend a space to list character so they get indented one level: # And split paragraph of suboptions, it's nicer to read - sed -i 's/^- \*\*\(.*\)\*\*: \*\([^*]*\)\* \(.*\)/ - **\1**: *\2* \n \3/g' modules.md + sed -i 's/^- \*\*\(.*\)\*\*: \*\([^*]*\)\* \(.*\)/ - **\1**: *\2* \n \3/g' $(TMODULES) # Previous line doesn't process some subptions that span over two lines, workaround: - sed -i 's/^- \*\*\(.*\)\*\*\(.*\)/ - **\1**\2/g' modules.md - sed -i 's/^- \*\(.*\)\*\ \(.*\)/ - *\1* \2/g' modules.md + sed -i 's/^- \*\*\(.*\)\*\*\(.*\)/ - **\1**\2/g' $(TMODULES) + sed -i 's/^- \*\(.*\)\*\ \(.*\)/ - *\1* \2/g' $(TMODULES) # and then add list character to options: - sed -i 's/^\*\*.*\*\*: /- &/g' modules.md - sed -i 's/^\*\*.*\*\* /- &/g' modules.md - # Convert tricky absolute URLs into valid relative URLS - sed -i 's|http://\.\.|/admin/configuration|g' modules.md - # Convert *`mod_something`* into a link to modules section - sed -i 's|\*`mod_\([a-z_]*\)`\*|[mod_\1](/admin/configuration/modules/#mod-\1)|g' modules.md + sed -i 's/^\*\*.*\*\*: /- &/g' $(TMODULES) + sed -i 's/^\*\*.*\*\* /- &/g' $(TMODULES) + # Convert *`mod_something`* into a link to $(TMODULES) + sed -i 's|\*`mod_\([a-z_]*\)`\*|[mod_\1](#mod_\1)|g' $(TMODULES) # Convert *`something`* API into a link to API Reference - sed -i 's|\*`\([a-z_]*\)`\* API|[\1](/developer/ejabberd-api/admin-api/#\1) API|g' modules.md + sed -i 's|\*`\([a-z_]*\)`\* API|[\1](../../developer/ejabberd-api/admin-api.md#\1) API|g' $(TMODULES) # Convert *`something`* into a link to top-level options - sed -i 's|\*`\([a-z_]*\)`\*|[\1](/admin/configuration/toplevel/#\1)|g' modules.md - # Anchors must use -, not _ characters - sed -i 's|#\([a-z0-9-]*\)_\([a-z0-9_-]*\))|#\1-\2)|g' modules.md - sed -i 's|#\([a-z0-9-]*\)_\([a-z0-9_-]*\))|#\1-\2)|g' modules.md - sed -i 's|#\([a-z0-9-]*\)_\([a-z0-9_-]*\))|#\1-\2)|g' modules.md + sed -i 's|\*`\([a-z_]*\)`\*|[\1](toplevel.md#\1)|g' $(TMODULES) + # Convert _`url|something`_ into a relative link + sed -i 's|\*`\(.*\)\|\(.*\)`\*|[\2](\1)|g' $(TMODULES) # Add disclaimer about Archive page for older ejabberd releases - sed -i 's|\(This section.*\)|> \1'$(ARCHIVESTRING)'|g' modules.md + sed -i 's|\(This section.*\)\. |> \1. '$(ARCHIVESTRING)' |g' $(TMODULES) # Convert note to div HTML elements - sed -i 's|\*Note\* about the next option: \(.*\):|
\1
|g' modules.md - # Make URL when mentioning an ejabberd release - sed -i 's| \([0-9][0-9]\)\.\([0-9][0-9]\)| \1.\2|g' modules.md + sed -i 's|\*Note\* about this option: \(.*\)\.|\n|g' $(TMODULES) + # Link to Archive when mentioning an ejabberd release 2x.xx + sed -i 's| \([2-9][0-9]\)\.\([0-9][0-9]\)| [\1.\2](../../archive/\1.\2/index.md)|g' $(TMODULES) # Increase indentation of examples of modules options - vim modules.md -c "set expandtab" -c "g/\*\*Example\*\*:\n\n .*\n.*/normal V}}>" -c "wq" + vim $(TMODULES) -c "set expandtab" -c "g/\*\*Example\*\*:\n\n.*\~\~\~ yaml\n.*/normal V}}>" -c "wq" + vim $(TMODULES) -c "set expandtab" -c "g/\*\*Examples\*\*:\n\n.*\n\n.*\~\~\~ yaml\n.*/normal V}}}>" -c "wq" + cp $(TMODULES) $(MODULES) + +$(API): $(TAPI) + cp $(TAPI) $(TAPI0) + # Remove three consecutive empty lines after Tags: and Modules: + sed -i 's/^__Tags:__/__Tags:__\nCLEANLINES/g' $(TAPI) + sed -i 's/^__Module:__/__Module:__\nCLEANLINES/g' $(TAPI) + sed -i '/^CLEANLINES/{N;N;N;//d}' $(TAPI) + # Add disclaimer about Archive page for older ejabberd releases + sed -i 's|\(This section.*\)\. |> \1. '$(ARCHIVESTRING)' |g' $(TAPI) + # Convert note to div HTML elements + sed -i 's|\*Note\* about this command: \(.*\)\.|\n|g' $(TAPI) + # Link to Archive when mentioning an ejabberd release 2x.xx + sed -i 's| \([2-9][0-9]\)\.\([0-9][0-9]\)| [\1.\2](../../archive/\1.\2/index.md)|g' $(TAPI) + # Convert _`mod_something`_ from the user into a link to modules section + sed -i 's|_`mod_\([a-z0-9_]*\)`_|[mod_\1](../../admin/configuration/modules.md#mod_\1)|g' $(TAPI) + # Convert _`something`_ API into a link to API Reference + sed -i 's|_`\([a-z0-9_]*\)`_ API|[\1](#\1) API|g' $(TAPI) + # Convert _`something`_ into a link to tags section + sed -i 's|_`\([a-z0-9_]*\)`_|[\1](admin-tags.md#\1)|g' $(TAPI) + # Convert _`url|something`_ into a relative link + sed -i 's|_`\(.*\)\|\(.*\)`_|[\2](\1)|g' $(TAPI) + cp $(TAPI) $(API) + +$(TAGS): $(TTAGS) + cp $(TTAGS) $(TTAGS0) + # Link to Archive when mentioning an ejabberd release 2x.xx + sed -i 's| \([2-9][0-9]\)\.\([0-9][0-9]\)| [\1.\2](../../archive/\1.\2/index.md)|g' $(TTAGS) + # Convert _`something`_ API into a link to API Reference + sed -i 's|_`\([a-z0-9_]*\)`_|[\1](admin-api.md#\1)|g' $(TTAGS) + # Add disclaimer about Archive page for older ejabberd releases + sed -i 's|\(This section.*\)\. |> \1. '$(ARCHIVESTRING)' |g' $(TTAGS) + cp $(TTAGS) $(TAGS) + +#. +#' mkdocs +# + +site: + OFFLINE=true mkdocs build + find site/* -type f \! -exec sed -i 's/href="\(.*\)" \(title="ejabberd Docs"\)/href="\1\/index.html" \2/g' {} \; - rm ejabberd.yml.5.txt - rm ejabberd.yml.5.xml - rm man-* - mv toplevel.md content/admin/configuration - mv modules.md content/admin/configuration +pdf: $(PDF) + +$(PDF): + WITH_PDF=1 mkdocs build + mv $(PDF) $(PDFV) + +zip: $(ZIP) + +$(ZIP): site + mv site ejabberd-docs-$(VERSION) + zip -r $(ZIP) ejabberd-docs-$(VERSION)/* + mv $(ZIP) $(ZIPV) + mv ejabberd-docs-$(VERSION) temp + +dev: + mkdocs serve --no-livereload --dirty + +serve: + mkdocs serve + +clean: + rm -rf site + rm -rf temp + rm -rf content/ejabberd-docs-* + rm -f $(READMES) + rm -f $(TOPLEVEL) + rm -f $(MODULES) + rm -f $(API) + rm -f $(TAGS) + rm -f $(PDF) + rm -f $(ZIP) + +#. +#' archive +# archive: # @@ -152,34 +307,42 @@ archive: cp content/admin/configuration/toplevel.md $(DEST)/toplevel.md cp content/developer/ejabberd-api/admin-api.md $(DEST)/admin-api.md cp content/developer/ejabberd-api/admin-tags.md $(DEST)/admin-tags.md - cp content/developer/sql-schema.md $(DEST)/sql-schema.md - # - sed -i '/order: 40/d' $(DEST)/admin-api.md + sed -i '1i---\nsearch:\n exclude: true\n---\n' $(DEST)/*.md # - sed -i '/^> This section /d' $(DEST)/*.md - sed -i 's|/admin/configuration/listen/|/'$(ARCHIVE)'/listen/|g' $(DEST)/*.md - sed -i 's|/admin/configuration/listen-options/|/'$(ARCHIVE)'/listen-options/|g' $(DEST)/*.md - sed -i 's|/admin/configuration/modules/|/'$(ARCHIVE)'/modules/|g' $(DEST)/*.md - sed -i 's|/admin/configuration/toplevel/|/'$(ARCHIVE)'/toplevel/|g' $(DEST)/*.md - sed -i 's|/developer/ejabberd-api/admin-api/|/'$(ARCHIVE)'/admin-api/|g' $(DEST)/*.md - sed -i 's|/developer/ejabberd-api/admin-tags/|/'$(ARCHIVE)'/admin-tags/|g' $(DEST)/*.md - sed -i 's|/developer/sql-schema/|/'$(ARCHIVE)'/sql-schema/|g' $(DEST)/*.md + sed -i 's|../../admin/configuration/modules|modules|g' $(DEST)/*.md + sed -i 's|../guide/managing.md|../../admin/guide/managing.md|g' $(DEST)/*.md + sed -i 's|../guide/mqtt/index.md|../../admin/guide/mqtt/index.md|g' $(DEST)/*.md + sed -i 's|authentication.md|../../admin/configuration/authentication.md|g' $(DEST)/*.md + sed -i 's|basic.md|../../admin/configuration/basic.md|g' $(DEST)/*.md + sed -i 's|database.md|../../admin/configuration/database.md|g' $(DEST)/*.md + sed -i 's|ldap.md|../../admin/configuration/ldap.md|g' $(DEST)/*.md + sed -i 's|oauth.md|../../developer/ejabberd-api/oauth.md|g' $(DEST)/*.md + sed -i 's|old.md|../../admin/configuration/old.md|g' $(DEST)/*.md # - sed -i 's|\(RELEASE_LIST -->\)|\1\n* [$(VERSION)](/archive/$(VERSION_)/)|g' content/archive/index.md + sed -i 's|\(RELEASE_LIST -->\)|\1\n* [$(VERSION)]($(VERSION)/index.md)|g' content/archive/index.md # - echo "---" >$(DEST)/index.md - echo "title: Archived Documentation for $(VERSION)" >>$(DEST)/index.md - echo "menu: $(VERSION)" >>$(DEST)/index.md - echo "order: $$(( 9999 - $(VERSIONU) ))" >>$(DEST)/index.md - echo "---" >>$(DEST)/index.md + echo "# Archived Documentation for $(VERSION)" >>$(DEST)/index.md echo "" >>$(DEST)/index.md echo "This section contains some archived sections for ejabberd $(VERSION)." >>$(DEST)/index.md echo "" >>$(DEST)/index.md echo "If you are upgrading ejabberd from a previous release, you can check:" >>$(DEST)/index.md echo "" >>$(DEST)/index.md - echo "* [Specific version upgrade notes](/admin/upgrade/#specific-version-upgrade-notes)" >>$(DEST)/index.md + echo "* [Specific version upgrade notes](upgrade.md)" >>$(DEST)/index.md echo "* [ejabberd $(VERSION) release announcement](https://www.process-one.net/blog/ejabberd-$(VERSION-)/)" >>$(DEST)/index.md - echo "* [Docs Github Compare from $(VERSIONPRE)](https://github.com/processone/docs.ejabberd.im/compare/$(VERSIONPRE)...$(VERSION))" >>$(DEST)/index.md - echo "* [ejabberd Github Compare from $(VERSIONPRE)](https://github.com/processone/ejabberd/compare/$(VERSIONPRE)...$(VERSION))" >>$(DEST)/index.md + echo "* [Docs Github Compare from $(VERSIONPRE)](https://github.com/processone/docs.ejabberd.im/compare/$(VERSIONPRE)..$(VERSION))" >>$(DEST)/index.md + echo "* [ejabberd Github Compare from $(VERSIONPRE)](https://github.com/processone/ejabberd/compare/$(VERSIONPRE)..$(VERSION))" >>$(DEST)/index.md echo "" >>$(DEST)/index.md # + +#. +#' test +# + +test: + #linkchecker --no-status http://127.0.0.1:8000/mkdocs/ + export TEST=true && mkdocs build + #export TEST=true && export TEST_EXTERNAL=true && mkdocs build + +#. +#' +# vim: foldmarker=#',#. foldmethod=marker: diff --git a/README.md b/README.md index 25589285..efdb5070 100644 --- a/README.md +++ b/README.md @@ -1,33 +1,118 @@ -# ejabberd documentation +# ejabberd Docs Source Code -This repository holds the source code of the ejabberd documentation website, available at [docs.ejabberd.im](https://docs.ejabberd.im). This is a community effort and you are welcome to submit issues or pull requests in order to improve the docs and benefit the ejabberd community. +The [ejabberd](http://ejabberd.im/) Community Server +has its source code available in the [ejabberd git repository](https://github.com/processone/ejabberd). +Its documentation is published in the [ejabberd Docs](https://docs.ejabberd.im) website, +and its source code is available in the [docs git repository](https://github.com/processone/docs.ejabberd.im). -Some documentation pages are generated from ejabberd source code. -To build those pages, start ejabberd and run 'make'. +This is a community effort and you are welcome to submit issues or pull requests +in order to improve the docs and benefit the ejabberd community. -# Contributing +This documentation site is built using [MkDocs](http://www.mkdocs.org/) +and [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/). -If you want to contribute to this ejabberd documentation, here are some helpful guidelines regarding the syntax: +## Installation -- use Markdown, specifically the [kramdown flavour](https://kramdown.gettalong.org/syntax.html) +To build the site you need Python 3.6 or later, then install the dependencies: -- when creating code blocks, use `~~~ language` fencing, where `language` represents what's in the code block +### pip -- for code blocks with terminal listings, use `~~~ bash` or `~~~ python`, whichever looks best +```bash +mkdir -p .venv +python3 -m venv .venv +source .venv/bin/activate +pip install -r requirements.txt +``` -- ordered lists don't need to be enumerated 1,2,3... in the source - they can all start with `1.`, the generator will enumerate them properly +!!! info + From now on, remember to run `source .venv/bin/activate` before running any `mkdocs [...]` command. -- for code blocks within lists, make sure indentation of first `~~~` is vertically aligned with list item text, for example: - ``` - 1. Item list text - - ~~~ perl - my $variable = 'something'; - ... - ~~~ - ``` - This is generally 3 spaces for numbered list item and 2 for bullet items. +!!! tip + You can freeze the dependencies to a file using `pip freeze > requirements.txt`. -- It is usually better to indent at same level the whole code block (so in list item), otherwise, empty lines will break rendering +### Debian -- Send your changes as pull request. It will be applied as a patch by a bot, but this allows us to track change requests +You could install most dependencies using APT: + +```bash +apt-get install mkdocs \ + mkdocs-material \ + mkdocs-material-extensions \ + mkdocs-redirects \ + python3-bs4 +``` + +!!! warning + Unfortunately Debian doesn't package `mkdocs-with-pdf`, so you should remove `with-pdf` plugin from `mkdocs.yml`. + +## Building + +Now you can start a small webserver that builds the site dynamically: + +```bash +mkdocs serve +``` + +or build the site into static html files in the `site/` directory: + +```bash +mkdocs build +``` + +## Testing + +To verify the internal URLs in the site: + +```bash +TEST=true mkdocs serve +``` + +To verify the internal URLs and also the external links: + +```bash +TEST=true TEST_EXTERNAL=true mkdocs serve +``` + +## Updating content + +Some pages in this documentation are extracted from a running ejabberd node: + +- [admin/configuration/toplevel.md](admin/configuration/toplevel.md) +- [admin/configuration/modules.md](admin/configuration/modules.md) +- [developer/ejabberd-api/admin-api.md](developer/ejabberd-api/admin-api.md) +- [developer/ejabberd-api/admin-tags.md](developer/ejabberd-api/admin-tags.md) + +To update those pages, install ejabberd, start it and run `make all` in this repository. +This gets documentation from ejabberd, processes it to obtain markdown content +and moves the files to this repository. + +Additionally, there are several other pages that are markdown files copied from +ejabberd git repository and docker-ejabberd git repository. Those repositories +must be available next to docs.ejabberd.im before running `make all`. + +## Markdown Shorthands + +When editing ejabberd source code to document top-level options, modules or API commands, +there is some additional syntax supported to generate HTML URLs: + +For example, this text in the ejabberd source code: + +``` erlang +_`mod_muc_admin`_ +_`bookmarks_to_pep`_ API +_`default_db`_ +_`basic.md#captcha|CAPTCHA`_ +https://xmpp.org/extensions/xep-0045.html[XEP-0045] +``` + +gets converted into this markdown: + +``` markdown +[mod_muc_admin](../../admin/configuration/modules.md#mod_muc_admin) +[bookmarks_to_pep](../../developer/ejabberd-api/admin-api.md#bookmarks_to_pep) API +[default_db](toplevel.md#default_db) +[CAPTCHA](basic.md#captcha) +[XEP-0045](https://xmpp.org/extensions/xep-0045.html) +``` + +There are example usage of those shorthands in ejabberd, for example in `mod_muc.erl`. diff --git a/add_old_ids.py b/add_old_ids.py new file mode 100644 index 00000000..9dcc3cc4 --- /dev/null +++ b/add_old_ids.py @@ -0,0 +1,22 @@ +import mkdocs.plugins +from bs4 import BeautifulSoup + +@mkdocs.plugins.event_priority(-50) + +def on_page_content(content, page, **kwargs): + path = page.file.src_uri + if (path == 'admin/configuration/toplevel.md' or + path == 'admin/configuration/modules.md' or + path == 'admin/configuration/listen.md' or + path == 'admin/configuration/listen-options.md' or + path == 'developer/ejabberd-api/admin-api.md' or + path == 'developer/ejabberd-api/admin-tags.md'): + return add_old_anchors(content) + +def add_old_anchors(html): + soup = BeautifulSoup(html, 'html.parser') + for h2 in soup.find_all('h2'): + idcurrent = h2.get('id') + if idcurrent and '_' in idcurrent: + h2.insert_before(soup.new_tag('a', id=idcurrent.replace('_', '-'))) + return str(soup) diff --git a/content/CHANGELOG.md b/content/CHANGELOG.md new file mode 100644 index 00000000..6f3edca8 --- /dev/null +++ b/content/CHANGELOG.md @@ -0,0 +1,1233 @@ +# ChangeLog + +## Version 24.06 + +#### Core + +- `econf`: Add ability to use additional custom errors when parsing options +- `ejabberd_logger`: Reloading configuration will update logger settings +- `gen_mod`: Add support to specify a hook global, not vhost-specific +- [`mod_configure`](https://docs.ejabberd.im/admin/configuration/modules/#mod_configure): Retract `Get User Password` command to update [XEP-0133](https://xmpp.org/extensions/xep-0133.html) 1.3.0 +- [`mod_conversejs`](https://docs.ejabberd.im/admin/configuration/modules/#mod_conversejs): Simplify support for `@HOST@` in `default_domain` option ([#4167](https://github.com/processone/issues/4167)) +- [`mod_mam`](https://docs.ejabberd.im/admin/configuration/modules/#mod_mam): Document that [XEP-0441](https://xmpp.org/extensions/xep-0441.html) is implemented as well +- [`mod_mam`](https://docs.ejabberd.im/admin/configuration/modules/#mod_mam): Update support for [XEP-0425](https://xmpp.org/extensions/xep-0425.html) version 0.3.0, keep supporting 0.2.1 ([#4193](https://github.com/processone/issues/4193)) +- [`mod_matrix_gw`](https://docs.ejabberd.im/admin/configuration/modules/#mod_matrix_gw): Fix support for `@HOST@` in `matrix_domain` option ([#4167](https://github.com/processone/issues/4167)) +- [`mod_muc_log`](https://docs.ejabberd.im/admin/configuration/modules/#mod_muc_log): Hide join/leave lines, add method to show them +- [`mod_muc_log`](https://docs.ejabberd.im/admin/configuration/modules/#mod_muc_log): Support `allowpm` introduced in 2bd61ab +- [`mod_muc_room`](https://docs.ejabberd.im/admin/configuration/modules/#mod_muc_room): Use ejabberd hooks instead of function calls to `mod_muc_log` ([#4191](https://github.com/processone/issues/4191)) +- [`mod_private`](https://docs.ejabberd.im/admin/configuration/modules/#mod_private): Cope with bookmark decoding errors +- [`mod_vcard_xupdate`](https://docs.ejabberd.im/admin/configuration/modules/#mod_vcard_xupdate): Send hash after avatar get set for first time +- `prosody2ejabberd`: Handle the `approved` attribute. As feature isn't implemented, discard it ([#4188](https://github.com/processone/issues/4188)) + +#### SQL + +- [`update_sql_schema`](https://docs.ejabberd.im/admin/configuration/toplevel/#update_sql_schema): Enable this option by default +- CI: Don't load database schema files for mysql and pgsql +- Support Unix Domain Socket with updated p1_pgsql and p1_mysql ([#3716](https://github.com/processone/issues/3716)) +- Fix handling of `mqtt_pub` table definition from `mysql.sql` and fix `should_update_schema/1` in `ejabberd_sql_schema.erl` +- Don't start sql connection pools for unknown hosts +- Add `update_primary_key` command to sql schema updater +- Fix crash running [`export2sql`](https://docs.ejabberd.im/developer/ejabberd-api/admin-api/#export2sql) when MAM enabled but MUC disabled +- Improve detection of types in odbc + +#### Commands API + +- New ban commands use private storage to keep ban information ([#4201](https://github.com/processone/issues/4201)) +- [`join_cluster_here`](https://docs.ejabberd.im/developer/ejabberd-api/admin-api/#join_cluster_here): New command to join a remote node into our local cluster +- Don't name integer and string results in API examples ([#4198](https://github.com/processone/issues/4198)) +- [`get_user_subscriptions`](https://docs.ejabberd.im/developer/ejabberd-api/admin-api/#get_user_subscriptions): Fix validation of user field in that command +- [`mod_admin_extra`](https://docs.ejabberd.im/admin/configuration/modules/#mod_admin_extra): Handle case when `mod_private` is not enabled ([#4201](https://github.com/processone/issues/4201)) +- [`mod_muc_admin`](https://docs.ejabberd.im/admin/configuration/modules/#mod_muc_admin): Improve validation of arguments in several commands + +#### Compile + +- `ejabberdctl`: Comment ERTS_VSN variable when not used ([#4194](https://github.com/processone/issues/4194)) +- `ejabberdctl`: Fix iexlive after `make prod` when using Elixir +- `ejabberdctl`: If `INET_DIST_INTERFACE` is IPv6, set required option ([#4189](https://github.com/processone/issues/4189)) +- `ejabberdctl`: Make native dynamic node names work when using fully qualified domain names +- `rebar.config.script`: Support relaxed dependency version ([#4192](https://github.com/processone/issues/4192)) +- `rebar.config`: Update deps version to rebar3's relaxed versioning +- `rebar.lock`: Track file, now that rebar3 uses loose dependency versioning +- `configure.ac`: When using rebar3, unlock dependencies that are disabled ([#4212](https://github.com/processone/issues/4212)) +- `configure.ac`: When using rebar3 with old Erlang, unlock some dependencies ([#4213](https://github.com/processone/issues/4213)) +- `mix:exs`: Move `xmpp` from `included_applications` to `applications` + +#### Dependencies + +- Base64url: Use only when using rebar2 and Erlang lower than 24 +- Idna: Bump from 6.0.0 to 6.1.1 +- Jiffy: Use Json module when Erlang/OTP 27, jiffy with older ones +- Jose: Update to the new 1.11.10 for Erlang/OTP higher than 23 +- Luerl: Update to 1.2.0 when OTP same or higher than 20, simplifies commit a09f222 +- P1_acme: Update to support Jose 1.11.10 and Ipv6 support ([#4170](https://github.com/processone/issues/4170)) +- P1_acme: Update to use Erlang's json library instead of jiffy when OTP 27 +- Port_compiler: Update to 1.15.0 that supports Erlang/OTP 27.0 + +#### Development Help + +- `.gitignore`: Ignore ctags/etags files +- `make dialyzer`: Add support to run Dialyzer with Mix +- `make format|indent`: New targets to format and indent source code +- `make relive`: Add Sync tool with Rebar3, ExSync with Mix +- `hook_deps`: Use precise name: hooks are added and later deleted, not removed +- `hook_deps`: Fix to handle FileNo as tuple `{FileNumber, CharacterPosition}` +- Add support to test also EUnit suite +- Fix `code:lib_dir` call to work with Erlang/OTP 27.0-rc2 +- Set process flags when Erlang/OTP 27 to help debugging +- Test retractions in mam_tests + +#### Documentation + +- Add some XEPs support that was forgotten +- Fix documentation links to new URLs generated by MkDocs +- Remove `...` in example configuration: it is assumed and reduces verbosity +- Support for version note in modules too +- Mark toplevel options, commands and modules that changed in latest version +- Now modules themselves can have version annotations in `note` + +#### Installers and Container + +- make-binaries: Bump Erlang/OTP to 26.2.5 and Elixir 1.16.3 +- make-binaries: Bump OpenSSL to 3.3.1 +- make-binaries: Bump Linux-PAM to 1.6.1 +- make-binaries: Bump Expat to 2.6.2 +- make-binaries: Revert temporarily an OTP commit that breaks MSSQL ([#4178](https://github.com/processone/issues/4178)) +- CONTAINER.md: Invalid `CTL_ON_CREATE` usage in docker-compose example + +#### WebAdmin + +- ejabberd_ctl: Improve parsing of commas in arguments +- ejabberd_ctl: Fix output of UTF-8-encoded binaries +- WebAdmin: Remove webadmin_view for now, as commands allow more fine-grained permissions +- WebAdmin: Unauthorized response: include some text to direct to the logs +- WebAdmin: Improve home page +- WebAdmin: Sort alphabetically the menu items, except the most used ones +- WebAdmin: New login box in the left menu bar +- WebAdmin: Add make_command functions to produce HTML command element +- Document 'any' argument and result type, useful for internal commands +- Commands with 'internal' tag: don't list and block execution by frontends +- WebAdmin: Move content to commands; new pages; hook changes; new commands + +## Version 24.02 + +#### Core: + +- Added Matrix gateway in `mod_matrix_gw` +- Support SASL2 and Bind2 +- Support tls-server-end-point channel binding and sasl2 codec +- Support tls-exporter channel binding +- Support XEP-0474: SASL SCRAM Downgrade Protection +- Fix presenting features and returning results of inline bind2 elements +- [`disable_sasl_scram_downgrade_protection`](https://docs.ejabberd.im/admin/configuration/toplevel/#disable-sasl-scram-downgrade-protection): New option to disable XEP-0474 +- [`negotiation_timeout`](https://docs.ejabberd.im/admin/configuration/toplevel/#negotiation-timeout): Increase default value from 30s to 2m +- mod_carboncopy: Teach how to interact with bind2 inline requests + +#### Other: + +- ejabberdctl: Fix startup problem when having set `EJABBERD_OPTS` and logger options +- ejabberdctl: Set EJABBERD_OPTS back to `""`, and use previous flags as example +- eldap: Change logic for `eldap tls_verify=soft` and `false` +- eldap: Don't set `fail_if_no_peer_cert` for eldap ssl client connections +- Ignore hints when checking for chat states +- mod_mam: Support XEP-0424 Message Retraction +- mod_mam: Fix XEP-0425: Message Moderation with SQL storage +- mod_ping: Support XEP-0198 pings when stream management is enabled +- mod_pubsub: Normalize pubsub `max_items` node options on read +- mod_pubsub: PEP nodetree: Fix reversed logic in node fixup function +- mod_pubsub: Only care about PEP bookmarks options when creating node from scratch + +#### SQL: + +- MySQL: Support `sha256_password` auth plugin +- ejabberd_sql_schema: Use the first unique index as a primary key +- Update SQL schema files for MAM's XEP-0424 +- New option [`sql_flags`](https://docs.ejabberd.im/admin/configuration/toplevel/#sql-flags): right now only useful to enable `mysql_alternative_upsert` + +#### Installers and Container: + +- Container: Add ability to ignore failures in execution of `CTL_ON_*` commands +- Container: Update to Erlang/OTP 26.2, Elixir 1.16.1 and Alpine 3.19 +- Container: Update this custom ejabberdctl to match the main one +- make-binaries: Bump OpenSSL 3.2.1, Erlang/OTP 26.2.2, Elixir 1.16.1 +- make-binaries: Bump many dependency versions + +#### Commands API: + +- `print_sql_schema`: New command available in ejabberdctl command-line script +- ejabberdctl: Rework temporary node name generation +- ejabberdctl: Print argument description, examples and note in help +- ejabberdctl: Document exclusive ejabberdctl commands like all the others +- Commands: Add a new [`muc_sub`](https://docs.ejabberd.im/developer/ejabberd-api/admin-tags/#muc-sub) tag to all the relevant commands +- Commands: Improve syntax of many commands documentation +- Commands: Use list arguments in many commands that used separators +- Commands: [`set_presence`](https://docs.ejabberd.im/developer/ejabberd-api/admin-api/#set-presence): switch priority argument from string to integer +- ejabberd_commands: Add the command API version as [a tag `vX`](https://docs.ejabberd.im/developer/ejabberd-api/admin-tags/#v1) +- ejabberd_ctl: Add support for list and tuple arguments +- ejabberd_xmlrpc: Fix support for restuple error response +- mod_http_api: When no specific API version is requested, use the latest + +#### Compilation with Rebar3/Elixir/Mix: +- Fix compilation with Erlang/OTP 27: don't use the reserved word 'maybe' +- configure: Fix explanation of `--enable-group` option ([#4135](https://github.com/processone/ejabberd/issues/4135)) +- Add observer and runtime_tools in releases when `--enable-tools` +- Update "make translations" to reduce build requirements +- Use Luerl 1.0 for Erlang 20, 1.1.1 for 21-26, and temporary fork for 27 +- Makefile: Add `install-rel` and `uninstall-rel` +- Makefile: Rename `make rel` to `make prod` +- Makefile: Update `make edoc` to use ExDoc, requires mix +- Makefile: No need to use `escript` to run rebar|rebar3|mix +- configure: If `--with-rebar=rebar3` but rebar3 not system-installed, use local one +- configure: Use Mix or Rebar3 by default instead of Rebar2 to compile ejabberd +- ejabberdctl: Detect problem running iex or etop and show explanation +- Rebar3: Include Elixir files when making a release +- Rebar3: Workaround to fix protocol consolidation +- Rebar3: Add support to compile Elixir dependencies +- Rebar3: Compile explicitly our Elixir files when `--enable-elixir` +- Rebar3: Provide proper path to `iex` +- Rebar/Rebar3: Update binaries to work with Erlang/OTP 24-27 +- Rebar/Rebar3: Remove Elixir as a rebar dependency +- Rebar3/Mix: If `dev` profile/environment, enable tools automatically +- Elixir: Fix compiling ejabberd as a dependency ([#4128](https://github.com/processone/ejabberd/issues/4128)) +- Elixir: Fix ejabberdctl start/live when installed +- Elixir: Fix: `FORMATTER ERROR: bad return value` ([#4087](https://github.com/processone/ejabberd/issues/4087)) +- Elixir: Fix: Couldn't find file `Elixir Hex API` +- Mix: Enable stun by default when `vars.config` not found +- Mix: New option `vars_config_path` to set path to `vars.config` ([#4128](https://github.com/processone/ejabberd/issues/4128)) +- Mix: Fix ejabberdctl iexlive problem locating iex in an OTP release + +## Version 23.10 + +#### Compilation: + +- Erlang/OTP: Raise the requirement to Erlang/OTP 20.0 as a minimum +- CI: Update tests to Erlang/OTP 26 and recent Elixir +- Move Xref and Dialyzer options from workflows to `rebar.config` +- Add sections to `rebar.config` to organize its content +- Dialyzer dirty workarounds because `re:mp()` is not an exported type +- When installing module already configured, keep config as example +- Elixir 1.15 removed support for `--app` +- Elixir: Improve support to stop external modules written in Elixir +- Elixir: Update syntax of function calls as recommended by Elixir compiler +- Elixir: When building OTP release with mix, keep `ERLANG_NODE=ejabberd@localhost` +- `ejabberdctl`: Pass `ERLANG_OPTS` when calling `erl` to parse the `INET_DIST_INTERFACE` ([#4066](https://github.com/processone/ejabberd/issues/#4066) + +#### Commands: + +- `create_room_with_opts`: Fix typo and move examples to `args_example` ([#4080](https://github.com/processone/ejabberd/issues/#4080)) +- `etop`: Let `ejabberdctl etop` work in a release (if `observer` application is available) +- `get_roster`: Command now returns groups in a list instead of newlines ([#4088](https://github.com/processone/ejabberd/issues/#4088)) +- `halt`: New command to halt ejabberd abruptly with an error status code +- `ejabberdctl`: Fix calling ejabberdctl command with wrong number of arguments with Erlang 26 +- `ejabberdctl`: Improve printing lists in results +- `ejabberdctl`: Support `policy=user` in the help and return proper arguments +- `ejabberdctl`: Document how to stop a debug shell: control+g + +#### Container: + +- Dockerfile: Add missing dependency for mssql databases +- Dockerfile: Reorder stages and steps for consistency +- Dockerfile: Use Alpine as base for `METHOD=package` +- Dockerfile: Rename packages to improve compatibility +- Dockerfile: Provide specific OTP and elixir vsn for direct compilation +- Halt ejabberd if a command in `CTL_ON_` fails during ejabberd startup + +#### Core: + +- `auth_external_user_exists_check`: New option ([#3377](https://github.com/processone/ejabberd/issues/#3377)) +- `gen_mod`: Extend `gen_mod` API to simplify hooks and IQ handlers registration +- `gen_mod`: Add shorter forms for `gen_mod` hook/`iq_handler` API +- `gen_mod`: Update modules to the new `gen_mod` API +- `install_contrib_modules`: New option to define contrib modules to install automatically +- `unix_socket`: New listener option, useful when setting unix socket files ([#4059](https://github.com/processone/ejabberd/issues/#4059)) +- `ejabberd_systemd`: Add a few debug messages +- `ejabberd_systemd`: Avoid using `gen_server` timeout ([#4054](https://github.com/processone/ejabberd/issues/#4054))([#4058](https://github.com/processone/ejabberd/issues/#4058)) +- `ejabberd_listener`: Increase default listen queue backlog value to 128, which is the default value on both Linux and FreeBSD ([#4025](https://github.com/processone/ejabberd/issues/#4025)) +- OAuth: Handle `badpass` error message +- When sending message on behalf of user, trigger `user_send_packet` ([#3990](https://github.com/processone/ejabberd/issues/#3990)) +- Web Admin: In roster page move the `AddJID` textbox to top ([#4067](https://github.com/processone/ejabberd/issues/#4067)) +- Web Admin: Show a warning when visiting webadmin with non-privileged account ([#4089](https://github.com/processone/ejabberd/issues/#4089)) + +#### Docs: + +- Example configuration: clarify 5223 tls options; specify s2s shaper +- Make sure that `policy=user` commands have `host` instead of `server` arg in docs +- Improve syntax of many command descriptions for the Docs site +- Move example Perl extauth script from ejabberd git to Docs site +- Remove obsolete example files, and add link in Docs to the archived copies + +#### Installers (`make-binaries`): +- Bump Erlang/OTP version to 26.1.1, and other dependencies +- Remove outdated workaround +- Don't build Linux-PAM examples +- Fix check for current Expat version +- Apply minor simplifications +- Don't duplicate config entries +- Don't hard-code musl version +- Omit unnecessary glibc setting +- Set kernel version for all builds +- Let curl fail on HTTP errors + +#### Modules: + +- `mod_muc_log`: Add trailing backslash to URLs shown in disco info +- `mod_muc_occupantid`: New module with support for XEP-0421 Occupant Id ([#3397](https://github.com/processone/ejabberd/issues/#3397)) +- `mod_muc_rtbl`: Better error handling in ([#4050](https://github.com/processone/ejabberd/issues/#4050)) +- `mod_private`: Add support for XEP-0402 PEP Native Bookmarks +- `mod_privilege`: Don't fail to edit roster ([#3942](https://github.com/processone/ejabberd/issues/#3942)) +- `mod_pubsub`: Fix usage of `plugins` option, which produced `default_node_config` ignore ([#4070](https://github.com/processone/ejabberd/issues/#4070)) +- `mod_pubsub`: Add `pubsub_delete_item` hook +- `mod_pubsub`: Report support of `config-node-max` in pep +- `mod_pubsub`: Relay pubsub iq queries to muc members without using bare jid ([#4093](https://github.com/processone/ejabberd/issues/#4093)) +- `mod_pubsub`: Allow pubsub node owner to overwrite items published by other persons +- `mod_push_keepalive`: Delay `wake_on_start` +- `mod_push_keepalive`: Don't let hook crash +- `mod_push`: Add `notify_on` option +- `mod_push`: Set `last-message-sender` to bare JID +- `mod_register_web`: Make redirect to page that end with `/` ([#3177](https://github.com/processone/ejabberd/issues/#3177)) +- `mod_shared_roster_ldap`: Don't crash in `get_member_jid` on empty output ([#3614](https://github.com/processone/ejabberd/issues/#3614)) + +#### MUC: + +- Add support to register nick in a room ([#3455](https://github.com/processone/ejabberd/issues/#3455)) +- Convert `allow_private_message` MUC room option to `allowpm` ([#3736](https://github.com/processone/ejabberd/issues/#3736)) +- Update xmpp version to send `roomconfig_changesubject` in disco#info ([#4085](https://github.com/processone/ejabberd/issues/#4085)) +- Fix crash when loading room from DB older than ffa07c6, 23.04 +- Fix support to retract a MUC room message +- Don't always store messages passed through `muc_filter_message` ([#4083](https://github.com/processone/ejabberd/issues/#4083)) +- Pass also MUC room retract messages over the `muc_filter_message` ([#3397](https://github.com/processone/ejabberd/issues/#3397)) +- Pass MUC room private messages over the `muc_filter_message` too ([#3397](https://github.com/processone/ejabberd/issues/#3397)) +- Store the subject author JID, and run `muc_filter_message` when sending subject ([#3397](https://github.com/processone/ejabberd/issues/#3397)) +- Remove existing role information for users that are kicked from room ([#4035](https://github.com/processone/ejabberd/issues/#4035)) +- Expand rule "mucsub subscribers are members in members only rooms" to more places + +#### SQL: + +- Add ability to force alternative upsert implementation in mysql +- Properly parse mysql version even if it doesn't have type tag +- Use prepared statement with mysql +- Add alternate version of mysql upsert +- `ejabberd_auth_sql`: Reset scram fields when setting plain password +- `mod_privacy_sql`: Fix return values from `calculate_diff` +- `mod_privacy_sql`: Optimize `set_list` +- `mod_privacy_sql`: Use more efficient way to calculate changes in `set_privacy_list` + +## Version 23.04 + +#### General: + +- New `s2s_out_bounce_packet` hook +- Re-allow anonymous connection for connection without client certificates ([#3985](https://github.com/processone/ejabberd/issues/3985)) +- Stop `ejabberd_system_monitor` before stopping node +- `captcha_url` option now accepts `auto` value, and it's the default +- `mod_mam`: Add support for XEP-0425: Message Moderation +- `mod_mam_sql`: Fix problem with results of mam queries using rsm with max and before +- `mod_muc_rtbl`: New module for Real-Time Block List for MUC rooms ([#4017](https://github.com/processone/ejabberd/issues/4017)) +- `mod_roster`: Set roster name from XEP-0172, or the stored one ([#1611](https://github.com/processone/ejabberd/issues/1611)) +- `mod_roster`: Preliminary support to store extra elements in subscription request ([#840](https://github.com/processone/ejabberd/issues/840)) +- `mod_pubsub`: Pubsub xdata fields `max_item/item_expira/children_max` use `max` not `infinity` +- `mod_vcard_xupdate`: Invalidate `vcard_xupdate` cache on all nodes when vcard is updated + +#### Admin: + +- `ext_mod`: Improve support for loading `*.so` files from `ext_mod` dependencies +- Improve output in `gen_html_doc_for_commands` command +- Fix ejabberdctl output formatting ([#3979](https://github.com/processone/ejabberd/issues/3979)) +- Log HTTP handler exceptions + +#### MUC: + +- New command `get_room_history` +- Persist `none` role for outcasts +- Try to populate room history from mam when unhibernating +- Make `mod_muc_room:set_opts` process persistent flag first +- Allow passing affiliations and subscribers to `create_room_with_opts` command +- Store state in db in `mod_muc:create_room()` +- Make subscribers members by default + +#### SQL schemas: + +- Fix a long standing bug in new schema migration +- `update_sql` command: Many improvements in new schema migration +- `update_sql` command: Add support to migrate MySQL too +- Change PostgreSQL SERIAL to BIGSERIAL columns +- Fix minor SQL schema inconsistencies +- Remove unnecessary indexes +- New SQL schema migrate fix + +#### MS SQL: + +- MS SQL schema fixes +- Add `new` schema for MS SQL +- Add MS SQL support for new schema migration +- Minor MS SQL improvements +- Fix MS SQL error caused by `ORDER BY` in subquery + +#### SQL Tests: + +- Add support for running tests on MS SQL +- Add ability to run tests on upgraded DB +- Un-deprecate `ejabberd_config:set_option/2` +- Use python3 to run `extauth.py` for tests +- Correct README for creating test docker MS SQL DB +- Fix TSQLlint warnings in MSSQL test script + +#### Testing: + +- Fix Shellcheck warnings in shell scripts +- Fix Remark-lint warnings +- Fix Prospector and Pylint warnings in test `extauth.py` +- Stop testing ejabberd with Erlang/OTP 19.3, as Github Actions no longer supports ubuntu-18.04 +- Test only with oldest OTP supported (20.0), newest stable (25.3) and bleeding edge (26.0-rc2) +- Upload Common Test logs as artifact in case of failure + +#### `ecs` container image: +- Update Alpine to 3.17 to get Erlang/OTP 25 and Elixir 1.14 +- Add `tini` as runtime init +- Set `ERLANG_NODE` fixed to `ejabberd@localhost` +- Upload images as artifacts to Github Actions +- Publish tag images automatically to ghcr.io + +#### `ejabberd` container image: +- Update Alpine to 3.17 to get Erlang/OTP 25 and Elixir 1.14 +- Add `METHOD` to build container using packages ([#3983](https://github.com/processone/ejabberd/issues/3983)) +- Add `tini` as runtime init +- Detect runtime dependencies automatically +- Remove unused Mix stuff: ejabberd script and static COOKIE +- Copy captcha scripts to `/opt/ejabberd-*/lib` like the installers +- Expose only `HOME` volume, it contains all the required subdirs +- ejabberdctl: Don't use `.../releases/COOKIE`, it's no longer included + +#### Installers: + +- make-binaries: Bump versions, e.g. erlang/otp to 25.3 +- make-binaries: Fix building with erlang/otp v25.x +- make-packages: Fix for installers workflow, which didn't find lynx + +## Version 23.01 + +#### General: + +- Add `misc:uri_parse/2` to allow declaring default ports for protocols +- CAPTCHA: Add support to define module instead of path to script +- Clustering: Handle `mnesia_system_event mnesia_up` when other node joins this ([#3842](https://github.com/processone/ejabberd/issues/3842)) +- ConverseJS: Don't set i18n option because Converse enforces it instead of browser lang ([#3951](https://github.com/processone/ejabberd/issues/3951)) +- ConverseJS: Try to redirect access to files `mod_conversejs` to CDN when there is no local copies +- ext_mod: compile C files and install them in ejabberd's `priv` +- ext_mod: Support to get module status from Elixir modules +- make-binaries: reduce log output +- make-binaries: Bump zlib version to 1.2.13 +- MUC: Don't store mucsub presence events in offline storage +- MUC: `hibernation_time` is not an option worth storing in room state ([#3946](https://github.com/processone/ejabberd/issues/3946)) +- Multicast: Jid format when `multicastc` was cached ([#3950](https://github.com/processone/ejabberd/issues/3950)) +- mysql: Pass `ssl` options to mysql driver +- pgsql: Do not set `standard_conforming_strings` to `off` ([#3944](https://github.com/processone/ejabberd/issues/3944)) +- OAuth: Accept `jid` as a HTTP URL query argument +- OAuth: Handle when client is not identified +- PubSub: Expose the `pubsub#type` field in `disco#info` query to the node ([#3914](https://github.com/processone/ejabberd/issues/3914)) +- Translations: Update German translation + +#### Admin: + +- `api_permissions`: Fix option crash when doesn't have `who:` section +- `log_modules_fully`: New option to list modules that will log everything +- `outgoing_s2s_families`: Changed option's default to IPv6, and fall back to IPv4 +- Fix bash completion when using Relive or other install methods +- Fix portability issue with some shells ([#3970](https://github.com/processone/ejabberd/issues/3970)) +- Allow admin command to subscribe new users to `members_only` rooms +- Use alternative `split/2` function that works with Erlang/OTP as old as 19.3 +- Silent warning in OTP24 about not specified `cacerts` in SQL connections +- Fix compilation warnings with Elixir 1.14 + +#### DOAP: + +- Support extended `-protocol` erlang attribute +- Add extended RFCs and XEP details to some protocol attributes +- `tools/generate-doap.sh`: New script to generate DOAP file, add `make doap` ([#3915](https://github.com/processone/ejabberd/issues/3915)) +- `ejabberd.doap`: New DOAP file describing ejabberd supported protocols + +#### MQTT: + +- Add MQTT bridge module +- Add support for certificate authentication in MQTT bridge +- Implement reload in MQTT bridge +- Add support for websockets to MQTT bridge +- Recognize ws5/wss5 urls in MQTT bridge +- `mqtt_publish`: New hook for MQTT publish event +- `mqtt_(un)subscribe`: New hooks for MQTT subscribe & unsubscribe events + +#### VSCode: + +- Improve `.devcontainer` to use use devcontainer image and `.vscode` +- Add `.vscode` files to instruct VSCode how to run ejabberd +- Add Erlang LS default configuration +- Add Elvis default configuration + +## Version 22.10 + +#### Core: + +- Add `log_burst_limit_*` options ([#3865](https://github.com/processone/ejabberd/issues/3865)) +- Support `ERL_DIST_PORT` option to work without epmd +- Auth JWT: Catch all errors from `jose_jwt:verify` and log debugging details ([#3890](https://github.com/processone/ejabberd/issues/3890)) +- CAPTCHA: Support `@VERSION@` and `@SEMVER@` in `captcha_cmd` option ([#3835](https://github.com/processone/ejabberd/issues/3835)) +- HTTP: Fix unix socket support ([#3894](https://github.com/processone/ejabberd/issues/3894)) +- HTTP: Handle invalid values in `X-Forwarded-For` header more gracefuly +- Listeners: Let module take over socket +- Listeners: Don't register listeners that failed to start in config reload +- `mod_admin_extra`: Handle empty roster group names +- `mod_conversejs`: Fix crash when mod_register not enabled ([#3824](https://github.com/processone/ejabberd/issues/3824)) +- `mod_host_meta`: Complain at start if listener is not encrypted +- `mod_ping`: Fix regression on `stop_ping` in clustering context ([#3817](https://github.com/processone/ejabberd/issues/3817)) +- `mod_pubsub`: Don't crash on command failures +- `mod_shared_roster`: Fix cache invalidation +- `mod_shared_roster_ldap`: Update roster_get hook to use `#roster_item{}` +- `prosody2ejabberd`: Fix parsing of scram password from prosody + +#### MIX: + +- Fix MIX's filter_nodes +- Return user jid on join +- `mod_mix_pam`: Add new MIX namespaces to disco features +- `mod_mix_pam`: Add handling of IQs with newer MIX namespaces +- `mod_mix_pam`: Do roster pushes on join/leave +- `mod_mix_pam`: Parse sub elements of the mix join remote result +- `mod_mix_pam`: Provide MIX channels as roster entries via hook +- `mod_mix_pam`: Display joined channels on webadmin page +- `mod_mix_pam`: Adapt to renaming of `participant-id` from mix_roster_channel record +- `mod_roster`: Change hook type from `#roster{}` to `#roster_item{}` +- `mod_roster`: Respect MIX `` setting +- `mod_roster`: Adapt to change of mix_annotate type to boolean in roster_query +- `mod_shared_roster`: Fix wrong hook type `#roster{}` (now `#roster_item{}`) + +#### MUC: + +- Store role, and use it when joining a moderated room ([#3330](https://github.com/processone/ejabberd/issues/3330)) +- Don't persist `none` role ([#3330](https://github.com/processone/ejabberd/issues/3330)) +- Allow MUC service admins to bypass max_user_conferences limitation +- Show allow_query_users room option in disco info ([#3830](https://github.com/processone/ejabberd/issues/3830)) +- mod_muc_room: Don't set affiliation to `none` if it's already `none` in `process_item_change/3` +- Fix mucsub unsubscribe notification payload to have muc_unsubcribe in it +- Allow muc_{un}subscribe hooks to modify sent packets +- Pass room state to muc_{un}subscribed hook +- The archive_msg export fun requires MUC Service for room archives +- Export `mod_muc_admin:get_room_pid/2` +- Export function for getting room diagnostics + +#### SQL: + +- Handle errors reported from begin/commit inside transaction +- Make connection close errors bubble up from inside sql transaction +- Make first sql reconnect wait shorter time +- React to sql driver process exit earlier +- Skip connection exit message when we triggered reconnection +- Add syntax_tools to applications, required when using ejabberd_sql_pt ([#3869](https://github.com/processone/ejabberd/issues/3869)) +- Fix mam delete_old_messages_batch for sql backend +- Use `INSERT ... ON DUPLICATE KEY UPDATE` for upsert on mysql +- Update mysql library +- Catch mysql connection being close earlier + +#### Build: + +- `make all`: Generate start scripts here, not in `make install` ([#3821](https://github.com/processone/ejabberd/issues/3821)) +- `make clean`: Improve this and "distclean" +- `make deps`: Ensure deps configuration is ran when getting deps ([#3823](https://github.com/processone/ejabberd/issues/3823)) +- `make help`: Update with recent changes +- `make install`: Don't leak DESTDIR in files copied by 'make install' +- `make options`: Fix error reporting on OTP24+ +- `make update`: configure also in this case, similarly to `make deps` +- Add definition to detect OTP older than 25, used by ejabberd_auth_http +- Configure eimp with mix to detect image convert properly ([#3823](https://github.com/processone/ejabberd/issues/3823)) +- Remove unused macro definitions detected by rebar3_hank +- Remove unused header files which content is already in xmpp library + +#### Container: + +- Get ejabberd-contrib sources to include them +- Copy `.ejabberd-modules` directory if available +- Do not clone repo inside container build +- Use `make deps`, which performs additional steps ([#3823](https://github.com/processone/ejabberd/issues/3823)) +- Support `ERL_DIST_PORT` option to work without epmd +- Copy `ejabberd-docker-install.bat` from docker-ejabberd git and rename it +- Set a less frequent healthcheck to reduce CPU usage ([#3826](https://github.com/processone/ejabberd/issues/3826)) +- Fix build instructions, add more podman examples + +#### Installers: + +- make-binaries: Include CAPTCHA script with release +- make-binaries: Edit rebar.config more carefully +- make-binaries: Fix linking of EIMP dependencies +- make-binaries: Fix GitHub release version checks +- make-binaries: Adjust Mnesia spool directory path +- make-binaries: Bump Erlang/OTP version to 24.3.4.5 +- make-binaries: Bump Expat and libpng versions +- make-packages: Include systemd unit with RPM +- make-packages: Fix permissions on RPM systems +- make-installers: Support non-root installation +- make-installers: Override code on upgrade +- make-installers: Apply cosmetic changes + +#### External modules: + +- ext_mod: Support managing remote nodes in the cluster +- ext_mod: Handle correctly when COMMIT.json not found +- Don't bother with COMMIT.json user-friendly feature in automated user case +- Handle not found COMMIT.json, for example in GH Actions +- Add WebAdmin page for managing external modules + +#### Workflows Actions: + +- Update workflows to Erlang 25 +- Update workflows: Ubuntu 18 is deprecated and 22 is added +- CI: Remove syntax_tools from applications, as fast_xml fails Dialyzer +- Runtime: Add Xref options to be as strict as CI + +## Version 22.05 + +#### Core +- C2S: Don't expect that socket will be available in `c2s_terminated` hook +- Event handling process hook tracing +- Guard against `erlang:system_info(logical_processors)` not always returning a number +- `domain_balancing`: Allow for specifying `type` only, without specifying `component_number` + +#### MQTT +- Add TLS certificate authentication for MQTT connections +- Fix login when generating client id, keep connection record (#3593) +- Pass property name as expected in mqtt_codec (fixes login using MQTT 5) +- Support MQTT subscriptions spread over the cluster (#3750) + +#### MUC +- Attach meta field with real jid to mucsub subscription events +- Handle user removal +- Stop empty MUC rooms 30 seconds after creation +- `default_room_options`: Update options configurable +- `subscribe_room_many_max_users`: New option in `mod_muc_admin` + +#### mod_conversejs +- Improved options to support `@HOST@` and `auto` values +- Set `auth` and `register` options based on ejabberd configuration +- `conversejs_options`: New option +- `conversejs_resources`: New option + +#### PubSub +- `mod_pubsub`: Allow for limiting `item_expire` value +- `mod_pubsub`: Unsubscribe JID on whitelist removal +- `node_pep`: Add config-node and multi-items features (#3714) + +#### SQL +- Improve compatibility with various db engine versions +- Sync old-to-new schema script with reality (#3790) +- Slight improvement in MSSQL testing support, but not yet complete + +#### Other Modules +- `auth_jwt`: Checking if an user is active in SM for a JWT authenticated user (#3795) +- `mod_configure`: Implement Get List of Registered/Online Users from XEP-0133 +- `mod_host_meta`: New module to serve host-meta files, see XEP-0156 +- `mod_mam`: Store all mucsub notifications not only message notifications +- `mod_ping`: Delete ping timer if resource is gone after the ping has been sent +- `mod_ping`: Don't send ping if resource is gone +- `mod_push`: Fix notifications for pending sessions (XEP-0198) +- `mod_push`: Keep push session ID on session resume +- `mod_shared_roster`: Adjust special group cache size +- `mod_shared_roster`: Normalize JID on unset_presence (#3752) +- `mod_stun_disco`: Fix parsing of IPv6 listeners + +#### Dependencies +- autoconf: Supported from 2.59 to the new 2.71 +- fast_tls: Update to 1.1.14 to support OpenSSL 3 +- jiffy: Update to 1.1.1 to support Erlang/OTP 25.0-rc1 +- luerl: Update to 1.0.0, now available in hex.pm +- lager: This dependency is used only when Erlang is older than 22 +- rebar2: Updated binary to work from Erlang/OTP 22 to 25 +- rebar3: Updated binary to work from Erlang/OTP 22 to 25 +- `make update`: Fix when used with rebar 3.18 + +#### Compile +- `mix release`: Copy `include/` files for ejabberd, deps and otp, in `mix.exs` +- `rebar3 release`: Fix ERTS path in `ejabberdctl` +- `configure.ac`: Set default ejabberd version number when not using git +- `mix.exs`: Move some dependencies as optional +- `mix.exs`: No need to use Distillery, Elixir has built-in support for OTP releases (#3788) +- `tools/make-binaries`: New script for building Linux binaries +- `tools/make-installers`: New script for building command line installers + +#### Start +- New `make relive` similar to `ejabberdctl live` without installing +- `ejabberdctl`: Fix some warnings detected by ShellCheck +- `ejabberdctl`: Mention in the help: `etop`, `ping` and `started`/`stopped` +- `make rel`: Switch to paths: `conf/`, `database/`, `logs/` +- `mix.exs`: Add `-boot` and `-boot_var` in `ejabberdctl` instead of adding `vm.args` +- `tools/captcha.sh`: Fix some warnings detected by ShellCheck + +#### Commands +- Accept more types of ejabberdctl commands arguments as JSON-encoded +- `delete_old_mam_messages_batch`: New command with rate limit +- `delete_old_messages_batch`: New command with rate limit +- `get_room_occupants_number`: Don't request the whole MUC room state (#3684, #1964) +- `get_vcard`: Add support for MUC room vCard +- `oauth_revoke_token`: Add support to work with all backends +- `room_unused_*`: Optimize commands in SQL by reusing `created_at` +- `rooms_unused_...`: Let `get_all_rooms` handle `global` argument (#3726) +- `stop|restart`: Terminate ejabberd_sm before everything else to ensure sessions closing (#3641) +- `subscribe_room_many`: New command + +#### Translations +- Updated Catalan +- Updated French +- Updated German +- Updated Portuguese +- Updated Portuguese (Brazil) +- Updated Spanish + +#### Workflows +- CI: Publish CT logs and Cover on failure to an external GH Pages repo +- CI: Test shell scripts using ShellCheck (#3738) +- Container: New workflow to build and publish containers +- Installers: Add job to create draft release +- Installers: New workflow to build binary packages +- Runtime: New workflow to test compilation, rel, starting and ejabberdctl + +## Version 21.12 + +#### Commands +- `create_room_with_opts`: Fixed when using SQL storage +- `change_room_option`: Add missing fields from config inside `mod_muc_admin:change_options` +- piefxis: Fixed arguments of all commands + +#### Modules +- mod_caps: Don't forget caps on XEP-0198 resumption +- mod_conversejs: New module to serve a simple page for Converse.js +- mod_http_upload_quota: Avoid `max_days` race +- mod_muc: Support MUC hats (XEP-0317, conversejs/prosody compatible) +- mod_muc: Optimize MucSub processing +- mod_muc: Fix exception in mucsub {un}subscription events multicast handler +- mod_multicast: Improve and optimize multicast routing code +- mod_offline: Allow storing non-composing x:events in offline +- mod_ping: Send ping from server, not bare user JID +- mod_push: Fix handling of MUC/Sub messages +- mod_register: New allow_modules option to restrict registration modules +- mod_register_web: Handle unknown host gracefully +- mod_register_web: Use mod_register configured restrictions + +#### PubSub +- Add `delete_expired_pubsub_items` command +- Add `delete_old_pubsub_items` command +- Optimize publishing on large nodes (SQL) +- Support unlimited number of items +- Support `max_items=max` node configuration +- Bump default value for `max_items` limit from 10 to 1000 +- Use configured `max_items` by default +- node_flat: Avoid catch-all clauses for RSM +- node_flat_sql: Avoid catch-all clauses for RSM + +#### SQL +- Use `INSERT ... ON CONFLICT` in SQL_UPSERT for PostgreSQL >= 9.5 +- mod_mam export: assign MUC entries to the MUC service +- MySQL: Fix typo when creating index +- PgSQL: Add SASL auth support, PostgreSQL 14 +- PgSQL: Add missing SQL migration for table `push_session` +- PgSQL: Fix `vcard_search` definition in pgsql new schema + +#### Other +- `captcha-ng.sh`: "sort -R" command not POSIX, added "shuf" and "cat" as fallback +- Make s2s connection table cleanup more robust +- Update export/import of scram password to XEP-0227 1.1 +- Update Jose to 1.11.1 (the last in hex.pm correctly versioned) + +## Version 21.07 + +#### Compilation +- Add rebar3 3.15.2 binary +- Add support for mix to: `./configure --enable-rebar=mix` +- Improved `make rel` to work with rebar3 and mix +- Add `make dev` to build a development release with rebar3 or mix +- Hex: Add `sql/` and `vars.config` to Hex package files +- Hex: Update mix applications list to fix error `p1_utils is listed as both...` +- There are so many targets in Makefile... add `make help` +- Fix extauth.py failure in test suite with Python 3 +- Added experimental support for GitHub Codespaces +- Switch test service from TravisCI to GitHub Actions + +#### Commands: + +- Display extended error message in ejabberdctl +- Remove SMP option from ejabberdctl.cfg, `-smp` was removed in OTP 21 +- `create_room`: After creating room, store in DB if it's persistent +- `help`: Major changes in its usage and output +- `srg_create`: Update to use `label` parameter instead of `name` + +#### Modules: + +- ejabberd_listener: New `send_timeout` option +- mod_mix: Improvements to update to 0.14.1 +- mod_muc_room: Don't leak owner JIDs +- mod_multicast: Routing for more MUC packets +- mod_multicast: Correctly strip only other bcc addresses +- mod_mqtt: Allow shared roster group placeholder in mqtt topic +- mod_pubsub: Several fixes when using PubSub with RSM +- mod_push: Handle MUC/Sub events correctly +- mod_shared_roster: Delete cache after performing change to be sure that in cache will be up to date data +- mod_shared_roster: Improve database and caching +- mod_shared_roster: Reconfigure cache when options change +- mod_vcard: Fix invalid_encoding error when using extended plane characters in vcard +- mod_vcard: Update econf:vcard() to generate correct vcard_temp record +- WebAdmin: New simple pages to view mnesia tables information and content +- WebSocket: Fix typos + +#### SQL: + +- MySQL Backend Patch for scram-sha512 +- SQLite: When exporting for SQLite, use its specific escape options +- SQLite: Minor fixes for new_sql_schema support +- mod_privacy: Cast as boolean when exporting privacy_list_data to PostgreSQL +- mod_mqtt: Add mqtt_pub table definition for MSSQL +- mod_shared_roster: Add missing indexes to `sr_group` tables in all SQL databases + +## Version 21.04 + +#### API Commands: + +- `add_rosteritem/...`: Add argument guards to roster commands +- `get_user_subscriptions`: New command for MUC/Sub +- `remove_mam_for_user_with_peer`: Fix when removing room archive +- `send_message`: Fix bug introduced in ejabberd 21.01 +- `set_vcard`: Return modules errors + +#### Build and setup: + +- Allow ejabberd to be compatible as a dependency for an Erlang project using rebar3 +- CAPTCHA: New question/answer-based CAPTCHA script +- `--enable-lua`: new configure option for luerl instead of --enable-tools +- Remove support for HiPE, it was experimental and Erlang/OTP 24 removes it +- Update `sql_query` record to handle the Erlang/OTP 24 compiler reports +- Updated dependencies to fix Dialyzer warnings + +#### Miscellaneous: + +- CAPTCHA: Update `FORM_TYPE` from captcha to register +- LDAP: fix eldap certificate verification +- MySQL: Fix for "specified key was too long" +- Translations: updated the Esperanto, Greek, and Japanese translations +- Websocket: Fix PONG responses + +#### Modules: + +- `mod_block_strangers`: If stanza is type error, allow it passing +- `mod_caps`: Don't request roster when not needed +- `mod_caps`: Skip reading roster in one more case +- `mod_mam`: Remove `queryid` from MAM fin element +- `mod_mqtt`: When deregistering XMPP account, close its MQTT sessions +- `mod_muc`: Take in account subscriber's affiliation when checking access to moderated room +- `mod_muc`: Use monitors to track online and hard-killed rooms +- `mod_muc`: When occupant is banned, remove his subscriptions too +- `mod_privacy`: Make fetching roster lazy +- `mod_pubsub`: Don't fail on PEP unsubscribe +- `mod_pubsub`: Fix `gen_pubsub_node:get_state` return value +- `mod_vcard`: Obtain and provide photo type in vCard LDAP + +## Version 21.01 + +#### Miscellaneous changes: + +- `log_rotate_size` option: Fix handling of ‘infinity’ value +- `mod_time`: Fix invalid timezone +- Auth JWT: New `check_decoded_jwt` hook runs the default JWT verifier +- MUC: Allow non-occupant non-subscribed service admin send private MUC message +- MUC: New `max_password` and `max_captcha_whitelist` options +- OAuth: New `oauth_cache_rest_failure_life_time` option +- PEP: Skip reading pep nodes that we know won’t be requested due to caps +- SQL: Add sql script to migrate mysql from old schema to new +- SQL: Don’t use REPLACE for upsert when there are “-” fields. +- Shared Rosters LDAP: Add multi-domain support (and flexibility) +- Sqlite3: Fix dependency version +- Stun: Block loopback addresses by default +- Several documentation fixes and clarifications + +#### Commands: + +- `decide_room`: Use better fallback value for room activity time when skipping room +- `delete_old_message`: Fix when using sqlite spool table +- `module_install`: Make ext_mod compile module with debug_info flags +- `room_unused_*`: Don’t fetch subscribers list +- `send_message`: Don’t include empty in messages +- `set_room_affiliation`: Validate affiliations + +#### Running: + +- Docker: New `Dockerfile` and `devcontainer.json` +- New `ejabberdctl foreground-quiet` +- Systemd: Allow for listening on privileged ports +- Systemd: Integrate nicely with systemd + +#### Translations: + +- Moved gettext PO files to a new `ejabberd-po` repository +- Improved several translations: Catalan, Chinese, German, Greek, Indonesian, Norwegian, Portuguese (Brazil), Spanish. + +## Version 20.12 + +- Add support for `SCRAM-SHA-{256,512}-{PLUS}` authentication +- Don't use same value in cache for user don't exist and wrong password +- `outgoing_s2s_ipv*_address`: New options to set ipv4/ipv6 outbound s2s out interface +- s2s_send_packet: this hook now filters outgoing s2s stanzas +- start_room: new hook runs when a room process is started +- check_decoded_jwt: new hook to check decoded JWT after success authentication + +#### Admin +- Docker: Fix DB initialization +- New sql_odbc_driver option: choose the mssql ODBC driver +- Rebar3: Fully supported. Enable with `./configure --with-rebar=/path/to/rebar3` +- systemd: start ejabberd in foreground + +#### Modules: +- MAM: Make sure that jid used as base in mam xml_compress is bare +- MAM: Support for MAM Flipped Pages +- MUC: Always show MucSub subscribers nicks +- MUC: Don't forget not-persistent rooms in load_permanent_rooms +- MUC Admin: Better error reporting +- MUC Admin: Fix commands with hibernated rooms +- MUC Admin: Many improvements in rooms_unused_list/destroy +- MUC Admin: create_room_with_opts Store options only if room starts +- Pubsub: Remove 'dag' node plugin documentation +- Push: Fix API call return type on error +- Push: Support cache config changes on reload +- Register: Allow for account-removal-only setup again +- Roster: Make roster subscriptions work better with invalid roster state in db +- Vcard: Fix vCard search by User when using Mnesia +- WebAdmin: Allow vhost admins to view WebAdmin menus +- WebAdmin: Don't do double utf-8 conversion on translated strings +- WebAdmin: Mark dangerous buttons with CSS +- WebSocket: Make websocket send put back pressure on c2s process + +## Version 20.07 + +#### Changes in this version +- Add support for using unix sockets in listeners. +- Make this version compatible with erlang R23 +- Make room permissions checks more strict for subscribers +- Fix problem with muc rooms crashing when using muc logger + with some locales +- Limit stat calls that logger module issues +- Don't throw errors when using user_regexp acl rule and + having non-matching host +- Fix problem with leaving old data when updating shared rosters +- Fix edge case that caused failure of resuming old sessions with + stream management. +- Fix crash when room that was started with logging enabled was later + changed to logging disabled +- Increase default shaper limits (this should help with delays for + clients that are using jingle) +- Fix couple compatibility problems which prevented working on + erlang R19 +- Fix sending presence unavailable when session terminates for + clients that only send directed presences (helps with sometimes + not leaving muc rooms on disconnect). +- Prevent supervisor errors for sockets that were closed before + they were passed to handler modules +- Make stun module work better with ipv6 addresses + +## Version 20.03 + +#### Changes in this version +- Add support of ssl connection when connection to mysql + database (configured with `sql_ssl: true` option) +- Experimental support for cockroachdb when configured + with postgres connector +- Add cache and optimize queries issued by `mod_shared_roster`, + this should greatly improve performance of this module when + used with `sql` backend +- Fix problem with accessing webadmin +- Make webadmin work even when url is missing trailing slash +- When compiling external modules with ext_mod, use flags + that were detected during compilation of ejabberd +- Make config changed to ldap options be updated when issued + `reload_config` command +- Fix `room_empty_destory` command +- Fix reporting errors in `send_stanza` command when xml + passed to it couldn't be passed correctly + +## Version 20.02 + +#### Changes in this version +- Fix problems when trying to use string format with unicode + values directly in xmpp nodes +- Add missing oauth_client table declaration in lite.new.sql +- Improve compatibility with CocroachDB +- Fix importing of piefxis files that did use scram passwords +- Fix importing of piefxis files that had multiple includes + in them +- Update jiffy dependency +- Allow storage of emojis when using mssql database (Thanks + to Christoph Scholz) +- Make ejabberd_auth_http be able to use auth_opts +- Make custom_headers options in http modules correctly + override built-in values +- Fix return value of reload_config and dump_config commands + +## Version 20.01 + +#### New features +- Implement OAUTH authentication in mqtt +- Make logging infrastructure use new logger introduced + in Erlang (requires OTP22) +- New configuration parser/validator +- Initial work on being able to use CockroachDB as database backend +- Add gc command +- Add option to disable using prepared statements on Postgresql +- Implement routine for converting password to SCRAM format + for all backends not only SQL +- Add infrastructure for having module documentation directly + in individual module source code +- Generate man page automatically +- Implement copy feature in mod_carboncopy + +#### Fixes +- Make webadmin work with configurable paths +- Fix handling of result in xmlrpc module +- Make webadmin work even when accessed through not declared domain +- Better error reporting in xmlrpc +- Limit amount of results returned by disco queries to pubsub nodes +- Improve validation of configured JWT keys +- Fix race condition in Redis/SQL startup +- Fix loading order of third party modules +- Fix reloading of ACL rules +- Make account removal requests properly route response +- Improve handling of malformed inputs in send_message command +- Omit push notification if storing message in offline storage + failed +- Fix crash in stream management when timeout was not set + +## Version 19.09 + +#### Admin +- The minimum required Erlang/OTP version is now 19.3 +- Fix API call using OAuth (#2982) +- Rename MUC command arguments from Host to Service (#2976) + +#### Webadmin +- Don't treat 'Host' header as a virtual XMPP host (#2989) +- Fix some links to Guide in WebAdmin and add new ones (#3003) +- Use select fields to input host in WebAdmin Backup (#3000) +- Check account auth provided in WebAdmin is a local host (#3000) + +#### ACME +- Improve ACME implementation +- Fix IDA support in ACME requests +- Fix unicode formatting in ACME module +- Log an error message on IDNA failure +- Support IDN hostnames in ACME requests +- Don't attempt to create ACME directory on ejabberd startup +- Don't allow requesting certificates for localhost or IP-like domains +- Don't auto request certificate for localhost and IP-like domains +- Add listener for ACME challenge in example config + +#### Authentication +- JWT-only authentication for some users (#3012) + +#### MUC +- Apply default role after revoking admin affiliation (#3023) +- Custom exit message is not broadcast (#3004) +- Revert "Affiliations other than admin and owner cannot invite to members_only rooms" (#2987) +- When join new room with password, set pass and password_protected (#2668) +- Improve rooms_* commands to accept 'global' as MUC service argument (#2976) +- Rename MUC command arguments from Host to Service (#2976) + +#### SQL +- Fix transactions for Microsoft SQL Server (#2978) +- Spawn SQL connections on demand only + +#### Misc +- Add support for XEP-0328: JID Prep +- Added gsfonts for captcha +- Log Mnesia table type on creation +- Replicate Mnesia 'bosh' table when nodes are joined +- Fix certificate selection for s2s (#3015) +- Provide meaningful error when adding non-local users to shared roster (#3000) +- Websocket: don't treat 'Host' header as a virtual XMPP host (#2989) +- Fix sm ack related c2s error (#2984) +- Don't hide the reason why c2s connection has failed +- Unicode support +- Correctly handle unicode in log messages +- Fix unicode processing in ejabberd.yml + +## Version 19.08 + +#### Administration +- Improve ejabberd halting procedure +- Process unexpected erlang messages uniformly: logging a warning +- mod_configure: Remove modules management + +#### Configuration +- Use new configuration validator +- ejabberd_http: Use correct virtual host when consulting trusted_proxies +- Fix Elixir modules detection in the configuration file +- Make option 'validate_stream' global +- Allow multiple definitions of host_config and append_host_config +- Introduce option 'captcha_url' +- mod_stream_mgmt: Allow flexible timeout format +- mod_mqtt: Allow flexible timeout format in session_expiry option + +#### Misc +- Fix SQL connections leakage +- New authentication method using JWT tokens +- extauth: Add 'certauth' command +- Improve SQL pool logic +- Add and improve type specs +- Improve extraction of translated strings +- Improve error handling/reporting when loading language translations +- Improve hooks validator and fix bugs related to hooks registration +- Gracefully close inbound s2s connections +- mod_mqtt: Fix usage of TLS +- mod_offline: Make count_offline_messages cache work when using mam for storage +- mod_privacy: Don't attempt to query 'undefined' active list +- mod_privacy: Fix race condition + +#### MUC +- Add code for hibernating inactive muc_room processes +- Improve handling of unexpected iq in mod_muc_room +- Attach mod_muc_room processes to a supervisor +- Restore room when receiving message or generic iq for not started room +- Distribute routing of MUC messages across all CPU cores + +#### PubSub +- Fix pending nodes retrieval for SQL backend +- Check access_model when publishing PEP +- Remove deprecated pubsub plugins +- Expose access_model and publish_model in pubsub#metadata + +## Version 19.05 + +#### Admin +- The minimum required Erlang/OTP version is now 19.1 +- Provide a suggestion when unknown command, module, option or request handler is detected +- Deprecate some listening options: captcha, register, web_admin, http_bind and xmlrpc +- Add commands to get Mnesia info: mnesia_info and mnesia_table_info +- Fix Register command to respect mod_register's Access option +- Fixes in Prosody import: privacy and rooms +- Remove TLS options from the example config +- Improve request_handlers validator +- Fix syntax in example Elixir config file + +#### Auth +- Correctly support cache tags in ejabberd_auth +- Don't process failed EXTERNAL authentication by mod_fail2ban +- Don't call to mod_register when it's not loaded +- Make anonymous auth don't {de}register user when there are other resources + +#### Developer +- Rename listening callback from start/2 to start/3 +- New hook called when room gets destroyed: room_destroyed +- New hooks for tracking mucsub subscriptions changes: muc_subscribed, muc_unsubscribed +- Make static hooks analyzer working again + +#### MUC +- Service admins are allowed to recreate room even if archive is nonempty +- New option user_mucsub_from_muc_archive +- Avoid late arrival of get_disco_item response +- Handle get_subscribed_rooms call from mod_muc_room pid +- Fix room state cleanup from db on change of persistent option change +- Make get_subscribed_rooms work even for non-persistant rooms +- Allow non-moderator subscribers to get list of room subscribers + +#### Offline +- New option bounce_groupchat: make it not bounce mucsub/groupchat messages +- New option use_mam_for_storage: fetch data from mam instead of spool table +- When applying limit of max msgs in spool check only spool size +- Do not store mucsub wrapped messages with no-store hint in offline storage +- Always store ActivityMarker messages +- Don't issue count/message fetch queries for offline from mam when not needed +- Properly handle infinity as max number of message in mam offline storage +- Sort messages by stanza_id when using mam storage in mod_offline +- Return correct value from count_offline_messages with mam storage option +- Make mod_offline put msg ignored by mam in spool when mam storage is on + +#### SQL: +- Add SQL schemas for MQTT tables +- Report better errors on SQL terms decode failure +- Fix PostgreSQL compatibility in mod_offline_sql:remove_old_messages +- Fix handling of list arguments on pgsql +- Preliminary support for SQL in process_rosteritems command + +#### Tests +- Add tests for user mucsub mam from muc mam +- Add tests for offline with mam storage +- Add tests for offline use_mam_for_storage +- Initial Docker environment to run ejabberd test suite +- Test offline:use_mam_for_storage, mam:user_mucsub_from_muc_archive used together + +#### Websocket +- Add WebSockets support to mod_mqtt +- Return "Bad request" error when origin in websocket connection doesn't match +- Fix RFC6454 violation on websocket connection when validating Origin header +- Origin header validation on websocket connection + +#### Other modules +- mod_adhoc: Use xml:lang from stanza when it's missing in element +- mod_announce: Add 'sessionid' attribute when required +- mod_bosh: Don't put duplicate polling attribute in bosh payload +- mod_http_api: Improve argument error messages and log messages +- mod_http_upload: Feed whole image to eimp:identify/1 +- mod_http_upload: Log nicer warning on unknown host +- mod_http_upload: Case-insensitive host comparison +- mod_mqtt: Support other socket modules +- mod_push: Check for payload in encrypted messages + +## Version 19.02 + +#### Admin +- Fix in configure.ac the Erlang/OTP version: from 17.5 to 19.0 +- reload_config command: Fix crash when sql_pool_size option is used +- reload_config command: Fix crash when SQL is not configured +- rooms_empty_destroy command: Several fixes to behave more conservative +- Fix serverhost->host parameter name for muc_(un)register_nick API + +#### Configuration +- Allow specifying tag for listener for api_permission purposes +- Change default ciphers to intermediate +- Define default ciphers/protocol_option in example config +- Don't crash on malformed 'modules' section +- mod_mam: New option clear_archive_on_room_destroy to prevent archive removal on room destroy +- mod_mam: New option access_preferences to restrict who can modify the MAM preferences +- mod_muc: New option access_mam to restrict who can modify that room option +- mod_offline: New option store_groupchat to allow storing group chat messages + +#### Core +- Add MQTT protocol support +- Fix (un)setting of priority +- Use OTP application startup infrastructure for starting dependencies +- Improve starting order of several dependencies + +#### MAM +- mod_mam_mnesia/sql: Improve check for empty archive +- disallow room creation if archive not empty and clear_archive_on_room_destroy is false +- allow check if archive is empty for or user or room +- Additional checks for database failures + +#### MUC +- Make sure that room_destroyed is called even when some code throws in terminate +- Update muc room state after adding extra access field to it +- MUC/Sub: Send mucsub subscriber notification events with from set to room jid + +#### Shared Roster +- Don't perform roster push for non-local contacts +- Handle versioning result when shared roster group has remote account +- Fix SQL queries + +#### Miscelanea +- CAPTCHA: Add no-store hint to CAPTCHA challenge stanzas +- HTTP: Reject http_api request with malformed Authentication header +- mod_carboncopy: Don't lose carbons on presence change or session resumption +- mod_mix: Fix submission-id and channel resource +- mod_ping: Fix ping IQ reply/timeout processing (17.x regression) +- mod_private: Hardcode item ID for PEP bookmarks +- mod_push: Improve notification error handling +- PIEFXIS: Fix user export when password is scrammed +- Prosody: Improve import of roster items, rooms and attributes +- Translations: fixed "make translations" +- WebAdmin: Fix support to restart module with new options + +## Version 18.12 + +- MAM data store compression +- Proxy protocol support +- MUC Self-Ping optimization (XEP-0410) +- Bookmarks conversion (XEP-0411) diff --git a/content/CNAME b/content/CNAME new file mode 100644 index 00000000..17760407 --- /dev/null +++ b/content/CNAME @@ -0,0 +1 @@ +docs.ejabberd.im \ No newline at end of file diff --git a/content/CONTAINER.md b/content/CONTAINER.md new file mode 100644 index 00000000..6fbb1253 --- /dev/null +++ b/content/CONTAINER.md @@ -0,0 +1,457 @@ + +[![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/processone/ejabberd?sort=semver&logo=embarcadero&label=&color=49c0c4)](https://github.com/processone/ejabberd/tags) +[![GitHub Container](https://img.shields.io/github/v/tag/processone/ejabberd?label=ejabberd&sort=semver&logo=docker)](https://github.com/processone/ejabberd/pkgs/container/ejabberd) + + +`ejabberd` Container Image +========================== + +[ejabberd][home] is an open-source, +robust, scalable and extensible realtime platform built using [Erlang/OTP][erlang], +that includes [XMPP][xmpp] Server, [MQTT][mqtt] Broker and [SIP][sip] Service. + +[home]: https://ejabberd.im/ +[erlang]: https://www.erlang.org/ +[xmpp]: https://xmpp.org/ +[mqtt]: https://mqtt.org/ +[sip]: https://en.wikipedia.org/wiki/Session_Initiation_Protocol + +This document explains how to use the `ejabberd` container image available in +[ghcr.io/processone/ejabberd](https://github.com/processone/ejabberd/pkgs/container/ejabberd), +built using the files in `.github/container/`. +This image is based in Alpine 3.19, includes Erlang/OTP 26.2 and Elixir 1.16.1. + +Alternatively, there is also the `ecs` container image available in +[docker.io/ejabberd/ecs](https://hub.docker.com/r/ejabberd/ecs/), +built using the +[docker-ejabberd/ecs](https://github.com/processone/docker-ejabberd/tree/master/ecs) +repository. +Check the [differences between `ejabberd` and `ecs` images](https://github.com/processone/docker-ejabberd/blob/master/ecs/HUB-README.md#alternative-image-in-github). + +If you are using a Windows operating system, check the tutorials mentioned in +[ejabberd Docs > Docker Image](https://docs.ejabberd.im/admin/install/container/#ejabberd-container-image). + + +Start ejabberd +-------------- + +### With default configuration + +Start ejabberd in a new container: + +```bash +docker run --name ejabberd -d -p 5222:5222 ghcr.io/processone/ejabberd +``` + +That runs the container as a daemon, +using ejabberd default configuration file and XMPP domain "localhost". + +Stop the running container: + +```bash +docker stop ejabberd +``` + +Restart the stopped ejabberd container: + +```bash +docker restart ejabberd +``` + + +### Start with Erlang console attached + +Start ejabberd with an Erlang console attached using the `live` command: + +```bash +docker run --name ejabberd -it -p 5222:5222 ghcr.io/processone/ejabberd live +``` + +That uses the default configuration file and XMPP domain "localhost". + + +### Start with your configuration and database + +Pass a configuration file as a volume +and share the local directory to store database: + +```bash +mkdir database +chown ejabberd database + +cp ejabberd.yml.example ejabberd.yml + +docker run --name ejabberd -it \ + -v $(pwd)/ejabberd.yml:/opt/ejabberd/conf/ejabberd.yml \ + -v $(pwd)/database:/opt/ejabberd/database \ + -p 5222:5222 ghcr.io/processone/ejabberd live +``` + +Notice that ejabberd runs in the container with an account named `ejabberd`, +and the volumes you mount must grant proper rights to that account. + + +Next steps +---------- + +### Register the administrator account + +The default ejabberd configuration does not grant admin privileges +to any account, +you may want to register a new account in ejabberd +and grant it admin rights. + +Register an account using the `ejabberdctl` script: + +```bash +docker exec -it ejabberd ejabberdctl register admin localhost passw0rd +``` + +Then edit conf/ejabberd.yml and add the ACL as explained in +[ejabberd Docs: Administration Account](https://docs.ejabberd.im/admin/install/next-steps/#administration-account) + + +### Check ejabberd log files + +Check the content of the log files inside the container, +even if you do not put it on a shared persistent drive: + +```bash +docker exec -it ejabberd tail -f logs/ejabberd.log +``` + + +### Inspect the container files + +The container uses Alpine Linux. Start a shell inside the container: + +```bash +docker exec -it ejabberd sh +``` + + +### Open ejabberd debug console + +Open an interactive debug Erlang console attached to a running ejabberd in a running container: + +```bash +docker exec -it ejabberd ejabberdctl debug +``` + + +### CAPTCHA + +ejabberd includes two example CAPTCHA scripts. +If you want to use any of them, first install some additional required libraries: + +```bash +docker exec --user root ejabberd apk add imagemagick ghostscript-fonts bash +``` + +Now update your ejabberd configuration file, for example: +```bash +docker exec -it ejabberd vi conf/ejabberd.yml +``` + +and add this option: +```yaml +captcha_cmd: /opt/ejabberd-22.04/lib/captcha.sh +``` + +Finally, reload the configuration file or restart the container: +```bash +docker exec ejabberd ejabberdctl reload_config +``` + +If the CAPTCHA image is not visible, there may be a problem generating it +(the ejabberd log file may show some error message); +or the image URL may not be correctly detected by ejabberd, +in that case you can set the correct URL manually, for example: +```yaml +captcha_url: https://localhost:5443/captcha +``` + +For more details about CAPTCHA options, please check the +[CAPTCHA](https://docs.ejabberd.im/admin/configuration/basic/#captcha) +documentation section. + + +Advanced Container Configuration +-------------------------------- + +### Ports + +This container image exposes the ports: + +- `5222`: The default port for XMPP clients. +- `5269`: For XMPP federation. Only needed if you want to communicate with users on other servers. +- `5280`: For admin interface. +- `5443`: With encryption, used for admin interface, API, CAPTCHA, OAuth, Websockets and XMPP BOSH. +- `1883`: Used for MQTT +- `4369-4399`: EPMD and Erlang connectivity, used for `ejabberdctl` and clustering +- `5210`: Erlang connectivity when `ERL_DIST_PORT` is set, alternative to EPMD + + +### Volumes + +ejabberd produces two types of data: log files and database spool files (Mnesia). +This is the kind of data you probably want to store on a persistent or local drive (at least the database). + +The volumes you may want to map: + +- `/opt/ejabberd/conf/`: Directory containing configuration and certificates +- `/opt/ejabberd/database/`: Directory containing Mnesia database. +You should back up or export the content of the directory to persistent storage +(host storage, local storage, any storage plugin) +- `/opt/ejabberd/logs/`: Directory containing log files +- `/opt/ejabberd/upload/`: Directory containing uploaded files. This should also be backed up. + +All these files are owned by `ejabberd` user inside the container. + +It's possible to install additional ejabberd modules using volumes, +[this comment](https://github.com/processone/docker-ejabberd/issues/81#issuecomment-1036115146) +explains how to install an additional module using docker-compose. + + +### Commands on start + +The ejabberdctl script reads the `CTL_ON_CREATE` environment variable +the first time the container is started, +and reads `CTL_ON_START` every time the container is started. +Those variables can contain one ejabberdctl command, +or several commands separated with the blankspace and `;` characters. + +By default failure of any of commands executed that way would +abort start, this can be disabled by prefixing commands with `!` + +Example usage (or check the [full example](#customized-example)): +```yaml + environment: + - CTL_ON_CREATE=! register admin localhost asd + - CTL_ON_START=stats registeredusers ; + check_password admin localhost asd ; + status +``` + + +### Clustering + +When setting several containers to form a +[cluster of ejabberd nodes](https://docs.ejabberd.im/admin/guide/clustering/), +each one must have a different +[Erlang Node Name](https://docs.ejabberd.im/admin/guide/security/#erlang-node-name) +and the same +[Erlang Cookie](https://docs.ejabberd.im/admin/guide/security/#erlang-cookie). + +For this you can either: +- edit `conf/ejabberdctl.cfg` and set variables `ERLANG_NODE` and `ERLANG_COOKIE` +- set the environment variables `ERLANG_NODE_ARG` and `ERLANG_COOKIE` + +Example to connect a local `ejabberdctl` to a containerized ejabberd: +1. When creating the container, export port 5210, and set `ERLANG_COOKIE`: +```sh +docker run --name ejabberd -it \ + -e ERLANG_COOKIE=`cat $HOME/.erlang.cookie` \ + -p 5210:5210 -p 5222:5222 \ + ghcr.io/processone/ejabberd +``` +2. Set `ERL_DIST_PORT=5210` in ejabberdctl.cfg of container and local ejabberd +3. Restart the container +4. Now use `ejabberdctl` in your local ejabberd deployment + +To connect using a local `ejabberd` script: +```sh +ERL_DIST_PORT=5210 _build/dev/rel/ejabberd/bin/ejabberd ping +``` + +Example using environment variables (see full example [docker-compose.yml](https://github.com/processone/docker-ejabberd/issues/64#issuecomment-887741332)): +```yaml + environment: + - ERLANG_NODE_ARG=ejabberd@node7 + - ERLANG_COOKIE=dummycookie123 +``` + + +Build a Container Image +----------------------- + +This container image includes ejabberd as a standalone OTP release built using Elixir. +That OTP release is configured with: + +- `mix.exs`: Customize ejabberd release +- `vars.config`: ejabberd compilation configuration options +- `config/runtime.exs`: Customize ejabberd paths +- `ejabberd.yml.template`: ejabberd default config file + +### Direct build + +Build ejabberd Community Server container image from ejabberd master git repository: + +```bash +docker buildx build \ + -t personal/ejabberd \ + -f .github/container/Dockerfile \ + . +``` + +### Podman build + +It's also possible to use podman instead of docker, just notice: +- `EXPOSE 4369-4399` port range is not supported, remove that in Dockerfile +- It mentions that `healthcheck` is not supported by the Open Container Initiative image format +- to start with command `live`, you may want to add environment variable `EJABBERD_BYPASS_WARNINGS=true` +```bash +podman build \ + -t ejabberd \ + -f .github/container/Dockerfile \ + . + +podman run --name eja1 -d -p 5222:5222 localhost/ejabberd + +podman exec eja1 ejabberdctl status + +podman exec -it eja1 sh + +podman stop eja1 + +podman run --name eja1 -it -e EJABBERD_BYPASS_WARNINGS=true -p 5222:5222 localhost/ejabberd live +``` + +### Package build for `arm64` + +By default, `.github/container/Dockerfile` builds this container by directly compiling ejabberd, +it is a fast and direct method. +However, a problem with QEMU prevents building the container in QEMU using Erlang/OTP 25 +for the `arm64` architecture. + +Providing `--build-arg METHOD=package` is an alternate method to build the container +used by the Github Actions workflow that provides `amd64` and `arm64` container images. +It first builds an ejabberd binary package, and later installs it in the image. +That method avoids using QEMU, so it can build `arm64` container images, but is extremely +slow the first time it's used, and consequently not recommended for general use. + +In this case, to build the ejabberd container image for arm64 architecture: + +```bash +docker buildx build \ + --build-arg METHOD=package \ + --platform linux/arm64 \ + -t personal/ejabberd:$VERSION \ + -f .github/container/Dockerfile \ + . +``` + + +Composer Examples +----------------- + +### Minimal Example + +This is the barely minimal file to get a usable ejabberd. +Store it as `docker-compose.yml`: + +```yaml +services: + main: + image: ghcr.io/processone/ejabberd + container_name: ejabberd + ports: + - "5222:5222" + - "5269:5269" + - "5280:5280" + - "5443:5443" +``` + +Create and start the container with the command: +```bash +docker-compose up +``` + +### Customized Example + +This example shows the usage of several customizations: +it uses a local configuration file, +stores the mnesia database in a local path, +registers an account when it's created, +and checks the number of registered accounts every time it's started. + +Download or copy the ejabberd configuration file: +```bash +wget https://raw.githubusercontent.com/processone/ejabberd/master/ejabberd.yml.example +mv ejabberd.yml.example ejabberd.yml +``` + +Create the database directory and allow the container access to it: +```bash +mkdir database +sudo chown 9000:9000 database +``` + +Now write this `docker-compose.yml` file: +```yaml +version: '3.7' + +services: + + main: + image: ghcr.io/processone/ejabberd + container_name: ejabberd + environment: + - CTL_ON_CREATE=register admin localhost asd + - CTL_ON_START=registered_users localhost ; + status + ports: + - "5222:5222" + - "5269:5269" + - "5280:5280" + - "5443:5443" + volumes: + - ./ejabberd.yml:/opt/ejabberd/conf/ejabberd.yml:ro + - ./database:/opt/ejabberd/database +``` + +### Clustering Example + +In this example, the main container is created first. +Once it is fully started and healthy, a second container is created, +and once ejabberd is started in it, it joins the first one. + +An account is registered in the first node when created (and +we ignore errors that can happen when doing that - for example +whenn account already exists), +and it should exist in the second node after join. + +Notice that in this example the main container does not have access +to the exterior; the replica exports the ports and can be accessed. + +```yaml +version: '3.7' + +services: + + main: + image: ghcr.io/processone/ejabberd + container_name: ejabberd + environment: + - ERLANG_NODE_ARG=ejabberd@main + - ERLANG_COOKIE=dummycookie123 + - CTL_ON_CREATE=! register admin localhost asd + + replica: + image: ghcr.io/processone/ejabberd + container_name: replica + depends_on: + main: + condition: service_healthy + ports: + - "5222:5222" + - "5269:5269" + - "5280:5280" + - "5443:5443" + environment: + - ERLANG_NODE_ARG=ejabberd@replica + - ERLANG_COOKIE=dummycookie123 + - CTL_ON_CREATE=join_cluster ejabberd@main + - CTL_ON_START=registered_users localhost ; + status +``` diff --git a/content/COPYING.md b/content/COPYING.md new file mode 100644 index 00000000..917ab016 --- /dev/null +++ b/content/COPYING.md @@ -0,0 +1,364 @@ +As a special exception, the authors give permission to link this program +with the OpenSSL library and distribute the resulting binary. + +# GNU GENERAL PUBLIC LICENSE + +Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +## Preamble + +The licenses for most software are designed to take away your freedom +to share and change it. By contrast, the GNU General Public License is +intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + +To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if +you distribute copies of the software, or if you modify it. + +For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + +We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + +Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, +we want its recipients to know that what they have is not the +original, so that any problems introduced by others will not reflect +on the original authors' reputations. + +Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at +all. + +The precise terms and conditions for copying, distribution and +modification follow. + +## TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +**0.** This License applies to any program or other work which +contains a notice placed by the copyright holder saying it may be +distributed under the terms of this General Public License. The +"Program", below, refers to any such program or work, and a "work +based on the Program" means either the Program or any derivative work +under copyright law: that is to say, a work containing the Program or +a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is +included without limitation in the term "modification".) Each licensee +is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the Program +(independent of having been made by running the Program). Whether that +is true depends on what the Program does. + +**1.** You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a +fee. + +**2.** You may modify your copy or copies of the Program or any +portion of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + +**a)** You must cause the modified files to carry prominent notices +stating that you changed the files and the date of any change. + + +**b)** You must cause any work that you distribute or publish, that in +whole or in part contains or is derived from the Program or any part +thereof, to be licensed as a whole at no charge to all third parties +under the terms of this License. + + +**c)** If the modified program normally reads commands interactively +when run, you must cause it, when started running for such interactive +use in the most ordinary way, to print or display an announcement +including an appropriate copyright notice and a notice that there is +no warranty (or else, saying that you provide a warranty) and that +users may redistribute the program under these conditions, and telling +the user how to view a copy of this License. (Exception: if the +Program itself is interactive but does not normally print such an +announcement, your work based on the Program is not required to print +an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + +**3.** You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + +**a)** Accompany it with the complete corresponding machine-readable +source code, which must be distributed under the terms of Sections 1 +and 2 above on a medium customarily used for software interchange; or, + + +**b)** Accompany it with a written offer, valid for at least three +years, to give any third party, for a charge no more than your cost of +physically performing source distribution, a complete machine-readable +copy of the corresponding source code, to be distributed under the +terms of Sections 1 and 2 above on a medium customarily used for +software interchange; or, + + +**c)** Accompany it with the information you received as to the offer +to distribute corresponding source code. (This alternative is allowed +only for noncommercial distribution and only if you received the +program in object code or executable form with such an offer, in +accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + +**4.** You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt otherwise +to copy, modify, sublicense or distribute the Program is void, and +will automatically terminate your rights under this License. However, +parties who have received copies, or rights, from you under this +License will not have their licenses terminated so long as such +parties remain in full compliance. + +**5.** You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +**6.** Each time you redistribute the Program (or any work based on +the Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + +**7.** If, as a consequence of a court judgment or allegation of +patent infringement or for any other reason (not limited to patent +issues), conditions are imposed on you (whether by court order, +agreement or otherwise) that contradict the conditions of this +License, they do not excuse you from the conditions of this License. +If you cannot distribute so as to satisfy simultaneously your +obligations under this License and any other pertinent obligations, +then as a consequence you may not distribute the Program at all. For +example, if a patent license would not permit royalty-free +redistribution of the Program by all those who receive copies directly +or indirectly through you, then the only way you could satisfy both it +and this License would be to refrain entirely from distribution of the +Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + +**8.** If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + +**9.** The Free Software Foundation may publish revised and/or new +versions of the General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Program does not specify a +version number of this License, you may choose any version ever +published by the Free Software Foundation. + +**10.** If you wish to incorporate parts of the Program into other +free programs whose distribution conditions are different, write to +the author to ask for permission. For software which is copyrighted by +the Free Software Foundation, write to the Free Software Foundation; +we sometimes make exceptions for this. Our decision will be guided by +the two goals of preserving the free status of all derivatives of our +free software and of promoting the sharing and reuse of software +generally. + +**NO WARRANTY** + +**11.** BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +**12.** IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + +END OF TERMS AND CONDITIONS + +## How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these +terms. + +To do so, attach the following notices to the program. It is safest to +attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + one line to give the program's name and an idea of what it does. + Copyright (C) yyyy name of author + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2 + of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +Also add information on how to contact you by electronic and paper +mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details + type `show w'. This is free software, and you are welcome + to redistribute it under certain conditions; type `show c' + for details. + +The hypothetical commands \`show w' and \`show c' should show the +appropriate parts of the General Public License. Of course, the +commands you use may be called something other than \`show w' and +\`show c'; they could even be mouse-clicks or menu items--whatever +suits your program. + +You should also get your employer (if you work as a programmer) or +your school, if any, to sign a "copyright disclaimer" for the program, +if necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright + interest in the program `Gnomovision' + (which makes passes at compilers) written + by James Hacker. + + signature of Ty Coon, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, +you may consider it more useful to permit linking proprietary +applications with the library. If this is what you want to do, use the +[GNU Lesser General Public +License](https://www.gnu.org/licenses/lgpl.html) instead of this +License. diff --git a/content/README-DOCS.md b/content/README-DOCS.md new file mode 100644 index 00000000..efdb5070 --- /dev/null +++ b/content/README-DOCS.md @@ -0,0 +1,118 @@ +# ejabberd Docs Source Code + +The [ejabberd](http://ejabberd.im/) Community Server +has its source code available in the [ejabberd git repository](https://github.com/processone/ejabberd). +Its documentation is published in the [ejabberd Docs](https://docs.ejabberd.im) website, +and its source code is available in the [docs git repository](https://github.com/processone/docs.ejabberd.im). + +This is a community effort and you are welcome to submit issues or pull requests +in order to improve the docs and benefit the ejabberd community. + +This documentation site is built using [MkDocs](http://www.mkdocs.org/) +and [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/). + +## Installation + +To build the site you need Python 3.6 or later, then install the dependencies: + +### pip + +```bash +mkdir -p .venv +python3 -m venv .venv +source .venv/bin/activate +pip install -r requirements.txt +``` + +!!! info + From now on, remember to run `source .venv/bin/activate` before running any `mkdocs [...]` command. + +!!! tip + You can freeze the dependencies to a file using `pip freeze > requirements.txt`. + +### Debian + +You could install most dependencies using APT: + +```bash +apt-get install mkdocs \ + mkdocs-material \ + mkdocs-material-extensions \ + mkdocs-redirects \ + python3-bs4 +``` + +!!! warning + Unfortunately Debian doesn't package `mkdocs-with-pdf`, so you should remove `with-pdf` plugin from `mkdocs.yml`. + +## Building + +Now you can start a small webserver that builds the site dynamically: + +```bash +mkdocs serve +``` + +or build the site into static html files in the `site/` directory: + +```bash +mkdocs build +``` + +## Testing + +To verify the internal URLs in the site: + +```bash +TEST=true mkdocs serve +``` + +To verify the internal URLs and also the external links: + +```bash +TEST=true TEST_EXTERNAL=true mkdocs serve +``` + +## Updating content + +Some pages in this documentation are extracted from a running ejabberd node: + +- [admin/configuration/toplevel.md](admin/configuration/toplevel.md) +- [admin/configuration/modules.md](admin/configuration/modules.md) +- [developer/ejabberd-api/admin-api.md](developer/ejabberd-api/admin-api.md) +- [developer/ejabberd-api/admin-tags.md](developer/ejabberd-api/admin-tags.md) + +To update those pages, install ejabberd, start it and run `make all` in this repository. +This gets documentation from ejabberd, processes it to obtain markdown content +and moves the files to this repository. + +Additionally, there are several other pages that are markdown files copied from +ejabberd git repository and docker-ejabberd git repository. Those repositories +must be available next to docs.ejabberd.im before running `make all`. + +## Markdown Shorthands + +When editing ejabberd source code to document top-level options, modules or API commands, +there is some additional syntax supported to generate HTML URLs: + +For example, this text in the ejabberd source code: + +``` erlang +_`mod_muc_admin`_ +_`bookmarks_to_pep`_ API +_`default_db`_ +_`basic.md#captcha|CAPTCHA`_ +https://xmpp.org/extensions/xep-0045.html[XEP-0045] +``` + +gets converted into this markdown: + +``` markdown +[mod_muc_admin](../../admin/configuration/modules.md#mod_muc_admin) +[bookmarks_to_pep](../../developer/ejabberd-api/admin-api.md#bookmarks_to_pep) API +[default_db](toplevel.md#default_db) +[CAPTCHA](basic.md#captcha) +[XEP-0045](https://xmpp.org/extensions/xep-0045.html) +``` + +There are example usage of those shorthands in ejabberd, for example in `mod_muc.erl`. diff --git a/content/README-ECS.md b/content/README-ECS.md new file mode 100644 index 00000000..830d4fc2 --- /dev/null +++ b/content/README-ECS.md @@ -0,0 +1,541 @@ + +[![Docker Image Version (latest by date)](https://img.shields.io/docker/v/ejabberd/ecs)](https://hub.docker.com/r/ejabberd/ecs/) +[![Docker Image Size (latest by date)](https://img.shields.io/docker/image-size/ejabberd/ecs)](https://hub.docker.com/r/ejabberd/ecs/) +[![Docker Stars](https://img.shields.io/docker/stars/ejabberd/ecs)](https://hub.docker.com/r/ejabberd/ecs/) +[![Docker Pulls](https://img.shields.io/docker/pulls/ejabberd/ecs)](https://hub.docker.com/r/ejabberd/ecs/) +[![Build Status](https://github.com/processone/docker-ejabberd/actions/workflows/tests.yml/badge.svg)](https://github.com/processone/docker-ejabberd/actions/workflows/tests.yml) +[![GitHub stars](https://img.shields.io/github/stars/processone/docker-ejabberd?style=social)](https://github.com/processone/docker-ejabberd) + +# `ecs` Container Image + +ejabberd is an open-source XMPP server, robust, scalable and modular, +built using Erlang/OTP, and also includes MQTT Broker and SIP Service. + +This container image allows you to run a single node ejabberd instance in a container. + +There is an [Alternative Image in GitHub Packages](README-HUB.md#alternative-image-in-github), built using a different method and some improvements. + +If you are using a Windows operating system, check the tutorials mentioned in +[ejabberd Docs > Docker Image](https://docs.ejabberd.im/admin/installation/#docker-image). + +# Start ejabberd + +## With default configuration + +You can start ejabberd in a new container with the following command: + +```bash +docker run --name ejabberd -d -p 5222:5222 ejabberd/ecs +``` + +This command will run the container image as a daemon, +using ejabberd default configuration file and XMPP domain "localhost". + +To stop the running container, you can run: + +```bash +docker stop ejabberd +``` + +If needed, you can restart the stopped ejabberd container with: + +```bash +docker restart ejabberd +``` + +## Start with Erlang console attached + +If you would like to start ejabberd with an Erlang console attached you can use the `live` command: + +```bash +docker run -it -p 5222:5222 ejabberd/ecs live +``` + +This command will use default configuration file and XMPP domain "localhost". + +## Start with your configuration and database + +This command passes the configuration file using the volume feature +and shares the local directory to store database: + +```bash +mkdir database +docker run -d --name ejabberd -v $(pwd)/ejabberd.yml:/home/ejabberd/conf/ejabberd.yml -v $(pwd)/database:/home/ejabberd/database -p 5222:5222 ejabberd/ecs +``` + +# Next steps + +## Register the administrator account + +The default ejabberd configuration has already granted admin privilege +to an account that would be called `admin@localhost`, +so you just need to register such an account +to start using it for administrative purposes. +You can register this account using the `ejabberdctl` script, for example: + +```bash +docker exec -it ejabberd bin/ejabberdctl register admin localhost passw0rd +``` + +## Check ejabberd log files + +Check the ejabberd log file in the container: + +```bash +docker exec -it ejabberd tail -f logs/ejabberd.log +``` + +## Inspect the container files + +The container uses Alpine Linux. You can start a shell there with: + +```bash +docker exec -it ejabberd sh +``` + +## Open ejabberd debug console + +You can open a live debug Erlang console attached to a running container: + +```bash +docker exec -it ejabberd bin/ejabberdctl debug +``` + +## CAPTCHA + +ejabberd includes two example CAPTCHA scripts. +If you want to use any of them, first install some additional required libraries: + +```bash +docker exec --user root ejabberd apk add imagemagick ghostscript-fonts bash +``` + +Now update your ejabberd configuration file, for example: +```bash +docker exec -it ejabberd vi conf/ejabberd.yml +``` + +and add this option: +```yaml +captcha_cmd: /home/ejabberd/lib/ejabberd-21.1.0/priv/bin/captcha.sh +``` + +Finally, reload the configuration file or restart the container: +```bash +docker exec ejabberd bin/ejabberdctl reload_config +``` + +If the CAPTCHA image is not visible, there may be a problem generating it +(the ejabberd log file may show some error message); +or the image URL may not be correctly detected by ejabberd, +in that case you can set the correct URL manually, for example: +```yaml +captcha_url: https://localhost:5443/captcha +``` + +For more details about CAPTCHA options, please check the +[CAPTCHA](https://docs.ejabberd.im/admin/configuration/basic/#captcha) +documentation section. + + +## Use ejabberdapi + +When the container is running (and thus ejabberd), you can exec commands inside the container +using `ejabberdctl` or any other of the available interfaces, see +[Understanding ejabberd "commands"](https://docs.ejabberd.im/developer/ejabberd-api/#understanding-ejabberd-commands) + +Additionally, this container image includes the `ejabberdapi` executable. +Please check the [ejabberd-api homepage](https://github.com/processone/ejabberd-api) +for configuration and usage details. + +For example, if you configure ejabberd like this: +```yaml +listen: + - + port: 5282 + module: ejabberd_http + request_handlers: + "/api": mod_http_api + +acl: + loopback: + ip: + - 127.0.0.0/8 + - ::1/128 + - ::FFFF:127.0.0.1/128 + +api_permissions: + "admin access": + who: + access: + allow: + acl: loopback + what: + - "register" +``` + +Then you could register new accounts with this query: + +```bash +docker exec -it ejabberd bin/ejabberdapi register --endpoint=http://127.0.0.1:5282/ --jid=admin@localhost --password=passw0rd +``` + +# Advanced container configuration + +## Ports + +This container image exposes the ports: + +- `5222`: The default port for XMPP clients. +- `5269`: For XMPP federation. Only needed if you want to communicate with users on other servers. +- `5280`: For admin interface. +- `5443`: With encryption, used for admin interface, API, CAPTCHA, OAuth, Websockets and XMPP BOSH. +- `1883`: Used for MQTT +- `4369-4399`: EPMD and Erlang connectivity, used for `ejabberdctl` and clustering + +## Volumes + +ejabberd produces two types of data: log files and database (Mnesia). +This is the kind of data you probably want to store on a persistent or local drive (at least the database). + +Here are the volume you may want to map: + +- `/home/ejabberd/conf/`: Directory containing configuration and certificates +- `/home/ejabberd/database/`: Directory containing Mnesia database. +You should back up or export the content of the directory to persistent storage +(host storage, local storage, any storage plugin) +- `/home/ejabberd/logs/`: Directory containing log files +- `/home/ejabberd/upload/`: Directory containing uploaded files. This should also be backed up. + +All these files are owned by ejabberd user inside the container. Corresponding +`UID:GID` is `9000:9000`. If you prefer bind mounts instead of volumes, then +you need to map this to valid `UID:GID` on your host to get read/write access on +mounted directories. + +## Commands on start + +The ejabberdctl script reads the `CTL_ON_CREATE` environment variable +the first time the container is started, +and reads `CTL_ON_START` every time the container is started. +Those variables can contain one ejabberdctl command, +or several commands separated with the blankspace and `;` characters. + +By default failure of any of commands executed that way would +abort start, this can be disabled by prefixing commands with `!` + +Example usage (or check the [full example](#customized-example)): +```yaml + environment: + - CTL_ON_CREATE=! register admin localhost asd + - CTL_ON_START=stats registeredusers ; + check_password admin localhost asd ; + status +``` + +## Clustering + +When setting several containers to form a +[cluster of ejabberd nodes](https://docs.ejabberd.im/admin/guide/clustering/), +each one must have a different +[Erlang Node Name](https://docs.ejabberd.im/admin/guide/security/#erlang-node-name) +and the same +[Erlang Cookie](https://docs.ejabberd.im/admin/guide/security/#erlang-cookie). +For this you can either: +- edit `conf/ejabberdctl.cfg` and set variables `ERLANG_NODE` and `ERLANG_COOKIE` +- set the environment variables `ERLANG_NODE_ARG` and `ERLANG_COOKIE` + +Once you have the ejabberd nodes properly set and running, +you can tell the secondary nodes to join the master node using the +[`join_cluster`](https://docs.ejabberd.im/developer/ejabberd-api/admin-api/#join-cluster) +API call. + +Example using environment variables (see the full +[`docker-compose.yml` clustering example](#clustering-example)): +```yaml +environment: + - ERLANG_NODE_ARG=ejabberd@replica + - ERLANG_COOKIE=dummycookie123 + - CTL_ON_CREATE=join_cluster ejabberd@main +``` + +## Change Mnesia Node Name + +To use the same Mnesia database in a container with a different hostname, +it is necessary to change the old hostname stored in Mnesia. + +This section is equivalent to the ejabberd Documentation +[Change Computer Hostname](https://docs.ejabberd.im/admin/guide/managing/#change-computer-hostname), +but particularized to containers that use this +ecs container image from ejabberd 23.01 or older. + +### Setup Old Container + +Let's assume a container running ejabberd 23.01 (or older) from +this ecs container image, with the database directory binded +and one registered account. +This can be produced with: +```bash +OLDCONTAINER=ejaold +NEWCONTAINER=ejanew + +mkdir database +sudo chown 9000:9000 database +docker run -d --name $OLDCONTAINER -p 5222:5222 \ + -v $(pwd)/database:/home/ejabberd/database \ + ejabberd/ecs:23.01 +docker exec -it $OLDCONTAINER bin/ejabberdctl started +docker exec -it $OLDCONTAINER bin/ejabberdctl register user1 localhost somepass +docker exec -it $OLDCONTAINER bin/ejabberdctl registered_users localhost +``` + +Methods to know the Erlang node name: +```bash +ls database/ | grep ejabberd@ +docker exec -it $OLDCONTAINER bin/ejabberdctl status +docker exec -it $OLDCONTAINER grep "started in the node" logs/ejabberd.log +``` + +### Change Mnesia Node + +First of all let's store the Erlang node names and paths in variables. +In this example they would be: +```bash +OLDCONTAINER=ejaold +NEWCONTAINER=ejanew +OLDNODE=ejabberd@95145ddee27c +NEWNODE=ejabberd@localhost +OLDFILE=/home/ejabberd/database/old.backup +NEWFILE=/home/ejabberd/database/new.backup +``` + +1. Start your old container that can still read the Mnesia database correctly. +If you have the Mnesia spool files, +but don't have access to the old container anymore, go to +[Create Temporary Container](#create-temporary-container) +and later come back here. + +2. Generate a backup file and check it was created: +```bash +docker exec -it $OLDCONTAINER bin/ejabberdctl backup $OLDFILE +ls -l database/*.backup +``` + +3. Stop ejabberd: +```bash +docker stop $OLDCONTAINER +``` + +4. Create the new container. For example: +```bash +docker run \ + --name $NEWCONTAINER \ + -d \ + -p 5222:5222 \ + -v $(pwd)/database:/home/ejabberd/database \ + ejabberd/ecs:latest +``` + +5. Convert the backup file to new node name: +```bash +docker exec -it $NEWCONTAINER bin/ejabberdctl mnesia_change_nodename $OLDNODE $NEWNODE $OLDFILE $NEWFILE +``` + +6. Install the backup file as a fallback: +```bash +docker exec -it $NEWCONTAINER bin/ejabberdctl install_fallback $NEWFILE +``` + +7. Restart the container: +```bash +docker restart $NEWCONTAINER +``` + +8. Check that the information of the old database is available. +In this example, it should show that the account `user1` is registered: +```bash +docker exec -it $NEWCONTAINER bin/ejabberdctl registered_users localhost +``` + +9. When the new container is working perfectly with the converted Mnesia database, +you may want to remove the unneeded files: +the old container, the old Mnesia spool files, and the backup files. + +### Create Temporary Container + +In case the old container that used the Mnesia database is not available anymore, +a temporary container can be created just to read the Mnesia database +and make a backup of it, as explained in the previous section. + +This method uses `--hostname` command line argument for docker, +and `ERLANG_NODE_ARG` environment variable for ejabberd. +Their values must be the hostname of your old container +and the Erlang node name of your old ejabberd node. +To know the Erlang node name please check +[Setup Old Container](#setup-old-container). + +Command line example: +```bash +OLDHOST=${OLDNODE#*@} +docker run \ + -d \ + --name $OLDCONTAINER \ + --hostname $OLDHOST \ + -p 5222:5222 \ + -v $(pwd)/database:/home/ejabberd/database \ + -e ERLANG_NODE_ARG=$OLDNODE \ + ejabberd/ecs:latest +``` + +Check the old database content is available: +```bash +docker exec -it $OLDCONTAINER bin/ejabberdctl registered_users localhost +``` + +Now that you have ejabberd running with access to the Mnesia database, +you can continue with step 2 of previous section +[Change Mnesia Node](#change-mnesia-node). + +# Generating ejabberd release + +## Configuration + +Image is built by embedding an ejabberd Erlang/OTP standalone release in the image. + +The configuration of ejabberd Erlang/OTP release is customized with: + +- `rel/config.exs`: Customize ejabberd release +- `rel/dev.exs`: ejabberd environment configuration for development release +- `rel/prod.exs`: ejabberd environment configuration for production release +- `vars.config`: ejabberd compilation configuration options +- `conf/ejabberd.yml`: ejabberd default config file + +Build ejabberd Community Server base image from ejabberd master on Github: + +```bash +docker build -t ejabberd/ecs . +``` + +Build ejabberd Community Server base image for a given ejabberd version: + +```bash +./build.sh 18.03 +``` + +# Composer Examples + +## Minimal Example + +This is the barely minimal file to get a usable ejabberd. +Store it as `docker-compose.yml`: + +```yaml +services: + main: + image: ejabberd/ecs + container_name: ejabberd + ports: + - "5222:5222" + - "5269:5269" + - "5280:5280" + - "5443:5443" +``` + +Create and start the container with the command: +```bash +docker-compose up +``` + +## Customized Example + +This example shows the usage of several customizations: +it uses a local configuration file, +stores the mnesia database in a local path, +registers an account when it's created, +and checks the number of registered accounts every time it's started. + +Download or copy the ejabberd configuration file: +```bash +wget https://raw.githubusercontent.com/processone/ejabberd/master/ejabberd.yml.example +mv ejabberd.yml.example ejabberd.yml +``` + +Create the database directory and allow the container access to it: +```bash +mkdir database +sudo chown 9000:9000 database +``` + +Now write this `docker-compose.yml` file: +```yaml +version: '3.7' + +services: + + main: + image: ejabberd/ecs + container_name: ejabberd + environment: + - CTL_ON_CREATE=register admin localhost asd + - CTL_ON_START=registered_users localhost ; + status + ports: + - "5222:5222" + - "5269:5269" + - "5280:5280" + - "5443:5443" + volumes: + - ./ejabberd.yml:/home/ejabberd/conf/ejabberd.yml:ro + - ./database:/home/ejabberd/database +``` + +## Clustering Example + +In this example, the main container is created first. +Once it is fully started and healthy, a second container is created, +and once ejabberd is started in it, it joins the first one. + +An account is registered in the first node when created (and +we ignore errors that can happen when doing that - for example +when account already exists), +and it should exist in the second node after join. + +Notice that in this example the main container does not have access +to the exterior; the replica exports the ports and can be accessed. + +```yaml +version: '3.7' + +services: + + main: + image: ejabberd/ecs + container_name: main + environment: + - ERLANG_NODE_ARG=ejabberd@main + - ERLANG_COOKIE=dummycookie123 + - CTL_ON_CREATE=! register admin localhost asd + healthcheck: + test: netstat -nl | grep -q 5222 + start_period: 5s + interval: 5s + timeout: 5s + retries: 120 + + replica: + image: ejabberd/ecs + container_name: replica + depends_on: + main: + condition: service_healthy + ports: + - "5222:5222" + - "5269:5269" + - "5280:5280" + - "5443:5443" + environment: + - ERLANG_NODE_ARG=ejabberd@replica + - ERLANG_COOKIE=dummycookie123 + - CTL_ON_CREATE=join_cluster ejabberd@main + - CTL_ON_START=registered_users localhost ; + status +``` diff --git a/content/README-GIT.md b/content/README-GIT.md new file mode 100644 index 00000000..26553018 --- /dev/null +++ b/content/README-GIT.md @@ -0,0 +1,134 @@ +# Readme + + +

+ +

+

+ + + + + + + + + + +
+ + + + + + + + +

+ + +[ejabberd][im] is an open-source, +robust, scalable and extensible realtime platform built using [Erlang/OTP][erlang], +that includes [XMPP][xmpp] Server, [MQTT][mqtt] Broker and [SIP][sip] Service. + +Check the features in [ejabberd.im][im], [ejabberd Docs][features], +[ejabberd at ProcessOne][p1home], and the list of [supported protocols in ProcessOne][xeps] +and [XMPP.org][xmppej]. + +Installation +------------ + +There are several ways to install ejabberd: + +- Source code: compile yourself, see [COMPILE](admin/install/source.md) +- Installers: [ProcessOne Download][p1download] and [GitHub Releases][releases] for releases, [GitHub Actions](https://github.com/processone/ejabberd/actions/workflows/installers.yml) for master branch (run/deb/rpm for x64 and arm64) +- `ecs` container image: [Docker Hub][hubecs] and [Github Packages][packagesecs], see [ecs README][docker-ecs-readme] (for x64) +- `ejabberd` container image: [Github Packages][packages] for releases and master branch, see [CONTAINER](CONTAINER.md) (for x64 and arm64) +- Using your [Operating System package][osp] +- Using the [Homebrew][homebrew] package manager + + +Documentation +------------- + +Please check the [ejabberd Docs][docs] website. + +When compiling from source code, you can get some help with: + + ./configure --help + make help + +Once ejabberd is installed, try: + + ejabberdctl help + man ejabberd.yml + + +Development +----------- + +Bug reports and features are tracked using [GitHub Issues][issues], +please check [CONTRIBUTING](contributing/index.md) for details. + +Translations can be improved online [using Weblate][weblate] +or in your local machine as explained in [Localization][localization]. + +Documentation for developers is available in [ejabberd docs: Developers][docs-dev]. + +There are nightly builds of ejabberd, both for `master` branch and for Pull Requests: +- Installers: go to [GitHub Actions: Installers](https://github.com/processone/ejabberd/actions/workflows/installers.yml), open the most recent commit, on the bottom of that commit page, download the `ejabberd-packages.zip` artifact. +- `ejabberd` container image: go to [ejabberd Github Packages][packages] + +Security reports or concerns should preferably be reported privately, +please send an email to the address: contact at process-one dot net +or some other method from [ProcessOne Contact][p1contact]. + +For commercial offering and support, including [ejabberd Business Edition][p1home] +and [Fluux (ejabberd in the Cloud)][fluux], please check [ProcessOne ejabberd page][p1home]. + + +Community +--------- + +There are several places to get in touch with other ejabberd developers and administrators: + +- ejabberd XMPP chatroom: [ejabberd@conference.process-one.net][muc] +- [GitHub Discussions][discussions] +- [Stack Overflow][stackoverflow] + + +License +------- + +ejabberd is released under the GNU General Public License v2 (see [COPYING](COPYING.md)), +and [ejabberd translations](https://github.com/processone/ejabberd-po/) under MIT License. + + +[discussions]: https://github.com/processone/ejabberd/discussions +[docker-ecs-readme]: https://github.com/processone/docker-ejabberd/tree/master/ecs#readme +[docs-dev]: https://docs.ejabberd.im/developer/ +[docs]: https://docs.ejabberd.im +[erlang]: https://www.erlang.org/ +[features]: https://docs.ejabberd.im/admin/introduction/ +[fluux]: https://fluux.io/ +[homebrew]: https://docs.ejabberd.im/admin/install/homebrew/ +[hubecs]: https://hub.docker.com/r/ejabberd/ecs/ +[im]: https://ejabberd.im/ +[issues]: https://github.com/processone/ejabberd/issues +[localization]: https://docs.ejabberd.im/developer/extending-ejabberd/localization/ +[mqtt]: https://mqtt.org/ +[muc]: xmpp:ejabberd@conference.process-one.net +[osp]: https://docs.ejabberd.im/admin/install/os-package/ +[p1contact]: https://www.process-one.net/en/company/contact/ +[p1download]: https://www.process-one.net/en/ejabberd/downloads/ +[p1home]: https://www.process-one.net/en/ejabberd/ +[packages]: https://github.com/processone/ejabberd/pkgs/container/ejabberd +[packagesecs]: https://github.com/processone/docker-ejabberd/pkgs/container/ecs +[releases]: https://github.com/processone/ejabberd/releases +[sip]: https://en.wikipedia.org/wiki/Session_Initiation_Protocol +[stackoverflow]: https://stackoverflow.com/questions/tagged/ejabberd?sort=newest +[weblate]: https://hosted.weblate.org/projects/ejabberd/ejabberd-po/ +[xeps]: https://www.process-one.net/en/ejabberd/protocols/ +[xmpp]: https://xmpp.org/ +[xmppej]: https://xmpp.org/software/servers/ejabberd/ + diff --git a/content/README-HUB.md b/content/README-HUB.md new file mode 100644 index 00000000..2871cf62 --- /dev/null +++ b/content/README-HUB.md @@ -0,0 +1,58 @@ +# ejabberd Community Server Docker Image + +## What is ejabberd + +[ejabberd][im] is an open-source, +robust, scalable and extensible realtime platform built using [Erlang/OTP][erlang], +that includes [XMPP][xmpp] Server, [MQTT][mqtt] Broker and [SIP][sip] Service. + +Check the features in [ejabberd.im][im], [ejabberd Docs][features], +[ejabberd at ProcessOne][p1home], and a list of [supported protocols and XEPs][xeps]. + +[im]: https://ejabberd.im/ +[erlang]: https://www.erlang.org/ +[xmpp]: https://xmpp.org/ +[mqtt]: https://mqtt.org/ +[sip]: https://en.wikipedia.org/wiki/Session_Initiation_Protocol +[features]: https://docs.ejabberd.im/admin/introduction/ +[p1home]: https://www.process-one.net/en/ejabberd/ +[xeps]: https://www.process-one.net/en/ejabberd/protocols/ + + +## What is `ejabberd/ecs` + +This `ejabberd/ecs` Docker image is built for stable ejabberd releases using +[docker-ejabberd/ecs](https://github.com/processone/docker-ejabberd/tree/master/ecs). +It's based in Alpine Linux, and is aimed at providing a simple image to setup and configure. + +Please report problems related to this `ejabberd/ecs` image packaging in +[docker-ejabberd Issues](https://github.com/processone/docker-ejabberd/issues), +and general ejabberd problems in +[ejabberd Issues](https://github.com/processone/ejabberd/issues). + + +## How to use the ejabberd/ecs image + +Please check [ejabberd/ecs README](https://github.com/processone/docker-ejabberd/tree/master/ecs#readme) + + +## Supported Architectures + +This `ejabberd/ecs` docker image is built for the `linux/amd64` architecture. + + +## Alternative Image in GitHub + +There is another container image published in +[ejabberd GitHub Packages](https://github.com/processone/ejabberd/pkgs/container/ejabberd), +that you can download from the GitHub Container Registry. + +Its usage is similar to this `ejabberd/ecs` image, with some benefits and changes worth noting: + +- it's available for `linux/amd64` and `linux/arm64` architectures +- it's built also for `master` branch, in addition to the stable ejabberd releases +- it includes less customizations to the base ejabberd compared to `ejabberd/ecs` +- it stores data in `/opt/ejabberd/` instead of `/home/ejabberd/` + +See its documentation in [CONTAINER](https://github.com/processone/ejabberd/blob/master/CONTAINER.md). + diff --git a/content/admin/api/index.md b/content/admin/api/index.md deleted file mode 100755 index b376ce6f..00000000 --- a/content/admin/api/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect: /developer/ejabberd-api/admin-api/ ---- - diff --git a/content/admin/configuration/authentication.md b/content/admin/configuration/authentication.md index e3adbcc5..a24120f0 100644 --- a/content/admin/configuration/authentication.md +++ b/content/admin/configuration/authentication.md @@ -1,60 +1,55 @@ ---- -title: Authentication -toc: true -menu: Authentication -order: 50 ---- +# Authentication -# Supported Methods +## Supported Methods The authentication methods supported by `ejabberd` are: -- `internal` — See section [Internal](#internal). +- `internal` — See section [Internal](#internal). -- `external` — See section [External Script](#external-script). +- `external` — See section [External Script](#external-script). -- `ldap` — See section  [LDAP](/admin/configuration/ldap/#ldap-authentication). +- `ldap` — See section  [LDAP](ldap.md#ldap-authentication). -- `sql` — See section [Relational Databases](/admin/configuration/database/#sql-authentication). +- `sql` — See section [Relational Databases](database.md#sql-authentication). -- `anonymous` — See section [Anonymous Login and SASL Anonymous](#anonymous-login-and-sasl-anonymous). +- `anonymous` — See section [Anonymous Login and SASL Anonymous](#anonymous-login-and-sasl-anonymous). -- `pam` — See section [Pam Authentication](#pam-authentication). +- `pam` — See section [Pam Authentication](#pam-authentication). -- `jwt` — See section [JWT Authentication](#jwt-authentication). +- `jwt` — See section [JWT Authentication](#jwt-authentication). -The top-level option [auth_method](/admin/configuration/toplevel/#auth-method) +The top-level option [auth_method](toplevel.md#auth_method) defines the authentication methods that are used for user authentication. The option syntax is: -```yaml +``` yaml auth_method: [Method1, Method2, ...] ``` -When the `auth_method` option is omitted, `ejabberd` relies on the default database which is configured in [`default_db`](/admin/configuration/toplevel/#default-db) option. If this option is not set neither, then the default authentication method will be `internal`. +When the `auth_method` option is omitted, `ejabberd` relies on the default database which is configured in [`default_db`](toplevel.md#default_db) option. If this option is not set neither, then the default authentication method will be `internal`. Account creation is only supported by `internal`, `external` and `sql` auth methods. -# General Options +## General Options The top-level option -[auth_password_format](/admin/configuration/toplevel/#auth-password-format) +[auth_password_format](toplevel.md#auth_password_format) allows to store the passwords in SCRAM format, see the [SCRAM](#scram) section. Other top-level options that are relevant to the authentication configuration: -[disable_sasl_mechanisms](/admin/configuration/toplevel/#disable-sasl-mechanisms), -[fqdn](/admin/configuration/toplevel/#fqdn). +[disable_sasl_mechanisms](toplevel.md#disable_sasl_mechanisms), +[fqdn](toplevel.md#fqdn). Authentication caching is enabled by default, and can be disabled in a specific vhost with the option -[auth_use_cache](/admin/configuration/toplevel/#auth-use-cache). +[auth_use_cache](toplevel.md#auth_use_cache). The global authentication cache can be configured for all the authentication methods with the global top-level options: -[auth_cache_missed](/admin/configuration/toplevel/#auth-cache-missed), -[auth_cache_size](/admin/configuration/toplevel/#auth-cache-size), -[auth_cache_life_time](/admin/configuration/toplevel/#auth-cache-life-time). +[auth_cache_missed](toplevel.md#auth_cache_missed), +[auth_cache_size](toplevel.md#auth_cache_size), +[auth_cache_life_time](toplevel.md#auth_cache_life_time). For example: ``` yaml @@ -69,7 +64,7 @@ host_config: auth_use_cache: false ``` -# Internal +## Internal `ejabberd` uses its internal Mnesia database as the default authentication method. The value `internal` will enable the internal @@ -80,24 +75,26 @@ see the [SCRAM](#scram) section. Examples: -- To use internal authentication on `example.org` and LDAP - authentication on `example.net`: - +- To use internal authentication on `example.org` and LDAP + authentication on `example.net`: - host_config: - example.org: - auth_method: [internal] - example.net: - auth_method: [ldap] + ``` yaml + host_config: + example.org: + auth_method: [internal] + example.net: + auth_method: [ldap] + ``` -- To use internal authentication with hashed passwords on all virtual - hosts: +- To use internal authentication with hashed passwords on all virtual + hosts: + ``` yaml + auth_method: internal + auth_password_format: scram + ``` - auth_method: internal - auth_password_format: scram - -# External Script +## External Script In the `external` authentication method, ejabberd uses a custom script to perform authentication tasks. @@ -106,233 +103,251 @@ any programming language. Please check some example scripts, and the details on the interface between ejabberd and the script in the -[Developers > Internals > External Authentication](/developer/guide/#external-authentication) section. +[Developers > Internals > External Authentication](../../developer/guide.md#external-authentication) section. Options: -- [extauth_pool_name](/admin/configuration/toplevel/#extauth-pool-name) -- [extauth_pool_size](/admin/configuration/toplevel/#extauth-pool-size) -- [extauth_program](/admin/configuration/toplevel/#extauth-program) +- [extauth_pool_name](toplevel.md#extauth_pool_name) +- [extauth_pool_size](toplevel.md#extauth_pool_size) +- [extauth_program](toplevel.md#extauth_program) Please note that caching interferes with the ability to maintain multiple passwords per account. So if your authentication mechanism supports application-specific passwords, caching must be disabled in the host that uses this authentication method with the -option [auth_use_cache](/admin/configuration/toplevel/#auth-use-cache). +option [auth_use_cache](toplevel.md#auth_use_cache). This example sets external authentication, specifies the extauth script, disables caching, and starts three instances of the script for each virtual host defined in ejabberd: +``` yaml +auth_method: [external] +extauth_program: /etc/ejabberd/JabberAuth.class.php +extauth_pool_size: 3 +auth_use_cache: false +``` - auth_method: [external] - extauth_program: /etc/ejabberd/JabberAuth.class.php - extauth_pool_size: 3 - auth_use_cache: false - -# Anonymous Login and SASL Anonymous +## Anonymous Login and SASL Anonymous The `anonymous` authentication method enables two modes for anonymous authentication: **`Anonymous login`**: This is a standard login, that use the classical login and password - mechanisms, but where password is accepted or preconfigured for all - anonymous users. This login is compliant with SASL authentication, - password and digest non-SASL authentication, so this option will - work with almost all XMPP clients + mechanisms, but where password is accepted or preconfigured for all + anonymous users. This login is compliant with SASL authentication, + password and digest non-SASL authentication, so this option will + work with almost all XMPP clients **`SASL Anonymous`**: This is a special SASL authentication mechanism that allows to login - without providing username or password (see - [`XEP-0175`](https://xmpp.org/extensions/xep-0175.html)). The main - advantage of SASL Anonymous is that the protocol was designed to - give the user a login. This is useful to avoid in some case, where - the server has many users already logged or registered and when it - is hard to find a free username. The main disavantage is that you - need a client that specifically supports the SASL Anonymous - protocol. + without providing username or password (see + [`XEP-0175`](https://xmpp.org/extensions/xep-0175.html)). The main + advantage of SASL Anonymous is that the protocol was designed to + give the user a login. This is useful to avoid in some case, where + the server has many users already logged or registered and when it + is hard to find a free username. The main disadvantage is that you + need a client that specifically supports the SASL Anonymous + protocol. The anonymous authentication method can be configured with the following -options. Remember that you can use the [host_config](/admin/configuration/toplevel/#host-config) option to set -virtual host specific options (see section [Virtual Hosting](/admin/configuration/basic/#virtual-hosting)): +options. Remember that you can use the [host_config](toplevel.md#host_config) option to set +virtual host specific options (see section [Virtual Hosting](basic.md#virtual-hosting)): -- [allow_multiple_connections](/admin/configuration/toplevel/#allow-multiple-connections) -- [anonymous_protocol](/admin/configuration/toplevel/#anonymous-protocol) +- [allow_multiple_connections](toplevel.md#allow_multiple_connections) +- [anonymous_protocol](toplevel.md#anonymous_protocol) Examples: -- To enable anonymous login on all virtual hosts: - - - auth_method: [anonymous] - anonymous_protocol: login_anon - -- Similar as previous example, but limited to `public.example.org`: - - - host_config: - public.example.org: - auth_method: [anonymous] - anonymous_protoco: login_anon - -- To enable anonymous login and internal authentication on a virtual - host: - - - host_config: - public.example.org: - auth_method: - - internal - - anonymous - anonymous_protocol: login_anon - -- To enable SASL Anonymous on a virtual host: - - - host_config: - public.example.org: - auth_method: [anonymous] - anonymous_protocol: sasl_anon - -- To enable SASL Anonymous and anonymous login on a virtual host: - - - host_config: - public.example.org: - auth_method: [anonymous] - anonymous_protocol: both - -- To enable SASL Anonymous, anonymous login, and internal - authentication on a virtual host: - - - host_config: - public.example.org: - auth_method: - - internal - - anonymous - anonymous_protocol: both +- To enable anonymous login on all virtual hosts: + + ``` yaml + auth_method: [anonymous] + anonymous_protocol: login_anon + ``` + +- Similar as previous example, but limited to `public.example.org`: + + ``` yaml + host_config: + public.example.org: + auth_method: [anonymous] + anonymous_protoco: login_anon + ``` + +- To enable anonymous login and internal authentication on a virtual + host: + + ``` yaml + host_config: + public.example.org: + auth_method: + - internal + - anonymous + anonymous_protocol: login_anon + ``` + +- To enable SASL Anonymous on a virtual host: + + ``` yaml + host_config: + public.example.org: + auth_method: [anonymous] + anonymous_protocol: sasl_anon + ``` + +- To enable SASL Anonymous and anonymous login on a virtual host: + + ``` yaml + host_config: + public.example.org: + auth_method: [anonymous] + anonymous_protocol: both + ``` + +- To enable SASL Anonymous, anonymous login, and internal + authentication on a virtual host: + + ``` yaml + host_config: + public.example.org: + auth_method: + - internal + - anonymous + anonymous_protocol: both + ``` There are more configuration examples and XMPP client example stanzas in [`Anonymous users support`](https://ejabberd.im/Anonymous-users-support). -# PAM Authentication +## PAM Authentication `ejabberd` supports authentication via Pluggable Authentication Modules (PAM). PAM is currently supported in AIX, FreeBSD, HP-UX, Linux, Mac OS X, NetBSD and Solaris. PAM authentication is disabled by default, so you have to configure and compile `ejabberd` with PAM support enabled: - - ./configure --enable-pam && make install +``` sh +./configure --enable-pam && make install +``` Options: -- [pam_service](/admin/configuration/toplevel/#pam-service) -- [pam_userinfotype](/admin/configuration/toplevel/#pam-userinfotype) +- [pam_service](toplevel.md#pam_service) +- [pam_userinfotype](toplevel.md#pam_userinfotype) Example: - auth_method: [pam] - pam_service: ejabberd +``` yaml +auth_method: [pam] +pam_service: ejabberd +``` Though it is quite easy to set up PAM support in `ejabberd`, PAM itself introduces some security issues: -- To perform PAM authentication `ejabberd` uses external C-program - called `epam`. By default, it is located in - `/var/lib/ejabberd/priv/bin/` directory. You have to set it root on - execution in the case when your PAM module requires root privileges - (`pam_unix.so` for example). Also you have to grant access for - `ejabberd` to this file and remove all other permissions from it. - Execute with root privileges: - - - chown root:ejabberd /var/lib/ejabberd/priv/bin/epam - chmod 4750 /var/lib/ejabberd/priv/bin/epam - -- Make sure you have the latest version of PAM installed on your - system. Some old versions of PAM modules cause memory leaks. If you - are not able to use the latest version, you can `kill(1)` `epam` - process periodically to reduce its memory consumption: `ejabberd` - will restart this process immediately. - -- `epam` program tries to turn off delays on authentication failures. - However, some PAM modules ignore this behavior and rely on their own - configuration options. You can create a configuration file - `ejabberd.pam`. This example shows how to turn off delays in - `pam_unix.so` module: - - #%PAM-1.0 - auth sufficient pam_unix.so likeauth nullok nodelay - account sufficient pam_unix.so - - That is not a ready to use configuration file: you must use it as a - hint when building your own PAM configuration instead. Note that if - you want to disable delays on authentication failures in the PAM - configuration file, you have to restrict access to this file, so a - malicious user can’t use your configuration to perform brute-force - attacks. - -- You may want to allow login access only for certain users. - `pam_listfile.so` module provides such functionality. - -- If you use `pam_winbind` to authorise against a Windows Active - Directory, then `/etc/nsswitch.conf` must be configured to use - `winbind` as well. - -# JWT Authentication +- To perform PAM authentication `ejabberd` uses external C-program + called `epam`. By default, it is located in + `/var/lib/ejabberd/priv/bin/` directory. You have to set it root on + execution in the case when your PAM module requires root privileges + (`pam_unix.so` for example). Also you have to grant access for + `ejabberd` to this file and remove all other permissions from it. + Execute with root privileges: + + ```sh + chown root:ejabberd /var/lib/ejabberd/priv/bin/epam + chmod 4750 /var/lib/ejabberd/priv/bin/epam + ``` + +- Make sure you have the latest version of PAM installed on your + system. Some old versions of PAM modules cause memory leaks. If you + are not able to use the latest version, you can `kill(1)` `epam` + process periodically to reduce its memory consumption: `ejabberd` + will restart this process immediately. + +- `epam` program tries to turn off delays on authentication failures. + However, some PAM modules ignore this behavior and rely on their own + configuration options. You can create a configuration file + `ejabberd.pam`. This example shows how to turn off delays in + `pam_unix.so` module: + + ```sh + #%PAM-1.0 + auth sufficient pam_unix.so likeauth nullok nodelay + account sufficient pam_unix.so + ``` + + That is not a ready to use configuration file: you must use it as a + hint when building your own PAM configuration instead. Note that if + you want to disable delays on authentication failures in the PAM + configuration file, you have to restrict access to this file, so a + malicious user can’t use your configuration to perform brute-force + attacks. + +- You may want to allow login access only for certain users. + `pam_listfile.so` module provides such functionality. + +- If you use `pam_winbind` to authorize against a Windows Active + Directory, then `/etc/nsswitch.conf` must be configured to use + `winbind` as well. + +## JWT Authentication `ejabberd` supports authentication using JSON Web Token (JWT). When enabled, clients send signed tokens instead of passwords, which are checked using a -private key specified in the [jwt_key](/admin/configuration/toplevel/#jwt-key) option. +private key specified in the [jwt_key](toplevel.md#jwt_key) option. JWT payload must look like this: - { - "jid": "test@example.org", - "exp": 1564436511 - } +``` json +{ + "jid": "test@example.org", + "exp": 1564436511 +} +``` Options: -- [jwt_key](/admin/configuration/toplevel/#jwt-key) -- [jwt_auth_only_rule](/admin/configuration/toplevel/#jwt-auth-only-rule) -- [jwt_jid_field](/admin/configuration/toplevel/#jwt-jid-field) +- [jwt_key](toplevel.md#jwt_key) +- [jwt_auth_only_rule](toplevel.md#jwt_auth_only_rule) +- [jwt_jid_field](toplevel.md#jwt_jid_field) Example: - auth_method: jwt - jwt_key: /path/to/jwt/key +``` yaml +auth_method: jwt +jwt_key: /path/to/jwt/key +``` In this example, admins can use both JWT and plain passwords, while the rest of users can use only JWT. - # the order is important here, don't use [sql, jwt] - auth_method: [jwt, sql] +``` yaml +# the order is important here, don't use [sql, jwt] +auth_method: [jwt, sql] - access_rules: - ... - jwt_only: - deny: admin - allow: all +access_rules: + jwt_only: + deny: admin + allow: all - jwt_auth_only_rule: jwt_only +jwt_auth_only_rule: jwt_only +``` Please notice that, when using JWT authentication, -[mod_offline](/admin/configuration/modules/#mod-offline) will not work. +[mod_offline](modules.md#mod_offline) will not work. With JWT authentication the accounts do not exist in the database, and there is no way to know if a given account exists or not. For more information about JWT authentication, you can check a brief tutorial in the [ejabberd 19.08 release notes](https://www.process-one.net/blog/ejabberd-19-08/). -# SCRAM +## SCRAM The top-level option -[`auth_password_format`](/admin/configuration/toplevel/#auth-password-format) +[`auth_password_format`](toplevel.md#auth_password_format) defines in what format the users passwords are stored: SCRAM format or plaintext format. The top-level option -[`auth_scram_hash`](/admin/configuration/toplevel/#auth-scram-hash) +[`auth_scram_hash`](toplevel.md#auth_scram_hash) defines the hash algorithm that will be used to scram the password. ejabberd supports channel binding to the external channel, @@ -347,32 +362,37 @@ In summary, depending on the configured options, ejabberd supports: For details about the client-server communication when using SCRAM, refer to [SASL Authentication and SCRAM](https://wiki.xmpp.org/web/SASL_Authentication_and_SCRAM). -## Internal storage +### Internal storage When ejabberd starts with internal auth method and SCRAM password format configured: - auth_method: internal - auth_password_format: scram +``` yaml +auth_method: internal +auth_password_format: scram +``` and detects that there are plaintext passwords stored, they are automatically converted to SCRAM format: - [info] Passwords in Mnesia table 'passwd' will be SCRAM'ed - [info] Transforming table 'passwd', this may take a while +``` log +[info] Passwords in Mnesia table 'passwd' will be SCRAM'ed +[info] Transforming table 'passwd', this may take a while +``` -## SQL Database +### SQL Database Please note that if you use SQL auth method and SCRAM password format, the plaintext passwords already stored in the database are not automatically converted to SCRAM format. To convert plaintext passwords to SCRAM format in your database, -use the [convert_to_scram](/developer/ejabberd-api/admin-api/#convert-to-scram) command: - +use the [convert_to_scram](../../developer/ejabberd-api/admin-api.md#convert_to_scram) command: - ejabberdctl convert_to_scram example.org +``` sh +ejabberdctl convert_to_scram example.org +``` -## Foreign authentication +### Foreign authentication *Note on SCRAM using and foreign authentication limitations*: when using diff --git a/content/admin/configuration/basic.md b/content/admin/configuration/basic.md index 96e893f1..12bf23f9 100644 --- a/content/admin/configuration/basic.md +++ b/content/admin/configuration/basic.md @@ -1,18 +1,13 @@ ---- -title: Basic Configuration -toc: true -menu: Basic Config -order: 20 ---- +# Basic Configuration -# XMPP Domains +## XMPP Domains -## Host Names +### Host Names `ejabberd` supports managing several independent XMPP domains on a single ejabberd instance, using a feature called virtual hosting. -The option [`hosts`](/admin/configuration/toplevel/#hosts) +The option [`hosts`](toplevel.md#hosts) defines a list containing one or more domains that `ejabberd` will serve. @@ -21,142 +16,149 @@ want to host multiple XMPP domains on the same instance. Examples: -- Serving one domain: - +- Serving one domain: - hosts: [example.org] + ``` yaml + hosts: [example.org] + ``` -- Serving three domains: +- Serving three domains: + ``` yaml + hosts: + - example.net + - example.com + - jabber.somesite.org + ``` - hosts: - - example.net - - example.com - - jabber.somesite.org - -## Virtual Hosting +### Virtual Hosting When managing several XMPP domains in a single instance, those domains are truly independent. It means they can even have different configuration parameters. Options can be defined separately for every virtual host using the -[`host_config`](/admin/configuration/toplevel/#host-config) option. +[`host_config`](toplevel.md#host_config) option. Examples: -- Domain `example.net` is using the internal authentication method - while domain `example.com` is using the LDAP server running on the - domain `localhost` to perform authentication: - - - host_config: - example.net: - auth_method: internal - example.com: - auth_method: ldap - ldap_servers: - - localhost - ldap_uids: - - uid - ldap_rootdn: "dc=localdomain" - ldap_password: "" - -- Domain `example.net` is using SQL to perform authentication while - domain `example.com` is using the LDAP servers running on the - domains `localhost` and `otherhost`: - - - host_config: - example.net: - auth_method: sql - sql_type: odbc - sql_server: "DSN=ejabberd;UID=ejabberd;PWD=ejabberd" - example.com: - auth_method: ldap - ldap_servers: - - localhost - - otherhost - ldap_uids: - - uid - ldap_rootdn: "dc=example,dc=com" - ldap_password: "" +- Domain `example.net` is using the internal authentication method + while domain `example.com` is using the LDAP server running on the + domain `localhost` to perform authentication: + + ``` yaml + host_config: + example.net: + auth_method: internal + example.com: + auth_method: ldap + ldap_servers: + - localhost + ldap_uids: + - uid + ldap_rootdn: "dc=localdomain" + ldap_password: "" + ``` + +- Domain `example.net` is using SQL to perform authentication while + domain `example.com` is using the LDAP servers running on the + domains `localhost` and `otherhost`: + + ``` yaml + host_config: + example.net: + auth_method: sql + sql_type: odbc + sql_server: "DSN=ejabberd;UID=ejabberd;PWD=ejabberd" + example.com: + auth_method: ldap + ldap_servers: + - localhost + - otherhost + ldap_uids: + - uid + ldap_rootdn: "dc=example,dc=com" + ldap_password: "" + ``` To define specific ejabberd modules in a virtual host, you can define the global `modules` option with the common modules, and later add specific modules to certain virtual hosts. To accomplish that, instead -of defining each option in [`host_config`](/admin/configuration/toplevel/#host-config) -use [`append_host_config`](/admin/configuration/toplevel/#append-host-config) +of defining each option in [`host_config`](toplevel.md#host_config) +use [`append_host_config`](toplevel.md#append_host_config) with the same syntax. In this example three virtual hosts have some similar modules, but there are also other different modules for some specific virtual hosts: +``` yaml +## This ejabberd server has three vhosts: +hosts: + - one.example.org + - two.example.org + - three.example.org + +## Configuration of modules that are common to all vhosts +modules: + mod_roster: {} + mod_configure: {} + mod_disco: {} + mod_private: {} + mod_time: {} + mod_last: {} + mod_version: {} + +append_host_config: + ## Add some modules to vhost one: + one.example.org: + modules: + mod_muc: + host: conference.one.example.org + mod_ping: {} + ## Add a module just to vhost two: + two.example.org: + modules: + mod_muc: + host: conference.two.example.org +``` - ## This ejabberd server has three vhosts: - hosts: - - one.example.org - - two.example.org - - three.example.org - - ## Configuration of modules that are common to all vhosts - modules: - mod_roster: {} - mod_configure: {} - mod_disco: {} - mod_private: {} - mod_time: {} - mod_last: {} - mod_version: {} - - append_host_config: - ## Add some modules to vhost one: - one.example.org: - modules: - mod_muc: - host: conference.one.example.org - mod_ping: {} - ## Add a module just to vhost two: - two.example.org: - modules: - mod_muc: - host: conference.two.example.org - -# Logging +## Logging `ejabberd` configuration can help a lot by having the right amount of logging set up. There are several toplevel options to configure logging: -- [`loglevel`](/admin/configuration/toplevel/#loglevel): Verbosity of log files generated by ejabberd. -- [`hide_sensitive_log_data`](/admin/configuration/toplevel/#hide-sensitive-log-data): +- [`loglevel`](toplevel.md#loglevel): Verbosity of log files generated by ejabberd. +- [`hide_sensitive_log_data`](toplevel.md#hide_sensitive_log_data): Privacy option to disable logging of IP address or sensitive data. -- [`log_modules_fully`](/admin/configuration/toplevel/#log-modules-fully): +- [`log_modules_fully`](toplevel.md#log_modules_fully): Modules that will log everything independently from the general `loglevel` option. -- [`log_rotate_size`](/admin/configuration/toplevel/#log-rotate-size) -- [`log_rotate_count`](/admin/configuration/toplevel/#log-rotate-count): +- [`log_rotate_size`](toplevel.md#log_rotate_size) +- [`log_rotate_count`](toplevel.md#log_rotate_count): Setting count to N keeps N rotated logs. Setting count to 0 does not disable rotation, it instead rotates the file and keeps no previous versions around. Setting size to X rotate log when it reaches X bytes. -- [`log_burst_limit_count`](/admin/configuration/toplevel/#log-burst-limit-count) -- [`log_burst_limit_window_time`](/admin/configuration/toplevel/#log-burst-limit-window-time) +- [`log_burst_limit_count`](toplevel.md#log_burst_limit_count) +- [`log_burst_limit_window_time`](toplevel.md#log_burst_limit_window_time) The values in default configuration file are: - log_rotate_size: 10485760 - log_rotate_count: 1 - +``` yaml +log_rotate_size: 10485760 +log_rotate_count: 1 +``` For example, log warning and higher messages, but all c2s messages, and hide sensitive data: - loglevel: warning - hide_sensitive_log_data: true - log_modules_fully: [ejabberd_c2s] - +``` yaml +loglevel: warning +hide_sensitive_log_data: true +log_modules_fully: [ejabberd_c2s] +``` -# Default Language +## Default Language -The [`language`](/admin/configuration/toplevel/#language) option +The [`language`](toplevel.md#language) option defines the default language of server strings that can be seen by XMPP clients. If a XMPP client does not support `xml:lang`, `ejabberd` uses the language specified in this option. @@ -168,19 +170,21 @@ translation file `Language.msg` in `ejabberd`’s `msgs` directory. For example, to set Russian as default language: - language: ru +``` yaml +language: ru +``` -The page [Internationalization and Localization](/developer/extending-ejabberd/localization/) +The page [Internationalization and Localization](../../developer/extending-ejabberd/localization.md) provides more details. -# CAPTCHA +## CAPTCHA Some `ejabberd` modules can be configured to require a CAPTCHA challenge on certain actions, for instance -[mod_block_strangers](/admin/configuration/modules/#mod-block-strangers), -[mod_muc](/admin/configuration/modules/#mod-muc), -[mod_register](/admin/configuration/modules/#mod-register), and -[mod_register_web](/admin/configuration/modules/#mod-register-web). +[mod_block_strangers](modules.md#mod_block_strangers), +[mod_muc](modules.md#mod_muc), +[mod_register](modules.md#mod_register), and +[mod_register_web](modules.md#mod_register_web). If the client does not support CAPTCHA Forms ([`XEP-0158`](https://xmpp.org/extensions/xep-0158.html)), a web link is provided so the user can fill the challenge in a web browser. @@ -194,57 +198,56 @@ in container images check their documentation for details. The relevant top-level options are: -- [`captcha_cmd`](/admin/configuration/toplevel/#captcha-cmd)`: Path | Module`: +- [`captcha_cmd`](toplevel.md#captcha_cmd)`: Path | Module`: Full path to a script that generates the image, or name of a module that supports generating CAPTCHA images ([mod_ecaptcha](https://github.com/processone/ejabberd-contrib/tree/master/mod_ecaptcha), [mod_captcha_rust](https://github.com/processone/ejabberd-contrib/tree/master/mod_captcha_rust)). The default value disables the feature: `undefined` -- [`captcha_url`](/admin/configuration/toplevel/#captcha-url)`: URL | auto`: +- [`captcha_url`](toplevel.md#captcha_url)`: URL | auto`: An URL where CAPTCHA requests should be sent, or `auto` to determine the URL automatically. The default value is `auto`. -And finally, configure [`request_handlers`](/admin/configuration/listen-options/#request-handlers) -for the [`ejabberd_http`](/admin/configuration/listen/#ejabberd-http) +And finally, configure [`request_handlers`](listen-options.md#request_handlers) +for the [`ejabberd_http`](listen.md#ejabberd_http) listener with a path handled by `ejabberd_captcha`, where the CAPTCHA images will be served. Example configuration: +``` yaml +hosts: [example.org] - hosts: [example.org] - - captcha_cmd: /lib/ejabberd/priv/bin/captcha.sh - # captcha_cmd: /opt/ejabberd-23.01/lib/captcha.sh - # captcha_cmd: mod_ecaptcha +captcha_cmd: /lib/ejabberd/priv/bin/captcha.sh +# captcha_cmd: /opt/ejabberd-23.01/lib/captcha.sh +# captcha_cmd: mod_ecaptcha - captcha_url: auto - ## captcha_url: http://example.org:5280/captcha - ## captcha_url: https://example.org:443/captcha - ## captcha_url: http://example.com/captcha +captcha_url: auto +## captcha_url: http://example.org:5280/captcha +## captcha_url: https://example.org:443/captcha +## captcha_url: http://example.com/captcha - listen: - ... - - - port: 5280 - module: ejabberd_http - request_handlers: - /captcha: ejabberd_captcha - ... +listen: + - + port: 5280 + module: ejabberd_http + request_handlers: + /captcha: ejabberd_captcha +``` -# ACME +## ACME [ACME](https://tools.ietf.org/html/rfc8555) is used to automatically obtain SSL certificates for the domains served by ejabberd, which means that certificate requests and renewals are performed to some CA server (aka "ACME server") in a fully automated mode. -## Setting up ACME +### Setting up ACME In ejabberd, ACME is configured using the -[`acme`](/admin/configuration/toplevel/#acme) +[`acme`](toplevel.md#acme) top-level option, check there the available options and example configuration. The automated mode is enabled by default. @@ -254,16 +257,18 @@ an ACME remote server will connect to your ejabberd server on HTTP port 80 during certificate issuance. For that reason you must have an -[`ejabberd_http`](/admin/configuration/listen/#ejabberd-http) listener +[`ejabberd_http`](listen.md#ejabberd_http) listener with TLS disabled handling an "ACME well known" path. For example: - listen: - - - module: ejabberd_http - port: 5280 - tls: false - request_handlers: - /.well-known/acme-challenge: ejabberd_acme +``` yaml +listen: + - + module: ejabberd_http + port: 5280 + tls: false + request_handlers: + /.well-known/acme-challenge: ejabberd_acme +``` Note that the ACME protocol **requires** challenges to be sent on port 80. Since this is a privileged port, ejabberd cannot listen on it directly without root privileges. Thus you need some mechanism @@ -272,7 +277,7 @@ several ways to do this: using NAT, setcap (Linux only), or HTTP front-ends (e.g `haproxy` and so on). Pick one that fits your installation the best, but **DON'T** run ejabberd as root. If you see errors in the logs with ACME server problem reports, it's **highly** recommended to change `ca_url` -option in the [`acme`](/admin/configuration/toplevel/#acme) top-level option +option in the [`acme`](toplevel.md#acme) top-level option to the URL pointing to some staging ACME environment, fix the problems until you obtain a certificate, and then change the URL back and retry using `request-certificate` ejabberdctl command (see below). This is needed because ACME servers typically have rate limits, preventing you from requesting @@ -281,37 +286,45 @@ By default, ejabberd uses [Let's Encrypt](https://letsencrypt.org) authority. Thus, the default value of `ca_url` option is `https://acme-v02.api.letsencrypt.org/directory` and the staging URL will be `https://acme-staging-v02.api.letsencrypt.org/directory`: - acme: - ## Staging environment - ca_url: https://acme-staging-v02.api.letsencrypt.org/directory - ## Production environment (the default): - # ca_url: https://acme-v02.api.letsencrypt.org/directory +``` yaml +acme: + ## Staging environment + ca_url: https://acme-staging-v02.api.letsencrypt.org/directory + ## Production environment (the default): + # ca_url: https://acme-v02.api.letsencrypt.org/directory +``` The automated mode can be disabled by setting `auto` option to `false` -in the [`acme`](/admin/configuration/toplevel/#acme) top-level option: +in the [`acme`](toplevel.md#acme) top-level option: - acme: - auto: false - ... +``` yaml +acme: + auto: false +``` In this case automated renewals are still enabled, however, in order to request a new certificate, -you need to run -[request_certificate](/developer/ejabberd-api/admin-api/#request-certificate) +you need to run +[request_certificate](../../developer/ejabberd-api/admin-api.md#request_certificate) API command: - $ ejabberdctl request-certificate all +``` sh +ejabberdctl request-certificate all +``` If you only want to request certificates for a subset of the domains, run: - $ ejabberdctl request-certificate domain.tld,pubsub.domain.tld,server.com,conference.server.com,... +``` sh +ejabberdctl request-certificate domain.tld,pubsub.domain.tld,server.com,conference.server.com,... +``` You can view the certificates obtained using ACME and -[list_certificates](/developer/ejabberd-api/admin-api/#list-certificates): +[list_certificates](../../developer/ejabberd-api/admin-api.md#list_certificates): - $ ejabberdctl list-certificates - domain.tld /path/to/cert/file1 true - server.com /path/to/cert/file2 false - ... +``` sh +$ ejabberdctl list-certificates +domain.tld /path/to/cert/file1 true +server.com /path/to/cert/file2 false +``` The output is mostly self-explained: every line contains the domain, the corresponding certificate file, and whether this certificate file is used or not. A certificate might not be used for several reasons: @@ -319,14 +332,16 @@ mostly because ejabberd detects a better certificate (i.e. not expired, or havin It's recommended to revoke unused certificates if they are not yet expired (see below). At any point you can revoke a certificate using -[revoke_certificate](/developer/ejabberd-api/admin-api/#revoke-certificate): +[revoke_certificate](../../developer/ejabberd-api/admin-api.md#revoke_certificate): pick the certificate file from the listing above and run: - $ ejabberdctl revoke-certificate /path/to/cert/file +``` sh +ejabberdctl revoke-certificate /path/to/cert/file +``` If the commands return errors, consult the log files for details. -## ACME implementation details +### ACME implementation details In nutshell, certification requests are performed in two phases. Firstly, ejabberd creates an account at the ACME server. That is an EC private key. Secondly, @@ -334,7 +349,8 @@ a certificate is requested. In the case of a revocation, no account is used - only a certificate in question is needed. All information is stored under `acme` directory inside spool directory of ejabberd (typically `/var/lib/ejabberd`). An example content of the directory is the following: -``` + +``` sh $ tree /var/lib/ejabberd /var/lib/ejabberd ├── acme @@ -344,179 +360,207 @@ $ tree /var/lib/ejabberd │ └── 93816a8429ebbaa75574eb3f59d4a806b67d6917 ... ``` + Here, `account.key` is the EC private key used to identify the ACME account. You can inspect its content using `openssl` command: + +``` sh +openssl ec -text -noout -in /var/lib/ejabberd/acme/account.key ``` -$ openssl ec -text -noout -in /var/lib/ejabberd/acme/account.key -``` + Obtained certificates are stored under `acme/live` directory. You can inspect any of the certificates using `openssl` command as well: + +``` sh +openssl x509 -text -noout -in /var/lib/ejabberd/acme/live/251ce180d964e98a2f18b65504df2ab7c55943e2 ``` -$ openssl x509 -text -noout -in /var/lib/ejabberd/acme/live/251ce180d964e98a2f18b65504df2ab7c55943e2 -``` + In the case of errors, you can delete the whole `acme` directory - ejabberd will recreate its content on next certification request. However, don't delete it too frequently - usually there is a rate limit on the number of accounts and certificates an ACME server creates. In particular, for [Let's Encrypt](https://letsencrypt.org) the limits are described [here](https://letsencrypt.org/docs/rate-limits). -# Access Rights +## Access Rights *This section describes new ACL syntax introduced in ejabberd 16.06. For old access rule and ACL syntax documentation, please refer to [configuration document archive](https://github.com/processone/docs.ejabberd.im/blob/7391ac375fd8253f74214cbffa2bafb140501981/content/admin/guide/configuration.md)* -## ACL +### ACL Access control in `ejabberd` is performed via Access Control Lists -(ACLs), using the [`acl`](/admin/configuration/toplevel/#acl) option. +(ACLs), using the [`acl`](toplevel.md#acl) option. The declarations of ACLs in the configuration file have the following syntax: -**`acl: { ACLName: { ACLType: ACLValue } }`** +``` yaml +acl: + ACLName: + ACLType: ACLValue +``` `ACLType: ACLValue` can be one of the following: -**`all`**: Matches all JIDs. Example: - - acl: - world: all - -**`user: Username`**: Matches the user with the name `Username` on any of the local virtual host. - Example: - - - acl: - admin: - user: yozhik - -**`user: {Username: Server} | Jid`**: Matches the user with the JID `Username@Server` and any resource. - Example: - - - acl: - admin: - - user: - yozhik@example.org - - user: peter@example.org - -**`server: Server`**: Matches any JID from server `Server`. Example: - - - acl: - exampleorg: - server: example.org - -**`resource: Resource`**: Matches any JID with a resource `Resource`. Example: - - acl: - mucklres: - resource: muckl - -**`shared_group: Groupname`**: Matches any member of a Shared Roster Group with name `Groupname` in - the virtual host. Example: - - - acl: - techgroupmembers: - shared_group: techteam - -**`shared_group: {Groupname: Server}`**: Matches any member of a Shared Roster Group with name `Groupname` in - the virtual host `Server`. Example: - - - acl: - techgroupmembers: - shared_group: - techteam: example.org - -**`ip: Network`**: Matches any IP address from the `Network`. Example: - - - acl: - loopback: - ip: - - 127.0.0.0/8 - - "::1" - -**`user_regexp: Regexp`**: Matches any local user with a name that matches `Regexp` on local - virtual hosts. Example: - - - acl: - tests: - user_regexp: "^test[0-9]*$" - -**`user_regexp: {Regexp: Server} | JidRegexp`**: Matches any user with a name that matches `Regexp` at server - `Server`. Example: - - - acl: - tests: - user_regexp: - - "^test1": example.org - - "^test2@example.org" - -**`server_regexp: Regexp`**: Matches any JID from the server that matches `Regexp`. Example: - - - acl: - icq: - server_regexp: "^icq\\." - -**`resource_regexp: Regexp`**: Matches any JID with a resource that matches `Regexp`. Example: - - - acl: - icq: - resource_regexp: "^laptop\\." - -**`node_regexp: {UserRegexp: ServerRegexp}`**: Matches any user with a name that matches `UserRegexp` at any server - that matches `ServerRegexp`. Example: - - - acl: - yozhik: - node_regexp: - "^yozhik$": "^example.(com|org)$" +- **`all`**: Matches all JIDs. Example: + + ``` yaml + acl: + world: all + ``` + +- **`user: Username`**: Matches the user with the name `Username` on any of the local virtual host. + Example: + + ``` yaml + acl: + admin: + user: yozhik + ``` + +- **`user: {Username: Server} | Jid`**: Matches the user with the JID `Username@Server` and any resource. + Example: + + ``` yaml + acl: + admin: + - user: + yozhik@example.org + - user: peter@example.org + ``` + +- **`server: Server`**: Matches any JID from server `Server`. Example: + + ``` yaml + acl: + exampleorg: + server: example.org + ``` + +- **`resource: Resource`**: Matches any JID with a resource `Resource`. Example: + + ``` yaml + acl: + mucklres: + resource: muckl + ``` + +- **`shared_group: Groupname`**: Matches any member of a Shared Roster Group with name `Groupname` in + the virtual host. Example: + + ``` yaml + acl: + techgroupmembers: + shared_group: techteam + ``` + +- **`shared_group: {Groupname: Server}`**: Matches any member of a Shared Roster Group with name `Groupname` in + the virtual host `Server`. Example: + + ``` yaml + acl: + techgroupmembers: + shared_group: + techteam: example.org + ``` + +- **`ip: Network`**: Matches any IP address from the `Network`. Example: + + ``` yaml + acl: + loopback: + ip: + - 127.0.0.0/8 + - "::1" + ``` + +- **`user_regexp: Regexp`**: Matches any local user with a name that matches `Regexp` on local + virtual hosts. Example: + + ``` yaml + acl: + tests: + user_regexp: "^test[0-9]*$" + ``` + +- **`user_regexp: {Regexp: Server} | JidRegexp`**: Matches any user with a name that matches `Regexp` at server + `Server`. Example: + + ``` yaml + acl: + tests: + user_regexp: + - "^test1": example.org + - "^test2@example.org" + ``` + +- **`server_regexp: Regexp`**: Matches any JID from the server that matches `Regexp`. Example: + + ``` yaml + acl: + icq: + server_regexp: "^icq\\." + ``` + +- **`resource_regexp: Regexp`**: Matches any JID with a resource that matches `Regexp`. Example: + + ``` yaml + acl: + icq: + resource_regexp: "^laptop\\." + ``` + +- **`node_regexp: {UserRegexp: ServerRegexp}`**: Matches any user with a name that matches `UserRegexp` at any server + that matches `ServerRegexp`. Example: + + ``` yaml + acl: + yozhik: + node_regexp: + "^yozhik$": "^example.(com|org)$" + ``` -**`user_glob: Glob`**: +- **`user_glob: Glob`**: -**`user_glob: {Glob: Server}`**: +- **`user_glob: {Glob: Server}`**: -**`server_glob: Glob`**: +- **`server_glob: Glob`**: -**`resource_glob: Glob`**: +- **`resource_glob: Glob`**: -**`node_glob: {UserGlob: ServerGlob}`**: This is the same as above. However, it uses shell glob patterns +- **`node_glob: {UserGlob: ServerGlob}`**: This is the same as above. However, it uses shell glob patterns instead of regexp. These patterns can have the following special characters: -* **`*`**: matches any string including the null string. + - **`*`**: matches any string including the null string. -* **`?`**: matches any single character. + - **`?`**: matches any single character. -* **`[...]`**: matches any of the enclosed characters. Character ranges are - specified by a pair of characters separated by a `-`. If the - first character after `[` is a `!`, any character not enclosed - is matched. + - **`[...]`**: matches any of the enclosed characters. Character ranges are + specified by a pair of characters separated by a `-`. If the + first character after `[` is a `!`, any character not enclosed + is matched. The following `ACLName` are pre-defined: -**`all`**: Matches any JID. +- **`all`**: Matches any JID. -**`none`**: Matches no JID. +- **`none`**: Matches no JID. -## Access Rules +### Access Rules -The [`access_rules`](/admin/configuration/toplevel/#access-rules) +The [`access_rules`](toplevel.md#access_rules) option is used to allow or deny access to different services. The syntax is: -**`access_rules: { AccessName: { - allow|deny: ACLRule|ACLDefinition } }`** +``` yaml +access_rules: + AccessName: + - allow|deny: ACLRule|ACLDefinition +``` Each definition may contain arbitrary number of `- allow` or `- deny` sections, and each section can contain any number of acl rules @@ -533,19 +577,20 @@ To simplify configuration two shortcut version are available: `- allow: acl` and `- allow`, example below shows equivalent definitions where short or long version are used: - - access_rules: - a_short: admin - a_long: - - acl: admin - b_short: - - deny: banned - - allow - b_long: - - deny: - - acl: banned - - allow: - - all +``` yaml +access_rules: + a_short: admin + a_long: + - acl: admin + b_short: + - deny: banned + - allow + b_long: + - deny: + - acl: banned + - allow: + - all +``` If you define specific Access rights in a virtual host, remember that the globally defined Access rights have precedence over those. This @@ -555,44 +600,49 @@ effect. Example: - - access_rules: - configure: - - allow: admin - something: - - deny: someone - - allow - s2s_banned: - - deny: problematic_hosts - - deny: - - acl: banned_forever - - deny: - - ip: 222.111.222.111/32 - - deny: - - ip: 111.222.111.222/32 - - allow - xmlrpc_access: - - allow: - - user: peter@example.com - - allow: - - user: ivone@example.com - - allow: - - user: bot@example.com - - ip: 10.0.0.0/24 +``` yaml +access_rules: + configure: + - allow: admin + something: + - deny: someone + - allow + s2s_banned: + - deny: problematic_hosts + - deny: + - acl: banned_forever + - deny: + - ip: 222.111.222.111/32 + - deny: + - ip: 111.222.111.222/32 + - allow + xmlrpc_access: + - allow: + - user: peter@example.com + - allow: + - user: ivone@example.com + - allow: + - user: bot@example.com + - ip: 10.0.0.0/24 +``` The following `AccessName` are pre-defined: -**`all`**: Always returns the value ‘`allow`’. +- **`all`**: Always returns the value ‘`allow`’. -**`none`**: Always returns the value ‘`deny`’. +- **`none`**: Always returns the value ‘`deny`’. -## Shaper Rules +### Shaper Rules -The [`shaper_rules`](/admin/configuration/toplevel/#shaper-rules) +The [`shaper_rules`](toplevel.md#shaper_rules) top-level option declares shapers to use for matching user/hosts. The syntax is: -**`shaper_rules: { ShaperRuleName: { - Number|ShaperName: ACLRule|ACLDefinition } }`** +``` yaml +shaper_rules: + ShaperRuleName: + - Number|ShaperName: ACLRule|ACLDefinition +``` Semantic is similar to that described in [Access Rights](#access-rights) section, only difference is that instead using `- allow` or `- deny`, name of shaper or number @@ -600,21 +650,22 @@ should be used. Examples: - - shaper_rules: - connections_limit: - - 10: - - user: peter@example.com - - 100: admin - - 5 - download_speed: - - fast: admin - - slow: anonymous_users - - normal - log_days: 30 +``` yaml +shaper_rules: + connections_limit: + - 10: + - user: peter@example.com + - 100: admin + - 5 + download_speed: + - fast: admin + - slow: anonymous_users + - normal + log_days: 30 +``` -## Limiting Opened Sessions +### Limiting Opened Sessions The special access `max_user_sessions` specifies the maximum number of sessions (authenticated connections) per user. If a user tries to open @@ -625,18 +676,23 @@ or `infinity`. The default value is `infinity`. The syntax is: -**`{ max_user_sessions: { - Number: ACLRule|ACLDefinition } }`** +``` yaml +shaper_rules: + max_user_sessions: + - Number: ACLRule|ACLDefinition +``` This example limits the number of sessions per user to 5 for all users, and to 10 for admins: +``` yaml +shaper_rules: + max_user_sessions: + - 10: admin + - 5 +``` - shaper_rules: - max_user_sessions: - - 10: admin - - 5 - -## Connections to Remote Server +### Connections to Remote Server The special access `max_s2s_connections` specifies how many simultaneous S2S connections can be established to a specific remote XMPP server. The @@ -645,22 +701,27 @@ default value is `1`. There’s also available the access The syntax is: -**`{ max_s2s_connections: { ACLName: MaxNumber } }`** - -Examples: - -- Allow up to 3 connections with each remote server: +``` yaml +shaper_rules: + max_s2s_connections: MaxNumber +``` +For example, let's allow up to 3 connections with each remote server: - shaper_rules: - max_s2s_connections: 3 +``` yaml +shaper_rules: + max_s2s_connections: 3 +``` -# Shapers +## Shapers -The [`shaper`](/admin/configuration/toplevel/#shaper) +The [`shaper`](toplevel.md#shaper) top-level option defines limitations in the connection traffic. The basic syntax is: -**`shaper: { ShaperName: Rate }`** +``` yaml +shaper: + ShaperName: Rate +``` where `Rate` stands for the maximum allowed incoming rate in bytes per second. When a connection exceeds this limit, `ejabberd` stops reading @@ -671,13 +732,22 @@ This example defines a shaper with name `normal` that limits traffic speed to 1,000bytes/second, and another shaper with name `fast` that limits traffic speed to 50,000bytes/second: - shaper: - normal: 1000 - fast: 50000 +``` yaml +shaper: + normal: 1000 + fast: 50000 +``` + +--- You can use the full syntax to set the `BurstSize` too: -**`shaper: { ShaperName: { rate: Rate, burst_size: BurstSize}}`** +``` yaml +shaper: + ShaperName: + rate: Rate + burst_size: BurstSize +``` With `BurstSize` you can allow client to send more data, but its amount can be clamped reasonably. Each connection is allowed to send `BurstSize` of data @@ -691,8 +761,10 @@ and the `BurstSize` takes that same value. The `not_normal` shaper has the same `Rate` that before, and sets a higher `BurstSize`: - shaper: - normal: 1000 - not_normal: - rate: 1000 - burst_size: 20000 +``` yaml +shaper: + normal: 1000 + not_normal: + rate: 1000 + burst_size: 20000 +``` diff --git a/content/admin/configuration/database-ldap.md b/content/admin/configuration/database-ldap.md deleted file mode 100644 index 23125fed..00000000 --- a/content/admin/configuration/database-ldap.md +++ /dev/null @@ -1,3 +0,0 @@ ---- -redirect: /admin/configuration/database/ ---- diff --git a/content/admin/configuration/database.md b/content/admin/configuration/database.md index 408991bc..0d7b8a43 100644 --- a/content/admin/configuration/database.md +++ b/content/admin/configuration/database.md @@ -1,11 +1,6 @@ ---- -title: Database Configuration -toc: true -menu: Databases -order: 50 ---- +# Database Configuration -# Supported storages +## Supported storages `ejabberd` uses its internal Mnesia database by default. However, it is possible to use a relational database, key-value storage or an LDAP @@ -19,7 +14,7 @@ The following databases are supported by `ejabberd`: - [`Mnesia`](https://erlang.org/doc/apps/mnesia/) -- [`MySQL`](https://www.mysql.com/). Check the tutorial [Using ejabberd with MySQL](/tutorials/mysql/) +- [`MySQL`](https://www.mysql.com/). Check the tutorial [Using ejabberd with MySQL](../../tutorials/mysql.md) - Any [`ODBC`](https://en.wikipedia.org/wiki/Open_Database_Connectivity) compatible database @@ -32,10 +27,10 @@ The following databases are supported by `ejabberd`: - [`Redis`](https://redis.io/)(only for transient data) Please check -[LDAP Configuration](/admin/configuration/ldap/) +[LDAP Configuration](ldap.md) section for documentation about using LDAP. -# Database Schema +## Database Schema When using external database backend, ejabberd does not create schema and tables by itself. If you plan to use MySQL, PostgreSQL, MS SQL or SQLite, @@ -50,54 +45,55 @@ you must create the schema before you run ejabberd. If using MySQL or PostgreSQL, you can choose between the [default or the new schemas](#default-and-new-schemas). -See [ejabberd SQL Database Schema](/developer/sql-schema/) +See [ejabberd SQL Database Schema](../../developer/sql-schema.md) for details on database schemas. -# Virtual Hosting +## Virtual Hosting Important note about virtual hosting: if you define several domains in -ejabberd.yml (see section [Host Names](/admin/configuration/basic/#host-names)), you probably want that each +ejabberd.yml (see section [Host Names](basic.md#host-names)), you probably want that each virtual host uses a different configuration of database, authentication and storage, so that usernames do not conflict and mix between different virtual hosts. For that purpose, the options described in the next -sections must be set inside a [host_config](/admin/configuration/toplevel/#host-config) for each vhost (see section -[Virtual Hosting](/admin/configuration/basic/#virtual-hosting)). For example: - - - host_config: - public.example.org: - sql_type: pgsql - sql_server: localhost - sql_database: database-public-example-org - sql_username: ejabberd - sql_password: password - auth_method: [sql] - -# Default database +sections must be set inside a [host_config](toplevel.md#host_config) for each vhost (see section +[Virtual Hosting](basic.md#virtual-hosting)). For example: + +``` yaml +host_config: + public.example.org: + sql_type: pgsql + sql_server: localhost + sql_database: database-public-example-org + sql_username: ejabberd + sql_password: password + auth_method: [sql] +``` + +## Default database You can simplify the configuration by setting the default database. This can be done with the -[`default_db`](/admin/configuration/toplevel/#default-db) +[`default_db`](toplevel.md#default_db) top-level option: **`default_db: mnesia|sql`**: This will define the default database for a module lacking `db_type` option or if `auth_method` option is not set. -# Relational Databases +## Relational Databases -## Default and New Schemas +### Default and New Schemas There are two database schemas available in ejabberd: the default schema is preferable when serving one massive domain, the new schema is preferable when serving many small domains. The default schema stores only one XMPP domain in the database. -The [XMPP domain](/admin/configuration/basic/#xmpp-domains) +The [XMPP domain](basic.md#xmpp-domains) is not stored as this is the same for all the accounts, and this saves space in massive deployments. However, to handle several domains, you have to setup one database per domain and configure each one independently -using [host_config](/admin/configuration/basic/#virtual-hosting), +using [host_config](basic.md#virtual-hosting), so in that case you may prefer the new schema. The new schema stores the XMPP domain in a new column `server_host` @@ -108,9 +104,11 @@ and changing domains from time to time. However, if you have only one massive domain, you may prefer to use the default schema. To use the new schema, edit the ejabberd configuration file and enable -[new_sql_schema](/admin/configuration/toplevel/#new-sql-schema) top-level option: +[new_sql_schema](toplevel.md#new_sql_schema) top-level option: - new_sql_schema: true +``` yaml +new_sql_schema: true +``` Now, when creating the new database, remember to use the proper SQL schema! For example, if you are using MySQL and choose the default schema, use `mysql.sql`. @@ -128,19 +126,20 @@ and restart ejabberd. * *PostgreSQL*: First enable `new_sql_schema` and -[mod_admin_update_sql](/admin/configuration/modules/#mod-admin-update-sql) +[mod_admin_update_sql](modules.md#mod_admin_update_sql) in your ejabberd configuration: - - new_sql_schema: true - modules: - mod_admin_update_sql: {} - - then restart ejabberd, and finally execute the - [update_sql](/developer/ejabberd-api/admin-api/#update-sql) command: - - ejabberdctl update_sql - -## SQL Options + ``` yaml + new_sql_schema: true + modules: + mod_admin_update_sql: {} + ``` +then restart ejabberd, and finally execute the +[update_sql](../../developer/ejabberd-api/admin-api.md#update_sql) command: + ``` sh + ejabberdctl update_sql + ``` + +### SQL Options The actual database access is defined in the options with `sql_` prefix. The values are used to define if we want to use ODBC, or one of @@ -148,69 +147,74 @@ the two native interface available, PostgreSQL or MySQL. To configure SQL there are several top-level options: -- [sql_type](/admin/configuration/toplevel/#sql-type) -- [sql_server](/admin/configuration/toplevel/#sql-server) -- [sql_port](/admin/configuration/toplevel/#sql-port) -- [sql_database](/admin/configuration/toplevel/#sql-database) -- [sql_username](/admin/configuration/toplevel/#sql-username) -- [sql_password](/admin/configuration/toplevel/#sql-password) -- [sql_ssl](/admin/configuration/toplevel/#sql-ssl) -- [sql_ssl_verify](/admin/configuration/toplevel/#sql-ssl-verify) -- [sql_ssl_cafile](/admin/configuration/toplevel/#sql-ssl-cafile) -- [sql_ssl_certfile](/admin/configuration/toplevel/#sql-ssl-certfile) -- [sql_pool_size](/admin/configuration/toplevel/#sql-pool-size) -- [sql_keepalive_interval](/admin/configuration/toplevel/#sql-keepalive-interval) -- [sql_odbc_driver](/admin/configuration/toplevel/#sql-odbc-driver) -- [sql_start_interval](/admin/configuration/toplevel/#sql-start-interval) -- [sql_prepared_statements](/admin/configuration/toplevel/#sql-prepared-statements) +- [sql_type](toplevel.md#sql_type) +- [sql_server](toplevel.md#sql_server) +- [sql_port](toplevel.md#sql_port) +- [sql_database](toplevel.md#sql_database) +- [sql_username](toplevel.md#sql_username) +- [sql_password](toplevel.md#sql_password) +- [sql_ssl](toplevel.md#sql_ssl) +- [sql_ssl_verify](toplevel.md#sql_ssl_verify) +- [sql_ssl_cafile](toplevel.md#sql_ssl_cafile) +- [sql_ssl_certfile](toplevel.md#sql_ssl_certfile) +- [sql_pool_size](toplevel.md#sql_pool_size) +- [sql_keepalive_interval](toplevel.md#sql_keepalive_interval) +- [sql_odbc_driver](toplevel.md#sql_odbc_driver) +- [sql_start_interval](toplevel.md#sql_start_interval) +- [sql_prepared_statements](toplevel.md#sql_prepared_statements) +- [update_sql_schema](toplevel.md#update_sql_schema) Example of plain ODBC connection: - - sql_server: "DSN=database;UID=ejabberd;PWD=password" +``` yaml +sql_server: "DSN=database;UID=ejabberd;PWD=password" +``` Example of MySQL connection: +``` yaml +sql_type: mysql +sql_server: server.company.com +sql_port: 3306 # the default +sql_database: mydb +sql_username: user1 +sql_password: "**********" +sql_pool_size: 5 +``` - sql_type: mysql - sql_server: server.company.com - sql_port: 3306 # the default - sql_database: mydb - sql_username: user1 - sql_password: "**********" - sql_pool_size: 5 - -## SQL Authentication +### SQL Authentication You can authenticate users against an SQL database, see the option `auth_method` -in the [Authentication](/admin/configuration/authentication/) section. +in the [Authentication](authentication.md) section. To store the passwords in SCRAM format instead of plaintext, -see the [SCRAM](/admin/configuration/authentication/#scram) section. +see the [SCRAM](authentication.md#scram) section. -## SQL with SSL Connection +### SQL with SSL Connection It's possible to setup SSL encrypted connections to PostgreSQL, MySQL and MsSQL -by enabling the [sql_ssl](/admin/configuration/toplevel/#sql-ssl) option in +by enabling the [sql_ssl](toplevel.md#sql_ssl) option in ejabberd's configuration file: `sql_ssl: true` Please notice that ejabberd verifies the certificate presented by the SQL server against the CA certificate list. For that reason, if your SQL server uses a self-signed certificate, -you need to setup [sql_ssl_verify](/admin/configuration/toplevel/#sql-ssl-verify) -and [sql_ssl_cafile](/admin/configuration/toplevel/#sql-ssl-cafile), +you need to setup [sql_ssl_verify](toplevel.md#sql_ssl_verify) +and [sql_ssl_cafile](toplevel.md#sql_ssl_cafile), for example: - sql_ssl: true - sql_ssl_verify: false - sql_ssl_cafile: "/path/to/sql_server_cacert.pem" +``` yaml +sql_ssl: true +sql_ssl_verify: false +sql_ssl_cafile: "/path/to/sql_server_cacert.pem" +``` This tells ejabberd to ignore problems from not matching any CA certificate from default list, and instead try to verify using the specified CA certificate. -## SQL Storage +### SQL Storage -Several `ejabberd` [modules](/admin/configuration/modules/) +Several `ejabberd` [modules](modules.md) have options called `db_type`, and can store their tables in an SQL database instead of internal. @@ -222,32 +226,33 @@ by adding the option `db_type: sql` to that module. Alternatively, if you want all modules to use your SQL database when possible, you may prefer to set SQL as your [default database](#default-database). -# Redis +## Redis [`Redis`](https://redis.io/) is an advanced key-value cache and store. You can use it to store transient data, such as records for C2S (client) sessions. There are several options available: -**`redis_server: String`**: A hostname of the Redis server. The default is `localhost`. +- **`redis_server: String`**: A hostname of the Redis server. The default is `localhost`. -**`redis_port: Port`**: The port where the Redis server is accepting connections. The default +- **`redis_port: Port`**: The port where the Redis server is accepting connections. The default is 6379. -**`redis_password: String`**: The password to the Redis server. The default is an empty string, +- **`redis_password: String`**: The password to the Redis server. The default is an empty string, i.e. no password. -**`redis_db: N`**: Redis database number. The default is 0. +- **`redis_db: N`**: Redis database number. The default is 0. -**`redis_connect_timeout: N`**: A number of seconds to wait for the connection to be established to the Redis +- **`redis_connect_timeout: N`**: A number of seconds to wait for the connection to be established to the Redis server. The default is 1 second. Example configuration: +``` yaml +redis_server: redis.server.com +redis_db: 1 +``` - redis_server: redis.server.com - redis_db: 1 - -# Microsoft SQL Server +## Microsoft SQL Server For now, MS SQL is only supported in Unix-like OS'es. You need to have [`unixODBC`](http://www.unixodbc.org/) installed on your machine, and your Erlang/OTP @@ -255,11 +260,11 @@ must be compiled with ODBC support. Also, in some cases you need to add machine name to `sql_username`, especially when you have `sql_server` defined as an IP address, e.g.: - - sql_type: mssql - sql_server: 1.2.3.4 - ... - sql_username: user1@host +``` yaml +sql_type: mssql +sql_server: 1.2.3.4 +sql_username: user1@host +``` By default, ejabberd will use the [`FreeTDS`](https://www.freetds.org/) driver. You need to have the driver file `libtdsodbc.so` installed in your library PATH @@ -267,11 +272,14 @@ on your system. If the FreeTDS driver is not installed in a standard location, or if you want to use another ODBC driver, you can specify the path to the driver using the -[sql_odbc_driver](/admin/configuration/toplevel/#sql-odbc-driver) option, -available in ejabberd 20.12 or later. For example, if you want to use Microsoft +[sql_odbc_driver](toplevel.md#sql_odbc_driver) option, +available in ejabberd [20.12](../../archive/20.12/index.md) or later. +For example, if you want to use Microsoft ODBC Driver 17 for SQL Server: - sql_odbc_driver: "/opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.3.so.1.1" +``` yaml +sql_odbc_driver: "/opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.3.so.1.1" +``` Note that if you use a Microsoft driver, you may have to use an IP address instead of a host name for the `sql_server` option. @@ -279,19 +287,20 @@ instead of a host name for the `sql_server` option. If hostname (or IP address) is specified in `sql_server` option, ejabberd will connect using a an ODBC DSN connection string constructed with: -- SERVER=[sql_server](/admin/configuration/toplevel/#sql-server) -- DATABASE=[sql_database](/admin/configuration/toplevel/#sql-database) -- UID=[sql_username](/admin/configuration/toplevel/#sql-username) -- PWD=[sql_password](/admin/configuration/toplevel/#sql-password) -- PORT=[sql_port](/admin/configuration/toplevel/#sql-port) -- ENCRYPTION=required (only if [sql_ssl](/admin/configuration/toplevel/#sql-ssl) is true) +- SERVER=[sql_server](toplevel.md#sql_server) +- DATABASE=[sql_database](toplevel.md#sql_database) +- UID=[sql_username](toplevel.md#sql_username) +- PWD=[sql_password](toplevel.md#sql_password) +- PORT=[sql_port](toplevel.md#sql_port) +- ENCRYPTION=required (only if [sql_ssl](toplevel.md#sql_ssl) is true) - CLIENT_CHARSET=UTF-8 -As of ejabberd 23.xx it is possible to use different connection options by +Since ejabberd [23.04](../../archive/23.04/index.md), +t is possible to use different connection options by putting a full ODBC connection string in `sql_server` (e.g. `DSN=database;UID=ejabberd;PWD=password`). The DSN must be configured in existing system or user odbc.ini file, where it can be configured as desired, -using a driver from system odbcinst.ini. The [sql_odbc_driver](/admin/configuration/toplevel/#sql-odbc-driver) +using a driver from system odbcinst.ini. The [sql_odbc_driver](toplevel.md#sql_odbc_driver) option will have no effect in this case. If specifying an ODBC connection string, an ODBC connection string must also be diff --git a/content/admin/configuration/file-format.md b/content/admin/configuration/file-format.md index 01aa057d..77889a4b 100644 --- a/content/admin/configuration/file-format.md +++ b/content/admin/configuration/file-format.md @@ -1,11 +1,6 @@ ---- -title: File Format -toc: true -menu: File Format -order: 10 ---- +# File format -# Yaml File Format +## Yaml File Format `ejabberd` loads its configuration file during startup. This configuration file is written in @@ -24,7 +19,7 @@ changing parameters at runtime from web admin interface, you will need to apply them to configuration file manually. This is to prevent messing up with your config file comments, syntax, etc. -# Reload at Runtime +## Reload at Runtime You can modify the `ejabberd` configuration file and reload it at runtime: @@ -37,7 +32,7 @@ How to do this? 1. Let's assume your ejabberd server is already running 2. Modify the configuration file -3. Run the [reload_config](/developer/ejabberd-api/admin-api/#reload-config) command +3. Run the [reload_config](../../developer/ejabberd-api/admin-api.md#reload_config) command 4. ejabberd will read that file, check its YAML syntax is valid, check the options are valid and known... 5. If there's any problem in the configuration file, @@ -46,121 +41,130 @@ How to do this? 6. If the file is right, it detects the changed options, and applies them immediately (add/remove hosts, add/remove modules, ...) -# Legacy Configuration File +## Legacy Configuration File In previous `ejabberd` version the configuration file should be written in Erlang terms. The format is still supported, but it is highly recommended to convert it to the new YAML format with the -[convert_to_yaml](/developer/ejabberd-api/admin-api/#convert-to-yaml) -API command using [ejabberdctl](/admin/guide/managing/#ejabberdctl). +[convert_to_yaml](../../developer/ejabberd-api/admin-api.md#convert_to_yaml) +API command using [ejabberdctl](../guide/managing.md#ejabberdctl). If you want to specify some options using the old Erlang format, you can set them in an additional cfg file, and include it using the `include_config_file` option, see -[Include Additional Configuration Files](#include-additional-configuration-files) -for the option description and a related example in -[Restrict Execution with AccessCommands](/admin/guide/managing/#restrict-execution-with-accesscommands). +[Include Additional Files](#include-additional-files). +## Include Additional Files -# Include Additional Files - -The option [include_config_file](/admin/configuration/toplevel/#include-config-file) +The option [include_config_file](toplevel.md#include_config_file) in a configuration file instructs `ejabberd` to include other configuration files immediately. This is a basic example: - include_config_file: /etc/ejabberd/additional.yml +``` yaml +include_config_file: /etc/ejabberd/additional.yml +``` In this example, the included file is not allowed to contain a `listen` option. If such an option is present, the option will not be accepted. The file is in a subdirectory from where the main configuration file is. - include_config_file: - ./example.org/additional_not_listen.yml: - disallow: [listen] +``` yaml +include_config_file: + ./example.org/additional_not_listen.yml: + disallow: [listen] +``` Please notice that options already defined in the main configuration file cannot be redefined in the included configuration files. -But you can use [host_config](/admin/configuration/toplevel/#host-config) -and [append_host_config](/admin/configuration/toplevel/#append-host-config) -as usual (see [Virtual Hosting](/admin/configuration/basic/#virtual-hosting)). +But you can use [host_config](toplevel.md#host_config) +and [append_host_config](toplevel.md#append_host_config) +as usual (see [Virtual Hosting](basic.md#virtual-hosting)). In this example, `ejabberd.yml` defines some ACL for the whole ejabberd server, and later includes another file: - acl: - admin: - user: - - admin@localhost - include_config_file: - /etc/ejabberd/acl.yml +``` yaml +acl: + admin: + user: + - admin@localhost +include_config_file: + /etc/ejabberd/acl.yml +``` The file `acl.yml` can add additional administrators to one of the virtual hosts: - append_host_config: - localhost: - acl: - admin: - user: - - bob@localhost - - jan@localhost +``` yaml +append_host_config: + localhost: + acl: + admin: + user: + - bob@localhost + - jan@localhost +``` -# Macros in Configuration File +## Macros in Configuration File In the `ejabberd` configuration file, it is possible to define a macro for a value and later use this macro when defining an option. -A macro is defined using the [define_macro](/admin/configuration/toplevel/#define-macro) option. +A macro is defined using the [define_macro](toplevel.md#define_macro) option. This example shows the basic usage of a macro: - - define_macro: - LOG_LEVEL_NUMBER: 5 - loglevel: LOG_LEVEL_NUMBER +``` yaml +define_macro: + LOG_LEVEL_NUMBER: 5 +loglevel: LOG_LEVEL_NUMBER +``` The resulting option interpreted by `ejabberd` is: `loglevel: 5`. This example shows that values can be any arbitrary YAML value: - - define_macro: - USERBOB: - user: - - bob@localhost - acl: - admin: USERBOB +``` yaml +define_macro: + USERBOB: + user: + - bob@localhost +acl: + admin: USERBOB +``` The resulting option interpreted by `ejabberd` is: - - acl: - admin: - user: - - bob@localhost +``` yaml +acl: + admin: + user: + - bob@localhost +``` This complex example: - - define_macro: - NUMBER_PORT_C2S: 5222 - NUMBER_PORT_HTTP: 5280 - listen: - - - port: NUMBER_PORT_C2S - module: ejabberd_c2s - - - port: NUMBER_PORT_HTTP - module: ejabberd_http +``` yaml +define_macro: + NUMBER_PORT_C2S: 5222 + NUMBER_PORT_HTTP: 5280 +listen: + - + port: NUMBER_PORT_C2S + module: ejabberd_c2s + - + port: NUMBER_PORT_HTTP + module: ejabberd_http +``` produces this result after being interpreted: - - listen: - - - port: 5222 - module: ejabberd_c2s - - - port: 5280 - module: ejabberd_http - +``` yaml +listen: + - + port: 5222 + module: ejabberd_c2s + - + port: 5280 + module: ejabberd_http +``` diff --git a/static/images/admin/msrl-dit-deep.png b/content/admin/configuration/images/msrl-dit-deep.png similarity index 100% rename from static/images/admin/msrl-dit-deep.png rename to content/admin/configuration/images/msrl-dit-deep.png diff --git a/static/images/admin/msrl-dit-flat.png b/content/admin/configuration/images/msrl-dit-flat.png similarity index 100% rename from static/images/admin/msrl-dit-flat.png rename to content/admin/configuration/images/msrl-dit-flat.png diff --git a/static/images/admin/msrl-roster-deep.png b/content/admin/configuration/images/msrl-roster-deep.png similarity index 100% rename from static/images/admin/msrl-roster-deep.png rename to content/admin/configuration/images/msrl-roster-deep.png diff --git a/static/images/admin/msrl-roster-flat.png b/content/admin/configuration/images/msrl-roster-flat.png similarity index 100% rename from static/images/admin/msrl-roster-flat.png rename to content/admin/configuration/images/msrl-roster-flat.png diff --git a/content/admin/configuration/index.md b/content/admin/configuration/index.md index 80fb864b..140f5aba 100644 --- a/content/admin/configuration/index.md +++ b/content/admin/configuration/index.md @@ -1,9 +1,4 @@ ---- -title: Configuring ejabberd -toc: true -menu: Configuration -order: 3 ---- +# Configuring ejabberd Here are the main entry points to learn more about ejabberd configuration. ejabberd is extremely powerful and can be configured in @@ -20,14 +15,15 @@ Tutorials for first-time users: Detailed documentation in sections: -- [File Format](/admin/configuration/file-format/) -- [Basic Configuration](/admin/configuration/basic/): hosts, acl, logging... -- [Authentication](/admin/configuration/authentication/): auth_method -- [Databases](/admin/configuration/database/) -- [LDAP](/admin/configuration/ldap/) -- [Listen Modules](/admin/configuration/listen/): c2s, s2s, http, sip, stun... -- [Listen Options](/admin/configuration/listen-options/) -- [Top-Level Options](/admin/configuration/toplevel/) -- [Modules Options](/admin/configuration/modules/) +- [File Format](file-format.md) +- [Basic Configuration](basic.md): hosts, acl, logging... +- [Authentication](authentication.md): auth_method +- [Databases](database.md) +- [LDAP](ldap.md) +- [Listen Modules](listen.md): c2s, s2s, http, sip, stun... +- [Listen Options](listen-options.md) +- [Top-Level Options](toplevel.md) +- [Modules Options](modules.md) -There's also a copy of the old [Configuration](/admin/configuration/old/) document which was used up to ejabberd 20.03. +There's also a [copy of the old configuration](../../archive/old.md) document +which was used up to ejabberd [20.03](../../archive/20.02/index.md). diff --git a/content/admin/configuration/ldap.md b/content/admin/configuration/ldap.md index 3bf339a8..adbf5801 100644 --- a/content/admin/configuration/ldap.md +++ b/content/admin/configuration/ldap.md @@ -1,25 +1,19 @@ ---- -title: LDAP Configuration -toc: true -menu: LDAP -order: 50 ---- +# LDAP Configuration -# Supported storages +## Supported storages The following LDAP servers are tested with `ejabberd`: -- [`Active Directory`](https://www.microsoft.com/activedirectory)(see - section [Active Directory](#active-directory)) +- `Active Directory` (see section [Active Directory](#active-directory)) -- [`OpenLDAP`](https://openldap.org/) +- [`OpenLDAP`](https://openldap.org/) -- [`CommuniGate Pro`](https://communigate.com/) +- [`CommuniGate Pro`](https://communigate.com/) -- Normally any LDAP compatible server should work; inform us about - your success with a not-listed server so that we can list it here. +- Normally any LDAP compatible server should work; inform us about + your success with a not-listed server so that we can list it here. -# LDAP +## LDAP `ejabberd` has built-in LDAP support. You can authenticate users against LDAP server and use LDAP directory as vCard storage. @@ -30,48 +24,49 @@ stored in LDAP. However, it is possible to change passwords if `mod_register` module is enabled and LDAP server supports [`RFC 3062`](https://tools.ietf.org/html/rfc3062). -# LDAP Connection +## LDAP Connection Two connections are established to the LDAP server per vhost, one for authentication and other for regular calls. To configure the LDAP connection there are these top-level options: -- [ldap_servers](/admin/configuration/toplevel/#ldap-servers) -- [ldap_encrypt](/admin/configuration/toplevel/#ldap-encrypt) -- [ldap_tls_verify](/admin/configuration/toplevel/#ldap-tls-verify) -- [ldap_tls_cacertfile](/admin/configuration/toplevel/#ldap-tls-cacertfile) -- [ldap_tls_depth](/admin/configuration/toplevel/#ldap-tls-depth) -- [ldap_port](/admin/configuration/toplevel/#ldap-port) -- [ldap_rootdn](/admin/configuration/toplevel/#ldap-rootdn) -- [ldap_password](/admin/configuration/toplevel/#ldap-password) -- [ldap_deref_aliases](/admin/configuration/toplevel/#ldap-deref-aliases) +- [ldap_servers](toplevel.md#ldap_servers) +- [ldap_encrypt](toplevel.md#ldap_encrypt) +- [ldap_tls_verify](toplevel.md#ldap_tls_verify) +- [ldap_tls_cacertfile](toplevel.md#ldap_tls_cacertfile) +- [ldap_tls_depth](toplevel.md#ldap_tls_depth) +- [ldap_port](toplevel.md#ldap_port) +- [ldap_rootdn](toplevel.md#ldap_rootdn) +- [ldap_password](toplevel.md#ldap_password) +- [ldap_deref_aliases](toplevel.md#ldap_deref_aliases) Example: +``` yaml +auth_method: [ldap] +ldap_servers: + - ldap1.example.org +ldap_port: 389 +ldap_rootdn: "cn=Manager,dc=domain,dc=org" +ldap_password: "**********" +``` - auth_method: [ldap] - ldap_servers: - - ldap1.example.org - ldap_port: 389 - ldap_rootdn: "cn=Manager,dc=domain,dc=org" - ldap_password: "**********" - -# LDAP Authentication +## LDAP Authentication You can authenticate users against an LDAP directory. Note that current LDAP implementation does not support SASL authentication. To configure LDAP authentication there are these top-level options: -- [ldap_base](/admin/configuration/toplevel/#ldap-base) -- [ldap_uids](/admin/configuration/toplevel/#ldap-uids) -- [ldap_filter](/admin/configuration/toplevel/#ldap-filter) -- [ldap_dn_filter](/admin/configuration/toplevel/#ldap-dn-filter) +- [ldap_base](toplevel.md#ldap_base) +- [ldap_uids](toplevel.md#ldap_uids) +- [ldap_filter](toplevel.md#ldap_filter) +- [ldap_dn_filter](toplevel.md#ldap_dn_filter) -# LDAP Examples +## LDAP Examples -## Common example +### Common example Let’s say `ldap.example.org` is the name of our LDAP server. We have users with their passwords in `ou=Users,dc=example,dc=org` directory. @@ -81,141 +76,141 @@ connection to the LDAP server is encrypted using TLS, and using the custom port 6123. Corresponding authentication section should looks like this: - - ## Authentication method - auth_method: [ldap] - ## DNS name of our LDAP server - ldap_servers: [ldap.example.org] - ## Bind to LDAP server as "cn=Manager,dc=example,dc=org" with password "secret" - ldap_rootdn: "cn=Manager,dc=example,dc=org" - ldap_password: secret - ldap_encrypt: tls - ldap_port: 6123 - ## Define the user's base - ldap_base: "ou=Users,dc=example,dc=org" - ## We want to authorize users from 'shadowAccount' object class only - ldap_filter: "(objectClass=shadowAccount)" +``` yaml +## Authentication method +auth_method: [ldap] +## DNS name of our LDAP server +ldap_servers: [ldap.example.org] +## Bind to LDAP server as "cn=Manager,dc=example,dc=org" with password "secret" +ldap_rootdn: "cn=Manager,dc=example,dc=org" +ldap_password: secret +ldap_encrypt: tls +ldap_port: 6123 +## Define the user's base +ldap_base: "ou=Users,dc=example,dc=org" +## We want to authorize users from 'shadowAccount' object class only +ldap_filter: "(objectClass=shadowAccount)" +``` Now we want to use users LDAP-info as their vCards. We have four attributes defined in our LDAP schema: `mail` — email address, `givenName` — first name, `sn` — second name, `birthDay` — birthday. Also we want users to search each other. Let’s see how we can set it up: - - modules: - ... - mod_vcard: - db_type: ldap - ## We use the same server and port, but want to bind anonymously because - ## our LDAP server accepts anonymous requests to - ## "ou=AddressBook,dc=example,dc=org" subtree. - ldap_rootdn: "" - ldap_password: "" - ## define the addressbook's base - ldap_base: "ou=AddressBook,dc=example,dc=org" - ## uidattr: user's part of JID is located in the "mail" attribute - ## uidattr_format: common format for our emails - ldap_uids: - mail: "%u@mail.example.org" - ## We have to define empty filter here, because entries in addressbook does not - ## belong to shadowAccount object class - ldap_filter: "" - ## Now we want to define vCard pattern - ldap_vcard_map: - NICKNAME: {"%u": []} # just use user's part of JID as their nickname - GIVEN: {"%s": [givenName]} - FAMILY: {"%s": [sn]} - FN: {"%s, %s": [sn, givenName]} # example: "Smith, John" - EMAIL: {"%s": [mail]} - BDAY: {"%s": [birthDay]} - ## Search form - ldap_search_fields: - User: "%u" - Name: givenName - "Family Name": sn - Email: mail - Birthday: birthDay - ## vCard fields to be reported - ## Note that JID is always returned with search results - ldap_search_reported: - "Full Name": FN - Nickname: NICKNAME - Birthday: BDAY - ... +``` yaml +modules: + mod_vcard: + db_type: ldap + ## We use the same server and port, but want to bind anonymously because + ## our LDAP server accepts anonymous requests to + ## "ou=AddressBook,dc=example,dc=org" subtree. + ldap_rootdn: "" + ldap_password: "" + ## define the addressbook's base + ldap_base: "ou=AddressBook,dc=example,dc=org" + ## uidattr: user's part of JID is located in the "mail" attribute + ## uidattr_format: common format for our emails + ldap_uids: + mail: "%u@mail.example.org" + ## We have to define empty filter here, because entries in addressbook does not + ## belong to shadowAccount object class + ldap_filter: "" + ## Now we want to define vCard pattern + ldap_vcard_map: + NICKNAME: {"%u": []} # just use user's part of JID as their nickname + GIVEN: {"%s": [givenName]} + FAMILY: {"%s": [sn]} + FN: {"%s, %s": [sn, givenName]} # example: "Smith, John" + EMAIL: {"%s": [mail]} + BDAY: {"%s": [birthDay]} + ## Search form + ldap_search_fields: + User: "%u" + Name: givenName + "Family Name": sn + Email: mail + Birthday: birthDay + ## vCard fields to be reported + ## Note that JID is always returned with search results + ldap_search_reported: + "Full Name": FN + Nickname: NICKNAME + Birthday: BDAY +``` Note that `mod_vcard` with LDAP backend checks for the existence of the user before searching their information in LDAP. -## Active Directory +### Active Directory Active Directory is just an LDAP-server with predefined attributes. A sample configuration is shown below: - - auth_method: [ldap] - ldap_servers: [office.org] # List of LDAP servers - ldap_base: "DC=office,DC=org" # Search base of LDAP directory - ldap_rootdn: "CN=Administrator,CN=Users,DC=office,DC=org" # LDAP manager - ldap_password: "*******" # Password to LDAP manager - ldap_uids: [sAMAccountName] - ldap_filter: "(memberOf=*)" - - modules: - ... - mod_vcard: - db_type: ldap - ldap_vcard_map: - NICKNAME: {"%u": []} - GIVEN: {"%s": [givenName]} - MIDDLE: {"%s": [initials]} - FAMILY: {"%s": [sn]} - FN: {"%s": [displayName]} - EMAIL: {"%s": [mail]} - ORGNAME: {"%s": [company]} - ORGUNIT: {"%s": [department]} - CTRY: {"%s": [c]} - LOCALITY: {"%s": [l]} - STREET: {"%s": [streetAddress]} - REGION: {"%s": [st]} - PCODE: {"%s": [postalCode]} - TITLE: {"%s": [title]} - URL: {"%s": [wWWHomePage]} - DESC: {"%s": [description]} - TEL: {"%s": [telephoneNumber]} - ldap_search_fields: - User: "%u" - Name: givenName - "Family Name": sn - Email: mail - Company: company - Department: department - Role: title - Description: description - Phone: telephoneNumber - ldap_search_reported: - "Full Name": FN - Nickname: NICKNAME - Email: EMAIL - ... - - -# Shared Roster in LDAP - -Since [mod_shared_roster_ldap](/admin/configuration/modules/#mod-shared-roster-ldap) has a few complex options, +``` yaml +auth_method: [ldap] +ldap_servers: [office.org] # List of LDAP servers +ldap_base: "DC=office,DC=org" # Search base of LDAP directory +ldap_rootdn: "CN=Administrator,CN=Users,DC=office,DC=org" # LDAP manager +ldap_password: "*******" # Password to LDAP manager +ldap_uids: [sAMAccountName] +ldap_filter: "(memberOf=*)" + +modules: + mod_vcard: + db_type: ldap + ldap_vcard_map: + NICKNAME: {"%u": []} + GIVEN: {"%s": [givenName]} + MIDDLE: {"%s": [initials]} + FAMILY: {"%s": [sn]} + FN: {"%s": [displayName]} + EMAIL: {"%s": [mail]} + ORGNAME: {"%s": [company]} + ORGUNIT: {"%s": [department]} + CTRY: {"%s": [c]} + LOCALITY: {"%s": [l]} + STREET: {"%s": [streetAddress]} + REGION: {"%s": [st]} + PCODE: {"%s": [postalCode]} + TITLE: {"%s": [title]} + URL: {"%s": [wWWHomePage]} + DESC: {"%s": [description]} + TEL: {"%s": [telephoneNumber]} + ldap_search_fields: + User: "%u" + Name: givenName + "Family Name": sn + Email: mail + Company: company + Department: department + Role: title + Description: description + Phone: telephoneNumber + ldap_search_reported: + "Full Name": FN + Nickname: NICKNAME + Email: EMAIL +``` + +## Shared Roster in LDAP + +Since [mod_shared_roster_ldap](modules.md#mod_shared_roster_ldap) has a few complex options, some of them are documented with more detail here: -## Filters +### Filters **`ldap_ufilter`**: “User Filter” – used for retrieving the human-readable name of - roster entries (usually full names of people in the roster). See - also the parameters `ldap_userdesc` and `ldap_useruid`. If - unspecified, defaults to the top-level parameter of the same name. - If that one also is unspecified, then the filter is assembled from - values of other parameters as follows (`[ldap_SOMETHING]` is used to - mean “the value of the configuration parameter - `ldap_SOMETHING`”): - - (&(&([ldap_memberattr]=[ldap_memberattr_format])([ldap_groupattr]=%g))[ldap_filter]) + roster entries (usually full names of people in the roster). See + also the parameters `ldap_userdesc` and `ldap_useruid`. If + unspecified, defaults to the top-level parameter of the same name. + If that one also is unspecified, then the filter is assembled from + values of other parameters as follows (`[ldap_SOMETHING]` is used to + mean “the value of the configuration parameter + `ldap_SOMETHING`”): + +``` sh +(&(&([ldap_memberattr]=[ldap_memberattr_format])([ldap_groupattr]=%g))[ldap_filter]) +``` Subsequently `%u` and `%g` are replaced with a \*. This means that given the defaults, the filter sent to the LDAP @@ -225,20 +220,19 @@ server would be `(&(memberUid=*)(cn=*))`. If however the `(&(memberUid=uid=*,ou=People,o=org)(cn=*))`. **`ldap_filter`**: Additional filter which is AND-ed together with *User - Filter* and *Group Filter*. If unspecified, - defaults to the top-level parameter of the same name. If that one is - also unspecified, then no additional filter is merged with the other - filters. + Filter* and *Group Filter*. If unspecified, + defaults to the top-level parameter of the same name. If that one is + also unspecified, then no additional filter is merged with the other + filters. Note that you will probably need to manually define the *User* and *Group Filter* (since the auto-assembled ones will not work) if: -- your `ldap_memberattr_format` is anything other than a - simple `%u`, +- your `ldap_memberattr_format` is anything other than a + simple `%u`, -- **and** the attribute specified with - `ldap_memberattr` does not support substring matches. +- **and** the attribute specified with `ldap_memberattr` does not support substring matches. An example where it is the case is OpenLDAP and *(unique)MemberName* attribute from the @@ -246,32 +240,30 @@ An example where it is the case is OpenLDAP and is that you will see messages such as the following in your `slapd.log`: +``` sh +get_filter: unknown filter type=130 +filter="(&(?=undefined)(?=undefined)(something=else))" +``` - get_filter: unknown filter type=130 - filter="(&(?=undefined)(?=undefined)(something=else))" - -## Control parameters +### Control parameters These parameters control the behaviour of the module. **`ldap_memberattr_format_re`**: A regex for extracting user ID from the value of the attribute named - by `ldap_memberattr`. + by `ldap_memberattr`. -An example value -`“CN=(\\w*),(OU=.*,)*DC=company,DC=com”` -works for user IDs such as the following: +An example value `“CN=(\\w*),(OU=.*,)*DC=company,DC=com”` works for user IDs such as the following: -- `CN=Romeo,OU=Montague,DC=company,DC=com` -- `CN=Abram,OU=Servants,OU=Montague,DC=company,DC=com` -- `CN=Juliet,OU=Capulet,DC=company,DC=com` -- `CN=Peter,OU=Servants,OU=Capulet,DC=company,DC=com` +- `CN=Romeo,OU=Montague,DC=company,DC=com` +- `CN=Abram,OU=Servants,OU=Montague,DC=company,DC=com` +- `CN=Juliet,OU=Capulet,DC=company,DC=com` +- `CN=Peter,OU=Servants,OU=Capulet,DC=company,DC=com` In case: -- the option is unset, -- or the `re` module in unavailable in the current - Erlang environment, -- or the regular expression does not compile, +- the option is unset, +- or the `re` module in unavailable in the current Erlang environment, +- or the regular expression does not compile, then instead of a regular expression, a simple format specified by `ldap_memberattr_format` is used. Also, in the last two @@ -279,78 +271,45 @@ cases an error message is logged during the module initialization. Also, note that in all cases `ldap_memberattr_format` (and `*not*` the regex version) is used for constructing -the default “User/Group Filter” — see section [Filters](#msrl-filters). - -## Retrieving the roster +the default “User/Group Filter” — see section [Filters](#filters). -When the module is called to retrieve the shared roster for a user, the -following algorithm is used: +### Retrieving the roster -1. [step:rfilter] A list of names of groups to display is created: the - *Roster Filter* is run against the base DN, retrieving - the values of the attribute named by `ldap_groupattr`. +When the module is called to retrieve the shared roster for a user, the following algorithm is used: -2. Unless the group cache is fresh (see the - `ldap_group_cache_validity` option), it is refreshed: +1. [step:rfilter] A list of names of groups to display is created: the *Roster Filter* is run against the base DN, retrieving the values of the attribute named by `ldap_groupattr`. - 1. Information for all groups is retrieved using a single query: - the *Group Filter* is run against the Base DN, - retrieving the values of attributes named by - `ldap_groupattr` (group ID), - `ldap_groupdesc` (group “Display Name”) and - `ldap_memberattr` (IDs of group members). +2. Unless the group cache is fresh (see the `ldap_group_cache_validity` option), it is refreshed: - 2. group “Display Name”, read from the attribute named by - `ldap_groupdesc`, is stored in the cache for the - given group + 1. Information for all groups is retrieved using a single query: the *Group Filter* is run against the Base DN, retrieving the values of attributes named by `ldap_groupattr` (group ID), `ldap_groupdesc` (group “Display Name”) and `ldap_memberattr` (IDs of group members). - 3. the following processing takes place for each retrieved value of - attribute named by `ldap_memberattr`: + 2. group “Display Name”, read from the attribute named by `ldap_groupdesc`, is stored in the cache for the + given group - 1. the user ID part of it is extracted using - `ldap_memberattr_format(_re)`, + 3. the following processing takes place for each retrieved value of attribute named by `ldap_memberattr`: - 2. then (unless `ldap_auth_check` is set to - `off`) for each found user ID, the module checks - (using the `ejabberd` authentication subsystem) whether such - user exists in the given virtual host. It is skipped if the - check is enabled and fails. + 1. the user ID part of it is extracted using `ldap_memberattr_format(_re)`, - This step is here for historical reasons. If you have a tidy - DIT and properly defined “Roster Filter” and “Group Filter”, - it is safe to disable it by setting - `ldap_auth_check` to `off` — it will - speed up the roster retrieval. + 2. then (unless `ldap_auth_check` is set to `off`) for each found user ID, the module checks (using the `ejabberd` authentication subsystem) whether such user exists in the given virtual host. It is skipped if the check is enabled and fails. + This step is here for historical reasons. If you have a tidy DIT and properly defined “Roster Filter” and “Group Filter”, it is safe to disable it by setting `ldap_auth_check` to `off` — it will speed up the roster retrieval. - 3. the user ID is stored in the list of members in the cache - for the given group + 3. the user ID is stored in the list of members in the cache for the given group. -3. For each item (group name) in the list of groups retrieved in - step [step:rfilter]: +3. For each item (group name) in the list of groups retrieved in step [step:rfilter]: - 1. the display name of a shared roster group is retrieved from the - group cache + 1. the display name of a shared roster group is retrieved from the group cache - 2. for each IDs of users which belong to the group, retrieved from - the group cache: + 2. for each IDs of users which belong to the group, retrieved from the group cache: - 1. the ID is skipped if it’s the same as the one for which we - are retrieving the roster. This is so that the user does not - have himself in the roster. + 1. the ID is skipped if it’s the same as the one for which we are retrieving the roster. This is so that the user does not have himself in the roster. - 2. the display name of a shared roster user is retrieved: + 2. the display name of a shared roster user is retrieved: - 1. first, unless the user name cache is fresh (see the - `ldap_user_cache_validity` option), it is - refreshed by running the *User Filter*, - against the Base DN, retrieving the values of attributes - named by `ldap_useruid` and - `ldap_userdesc`. + 1. first, unless the user name cache is fresh (see the `ldap_user_cache_validity` option), it is refreshed by running the *User Filter*, against the Base DN, retrieving the values of attributes named by `ldap_useruid` and `ldap_userdesc`. - 2. then, the display name for the given user ID is - retrieved from the user name cache. + 2. then, the display name for the given user ID is retrieved from the user name cache. -## Multi-Domain +### Multi-Domain By default, the module option `ldap_userjidattr` is set to the empty string, in that case the JID of the user's contact is formed by compounding @@ -373,141 +332,143 @@ users. Below is a sample, a relevant LDAP entry, and ejabberd's module configuration: - cn=Example Org Roster,ou=groups,o=Example Organisation,dc=acme,dc=com - objectClass: groupOfNames - objectClass: xmppRosterGroup - objectClass: top - xmppRosterStatus: active - member: - description: Roster group for Example Org - cn: Example Org Roster - uniqueMember: uid=john,ou=people,o=Example Organisation,dc=acme,dc=com - uniqueMember: uid=pierre,ou=people,o=Example Organisation,dc=acme,dc=com - uniqueMember: uid=jane,ou=people,o=Example Organisation,dc=acme,dc=com - ... - - uid=john,ou=people,o=Example Organisation,dc=acme,dc=com - objectClass: top - objectClass: person - objectClass: organizationalPerson - objectClass: inetOrgPerson - objectClass: mailUser - objectClass: sipRoutingObject - uid: john - givenName: John - sn: Doe - cn: John Doe - displayName: John Doe - accountStatus: active - userPassword: secretpass - IMAPURL: imap://imap.example.net:143 - mailHost: smtp.example.net - mail: john@example.net - sipLocalAddress: john@example.net - Below is the sample ejabberd.yml module configuration to match: - - mod_shared_roster_ldap: - ldap_servers: - - "ldap.acme.com" - ldap_encrypt: tls - ldap_port: 636 - ldap_rootdn: "cn=Manager,dc=acme,dc=com" - ldap_password: "supersecretpass" - ldap_base: "dc=acme,dc=com" - ldap_filter: "(objectClass=*)" - ldap_rfilter: "(&(objectClass=xmppRosterGroup)(xmppRosterStatus=active))" - ldap_gfilter: "(&(objectClass=xmppRosterGroup)(xmppRosterStatus=active)(cn=%g))" - ldap_groupattr: "cn" - ldap_groupdesc: "cn" - ldap_memberattr: "uniqueMember" - ldap_memberattr_format_re: "uid=([a-z.]*),(ou=.*,)*(o=.*,)*dc=acme,dc=com" - ldap_useruid: "uid" - ldap_userdesc: "cn" - ldap_userjidattr: "mail" - ldap_auth_check: false - ldap_user_cache_validity: 86400 - ldap_group_cache_validity: 86400 - -## Configuration examples +``` yaml +cn=Example Org Roster,ou=groups,o=Example Organisation,dc=acme,dc=com +objectClass: groupOfNames +objectClass: xmppRosterGroup +objectClass: top +xmppRosterStatus: active +member: +description: Roster group for Example Org +cn: Example Org Roster +uniqueMember: uid=john,ou=people,o=Example Organisation,dc=acme,dc=com +uniqueMember: uid=pierre,ou=people,o=Example Organisation,dc=acme,dc=com +uniqueMember: uid=jane,ou=people,o=Example Organisation,dc=acme,dc=com + +uid=john,ou=people,o=Example Organisation,dc=acme,dc=com +objectClass: top +objectClass: person +objectClass: organizationalPerson +objectClass: inetOrgPerson +objectClass: mailUser +objectClass: sipRoutingObject +uid: john +givenName: John +sn: Doe +cn: John Doe +displayName: John Doe +accountStatus: active +userPassword: secretpass +IMAPURL: imap://imap.example.net:143 +mailHost: smtp.example.net +mail: john@example.net +sipLocalAddress: john@example.net +``` + +Below is the sample ejabberd.yml module configuration to match: + +``` yaml +mod_shared_roster_ldap: + ldap_servers: + - "ldap.acme.com" + ldap_encrypt: tls + ldap_port: 636 + ldap_rootdn: "cn=Manager,dc=acme,dc=com" + ldap_password: "supersecretpass" + ldap_base: "dc=acme,dc=com" + ldap_filter: "(objectClass=*)" + ldap_rfilter: "(&(objectClass=xmppRosterGroup)(xmppRosterStatus=active))" + ldap_gfilter: "(&(objectClass=xmppRosterGroup)(xmppRosterStatus=active)(cn=%g))" + ldap_groupattr: "cn" + ldap_groupdesc: "cn" + ldap_memberattr: "uniqueMember" + ldap_memberattr_format_re: "uid=([a-z.]*),(ou=.*,)*(o=.*,)*dc=acme,dc=com" + ldap_useruid: "uid" + ldap_userdesc: "cn" + ldap_userjidattr: "mail" + ldap_auth_check: false + ldap_user_cache_validity: 86400 + ldap_group_cache_validity: 86400 +``` + +### Configuration examples Since there are many possible [`DIT`](https://en.wikipedia.org/wiki/Directory_Information_Tree) layouts, it will probably be easiest to understand how to configure the module by looking at an example for a given DIT (or one resembling it). -### Flat DIT +#### Flat DIT This seems to be the kind of DIT for which this module was initially designed. Basically there are just user objects, and group membership is stored in an attribute individually for each user. For example in a layout like this, it's stored in the `ou` attribute: -![msrl-dit-flat.png](/static/images/admin/msrl-dit-flat.png) +![msrl-dit-flat.png](./images/msrl-dit-flat.png) Such layout has a few downsides, including: -- information duplication – the group name is repeated in every member - object +- information duplication – the group name is repeated in every member + object -- difficult group management – information about group members is not - centralized, but distributed between member objects +- difficult group management – information about group members is not + centralized, but distributed between member objects -- inefficiency – the list of unique group names has to be computed by - iterating over all users +- inefficiency – the list of unique group names has to be computed by + iterating over all users This however seems to be a common DIT layout, so the module keeps supporting it. You can use the following configuration… - - modules: - ... - mod_shared_roster_ldap: - ldap_base: "ou=flat,dc=nodomain" - ldap_rfilter: "(objectClass=inetOrgPerson)" - ldap_groupattr: ou - ldap_memberattr: cn - ldap_filter: "(objectClass=inetOrgPerson)" - ldap_userdesc: displayName - ... +``` yaml +modules: + mod_shared_roster_ldap: + ldap_base: "ou=flat,dc=nodomain" + ldap_rfilter: "(objectClass=inetOrgPerson)" + ldap_groupattr: ou + ldap_memberattr: cn + ldap_filter: "(objectClass=inetOrgPerson)" + ldap_userdesc: displayName +``` …to be provided with a roster upon connecting as user `czesio`, as shown in this figure: -![msrl-roster-flat.png](/static/images/admin/msrl-roster-flat.png) +![msrl-roster-flat.png](./images/msrl-roster-flat.png) -### Deep DIT +#### Deep DIT This type of DIT contains distinctly typed objects for users and groups – see the next figure. They are shown separated into different subtrees, but it’s not a requirement. -![msrl-dit-deep.png](/static/images/admin/msrl-dit-deep.png) +![msrl-dit-deep.png](./images/msrl-dit-deep.png) If you use the following example module configuration with it: - - modules: - ... - mod_shared_roster_ldap: - ldap_base: "ou=deep,dc=nodomain" - ldap_rfilter: "(objectClass=groupOfUniqueNames)" - ldap_filter: "" - ldap_gfilter: "(&(objectClass=groupOfUniqueNames)(cn=%g))" - ldap_groupdesc: description - ldap_memberattr: uniqueMember - ldap_memberattr_format: "cn=%u,ou=people,ou=deep,dc=nodomain" - ldap_ufilter: "(&(objectClass=inetOrgPerson)(cn=%u))" - ldap_userdesc: displayName - ... +``` yaml +modules: + mod_shared_roster_ldap: + ldap_base: "ou=deep,dc=nodomain" + ldap_rfilter: "(objectClass=groupOfUniqueNames)" + ldap_filter: "" + ldap_gfilter: "(&(objectClass=groupOfUniqueNames)(cn=%g))" + ldap_groupdesc: description + ldap_memberattr: uniqueMember + ldap_memberattr_format: "cn=%u,ou=people,ou=deep,dc=nodomain" + ldap_ufilter: "(&(objectClass=inetOrgPerson)(cn=%u))" + ldap_userdesc: displayName +``` …and connect as user `czesio`, then `ejabberd` will provide you with the roster shown in this figure: -![msrl-roster-deep.png](/static/images/admin/msrl-roster-deep.png) +![msrl-roster-deep.png](./images/msrl-roster-deep.png) -# vCard in LDAP +## vCard in LDAP -Since LDAP may be complex to configure in [mod_vcard](/admin/configuration/modules/#mod-vcard), +Since LDAP may be complex to configure in [mod_vcard](modules.md#mod_vcard), this section provides more details. `ejabberd` can map LDAP attributes to vCard fields. This feature is @@ -532,90 +493,95 @@ set, `ejabberd` will look for the top-level option with the same name. Examples: -- Let’s say `ldap.example.org` is the name of our LDAP server. We have - users with their passwords in `ou=Users,dc=example,dc=org` - directory. Also we have addressbook, which contains users emails and - their additional infos in `ou=AddressBook,dc=example,dc=org` - directory. Corresponding authentication section should looks like - this: - - - ## authentication method - auth_method: ldap - ## DNS name of our LDAP server - ldap_servers: - - ldap.example.org - ## We want to authorize users from 'shadowAccount' object class only - ldap_filter: "(objectClass=shadowAccount)" - -Now we want to use users LDAP-info as their vCards. We have four +- Let’s say `ldap.example.org` is the name of our LDAP server. We have + users with their passwords in `ou=Users,dc=example,dc=org` + directory. Also we have addressbook, which contains users emails and + their additional infos in `ou=AddressBook,dc=example,dc=org` + directory. Corresponding authentication section should looks like + this: + + ``` yaml + ## authentication method + auth_method: ldap + ## DNS name of our LDAP server + ldap_servers: + - ldap.example.org + ## We want to authorize users from 'shadowAccount' object class only + ldap_filter: "(objectClass=shadowAccount)" + ``` + +- Now we want to use users LDAP-info as their vCards. We have four attributes defined in our LDAP schema: `mail` — email address, `givenName` — first name, `sn` — second name, `birthDay` — birthday. Also we want users to search each other. Let’s see how we can set it up: - - modules: - mod_vcard: - db_type: ldap - ## We use the same server and port, but want to bind anonymously because - ## our LDAP server accepts anonymous requests to - ## "ou=AddressBook,dc=example,dc=org" subtree. - ldap_rootdn: "" - ldap_password: "" - ## define the addressbook's base - ldap_base: "ou=AddressBook,dc=example,dc=org" - ## uidattr: user's part of JID is located in the "mail" attribute - ## uidattr_format: common format for our emails - ldap_uids: {"mail": "%u@mail.example.org"} - ## Now we want to define vCard pattern - ldap_vcard_map: - NICKNAME: {"%u": []} # just use user's part of JID as their nickname - FIRST: {"%s": [givenName]} - LAST: {"%s": [sn]} - FN: {"%s, %s": [sn, givenName]} # example: "Smith, John" - EMAIL: {"%s": [mail]} - BDAY: {"%s": [birthDay]} - ## Search form - ldap_search_fields: - User: "%u" - Name: givenName - "Family Name": sn - Email: mail - Birthday: birthDay - ## vCard fields to be reported - ## Note that JID is always returned with search results - ldap_search_reported: - "Full Name": FN - Nickname: NICKNAME - Birthday: BDAY - -Note that `mod_vcard` with LDAP backend checks an existence of the user -before searching their info in LDAP. - -- `ldap_vcard_map` example: - - - ldap_vcard_map: - NICKNAME: {"%u": []} # just use user's part of JID as their nickname - FN: {"%s": [displayName]} - CTRY: {Russia: []} - EMAIL: {"%u@%d": []} - DESC: {"%s\n%s": [title, description]} - -- `ldap_search_fields` example: - - - ldap_search_fields: - User: uid - "Full Name": displayName - Email: mail - -- `ldap_search_reported` example: - - - ldap_search_reported: - "Full Name": FN - Email: EMAIL - Birthday: BDAY - Nickname: NICKNAME + ``` yaml + modules: + mod_vcard: + db_type: ldap + ## We use the same server and port, but want to bind anonymously because + ## our LDAP server accepts anonymous requests to + ## "ou=AddressBook,dc=example,dc=org" subtree. + ldap_rootdn: "" + ldap_password: "" + ## define the addressbook's base + ldap_base: "ou=AddressBook,dc=example,dc=org" + ## uidattr: user's part of JID is located in the "mail" attribute + ## uidattr_format: common format for our emails + ldap_uids: {"mail": "%u@mail.example.org"} + ## Now we want to define vCard pattern + ldap_vcard_map: + NICKNAME: {"%u": []} # just use user's part of JID as their nickname + FIRST: {"%s": [givenName]} + LAST: {"%s": [sn]} + FN: {"%s, %s": [sn, givenName]} # example: "Smith, John" + EMAIL: {"%s": [mail]} + BDAY: {"%s": [birthDay]} + ## Search form + ldap_search_fields: + User: "%u" + Name: givenName + "Family Name": sn + Email: mail + Birthday: birthDay + ## vCard fields to be reported + ## Note that JID is always returned with search results + ldap_search_reported: + "Full Name": FN + Nickname: NICKNAME + Birthday: BDAY + ``` + + Note that `mod_vcard` with LDAP backend checks an existence of the user + before searching their info in LDAP. + +- `ldap_vcard_map` example: + + ``` yaml + ldap_vcard_map: + NICKNAME: {"%u": []} # just use user's part of JID as their nickname + FN: {"%s": [displayName]} + CTRY: {Russia: []} + EMAIL: {"%u@%d": []} + DESC: {"%s\n%s": [title, description]} + ``` + +- `ldap_search_fields` example: + + ``` yaml + ldap_search_fields: + User: uid + "Full Name": displayName + Email: mail + ``` + +- `ldap_search_reported` example: + + ``` yaml + ldap_search_reported: + "Full Name": FN + Email: EMAIL + Birthday: BDAY + Nickname: NICKNAME + ``` diff --git a/content/admin/configuration/listen-options.md b/content/admin/configuration/listen-options.md index 9c3054d6..35132b2c 100644 --- a/content/admin/configuration/listen-options.md +++ b/content/admin/configuration/listen-options.md @@ -1,11 +1,6 @@ ---- -title: Listen Options -toc: true -menu: Listen Opts -order: 51 ---- +# Listen Options -> This section describes the most recent ejabberd version. If you are using an old ejabberd release, please refer to the corresponding archived version of this page in the [Archive](/archive/). +> This section describes the most recent ejabberd version. If you are using an old ejabberd release, please refer to the corresponding archived version of this page in the [Archive](../../archive/index.md). This is a detailed description of each option allowed by the listening modules: @@ -21,10 +16,10 @@ This option defines access to the port. The default value is `all`. *Value* The backlog value defines the maximum length that the queue of - pending connections may grow to. This should be increased if the - server is going to handle lots of new incoming connections as they - may be dropped if there is no space in the queue (and ejabberd was - not able to accept them immediately). Default value is 5. + pending connections may grow to. This should be increased if the + server is going to handle lots of new incoming connections as they + may be dropped if there is no space in the queue (and ejabberd was + not able to accept them immediately). Default value is 5. ## cafile @@ -35,18 +30,18 @@ The default is to use system defined file if possible. This option is useful to define the file for a specific port listener. To set a file for all client listeners or for specific vhosts, you can use the -[`c2s_cafile`](/admin/configuration/toplevel/#c2s-cafile) top-level option. +[`c2s_cafile`](toplevel.md#c2s_cafile) top-level option. To set a file for all server connections, you can use the -[`s2s_cafile`](/admin/configuration/toplevel/#s2s-cafile) top-level option +[`s2s_cafile`](toplevel.md#s2s_cafile) top-level option or the -[`ca_file`](/admin/configuration/toplevel/#ca-file) top-level option. +[`ca_file`](toplevel.md#ca_file) top-level option. Please note: if this option is set in -[`ejabberd_c2s`](/admin/configuration/listen/#ejabberd-c2s) -or [`ejabberd_s2s_in`](/admin/configuration/listen/#ejabberd-s2s-in) +[`ejabberd_c2s`](listen.md#ejabberd_c2s) +or [`ejabberd_s2s_in`](listen.md#ejabberd_s2s_in) and the corresponding top-level option is also set -([`c2s_cafile`](/admin/configuration/toplevel/#c2s-cafile), -[`s2s_cafile`](/admin/configuration/toplevel/#s2s-cafile)), +([`c2s_cafile`](toplevel.md#c2s_cafile), +[`s2s_cafile`](toplevel.md#s2s_cafile)), then the top-level option is used, not this one. ## certfile @@ -57,36 +52,36 @@ Path to the certificate file. Only makes sense when the [`tls`](#tls) options is set. If this option is not set, you should set the -[`certfiles`](/admin/configuration/toplevel/#certfiles) top-level option -or configure [ACME](/admin/configuration/basic/#acme). +[`certfiles`](toplevel.md#certfiles) top-level option +or configure [ACME](basic.md#acme). ## check_from *true | false* This option can be used with -[`ejabberd_service`](/admin/configuration/listen/#ejabberd-service) only. - [`XEP-0114`](https://xmpp.org/extensions/xep-0114.html) requires that - the domain must match the hostname of the component. If this option - is set to `false`, `ejabberd` will allow the component to send - stanzas with any arbitrary domain in the ’from’ attribute. Only use - this option if you are completely sure about it. The default value - is `true`, to be compliant with - [`XEP-0114`](https://xmpp.org/extensions/xep-0114.html). +[`ejabberd_service`](listen.md#ejabberd_service) only. + [`XEP-0114`](https://xmpp.org/extensions/xep-0114.html) requires that + the domain must match the hostname of the component. If this option + is set to `false`, `ejabberd` will allow the component to send + stanzas with any arbitrary domain in the ’from’ attribute. Only use + this option if you are completely sure about it. The default value + is `true`, to be compliant with + [`XEP-0114`](https://xmpp.org/extensions/xep-0114.html). ## ciphers *Ciphers* OpenSSL ciphers list in the same format accepted by - ‘`openssl ciphers`’ command. + ‘`openssl ciphers`’ command. Please note: if this option is set in -[`ejabberd_c2s`](/admin/configuration/listen/#ejabberd-c2s) -or [`ejabberd_s2s_in`](/admin/configuration/listen/#ejabberd-s2s-in) +[`ejabberd_c2s`](listen.md#ejabberd_c2s) +or [`ejabberd_s2s_in`](listen.md#ejabberd_s2s_in) and the corresponding top-level option is also set -([`c2s_ciphers`](/admin/configuration/toplevel/#c2s-ciphers), -[`s2s_ciphers`](/admin/configuration/toplevel/#s2s-ciphers)), +([`c2s_ciphers`](toplevel.md#c2s_ciphers), +[`s2s_ciphers`](toplevel.md#s2s_ciphers)), then the top-level option is used, not this one. ## custom_headers @@ -101,29 +96,29 @@ Default value is: `[]` *undefined | HostName* If the HTTP request received by ejabberd contains the HTTP header - `Host` with an ambiguous virtual host that doesn’t match any one - defined in ejabberd (see - [Host Names](/admin/configuration/basic/#host-names)), + `Host` with an ambiguous virtual host that doesn’t match any one + defined in ejabberd (see + [Host Names](basic.md#host_names)), then this configured HostName - is set as the request Host. The default value of this option is: - `undefined`. + is set as the request Host. The default value of this option is: + `undefined`. ## dhfile *Path* Full path to a file containing custom parameters for Diffie-Hellman key - exchange. Such a file could be created with the command - `openssl dhparam -out dh.pem 2048`. If this option is not specified, - default parameters will be used, which might not provide the same level - of security as using custom parameters. + exchange. Such a file could be created with the command + `openssl dhparam -out dh.pem 2048`. If this option is not specified, + default parameters will be used, which might not provide the same level + of security as using custom parameters. Please note: if this option is set in -[`ejabberd_c2s`](/admin/configuration/listen/#ejabberd-c2s) -or [`ejabberd_s2s_in`](/admin/configuration/listen/#ejabberd-s2s-in) +[`ejabberd_c2s`](listen.md#ejabberd_c2s) +or [`ejabberd_s2s_in`](listen.md#ejabberd_s2s_in) and the corresponding top-level option is also set -([`c2s_dhfile`](/admin/configuration/toplevel/#c2s-dhfile), -[`s2s_dhfile`](/admin/configuration/toplevel/#s2s-dhfile)), +([`c2s_dhfile`](toplevel.md#c2s_dhfile), +[`s2s_dhfile`](toplevel.md#s2s_dhfile)), then the top-level option is used, not this one. ## global_routes @@ -131,7 +126,7 @@ then the top-level option is used, not this one. *true | false* This option emulates legacy behaviour which registers all routes -defined in [`hosts`](/admin/configuration/toplevel/#hosts) +defined in [`hosts`](toplevel.md#hosts) on a component connected. This behaviour is considered harmful in the case when it's desired to multiplex different components on the same port, so, to disable it, @@ -146,38 +141,38 @@ to maintain backward compatibility with existing deployments. *{Hostname: [HostOption, ...]}* The external Jabber component that connects to this -[`ejabberd_service`](/admin/configuration/listen/#ejabberd-service) +[`ejabberd_service`](listen.md#ejabberd_service) can serve one or more hostnames. As `HostOption` - you can define options for the component; currently the only allowed - option is the password required to the component when attempt to - connect to ejabberd: `password: Secret`. Note that you - cannot define in a single `ejabberd_service` components of different - services: add an `ejabberd_service` for each service, as seen in an - example below. This option may not be necessary if the component - already provides the host in its packets; in that case, you can simply - provide the password option that will be used for all the hosts - (see port 5236 definition in the example below). + you can define options for the component; currently the only allowed + option is the password required to the component when attempt to + connect to ejabberd: `password: Secret`. Note that you + cannot define in a single `ejabberd_service` components of different + services: add an `ejabberd_service` for each service, as seen in an + example below. This option may not be necessary if the component + already provides the host in its packets; in that case, you can simply + provide the password option that will be used for all the hosts + (see port 5236 definition in the example below). ## max_fsm_queue *Size* This option specifies the maximum number of elements in the queue of - the FSM (Finite State Machine). Roughly speaking, each message in - such queues represents one XML stanza queued to be sent into its - relevant outgoing stream. If queue size reaches the limit (because, - for example, the receiver of stanzas is too slow), the FSM and the - corresponding connection (if any) will be terminated and error - message will be logged. The reasonable value for this option depends - on your hardware configuration. This option can be specified for - [`ejabberd_service`](/admin/configuration/listen/#ejabberd-service) - and [`ejabberd_c2s`](/admin/configuration/listen/#ejabberd-c2s) + the FSM (Finite State Machine). Roughly speaking, each message in + such queues represents one XML stanza queued to be sent into its + relevant outgoing stream. If queue size reaches the limit (because, + for example, the receiver of stanzas is too slow), the FSM and the + corresponding connection (if any) will be terminated and error + message will be logged. The reasonable value for this option depends + on your hardware configuration. This option can be specified for + [`ejabberd_service`](listen.md#ejabberd_service) + and [`ejabberd_c2s`](listen.md#ejabberd_c2s) listeners, or also globally for - [`ejabberd_s2s_out`](/admin/configuration/listen/#ejabberd-s2s-out). + [`ejabberd_s2s_out`](listen.md#ejabberd_s2s_out). If the option is not specified for - `ejabberd_service` or `ejabberd_c2s` listeners, the globally - configured value is used. The allowed values are integers and - ’undefined’. Default value: ’10000’. + `ejabberd_service` or `ejabberd_c2s` listeners, the globally + configured value is used. The allowed values are integers and + ’undefined’. Default value: ’10000’. ## max_payload_size @@ -192,12 +187,12 @@ The default value is `infinity`. *Size* This option specifies an approximate maximum size in bytes of XML - stanzas. Approximate, because it is calculated with the precision of - one block of read data. For example `{max_stanza_size, 65536}`. The - default value is `infinity`. Recommended values are 65536 for c2s - connections and 131072 for s2s connections. s2s max stanza size must - always much higher than c2s limit. Change this value with extreme - care as it can cause unwanted disconnect if set too low. + stanzas. Approximate, because it is calculated with the precision of + one block of read data. For example `{max_stanza_size, 65536}`. The + default value is `infinity`. Recommended values are 65536 for c2s + connections and 131072 for s2s connections. s2s max stanza size must + always much higher than c2s limit. Change this value with extreme + care as it can cause unwanted disconnect if set too low. ## password @@ -205,12 +200,12 @@ This option specifies an approximate maximum size in bytes of XML Specify the password to verify an external component that connects to the port. -
improved in 20.07
- ## port *Port number, or unix domain socket path* + + Declares at which port/unix domain socket should be listening. Can be set to number between `1` and `65535` to listen on TCP or UDP socket, @@ -222,15 +217,15 @@ on unix domain socket `/path/to/socket`. *ProtocolOpts* List of general options relating to SSL/TLS. These map to - [`OpenSSL’s set_options()`](https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_options.html). - The default entry is: `"no_sslv3|cipher_server_preference|no_compression"` + [`OpenSSL’s set_options()`](https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_options.html). + The default entry is: `"no_sslv3|cipher_server_preference|no_compression"` Please note: if this option is set in -[`ejabberd_c2s`](/admin/configuration/listen/#ejabberd-c2s) -or [`ejabberd_s2s_in`](/admin/configuration/listen/#ejabberd-s2s-in) +[`ejabberd_c2s`](listen.md#ejabberd_c2s) +or [`ejabberd_s2s_in`](listen.md#ejabberd_s2s_in) and the corresponding top-level option is also set -([`c2s_protocol_options`](/admin/configuration/toplevel/#c2s-protocol-options), -[`s2s_protocol_options`](/admin/configuration/toplevel/#s2s-protocol-options)), +([`c2s_protocol_options`](toplevel.md#c2s_protocol_options), +[`s2s_protocol_options`](toplevel.md#s2s_protocol_options)), then the top-level option is used, not this one. ## request_handlers @@ -238,40 +233,42 @@ then the top-level option is used, not this one. *{Path: Module}* To define one or several handlers that will serve HTTP requests in -[`ejabberd_http`](/admin/configuration/listen/#ejabberd-http). The - Path is a string; so the URIs that start with that Path will be - served by Module. For example, if you want `mod_foo` to serve the - URIs that start with `/a/b/`, and you also want `mod_bosh` to - serve the URIs `/bosh/`, use this option: - - request_handlers: - /a/b: mod_foo - /bosh: mod_bosh - /mqtt: mod_mqtt - -
new in 21.07
+[`ejabberd_http`](listen.md#ejabberd_http). The + Path is a string; so the URIs that start with that Path will be + served by Module. For example, if you want `mod_foo` to serve the + URIs that start with `/a/b/`, and you also want `mod_bosh` to + serve the URIs `/bosh/`, use this option: + +``` yaml +request_handlers: + /a/b: mod_foo + /bosh: mod_bosh + /mqtt: mod_mqtt +``` ## send_timeout *Integer | infinity* + + Sets the longest time that data can wait to be accepted to sent by OS socket. Triggering this timeout will cause the server to close it. By default it's set to 15 seconds, expressed in milliseconds: 15000 ## shaper *none | ShaperName* -This option defines a shaper for the port (see section  -[Shapers](/admin/configuration/basic/#shapers)). - The default value is `none`. +This option defines a shaper for the port (see section +[Shapers](basic.md#shapers)). + The default value is `none`. ## shaper_rule *none | ShaperRule* This option defines a shaper rule for -[`ejabberd_service`](/admin/configuration/listen/#ejabberd-service) (see -section [Shapers](/admin/configuration/basic/#shapers)). +[`ejabberd_service`](listen.md#ejabberd_service) (see +section [Shapers](basic.md#shapers)). The recommended value is `fast`. ## starttls @@ -280,21 +277,18 @@ The recommended value is `fast`. This option specifies that STARTTLS encryption is available on connections to the port. You should also set the -[`certfiles`](/admin/configuration/toplevel/#certfiles) top-level option -or configure [ACME](/admin/configuration/basic/#acme). +[`certfiles`](toplevel.md#certfiles) top-level option +or configure [ACME](basic.md#acme). This option gets implicitly enabled when enabling -[`starttls_required`](#starttls-required) or [`tls_verify`](#tls-verify). +[`starttls_required`](#starttls_required) or [`tls_verify`](#tls_verify). ## starttls_required *true | false* -This option specifies that STARTTLS encryption is required on -connections to the port. No unencrypted connections will be allowed. -You should also set the -[`certfiles`](/admin/configuration/toplevel/#certfiles) top-level option -or configure [ACME](/admin/configuration/basic/#acme). +This option specifies that STARTTLS encryption is required on connections to the port. No unencrypted connections will be allowed. +You should also set the [`certfiles`](toplevel.md#certfiles) top-level option or configure [ACME](basic.md#acme). Enabling this option implicitly enables also the [`starttls`](#starttls) option. @@ -302,25 +296,24 @@ Enabling this option implicitly enables also the [`starttls`](#starttls) option. *String* -Allow specifying a tag in a `listen` section -and later use it to have a special -[`api_permissions`](/admin/configuration/toplevel/#api-permissions) -just for it. +Allow specifying a tag in a `listen` section and later use it to have a special [`api_permissions`](toplevel.md#api_permissions) just for it. For example: - listen: - - - port: 4000 - module: ejabberd_http - tag: "magic_listener" - - api_permissions: - "magic_access": - from: - - tag: "magic_listener" - who: all - what: "*" +``` yaml +listen: + - + port: 4000 + module: ejabberd_http + tag: "magic_listener" + +api_permissions: + "magic_access": + from: + - tag: "magic_listener" + who: all + what: "*" +``` The default value is the empty string: `""`. @@ -335,21 +328,21 @@ Timeout of the connections, expressed in milliseconds. Default: 5000 *true | false* This option specifies that traffic on the port will be encrypted - using SSL immediately after connecting. This was the traditional - encryption method in the early Jabber software, commonly on port - 5223 for client-to-server communications. But this method is - nowadays deprecated and not recommended. The preferable encryption - method is STARTTLS on port 5222, as defined - [`RFC 6120: XMPP Core`](https://xmpp.org/rfcs/rfc6120.html#tls), - which can be enabled in `ejabberd` with the option + using SSL immediately after connecting. This was the traditional + encryption method in the early Jabber software, commonly on port + 5223 for client-to-server communications. But this method is + nowadays deprecated and not recommended. The preferable encryption + method is STARTTLS on port 5222, as defined + [`RFC 6120: XMPP Core`](https://xmpp.org/rfcs/rfc6120.html#tls), + which can be enabled in `ejabberd` with the option [`starttls`](#starttls). If this option is set, you should also set the - [`certfiles`](/admin/configuration/toplevel/#certfiles) top-level - option or configure [ACME](/admin/configuration/basic/#acme). + [`certfiles`](toplevel.md#certfiles) top-level + option or configure [ACME](basic.md#acme). The option `tls` can also be used in - [`ejabberd_http`](/admin/configuration/listen/#ejabberd-http) + [`ejabberd_http`](listen.md#ejabberd_http) to support HTTPS. Enabling this option implicitly disables the [`starttls`](#starttls) option. @@ -359,14 +352,14 @@ Enabling this option implicitly disables the [`starttls`](#starttls) option. *true | false* Whether to enable or disable TLS compression. The default value is - `false`. + `false`. Please note: if this option is set in -[`ejabberd_c2s`](/admin/configuration/listen/#ejabberd-c2s) -or [`ejabberd_s2s_in`](/admin/configuration/listen/#ejabberd-s2s-in) +[`ejabberd_c2s`](listen.md#ejabberd_c2s) +or [`ejabberd_s2s_in`](listen.md#ejabberd_s2s_in) and the corresponding top-level option is also set -([`c2s_tls_compression`](/admin/configuration/toplevel/#c2s-tls-compression), -[`s2s_tls_compression`](/admin/configuration/toplevel/#s2s-tls-compression)), +([`c2s_tls_compression`](toplevel.md#c2s_tls_compression), +[`s2s_tls_compression`](toplevel.md#s2s_tls_compression)), then the top-level option is used, not this one. ## tls_verify @@ -397,5 +390,5 @@ Is this listener accessed by proxy service that is using *true | false* This option specifies that Zlib stream compression (as defined in - [`XEP-0138`](https://xmpp.org/extensions/xep-0138.html)) is available - on connections to the port. + [`XEP-0138`](https://xmpp.org/extensions/xep-0138.html)) is available + on connections to the port. diff --git a/content/admin/configuration/listen.md b/content/admin/configuration/listen.md index be7a0be8..0a422e74 100644 --- a/content/admin/configuration/listen.md +++ b/content/admin/configuration/listen.md @@ -1,319 +1,271 @@ ---- -title: Listen Modules -toc: true -menu: Listen Modules -order: 50 ---- +# Listen Modules -> This section describes the most recent ejabberd version. If you are using an old ejabberd release, please refer to the corresponding archived version of this page in the [Archive](/archive/). +> This section describes the most recent ejabberd version. If you are using an old ejabberd release, please refer to the corresponding archived version of this page in the [Archive](../../archive/index.md). -# Listen Option +## Listen Options -The **listen option** defines for which ports, addresses and network +The `listen` option defines for which ports, addresses and network protocols `ejabberd` will listen and what services will be run on them. + Each element of the list is an associative array with the following elements: -- Port, optionally also the IP address and/or a transport - protocol. +- **port**: *Number* -- Listening module that serves this port. + Defines which port number to listen for incoming connections: + it can be a Jabber/XMPP standard port or any other valid port number. -- Options for the TCP socket and for the listening module. + Alternatively, set the option to a string in form `"unix:/path/to/socket"` + to create and listen on a unix domain socket `/path/to/socket`. -For example: +- **ip**: *IpAddress* + The socket will listen only in that network interface. + Depending on the type of the IP address, IPv4 or IPv6 will be used. - listen: - - - port: 5222 - module: ejabberd_c2s - ip: 127.0.0.1 - starttls: true - - - port: 5269 - module: ejabberd_s2s_in - transport: tcp + It is possible to specify a generic address + (`"0.0.0.0"` for IPv4 or `"::"` for IPv6), + so `ejabberd` will listen in all addresses. + Note that on some operating systems and/or OS configurations, listening + on `"::"` will mean listening for IPv4 traffic as well as IPv6 traffic. + Some example values for IP address: -The **port** defines which port number to listen for incoming connections: -it can be a Jabber/XMPP standard port or any other valid port number. -Alternatively, set the option to a string in form `"unix:/path/to/socket"` -to create and listen on a unix domain socket `/path/to/socket`. + - `"0.0.0.0"` to listen in all IPv4 network interfaces. This is the + default value when the option is not specified. -The **IP address** can be represented as a string. The socket will listen -only in that network interface. It is possible to specify a generic -address ("0.0.0.0" for IPv4 or "::" for IPv6), so `ejabberd` will listen -in all addresses. Depending on the type of the IP address, IPv4 or IPv6 -will be used. When the IP address is not specified, it will listen on -all IPv4 network addresses. + - `"::"` to listen in all IPv6 network interfaces -Note that on some operating systems and/or OS configurations, listening -on "::" will mean listening for IPv4 traffic as well as IPv6 traffic. + - `"10.11.12.13"` is the IPv4 address `10.11.12.13` -Some example values for IP address: + - `"::FFFF:127.0.0.1"` is the IPv6 address `::FFFF:127.0.0.1/128` -- `"0.0.0.0"` to listen in all IPv4 network interfaces. This is the - default value when no IP is specified. +- **transport**: *tcp|udp* -- `"::"` to listen in all IPv6 network interfaces + Defines the transport protocol. Default is `tcp`. -- `"10.11.12.13"` is the IPv4 address `10.11.12.13` +- **module**: *ModuleName* -- `"::FFFF:127.0.0.1"` is the IPv6 address `::FFFF:127.0.0.1/128` + Listening module that serves this port -The **transport protocol** can be `tcp` or `udp`. Default is `tcp`. +- Any other options for the socket and for the listening module, described later. -# Summary of Listen Modules +For example: -The available modules, their purpose and the options allowed by each one -are: +``` yaml +listen: + - + port: 5222 + ip: 127.0.0.1 + module: ejabberd_c2s + starttls: true + - + port: 5269 + transport: tcp + module: ejabberd_s2s_in +``` ## ejabberd_c2s Handles c2s connections. -Options: -[access](/admin/configuration/listen-options/#access), -[cafile](/admin/configuration/listen-options/#cafile), -[ciphers](/admin/configuration/listen-options/#ciphers), -[dhfile](/admin/configuration/listen-options/#dhfile), -[max_fsm_queue](/admin/configuration/listen-options/#max-fsm-queue), -[max_stanza_size](/admin/configuration/listen-options/#max-stanza-size), -[protocol_options](/admin/configuration/listen-options/#protocol-options), -[send_timeout](/admin/configuration/listen-options/#send-timeout), -[shaper](/admin/configuration/listen-options/#shaper), -[starttls](/admin/configuration/listen-options/#starttls), -[starttls_required](/admin/configuration/listen-options/#starttls-required), -[tls](/admin/configuration/listen-options/#tls), -[tls_compression](/admin/configuration/listen-options/#tls-compression), -[tls_verify](/admin/configuration/listen-options/#tls-verify), -[zlib](/admin/configuration/listen-options/#zlib). +General listen options supported: +[access](listen-options.md#access), +[cafile](listen-options.md#cafile), +[ciphers](listen-options.md#ciphers), +[dhfile](listen-options.md#dhfile), +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_stanza_size](listen-options.md#max_stanza_size), +[protocol_options](listen-options.md#protocol_options), +[send_timeout](listen-options.md#send_timeout), +[shaper](listen-options.md#shaper), +[starttls](listen-options.md#starttls), +[starttls_required](listen-options.md#starttls_required), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls-compression), +[tls_verify](listen-options.md#tls_verify), +[zlib](listen-options.md#zlib). ## ejabberd_s2s_in Handles incoming s2s connections. -Options: -[cafile](/admin/configuration/listen-options/#cafile), -[ciphers](/admin/configuration/listen-options/#ciphers), -[dhfile](/admin/configuration/listen-options/#dhfile), -[max_fsm_queue](/admin/configuration/listen-options/#max-fsm-queue), -[max_stanza_size](/admin/configuration/listen-options/#max-stanza-size), -[protocol_options](/admin/configuration/listen-options/#protocol-options), -[send_timeout](/admin/configuration/listen-options/#send-timeout), -[shaper](/admin/configuration/listen-options/#shaper), -[tls](/admin/configuration/listen-options/#tls), -[tls_compression](/admin/configuration/listen-options/#tls-compression). +General listen options supported: +[cafile](listen-options.md#cafile), +[ciphers](listen-options.md#ciphers), +[dhfile](listen-options.md#dhfile), +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_stanza_size](listen-options.md#max_stanza_size), +[protocol_options](listen-options.md#protocol_options), +[send_timeout](listen-options.md#send_timeout), +[shaper](listen-options.md#shaper), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls-compression). ## ejabberd_service -Interacts with an - [`external component`](https://ejabberd.im/tutorials-transports) - (as defined in the Jabber Component Protocol - ([`XEP-0114`](https://xmpp.org/extensions/xep-0114.html)). +Interacts with an [`external component`](https://ejabberd.im/tutorials-transports) +as defined in [XEP-0114: Jabber Component Protocol](https://xmpp.org/extensions/xep-0114.html). + +General listen options supported: +[access](listen-options.md#access), +[cafile](listen-options.md#cafile), +[certfile](listen-options.md#certfile), +[check_from](listen-options.md#check_from), +[ciphers](listen-options.md#ciphers), +[dhfile](listen-options.md#dhfile), +[global_routes](listen-options.md#global_routes), +[hosts](listen-options.md#hosts), +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_stanza_size](listen-options.md#max_stanza_size), +[password](listen-options.md#password), +[protocol_options](listen-options.md#protocol_options), +[send_timeout](listen-options.md#send_timeout), +[shaper](listen-options.md#shaper), +[shaper_rule](listen-options.md#shaper-rule), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls-compression). -Options: -[access](/admin/configuration/listen-options/#access), -[cafile](/admin/configuration/listen-options/#cafile), -[certfile](/admin/configuration/listen-options/#certfile), -[check_from](/admin/configuration/listen-options/#check-from), -[ciphers](/admin/configuration/listen-options/#ciphers), -[dhfile](/admin/configuration/listen-options/#dhfile), -[global_routes](/admin/configuration/listen-options/#global-routes), -[hosts](/admin/configuration/listen-options/#hosts), -[max_fsm_queue](/admin/configuration/listen-options/#max-fsm-queue), -[max_stanza_size](/admin/configuration/listen-options/#max-stanza-size), -[password](/admin/configuration/listen-options/#password), -[protocol_options](/admin/configuration/listen-options/#protocol-options), -[send_timeout](/admin/configuration/listen-options/#send-timeout), -[shaper](/admin/configuration/listen-options/#shaper), -[shaper_rule](/admin/configuration/listen-options/#shaper-rule), -[tls](/admin/configuration/listen-options/#tls), -[tls_compression](/admin/configuration/listen-options/#tls-compression). +## mod_mqtt -## ejabberd_sip +Support for MQTT requires configuring `mod_mqtt` both in the +[listen](toplevel.md#listen) and the +[modules](toplevel.md#modules) sections. +Check the [mod_mqtt module](modules.md#mod_mqtt) options, +and the [MQTT Support](../guide/mqtt/index.md) section. + +General listen options supported: +[backlog](listen-options.md#backlog), +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_payload_size](listen-options.md#max_payload_size), +[send_timeout](listen-options.md#send_timeout), +[tls](listen-options.md#tls), +[tls_verify](listen-options.md#tls_verify). -Handles SIP requests as defined in - [`RFC 3261`](https://tools.ietf.org/html/rfc3261). + -For details please check the -[ejabberd_sip](/admin/configuration/listen/#ejabberd-sip-1) -and [mod_sip](/admin/configuration/modules/#mod-sip) sections. +## ejabberd_stun -General listener options: -[certfile](/admin/configuration/listen-options/#certfile), -[send_timeout](/admin/configuration/listen-options/#send-timeout), -[tls](/admin/configuration/listen-options/#tls). +`ejabberd` can act as a stand-alone STUN/TURN server, +and this module handles STUN/TURN requests as defined in +([`RFC 5389`](https://tools.ietf.org/html/rfc5389)/[`RFC 5766`](https://tools.ietf.org/html/rfc5766). +In that role `ejabberd` helps clients with ICE +([`RFC 5245`](https://tools.ietf.org/html/rfc5245) or Jingle ICE +([`XEP-0176`](https://xmpp.org/extensions/xep-0176.html) support to +discover their external addresses and ports and to relay media traffic +when it is impossible to establish direct peer-to-peer connection. -## ejabberd_stun +General listen options supported: +[certfile](listen-options.md#certfile), +[send_timeout](listen-options.md#send_timeout), +[shaper](listen-options.md#shaper), +[tls](listen-options.md#tls), -Handles STUN/TURN requests as defined in - [`RFC 5389`](https://tools.ietf.org/html/rfc5389) and - [`RFC 5766`](https://tools.ietf.org/html/rfc5766). - -For the specific module options, please check the -[ejabberd_stun](/admin/configuration/listen/#ejabberd-stun-1) section: -`auth_realm`, -`auth_type`, -`server_name`, -`turn_blacklist`, -`turn_ipv4_address`, -`turn_ipv6_address`, -`turn_max_allocations`, -`turn_max_permissions`, -`turn_max_port`, -`turn_min_port`, -`use_turn`. - -General listener options: -[certfile](/admin/configuration/listen-options/#certfile), -[send_timeout](/admin/configuration/listen-options/#send-timeout), -[shaper](/admin/configuration/listen-options/#shaper), -[tls](/admin/configuration/listen-options/#tls), +The specific `ejabberd_stun` configurable options are: -## ejabberd_http +- **auth_realm**: *String* -Handles incoming HTTP connections. + When `auth_type` is set to `user` and you have several virtual hosts + configured you should set this option explicitly to the virtual host + you want to serve on this particular listening port. + Implies `use_turn`. -With the proper request handlers configured, this serves HTTP services like -[ACME](/admin/configuration/basic/#acme), -[API](/admin/configuration/modules/#mod-http-api), -[BOSH](/admin/configuration/modules/#mod-bosh), -[CAPTCHA](/admin/configuration/basic/#captcha), -[Fileserver](/admin/configuration/modules/#mod-http-fileserver), -[OAuth](/developer/ejabberd-api/oauth/), -[RegisterWeb](/admin/configuration/modules/#mod-register-web), -[Upload](/admin/configuration/modules/#mod-http-upload), -[WebAdmin](/admin/guide/managing/#web-admin), -[WebSocket](/admin/configuration/listen/#ejabberd-http-ws), -[XML-RPC](/admin/configuration/listen/#ejabberd-xmlrpc). +- **auth_type**: *user|anonymous* -Options: -[cafile](/admin/configuration/listen-options/#cafile), -[ciphers](/admin/configuration/listen-options/#ciphers), -[custom_headers](/admin/configuration/listen-options/#custom-headers), -[default_host](/admin/configuration/listen-options/#default-host), -[dhfile](/admin/configuration/listen-options/#dhfile), -[protocol_options](/admin/configuration/listen-options/#protocol-options), -[request_handlers](/admin/configuration/listen-options/#request-handlers), -[send_timeout](/admin/configuration/listen-options/#send-timeout), -[tag](/admin/configuration/listen-options/#tag), -[tls](/admin/configuration/listen-options/#tls), -[tls_compression](/admin/configuration/listen-options/#tls-compression), -and the [trusted_proxies](/admin/configuration/toplevel/#trusted-proxies) top-level option. + Which authentication type to use for TURN allocation requests. + When type `user` is set, ejabberd authentication backend is used. + For `anonymous` type no authentication is performed (not recommended for public services). + The default is `user`. + Implies `use_turn`. -## mod_mqtt +- **shaper**: *Atom* -Support for MQTT requires configuring `mod_mqtt` both in the -[listen](/admin/configuration/toplevel/#listen) and the -[modules](/admin/configuration/toplevel/#modules) sections. -Check the [mod_mqtt module](/admin/configuration/modules/#mod-mqtt) options, -and the [MQTT Support](/admin/guide/mqtt/) section. - -Listen options: -[backlog](/admin/configuration/listen-options/#backlog), -[max_fsm_queue](/admin/configuration/listen-options/#max-fsm-queue), -[max_payload_size](/admin/configuration/listen-options/#max-payload-size), -[send_timeout](/admin/configuration/listen-options/#send-timeout), -[tls](/admin/configuration/listen-options/#tls), -[tls_verify](/admin/configuration/listen-options/#tls-verify). + For `tcp` transports defines shaper to use. + The default is `none`. - +- **server_name**: *String* -# ejabberd_stun + Defines software version to return with every response. + The default is the STUN library version. -`ejabberd` is able to act as a stand-alone STUN/TURN server -([`RFC 5389`](https://tools.ietf.org/html/rfc5389)/[`RFC 5766`](https://tools.ietf.org/html/rfc5766). -In that role `ejabberd` helps clients with ICE -([`RFC 5245`](https://tools.ietf.org/html/rfc5245) or Jingle ICE -([`XEP-0176`](https://xmpp.org/extensions/xep-0176.html) support to -discover their external addresses and ports and to relay media traffic -when it is impossible to establish direct peer-to-peer connection. +- **turn_blacklist**: *String | [String,...]* -The specific configurable options are: + Specify one or more IP addresses and/or subnet addresses/masks. + The TURN server will refuse to relay traffic from/to blacklisted IP addresses. + By default, loopback addresses (`127.0.0.0/8` and `::1/128`) are blacklisted. -**`tls: true|false`**: If enabled, `certfile` option must be set, otherwise `ejabberd` will - not be able to accept TLS connections. Obviously, this option makes - sense for `tcp` transport only. The default is `false`. +- **turn_ipv4_address**: *String* -**`certfile: Path`**: Path to the certificate file. Only makes sense when `tls` is set. + The IPv4 address advertised by your TURN server. + The address should not be NAT’ed or firewalled. + There is not default, so you should set this option explicitly. + Implies `use_turn`. -**`use_turn: true|false`**: Enables/disables TURN (media relay) functionality. The default is - `false`. +- **turn_ipv6_address**: *String* -**`turn_blacklist: String | [String,...]`**: Specify one or more IP addresses and/or subnet - addresses/masks. The TURN server will refuse to relay traffic from/to - blacklisted IP addresses. By default, loopback addresses (`127.0.0.0/8` - and `::1/128`) are blacklisted. + The IPv6 address advertised by your TURN server. + The address should not be NAT’ed or firewalled. + There is not default, so you should set this option explicitly. + Implies `use_turn`. -**`turn_ipv4_address: String`**: The IPv4 address advertised by your TURN server. - The address should not be NAT’ed or firewalled. There is not default, - so you should set this option explicitly. Implies `use_turn`. +- **turn_max_allocations**: *Integer|infinity* -**`turn_ipv6_address: String`**: The IPv6 address advertised by your TURN server. - The address should not be NAT’ed or firewalled. There is not default, - so you should set this option explicitly. Implies `use_turn`. + Maximum number of TURN allocations available from the particular IP address. + The default value is 10. Implies `use_turn`. -**`turn_min_port: Integer`**: Together with `turn_max_port` forms port range to allocate from. The - default is 49152. Implies `use_turn`. +- **turn_max_permissions**: *Integer|infinity* -**`turn_max_port: Integer`**: Together with `turn_min_port` forms port range to allocate from. The - default is 65535. Implies `use_turn`. + Maximum number of TURN permissions available from the particular IP address. + The default value is 10. + Implies `use_turn`. -**`turn_max_allocations: Integer|infinity`**: Maximum number of TURN allocations available from the particular IP - address. The default value is 10. Implies `use_turn`. +- **turn_max_port**: *Integer* -**`turn_max_permissions: Integer|infinity`**: Maximum number of TURN permissions available from the particular IP - address. The default value is 10. Implies `use_turn`. + Together with `turn_min_port` forms port range to allocate from. + The default is 65535. + Implies `use_turn`. -**`auth_type: user|anonymous`**: Which authentication type to use for TURN allocation requests. When - type `user` is set, ejabberd authentication backend is used. For - `anonymous` type no authentication is performed (not recommended for - public services). The default is `user`. Implies `use_turn`. +- **turn_min_port**: *Integer* -**`auth_realm: String`**: When `auth_type` is set to `user` and you have several virtual hosts - configured you should set this option explicitly to the virtual host - you want to serve on this particular listening port. Implies - `use_turn`. + Together with `turn_max_port` forms port range to allocate from. + The default is 49152. + Implies `use_turn`. -**`shaper: Atom`**: For `tcp` transports defines shaper to use. The default is `none`. +- **use_turn**: *true|false* -**`server_name: String`**: Defines software version to return with every response. The default - is the STUN library version. + Enables/disables TURN (media relay) functionality. + The default is `false`. Example configuration with disabled TURN functionality (STUN only): - - listen: - ... - - - port: 3478 - transport: udp - module: ejabberd_stun - - - port: 3478 - module: ejabberd_stun - - - port: 5349 - module: ejabberd_stun - certfile: /etc/ejabberd/server.pem - ... +``` yaml +listen: + - + port: 3478 + transport: udp + module: ejabberd_stun + - + port: 3478 + module: ejabberd_stun + - + port: 5349 + module: ejabberd_stun + certfile: /etc/ejabberd/server.pem +``` Example configuration with TURN functionality. Note that STUN is always enabled if TURN is enabled. Here, only UDP section is shown: - - listen: - ... - - - port: 3478 - transport: udp - use_turn: true - turn_ipv4_address: 10.20.30.1 - module: ejabberd_stun - ... +``` yaml +listen: + - + port: 3478 + transport: udp + use_turn: true + turn_ipv4_address: 10.20.30.1 + module: ejabberd_stun +``` You also need to configure DNS SRV records properly so clients can easily discover a STUN/TURN server serving your XMPP domain. Refer to @@ -325,51 +277,61 @@ of [`RFC 5766`](https://tools.ietf.org/html/rfc5766) for details. Example DNS SRV configuration for STUN only: - _stun._udp IN SRV 0 0 3478 stun.example.com. - _stun._tcp IN SRV 0 0 3478 stun.example.com. - _stuns._tcp IN SRV 0 0 5349 stun.example.com. +``` sh +_stun._udp IN SRV 0 0 3478 stun.example.com. +_stun._tcp IN SRV 0 0 3478 stun.example.com. +_stuns._tcp IN SRV 0 0 5349 stun.example.com. +``` And you should also add these in the case if TURN is enabled: - _turn._udp IN SRV 0 0 3478 turn.example.com. - _turn._tcp IN SRV 0 0 3478 turn.example.com. - _turns._tcp IN SRV 0 0 5349 turn.example.com. +``` sh +_turn._udp IN SRV 0 0 3478 turn.example.com. +_turn._tcp IN SRV 0 0 3478 turn.example.com. +_turns._tcp IN SRV 0 0 5349 turn.example.com. +``` + +## ejabberd_sip -# ejabberd_sip -## SIP Configuration +`ejabberd` has built-in support to handle SIP requests +as defined in [`RFC 3261`](https://tools.ietf.org/html/rfc3261). -`ejabberd` has built-in SIP support. To activate this feature, -add the [`ejabberd_sip`](#ejabberd-sip) listen module, enable -[`mod_sip`](/admin/configuration/modules/#mod-sip) module +To activate this feature, +add the [`ejabberd_sip`](#ejabberd_sip) listen module, enable +[`mod_sip`](modules.md#mod_sip) module for the desired virtual host, and configure DNS properly. To add a listener you should configure `ejabberd_sip` listening module -as described in [Listen](#listen-option) section. -If option [`tls`](/admin/configuration/listen-options/#tls) is specified, -option [`certfile`](/admin/configuration/listen-options/#certfile) +as described in [Listen](#listen-options) section. +If option [`tls`](listen-options.md#tls) is specified, +option [`certfile`](listen-options.md#certfile) must be specified as well, otherwise incoming TLS connections would fail. +General listen options supported: +[certfile](listen-options.md#certfile), +[send_timeout](listen-options.md#send_timeout), +[tls](listen-options.md#tls). + Example configuration with standard ports (as per [`RFC 3261`](https://tools.ietf.org/html/rfc3261)): - - listen: - ... - - - port: 5060 - transport: udp - module: ejabberd_sip - - - port: 5060 - module: ejabberd_sip - - - port: 5061 - module: ejabberd_sip - tls: true - certfile: /etc/ejabberd/server.pem - ... +``` yaml +listen: + - + port: 5060 + transport: udp + module: ejabberd_sip + - + port: 5060 + module: ejabberd_sip + - + port: 5061 + module: ejabberd_sip + tls: true + certfile: /etc/ejabberd/server.pem +``` Note that there is no StartTLS support in SIP and [`SNI`](https://en.wikipedia.org/wiki/Server_Name_Indication) support is @@ -386,52 +348,84 @@ recommended. Example configuration of NAPTR records: - example.com IN NAPTR 10 0 "s" "SIPS+D2T" "" _sips._tcp.example.com. - example.com IN NAPTR 20 0 "s" "SIP+D2T" "" _sip._tcp.example.com. - example.com IN NAPTR 30 0 "s" "SIP+D2U" "" _sip._udp.example.com. +``` sh +example.com IN NAPTR 10 0 "s" "SIPS+D2T" "" _sips._tcp.example.com. +example.com IN NAPTR 20 0 "s" "SIP+D2T" "" _sip._tcp.example.com. +example.com IN NAPTR 30 0 "s" "SIP+D2U" "" _sip._udp.example.com. +``` Example configuration of SRV records with standard ports (as per [`RFC 3261`](https://tools.ietf.org/html/rfc3261): - _sip._udp IN SRV 0 0 5060 sip.example.com. - _sip._tcp IN SRV 0 0 5060 sip.example.com. - _sips._tcp IN SRV 0 0 5061 sip.example.com. +``` sh +_sip._udp IN SRV 0 0 5060 sip.example.com. +_sip._tcp IN SRV 0 0 5060 sip.example.com. +_sips._tcp IN SRV 0 0 5061 sip.example.com. +``` + +!!! warning + + SIP authentication does not support SCRAM. As such, it is not possible + to use `mod_sip` to authenticate when ejabberd has been set to encrypt + password with SCRAM. + +## ejabberd_http -## Note on SIP usage +Handles incoming HTTP connections. -SIP authentication does not support SCRAM. As such, it is not possible -to use `mod_sip` to authenticate when ejabberd has been set to encrypt -password with SCRAM. +With the proper request handlers configured, this serves HTTP services like +[ACME](basic.md#acme), +[API](modules.md#mod_http_api), +[BOSH](modules.md#mod_bosh), +[CAPTCHA](basic.md#captcha), +[Fileserver](modules.md#mod_http_fileserver), +[OAuth](../../developer/ejabberd-api/oauth.md), +[RegisterWeb](modules.md#mod_register_web), +[Upload](modules.md#mod_http_upload), +[WebAdmin](../guide/managing.md#web-admin), +[WebSocket](#ejabberd_http_ws), +[XML-RPC](#ejabberd_xmlrpc). -# ejabberd_http_ws +Options: +[cafile](listen-options.md#cafile), +[ciphers](listen-options.md#ciphers), +[custom_headers](listen-options.md#custom_headers), +[default_host](listen-options.md#default_host), +[dhfile](listen-options.md#dhfile), +[protocol_options](listen-options.md#protocol_options), +[request_handlers](listen-options.md#request_handlers), +[send_timeout](listen-options.md#send_timeout), +[tag](listen-options.md#tag), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls-compression), +and the [trusted_proxies](toplevel.md#trusted_proxies) top-level option. + +### ejabberd_http_ws This module enables XMPP communication over WebSocket connection as described in [`RFC 7395`](https://tools.ietf.org/html/rfc7395). -## WebSocket Config +#### WebSocket Config To enable WebSocket, simply add a handler to the `request_handlers` section of an `ejabberd_http` listener: - listen: - ... - - - port: 5280 - module: ejabberd_http - request_handlers: - ... - /xmpp: ejabberd_http_ws - ... - ... - +``` yaml +listen: + - + port: 5280 + module: ejabberd_http + request_handlers: + /xmpp: ejabberd_http_ws +``` This module can be configured using those top-level options: -- [websocket\_origin](/admin/configuration/toplevel/#websocket-origin) -- [websocket\_ping\_interval](/admin/configuration/toplevel/#websocket-ping-interval) -- [websocket\_timeout](/admin/configuration/toplevel/#websocket-timeout) +- [websocket\_origin](toplevel.md#websocket_origin) +- [websocket\_ping\_interval](toplevel.md#websocket_ping_interval) +- [websocket\_timeout](toplevel.md#websocket_timeout) -## WebSocket Discovery +#### WebSocket Discovery With the example configuration previously mentioned, the WebSocket URL would be: `ws://localhost:5280/xmpp` @@ -440,27 +434,27 @@ You may want to provide a `host-meta` file so clients can easily discover WebSocket service for your XMPP domain (see [XEP-0156](https://xmpp.org/extensions/xep-0156.html#http)). One easy way to provide that file is using -[`mod_host_meta`](/admin/configuration/modules/#mod-host-meta). +[`mod_host_meta`](modules.md#mod_host_meta). -## Testing WebSocket +#### Testing WebSocket A test client can be found on Github: [WebSocket test client](https://github.com/processone/xmpp-websocket-client) There is an example configuration for WebSocket and Converse.js in the -[ejabberd 21.12 release notes](https://www.process-one.net/blog/ejabberd-21-12/). +ejabberd [21.12](../../archive/21.12/index.md) release notes. -# ejabberd_xmlrpc +### ejabberd_xmlrpc Handles XML-RPC requests to execute -[ejabberd commands](/admin/guide/managing/#ejabberd-commands). +[ejabberd commands](../guide/managing.md#ejabberd_commands). It is configured as a request handler in -[ejabberd_http](/admin/configuration/listen/#ejabberd-http). +[ejabberd_http](#ejabberd_http). This is the minimum configuration required to enable the feature: -```yaml +``` yaml listen: - port: 5280 @@ -478,7 +472,7 @@ api_permissions: Example Python3 script: -```python +``` python import xmlrpc.client server = xmlrpc.client.ServerProxy("http://127.0.0.1:5280/xmlrpc/"); print(server.connected_users_number()) @@ -486,11 +480,11 @@ print(server.connected_users_number()) By default there is no restriction to who can execute what commands, so it is strongly recommended that you configure restrictions using -[API Permissions](/developer/ejabberd-api/permissions/). +[API Permissions](../../developer/ejabberd-api/permissions.md). This example configuration adds some restrictions (only requests from localhost are accepted, the XML-RPC query must include authentication credentials of a specific account registered in ejabberd, and only two commands are accepted): -```yaml +``` yaml listen: - port: 5280 @@ -512,7 +506,7 @@ api_permissions: Example Python3 script for that restricted configuration: -```python +``` python import xmlrpc.client server = xmlrpc.client.ServerProxy("http://127.0.0.1:5280/xmlrpc/"); @@ -533,296 +527,291 @@ print(calling('registered_users', params)) Please notice, when using the old Python2, replace the two first lines with: -```python +``` python import xmlrpclib server = xmlrpclib.Server("http://127.0.0.1:5280/xmlrpc/"); ``` It's possible to use OAuth for authentication instead of plain password, see -[OAuth Support](/developer/ejabberd-api/oauth/). +[OAuth Support](../../developer/ejabberd-api/oauth.md). -In ejabberd 20.03 and older, it was possible to configure `ejabberd_xmlrpc` as a +In ejabberd [20.03](../../archive/20.03/index.md) and older, +it was possible to configure `ejabberd_xmlrpc` as a listener, see the old document for reference and example configuration: -[Listening Module](/admin/configuration/old/#listening-module). +[Listening Module](../../archive/old.md#listening_module). Just for reference, there's also the old [`ejabberd_xmlrpc documentation`](https://ejabberd.im/ejabberd_xmlrpc) with example clients in other languages. -# Examples +## Examples For example, the following simple configuration defines: -- There are three domains. The default certificate file is - `server.pem`. However, the c2s and s2s connections to the domain - `example.com` use the file `example_com.pem`. - -- Port 5222 listens for c2s connections with STARTTLS, and also allows - plain connections for old clients. - -- Port 5223 listens for c2s connections with the old SSL. - -- Port 5269 listens for s2s connections with STARTTLS. The socket is - set for IPv6 instead of IPv4. - -- Port 3478 listens for STUN requests over UDP. - -- Port 5280 listens for HTTP requests, and serves the HTTP-Bind (BOSH) - service. - -- Port 5281 listens for HTTP requests, using HTTPS to serve HTTP-Bind - (BOSH) and the Web Admin as explained in [Managing: Web Admin](/admin/guide/managing/#web-admin). The - socket only listens connections to the IP address 127.0.0.1. - - - hosts: - - example.com - - example.org - - example.net - - certfiles: - - /etc/ejabberd/server.pem - - /etc/ejabberd/example_com.pem - - listen: - - - port: 5222 - module: ejabberd_c2s - access: c2s - shaper: c2s_shaper - starttls: true - max_stanza_size: 65536 - - - port: 5223 - module: ejabberd_c2s - access: c2s - shaper: c2s_shaper - tls: true - max_stanza_size: 65536 - - - port: 5269 - ip: "::" - module: ejabberd_s2s_in - shaper: s2s_shaper - max_stanza_size: 131072 - - - port: 3478 - transport: udp - module: ejabberd_stun - - - port: 5280 - module: ejabberd_http - request_handlers: - /bosh: mod_bosh - - - port: 5281 - ip: 127.0.0.1 - module: ejabberd_http - tls: true - request_handlers: - /admin: ejabberd_web_admin - /bosh: mod_bosh - - s2s_use_starttls: optional - outgoing_s2s_families: - - ipv4 - - ipv6 - outgoing_s2s_timeout: 10000 - trusted_proxies: [127.0.0.1, 192.168.1.11] +- There are three domains. The default certificate file is `server.pem`. However, the c2s and s2s connections to the domain `example.com` use the file `example_com.pem`. +- Port 5222 listens for c2s connections with STARTTLS, and also allows plain connections for old clients. -In this example, the following configuration defines that: +- Port 5223 listens for c2s connections with the old SSL. + +- Port 5269 listens for s2s connections with STARTTLS. The socket is set for IPv6 instead of IPv4. + +- Port 3478 listens for STUN requests over UDP. + +- Port 5280 listens for HTTP requests, and serves the HTTP-Bind (BOSH) service. -- c2s connections are listened for on port 5222 (all IPv4 addresses) - and on port 5223 (SSL, IP 192.168.0.1 and fdca:8ab6:a243:75ef::1) - and denied for the user called ‘`bad`’. - -- s2s connections are listened for on port 5269 (all IPv4 addresses) - with STARTTLS for secured traffic strictly required, and the - certificates are verified. Incoming and outgoing connections of - remote XMPP servers are denied, only two servers can connect: - “jabber.example.org” and “example.com”. - -- Port 5280 is serving the Web Admin and the HTTP-Bind (BOSH) service in - all the IPv4 addresses. Note that it is also possible to serve them - on different ports. The second example in section [Managing: Web Admin](/admin/guide/managing/#web-admin) shows - how exactly this can be done. A request handler to serve MQTT over WebSocket is also defined. - -- All users except for the administrators have a traffic of limit - 1,000Bytes/second - -- The [`AIM transport`](https://ejabberd.im/pyaimt) - `aim.example.org` is connected to port 5233 on localhost IP - addresses (127.0.0.1 and ::1) with password ‘`aimsecret`’. - -- The ICQ transport JIT (`icq.example.org` and `sms.example.org`) is - connected to port 5234 with password ‘`jitsecret`’. - -- The [`MSN transport`](https://ejabberd.im/pymsnt) - `msn.example.org` is connected to port 5235 with password - ‘`msnsecret`’. - -- The [`Yahoo! transport`](https://ejabberd.im/yahoo-transport-2) - `yahoo.example.org` is connected to port 5236 with password - ‘`yahoosecret`’. - -- The - [`Gadu-Gadu transport`](https://ejabberd.im/jabber-gg-transport) - `gg.example.org` is connected to port 5237 with password - ‘`ggsecret`’. - -- The [`Jabber Mail Component`](https://ejabberd.im/jmc) - `jmc.example.org` is connected to port 5238 with password - ‘`jmcsecret`’. - -- The service custom has enabled the special option to avoiding - checking the `from` attribute in the packets send by this component. - The component can send packets in behalf of any users from the - server, or even on behalf of any server. - - - acl: - blocked: - user: bad - trusted_servers: - server: - - example.com - - jabber.example.org - xmlrpc_bot: - user: - - xmlrpc-robot@example.org - shaper: - normal: 1000 - shaper_rules: - c2s_shaper: - - none: admin - - normal - access_rules: - c2s: - - deny: blocked - - allow - xmlrpc_access: - - allow: xmlrpc_bot - s2s: - - allow: trusted_servers - certfiles: - - /path/to/ssl.pem - s2s_access: s2s - s2s_use_starttls: required_trusted - listen: - - - port: 5222 - module: ejabberd_c2s - shaper: c2s_shaper - access: c2s - - - ip: 192.168.0.1 - port: 5223 - module: ejabberd_c2s - tls: true - access: c2s - - - ip: "FDCA:8AB6:A243:75EF::1" - port: 5223 - module: ejabberd_c2s - tls: true - access: c2s - - - port: 5269 - module: ejabberd_s2s_in - - - port: 5280 - module: ejabberd_http - request_handlers: - /admin: ejabberd_web_admin - /bosh: mod_bosh - /mqtt: mod_mqtt - - - port: 4560 - module: ejabberd_xmlrpc - access_commands: {} - - - ip: 127.0.0.1 - port: 5233 - module: ejabberd_service - hosts: - aim.example.org: - password: aimsecret - - - ip: "::1" - port: 5233 - module: ejabberd_service - hosts: - aim.example.org: - password: aimsecret - - - port: 5234 - module: ejabberd_service - hosts: - icq.example.org: - password: jitsecret - sms.example.org: - password: jitsecret - - - port: 5235 - module: ejabberd_service - hosts: - msn.example.org: - password: msnsecret - - - port: 5236 - module: ejabberd_service - password: yahoosecret - - - port: 5237 - module: ejabberd_service - hosts: - gg.example.org: - password: ggsecret - - - port: 5238 - module: ejabberd_service - hosts: - jmc.example.org: - password: jmcsecret - - - port: 5239 - module: ejabberd_service - check_from: false - hosts: - custom.example.org: - password: customsecret +- Port 5281 listens for HTTP requests, using HTTPS to serve HTTP-Bind (BOSH) and the Web Admin as explained in [Managing: Web Admin](../guide/managing.md#web-admin). The socket only listens connections to the IP address 127.0.0.1. +``` yaml +hosts: + - example.com + - example.org + - example.net + +certfiles: + - /etc/ejabberd/server.pem + - /etc/ejabberd/example_com.pem + +listen: + - + port: 5222 + module: ejabberd_c2s + access: c2s + shaper: c2s_shaper + starttls: true + max_stanza_size: 65536 + - + port: 5223 + module: ejabberd_c2s + access: c2s + shaper: c2s_shaper + tls: true + max_stanza_size: 65536 + - + port: 5269 + ip: "::" + module: ejabberd_s2s_in + shaper: s2s_shaper + max_stanza_size: 131072 + - + port: 3478 + transport: udp + module: ejabberd_stun + - + port: 5280 + module: ejabberd_http + request_handlers: + /bosh: mod_bosh + - + port: 5281 + ip: 127.0.0.1 + module: ejabberd_http + tls: true + request_handlers: + /admin: ejabberd_web_admin + /bosh: mod_bosh + +s2s_use_starttls: optional +outgoing_s2s_families: + - ipv4 + - ipv6 +outgoing_s2s_timeout: 10000 +trusted_proxies: [127.0.0.1, 192.168.1.11] +``` + +In this example, the following configuration defines that: + +- c2s connections are listened for on port 5222 (all IPv4 addresses) + and on port 5223 (SSL, IP 192.168.0.1 and fdca:8ab6:a243:75ef::1) + and denied for the user called ‘`bad`’. + +- s2s connections are listened for on port 5269 (all IPv4 addresses) + with STARTTLS for secured traffic strictly required, and the + certificates are verified. Incoming and outgoing connections of + remote XMPP servers are denied, only two servers can connect: + “jabber.example.org” and “example.com”. + +- Port 5280 is serving the Web Admin and the HTTP-Bind (BOSH) service in + all the IPv4 addresses. Note that it is also possible to serve them + on different ports. The second example in section [Managing: Web Admin](../guide/managing.md#web-admin) shows + how exactly this can be done. A request handler to serve MQTT over WebSocket is also defined. + +- All users except for the administrators have a traffic of limit + 1,000Bytes/second + +- The [`AIM transport`](https://ejabberd.im/pyaimt) + `aim.example.org` is connected to port 5233 on localhost IP + addresses (127.0.0.1 and ::1) with password ‘`aimsecret`’. + +- The ICQ transport JIT (`icq.example.org` and `sms.example.org`) is + connected to port 5234 with password ‘`jitsecret`’. + +- The [`MSN transport`](https://ejabberd.im/pymsnt) + `msn.example.org` is connected to port 5235 with password + ‘`msnsecret`’. + +- The [`Yahoo! transport`](https://ejabberd.im/yahoo-transport-2) + `yahoo.example.org` is connected to port 5236 with password + ‘`yahoosecret`’. + +- The + [`Gadu-Gadu transport`](https://ejabberd.im/jabber-gg-transport) + `gg.example.org` is connected to port 5237 with password + ‘`ggsecret`’. + +- The [`Jabber Mail Component`](https://ejabberd.im/jmc) + `jmc.example.org` is connected to port 5238 with password + ‘`jmcsecret`’. + +- The service custom has enabled the special option to avoiding + checking the `from` attribute in the packets send by this component. + The component can send packets in behalf of any users from the + server, or even on behalf of any server. + +``` yaml +acl: + blocked: + user: bad + trusted_servers: + server: + - example.com + - jabber.example.org + xmlrpc_bot: + user: + - xmlrpc-robot@example.org +shaper: + normal: 1000 +shaper_rules: + c2s_shaper: + - none: admin + - normal +access_rules: + c2s: + - deny: blocked + - allow + xmlrpc_access: + - allow: xmlrpc_bot + s2s: + - allow: trusted_servers +certfiles: + - /path/to/ssl.pem +s2s_access: s2s +s2s_use_starttls: required_trusted +listen: + - + port: 5222 + module: ejabberd_c2s + shaper: c2s_shaper + access: c2s + - + ip: 192.168.0.1 + port: 5223 + module: ejabberd_c2s + tls: true + access: c2s + - + ip: "FDCA:8AB6:A243:75EF::1" + port: 5223 + module: ejabberd_c2s + tls: true + access: c2s + - + port: 5269 + module: ejabberd_s2s_in + - + port: 5280 + module: ejabberd_http + request_handlers: + /admin: ejabberd_web_admin + /bosh: mod_bosh + /mqtt: mod_mqtt + - + port: 4560 + module: ejabberd_xmlrpc + access_commands: {} + - + ip: 127.0.0.1 + port: 5233 + module: ejabberd_service + hosts: + aim.example.org: + password: aimsecret + - + ip: "::1" + port: 5233 + module: ejabberd_service + hosts: + aim.example.org: + password: aimsecret + - + port: 5234 + module: ejabberd_service + hosts: + icq.example.org: + password: jitsecret + sms.example.org: + password: jitsecret + - + port: 5235 + module: ejabberd_service + hosts: + msn.example.org: + password: msnsecret + - + port: 5236 + module: ejabberd_service + password: yahoosecret + - + port: 5237 + module: ejabberd_service + hosts: + gg.example.org: + password: ggsecret + - + port: 5238 + module: ejabberd_service + hosts: + jmc.example.org: + password: jmcsecret + - + port: 5239 + module: ejabberd_service + check_from: false + hosts: + custom.example.org: + password: customsecret +``` Note, that for services based in jabberd14 or WPJabber you have to make the transports log and do XDB by themselves: - - - - - - - %d: [%t] (%h): %s - /var/log/jabber/service.log - - - - - - - - - /usr/lib/jabber/xdb_file.so - - - /var/spool/jabber - - +``` xml + + + + + + %d: [%t] (%h): %s + /var/log/jabber/service.log + + + + + + + + + /usr/lib/jabber/xdb_file.so + + + /var/spool/jabber + + +``` diff --git a/content/admin/configuration/modules.md b/content/admin/configuration/modules.md index efc3e16e..b3a70582 100644 --- a/content/admin/configuration/modules.md +++ b/content/admin/configuration/modules.md @@ -1,11 +1,7 @@ ---- -title: Modules Options -toc: true -menu: Modules Opts -order: 95 ---- +# Modules Options -> This section describes options of all ejabberd modules. If you are using an old ejabberd release, please refer to the corresponding archived version of this page in the [Archive](/archive/). +> This section describes modules options of ejabberd [24.06](../../archive/24.06/index.md). If you are using an old ejabberd release, please refer to the corresponding archived version of this page in the [Archive](../../archive/index.md). The modules +that changed in this version are marked with 🟤. mod\_adhoc ---------- @@ -27,7 +23,7 @@ This module provides additional administrative commands. Details for some commands: -- *ban-acount*: This command kicks all the connected sessions of the +- *ban\_account*: This command kicks all the connected sessions of the account from the server. It also changes their password to a randomly generated one, so they can’t login anymore unless a server administrator changes their password again. It is possible to define @@ -36,13 +32,13 @@ Details for some commands: - *pushroster*: (and *pushroster-all*) The roster file must be placed, if using Windows, on the directory where you installed ejabberd: - C:/Program Files/ejabberd or similar. If you use other Operating + `C:/Program Files/ejabberd` or similar. If you use other Operating System, place the file on the same directory where the .beam files are installed. See below an example roster file. -- *srg-create*: If you want to put a group Name with blankspaces, use - the characters "' and '" to define when the Name starts and ends. - See an example below. +- *srg\_create*: If you want to put a group Name with blank spaces, + use the characters "' and '" to define when the Name starts and + ends. See an example below. The module has no options. @@ -51,42 +47,50 @@ __Examples:__ With this configuration, vCards can only be modified with mod\_admin\_extra commands: - acl: - adminextraresource: - - resource: "modadminextraf8x,31ad" - access_rules: - vcard_set: - - allow: adminextraresource - modules: - mod_admin_extra: {} - mod_vcard: - access_set: vcard_set +~~~ yaml +acl: + adminextraresource: + - resource: "modadminextraf8x,31ad" +access_rules: + vcard_set: + - allow: adminextraresource +modules: + mod_admin_extra: {} + mod_vcard: + access_set: vcard_set +~~~ Content of roster file for *pushroster* command: - [{<<"bob">>, <<"example.org">>, <<"workers">>, <<"Bob">>}, - {<<"mart">>, <<"example.org">>, <<"workers">>, <<"Mart">>}, - {<<"Rich">>, <<"example.org">>, <<"bosses">>, <<"Rich">>}]. +~~~ yaml +[{<<"bob">>, <<"example.org">>, <<"workers">>, <<"Bob">>}, +{<<"mart">>, <<"example.org">>, <<"workers">>, <<"Mart">>}, +{<<"Rich">>, <<"example.org">>, <<"bosses">>, <<"Rich">>}]. +~~~ With this call, the sessions of the local account which JID is will be kicked, and its password will be set to something like *BANNED\_ACCOUNT—20080425T21:45:07—2176635—Spammed\_rooms* - ejabberdctl vhost example.org ban-account boby "Spammed rooms" +~~~ yaml +ejabberdctl vhost example.org ban_account boby "Spammed rooms" +~~~ -Call to srg-create using double-quotes and single-quotes: +Call to srg\_create using double-quotes and single-quotes: - ejabberdctl srg-create g1 example.org "'Group number 1'" this_is_g1 g1 +~~~ yaml +ejabberdctl srg_create g1 example.org "'Group number 1'" this_is_g1 g1 +~~~ mod\_admin\_update\_sql ----------------------- This module can be used to update existing SQL database from the default -to the new schema. Check the section [Default and New -Schemas](/admin/configuration/database/#default-and-new-schemas) for details. -Please note that only MS SQL, MySQL, and PostgreSQL are supported. When -the module is loaded use [update_sql](/developer/ejabberd-api/admin-api/#update-sql) API. +to the new schema. Check the section +[Default and New Schemas](database.md#default-and-new-schemas) for +details. Please note that only MS SQL, MySQL, and PostgreSQL are +supported. When the module is loaded use [update_sql](../../developer/ejabberd-api/admin-api.md#update_sql) API. The module has no options. @@ -103,7 +107,7 @@ it may broadcast a lot of messages. This module should be disabled for instances of ejabberd with hundreds of thousands users. The Ad-hoc Commands are listed in the Server Discovery. For this feature -to work, [mod_adhoc](/admin/configuration/modules/#mod-adhoc) must be enabled. +to work, [mod_adhoc](#mod_adhoc) must be enabled. The specific JIDs where messages can be sent are listed below. The first JID in each entry will apply only to the specified virtual host @@ -115,7 +119,7 @@ hosts in ejabberd: connected to several resources, only the resource with the highest priority will receive the message. If the registered user is not connected, the message will be stored offline in assumption that - offline storage (see [mod_offline](/admin/configuration/modules/#mod-offline)) is enabled. + offline storage (see [mod_offline](#mod_offline)) is enabled. - example.org/announce/online (example.org/announce/all-hosts/online):: The message is sent to all @@ -144,23 +148,23 @@ the message of the day. The default value is *none* (i.e. nobody is able to send such messages). - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/admin/configuration/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/admin/configuration/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/admin/configuration/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/admin/configuration/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/admin/configuration/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_avatar ----------- @@ -173,8 +177,8 @@ Conversion](https://xmpp.org/extensions/xep-0398.html). Also, the module supports conversion between avatar image formats on the fly. -The module depends on [mod_vcard](/admin/configuration/modules/#mod-vcard), [mod_vcard_xupdate](/admin/configuration/modules/#mod-vcard-xupdate) and -[mod_pubsub](/admin/configuration/modules/#mod-pubsub). +The module depends on [mod_vcard](#mod_vcard), [mod_vcard_xupdate](#mod_vcard_xupdate) and +[mod_pubsub](#mod_pubsub). __Available options:__ @@ -186,9 +190,11 @@ compile time depending on the image libraries installed in the system. **Example**: - convert: - webp: jpg - default: png + ~~~ yaml + convert: + webp: jpg + default: png + ~~~ - **rate\_limit**: *Number* Limit any given JID by the number of avatars it is able to convert per @@ -224,7 +230,7 @@ subscription present. The default value is *true*. - **captcha**: *true | false* Whether to generate CAPTCHA or not in response to messages from -strangers. See also section [CAPTCHA](/admin/configuration/#captcha) of the +strangers. See also section [CAPTCHA](basic.md#captcha) of the Configuration Guide. The default value is *false*. - **drop**: *true | false* @@ -261,15 +267,15 @@ while having to get through an HTTP proxy. __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/admin/configuration/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/admin/configuration/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/admin/configuration/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **json**: *true | false* @@ -293,30 +299,32 @@ authentication. Basically, it creates a new session with anonymous authentication. The default value is *false*. - **queue\_type**: *ram | file* -Same as top-level [queue_type](/admin/configuration/toplevel/#queue-type) option, but applied to this module +Same as top-level [queue_type](toplevel.md#queue_type) option, but applied to this module only. - **ram\_db\_type**: *mnesia | sql | redis* -Same as top-level [default_ram_db](/admin/configuration/toplevel/#default-ram-db) option, but applied to this module +Same as top-level [default_ram_db](toplevel.md#default_ram_db) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/admin/configuration/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. __**Example**:__ - listen: - - - port: 5222 - module: ejabberd_c2s - - - port: 5443 - module: ejabberd_http - request_handlers: - /bosh: mod_bosh - - modules: - mod_bosh: {} +~~~ yaml +listen: + - + port: 5222 + module: ejabberd_c2s + - + port: 5443 + module: ejabberd_http + request_handlers: + /bosh: mod_bosh + +modules: + mod_bosh: {} +~~~ mod\_caps --------- @@ -324,28 +332,28 @@ mod\_caps This module implements [XEP-0115: Entity Capabilities](https://xmpp.org/extensions/xep-0115.html). The main purpose of the module is to provide PEP functionality (see -[mod_pubsub](/admin/configuration/modules/#mod-pubsub)). +[mod_pubsub](#mod_pubsub)). __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/admin/configuration/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/admin/configuration/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/admin/configuration/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/admin/configuration/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/admin/configuration/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_carboncopy --------------- @@ -391,27 +399,28 @@ mod\_configure -------------- The module provides server configuration functionality via [XEP-0050: -Ad-Hoc Commands](https://xmpp.org/extensions/xep-0050.html). This module -requires [mod_adhoc](/admin/configuration/modules/#mod-adhoc) to be loaded. +Ad-Hoc Commands](https://xmpp.org/extensions/xep-0050.html). Implements +many commands as defined in [XEP-0133: Service +Administration](https://xmpp.org/extensions/xep-0133.html). This module +requires [mod_adhoc](#mod_adhoc) to be loaded. The module has no options. mod\_conversejs --------------- + + + This module serves a simple page for the [Converse](https://conversejs.org/) XMPP web browser client. -This module is available since ejabberd 21.12. Several options were -improved in ejabberd 22.05. - To use this module, in addition to adding it to the *modules* section, you must also enable it in *listen* → *ejabberd\_http* → -[request\_handlers](/admin/configuration/listen-options/#request-handlers). +[request_handlers](listen-options.md#request_handlers). Make sure either *mod\_bosh* or *ejabberd\_http\_ws* -[request\_handlers](/admin/configuration/listen-options/#request-handlers) are -enabled. +[request_handlers](listen-options.md#request_handlers) are enabled. When *conversejs\_css* and *conversejs\_script* are *auto*, by default they point to the public Converse client. @@ -428,19 +437,18 @@ value is *auto*. Converse CSS URL. The keyword *@HOST@* is replaced with the hostname. The default value is *auto*. -
added in 22.05
- - **conversejs\_options**: *{Name: Value}* -Specify additional options to be passed to Converse. See [Converse + + Specify additional options to +be passed to Converse. See [Converse configuration](https://conversejs.org/docs/html/configuration.html). Only boolean, integer and string values are supported; lists are not supported. -
added in 22.05
- - **conversejs\_resources**: *Path* -Local path to the Converse files. If not set, the public Converse client -will be used instead. + + Local path to the Converse +files. If not set, the public Converse client will be used instead. - **conversejs\_script**: *auto | URL* Converse main script URL. The keyword *@HOST@* is replaced with the @@ -460,48 +468,54 @@ __Examples:__ Manually setup WebSocket url, and use the public Converse client: - listen: - - - port: 5280 - module: ejabberd_http - request_handlers: - /bosh: mod_bosh - /websocket: ejabberd_http_ws - /conversejs: mod_conversejs - - modules: - mod_bosh: {} - mod_conversejs: - websocket_url: "ws://@HOST@:5280/websocket" +~~~ yaml +listen: + - + port: 5280 + module: ejabberd_http + request_handlers: + /bosh: mod_bosh + /websocket: ejabberd_http_ws + /conversejs: mod_conversejs + +modules: + mod_bosh: {} + mod_conversejs: + websocket_url: "ws://@HOST@:5280/websocket" +~~~ Host Converse locally and let auto detection of WebSocket and Converse URLs: - listen: - - - port: 443 - module: ejabberd_http - tls: true - request_handlers: - /websocket: ejabberd_http_ws - /conversejs: mod_conversejs - - modules: - mod_conversejs: - conversejs_resources: "/home/ejabberd/conversejs-9.0.0/package/dist" +~~~ yaml +listen: + - + port: 443 + module: ejabberd_http + tls: true + request_handlers: + /websocket: ejabberd_http_ws + /conversejs: mod_conversejs + +modules: + mod_conversejs: + conversejs_resources: "/home/ejabberd/conversejs-9.0.0/package/dist" +~~~ Configure some additional options for Converse - modules: - mod_conversejs: - websocket_url: auto - conversejs_options: - auto_away: 30 - clear_cache_on_logout: true - i18n: "pt" - locked_domain: "@HOST@" - message_archiving: always - theme: dracula +~~~ yaml +modules: + mod_conversejs: + websocket_url: auto + conversejs_options: + auto_away: 30 + clear_cache_on_logout: true + i18n: "pt" + locked_domain: "@HOST@" + message_archiving: always + theme: dracula +~~~ mod\_delegation --------------- @@ -520,7 +534,7 @@ external PEP service. > **Note** > -> This module is complementary to [mod_privilege](/admin/configuration/modules/#mod-privilege) but can also be used +> This module is complementary to [mod_privilege](#mod_privilege) but can also be used > separately. __Available options:__ @@ -529,11 +543,11 @@ __Available options:__ If you want to delegate namespaces to a component, specify them in this option, and associate them to an access rule. The *Options* are: - - **access**: *AccessName* + - **access**: *AccessName* The option defines which components are allowed for namespace delegation. The default value is *none*. - - **filtering**: *Attributes* + - **filtering**: *Attributes* The list of attributes. Currently not used. @@ -544,24 +558,25 @@ the same time. As in the example provided later, to have the *sat-pubsub.example.org* component perform correctly disable the *mod\_pubsub* module. - access_rules: - external_pubsub: - allow: external_component - external_mam: - allow: external_component - - acl: - external_component: - server: sat-pubsub.example.org - - modules: - ... - mod_delegation: - namespaces: - urn:xmpp:mam:1: - access: external_mam - http://jabber.org/protocol/pubsub: - access: external_pubsub +~~~ yaml +access_rules: + external_pubsub: + allow: external_component + external_mam: + allow: external_component + +acl: + external_component: + server: sat-pubsub.example.org + +modules: + mod_delegation: + namespaces: + urn:xmpp:mam:1: + access: external_mam + http://jabber.org/protocol/pubsub: + access: external_pubsub +~~~ mod\_disco ---------- @@ -586,47 +601,49 @@ Specify additional information about the server, as described in Services](https://xmpp.org/extensions/xep-0157.html). Every *Info* element in the list is constructed from the following options: - - **modules**: *all | \[Module, ...\]* + - **modules**: *all | \[Module, ...\]* The value can be the keyword *all*, in which case the information is reported in all the services, or a list of ejabberd modules, in which case the information is only specified for the services provided by those modules. - - **name**: *Name* + - **name**: *Name* The field *var* name that will be defined. See XEP-0157 for some standardized names. - - **urls**: *\[URI, ...\]* + - **urls**: *\[URI, ...\]* A list of contact URIs, such as HTTP URLs, XMPP URIs and so on. **Example**: - server_info: - - - modules: all - name: abuse-addresses - urls: ["mailto:abuse@shakespeare.lit"] - - - modules: [mod_muc] - name: "Web chatroom logs" - urls: ["http://www.example.org/muc-logs"] - - - modules: [mod_disco] - name: feedback-addresses - urls: - - http://shakespeare.lit/feedback.php - - mailto:feedback@shakespeare.lit - - xmpp:feedback@shakespeare.lit - - - modules: - - mod_disco - - mod_vcard - name: admin-addresses - urls: - - mailto:xmpp@shakespeare.lit - - xmpp:admins@shakespeare.lit + ~~~ yaml + server_info: + - + modules: all + name: abuse-addresses + urls: ["mailto:abuse@shakespeare.lit"] + - + modules: [mod_muc] + name: "Web chatroom logs" + urls: ["http://www.example.org/muc-logs"] + - + modules: [mod_disco] + name: feedback-addresses + urls: + - http://shakespeare.lit/feedback.php + - mailto:feedback@shakespeare.lit + - xmpp:feedback@shakespeare.lit + - + modules: + - mod_disco + - mod_vcard + name: admin-addresses + urls: + - mailto:xmpp@shakespeare.lit + - xmpp:admins@shakespeare.lit + ~~~ mod\_fail2ban ------------- @@ -666,15 +683,16 @@ default value is *20*. mod\_host\_meta --------------- + + + This module serves small *host-meta* files as described in [XEP-0156: Discovering Alternative XMPP Connection Methods](https://xmpp.org/extensions/xep-0156.html). -This module is available since ejabberd 22.05. - To use this module, in addition to adding it to the *modules* section, you must also enable it in *listen* → *ejabberd\_http* → -[request\_handlers](/admin/configuration/listen-options/#request-handlers). +[request_handlers](listen-options.md#request_handlers). Notice it only works if ejabberd\_http has tls enabled. @@ -692,33 +710,35 @@ first configured WebSocket request handler. The default value is *auto*. __**Example**:__ - listen: - - - port: 443 - module: ejabberd_http - tls: true - request_handlers: - /bosh: mod_bosh - /ws: ejabberd_http_ws - /.well-known/host-meta: mod_host_meta - /.well-known/host-meta.json: mod_host_meta - - modules: - mod_bosh: {} - mod_host_meta: - bosh_service_url: "https://@HOST@:5443/bosh" - websocket_url: "wss://@HOST@:5443/ws" +~~~ yaml +listen: + - + port: 443 + module: ejabberd_http + tls: true + request_handlers: + /bosh: mod_bosh + /ws: ejabberd_http_ws + /.well-known/host-meta: mod_host_meta + /.well-known/host-meta.json: mod_host_meta + +modules: + mod_bosh: {} + mod_host_meta: + bosh_service_url: "https://@HOST@:5443/bosh" + websocket_url: "wss://@HOST@:5443/ws" +~~~ mod\_http\_api -------------- -This module provides a ReST interface to call [ejabberd -API](https://docs.ejabberd.im/developer/ejabberd-api) commands using +This module provides a ReST interface to call +[ejabberd API](../../developer/ejabberd-api/index.md) commands using JSON data. To use this module, in addition to adding it to the *modules* section, you must also enable it in *listen* → *ejabberd\_http* → -[request\_handlers](/admin/configuration/listen-options/#request-handlers). +[request_handlers](listen-options.md#request_handlers). To use a specific API version N, when defining the URL path in the request\_handlers, add a *vN*. For example: */api/v2: mod\_http\_api* @@ -730,15 +750,17 @@ The module has no options. __**Example**:__ - listen: - - - port: 5280 - module: ejabberd_http - request_handlers: - /api: mod_http_api +~~~ yaml +listen: + - + port: 5280 + module: ejabberd_http + request_handlers: + /api: mod_http_api - modules: - mod_http_api: {} +modules: + mod_http_api: {} +~~~ mod\_http\_fileserver --------------------- @@ -758,20 +780,22 @@ modify existing ones. The default values are: **Example**: - content_types: - .css: text/css - .gif: image/gif - .html: text/html - .jar: application/java-archive - .jpeg: image/jpeg - .jpg: image/jpeg - .js: text/javascript - .png: image/png - .svg: image/svg+xml - .txt: text/plain - .xml: application/xml - .xpi: application/x-xpinstall - .xul: application/vnd.mozilla.xul+xml + ~~~ yaml + content_types: + .css: text/css + .gif: image/gif + .html: text/html + .jar: application/java-archive + .jpeg: image/jpeg + .jpg: image/jpeg + .js: text/javascript + .png: image/png + .svg: image/svg+xml + .txt: text/plain + .xml: application/xml + .xpi: application/x-xpinstall + .xul: application/vnd.mozilla.xul+xml + ~~~ - **custom\_headers**: *{Name: Value}* Indicate custom HTTP headers to be included in all responses. There are @@ -801,33 +825,29 @@ This example configuration will serve the files from the local directory this example a new content type *ogg* is defined, *png* is redefined, and *jpg* definition is deleted: - listen: - ... - - - port: 5280 - module: ejabberd_http - request_handlers: - ... - /pub/content: mod_http_fileserver - ... - ... - - modules: - ... - mod_http_fileserver: - docroot: /var/www - accesslog: /var/log/ejabberd/access.log - directory_indices: - - index.html - - main.htm - custom_headers: - X-Powered-By: Erlang/OTP - X-Fry: "It's a widely-believed fact!" - content_types: - .ogg: audio/ogg - .png: image/png - default_content_type: text/html - ... +~~~ yaml +listen: + - + port: 5280 + module: ejabberd_http + request_handlers: + /pub/content: mod_http_fileserver + +modules: + mod_http_fileserver: + docroot: /var/www + accesslog: /var/log/ejabberd/access.log + directory_indices: + - index.html + - main.htm + custom_headers: + X-Powered-By: Erlang/OTP + X-Fry: "It's a widely-believed fact!" + content_types: + .ogg: audio/ogg + .png: image/png + default_content_type: text/html +~~~ mod\_http\_upload ----------------- @@ -840,7 +860,7 @@ URL from which that file can later be downloaded. In order to use this module, it must be enabled in *listen* → *ejabberd\_http* → -[request\_handlers](/admin/configuration/listen-options/#request-handlers). +[request_handlers](listen-options.md#request_handlers). __Available options:__ @@ -886,7 +906,7 @@ option is *undefined*, this option is set to the same value as *put\_url*. The keyword @HOST@ is replaced with the virtual host name. NOTE: if GET requests are handled by *mod\_http\_upload*, the *get\_url* must match the *put\_url*. Setting it to a different value only makes -sense if an external web server or [mod_http_fileserver](/admin/configuration/modules/#mod-http-fileserver) is used to +sense if an external web server or [mod_http_fileserver](#mod_http_fileserver) is used to serve the uploaded files. - **host** @@ -945,45 +965,43 @@ clients in Service Discovery. The value of *vCard* is a YAML map constructed from an XML representation of vCard. Since the representation has no attributes, the mapping is straightforward. -For example, the following XML representation of vCard: - - - Conferences - - - Elm Street - - - -will be translated to: + **Example**: + ~~~ yaml + # This XML representation of vCard: + # + # Conferences + # + # + # Elm Street + # + # + # + # is translated to: vcard: fn: Conferences adr: - work: true street: Elm Street + ~~~ __**Example**:__ - listen: - ... - - - port: 5443 - module: ejabberd_http - tls: true - request_handlers: - ... - /upload: mod_http_upload - ... - ... - - modules: - ... - mod_http_upload: - docroot: /ejabberd/upload - put_url: "https://@HOST@:5443/upload" - ... +~~~ yaml +listen: + - + port: 5443 + module: ejabberd_http + tls: true + request_handlers: + /upload: mod_http_upload + +modules: + mod_http_upload: + docroot: /ejabberd/upload + put_url: "https://@HOST@:5443/upload" +~~~ mod\_http\_upload\_quota ------------------------ @@ -1022,20 +1040,18 @@ and *access\_soft\_quota* options in order to use the quota feature. You can stick to the default names and just specify access rules such as those in this example: - shaper_rules: - ... - soft_upload_quota: - 1000: all # MiB - hard_upload_quota: - 1100: all # MiB - ... +~~~ yaml +shaper_rules: + soft_upload_quota: + 1000: all # MiB + hard_upload_quota: + 1100: all # MiB - modules: - ... - mod_http_upload: {} - mod_http_upload_quota: - max_days: 100 - ... +modules: + mod_http_upload: {} + mod_http_upload_quota: + max_days: 100 +~~~ mod\_jidprep ------------ @@ -1063,23 +1079,23 @@ of the ejabberd server. __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/admin/configuration/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/admin/configuration/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/admin/configuration/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/admin/configuration/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/admin/configuration/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_legacy\_auth ----------------- @@ -1098,7 +1114,9 @@ mod\_mam -------- This module implements [XEP-0313: Message Archive -Management](https://xmpp.org/extensions/xep-0313.html). Compatible XMPP +Management](https://xmpp.org/extensions/xep-0313.html) and [XEP-0441: +Message Archive Management +Preferences](https://xmpp.org/extensions/xep-0441.html). Compatible XMPP clients can use it to store their chat history on the server. __Available options:__ @@ -1109,7 +1127,7 @@ The default value is *all*. - **assume\_mam\_usage**: *true | false* This option determines how ejabberd’s stream management code (see -[mod_stream_mgmt](/admin/configuration/modules/#mod-stream-mgmt)) handles unacknowledged messages when the connection +[mod_stream_mgmt](#mod_stream_mgmt)) handles unacknowledged messages when the connection is lost. Usually, such messages are either bounced or resent. However, neither is done for messages that were stored in the user’s MAM archive if this option is set to *true*. In this case, ejabberd assumes those @@ -1117,19 +1135,19 @@ messages will be retrieved from the archive. The default value is *false*. - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/admin/configuration/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/admin/configuration/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/admin/configuration/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **clear\_archive\_on\_room\_destroy**: *true | false* -Whether to destroy message archive of a room (see [mod_muc](/admin/configuration/modules/#mod-muc)) when it +Whether to destroy message archive of a room (see [mod_muc](#mod_muc)) when it gets destroyed. The default value is *true*. - **compress\_xml**: *true | false* @@ -1138,7 +1156,7 @@ custom compression algorithm. This feature works only with SQL backends. The default value is *false*. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/admin/configuration/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **default**: *always | never | roster* @@ -1155,10 +1173,10 @@ option. Once the server received a request, that user’s messages are archived as usual. The default value is *false*. - **use\_cache**: *true | false* -Same as top-level [use_cache](/admin/configuration/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. - **user\_mucsub\_from\_muc\_archive**: *true | false* -When this option is disabled, for each individual subscriber a separa +When this option is disabled, for each individual subscriber a separate mucsub message is stored. With this option enabled, when a user fetches archive virtual mucsub, messages are generated from muc archives. The default value is *false*. @@ -1166,9 +1184,10 @@ default value is *false*. mod\_matrix\_gw --------------- -[Matrix](https://matrix.org/) gateway. + + -This module is available since ejabberd 24.02. +[Matrix](https://matrix.org/) gateway. __Available options:__ @@ -1202,19 +1221,21 @@ the *host* option. The default is *false*. __**Example**:__ - listen: - - - port: 8448 - module: ejabberd_http - tls: true - request_handlers: - "/_matrix": mod_matrix_gw - - modules: - mod_matrix_gw: - key_name: "key1" - key: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" - matrix_id_as_jid: true +~~~ yaml +listen: + - + port: 8448 + module: ejabberd_http + tls: true + request_handlers: + "/_matrix": mod_matrix_gw + +modules: + mod_matrix_gw: + key_name: "key1" + key: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" + matrix_id_as_jid: true +~~~ mod\_metrics ------------ @@ -1257,18 +1278,18 @@ connections/packets. The default value is *11111*. mod\_mix -------- + + + This module is an experimental implementation of [XEP-0369: Mediated Information eXchange (MIX)](https://xmpp.org/extensions/xep-0369.html). -MIX support was added in ejabberd 16.03 as an experimental feature, -updated in 19.02, and is not yet ready to use in production. It’s -asserted that the MIX protocol is going to replace the MUC protocol in -the future (see [mod_muc](/admin/configuration/modules/#mod-muc)). +It’s asserted that the MIX protocol is going to replace the MUC protocol +in the future (see [mod_muc](#mod_muc)). To learn more about how to use that feature, you can refer to our -tutorial: [Getting started with XEP-0369: Mediated Information eXchange -(MIX) v0.1](https://docs.ejabberd.im/tutorials/mix-010/). +tutorial: [Getting started with MIX](../../tutorials/mix-010.md) -The module depends on [mod_mam](/admin/configuration/modules/#mod-mam). +The module depends on [mod_mam](#mod_mam). __Available options:__ @@ -1277,7 +1298,7 @@ An access rule to control MIX channels creations. The default value is *all*. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/admin/configuration/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **host** @@ -1311,31 +1332,30 @@ channels (either on your server or on any remote servers). __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/admin/configuration/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/admin/configuration/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/admin/configuration/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/admin/configuration/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/admin/configuration/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_mqtt --------- -This module adds [support for the -MQTT](https://docs.ejabberd.im/admin/guide/mqtt/) protocol version -*3.1.1* and *5.0*. Remember to configure *mod\_mqtt* in *modules* and -*listen* sections. +This module adds [support for the MQTT](../guide/mqtt/index.md) +protocol version *3.1.1* and *5.0*. Remember to configure *mod\_mqtt* in +*modules* and *listen* sections. __Available options:__ @@ -1348,19 +1368,19 @@ Access rules to restrict access to topics for subscribers. By default there are no restrictions. - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/admin/configuration/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/admin/configuration/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/admin/configuration/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/admin/configuration/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **match\_retained\_limit**: *pos\_integer() | infinity* @@ -1379,11 +1399,11 @@ The maximum topic depth, i.e. the number of slashes (*/*) in the topic. The default value is *8*. - **queue\_type**: *ram | file* -Same as top-level [queue_type](/admin/configuration/toplevel/#queue-type) option, but applied to this module +Same as top-level [queue_type](toplevel.md#queue_type) option, but applied to this module only. - **ram\_db\_type**: *mnesia* -Same as top-level [default_ram_db](/admin/configuration/toplevel/#default-ram-db) option, but applied to this module +Same as top-level [default_ram_db](toplevel.md#default_ram_db) option, but applied to this module only. - **session\_expiry**: *timeout()* @@ -1392,7 +1412,7 @@ When *0* is set, the session gets destroyed when the underlying client connection is closed. The default value is *5* minutes. - **use\_cache**: *true | false* -Same as top-level [use_cache](/admin/configuration/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_mqtt\_bridge ----------------- @@ -1401,7 +1421,7 @@ This module adds ability to synchronize local MQTT topics with data on remote servers It can update topics on remote servers when local user updates local topic, or can subscribe for changes on remote server, and update local copy when remote data is updated. It is available since -ejabberd 23.01. +ejabberd [23.01](../../archive/23.01/index.md). __Available options:__ @@ -1418,20 +1438,20 @@ used with mqtts, mqtt5s, wss, wss5. __**Example**:__ - modules: - ... - mod_mqtt_bridge: - servers: - "mqtt://server.com": - publish: - "localA": "remoteA" # local changes to 'localA' will be replicated on remote server as 'remoteA' - "topicB": "topicB" - subscribe: - "remoteB": "localB" # changes to 'remoteB' on remote server will be stored as 'localB' on local server - authentication: - certfile: "/etc/ejabberd/mqtt_server.pem" - replication_user: "mqtt@xmpp.server.com" - ... +~~~ yaml +modules: + mod_mqtt_bridge: + servers: + "mqtt://server.com": + publish: + "localA": "remoteA" # local changes to 'localA' will be replicated on remote server as 'remoteA' + "topicB": "topicB" + subscribe: + "remoteB": "localB" # changes to 'remoteB' on remote server will be stored as 'localB' on local server + authentication: + certfile: "/etc/ejabberd/mqtt_server.pem" + replication_user: "mqtt@xmpp.server.com" +~~~ mod\_muc -------- @@ -1488,170 +1508,169 @@ To configure who is allowed to modify the *persistent* room option. The default value is *all*, which means everyone is allowed to modify that option. -
improved in 23.10
- - **access\_register**: *AccessName* -This option specifies who is allowed to register nickname within the -Multi-User Chat service and rooms. The default is *all* for backward -compatibility, which means that any user is allowed to register any free -nick in the MUC service and in the rooms. - -
added in 22.05
+ + This option specifies who +is allowed to register nickname within the Multi-User Chat service and +rooms. The default is *all* for backward compatibility, which means that +any user is allowed to register any free nick in the MUC service and in +the rooms. - **cleanup\_affiliations\_on\_start**: *true | false* -Remove affiliations for non-existing local users on startup. The default -value is *false*. + + Remove affiliations for +non-existing local users on startup. The default value is *false*. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/admin/configuration/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. -
improved in 22.05
- - **default\_room\_options**: *Options* Define the default room options. Note that the creator of a room can modify the options of his room at any time using an XMPP client with MUC capability. The *Options* are: - - **allow\_change\_subj**: *true | false* + - **allow\_change\_subj**: *true | false* Allow occupants to change the subject. The default value is *true*. - - **allow\_private\_messages\_from\_visitors**: *anyone | moderators | + - **allow\_private\_messages\_from\_visitors**: *anyone | moderators | nobody* Visitors can send private messages to other occupants. The default value is *anyone* which means visitors can send private messages to any occupant. - - **allow\_query\_users**: *true | false* + - **allow\_query\_users**: *true | false* Occupants can send IQ queries to other occupants. The default value is *true*. - - **allow\_subscription**: *true | false* + - **allow\_subscription**: *true | false* Allow users to subscribe to - room events as described in [Multi-User Chat - Subscriptions](https://docs.ejabberd.im/developer/xmpp-clients-bots/extensions/muc-sub/). + room events as described in + [Multi-User Chat Subscriptions](../../developer/xmpp-clients-bots/extensions/muc-sub.md). The default value is *false*. - - **allow\_user\_invites**: *true | false* + - **allow\_user\_invites**: *true | false* Allow occupants to send invitations. The default value is *false*. - - **allow\_visitor\_nickchange**: *true | false* + - **allow\_visitor\_nickchange**: *true | false* Allow visitors to change nickname. The default value is *true*. - - **allow\_visitor\_status**: *true | false* + - **allow\_visitor\_status**: *true | false* Allow visitors to send status text in presence updates. If disallowed, the status text is stripped before broadcasting the presence update to all the room occupants. The default value is *true*. - - **allow\_voice\_requests**: *true | false* + - **allow\_voice\_requests**: *true | false* Allow visitors in a moderated room to request voice. The default value is *true*. - - **allowpm**: *anyone | participants | moderators | none* + - **allowpm**: *anyone | participants | moderators | none* Who can send private messages. The default value is *anyone*. - - **anonymous**: *true | false* + - **anonymous**: *true | false* The room is anonymous: occupants don’t see the real JIDs of other occupants. Note that the room moderators can always see the real JIDs of the occupants. The default value is *true*. - - **captcha\_protected**: *true | false* + - **captcha\_protected**: *true | false* When a user tries to join a room where they have no affiliation (not owner, admin or member), the room requires them to fill a CAPTCHA challenge (see section - [CAPTCHA](/admin/configuration/#captcha) in order to accept their join in the + [CAPTCHA](basic.md#captcha) in order to accept their join in the room. The default value is *false*. - - **description**: *Room Description* + - **description**: *Room Description* Short description of the room. The default value is an empty string. - - **enable\_hats**: *true | false* + - **enable\_hats**: *true | false* Allow extended roles as defined in XEP-0317 Hats. The default value is *false*. - - **lang**: *Language* + - **lang**: *Language* Preferred language for the discussions in the room. The language format should conform to RFC 5646. There is no value by default. - - **logging**: *true | false* + - **logging**: *true | false* The public messages are logged using - [mod_muc_log](/admin/configuration/modules/#mod-muc-log). The default value is *false*. + [mod_muc_log](#mod_muc_log). The default value is *false*. - - **mam**: *true | false* + - **mam**: *true | false* Enable message archiving. Implies mod\_mam is enabled. The default value is *false*. - - **max\_users**: *Number* + - **max\_users**: *Number* Maximum number of occupants in the room. The default value is *200*. - - **members\_by\_default**: *true | false* + - **members\_by\_default**: *true | false* The occupants that enter the room are participants by default, so they have "voice". The default value is *true*. - - **members\_only**: *true | false* + - **members\_only**: *true | false* Only members of the room can enter. The default value is *false*. - - **moderated**: *true | false* + - **moderated**: *true | false* Only occupants with "voice" can send public messages. The default value is *true*. - - **password**: *Password* + - **password**: *Password* Password of the room. Implies option *password\_protected* set to *true*. There is no default value. - - **password\_protected**: *true | false* + - **password\_protected**: *true | false* The password is required to enter the room. The default value is *false*. - - **persistent**: *true | false* + - **persistent**: *true | false* The room persists even if the last participant leaves. The default value is *false*. - - **presence\_broadcast**: *\[moderator | participant | visitor, + - **presence\_broadcast**: *\[moderator | participant | visitor, ...\]* List of roles for which presence is broadcasted. The list can contain one or several of: *moderator*, *participant*, *visitor*. The default value is shown in the example below: **Example**: - presence_broadcast: - - moderator - - participant - - visitor + ~~~ yaml + presence_broadcast: + - moderator + - participant + - visitor + ~~~ - - **public**: *true | false* + - **public**: *true | false* The room is public in the list of the MUC service, so it can be discovered. MUC admins and room participants will see private rooms in Service Discovery if their XMPP client supports this feature. The default value is *true*. - - **public\_list**: *true | false* + - **public\_list**: *true | false* The list of participants is public, without requiring to enter the room. The default value is *true*. - - **pubsub**: *PubSub Node* + - **pubsub**: *PubSub Node* XMPP URI of associated Publish/Subscribe node. The default value is an empty string. - - **title**: *Room Title* + - **title**: *Room Title* A human-readable title of the room. There is no default value - - **vcard**: *vCard* + - **vcard**: *vCard* A custom vCard for the room. See the equivalent mod\_muc option.The default value is an empty string. - - **voice\_request\_min\_interval**: *Number* + - **voice\_request\_min\_interval**: *Number* Minimum interval between voice requests, in seconds. The default value is *1800*. @@ -1679,18 +1698,17 @@ is not specified, the only Jabber ID will be the hostname of the virtual host with the prefix "conference.". The keyword *@HOST@* is replaced with the real virtual host name. -
added in 21.01
- - **max\_captcha\_whitelist**: *Number* -This option defines the maximum number of characters that Captcha -Whitelist can have when configuring the room. The default value is -*infinity*. - -
added in 21.01
+ + This option defines the +maximum number of characters that Captcha Whitelist can have when +configuring the room. The default value is *infinity*. - **max\_password**: *Number* -This option defines the maximum number of characters that Password can -have when configuring the room. The default value is *infinity*. + + This option defines the +maximum number of characters that Password can have when configuring the +room. The default value is *infinity*. - **max\_room\_desc**: *Number* This option defines the maximum number of characters that Room @@ -1728,7 +1746,7 @@ reached. The default limit is *5*. - **max\_users\_presence**: *Number* This option defines after how many users in the room, it is considered -overcrowded. When a MUC room is considered overcrowed, presence +overcrowded. When a MUC room is considered overcrowded, presence broadcasts are limited to reduce load, traffic and excessive presence "storm" received by participants. The default value is *1000*. @@ -1769,11 +1787,11 @@ rooms is high: this will improve server startup time and memory consumption. - **queue\_type**: *ram | file* -Same as top-level [queue_type](/admin/configuration/toplevel/#queue-type) option, but applied to this module +Same as top-level [queue_type](toplevel.md#queue_type) option, but applied to this module only. - **ram\_db\_type**: *mnesia | sql* -Same as top-level [default_ram_db](/admin/configuration/toplevel/#default-ram-db) option, but applied to this module +Same as top-level [default_ram_db](toplevel.md#default_ram_db) option, but applied to this module only. - **regexp\_room\_id**: *string()* @@ -1798,24 +1816,26 @@ clients in Service Discovery. The value of *vCard* is a YAML map constructed from an XML representation of vCard. Since the representation has no attributes, the mapping is straightforward. -For example, the following XML representation of vCard: - - - Conferences - - - Elm Street - - - -will be translated to: + **Example**: + ~~~ yaml + # This XML representation of vCard: + # + # Conferences + # + # + # Elm Street + # + # + # + # is translated to: vcard: fn: Conferences adr: - work: true street: Elm Street + ~~~ mod\_muc\_admin --------------- @@ -1824,15 +1844,15 @@ This module provides commands to administer local MUC services and their MUC rooms. It also provides simple WebAdmin pages to view the existing rooms. -This module depends on [mod_muc](/admin/configuration/modules/#mod-muc). +This module depends on [mod_muc](#mod_muc). __Available options:__ -
added in 22.05
- - **subscribe\_room\_many\_max\_users**: *Number* -How many users can be subscribed to a room at once using the -*subscribe\_room\_many* command. The default value is *50*. + + How many users can be +subscribed to a room at once using the *subscribe\_room\_many* command. +The default value is *50*. mod\_muc\_log ------------- @@ -1870,7 +1890,7 @@ Features: - A custom link can be added on top of each page. -The module depends on [mod_muc](/admin/configuration/modules/#mod-muc). +The module depends on [mod_muc](#mod_muc). __Available options:__ @@ -1909,9 +1929,11 @@ the files. The default value is shown in the example below: **Example**: - file_permissions: - mode: 644 - group: 33 + ~~~ yaml + file_permissions: + mode: 644 + group: 33 + ~~~ - **outdir**: *Path* This option sets the full path to the directory in which the HTML files @@ -1935,8 +1957,10 @@ each log file. The default value is shown in the example below: **Example**: - top_link: - /: Home + ~~~ yaml + top_link: + /: Home + ~~~ - **url**: *URL* A top level *URL* where a client can access logs of a particular @@ -1947,26 +1971,28 @@ option is set to *room\_name* or a conference JID is appended to the mod\_muc\_occupantid -------------------- + + + This module implements [XEP-0421: Anonymous unique occupant identifiers for MUCs](https://xmpp.org/extensions/xep-0421.html). When the module is enabled, the feature is enabled in all semi-anonymous rooms. -This module is available since ejabberd 23.10. - The module has no options. mod\_muc\_rtbl -------------- + + + This module implement Real-time blocklists for MUC rooms. It works by observing remote pubsub node conforming with specification described in . -This module is available since ejabberd 23.04. - __Available options:__ - **rtbl\_node**: *PubsubNodeName* @@ -2002,21 +2028,23 @@ the real virtual host name. The default value is *multicast.@HOST@*. Specify a list of custom limits which override the default ones defined in XEP-0033. Limits are defined per sender type and stanza type, where: - - *sender* can be: *local* or *remote*. + - *sender* can be: *local* or *remote*. - - *stanza* can be: *message* or *presence*. + - *stanza* can be: *message* or *presence*. - - *number* can be a positive integer or *infinite*. + - *number* can be a positive integer or *infinite*. **Example**: - # Default values: - local: - message: 100 - presence: 100 - remote: - message: 20 - presence: 20 + ~~~ yaml + # Default values: + local: + message: 100 + presence: 100 + remote: + message: 20 + presence: 20 + ~~~ - **name** Service name to provide in the Info query to the Service Discovery. @@ -2027,37 +2055,39 @@ vCard element to return when queried. Default value is *undefined*. __**Example**:__ - # Only admins can send packets to multicast service - access_rules: - multicast: - - allow: admin - - # If you want to allow all your users: - access_rules: - multicast: - - allow - - # This allows both admins and remote users to send packets, - # but does not allow local users - acl: - allservers: - server_glob: "*" - access_rules: - multicast: - - allow: admin - - deny: local - - allow: allservers - - modules: - mod_multicast: - host: multicast.example.org - access: multicast - limits: - local: - message: 40 - presence: infinite - remote: - message: 150 +~~~ yaml +# Only admins can send packets to multicast service +access_rules: + multicast: + - allow: admin + +# If you want to allow all your users: +access_rules: + multicast: + - allow + +# This allows both admins and remote users to send packets, +# but does not allow local users +acl: + allservers: + server_glob: "*" +access_rules: + multicast: + - allow: admin + - deny: local + - allow: allservers + +modules: + mod_multicast: + host: multicast.example.org + access: multicast + limits: + local: + message: 40 + presence: infinite + remote: + message: 150 +~~~ mod\_offline ------------ @@ -2074,8 +2104,7 @@ works. A user is considered offline if no session presence priority > > **Note** > > *ejabberdctl* has a command to delete expired messages (see chapter -> [Managing an ejabberd -> server](https://docs.ejabberd.im/admin/guide/managing) in online +> [Managing an ejabberd server](../guide/managing.md) in online > documentation. __Available options:__ @@ -2088,7 +2117,7 @@ are discarded, and a <resource-constraint/> error is returned to the sender. The default value is *max\_user\_offline\_messages*. - **bounce\_groupchat**: *true | false* -This option is use the disable an optimisation that avoids bouncing +This option is use the disable an optimization that avoids bouncing error messages when groupchat messages could not be stored as offline. It will reduce chat room load, without any drawback in standard use cases. You may change default value only if you have a custom module @@ -2096,18 +2125,18 @@ which uses offline hook after *mod\_offline*. This option can be useful for both standard MUC and MucSub, but the bounce is much more likely to happen in the context of MucSub, so it is even more important to have it on large MucSub services. The default value is *false*, meaning the -optimisation is enabled. +optimization is enabled. - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/admin/configuration/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/admin/configuration/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/admin/configuration/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **store\_empty\_body**: *true | false | unless\_chat\_state* @@ -2122,7 +2151,7 @@ Whether or not to store groupchat messages. The default value is *false*. - **use\_cache**: *true | false* -Same as top-level [use_cache](/admin/configuration/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. - **use\_mam\_for\_storage**: *true | false* This is an experimental option. Enabling this option, *mod\_offline* @@ -2141,27 +2170,29 @@ __Examples:__ This example allows power users to have as much as 5000 offline messages, administrators up to 2000, and all the other users up to 100: - acl: - admin: - user: - - admin1@localhost - - admin2@example.org - poweruser: - user: - - bob@example.org - - jane@example.org - - shaper_rules: - max_user_offline_messages: - - 5000: poweruser - - 2000: admin - - 100 - - modules: - ... - mod_offline: - access_max_user_messages: max_user_offline_messages - ... +~~~ yaml +acl: + admin: + user: + - admin1@localhost + - admin2@example.org + poweruser: + user: + - bob@example.org + - jane@example.org + +shaper_rules: + max_user_offline_messages: + - 5000: poweruser + - 2000: admin + - 100 + +modules: + ... + mod_offline: + access_max_user_messages: max_user_offline_messages + ... +~~~ mod\_ping --------- @@ -2175,7 +2206,7 @@ __Available options:__ - **ping\_ack\_timeout**: *timeout()* How long to wait before deeming that a client has not answered a given -server ping request. NOTE: when [mod_stream_mgmt](/admin/configuration/modules/#mod-stream-mgmt) is loaded and stream +server ping request. NOTE: when [mod_stream_mgmt](#mod_stream_mgmt) is loaded and stream management is enabled by a client, this value is ignored, and the `ack_timeout` applies instead. The default value is *undefined*. @@ -2195,20 +2226,20 @@ or checking availability. The default value is *false*. What to do when a client does not answer to a server ping request in less than period defined in *ping\_ack\_timeout* option: *kill* means destroying the underlying connection, *none* means to do nothing. NOTE: -when [mod_stream_mgmt](/admin/configuration/modules/#mod-stream-mgmt) is loaded and stream management is enabled by a +when [mod_stream_mgmt](#mod_stream_mgmt) is loaded and stream management is enabled by a client, killing the client connection doesn’t mean killing the client session - the session will be kept alive in order to give the client a chance to resume it. The default value is *none*. __**Example**:__ - modules: - ... - mod_ping: - send_pings: true - ping_interval: 4 min - timeout_action: kill - ... +~~~ yaml +modules: + mod_ping: + send_pings: true + ping_interval: 4 min + timeout_action: kill +~~~ mod\_pres\_counter ------------------ @@ -2231,12 +2262,12 @@ The time interval. The default value is *1* minute. __**Example**:__ - modules: - ... - mod_pres_counter: - count: 5 - interval: 30 secs - ... +~~~ yaml +modules: + mod_pres_counter: + count: 5 + interval: 30 secs +~~~ mod\_privacy ------------ @@ -2249,28 +2280,28 @@ Lists](https://xmpp.org/extensions/xep-0016.html). > Nowadays modern XMPP clients rely on [XEP-0191: Blocking > Command](https://xmpp.org/extensions/xep-0191.html) which is > implemented by *mod\_blocking* module. However, you still need -> *mod\_privacy* loaded in order for [mod_blocking](/admin/configuration/modules/#mod-blocking) to work. +> *mod\_privacy* loaded in order for [mod_blocking](#mod_blocking) to work. __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/admin/configuration/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/admin/configuration/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/admin/configuration/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/admin/configuration/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/admin/configuration/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_private ------------ @@ -2287,29 +2318,28 @@ Bookmarks](https://xmpp.org/extensions/xep-0048.html)). It also implements the bookmark conversion described in [XEP-0402: PEP Native Bookmarks](https://xmpp.org/extensions/xep-0402.html), see the -command -[bookmarks\_to\_pep](https://docs.ejabberd.im/developer/ejabberd-api/admin-api/#bookmarks-to-pep). +command [bookmarks_to_pep](../../developer/ejabberd-api/admin-api.md#bookmarks_to_pep) API. __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/admin/configuration/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/admin/configuration/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/admin/configuration/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/admin/configuration/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/admin/configuration/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_privilege -------------- @@ -2339,7 +2369,7 @@ Check the section about listening ports for more information. > **Note** > -> This module is complementary to [mod_delegation](/admin/configuration/modules/#mod-delegation), but can also be +> This module is complementary to [mod_delegation](#mod_delegation), but can also be > used separately. __Available options:__ @@ -2348,7 +2378,7 @@ __Available options:__ This option defines permissions for messages. By default no permissions are given. The *Options* are: - - **outgoing**: *AccessName* + - **outgoing**: *AccessName* The option defines an access rule for sending outgoing messages by the component. The default value is *none*. @@ -2357,12 +2387,12 @@ are given. The *Options* are: This option defines permissions for presences. By default no permissions are given. The *Options* are: - - **managed\_entity**: *AccessName* + - **managed\_entity**: *AccessName* An access rule that gives permissions to the component to receive server presences. The default value is *none*. - - **roster**: *AccessName* + - **roster**: *AccessName* An access rule that gives permissions to the component to receive the presence of both the users and the contacts in their roster. The default value is *none*. @@ -2371,30 +2401,30 @@ are given. The *Options* are: This option defines roster permissions. By default no permissions are given. The *Options* are: - - **both**: *AccessName* + - **both**: *AccessName* Sets read/write access to a user’s roster. The default value is *none*. - - **get**: *AccessName* + - **get**: *AccessName* Sets read access to a user’s roster. The default value is *none*. - - **set**: *AccessName* + - **set**: *AccessName* Sets write access to a user’s roster. The default value is *none*. __**Example**:__ - modules: - ... - mod_privilege: - roster: - get: all - presence: - managed_entity: all - message: - outgoing: all - ... +~~~ yaml +modules: + mod_privilege: + roster: + get: all + presence: + managed_entity: all + message: + outgoing: all +~~~ mod\_proxy65 ------------ @@ -2452,7 +2482,7 @@ A port number to listen for incoming connections. The default value is *7777*. - **ram\_db\_type**: *mnesia | redis | sql* -Same as top-level [default_ram_db](/admin/configuration/toplevel/#default-ram-db) option, but applied to this module +Same as top-level [default_ram_db](toplevel.md#default_ram_db) option, but applied to this module only. - **recbuf**: *Size* @@ -2476,58 +2506,39 @@ clients in Service Discovery. The value of *vCard* is a YAML map constructed from an XML representation of vCard. Since the representation has no attributes, the mapping is straightforward. -For example, the following XML representation of vCard: - - - Conferences - - - Elm Street - - - -will be translated to: - - vcard: - fn: Conferences - adr: - - - work: true - street: Elm Street - __**Example**:__ - acl: - admin: - user: admin@example.org - proxy_users: - server: example.org - - access_rules: - proxy65_access: - allow: proxy_users - - shaper_rules: - proxy65_shaper: - none: admin - proxyrate: proxy_users - - shaper: - proxyrate: 10240 - - modules: - ... - mod_proxy65: - host: proxy1.example.org - name: "File Transfer Proxy" - ip: 200.150.100.1 - port: 7778 - max_connections: 5 - access: proxy65_access - shaper: proxy65_shaper - recbuf: 10240 - sndbuf: 10240 - ... +~~~ yaml +acl: + admin: + user: admin@example.org + proxy_users: + server: example.org + +access_rules: + proxy65_access: + allow: proxy_users + +shaper_rules: + proxy65_shaper: + none: admin + proxyrate: proxy_users + +shaper: + proxyrate: 10240 + +modules: + mod_proxy65: + host: proxy1.example.org + name: "File Transfer Proxy" + ip: 200.150.100.1 + port: 7778 + max_connections: 5 + access: proxy65_access + shaper: proxy65_shaper + recbuf: 10240 + sndbuf: 10240 +~~~ mod\_pubsub ----------- @@ -2537,7 +2548,7 @@ Publish-Subscribe](https://xmpp.org/extensions/xep-0060.html). The functionality in *mod\_pubsub* can be extended using plugins. The plugin that implements PEP ([XEP-0163: Personal Eventing via Pubsub](https://xmpp.org/extensions/xep-0163.html)) is enabled in the -default ejabberd configuration file, and it requires [mod_caps](/admin/configuration/modules/#mod-caps). +default ejabberd configuration file, and it requires [mod_caps](#mod_caps). __Available options:__ @@ -2547,7 +2558,7 @@ using *acl* and *access*. By default any account in the local ejabberd server is allowed to create pubsub nodes. The default value is: *all*. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/admin/configuration/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **default\_node\_config**: *List of Key:Value* @@ -2561,10 +2572,12 @@ Define the configuration for given nodes. The default value is: *\[\]*. **Example**: - force_node_config: - ## Avoid buggy clients to make their bookmarks public - storage:bookmarks: - access_model: whitelist + ~~~ yaml + force_node_config: + ## Avoid buggy clients to make their bookmarks public + storage:bookmarks: + access_model: whitelist + ~~~ - **host** Deprecated. Use *hosts* instead. @@ -2588,10 +2601,10 @@ systems with not so many nodes, caching last items speeds up pubsub and allows you to raise the user connection rate. The cost is memory usage, as every item is stored in memory. -
added in 21.12
- - **max\_item\_expire\_node**: *timeout() | infinity* -Specify the maximum item epiry time. Default value is: *infinity*. + + Specify the maximum item epiry +time. Default value is: *infinity*. - **max\_items\_node**: *non\_neg\_integer() | infinity* Define the maximum number of items that can be stored in a node. Default @@ -2616,11 +2629,11 @@ To specify which nodetree to use. If not defined, the default pubsub nodetree is used: *tree*. Only one nodetree can be used per host, and is shared by all node plugins. - - *tree* nodetree store node configuration and relations on the + - *tree* nodetree store node configuration and relations on the database. *flat* nodes are stored without any relationship, and *hometree* nodes can have child nodes. - - *virtual* nodetree does not store nodes on database. This saves + - *virtual* nodetree does not store nodes on database. This saves resources on systems with tons of nodes. If using the *virtual* nodetree, you can only enable those node plugins: *\[flat, pep\]* or *\[flat\]*; any other plugins configuration will not work. Also, all @@ -2637,12 +2650,14 @@ namespace: **Example**: - modules: - ... - mod_pubsub: - pep_mapping: - http://jabber.org/protocol/tune: tune - ... + ~~~ yaml + modules: + ... + mod_pubsub: + pep_mapping: + http://jabber.org/protocol/tune: tune + ... + ~~~ - **plugins**: *\[Plugin, ...\]* To specify which pubsub node plugins to use. The first one in the list @@ -2651,10 +2666,10 @@ list is: *\[flat\]*. PubSub clients can define which plugin to use when creating a node: add *type='plugin-name*' attribute to the *create* stanza element. - - *flat* plugin handles the default behaviour and follows standard + - *flat* plugin handles the default behaviour and follows standard XEP-0060 implementation. - - *pep* plugin adds extension to handle Personal Eventing Protocol + - *pep* plugin adds extension to handle Personal Eventing Protocol (XEP-0163) to the PubSub engine. When enabled, PEP is handled automatically. @@ -2664,59 +2679,61 @@ in Service Discovery. The value of *vCard* is a YAML map constructed from an XML representation of vCard. Since the representation has no attributes, the mapping is straightforward. -The following XML representation of vCard: - - - PubSub Service - - - Elm Street - - - -will be translated to: + **Example**: + ~~~ yaml + # This XML representation of vCard: + # + # Conferences + # + # + # Elm Street + # + # + # + # is translated to: vcard: - fn: PubSub Service + fn: Conferences adr: - work: true street: Elm Street + ~~~ __Examples:__ Example of configuration that uses flat nodes as default, and allows use of flat, hometree and pep nodes: - modules: - ... - mod_pubsub: - access_createnode: pubsub_createnode - max_subscriptions_node: 100 - default_node_config: - notification_type: normal - notify_retract: false - max_items: 4 - plugins: - - flat - - pep - ... +~~~ yaml +modules: + mod_pubsub: + access_createnode: pubsub_createnode + max_subscriptions_node: 100 + default_node_config: + notification_type: normal + notify_retract: false + max_items: 4 + plugins: + - flat + - pep +~~~ Using relational database requires using mod\_pubsub with db\_type *sql*. Only flat, hometree and pep plugins supports SQL. The following example shows previous configuration with SQL usage: - modules: - ... - mod_pubsub: - db_type: sql - access_createnode: pubsub_createnode - ignore_pep_from_offline: true - last_item_cache: false - plugins: - - flat - - pep - ... +~~~ yaml +modules: + mod_pubsub: + db_type: sql + access_createnode: pubsub_createnode + ignore_pep_from_offline: true + last_item_cache: false + plugins: + - flat + - pep +~~~ mod\_push --------- @@ -2728,24 +2745,24 @@ generate, for example, APNS or FCM notifications directly. Instead, it’s designed to work with so-called "app servers" operated by third-party vendors of mobile apps. Those app servers will usually trigger notification delivery to the user’s mobile device using -platform-dependant backend services such as FCM or APNS. +platform-dependent backend services such as FCM or APNS. __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/admin/configuration/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/admin/configuration/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/admin/configuration/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/admin/configuration/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **include\_body**: *true | false | Text* @@ -2762,29 +2779,28 @@ If this option is set to *true*, the sender’s JID is included with push notifications generated for incoming messages with a body. The default value is *false*. -
added in 23.10
- - **notify\_on**: *messages | all* -If this option is set to *messages*, notifications are generated only -for actual chat messages with a body text (or some encrypted payload). -If it’s set to *all*, any kind of XMPP stanza will trigger a -notification. If unsure, it’s strongly recommended to stick to *all*, -which is the default value. + + If this option is set to +*messages*, notifications are generated only for actual chat messages +with a body text (or some encrypted payload). If it’s set to *all*, any +kind of XMPP stanza will trigger a notification. If unsure, it’s +strongly recommended to stick to *all*, which is the default value. - **use\_cache**: *true | false* -Same as top-level [use_cache](/admin/configuration/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_push\_keepalive -------------------- This module tries to keep the stream management session (see -[mod_stream_mgmt](/admin/configuration/modules/#mod-stream-mgmt)) of a disconnected mobile client alive if the client +[mod_stream_mgmt](#mod_stream_mgmt)) of a disconnected mobile client alive if the client enabled push notifications for that session. However, the normal session resumption timeout is restored once a push notification is issued, so the session will be closed if the client doesn’t respond to push notifications. -The module depends on [mod_push](/admin/configuration/modules/#mod-push). +The module depends on [mod_push](#mod_push). __Available options:__ @@ -2792,7 +2808,7 @@ __Available options:__ This option specifies the period of time until the session of a disconnected push client times out. This timeout is only in effect as long as no push notification is issued. Once that happened, the -resumption timeout configured for [mod_stream_mgmt](/admin/configuration/modules/#mod-stream-mgmt) is restored. The +resumption timeout configured for [mod_stream_mgmt](#mod_stream_mgmt) is restored. The default value is *72* hours. - **wake\_on\_start**: *true | false* @@ -2820,7 +2836,7 @@ enables end users to use an XMPP client to: - Delete an existing account on the server. -This module reads also the top-level [registration_timeout](/admin/configuration/toplevel/#registration-timeout) option +This module reads also the top-level [registration_timeout](toplevel.md#registration_timeout) option defined globally for the server, so please check that option documentation too. @@ -2841,16 +2857,15 @@ to uncontrolled massive accounts creation by rogue users. Specify rules to restrict access for user unregistration. By default any user is able to unregister their account. -
added in 21.12
- - **allow\_modules**: *all | \[Module, ...\]* -List of modules that can register accounts, or *all*. The default value -is *all*, which is equivalent to something like *\[mod\_register, -mod\_register\_web\]*. + + List of modules that can +register accounts, or *all*. The default value is *all*, which is +equivalent to something like *\[mod\_register, mod\_register\_web\]*. - **captcha\_protected**: *true | false* -Protect registrations with [CAPTCHA](/admin/configuration/basic/#captcha). The -default is *false*. +Protect registrations with [CAPTCHA](basic.md#captcha). The default is +*false*. - **ip\_access**: *AccessName* Define rules to allow or deny account registration depending on the IP @@ -2888,9 +2903,9 @@ This module provides a web page where users can: - Unregister an existing account on the server. -This module supports [CAPTCHA](/admin/configuration/basic/#captcha) to register a -new account. To enable this feature, configure the top-level -[captcha_cmd](/admin/configuration/toplevel/#captcha-cmd) and top-level [captcha_url](/admin/configuration/toplevel/#captcha-url) options. +This module supports [CAPTCHA](basic.md#captcha) to register a new +account. To enable this feature, configure the top-level [captcha_cmd](toplevel.md#captcha_cmd) +and top-level [captcha_url](toplevel.md#captcha_url) options. As an example usage, the users of the host *localhost* can visit the page: *https://localhost:5280/register/* It is important to include the @@ -2898,23 +2913,25 @@ last / character in the URL, otherwise the subpages URL will be incorrect. This module is enabled in *listen* → *ejabberd\_http* → -[request\_handlers](/admin/configuration/listen-options/#request-handlers), no need -to enable in *modules*. The module depends on [mod_register](/admin/configuration/modules/#mod-register) where all +[request_handlers](listen-options.md#request_handlers), no need to +enable in *modules*. The module depends on [mod_register](#mod_register) where all the configuration is performed. The module has no options. __**Example**:__ - listen: - - - port: 5280 - module: ejabberd_http - request_handlers: - /register: mod_register_web +~~~ yaml +listen: + - + port: 5280 + module: ejabberd_http + request_handlers: + /register: mod_register_web - modules: - mod_register: {} +modules: + mod_register: {} +~~~ mod\_roster ----------- @@ -2934,19 +2951,19 @@ add/remove/modify contacts or send presence subscriptions. The default value is *all*, i.e. no restrictions. - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/admin/configuration/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/admin/configuration/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/admin/configuration/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/admin/configuration/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **store\_current\_id**: *true | false* @@ -2956,23 +2973,23 @@ calculated on the fly each time. Enabling this option reduces the load for both ejabberd and the database. This option does not affect the client in any way. This option is only useful if option *versioning* is set to *true*. The default value is *false*. IMPORTANT: if you use -[mod_shared_roster](/admin/configuration/modules/#mod-shared-roster) or [mod_shared_roster_ldap](/admin/configuration/modules/#mod-shared-roster-ldap), you must set the +[mod_shared_roster](#mod_shared_roster) or [mod_shared_roster_ldap](#mod_shared_roster_ldap), you must set the value of the option to *false*. - **use\_cache**: *true | false* -Same as top-level [use_cache](/admin/configuration/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. - **versioning**: *true | false* Enables/disables Roster Versioning. The default value is *false*. __**Example**:__ - modules: - ... - mod_roster: - versioning: true - store_current_id: false - ... +~~~ yaml +modules: + mod_roster: + versioning: true + store_current_id: false +~~~ mod\_s2s\_dialback ------------------ @@ -3000,15 +3017,15 @@ The default value is *all*. __**Example**:__ - modules: - ... - mod_s2s_dialback: - access: - allow: - server: legacy.domain.tld - server: invalid-cert.example.org - deny: all - ... +~~~ yaml +modules: + mod_s2s_dialback: + access: + allow: + server: legacy.domain.tld + server: invalid-cert.example.org + deny: all +~~~ mod\_service\_log ----------------- @@ -3026,13 +3043,13 @@ forwarded. __**Example**:__ - modules: - ... - mod_service_log: - loggers: - - xmpp-server.tld - - component.domain.tld - ... +~~~ yaml +modules: + mod_service_log: + loggers: + - xmpp-server.tld + - component.domain.tld +~~~ mod\_shared\_roster ------------------- @@ -3070,29 +3087,29 @@ parameters: group’s members. A group of other vhost can be identified with *groupid@vhost*. -This module depends on [mod_roster](/admin/configuration/modules/#mod-roster). If not enabled, roster queries +This module depends on [mod_roster](#mod_roster). If not enabled, roster queries will return 503 errors. __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/admin/configuration/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/admin/configuration/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/admin/configuration/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/admin/configuration/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/admin/configuration/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. __Examples:__ @@ -3100,11 +3117,13 @@ Take the case of a computer club that wants all its members seeing each other in their rosters. To achieve this, they need to create a shared roster group similar to this one: - Name: club_members - Label: Club Members - Description: Members from the computer club - Members: member1@example.org, member2@example.org, member3@example.org - Displayed Groups: club_members +~~~ yaml +Name: club_members +Label: Club Members +Description: Members from the computer club +Members: member1@example.org, member2@example.org, member3@example.org +Displayed Groups: club_members +~~~ In another case we have a company which has three divisions: Management, Marketing and Sales. All group members should see all other members in @@ -3113,26 +3132,28 @@ sales people in their roster. Simultaneously, all marketeers and the whole sales team should see all managers. This scenario can be achieved by creating shared roster groups as shown in the following lists: - First list: - Name: management - Label: Management - Description: Management - Members: manager1@example.org, manager2@example.org - Displayed: management, marketing, sales - - Second list: - Name: marketing - Label: Marketing - Description: Marketing - Members: marketeer1@example.org, marketeer2@example.org, marketeer3@example.org - Displayed: management, marketing - - Third list: - Name: sales - Label: Sales - Description: Sales - Members: salesman1@example.org, salesman2@example.org, salesman3@example.org - Displayed: management, sales +~~~ yaml +First list: +Name: management +Label: Management +Description: Management +Members: manager1@example.org, manager2@example.org +Displayed: management, marketing, sales + +Second list: +Name: marketing +Label: Marketing +Description: Marketing +Members: marketeer1@example.org, marketeer2@example.org, marketeer3@example.org +Displayed: management, marketing + +Third list: +Name: sales +Label: Sales +Description: Sales +Members: salesman1@example.org, salesman2@example.org, salesman3@example.org +Displayed: management, sales +~~~ mod\_shared\_roster\_ldap ------------------------- @@ -3170,26 +3191,26 @@ password in multiple places. - Connection parameters: The module also accepts the connection parameters, all of which default to the top-level parameter of the - same name, if unspecified. See [LDAP - Connection](/admin/configuration/ldap/#ldap-connection) section for more + same name, if unspecified. See + [LDAP Connection](ldap.md#ldap-connection) section for more information about them. -Check also the [Configuration examples](/admin/configuration/ldap/#ldap-examples) -section to get details about retrieving the roster, and configuration -examples including Flat DIT and Deep DIT. +Check also the [Configuration examples](ldap.md#ldap-examples) section +to get details about retrieving the roster, and configuration examples +including Flat DIT and Deep DIT. __Available options:__ - **cache\_life\_time** -Same as top-level [cache_life_time](/admin/configuration/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed** -Same as top-level [cache_missed](/admin/configuration/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size** -Same as top-level [cache_size](/admin/configuration/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **ldap\_auth\_check**: *true | false* @@ -3198,24 +3219,24 @@ subsystem) for existence of each user in the shared LDAP roster. Set to *false* if you want to disable the check. Default value is *true*. - **ldap\_backups** -Same as top-level [ldap_backups](/admin/configuration/toplevel/#ldap-backups) option, but applied to this module +Same as top-level [ldap_backups](toplevel.md#ldap_backups) option, but applied to this module only. - **ldap\_base** -Same as top-level [ldap_base](/admin/configuration/toplevel/#ldap-base) option, but applied to this module only. +Same as top-level [ldap_base](toplevel.md#ldap_base) option, but applied to this module only. - **ldap\_deref\_aliases** -Same as top-level [ldap_deref_aliases](/admin/configuration/toplevel/#ldap-deref-aliases) option, but applied to this +Same as top-level [ldap_deref_aliases](toplevel.md#ldap_deref_aliases) option, but applied to this module only. - **ldap\_encrypt** -Same as top-level [ldap_encrypt](/admin/configuration/toplevel/#ldap-encrypt) option, but applied to this module +Same as top-level [ldap_encrypt](toplevel.md#ldap_encrypt) option, but applied to this module only. - **ldap\_filter** Additional filter which is AND-ed together with "User Filter" and "Group -Filter". For more information check the LDAP -[Filters](/admin/configuration/ldap/#filters) section. +Filter". For more information check the LDAP [Filters](ldap.md#filters) +section. - **ldap\_gfilter** "Group Filter", used when retrieving human-readable name (a.k.a. @@ -3251,15 +3272,15 @@ section Filters. - **ldap\_memberattr\_format\_re** A regex for extracting user ID from the value of the attribute named by -*ldap\_memberattr*. Check the LDAP [Control -Parameters](/admin/configuration/ldap/#control-parameters) section. +*ldap\_memberattr*. Check the LDAP +[Control Parameters](ldap.md#control-parameters) section. - **ldap\_password** -Same as top-level [ldap_password](/admin/configuration/toplevel/#ldap-password) option, but applied to this module +Same as top-level [ldap_password](toplevel.md#ldap_password) option, but applied to this module only. - **ldap\_port** -Same as top-level [ldap_port](/admin/configuration/toplevel/#ldap-port) option, but applied to this module only. +Same as top-level [ldap_port](toplevel.md#ldap_port) option, but applied to this module only. - **ldap\_rfilter** So called "Roster Filter". Used to find names of all "shared roster" @@ -3268,37 +3289,37 @@ defaults to the top-level parameter of the same name. You must specify it in some place in the configuration, there is no default. - **ldap\_rootdn** -Same as top-level [ldap_rootdn](/admin/configuration/toplevel/#ldap-rootdn) option, but applied to this module +Same as top-level [ldap_rootdn](toplevel.md#ldap_rootdn) option, but applied to this module only. - **ldap\_servers** -Same as top-level [ldap_servers](/admin/configuration/toplevel/#ldap-servers) option, but applied to this module +Same as top-level [ldap_servers](toplevel.md#ldap_servers) option, but applied to this module only. - **ldap\_tls\_cacertfile** -Same as top-level [ldap_tls_cacertfile](/admin/configuration/toplevel/#ldap-tls-cacertfile) option, but applied to this +Same as top-level [ldap_tls_cacertfile](toplevel.md#ldap_tls_cacertfile) option, but applied to this module only. - **ldap\_tls\_certfile** -Same as top-level [ldap_tls_certfile](/admin/configuration/toplevel/#ldap-tls-certfile) option, but applied to this +Same as top-level [ldap_tls_certfile](toplevel.md#ldap_tls_certfile) option, but applied to this module only. - **ldap\_tls\_depth** -Same as top-level [ldap_tls_depth](/admin/configuration/toplevel/#ldap-tls-depth) option, but applied to this module +Same as top-level [ldap_tls_depth](toplevel.md#ldap_tls_depth) option, but applied to this module only. - **ldap\_tls\_verify** -Same as top-level [ldap_tls_verify](/admin/configuration/toplevel/#ldap-tls-verify) option, but applied to this module +Same as top-level [ldap_tls_verify](toplevel.md#ldap_tls_verify) option, but applied to this module only. - **ldap\_ufilter** "User Filter", used for retrieving the human-readable name of roster entries (usually full names of people in the roster). See also the parameters *ldap\_userdesc* and *ldap\_useruid*. For more information -check the LDAP [Filters](/admin/configuration/ldap/#filters) section. +check the LDAP [Filters](ldap.md#filters) section. - **ldap\_uids** -Same as top-level [ldap_uids](/admin/configuration/toplevel/#ldap-uids) option, but applied to this module only. +Same as top-level [ldap_uids](toplevel.md#ldap_uids) option, but applied to this module only. - **ldap\_userdesc** The name of the attribute which holds the human-readable user name. @@ -3316,7 +3337,7 @@ retrieved from the *ldap\_memberattr* attribute of a group object. Retrieved from results of the "User Filter". Defaults to *cn*. - **use\_cache** -Same as top-level [use_cache](/admin/configuration/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_sic -------- @@ -3343,8 +3364,8 @@ virtual host. > > It is not enough to just load this module. You should also configure > listeners and DNS records properly. For details see the section about -> the [ejabberd\_sip](/admin/configuration/listen/#ejabberd-sip) listen module in -> the ejabberd Documentation. +> the [ejabberd_sip](listen.md#ejabberd_sip) listen module in the +> ejabberd Documentation. __Available options:__ @@ -3386,21 +3407,21 @@ are mandatory (e.g. you cannot omit "port" or "scheme"). __**Example**:__ - modules: - ... - mod_sip: - always_record_route: false - record_route: "sip:example.com;lr" - routes: - - "sip:example.com;lr" - - "sip:sip.example.com;lr" - flow_timeout_udp: 30 sec - flow_timeout_tcp: 1 min - via: - - tls://sip-tls.example.com:5061 - - tcp://sip-tcp.example.com:5060 - - udp://sip-udp.example.com:5060 - ... +~~~ yaml +modules: + mod_sip: + always_record_route: false + record_route: "sip:example.com;lr" + routes: + - "sip:example.com;lr" + - "sip:sip.example.com;lr" + flow_timeout_udp: 30 sec + flow_timeout_tcp: 1 min + via: + - tls://sip-tls.example.com:5061 + - tcp://sip-tcp.example.com:5060 + - udp://sip-udp.example.com:5060 +~~~ mod\_stats ---------- @@ -3436,20 +3457,20 @@ mod\_stream\_mgmt This module adds support for [XEP-0198: Stream Management](https://xmpp.org/extensions/xep-0198.html). This protocol allows active management of an XML stream between two XMPP entities, -including features for stanza acknowledgements and stream resumption. +including features for stanza acknowledgments and stream resumption. __Available options:__ - **ack\_timeout**: *timeout()* -A time to wait for stanza acknowledgements. Setting it to *infinity* +A time to wait for stanza acknowledgments. Setting it to *infinity* effectively disables the timeout. The default value is *1* minute. - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/admin/configuration/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. The default value is *48 hours*. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/admin/configuration/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **max\_ack\_queue**: *Size* @@ -3472,7 +3493,7 @@ default *resume\_timeout*. By default, it is set to the same value as the *resume\_timeout* option. - **queue\_type**: *ram | file* -Same as top-level [queue_type](/admin/configuration/toplevel/#queue-type) option, but applied to this module +Same as top-level [queue_type](toplevel.md#queue_type) option, but applied to this module only. - **resend\_on\_timeout**: *true | false | if\_offline* @@ -3498,10 +3519,12 @@ it to *0* effectively disables session resumption. The default value is mod\_stun\_disco ---------------- + + + This module allows XMPP clients to discover STUN/TURN services and to obtain temporary credentials for using them as per [XEP-0215: External -Service Discovery](https://xmpp.org/extensions/xep-0215.html). This -module is included in ejabberd since version 20.04. +Service Discovery](https://xmpp.org/extensions/xep-0215.html). __Available options:__ @@ -3549,67 +3572,69 @@ Unless the *offer\_local\_services* is set to *false*, the explicitly listed services will be offered in addition to those announced automatically. - - **host**: *Host* + - **host**: *Host* The hostname or IP address the STUN/TURN service is listening on. For non-TLS services, it’s recommended to specify an IP address (to avoid additional DNS lookup latency on the client side). For TLS services, the hostname (or IP address) should match the certificate. Specifying the *host* option is mandatory. - - **port**: *1..65535* + - **port**: *1..65535* The port number the STUN/TURN service is listening on. The default port number is 3478 for non-TLS services and 5349 for TLS services. - - **restricted**: *true | false* + - **restricted**: *true | false* This option determines whether temporary credentials for accessing the service are offered. The default is *false* for STUN/STUNS services and *true* for TURN/TURNS services. - - **transport**: *tcp | udp* + - **transport**: *tcp | udp* The transport protocol supported by the service. The default is *udp* for non-TLS services and *tcp* for TLS services. - - **type**: *stun | turn | stuns | turns* + - **type**: *stun | turn | stuns | turns* The type of service. Must be *stun* or *turn* for non-TLS services, *stuns* or *turns* for TLS services. The default type is *stun*. **Example**: - services: - - - host: 203.0.113.3 - port: 3478 - type: stun - transport: udp - restricted: false - - - host: 203.0.113.3 - port: 3478 - type: turn - transport: udp - restricted: true - - - host: 2001:db8::3 - port: 3478 - type: stun - transport: udp - restricted: false - - - host: 2001:db8::3 - port: 3478 - type: turn - transport: udp - restricted: true - - - host: server.example.com - port: 5349 - type: turns - transport: tcp - restricted: true + ~~~ yaml + services: + - + host: 203.0.113.3 + port: 3478 + type: stun + transport: udp + restricted: false + - + host: 203.0.113.3 + port: 3478 + type: turn + transport: udp + restricted: true + - + host: 2001:db8::3 + port: 3478 + type: stun + transport: udp + restricted: false + - + host: 2001:db8::3 + port: 3478 + type: turn + transport: udp + restricted: true + - + host: server.example.com + port: 5349 + type: turns + transport: tcp + restricted: true + ~~~ mod\_time --------- @@ -3638,19 +3663,19 @@ fields should return all users who added some information to their vCard. The default value is *false*. - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/admin/configuration/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/admin/configuration/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/admin/configuration/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql | ldap* -Same as top-level [default_db](/admin/configuration/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **host** @@ -3680,7 +3705,7 @@ ignored and the Jabber User Directory service will not appear in the Service Discovery item list. The default value is *false*. - **use\_cache**: *true | false* -Same as top-level [use_cache](/admin/configuration/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. - **vcard**: *vCard* A custom vCard of the server that will be displayed by some XMPP clients @@ -3688,55 +3713,59 @@ in Service Discovery. The value of *vCard* is a YAML map constructed from an XML representation of vCard. Since the representation has no attributes, the mapping is straightforward. -For example, the following XML representation of vCard: - - - Conferences - - - Elm Street - - - -will be translated to: + **Example**: + ~~~ yaml + # This XML representation of vCard: + # + # + # Conferences + # + # + # Elm Street + # + # + # + # is translated to: + # vcard: fn: Conferences adr: - work: true street: Elm Street + ~~~ __Available options for *ldap* backend:__ - **ldap\_backups** -Same as top-level [ldap_backups](/admin/configuration/toplevel/#ldap-backups) option, but applied to this module +Same as top-level [ldap_backups](toplevel.md#ldap_backups) option, but applied to this module only. - **ldap\_base** -Same as top-level [ldap_base](/admin/configuration/toplevel/#ldap-base) option, but applied to this module only. +Same as top-level [ldap_base](toplevel.md#ldap_base) option, but applied to this module only. - **ldap\_deref\_aliases** -Same as top-level [ldap_deref_aliases](/admin/configuration/toplevel/#ldap-deref-aliases) option, but applied to this +Same as top-level [ldap_deref_aliases](toplevel.md#ldap_deref_aliases) option, but applied to this module only. - **ldap\_encrypt** -Same as top-level [ldap_encrypt](/admin/configuration/toplevel/#ldap-encrypt) option, but applied to this module +Same as top-level [ldap_encrypt](toplevel.md#ldap_encrypt) option, but applied to this module only. - **ldap\_filter** -Same as top-level [ldap_filter](/admin/configuration/toplevel/#ldap-filter) option, but applied to this module +Same as top-level [ldap_filter](toplevel.md#ldap_filter) option, but applied to this module only. - **ldap\_password** -Same as top-level [ldap_password](/admin/configuration/toplevel/#ldap-password) option, but applied to this module +Same as top-level [ldap_password](toplevel.md#ldap_password) option, but applied to this module only. - **ldap\_port** -Same as top-level [ldap_port](/admin/configuration/toplevel/#ldap-port) option, but applied to this module only. +Same as top-level [ldap_port](toplevel.md#ldap_port) option, but applied to this module only. - **ldap\_rootdn** -Same as top-level [ldap_rootdn](/admin/configuration/toplevel/#ldap-rootdn) option, but applied to this module +Same as top-level [ldap_rootdn](toplevel.md#ldap_rootdn) option, but applied to this module only. - **ldap\_search\_fields**: *{Name: Attribute, ...}* @@ -3746,8 +3775,11 @@ automatically translated by using the translation files (see *msgs/\*.msg* for available words). *Attribute* is the LDAP attribute or the pattern *%u*. -The default is: + **Examples**: + + The default is: + ~~~ yaml User: "%u" "Full Name": displayName "Given Name": givenName @@ -3760,6 +3792,7 @@ The default is: Email: mail "Organization Name": o "Organization Unit": ou + ~~~ - **ldap\_search\_reported**: *{SearchField: VcardField}, ...}* This option defines which search fields should be reported. @@ -3768,8 +3801,11 @@ automatically translated by using the translation files (see *msgs/\*.msg* for available words). *VcardField* is the vCard field name defined in the *ldap\_vcard\_map* option. -The default is: + **Examples**: + The default is: + + ~~~ yaml "Full Name": FN "Given Name": FIRST "Middle Name": MIDDLE @@ -3781,29 +3817,30 @@ The default is: "Email": EMAIL "Organization Name": ORGNAME "Organization Unit": ORGUNIT + ~~~ - **ldap\_servers** -Same as top-level [ldap_servers](/admin/configuration/toplevel/#ldap-servers) option, but applied to this module +Same as top-level [ldap_servers](toplevel.md#ldap_servers) option, but applied to this module only. - **ldap\_tls\_cacertfile** -Same as top-level [ldap_tls_cacertfile](/admin/configuration/toplevel/#ldap-tls-cacertfile) option, but applied to this +Same as top-level [ldap_tls_cacertfile](toplevel.md#ldap_tls_cacertfile) option, but applied to this module only. - **ldap\_tls\_certfile** -Same as top-level [ldap_tls_certfile](/admin/configuration/toplevel/#ldap-tls-certfile) option, but applied to this +Same as top-level [ldap_tls_certfile](toplevel.md#ldap_tls_certfile) option, but applied to this module only. - **ldap\_tls\_depth** -Same as top-level [ldap_tls_depth](/admin/configuration/toplevel/#ldap-tls-depth) option, but applied to this module +Same as top-level [ldap_tls_depth](toplevel.md#ldap_tls_depth) option, but applied to this module only. - **ldap\_tls\_verify** -Same as top-level [ldap_tls_verify](/admin/configuration/toplevel/#ldap-tls-verify) option, but applied to this module +Same as top-level [ldap_tls_verify](toplevel.md#ldap_tls_verify) option, but applied to this module only. - **ldap\_uids** -Same as top-level [ldap_uids](/admin/configuration/toplevel/#ldap-uids) option, but applied to this module only. +Same as top-level [ldap_uids](toplevel.md#ldap_uids) option, but applied to this module only. - **ldap\_vcard\_map**: *{Name: {Pattern, LDAPattributes}, ...}* With this option you can set the table that maps LDAP attributes to @@ -3815,8 +3852,11 @@ sequentially replaced with the values of LDAP attributes from *List\_of\_LDAP\_attributes*, *%u* will be replaced with the user part of a JID, and *%d* will be replaced with the domain part of a JID. -The default is: + **Examples**: + + The default is: + ~~~ yaml NICKNAME: {"%u": []} FN: {"%s": [displayName]} LAST: {"%s": [sn]} @@ -3837,6 +3877,7 @@ The default is: BDAY: {"%s": [birthDay]} ROLE: {"%s": [employeeType]} PHOTO: {"%s": [jpegPhoto]} + ~~~ __Available options for *mnesia* backend:__ @@ -3869,31 +3910,31 @@ that change frequently their presence. However, the overhead is significantly reduced by the use of caching, so you probably don’t want to set *use\_cache* to *false*. -The module depends on [mod_vcard](/admin/configuration/modules/#mod-vcard). +The module depends on [mod_vcard](#mod_vcard). > **Note** > > Nowadays [XEP-0153](https://xmpp.org/extensions/xep-0153.html) is used > mostly as "read-only", i.e. modern clients don’t publish their avatars > inside vCards. Thus in the majority of cases the module is only used -> along with [mod_avatar](/admin/configuration/modules/#mod-avatar) for providing backward compatibility. +> along with [mod_avatar](#mod_avatar) for providing backward compatibility. __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/admin/configuration/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/admin/configuration/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/admin/configuration/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/admin/configuration/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_version ------------ diff --git a/content/admin/configuration/toplevel.md b/content/admin/configuration/toplevel.md index 884f9cd1..74d45132 100644 --- a/content/admin/configuration/toplevel.md +++ b/content/admin/configuration/toplevel.md @@ -1,47 +1,45 @@ ---- -title: Top-Level Options -toc: true -menu: Top-Level Opts -order: 80 ---- +# Top-Level Options -> This section describes top level options of ejabberd. If you are using an old ejabberd release, please refer to the corresponding archived version of this page in the [Archive](/archive/). +> This section describes top level options of ejabberd [24.06](../../archive/24.06/index.md). If you are using an old ejabberd release, please refer to the corresponding archived version of this page in the [Archive](../../archive/index.md). The options +that changed in this version are marked with 🟤. ## access\_rules *{AccessName: {allow|deny: ACLRules|ACLName}}* -This option defines [Access Rules](/admin/configuration/basic/#access-rules). Each -access rule is assigned a name that can be referenced from other parts -of the configuration file (mostly from *access* options of ejabberd -modules). Each rule definition may contain arbitrary number of *allow* -or *deny* sections, and each section may contain any number of ACL rules -(see [acl](/admin/configuration/toplevel/#acl) option). There are no access rules defined by default. +This option defines [Access Rules](basic.md#access-rules). Each access +rule is assigned a name that can be referenced from other parts of the +configuration file (mostly from *access* options of ejabberd modules). +Each rule definition may contain arbitrary number of *allow* or *deny* +sections, and each section may contain any number of ACL rules (see +[acl](#acl) option). There are no access rules defined by default. **Example**: - access_rules: - configure: - allow: admin - something: - deny: someone - allow: all - s2s_banned: - deny: problematic_hosts - deny: banned_forever - deny: - ip: 222.111.222.111/32 - deny: - ip: 111.222.111.222/32 - allow: all - xmlrpc_access: - allow: - user: peter@example.com - allow: - user: ivone@example.com - allow: - user: bot@example.com - ip: 10.0.0.0/24 +~~~ yaml +access_rules: + configure: + allow: admin + something: + deny: someone + allow: all + s2s_banned: + deny: problematic_hosts + deny: banned_forever + deny: + ip: 222.111.222.111/32 + deny: + ip: 111.222.111.222/32 + allow: all + xmlrpc_access: + allow: + user: peter@example.com + allow: + user: ivone@example.com + allow: + user: bot@example.com + ip: 10.0.0.0/24 +~~~ ## acl @@ -53,7 +51,7 @@ address). Every set of rules has name *ACLName*: it can be any string except *all* or *none* (those are predefined names for the rules that match all or nothing respectively). The name *ACLName* can be referenced from other parts of the configuration file, for example in -[access_rules](/admin/configuration/toplevel/#access-rules) option. The rules of *ACLName* are represented by +[access_rules](#access_rules) option. The rules of *ACLName* are represented by mapping *{ACLType: ACLValue}*. These can be one of the following: - **ip**: *Network* @@ -121,7 +119,7 @@ mapping *{ACLType: ACLValue}*. These can be one of the following: *Options* -[ACME](/admin/configuration/basic/#acme) configuration, to automatically obtain SSL +[ACME](basic.md#acme) configuration, to automatically obtain SSL certificates for the domains served by ejabberd, which means that certificate requests and renewals are performed to some CA server (aka "ACME server") in a fully automated mode. The *Options* are: @@ -154,20 +152,22 @@ certificate requests and renewals are performed to some CA server (aka **Example**: - acme: - ca_url: https://acme-v02.api.letsencrypt.org/directory - contact: - - mailto:admin@domain.tld - - mailto:bot@domain.tld - auto: true - cert_type: rsa +~~~ yaml +acme: + ca_url: https://acme-v02.api.letsencrypt.org/directory + contact: + - mailto:admin@domain.tld + - mailto:bot@domain.tld + auto: true + cert_type: rsa +~~~ ## allow\_contrib\_modules *true | false* Whether to allow installation of third-party modules or not. See -[ejabberd-contrib](https://docs.ejabberd.im/developer/extending-ejabberd/modules/#ejabberd-contrib) +[ejabberd-contrib](../../developer/extending-ejabberd/modules.md#ejabberd-contrib) documentation section. The default value is *true*. ## allow\_multiple\_connections @@ -200,8 +200,8 @@ The default value is *sasl\_anon*. *\[Permission, ...\]* Define the permissions for API access. Please consult the ejabberd Docs -web → For Developers → ejabberd ReST API → [API -Permissions](https://docs.ejabberd.im/developer/ejabberd-api/permissions/). +web → For Developers → ejabberd ReST API → +[API Permissions](../../developer/ejabberd-api/permissions.md). ## append\_host\_config @@ -216,34 +216,34 @@ specific modules to certain virtual hosts. To accomplish that, *timeout()* -Same as [cache_life_time](/admin/configuration/toplevel/#cache-life-time), but applied to authentication cache only. -If not set, the value from [cache_life_time](/admin/configuration/toplevel/#cache-life-time) will be used. +Same as [cache_life_time](#cache_life_time), but applied to authentication cache only. +If not set, the value from [cache_life_time](#cache_life_time) will be used. ## auth\_cache\_missed *true | false* -Same as [cache_missed](/admin/configuration/toplevel/#cache-missed), but applied to authentication cache only. If -not set, the value from [cache_missed](/admin/configuration/toplevel/#cache-missed) will be used. +Same as [cache_missed](#cache_missed), but applied to authentication cache only. If +not set, the value from [cache_missed](#cache_missed) will be used. ## auth\_cache\_size *pos\_integer() | infinity* -Same as [cache_size](/admin/configuration/toplevel/#cache-size), but applied to authentication cache only. If not -set, the value from [cache_size](/admin/configuration/toplevel/#cache-size) will be used. - -
added in 23.10
+Same as [cache_size](#cache_size), but applied to authentication cache only. If not +set, the value from [cache_size](#cache_size) will be used. ## auth\_external\_user\_exists\_check *true | false* -Supplement check for user existence based on *mod\_last* data, for -authentication methods that don’t have a way to reliably tell if a user -exists (like is the case for *jwt* and certificate based -authentication). This helps with processing offline message for those -users. The default value is *true*. + + +Supplement check for user +existence based on *mod\_last* data, for authentication methods that +don’t have a way to reliably tell if a user exists (like is the case for +*jwt* and certificate based authentication). This helps with processing +offline message for those users. The default value is *true*. ## auth\_method @@ -262,14 +262,15 @@ be installed from the [ejabberd-contrib](https://github.com/processone/ejabberd-contrib) Git repository. Please refer to that module’s README file for details. -
improved in 20.01
- ## auth\_password\_format *plain | scram* -The option defines in what format the users passwords are stored, plain -text or in [SCRAM](/admin/configuration/authentication/#scram) format: + + +The option defines in what +format the users passwords are stored, plain text or in +[SCRAM](authentication.md#scram) format: - *plain*: The password is stored as plain text in the database. This is risky because the passwords can be read if your database gets @@ -283,7 +284,7 @@ text or in [SCRAM](/admin/configuration/authentication/#scram) format: this reason, when this value is configured it cannot be changed to plain anymore. This format allows clients to authenticate using: SASL PLAIN and SASL SCRAM-SHA-1/256/512(-PLUS). The SCRAM variant - depends on the [auth_scram_hash](/admin/configuration/toplevel/#auth-scram-hash) option. + depends on the [auth_scram_hash](#auth_scram_hash) option. The default value is *plain*. @@ -292,17 +293,17 @@ The default value is *plain*. *sha | sha256 | sha512* Hash algorithm that should be used to store password in -[SCRAM](/admin/configuration/authentication/#scram) format. You shouldn’t change -this if you already have passwords generated with a different -algorithm - users that have such passwords will not be able to -authenticate. The default value is *sha*. +[SCRAM](authentication.md#scram) format. You shouldn’t change this if +you already have passwords generated with a different algorithm - users +that have such passwords will not be able to authenticate. The default +value is *sha*. ## auth\_use\_cache *true | false* -Same as [use_cache](/admin/configuration/toplevel/#use-cache), but applied to authentication cache only. If not -set, the value from [use_cache](/admin/configuration/toplevel/#use-cache) will be used. +Same as [use_cache](#use_cache), but applied to authentication cache only. If not +set, the value from [use_cache](#use_cache) will be used. ## c2s\_cafile @@ -313,11 +314,10 @@ format. All client certificates should be signed by one of these root CA certificates and should contain the corresponding JID(s) in *subjectAltName* field. There is no default value. -You can use [host\_config](/admin/configuration/toplevel/#host-config) to specify -this option per-vhost. +You can use [host_config](#host_config) to specify this option per-vhost. To set a specific file per listener, use the listener’s -[cafile](/admin/configuration/listen-options/#cafile) option. Please notice that +[cafile](listen-options.md#cafile) option. Please notice that *c2s\_cafile* overrides the listener’s *cafile* option. ## c2s\_ciphers @@ -329,12 +329,14 @@ is shown in the example below: **Example**: - c2s_ciphers: - - HIGH - - "!aNULL" - - "!eNULL" - - "!3DES" - - "@STRENGTH" +~~~ yaml +c2s_ciphers: + - HIGH + - "!aNULL" + - "!eNULL" + - "!3DES" + - "@STRENGTH" +~~~ ## c2s\_dhfile @@ -356,10 +358,12 @@ below: **Example**: - c2s_protocol_options: - - no_sslv3 - - cipher_server_preference - - no_compression +~~~ yaml +c2s_protocol_options: + - no_sslv3 + - cipher_server_preference + - no_compression +~~~ ## c2s\_tls\_compression @@ -376,7 +380,7 @@ Path to a file of CA root certificates. The default is to use system defined file if possible. For server connections, this *ca\_file* option is overridden by the -[s2s\_cafile](/admin/configuration/toplevel/#s2s-cafile) option. +[s2s_cafile](#s2s_cafile) option. ## cache\_life\_time @@ -385,9 +389,9 @@ For server connections, this *ca\_file* option is overridden by the The time of a cached item to keep in cache. Once it’s expired, the corresponding item is erased from cache. The default value is *1 hour*. Several modules have a similar option; and some core ejabberd parts -support similar options too, see [auth_cache_life_time](/admin/configuration/toplevel/#auth-cache-life-time), -[oauth_cache_life_time](/admin/configuration/toplevel/#oauth-cache-life-time), [router_cache_life_time](/admin/configuration/toplevel/#router-cache-life-time), and -[sm_cache_life_time](/admin/configuration/toplevel/#sm-cache-life-time). +support similar options too, see [auth_cache_life_time](#auth_cache_life_time), +[oauth_cache_life_time](#oauth_cache_life_time), [router_cache_life_time](#router_cache_life_time), and +[sm_cache_life_time](#sm_cache_life_time). ## cache\_missed @@ -396,11 +400,11 @@ support similar options too, see [auth_cache_life_time](/admin/configuration/top Whether or not to cache missed lookups. When there is an attempt to lookup for a value in a database and this value is not found and the option is set to *true*, this attempt will be cached and no attempts -will be performed until the cache expires (see [cache_life_time](/admin/configuration/toplevel/#cache-life-time)). +will be performed until the cache expires (see [cache_life_time](#cache_life_time)). Usually you don’t want to change it. Default is *true*. Several modules have a similar option; and some core ejabberd parts support similar -options too, see [auth_cache_missed](/admin/configuration/toplevel/#auth-cache-missed), [oauth_cache_missed](/admin/configuration/toplevel/#oauth-cache-missed), -[router_cache_missed](/admin/configuration/toplevel/#router-cache-missed), and [sm_cache_missed](/admin/configuration/toplevel/#sm-cache-missed). +options too, see [auth_cache_missed](#auth_cache_missed), [oauth_cache_missed](#oauth_cache_missed), +[router_cache_missed](#router_cache_missed), and [sm_cache_missed](#sm_cache_missed). ## cache\_size @@ -414,54 +418,60 @@ items are deleted, and the corresponding warning is logged. You should avoid frequent cache clearance, because this degrades performance. The default value is *1000*. Several modules have a similar option; and some core ejabberd parts support similar options too, see -[auth_cache_size](/admin/configuration/toplevel/#auth-cache-size), [oauth_cache_size](/admin/configuration/toplevel/#oauth-cache-size), [router_cache_size](/admin/configuration/toplevel/#router-cache-size), and -[sm_cache_size](/admin/configuration/toplevel/#sm-cache-size). - -
improved in 23.01
+[auth_cache_size](#auth_cache_size), [oauth_cache_size](#oauth_cache_size), [router_cache_size](#router_cache_size), and +[sm_cache_size](#sm_cache_size). ## captcha\_cmd *Path | ModuleName* -Full path to a script that generates [CAPTCHA](/admin/configuration/basic/#captcha) -images. *@VERSION@* is replaced with ejabberd version number in *XX.YY* -format. *@SEMVER@* is replaced with ejabberd version number in semver -format when compiled with Elixir’s mix, or XX.YY format otherwise. -Alternatively, it can be the name of a module that implements ejabberd -CAPTCHA support. There is no default value: when this option is not set, -CAPTCHA functionality is completely disabled. + + +Full path to a script that +generates [CAPTCHA](basic.md#captcha) images. *@VERSION@* is replaced +with ejabberd version number in *XX.YY* format. *@SEMVER@* is replaced +with ejabberd version number in semver format when compiled with +Elixir’s mix, or XX.YY format otherwise. Alternatively, it can be the +name of a module that implements ejabberd CAPTCHA support. There is no +default value: when this option is not set, CAPTCHA functionality is +completely disabled. + +**Examples**: When using the ejabberd installers or container image, the example captcha scripts can be used like this: - captcha_cmd: /opt/ejabberd-@VERSION@/lib/ejabberd-@SEMVER@/priv/bin/captcha.sh +~~~ yaml +captcha_cmd: /opt/ejabberd-@VERSION@/lib/ejabberd-@SEMVER@/priv/bin/captcha.sh +~~~ ## captcha\_host *String* -Deprecated. Use [captcha_url](/admin/configuration/toplevel/#captcha-url) instead. +Deprecated. Use [captcha_url](#captcha_url) instead. ## captcha\_limit *pos\_integer() | infinity* -Maximum number of [CAPTCHA](/admin/configuration/basic/#captcha) generated images -per minute for any given JID. The option is intended to protect the -server from CAPTCHA DoS. The default value is *infinity*. - -
improved in 23.04
+Maximum number of [CAPTCHA](basic.md#captcha) generated images per +minute for any given JID. The option is intended to protect the server +from CAPTCHA DoS. The default value is *infinity*. ## captcha\_url *URL | auto | undefined* -An URL where [CAPTCHA](/admin/configuration/basic/#captcha) requests should be -sent. NOTE: you need to configure *request\_handlers* for -*ejabberd\_http* listener as well. If set to *auto*, it builds the URL -using a *request\_handler* already enabled, with encryption if -available. If set to *undefined*, it builds the URL using the deprecated -[captcha_host](/admin/configuration/toplevel/#captcha-host) + /captcha. The default value is *auto*. + + +An URL where +[CAPTCHA](basic.md#captcha) requests should be sent. NOTE: you need to +configure *request\_handlers* for *ejabberd\_http* listener as well. If +set to *auto*, it builds the URL using a *request\_handler* already +enabled, with encryption if available. If set to *undefined*, it builds +the URL using the deprecated [captcha_host](#captcha_host) + /captcha. The default +value is *auto*. ## certfiles @@ -477,12 +487,16 @@ this option when TLS is enabled in either of ejabberd listeners: certificate files or change the value of the option, run *ejabberdctl reload-config* in order to rebuild and reload the certificate chains. +**Examples**: + If you use [Let’s Encrypt](https://letsencrypt.org) certificates for your domain "domain.tld", the configuration will look like this: - certfiles: - - /etc/letsencrypt/live/domain.tld/fullchain.pem - - /etc/letsencrypt/live/domain.tld/privkey.pem +~~~ yaml +certfiles: + - /etc/letsencrypt/live/domain.tld/fullchain.pem + - /etc/letsencrypt/live/domain.tld/privkey.pem +~~~ ## cluster\_backend @@ -529,16 +543,18 @@ macro. **Example**: - define_macro: - DEBUG: debug - LOG_LEVEL: DEBUG - USERBOB: - user: bob@localhost +~~~ yaml +define_macro: + DEBUG: debug + LOG_LEVEL: DEBUG + USERBOB: + user: bob@localhost - loglevel: LOG_LEVEL +loglevel: LOG_LEVEL - acl: - admin: USERBOB +acl: + admin: USERBOB +~~~ ## disable\_sasl\_mechanisms @@ -588,12 +604,14 @@ connected as *Domain*, available *Options* are: **Example**: - domain_balancing: - component.domain.tld: - type: destination - component_number: 5 - transport.example.org: - type: bare_source +~~~ yaml +domain_balancing: + component.domain.tld: + type: destination + component_number: 5 + transport.example.org: + type: bare_source +~~~ ## ext\_api\_headers @@ -671,17 +689,19 @@ example below LDAP authentication method will be used on virtual host **Example**: - hosts: - - domain.tld - - example.org +~~~ yaml +hosts: + - domain.tld + - example.org - auth_method: - - sql +auth_method: + - sql - host_config: - domain.tld: - auth_method: - - ldap +host_config: + domain.tld: + auth_method: + - ldap +~~~ ## hosts @@ -709,14 +729,14 @@ following: options in the included file *Filename*. The options that match this criteria are not accepted. The default value is an empty list. -
added in 23.10
- ## install\_contrib\_modules *\[Module, ...\]* + + Modules to install from -[ejabberd-contrib](https://docs.ejabberd.im/developer/extending-ejabberd/modules/#ejabberd-contrib) +[ejabberd-contrib](../../developer/extending-ejabberd/modules.md#ejabberd-contrib) at start time. The default value is an empty list of modules: *\[\]*. ## jwt\_auth\_only\_rule @@ -756,7 +776,7 @@ attribute, the specified language is used. The default value is *"en"*. *\[Host, ...\]* A list of IP addresses or DNS names of LDAP backup servers. When no -servers listed in [ldap_servers](/admin/configuration/toplevel/#ldap-servers) option are reachable, ejabberd will +servers listed in [ldap_servers](#ldap_servers) option are reachable, ejabberd will try to connect to these backup servers. The default is an empty list, i.e. no backup servers specified. WARNING: ejabberd doesn’t try to reconnect back to the main servers when they become operational again, @@ -791,13 +811,15 @@ variables are consecutively replaced by values from the attributes in *FilterAttrs* and "%D" is replaced by Distinguished Name from the result set. There is no default value, which means the result is not filtered. WARNING: Since this filter makes additional LDAP lookups, use it only as -the last resort: try to define all filter rules in [ldap_filter](/admin/configuration/toplevel/#ldap-filter) +the last resort: try to define all filter rules in [ldap_filter](#ldap_filter) option if possible. **Example**: - ldap_dn_filter: - "(&(name=%s)(owner=%D)(user=%u@%d))": [sn] +~~~ yaml +ldap_dn_filter: + "(&(name=%s)(owner=%D)(user=%u@%d))": [sn] +~~~ ## ldap\_encrypt @@ -897,34 +919,36 @@ JID. For example, "%.org". If the value is in the form of *\[Options, ...\]* -The option for listeners configuration. See the [Listen -Modules](/admin/configuration/listen/) section for details. - -
added in 22.10
+The option for listeners configuration. See the +[Listen Modules](listen.md) section for details. ## log\_burst\_limit\_count *Number* -The number of messages to accept in `log_burst_limit_window_time` period -before starting to drop them. Default 500 + -
added in 22.10
+The number of messages to +accept in `log_burst_limit_window_time` period before starting to drop +them. Default 500 ## log\_burst\_limit\_window\_time *Number* -The time period to rate-limit log messages by. Defaults to 1 second. + -
added in 23.01
+The time period to rate-limit +log messages by. Defaults to 1 second. ## log\_modules\_fully *\[Module, ...\]* -List of modules that will log everything independently from the general -loglevel option. + + +List of modules that will log +everything independently from the general loglevel option. ## log\_rotate\_count @@ -968,8 +992,8 @@ value is *10000*. *{Module: Options}* -The option for modules configuration. See [Modules](/admin/configuration/modules/) -section for details. +The option for modules configuration. See [Modules](modules.md) section +for details. ## negotiation\_timeout @@ -995,7 +1019,7 @@ default value is *1 minute*. *true | false* Whether to use *new* SQL schema. All schemas are located at -. There are two +. There are two schemas available. The default legacy schema stores one XMPP domain into one ejabberd database. The *new* schema can handle several XMPP domains in a single ejabberd database. Using this *new* schema is best when @@ -1016,31 +1040,31 @@ can create OAuth tokens, you can refer to an ejabberd access rule in the *timeout()* -Same as [cache_life_time](/admin/configuration/toplevel/#cache-life-time), but applied to OAuth cache only. If not -set, the value from [cache_life_time](/admin/configuration/toplevel/#cache-life-time) will be used. +Same as [cache_life_time](#cache_life_time), but applied to OAuth cache only. If not +set, the value from [cache_life_time](#cache_life_time) will be used. ## oauth\_cache\_missed *true | false* -Same as [cache_missed](/admin/configuration/toplevel/#cache-missed), but applied to OAuth cache only. If not set, -the value from [cache_missed](/admin/configuration/toplevel/#cache-missed) will be used. - -
added in 21.01
+Same as [cache_missed](#cache_missed), but applied to OAuth cache only. If not set, +the value from [cache_missed](#cache_missed) will be used. ## oauth\_cache\_rest\_failure\_life\_time *timeout()* -The time that a failure in OAuth ReST is cached. The default value is -*infinity*. + + +The time that a failure in +OAuth ReST is cached. The default value is *infinity*. ## oauth\_cache\_size *pos\_integer() | infinity* -Same as [cache_size](/admin/configuration/toplevel/#cache-size), but applied to OAuth cache only. If not set, the -value from [cache_size](/admin/configuration/toplevel/#cache-size) will be used. +Same as [cache_size](#cache_size), but applied to OAuth cache only. If not set, the +value from [cache_size](#cache_size) will be used. ## oauth\_client\_id\_check @@ -1055,7 +1079,7 @@ value is *allow*. *mnesia | sql* Database backend to use for OAuth authentication. The default value is -picked from [default_db](/admin/configuration/toplevel/#default-db) option, or if it’s not set, *mnesia* will be +picked from [default_db](#default_db) option, or if it’s not set, *mnesia* will be used. ## oauth\_expire @@ -1070,15 +1094,15 @@ used and is removed from the database. The default is *4294967* seconds. *true | false* -Same as [use_cache](/admin/configuration/toplevel/#use-cache), but applied to OAuth cache only. If not set, the -value from [use_cache](/admin/configuration/toplevel/#use-cache) will be used. +Same as [use_cache](#use_cache), but applied to OAuth cache only. If not set, the +value from [use_cache](#use_cache) will be used. ## oom\_killer *true | false* Enable or disable OOM (out-of-memory) killer. When system memory raises -above the limit defined in [oom_watermark](/admin/configuration/toplevel/#oom-watermark) option, ejabberd triggers +above the limit defined in [oom_watermark](#oom_watermark) option, ejabberd triggers OOM killer to terminate most memory consuming Erlang processes. Note that in order to maintain functionality, ejabberd only attempts to kill transient processes, such as those managing client sessions, s2s or @@ -1090,7 +1114,7 @@ database connections. The default value is *true*. Trigger OOM killer when some of the running Erlang processes have messages queue above this *Size*. Note that such processes won’t be -killed if [oom_killer](/admin/configuration/toplevel/#oom-killer) option is set to *false* or if *oom\_watermark* +killed if [oom_killer](#oom_killer) option is set to *false* or if *oom\_watermark* is not reached yet. ## oom\_watermark @@ -1099,39 +1123,40 @@ is not reached yet. A percent of total system memory consumed at which OOM killer should be activated with some of the processes possibly be killed (see -[oom_killer](/admin/configuration/toplevel/#oom-killer) option). Later, when memory drops below this *Percent*, +[oom_killer](#oom_killer) option). Later, when memory drops below this *Percent*, OOM killer is deactivated. The default value is *80* percents. -
changed in 23.01
- ## outgoing\_s2s\_families *\[ipv6 | ipv4, ...\]* -Specify which address families to try, in what order. The default is -*\[ipv6, ipv4\]* which means it first tries connecting with IPv6, if -that fails it tries using IPv4. This option is obsolete and irrelevant -when using ejabberd 23.01 and Erlang/OTP 22, or newer versions of them. + -
added in 20.12
+Specify which address +families to try, in what order. The default is *\[ipv6, ipv4\]* which +means it first tries connecting with IPv6, if that fails it tries using +IPv4. This option is obsolete and irrelevant when using ejabberd [23.01](../../archive/23.01/index.md) +and Erlang/OTP 22, or newer versions of them. ## outgoing\_s2s\_ipv4\_address *Address* -Specify the IPv4 address that will be used when establishing an outgoing -S2S IPv4 connection, for example "127.0.0.1". The default value is -*undefined*. + -
added in 20.12
+Specify the IPv4 address that +will be used when establishing an outgoing S2S IPv4 connection, for +example "127.0.0.1". The default value is *undefined*. ## outgoing\_s2s\_ipv6\_address *Address* -Specify the IPv6 address that will be used when establishing an outgoing -S2S IPv6 connection, for example "::FFFF:127.0.0.1". The default value -is *undefined*. + + +Specify the IPv6 address that +will be used when establishing an outgoing S2S IPv6 connection, for +example "::FFFF:127.0.0.1". The default value is *undefined*. ## outgoing\_s2s\_port @@ -1174,7 +1199,7 @@ default value is *false*. *Directory* -If [queue_type](/admin/configuration/toplevel/#queue-type) option is set to *file*, use this *Directory* to store +If [queue_type](#queue_type) option is set to *file*, use this *Directory* to store file queues. The default is to keep queues inside Mnesia directory. ## queue\_type @@ -1183,7 +1208,7 @@ file queues. The default is to keep queues inside Mnesia directory. Default type of queues in ejabberd. Modules may have its own value of the option. The value of *ram* means that queues will be kept in memory. -If value *file* is set, you may also specify directory in [queue_dir](/admin/configuration/toplevel/#queue-dir) +If value *file* is set, you may also specify directory in [queue_dir](#queue_dir) option where file queues will be placed. The default value is *ram*. ## redis\_connect\_timeout @@ -1225,8 +1250,8 @@ The port where the Redis server is accepting connections. The default is *ram | file* The type of request queue for the Redis server. See description of -[queue_type](/admin/configuration/toplevel/#queue-type) option for the explanation. The default value is the -value defined in [queue_type](/admin/configuration/toplevel/#queue-type) or *ram* if the latter is not set. +[queue_type](#queue_type) option for the explanation. The default value is the +value defined in [queue_type](#queue_type) or *ram* if the latter is not set. ## redis\_server @@ -1239,7 +1264,7 @@ A hostname or an IP address of the Redis server. The default is *timeout()* -This is a global option for module [mod_register](/admin/configuration/modules/#mod-register). It limits the +This is a global option for module [mod_register](modules.md#mod_register). It limits the frequency of registrations from a given IP or username. So, a user that tries to register a new account from the same IP address or JID during this time after their previous registration will receive an error with @@ -1262,37 +1287,37 @@ action performed is *closeold*. *timeout()* -Same as [cache_life_time](/admin/configuration/toplevel/#cache-life-time), but applied to routing table cache only. If -not set, the value from [cache_life_time](/admin/configuration/toplevel/#cache-life-time) will be used. +Same as [cache_life_time](#cache_life_time), but applied to routing table cache only. If +not set, the value from [cache_life_time](#cache_life_time) will be used. ## router\_cache\_missed *true | false* -Same as [cache_missed](/admin/configuration/toplevel/#cache-missed), but applied to routing table cache only. If -not set, the value from [cache_missed](/admin/configuration/toplevel/#cache-missed) will be used. +Same as [cache_missed](#cache_missed), but applied to routing table cache only. If +not set, the value from [cache_missed](#cache_missed) will be used. ## router\_cache\_size *pos\_integer() | infinity* -Same as [cache_size](/admin/configuration/toplevel/#cache-size), but applied to routing table cache only. If not -set, the value from [cache_size](/admin/configuration/toplevel/#cache-size) will be used. +Same as [cache_size](#cache_size), but applied to routing table cache only. If not +set, the value from [cache_size](#cache_size) will be used. ## router\_db\_type *mnesia | redis | sql* Database backend to use for routing information. The default value is -picked from [default_ram_db](/admin/configuration/toplevel/#default-ram-db) option, or if it’s not set, *mnesia* will +picked from [default_ram_db](#default_ram_db) option, or if it’s not set, *mnesia* will be used. ## router\_use\_cache *true | false* -Same as [use_cache](/admin/configuration/toplevel/#use-cache), but applied to routing table cache only. If not -set, the value from [use_cache](/admin/configuration/toplevel/#use-cache) will be used. +Same as [use_cache](#use_cache), but applied to routing table cache only. If not +set, the value from [use_cache](#use_cache) will be used. ## rpc\_timeout @@ -1306,7 +1331,7 @@ are used for internal needs only. The default value is *5* seconds. *Access* -This [Access Rule](/admin/configuration/basic/#access-rules) defines to what remote +This [Access Rule](basic.md#access-rules) defines to what remote servers can s2s connections be established. The default value is *all*; no restrictions are applied, it is allowed to connect s2s to/from all remote servers. @@ -1316,11 +1341,10 @@ remote servers. *Path* A path to a file with CA root certificates that will be used to -authenticate s2s connections. If not set, the value of -[ca\_file](/admin/configuration/toplevel/#ca-file) will be used. +authenticate s2s connections. If not set, the value of [ca_file](#ca_file) will +be used. -You can use [host\_config](/admin/configuration/toplevel/#host-config) to specify -this option per-vhost. +You can use [host_config](#host_config) to specify this option per-vhost. ## s2s\_ciphers @@ -1331,12 +1355,14 @@ is shown in the example below: **Example**: - s2s_ciphers: - - HIGH - - "!aNULL" - - "!eNULL" - - "!3DES" - - "@STRENGTH" +~~~ yaml +s2s_ciphers: + - HIGH + - "!aNULL" + - "!eNULL" + - "!3DES" + - "@STRENGTH" +~~~ ## s2s\_dhfile @@ -1378,18 +1404,20 @@ below: **Example**: - s2s_protocol_options: - - no_sslv3 - - cipher_server_preference - - no_compression +~~~ yaml +s2s_protocol_options: + - no_sslv3 + - cipher_server_preference + - no_compression +~~~ ## s2s\_queue\_type *ram | file* -The type of a queue for s2s packets. See description of [queue_type](/admin/configuration/toplevel/#queue-type) +The type of a queue for s2s packets. See description of [queue_type](#queue_type) option for the explanation. The default value is the value defined in -[queue_type](/admin/configuration/toplevel/#queue-type) or *ram* if the latter is not set. +[queue_type](#queue_type) or *ram* if the latter is not set. ## s2s\_timeout @@ -1430,7 +1458,7 @@ considered insecure. The option defines a set of shapers. Every shaper is assigned a name *ShaperName* that can be used in other parts of the configuration file, -such as [shaper_rules](/admin/configuration/toplevel/#shaper-rules) option. The shaper itself is defined by its +such as [shaper_rules](#shaper_rules) option. The shaper itself is defined by its *Rate*, where *Rate* stands for the maximum allowed incoming rate in **bytes** per second. When a connection exceeds this limit, ejabberd stops reading from the socket until the average rate is again below the @@ -1440,68 +1468,72 @@ speed to 1,000 bytes/sec and shaper *fast* limits the traffic speed to **Example**: - shaper: - normal: 1000 - fast: 50000 +~~~ yaml +shaper: + normal: 1000 + fast: 50000 +~~~ ## shaper\_rules *{ShaperRuleName: {Number|ShaperName: ACLRule|ACLName}}* An entry allowing to declaring shaper to use for matching user/hosts. -Semantics is similar to [access_rules](/admin/configuration/toplevel/#access-rules) option, the only difference is +Semantics is similar to [access_rules](#access_rules) option, the only difference is that instead using *allow* or *deny*, a name of a shaper (defined in -[shaper](/admin/configuration/toplevel/#shaper) option) or a positive number should be used. +[shaper](#shaper) option) or a positive number should be used. **Example**: - shaper_rules: - connections_limit: - 10: - user: peter@example.com - 100: admin - 5: all - download_speed: - fast: admin - slow: anonymous_users - normal: all - log_days: 30 +~~~ yaml +shaper_rules: + connections_limit: + 10: + user: peter@example.com + 100: admin + 5: all + download_speed: + fast: admin + slow: anonymous_users + normal: all + log_days: 30 +~~~ ## sm\_cache\_life\_time *timeout()* -Same as [cache_life_time](/admin/configuration/toplevel/#cache-life-time), but applied to client sessions table cache -only. If not set, the value from [cache_life_time](/admin/configuration/toplevel/#cache-life-time) will be used. +Same as [cache_life_time](#cache_life_time), but applied to client sessions table cache +only. If not set, the value from [cache_life_time](#cache_life_time) will be used. ## sm\_cache\_missed *true | false* -Same as [cache_missed](/admin/configuration/toplevel/#cache-missed), but applied to client sessions table cache -only. If not set, the value from [cache_missed](/admin/configuration/toplevel/#cache-missed) will be used. +Same as [cache_missed](#cache_missed), but applied to client sessions table cache +only. If not set, the value from [cache_missed](#cache_missed) will be used. ## sm\_cache\_size *pos\_integer() | infinity* -Same as [cache_size](/admin/configuration/toplevel/#cache-size), but applied to client sessions table cache only. -If not set, the value from [cache_size](/admin/configuration/toplevel/#cache-size) will be used. +Same as [cache_size](#cache_size), but applied to client sessions table cache only. +If not set, the value from [cache_size](#cache_size) will be used. ## sm\_db\_type *mnesia | redis | sql* Database backend to use for client sessions information. The default -value is picked from [default_ram_db](/admin/configuration/toplevel/#default-ram-db) option, or if it’s not set, +value is picked from [default_ram_db](#default_ram_db) option, or if it’s not set, *mnesia* will be used. ## sm\_use\_cache *true | false* -Same as [use_cache](/admin/configuration/toplevel/#use-cache), but applied to client sessions table cache only. -If not set, the value from [use_cache](/admin/configuration/toplevel/#use-cache) will be used. +Same as [use_cache](#use_cache), but applied to client sessions table cache only. +If not set, the value from [use_cache](#use_cache) will be used. ## sql\_connect\_timeout @@ -1517,15 +1549,15 @@ default value is *5* seconds. An SQL database name. For SQLite this must be a full path to a database file. The default value is *ejabberd*. -
added in 24.02
- ## sql\_flags *\[mysql\_alternative\_upsert\]* -This option accepts a list of SQL flags, and is empty by default. -*mysql\_alternative\_upsert* forces the alternative upsert -implementation in MySQL. + + +This option accepts a list of +SQL flags, and is empty by default. *mysql\_alternative\_upsert* forces +the alternative upsert implementation in MySQL. ## sql\_keepalive\_interval @@ -1535,16 +1567,16 @@ An interval to make a dummy SQL request to keep alive the connections to the database. There is no default value, so no keepalive requests are made. -
added in 20.12
- ## sql\_odbc\_driver *Path* -Path to the ODBC driver to use to connect to a Microsoft SQL Server -database. This option only applies if the [sql_type](/admin/configuration/toplevel/#sql-type) option is set to -*mssql* and [sql_server](/admin/configuration/toplevel/#sql-server) is not an ODBC connection string. The default -value is: *libtdsodbc.so* + + +Path to the ODBC driver to use +to connect to a Microsoft SQL Server database. This option only applies +if the [sql_type](#sql_type) option is set to *mssql* and [sql_server](#sql_server) is not +an ODBC connection string. The default value is: *libtdsodbc.so* ## sql\_password @@ -1569,14 +1601,15 @@ The port where the SQL server is accepting connections. The default is *3306* for MySQL, *5432* for PostgreSQL and *1433* for MS SQL. The option has no effect for SQLite. -
added in 20.01
- ## sql\_prepared\_statements *true | false* -This option is *true* by default, and is useful to disable prepared -statements. The option is valid for PostgreSQL and MySQL. + + +This option is *true* by +default, and is useful to disable prepared statements. The option is +valid for PostgreSQL and MySQL. ## sql\_query\_timeout @@ -1590,33 +1623,37 @@ seconds. *ram | file* The type of a request queue for the SQL server. See description of -[queue_type](/admin/configuration/toplevel/#queue-type) option for the explanation. The default value is the -value defined in [queue_type](/admin/configuration/toplevel/#queue-type) or *ram* if the latter is not set. +[queue_type](#queue_type) option for the explanation. The default value is the +value defined in [queue_type](#queue_type) or *ram* if the latter is not set. -## sql\_server +## sql\_server 🟤 -*Host* +*Host | IP Address | ODBC Connection String | Unix Socket Path* -The hostname or IP address of the SQL server. For [sql_type](/admin/configuration/toplevel/#sql-type) *mssql* -or *odbc* this can also be an ODBC connection string. The default value -is *localhost*. + -
improved in 20.03
+The hostname or IP address +of the SQL server. For [sql_type](#sql_type) *mssql* or *odbc* this can also be +an ODBC connection string. When [sql_type](#sql_type) is *mysql* or *pgsql*, this +can be the path to a unix domain socket expressed like: +"unix:/path/to/socket".The default value is *localhost*. ## sql\_ssl *true | false* -Whether to use SSL encrypted connections to the SQL server. The option -is only available for MySQL, MS SQL and PostgreSQL. The default value is -*false*. + + +Whether to use SSL +encrypted connections to the SQL server. The option is only available +for MySQL, MS SQL and PostgreSQL. The default value is *false*. ## sql\_ssl\_cafile *Path* A path to a file with CA root certificates that will be used to verify -SQL connections. Implies [sql_ssl](/admin/configuration/toplevel/#sql-ssl) and [sql_ssl_verify](/admin/configuration/toplevel/#sql-ssl-verify) options are +SQL connections. Implies [sql_ssl](#sql_ssl) and [sql_ssl_verify](#sql_ssl_verify) options are set to *true*. There is no default which means certificate verification is disabled. This option has no effect for MS SQL. @@ -1625,7 +1662,7 @@ is disabled. This option has no effect for MS SQL. *Path* A path to a certificate file that will be used for SSL connections to -the SQL server. Implies [sql_ssl](/admin/configuration/toplevel/#sql-ssl) option is set to *true*. There is no +the SQL server. Implies [sql_ssl](#sql_ssl) option is set to *true*. There is no default which means ejabberd won’t provide a client certificate to the SQL server. This option has no effect for MS SQL. @@ -1634,7 +1671,7 @@ SQL server. This option has no effect for MS SQL. *true | false* Whether to verify SSL connection to the SQL server against CA root -certificates defined in [sql_ssl_cafile](/admin/configuration/toplevel/#sql-ssl-cafile) option. Implies [sql_ssl](/admin/configuration/toplevel/#sql-ssl) +certificates defined in [sql_ssl_cafile](#sql_ssl_cafile) option. Implies [sql_ssl](#sql_ssl) option is set to *true*. This option has no effect for MS SQL. The default value is *false*. @@ -1671,11 +1708,15 @@ for admin purpose, or security configuration (for example using client can set it itself and as a result the IP value cannot be trusted for security rules in ejabberd. -## update\_sql\_schema +## update\_sql\_schema 🟤 *true | false* -Allow ejabberd to update SQL schema. The default value is *true*. + + +Allow ejabberd to update SQL +schema. This option was added in ejabberd [23.10](../../archive/23.10/index.md), and enabled by default +since [24.06](../../archive/24.06/index.md). The default value is *true*. ## use\_cache @@ -1683,8 +1724,8 @@ Allow ejabberd to update SQL schema. The default value is *true*. Enable or disable cache. The default is *true*. Several modules have a similar option; and some core ejabberd parts support similar options -too, see [auth_use_cache](/admin/configuration/toplevel/#auth-use-cache), [oauth_use_cache](/admin/configuration/toplevel/#oauth-use-cache), [router_use_cache](/admin/configuration/toplevel/#router-use-cache), -and [sm_use_cache](/admin/configuration/toplevel/#sm-use-cache). +too, see [auth_use_cache](#auth_use_cache), [oauth_use_cache](#oauth_use_cache), [router_use_cache](#router_use_cache), +and [sm_use_cache](#sm_use_cache). ## validate\_stream @@ -1702,7 +1743,7 @@ value is *false*. *string()* The option can be used to set custom ejabberd version, that will be used -by different parts of ejabberd, for example by [mod_version](/admin/configuration/modules/#mod-version) module. +by different parts of ejabberd, for example by [mod_version](modules.md#mod_version) module. The default value is obtained at compile time from the underlying version control system. diff --git a/content/admin/ejabberdctl/index.md b/content/admin/ejabberdctl/index.md old mode 100755 new mode 100644 index 0268f3be..51aedfd5 --- a/content/admin/ejabberdctl/index.md +++ b/content/admin/ejabberdctl/index.md @@ -1,13 +1,7 @@ ---- -title: ejabberdctl Command-Line Reference ---- +# ejabberdctl Reference Here are main features covered by `ejabberdctl` command-line tool: -- [ejabberdctl overview][1] -- [Administration Commands API][2] -- [Multi User Chat Administration Commands][3] - -[1]: /admin/guide/managing/#ejabberdctl-commands -[2]: /developer/ejabberd-api/admin-api/ "Administration Commands API" -[3]: /admin/ejabberdctl/muc-admin/ "Multi User Chat Administration Commands" +- [ejabberdctl overview](../guide/managing.md#ejabberdctl-commands) +- [Administration Commands API](../../developer/ejabberd-api/admin-api.md) +- [Multi User Chat Administration Commands](muc-admin.md) diff --git a/content/admin/ejabberdctl/muc-admin.md b/content/admin/ejabberdctl/muc-admin.md old mode 100755 new mode 100644 index dccc29d9..173a83a4 --- a/content/admin/ejabberdctl/muc-admin.md +++ b/content/admin/ejabberdctl/muc-admin.md @@ -1,169 +1,159 @@ ---- -title: Multi User Chat Administration Commands -toc: true -menu: Multi User Chat (MUC) ---- +# Multi User Chat Administration Commands -# Prerequisite +## Prerequisite -Most of the command to manage MUC service depends on the activation of -`mod_muc_admin` module in ejabberd. +Most of the command to manage MUC service depends on the activation of `mod_muc_admin` module in ejabberd. -`mod_muc_admin` is included in ejabberd main code base since -[ejabberd 15.04][1]. +`mod_muc_admin` is included in ejabberd main code base since [ejabberd 15.04](https://www.process-one.net/blog/ejabberd-15-04/). -To enable `mod_muc_admin`-dependant `ejabberdctl` commands, you just -need to add `mod_muc_admin` in `modules` section of ejabberd config -file. +To enable `mod_muc_admin`-dependant `ejabberdctl` commands, you just need to add `mod_muc_admin` in `modules` section of ejabberd config file. -For example, in `ejabberd.yml` format: +For example, in `ejabberd.yml` format: -~~~ yaml +``` yaml modules: mod_muc_admin: {} -~~~ +``` -# Commands +## Commands The most updated and detailed list of commands for managing a MUC service and MUC rooms is available -in the [muc API tag](/developer/ejabberd-api/admin-tags/#muc) -and the [muc_room API tag](/developer/ejabberd-api/admin-tags/#muc-room). +in the [muc API tag](../../developer/ejabberd-api/admin-tags.md#muc) +and the [muc_room API tag](../../developer/ejabberd-api/admin-tags.md#muc_room). -## Online Rooms +### Online Rooms List existing rooms ('global' to get all vhosts). -~~~ bash +``` sh ejabberdctl muc_online_rooms [global] -~~~ +``` -## Unregister nickname +### Unregister nickname Unregister the nick in the MUC service. -~~~ bash +``` sh ejabberdctl muc_unregister_nick nickname -~~~ +``` -## Create MUC room +### Create MUC room Create a MUC room `name@service` in host. -~~~ bash +``` sh ejabberdctl create_room room_name muc_service xmpp_domain -~~~ +``` -## Destroy MUC room +### Destroy MUC room Destroy a MUC chat room. -~~~ bash +``` sh ejabberdctl destroy_room room_name muc_service -~~~ +``` -## Create multiple rooms from file +### Create multiple rooms from file Create the rooms listed in a local file. -~~~ bash +``` sh ejabberdctl create_rooms_file filename -~~~ +``` TODO: Describe the file format. -## Destroy multiple rooms from file +### Destroy multiple rooms from file Destroy the rooms indicated in a local file. -~~~ bash +``` sh ejabberdctl destroy_rooms_file filename -~~~ +``` -## List unused MUC rooms +### List unused MUC rooms List rooms that have not been used in several days on an XMPP domain. -~~~ bash +``` sh ejabberdctl rooms_unused_list xmpp_domain number_of_days -~~~ +``` -## Destroy unused MUC rooms +### Destroy unused MUC rooms Destroy rooms that have not been used in several days on an XMPP domain. -~~~ bash +``` sh ejabberdctl rooms_unused_destroy xmpp_domain number_of_days -~~~ +``` -## List rooms joined by a given user +### List rooms joined by a given user Get the list of rooms where a user is occupant. -~~~ bash +``` sh ejabberdctl get_user_rooms user_real_jid xmpp_domain -~~~ +``` -## List the occupants of a MUC room +### List the occupants of a MUC room Get the list of occupants of a MUC room. -~~~ bash +``` sh ejabberdctl get_room_occupants room_name muc_service -~~~ +``` -## Retrieve number of occupants in a MUC room +### Retrieve number of occupants in a MUC room Get the number of occupants of a MUC room. -~~~ bash +``` sh ejabberdctl get_room_occupants_number room_name muc_service -~~~ +``` -## Invite several users to a MUC room +### Invite several users to a MUC room Send a direct invitation to several JIDs. Password and Message can also be: none. Users JIDs are separated with ':'. -~~~ bash +``` sh ejabberdctl send_direct_invitation room_name muc_service password reason jid1[:jid2] -~~~ +``` -## Change option for a MUC room +### Change option for a MUC room Change an option in a MUC room. -~~~ bash +``` sh ejabberdctl change_room_option room_name muc_service option value -~~~ +``` -## Get options from a MUC room +### Get options from a MUC room Get options from a MUC room. -~~~ bash +``` sh ejabberdctl get_room_options room_name muc_service -~~~ +``` -## Change affiliation for a user in a MUC room +### Change affiliation for a user in a MUC room Change an affiliation in a MUC room. Affiliation can be one of: owner, admin, member, outcast, none. -~~~ bash +``` sh ejabberdctl set_room_affiliation room_name muc_service user_jid affiliation -~~~ +``` -## Get affiliations for a MUC room +### Get affiliations for a MUC room Get the list of affiliations of a MUC room. -~~~ bash +``` sh ejabberdctl get_room_affiliations room_name muc_service -~~~ - -[1]: https://www.process-one.net/blog/ejabberd-15-04/ +``` diff --git a/content/admin/faq/index.md b/content/admin/faq/index.md deleted file mode 100755 index b6e39519..00000000 --- a/content/admin/faq/index.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: ejabberd operation FAQ ---- - -# Multi-User Chat - -## How to list all MUC room on a server - -Thanks to contributed module 'mod_muc_admin', you can get a better control on the rooms on your server: - -1. Install - '[mod_muc_admin](https://github.com/processone/ejabberd-contrib/tree/master/mod_muc_admin)' - module from the 'ejabberd-contrib' repository -2. Run the following command: - - ``` - ejabberdctl muc_online_rooms global - ``` - diff --git a/content/admin/faq/runtime-errors.md b/content/admin/faq/runtime-errors.md deleted file mode 100755 index 9f110ea7..00000000 --- a/content/admin/faq/runtime-errors.md +++ /dev/null @@ -1,3 +0,0 @@ ---- -redirect: /admin/guide/troubleshooting/ ---- diff --git a/content/admin/guide/advanced.md b/content/admin/guide/advanced.md deleted file mode 100755 index 0a3f0a37..00000000 --- a/content/admin/guide/advanced.md +++ /dev/null @@ -1,3 +0,0 @@ ---- -redirect: /admin/guide/clustering/#service-load-balancing ---- diff --git a/content/admin/guide/clustering.md b/content/admin/guide/clustering.md old mode 100755 new mode 100644 index b60f8356..81a679c4 --- a/content/admin/guide/clustering.md +++ b/content/admin/guide/clustering.md @@ -1,10 +1,6 @@ ---- -title: ejabberd Clustering -toc: true -menu: Clustering ---- +# Clustering -# Purpose +## Purpose The purpose of ejabberd clustering is to be able to use several servers for a single or small group of large domains, for @@ -17,7 +13,7 @@ different independent servers. However, to build reliable service and support large user base, clustering is a must have feature. -# How it Works +## How it Works A XMPP domain is served by one or more `ejabberd` nodes. These nodes can be run on different machines that are connected via a network. They all @@ -29,15 +25,12 @@ connected users, s2s connections, registered services, etc… Each `ejabberd` node has the following modules: -- router, +- router +- local router +- session manager +- s2s manager -- local router, - -- session manager, - -- s2s manager. - -## Router +### Router This module is the main router of XMPP packets on each node. It routes them based on their destination’s domains. It uses a global routing @@ -45,21 +38,21 @@ table. The domain of the packet’s destination is searched in the routing table, and if it is found, the packet is routed to the appropriate process. If not, it is sent to the s2s manager. -## Local Router +### Local Router This module routes packets which have a destination domain equal to one of this server’s host names. If the destination JID has a non-empty user part, it is routed to the session manager, otherwise it is processed depending on its content. -## Session Manager +### Session Manager This module routes packets to local users. It looks up to which user resource a packet must be sent via a presence table. Then the packet is either routed to the appropriate c2s process, or stored in offline storage, or bounced back. -## s2s Manager +### s2s Manager This module routes packets to other XMPP servers. First, it checks if an opened s2s connection from the domain of the packet’s source to the @@ -67,7 +60,7 @@ domain of the packet’s destination exists. If that is the case, the s2s manager routes the packet to the process serving this connection, otherwise a new connection is opened. -# Before you get started +## Before you get started Before you start implementing clustering, there are a few things you need to take into account: @@ -80,7 +73,7 @@ need to take into account: getting started, it is best to get familiar with the Erlang environment as this guide will heavily reference Erlang terms. -# Clustering Setup +## Clustering Setup ## Adding a node to a cluster @@ -98,23 +91,15 @@ together. you want to have the same `ejabberd.yml` config file on the new node that on the other cluster nodes. -3. Adding a node to the cluster is done by starting a new `ejabberd` - node within the same network, and running - [join_cluster](/developer/ejabberd-api/admin-api/#join-cluster) - from a cluster - node. On the `ejabberd02` node for example, as ejabberd is already - started, run the following command as the `ejabberd` daemon user, - using the ejabberdctl script: +3. Adding a node to the cluster is done by starting a new `ejabberd` node within the same network, and running [join_cluster](../../developer/ejabberd-api/admin-api.md#join_cluster) from a cluster node. On the `ejabberd02` node for example, as ejabberd is already started, run the following command as the `ejabberd` daemon user, using the ejabberdctl script: - ~~~ bash - $ ejabberdctl --no-timeout join_cluster 'ejabberd@ejabberd01' - ~~~ +``` sh +ejabberdctl --no-timeout join_cluster 'ejabberd@ejabberd01' +``` - This enables ejabberd's internal replications to be launched - across all nodes so new nodes can start receiving messages from - other nodes and be registered in the routing tables. +This enables ejabberd's internal replications to be launched across all nodes so new nodes can start receiving messages from other nodes and be registered in the routing tables. -## Removing a node from the cluster +### Removing a node from the cluster To remove a node from the cluster, it just needs to be shut down. There is no specific delay for the cluster to figure out that the node is @@ -131,28 +116,28 @@ attached back to the cluster until it has been explicitly removed permanently from the cluster. To permanently remove a running node from the cluster, the -[leave_cluster](/developer/ejabberd-api/admin-api/#leave-cluster) +[leave_cluster](../../developer/ejabberd-api/admin-api.md#leave_cluster) command must be run as the `ejabberd` daemon user, from one node of the cluster: -~~~ bash -$ ejabberdctl leave_cluster 'ejabberd@ejabberd02' -~~~ +``` sh +ejabberdctl leave_cluster 'ejabberd@ejabberd02' +``` The removed node must be running while calling leave_cluster to make it permanently removed. It's then immediately stopped. -## Restarting cluster nodes +### Restarting cluster nodes Ejabberd Community Server uses mnesia internal database to manage cluster -and internode synchronisation. As a result, you may restart ejabberd nodes +and internode synchronization. As a result, you may restart ejabberd nodes as long as there is at least one running node. If you stop the last running node of a cluster, you MUST restart that node first in order to get a running service back. -# Service Load-Balancing +## Service Load-Balancing -## Domain Load-Balancing Algorithm +### Domain Load-Balancing Algorithm `ejabberd` includes an algorithm to load balance the components that are plugged on an `ejabberd` cluster. It means that you can plug one or @@ -166,10 +151,10 @@ randomly chosen among the remote component instances. If you need a different behaviour, you can change the load balancing behaviour with the -[domain_balancing](/admin/configuration/toplevel/#domain-balancing) +[domain_balancing](../configuration/toplevel.md#domain_balancing) option. -## Load-Balancing Buckets +### Load-Balancing Buckets When there is a risk of failure for a given component, domain balancing can cause service trouble. If one component is failing the service will @@ -180,5 +165,5 @@ the failing component. This is what the `component_number` option does, making the load balancing algorithm not dynamic, but sticky on a fix number of component instances. -Check [domain_balancing](/admin/configuration/toplevel/#domain-balancing) +Check [domain_balancing](../configuration/toplevel.md#domain_balancing) top-level option documentation for details. diff --git a/content/admin/guide/configuration.md b/content/admin/guide/configuration.md deleted file mode 100755 index d1d90329..00000000 --- a/content/admin/guide/configuration.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect: /admin/configuration/ ---- - diff --git a/content/admin/guide/databases/index.md b/content/admin/guide/databases/index.md deleted file mode 100755 index 880c1547..00000000 --- a/content/admin/guide/databases/index.md +++ /dev/null @@ -1,3 +0,0 @@ ---- -redirect: /admin/databases/ ---- diff --git a/content/admin/guide/index.md b/content/admin/guide/index.md old mode 100755 new mode 100644 index 754cf144..32247f5d --- a/content/admin/guide/index.md +++ b/content/admin/guide/index.md @@ -1,21 +1,9 @@ ---- -title: Advanced ejabberd Administration -menu: Advanced Topics -order: 20 ---- +# Advanced ejabberd Administration -- [Clustering ejabberd][6] -- [Managing an ejabberd server][4] -- [MQTT Support][16] -- [Securing ejabberd][5] -- [Troubleshooting ejabberd][9] -- [Unattended installation][7] -- [XMPP Extensions][11], and how to support them - -[4]: managing/ -[5]: security/ -[6]: clustering/ -[7]: unattended/ -[9]: troubleshooting/ -[11]: xep/ -[16]: mqtt/ +- [Clustering ejabberd](clustering.md) +- [Managing an ejabberd server](managing.md) +- [MQTT Support](./mqtt/index.md) +- [Securing ejabberd](security.md) +- [Troubleshooting ejabberd](troubleshooting.md) +- [Unattended installation](unattended.md) +- [XMPP Extensions](./xep/index.md), and how to support them diff --git a/content/admin/guide/installation.md b/content/admin/guide/installation.md deleted file mode 100755 index 313bfcb6..00000000 --- a/content/admin/guide/installation.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect: /admin/installation/ ---- - diff --git a/content/admin/guide/introduction.md b/content/admin/guide/introduction.md deleted file mode 100755 index 24711c8d..00000000 --- a/content/admin/guide/introduction.md +++ /dev/null @@ -1,3 +0,0 @@ ---- -redirect: /admin/introduction/ ---- diff --git a/content/admin/guide/managing.md b/content/admin/guide/managing.md old mode 100755 new mode 100644 index 86538f61..01ace6a3 --- a/content/admin/guide/managing.md +++ b/content/admin/guide/managing.md @@ -1,10 +1,6 @@ ---- -title: Managing an ejabberd server -toc: true -menu: Managing ---- +# Managing an ejabberd server -# ejabberdctl +## ejabberdctl With the `ejabberdctl` command line administration script you can execute `ejabberdctl commands` (described in the next section, @@ -25,10 +21,9 @@ used for specific results. This can be used by other scripts to determine automatically if a command succeeded or failed, for example using: `echo $?` -To restrict what commands can be executed; -see [API Permissions](/developer/ejabberd-api/permissions/). +To restrict what commands can be executed; see [API Permissions](../../developer/ejabberd-api/permissions.md). -## Bash Completion +### Bash Completion If you use Bash, you can get Bash completion for ejabberdctl commands names. @@ -38,9 +33,10 @@ Some methods to enable that feature: Debian, Ubuntu, Fedora and maybe others) - Or add to your `$HOME/.bashrc` a line similar to: -``` bash -source /path/to/ejabberd/tools/ejabberdctl.bc -``` + + ``` sh + source /path/to/ejabberd/tools/ejabberdctl.bc + ``` When ejabberd is running in the machine, type `ejabberdctl` in a console and press the `TAB` key. @@ -49,8 +45,7 @@ The first time this is used, the list of commands is extracted from ejabberd and stored in a file in `/tmp/`. The next time, that file is reused for faster responses. - -## ejabberdctl Commands +### ejabberdctl Commands When `ejabberdctl` is executed without any parameter, it displays the available options. If there isn't an `ejabberd` server running, the @@ -59,22 +54,22 @@ available parameters are: - **`start`**: Start `ejabberd` in background mode. This is the default method. - **`debug`**: Attach an Erlang shell to an already existing `ejabberd` server. - This allows to execute commands interactively in the `ejabberd` - server. + This allows to execute commands interactively in the `ejabberd` + server. - **`live`**: Start `ejabberd` in live mode: the shell keeps attached to the - started server, showing log messages and allowing to execute - interactive commands. + started server, showing log messages and allowing to execute + interactive commands. If there is an `ejabberd` server running in the system, `ejabberdctl` shows the `ejabberdctl commands` described below and all the `ejabberd commands` available in that server (see -[List of ejabberd Commands](#list-of-ejabberd-commands)). +[List of ejabberd Commands](./managing.md#list-of-ejabberd-commands)). The `ejabberdctl commands` are: - **`help`**: Get help about ejabberdctl or any available command. Try - `ejabberdctl help help`. + `ejabberdctl help help`. - **`status`**: Check the status of the `ejabberd` server. @@ -84,11 +79,11 @@ The `ejabberdctl commands` are: - **`mnesia`**: Get information about the Mnesia database. -# ejabberd Commands +## ejabberd Commands -Please go to the [API](/developer/ejabberd-api/) section. +Please go to the [API](../../developer/ejabberd-api/index.md) section. -# Erlang Runtime System +## Erlang Runtime System `ejabberd` is an Erlang/OTP application that runs inside an Erlang runtime system. This system is configured using environment variables @@ -108,19 +103,17 @@ The environment variables: **`EJABBERD_SO_PATH`**: Path to the directory with binary system libraries. -**`EJABBERD_DOC_PATH`**: Path to the directory with ejabberd documentation. - **`EJABBERD_PID_PATH`**: Path to the PID file that ejabberd can create when started. **`HOME`**: Path to the directory that is considered `ejabberd`’s home. This - path is used to read the file `.erlang.cookie`. + path is used to read the file `.erlang.cookie`. **`ERL_CRASH_DUMP`**: Path to the file where crash reports will be dumped. -**`ERL_EPMD_ADDRESS`**: IP address where epmd listens for connections (see [epmd](/admin/guide/security/#epmd)). +**`ERL_EPMD_ADDRESS`**: IP address where epmd listens for connections (see [epmd](security.md#epmd)). **`ERL_INETRC`**: Indicates which IP name resolution to use. If using `-sname`, - specify either this option or `-kernel inetrc filepath`. + specify either this option or `-kernel inetrc filepath`. **`ERL_MAX_PORTS`**: Maximum number of simultaneously open Erlang ports. @@ -129,38 +122,38 @@ The environment variables: The command line parameters: **`-sname ejabberd`**: The Erlang node will be identified using only the first part of the - host name, i.e. other Erlang nodes outside this domain cannot - contact this node. This is the preferable option in most cases. + host name, i.e. other Erlang nodes outside this domain cannot + contact this node. This is the preferable option in most cases. **`-name ejabberd`**: The Erlang node will be fully identified. This is only useful if you - plan to setup an `ejabberd` cluster with nodes in different - networks. + plan to setup an `ejabberd` cluster with nodes in different + networks. **`-kernel inetrc ’/etc/ejabberd/inetrc’`**: Indicates which IP name resolution to use. If using `-sname`, - specify either this option or `ERL_INETRC`. + specify either this option or `ERL_INETRC`. **`-kernel inet_dist_listen_min 4200 inet_dist_listen_min 4210`**: Define the first and last ports that `epmd` can listen to - (see [epmd](/admin/guide/security/#epmd)). + (see [epmd](security.md#epmd)). **`-kernel inet_dist_use_interface { 127,0,0,1 }`**: Define the IP address where this Erlang node listens for other nodes - connections (see [epmd](/admin/guide/security/#epmd)). + connections (see [epmd](security.md#epmd)). **`-detached`**: Starts the Erlang system detached from the system console. Useful - for running daemons and background processes. + for running daemons and background processes. **`-noinput`**: Ensures that the Erlang system never tries to read any input. Useful - for running daemons and background processes. + for running daemons and background processes. **`-pa /var/lib/ejabberd/ebin`**: Specify the directory where Erlang binary files (\*.beam) are - located. + located. **`-s ejabberd`**: Tell Erlang runtime system to start the `ejabberd` application. **`-mnesia dir ’/var/lib/ejabberd/’`**: Specify the Mnesia database directory. **`-sasl sasl_error_logger {file, /var/log/ejabberd/erlang.log}`**: Path to the Erlang/OTP system log file. SASL here means “System - Architecture Support Libraries” not “Simple Authentication and - Security Layer”. + Architecture Support Libraries” not “Simple Authentication and + Security Layer”. **`+K [true|false]`**: Kernel polling. @@ -171,23 +164,24 @@ The command line parameters: **`-remsh ejabberd@localhost`**: Open an Erlang shell in a remote Erlang node. **`-hidden`**: The connections to other nodes are hidden (not published). The - result is that this node is not considered part of the cluster. This - is important when starting a temporary `ctl` or `debug` node. + result is that this node is not considered part of the cluster. This + is important when starting a temporary `ctl` or `debug` node. Note that some characters need to be escaped when used in shell scripts, for instance `"` and `{}`. You can find other options in the Erlang manual page (`erl -man erl`). -# Web Admin +## Web Admin The `ejabberd` Web Admin allows to administer some parts of `ejabberd` using a web browser: accounts, Shared Roster Groups, manage the Mnesia database, create and restore backups, view server statistics, … -## Basic Setup +### Basic Setup 1. If not done already, register an account and grant administration rights to it - (see [Administration Account](/admin/installation/#administration-account)): + using the `configure` access rule + (see [Administration Account](../install/next-steps.md#administration-account)): ``` yaml acl: @@ -199,139 +193,121 @@ create and restore backups, view server statistics, … ``` 2. Make sure `ejabberd_web_admin` is available in - [request_handlers](/admin/configuration/listen-options/#request-handlers) - of a [ejabberd_http](/admin/configuration/listen/#ejabberd-http) listener. - If you want to use HTTPS, enable [tls](/admin/configuration/listen-options/#tls). + [request_handlers](../configuration/listen-options.md#request_handlers) + of a [ejabberd_http](../configuration/listen.md#ejabberd_http) listener. + If you want to use HTTPS, enable [tls](../configuration/listen-options.md#tls). For example: - ``` yaml - listen: - - - port: 5443 - ip: "::" - module: ejabberd_http - tls: true - request_handlers: - /admin: ejabberd_web_admin - ``` - -3. Open the Web Admin page in your favourite web browser. + + ``` yaml + listen: + - + port: 5443 + ip: "::" + module: ejabberd_http + tls: true + request_handlers: + /admin: ejabberd_web_admin + ``` + +3. Open the Web Admin page in your favorite web browser. The exact address depends on your configuration; -in this example the address is: `https://example.net:5443/admin/` +in this example the address is: `https://example.org:5443/admin/` 4. In the login window provide the **full Jabber ID: `admin1@example.org`** and password. If the web address hostname is the same that the account JID, you can provide simply the username instead of the full JID: `admin1`. -5. Finally you will see a page similar to: - -![Web Admin](/static/images/admin/webadmin.png) - -## Advanced Configuration - -There are two [access rules](/admin/configuration/basic/#access-rules) supported: - -- `configure` determines what accounts can access the Web Admin and make changes. -- `webadmin_view` grants only view access: - those accounts can browse the Web Admin with read-only access. - -Example configurations: - -- You can serve the Web Admin on the same port as the HTTP Polling - interface. In this example you should point your web browser to - `http://example.org:5280/admin/` to administer all virtual hosts or - to `http://example.org:5280/admin/server/example.com/` to administer - only the virtual host `example.com`. Before you get access to the - Web Admin you need to enter as username, the JID and password from a - registered user that is allowed to configure `ejabberd`. In this - example you can enter as username `admin@example.net` to - administer all virtual hosts (first URL). If you log in with - `admin@example.com` on - `http://example.org:5280/admin/server/example.com/` you can only - administer the virtual host `example.com`. The account - `reviewer@example.com` can browse that vhost in read-only mode. - - ``` yaml - acl: - admin: - user: - - admin: example.net - - host_config: - example.com: - acl: - admin: - user: - - admin: example.com - viewers: - user: - - reviewer: example.com - - access: - configure: - admin: allow - webadmin_view: - viewers: allow - - hosts: - - example.org - - listen: - ... - - - port: 5280 - module: ejabberd_http - request_handlers: - /admin: ejabberd_web_admin - ... - ``` - -- For security reasons, you can serve the Web Admin on a secured - connection, on a port differing from the HTTP Polling interface, and - bind it to the internal LAN IP. The Web Admin will be accessible by - pointing your web browser to `https://192.168.1.1:5282/admin/`: - - ``` yaml - hosts: - - example.org - listen: - ... - - - port: 5280 - module: ejabberd_http - - - ip: "192.168.1.1" - port: 5282 - module: ejabberd_http - certfile: "/usr/local/etc/server.pem" - tls: true - request_handlers: - /admin: ejabberd_web_admin - ... - ``` - -Certain pages in the ejabberd Web Admin contain a link to a related -section in the ejabberd Installation and Operation Guide. In order to -view such links, a copy in HTML format of the Guide must be installed in -the system. The file is searched by default in -`/share/doc/ejabberd/guide.html`. The directory of the documentation can -be specified in the environment variable `EJABBERD_DOC_PATH`. See -section [Erlang Runtime System](#erlang-runtime-system). - -# Ad-hoc Commands - -If you enable [mod_configure](/admin/configuration/modules/#mod-configure) -and [mod_adhoc](/admin/configuration/modules/#mod-adhoc), -you can perform several -administrative tasks in `ejabberd` with an XMPP client. The client must -support Ad-Hoc Commands -([`XEP-0050`][1]), and you must -login in the XMPP server with an account with proper privileges. - -# Change Computer Hostname +5. You're good! You can now use the Web Admin. + +### Additional Security + +For security reasons, you can serve the Web Admin on a secured connection and bind it to the internal LAN IP. + +In this example, the Web Admin will be available in the address `https://192.168.1.1:5282/admin/`: + +``` yaml +hosts: + - example.org + +listen: + - + ip: "192.168.1.1" + port: 5282 + module: ejabberd_http + certfile: "/usr/local/etc/server.pem" + tls: true + request_handlers: + /admin: ejabberd_web_admin +``` + +### Vhost permissions + +As you may have noticed in the previous examples, +the `configure` [access rule](../configuration/basic.md#access-rules) +determines what ACL can access the Web Admin. +And then you can add specific accounts to that ACL. + +It is possible to define specific ACL for individual vhosts, +this allows you to grant administrative privilege to certain accounts +only to one or some vhosts. + +In this example different accounts have different privileges in WebAdmin: + +- `adminglobal@example.net` can administer all virtual hosts in `http://example.net:5280/admin/` +- `admincom@example.com` can administer only `example.com` in `http://example.com:5280/admin/` + +``` yaml +hosts: + - example.net + - example.com + +listen: + - + port: 5280 + module: ejabberd_http + request_handlers: + /admin: ejabberd_web_admin + +acl: + admin: + user: + - adminglobal: example.net + +access_rules: + configure: + allow: admin + +host_config: + example.com: + acl: + admin: + user: + - adminglobal: example.net + - admincom: example.com +``` + +### Commands permissions + + + + +### Developer: Add Pages + + +### Developer: Use Commands + + + + +## Ad-hoc Commands + +If you enable [mod_configure](../configuration/modules.md#mod_configure) and [mod_adhoc](../configuration/modules.md#mod_adhoc), you can perform several administrative tasks in `ejabberd` with an XMPP client. The client must support Ad-Hoc Commands ([`XEP-0050`](https://xmpp.org/extensions/xep-0050.html)), and you must login in the XMPP server with an account with proper privileges. + +## Change Computer Hostname `ejabberd` uses the distributed Mnesia database. Being distributed, Mnesia enforces consistency of its file, so it stores the name of the -Erlang node in it (see section [Erlang Node Name](/admin/guide/security/#erlang-node-name)). The name of an Erlang node +Erlang node in it (see section [Erlang Node Name](security.md#erlang-node-name)). The name of an Erlang node includes the hostname of the computer. So, the name of the Erlang node changes if you change the name of the machine in which `ejabberd` runs, or when you move `ejabberd` to a different machine. @@ -349,7 +325,7 @@ node name. If you don’t know them, look for them by executing Before starting, setup some variables: -``` bash +``` sh OLDNODE=ejabberd@oldmachine NEWNODE=ejabberd@newmachine OLDFILE=/tmp/old.backup @@ -358,73 +334,71 @@ NEWFILE=/tmp/new.backup 1. Start ejabberd enforcing the old node name: - ``` bash + ``` sh ejabberdctl --node $OLDNODE start ``` 2. Generate a backup file: - ``` bash + ``` sh ejabberdctl --node $OLDNODE backup $OLDFILE ``` -3. Stop the old node: +3. Stop the old node: - ``` bash + ``` sh ejabberdctl --node $OLDNODE stop ``` -4. Make sure there aren't files in the Mnesia spool dir. For example: +4. Make sure there aren't files in the Mnesia spool dir. For example: - ``` bash + ``` sh mkdir /var/lib/ejabberd/oldfiles mv /var/lib/ejabberd/*.* /var/lib/ejabberd/oldfiles/ ``` -5. Start ejabberd. There isn't any need to specify the node name - anymore: +5. Start ejabberd. There isn't any need to specify the node name + anymore: - ``` bash + ``` sh ejabberdctl start ``` -6. Convert the backup to new node name using - [mnesia_change_nodename](/developer/ejabberd-api/admin-api/#mnesia-change-nodename): +6. Convert the backup to new node name using + [mnesia_change_nodename](../../developer/ejabberd-api/admin-api.md/#mnesia-change-nodename): - ``` bash + ``` sh ejabberdctl mnesia_change_nodename $OLDNODE $NEWNODE $OLDFILE $NEWFILE ``` -7. Install the backup file as a fallback using - [install_fallback](/developer/ejabberd-api/admin-api/#install-fallback): +7. Install the backup file as a fallback using + [install_fallback](../../developer/ejabberd-api/admin-api.md#install-fallback): - ``` bash + ``` sh ejabberdctl install_fallback $NEWFILE ``` -8. Stop ejabberd: +8. Stop ejabberd: - ``` bash + ``` sh ejabberdctl stop ``` You may see an error message in the log files, it’s normal, so don’t worry: - ``` bash + ``` erl Mnesia(ejabberd@newmachine): ** ERROR ** (ignoring core) ** FATAL ** A fallback is installed and Mnesia must be restarted. Forcing shutdown after mnesia_down from ejabberd@newmachine... ``` -9. Now you can finally start ejabberd: +9. Now you can finally start ejabberd: - ``` bash + ``` sh ejabberdctl start ``` 10. Check that the information of the old database is available: - accounts, rosters... After you finish, remember to delete the - temporary backup files from public directories. - -[1]: https://xmpp.org/extensions/xep-0050.html + accounts, rosters... After you finish, remember to delete the + temporary backup files from public directories. diff --git a/content/admin/guide/mqtt/index.md b/content/admin/guide/mqtt/index.md old mode 100755 new mode 100644 index a414a05d..6bc960cc --- a/content/admin/guide/mqtt/index.md +++ b/content/admin/guide/mqtt/index.md @@ -1,10 +1,6 @@ ---- -title: MQTT Support -menu: MQTT -toc: true ---- +# MQTT Support -# Benefits +## Benefits ejabberd is a multiprotocol server that supports [MQTT](https://mqtt.org/) out of the box since ejabberd Business Edition 4.0 and @@ -40,8 +36,7 @@ regions. You can deploy a truly global service. - The backend integration that are supported in ejabberd Business Edition will be available in MQTT. You have no need to develop support for new API. - -# Basic Setup +## Basic Setup Maybe you already have MQTT enabled in your ejabberd server, as it comes enabled by default in many distributions. @@ -49,7 +44,7 @@ as it comes enabled by default in many distributions. MQTT support in ejabberd is enabled by adding `mod_mqtt` to the list of `listen` and the list of `modules` like this: -```yaml +``` yaml listen: - port: 1883 @@ -57,7 +52,6 @@ listen: backlog: 1000 modules: - ... mod_mqtt: {} ``` @@ -65,10 +59,10 @@ The listener on port 1883 is MQTT over cleartext TCP/IP connection; you can later setup encryption, WebSocket, and encrypted WebSocket. For available options you can consult -the [mod_mqtt listener](/admin/configuration/listen/#mod-mqtt) -and the [mod_mqtt module](/admin/configuration/modules/#mod-mqtt). +the [mod_mqtt listener](../../configuration/listen.md#mod_mqtt) +and the [mod_mqtt module](../../configuration/modules.md#mod_mqtt). -# Test Setup +## Test Setup Start ejabberd server and you can connect to ejabberd MQTT service with your preferred MQTT client. @@ -79,7 +73,7 @@ and many others (see [mosquitto downloads](https://mosquitto.org/download/)). First of all register several accounts and subscribe one to the topic `test/1` with: -```bash +``` sh ejabberdctl register author localhost Pass ejabberdctl register user1 localhost Pass @@ -94,7 +88,7 @@ Subscribed (mid: 1): 0 Then go to another terminal or window and publish something on that topic: -```bash +``` sh mosquitto_pub -u author@localhost -P Pass -t "test/1" -d -m "ABC" Client (null) sending CONNECT @@ -105,14 +99,14 @@ Client (null) sending DISCONNECT You will see the message received and displayed in the `mosquitto_sub` window: -```bash +``` sh Client (null) received PUBLISH (d0, q0, r0, m0, 'test/1', ... (3 bytes)) test/1 ABC ``` -# Access Control +## Access Control -The [mod_mqtt module](/admin/configuration/modules/#mod-mqtt) +The [mod_mqtt module](../../configuration/modules.md#mod_mqtt) provides two options for access control: - `access_subscribe` to restrict access for subscribers, @@ -120,7 +114,7 @@ provides two options for access control: Both options accept mapping `filter: rule` where `filter` is an MQTT topic filter and `rule` is the standard -ejabberd [Access Rule](/admin/configuration/basic/#access-rules). +ejabberd [Access Rule](../../configuration/basic.md#access-rules). As an example, let's say only `author@localhost` is allowed to publish to topic "/test/1/" and its subtopics, @@ -129,16 +123,14 @@ to this topic and its subtopics, and nobody else can publish or subscribe to anything else. The configuration will look something like this: -```yaml +``` yaml acl: - ... publisher: user: author@localhost subscriber: user: user1@localhost modules: - ... mod_mqtt: access_publish: "test/1/#": @@ -154,9 +146,9 @@ modules: - deny ``` -# Encryption +## Encryption -## Self-Signed Certificate +### Self-Signed Certificate If you have already setup encryption in ejabberd, you can bypass this step. @@ -166,7 +158,7 @@ If you want to use TLS, you may want to create a self-signed certificate Here is a summary of the steps, adapted for ejabberd MQTT: -```bash +``` sh openssl genrsa -des3 -out ca.key 4096 openssl req -new -x509 -days 1826 -key ca.key -out ca.crt openssl genrsa -out server.key 4096 @@ -178,17 +170,17 @@ cat server.crt server.key > mqtt.pem Now copy `mqtt.pem` to the path with ejabberd configuration files, and configure accordingly: -```yaml +``` yaml certfiles: - "/etc/ejabberd/mqtt.pem" ``` -## Configure Encryption +### Configure Encryption Add a new listener with `tls` option in the port number 8883 (the standard for encrypted MQTT): -```yaml +``` yaml listen: - port: 1883 @@ -205,7 +197,7 @@ The listener on port 1883 is MQTT over cleartext TCP/IP connection. The listener on port 8883 is MQTT over TLS. You can enable both or only one of them depending on your needs. -## Test Encryption +### Test Encryption You can repeat the commands from previous test, appending `-p 8883` to use the encrypted port. @@ -213,26 +205,24 @@ If you are using a self-signed certificate as explained previously, you will also have to append `--cafile server.crt`. For example: -``` +``` sh mosquitto_sub -u user1@localhost -P Pass -t "test/1" -d -v -p 8883 --cafile server.crt ``` -# WebSocket +## WebSocket -## Setup WS +### Setup WS Add `mod_mqtt` as a -[request_handler](/admin/configuration/listen-options/#request-handlers) -on the [ejabberd_http](/admin/configuration/listen/#ejabberd-http) listener: +[request_handler](../../configuration/listen-options.md#request_handlers) +on the [ejabberd_http](../../configuration/listen.md#ejabberd_http) listener: -```yaml +``` yaml listen: - ... - port: 5280 module: ejabberd_http request_handlers: - ... /mqtt: mod_mqtt ``` @@ -242,7 +232,7 @@ on the main ejabberd HTTP listener. You can enable listeners independently, for example enable only the WebSocket listener and not the TCP/IP ones. -## Test WS +### Test WS Our beloved mosquitto client does not support MQTT over WebSocket, so you may have to find some capable MQTT client. @@ -250,16 +240,16 @@ For example, in [MQTTX](https://mqttx.app/), setup in the login window: - Host: `ws://` `localhost` - Port: 5280 -- Path:` /mqtt` +- Path:`/mqtt` If you need an example on how to use MQTTJS library, you can check our small example project: [mqttjs-demo](https://github.com/processone/mqttjs-demo) -## Encrypted WS +### Encrypted WS To enable encryption on WebSocket, enable `tls` like this: -```yaml +``` yaml listen: - port: 5281 diff --git a/content/admin/guide/oauth.md b/content/admin/guide/oauth.md deleted file mode 100755 index 38ed646f..00000000 --- a/content/admin/guide/oauth.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect: /developer/ejabberd-api/oauth/ ---- - diff --git a/content/admin/guide/security.md b/content/admin/guide/security.md old mode 100755 new mode 100644 index 0618b972..f6f0d167 --- a/content/admin/guide/security.md +++ b/content/admin/guide/security.md @@ -1,31 +1,30 @@ ---- -title: Securing ejabberd -toc: true -menu: Security ---- +# Securing ejabberd -# Firewall Settings +## Firewall Settings -You need to take the following TCP ports in mind when configuring your -firewall (the ports may change depending on your ejabberd configuration): +You need to take the following ports in mind when configuring your firewall. +The ports may change depending on your ejabberd configuration. +Most of them are TCP ports, except the explicitely mentioned ones: | **Port** | **Description** | |:----------------------|:--------------------------------------------------------------------------------------------| | 5222 | Jabber/XMPP client connections, plain or STARTTLS | | 5223 | Jabber client connections using the old SSL method | | 5269 | Jabber/XMPP incoming server connections | -| 5280/5443 | HTTP/HTTPS for Web Admin and many more ([ejabberd_http](/admin/configuration/listen/#ejabberd-http)) | -| 1883/8883 | MQTT/MQTTS service ([mod_mqtt](/admin/configuration/listen/#mod-mqtt)) | -| 3478/5349 | STUN/TURN service ([ejabberd_stun](/admin/configuration/listen/#ejabberd-stun-1)) | -| 5060/5061 | SIP service ([ejabberd_sip](/admin/configuration/listen/#ejabberd-sip-1)) | -| 7777 | SOCKS5 file transfer proxy ([mod_proxy65](/admin/configuration/modules/#mod-proxy65)) | +| 5280/5443 | HTTP/HTTPS for Web Admin and many more ([ejabberd_http](../configuration/listen.md#ejabberd_http)) | +| 1883/8883 | MQTT/MQTTS service ([mod_mqtt](../configuration/listen.md#mod_mqtt)) | +| 3478/5349 | STUN+TURN/STUNS+TURNS service ([ejabberd_stun](../configuration/listen.md#ejabberd_stun)) | +| 3478 UDP | ' ' | +| 49152-65535 range UDP | STUN+TURN service ([ejabberd_stun](../configuration/listen.md#ejabberd_stun)), configure with `turn_min_port` and `turn_max_port` | +| 5060/5061 | SIP service ([ejabberd_sip](../configuration/listen.md#ejabberd_sip)) | +| 7777 | SOCKS5 file transfer proxy ([mod_proxy65](../configuration/modules.md#mod_proxy65)) | | 4369 | EPMD (see [epmd](#epmd)) listens for Erlang node name requests | -| port range | Used for connections between Erlang nodes. This range is configurable (see [epmd](#epmd)) | +| random port range | Used by [epmd](#epmd) for connections between Erlang nodes, configure with `inet_dist_listen_min` and `inet_dist_listen_max` | | 5210 | Erlang connectivity when `ERL_DIST_PORT` is set, alternative to EPMD | -# epmd +## epmd -[`epmd (Erlang Port Mapper Daemon)`][1] +[`epmd (Erlang Port Mapper Daemon)`](https://erlang.org/doc/man/epmd.html) is a small name server included in Erlang/OTP and used by Erlang programs when establishing distributed Erlang communications. `ejabberd` needs `epmd` to use `ejabberdctl` and also when clustering `ejabberd` @@ -56,15 +55,19 @@ this case by default are random, but can be configured in the file `ejabberdctl.cfg`. The Erlang command-line parameter used internally is, for example: - erl ... -kernel inet_dist_listen_min 4370 inet_dist_listen_max 4375 +``` sh +erl ... -kernel inet_dist_listen_min 4370 inet_dist_listen_max 4375 +``` It is also possible to configure in `ejabberdctl.cfg` the network interface where the Erlang node will listen and accept connections. The Erlang command-line parameter used internally is, for example: - erl ... -kernel inet_dist_use_interface "{127,0,0,1}" +``` sh +erl ... -kernel inet_dist_use_interface "{127,0,0,1}" +``` -# Erlang Cookie +## Erlang Cookie The Erlang cookie is a string with numbers and letters. An Erlang node reads the cookie at startup from the command-line parameter @@ -80,9 +83,15 @@ either allow it to have a `$HOME`, or set as `$HOME` a path where ejabberd will have write access. Depending on your setup, examples could be: - adduser --home /usr/local/var/lib/ejabberd ejabberd - or - adduser --home /var/lib/ejabberd ejabberd +``` sh +adduser --home /usr/local/var/lib/ejabberd ejabberd +``` + +or + +``` sh +adduser --home /var/lib/ejabberd ejabberd +``` Two Erlang nodes communicate only if they have the same cookie. Setting a cookie on the Erlang node allows @@ -100,7 +109,7 @@ The communication between Erlang nodes are not encrypted, so the cookie could be read sniffing the traffic on the network. The recommended way to secure the Erlang node is to block the port 4369. -# Erlang Node Name +## Erlang Node Name An Erlang node may have a node name. The name can be short (if indicated with the command-line parameter `-sname`) or long (if indicated with the @@ -114,26 +123,24 @@ may be possible to fake the fact that you are on another network using a modified version of Erlang `epmd`. The recommended way to secure the Erlang node is to block the port 4369. -# Securing Sensitive Files +## Securing Sensitive Files `ejabberd` stores sensitive data in the file system either in plain text or binary files. The file system permissions should be set to only allow the proper user to read, write and execute those files and directories. -**`ejabberd configuration file: /etc/ejabberd/ejabberd.yml`**: Contains the JID of administrators and passwords of external - components. The backup files probably contain also this information, - so it is preferable to secure the whole `/etc/ejabberd/` directory. - -**`ejabberd service log: /var/log/ejabberd/ejabberd.log`**: Contains IP addresses of clients. If the loglevel is set to 5, it - contains whole conversations and passwords. If a logrotate system is - used, there may be several log files with similar information, so it - is preferable to secure the whole `/var/log/ejabberd/` directory. +**ejabberd configuration file: `/etc/ejabberd/ejabberd.yml`**: Contains the JID of administrators and passwords of external + components. The backup files probably contain also this information, + so it is preferable to secure the whole `/etc/ejabberd/` directory. -**`Mnesia database spool files in /var/lib/ejabberd/`**: The files store binary data, but some parts are still readable. The - files are generated by Mnesia and their permissions cannot be set - directly, so it is preferable to secure the whole - `/var/lib/ejabberd/` directory. +**ejabberd service log: `/var/log/ejabberd/ejabberd.log`**: Contains IP addresses of clients. If the loglevel is set to 5, it + contains whole conversations and passwords. If a logrotate system is + used, there may be several log files with similar information, so it + is preferable to secure the whole `/var/log/ejabberd/` directory. -**`Erlang cookie file: /var/lib/ejabberd/.erlang.cookie`**: See section [Erlang Cookie](#erlang-cookie). +**Mnesia database spool files in `/var/lib/ejabberd/`**: The files store binary data, but some parts are still readable. The + files are generated by Mnesia and their permissions cannot be set + directly, so it is preferable to secure the whole + `/var/lib/ejabberd/` directory. -[1]: https://erlang.org/doc/man/epmd.html +**Erlang cookie file: `/var/lib/ejabberd/.erlang.cookie`**: See section [Erlang Cookie](#erlang-cookie). diff --git a/content/admin/guide/troubleshooting.md b/content/admin/guide/troubleshooting.md old mode 100755 new mode 100644 index ac0d6a37..87029b5b --- a/content/admin/guide/troubleshooting.md +++ b/content/admin/guide/troubleshooting.md @@ -1,25 +1,19 @@ ---- -title: Troubleshooting ejabberd -toc: true -menu: Troubleshooting ---- +# Troubleshooting ejabberd -# Log Files +## Log Files An `ejabberd` node writes three log files: -**`ejabberd.log`**: is the ejabberd service log, with the messages reported by - `ejabberd` code +- **`ejabberd.log`**: is the ejabberd service log, with the messages reported by `ejabberd` code -**`error.log`**: is the file accumulating error messages from `ejabberd.log` +- **`error.log`**: is the file accumulating error messages from `ejabberd.log` -**`crash.log`**: is the Erlang/OTP log, with the crash messages reported by - Erlang/OTP using SASL (System Architecture Support Libraries) +- **`crash.log`**: is the Erlang/OTP log, with the crash messages reported by Erlang/OTP using SASL (System Architecture Support Libraries) The option `loglevel` modifies the verbosity of the file ejabberd.log. The syntax: -**`loglevel: Level`**: The standard form to set a global log level. +**`loglevel: Level`**: The standard form to set a global log level. The possible `Level` are: @@ -37,27 +31,27 @@ The possible `Level` are: For example, the default configuration is: - loglevel: 4 + `loglevel: 4` By default `ejabberd` rotates the log files when they get grown above a certain size. The exact value is controlled by the -[log_rotate_size](/admin/configuration/toplevel/#log-rotate-size) +[log_rotate_size](../configuration/toplevel.md#log_rotate_size) top-level option. However, you can rotate the log files manually. You can either use an external tool for log rotation and the -[reopen_log](/developer/ejabberd-api/admin-api/#reopen-log) +[reopen_log](../../developer/ejabberd-api/admin-api.md#reopen_log) API command to reopen the log files, or the -[rotate_log](/developer/ejabberd-api/admin-api/#rotate-log) API command +[rotate_log](../../developer/ejabberd-api/admin-api.md#rotate_log) API command to perform both steps (please refer to section [ejabberd -Commands](/admin/guide/managing/#ejabberd-commands)). +Commands](managing.md#ejabberd-commands)). -The [log_rotate_count](/admin/configuration/toplevel/#log-rotate-count) +The [log_rotate_count](../configuration/toplevel.md#log_rotate_count) toplevel option defines the number of rotated files to -keep by the [reopen_log](/developer/ejabberd-api/admin-api/#reopen-log) +keep by the [reopen_log](../../developer/ejabberd-api/admin-api.md#reopen_log) API command. Every such file has a numeric suffix. -# Debug Console +## Debug Console The Debug Console is an Erlang shell attached to an already running `ejabberd` server. With this Erlang shell, an experienced administrator @@ -71,7 +65,7 @@ examples in the article To exit the shell, close the window or press the keys: control+c control+c. -# Too many db tables +## Too many db tables When running ejabberd, the log shows this error: @@ -83,4 +77,4 @@ error occurs, it means that you have reached this limit. For a solution, please read the [section about ERL_MAX_ETS_TABLES on the Performance Tuning page](https://ejabberd.im/tuning#erl_max_ets_tables). -[1]: https://ejabberd.im/interconnect-erl-nodes +[1]: https://ejabberd.im/interconnect-erl-nodes diff --git a/content/admin/guide/unattended.md b/content/admin/guide/unattended.md old mode 100755 new mode 100644 index 97f3739c..041e802e --- a/content/admin/guide/unattended.md +++ b/content/admin/guide/unattended.md @@ -1,8 +1,4 @@ ---- -title: Unattended Installation -toc: true -menu: Unattended ---- +# Unattended Installation Bitrock framework allow unattended installation. With this mode, the installer will not prompt the user for any information and will @@ -11,19 +7,19 @@ parameters. That way, no input is required from the user during the installation. It's also possible to define the values through command line or using a configuration file -```sh +``` sh ./sample-installer.bin --mode unattended --param1 value1 --param2 value2 .... ./sample-installer.bin --mode unattended --optionfile optionfile ``` Where optionfile should contain a list of pairs key=value. For instance: -``` +``` sh param1=value1 param2=value2 ``` -# Available parameters for ejabberd installer +## Available parameters for ejabberd installer Installer recognizes those options: diff --git a/content/admin/guide/xep/index.md b/content/admin/guide/xep/index.md old mode 100755 new mode 100644 index bce55423..287e05e6 --- a/content/admin/guide/xep/index.md +++ b/content/admin/guide/xep/index.md @@ -1,8 +1,4 @@ ---- -title: Supporting and configuring specific XMPP Extensions in ejabberd -toc: true -menu: XMPP Extensions ---- +# Supporting and configuring specific XMPP Extensions in ejabberd XMPP extensions support can be implemented in different ways in ejabberd. We have several cases: @@ -18,78 +14,71 @@ XEP by XEP in ejabberd. We intend to explain what you can do in case you want to support a given XEP or if you want to make sure a specific Extension is disabled. -# XEP-0004: Data Forms +## XEP-0004: Data Forms -## Specification +### Specification [XEP-0004: Data Forms](https://xmpp.org/extensions/xep-0004.html) -## Implementation +### Implementation ejabberd core -## Comment +### Comment -This extension is a general design principle for forms in XMPP. The -principles are applied by all services, components and modules inside -ejabberd. +This extension is a general design principle for forms in XMPP. The principles are applied by all services, components and modules inside ejabberd. -## Enabling / Disabling +### Enabling / Disabling -As it is a general specification, it is used as default and cannot be -disabled. +As it is a general specification, it is used as default and cannot be disabled. -# XEP-0012: Last Activity +## XEP-0012: Last Activity -## Specification +### Specification [XEP-0012: Last Activity](https://xmpp.org/extensions/xep-0012.html) -## Implementation +### Implementation Main ejabberd module: [mod_last.erl](https://github.com/processone/ejabberd/blob/master/src/mod_last.erl) -## Comment +### Comment -This extension is optional. It allows the server to send back -information about when the user disconnected their last session. +This extension is optional. It allows the server to send back information about when the user disconnected their last session. It also allows to query the uptime of an ejabberd server. -## Enabling +### Enabling -Add `mod_last` configuration in `modules` section of the - configuration file. +Add `mod_last` configuration in `modules` section of the configuration file. It is enabled by default in ejabberd configuration template. -## Disabling +### Disabling + +Make sure `mod_last` is not defined or is commented out in ejabberd config `modules` section. -Make sure `mod_last` is not defined or is commented out in ejabberd - config `modules` section. - No side effect. -## Module documentation +### Module documentation -* [mod_last](/admin/configuration/modules/#mod-last) +* [mod_last](../../configuration/modules.md#mod_last) -# XEP-0013: Flexible Offline Message Retrieval +## XEP-0013: Flexible Offline Message Retrieval -## Specification +### Specification [XEP-0013: Flexible Offline Message Retrieval](https://xmpp.org/extensions/xep-0013.html) -## Implementation +### Implementation Main ejabberd module: [mod_offline.erl](https://github.com/processone/ejabberd/blob/master/src/mod_offline.erl) -## Comment +### Comment This extension is active on server if `mod_offline` module is enabled on ejabberd. -However, it is not used by client automatically. Flexible offline -message retrieval is enabled in the following cases: +However, it is not used by client automatically. Flexible offline message retrieval is enabled in the following cases: * client send request to retrieve number of messages prior to sending its initial presence: @@ -101,22 +90,19 @@ message retrieval is enabled in the following cases: initial presence: [Retrieving All Messages](https://xmpp.org/extensions/xep-0013.html#retrieve-all) -## Enabling +### Enabling -Add `mod_offline` configuration in `modules` section of the - configuration file. +Add `mod_offline` configuration in `modules` section of the configuration file. -It is enabled and can be used by client if mod_offline is -enabled. This is a module enabled by default in default ejabberd -configuration file template. +It is enabled and can be used by client if mod_offline is enabled. This is a module enabled by default in default ejabberd configuration file template. -## Disabling +### Disabling Make sure `mod_offline` is not defined or is commented out in ejabberd config `modules` section. - + Side effect: It will disable all offline messages storage. -## Module documentation +### Module documentation -* [mod_offline](/admin/configuration/modules/#mod-offline) +* [mod_offline](../../configuration/modules.md#mod_offline) diff --git a/content/admin/index.md b/content/admin/index.md old mode 100755 new mode 100644 index d2b6770f..f1f81aa7 --- a/content/admin/index.md +++ b/content/admin/index.md @@ -1,24 +1,17 @@ ---- -title: ejabberd for Administrators -menu: For Administrators -order: 20 ---- +# ejabberd for Administrators This area contains information on administering your ejabberd system. Additionally, you can refer to those extra topics: -* [Advanced ejabberd Administration](/admin/guide/) provides guidance on how to +* [Advanced ejabberd Administration](guide/index.md) provides guidance on how to handle advanced ejabberd topics. -* [Administration API Reference](/developer/ejabberd-api/admin-api/) provides documentation +* [Administration API Reference](../developer/ejabberd-api/admin-api.md) provides documentation for commands available in ejabberdctl and ReST API. -* [ejabberdctl Reference](/admin/ejabberdctl/) provides documentation +* [ejabberdctl Reference](ejabberdctl/index.md) provides documentation for ejabberd server administration command-line tool. -* [Admin FAQ](/admin/faq/) provides tips and information on Frequently +* [Admin FAQ](../ejabberd-faq/index.md) provides tips and information on Frequently Asked Questions for ejabberd Administrators. - -* [Contributions](/admin/contrib/) lists other modules or projects that you can install - to help in ejabberd administration. diff --git a/content/admin/install/binary-installer.md b/content/admin/install/binary-installer.md new file mode 100644 index 00000000..bf35c4d9 --- /dev/null +++ b/content/admin/install/binary-installer.md @@ -0,0 +1,90 @@ +# Binary Installers + +## Linux RUN Installer + +The `*.run` binary installer will deploy and configure a full featured ejabberd server and does not require any extra dependencies. +It includes a stripped down version of Erlang. +As such, when using ejabberd installer, you do not need to install Erlang separately. + +Those instructions assume installation on `localhost` for development purposes. +In this document, when mentioning `ejabberd-YY.MM`, we assume `YY.MM` is the release number, for example 18.01. + +Installation using the `*.run` binary installer: + +1. Go to [ejabberd GitHub Releases](https://github.com/processone/ejabberd/releases). + +2. Download the `run` package for your architecture + +3. Right-click on the downloaded file and select "Properties", click on the "Permissions" tab and tick the box that says "Allow executing file as program". + Alternatively, you can set the installer as executable using the command line: + + ``` sh + chmod +x ejabberd-YY.MM-1-linux-x64.run + ``` + +4. If the installer runs as superuser (by `root` or using `sudo`), + it installs ejabberd binaries in `/opt/ejabberd-XX.YY/`; + installs your configuration, Mnesia database and logs in `/opt/ejabberd/`, + and setups an ejabberd service unit in `systemd`: + + ``` sh + sudo ./ejabberd-YY.MM-1-linux-x64.run + ``` + +5. If the installer runs as a regular user, + it asks the base path where ejabberd should be installed. + In that case, the ejabberd service unit is not set in `systemd`, + and `systemctl` cannot be used to start ejabberd; start it manually. + +6. After successful installation by root, ejabberd is automatically started. + Check its status with + + ``` sh + systemctl status ejabberd + ``` + +7. Now that ejabberd is installed and running with the default configuration, + it's time to do some basic setup: edit `/opt/ejabberd/conf/ejabberd.yml` + and setup in the `hosts` option the domain that you want ejabberd to serve. + By default it's set to the name of your computer on the local network. + +8. Restart ejabberd completely using systemctl, or using ejabberdctl, + or simply tell it to reload the configuration file: + + ``` sh + sudo systemctl restart ejabberd + sudo /opt/ejabberd-22.05/bin/ejabberdctl restart + sudo /opt/ejabberd-22.05/bin/ejabberdctl reload_config + ``` + +9. Quite probably you will want to register an account and grant it admin rights, + please check [Next Steps: Administration Account](next-steps.md#administration-account). + +10. Now you can go to the web dashboard at `http://localhost:5280/admin/` + and fill the username field with the full account JID, + for example `admin@domain` (or `admin@localhost` as above). + Then fill the password field with that account's `password`. + The next step is to get to know [how to configure ejabberd](../configuration/index.md). + +11. If something goes wrong during the installation + and you would like to start from scratch, + you will find the steps to uninstall in the file + `/opt/ejabberd-22.05/uninstall.txt`. + +## Linux DEB and RPM Installers + +ProcessOne provides DEB and RPM all-in-one binary installers with the same content +that the `*.run` binary installer mentioned in the previous section. + +Those are self-sufficient packages that contain a minimal Erlang distribution, +this ensures that it does not interfere with your existing Erlang version +and is also a good way to make sure ejabberd will run with the latest Erlang version. + +Those packages install ejabberd in `/opt/ejabberd-XX.YY/`. +Your configuration, Mnesia database and logs are available in `/opt/ejabberd/`. + +You can download directly the DEB and RPM packages from +[ejabberd GitHub Releases](https://github.com/processone/ejabberd/releases). + +If you prefer, you can also get those packages from our official [ejabberd packages repository](https://repo.process-one.net). + diff --git a/content/admin/install/container/index.md b/content/admin/install/container/index.md new file mode 100644 index 00000000..96f1abda --- /dev/null +++ b/content/admin/install/container/index.md @@ -0,0 +1,34 @@ +# Install ejabberd using a Container Image + +There are two official container images of ejabberd that you can install using docker (or podman): + +## `ejabberd` Container Image + +The [`"ejabberd"`](https://github.com/processone/ejabberd/pkgs/container/ejabberd) container image is available in the GitHub Container Registry. +It is available for x64 and arm64, both for stable ejabberd releases and the `master` branch. +Check the [`"ejabberd"` container documentation](../../../CONTAINER.md). + +For example, download the latest stable ejabberd release: + +``` sh +docker pull ghcr.io/processone/ejabberd +``` + +If you use Microsoft Windows 7, 10, or similar operating systems, check those tutorials: + +- [Install ejabberd on Windows 10 using Docker Desktop](https://www.process-one.net/blog/install-ejabberd-on-windows-10-using-docker-desktop/) +- [Install ejabberd on Windows 7 using Docker Toolbox](https://www.process-one.net/blog/install-ejabberd-on-windows-7-using-docker-toolbox/) + +For bug reports and improvement suggestions, if you use the `"ecs"` container image please go to the [docker-ejabberd GitHub Issues](https://github.com/processone/docker-ejabberd/issues), +if using the `"ejabberd"` container image from github please go to the [ejabberd GitHub Issues](https://github.com/processone/ejabberd/issues?q=is%3Aopen+is%3Aissue+label%3APackaging%3AContainer) +## `ecs` Container Image + +The [`"ecs"`](https://hub.docker.com/r/ejabberd/ecs) container image allows to get ejabberd stable releases in x64 machines. +Check the [`"ecs"` container documentation](../../../README-ECS.md). + +Download ejabberd with: + +``` sh +docker pull docker.io/ejabberd/ecs +``` + diff --git a/content/admin/install/homebrew.md b/content/admin/install/homebrew.md new file mode 100644 index 00000000..2eaf2462 --- /dev/null +++ b/content/admin/install/homebrew.md @@ -0,0 +1,33 @@ +# Install ejabberd on macOS + +## Homebrew + +[Homebrew](https://brew.sh/) is a package manager for macOS that aims to port the many Unix & Linux software that is not easily available or compatible. Homebrew installation is simple and the instruction is available on its website. + +Check also the guide for [Installing ejabberd development environment on OSX](../../developer/install-osx.md) + +The ejabberd configuration included in Homebrew's ejabberd has as default domain `localhost`, and has already granted administrative privileges to the account `admin@localhost`. + +1. Once you have Homebrew installed, open Terminal. Run + + ``` sh + brew install ejabberd + ``` + + This should install the latest or at most the one-before-latest version of ejabberd. The installation directory should be reported at the end of this process, but usually the main executable is stored at `/usr/local/sbin/ejabberdctl`. + +2. Start ejabberd in interactive mode, which prints useful messages in the Terminal. + + ``` sh + /usr/local/sbin/ejabberdctl live + ``` + +3. Create the account `admin@localhost` with password set as `password`: + + ``` sh + /usr/local/sbin/ejabberdctl register admin localhost password + ``` + +4. Now you can go to the web dashboard at `http://localhost:5280/admin/` and fill the username field with the full account JID, for example `admin@localhost`, then fill the password field with that account's `password`. + +5. Without configuration there's not much to see here, therefore the next step is to get to know [how to configure ejabberd](../configuration/basic.md). diff --git a/content/admin/install/index.md b/content/admin/install/index.md new file mode 100644 index 00000000..e5bdbda3 --- /dev/null +++ b/content/admin/install/index.md @@ -0,0 +1,34 @@ +# Installation + +There are several ways to install ejabberd Community Server, depending on your needs and your infrastructure. + +## Self-hosted + +### Container Images + +- [`ejabberd` and `ecs` Container Images](./container/index.md) – Ideal for Windows, macOS, Linux, ... + +### Binary Installers + +- [Linux RUN Installer](./binary-installer.md/#linux-run-installer) – Suitable for various Linux distributions +- [Linux DEB and RPM Installers](./binary-installer.md/#linux-deb-and-rpm-installers) – Specifically for DEB and RPM based Linux + +### Linux and *BSD + +- [Operating System Package](./os-package.md/) – Tailored for System Operators + +### MacOS + +- [Homebrew](./homebrew.md) – Optimized for MacOS + +### Source Code + +- [Source Code](./source.md) – Geared towards developers and advanced administrators + +## On-Premise (eBE) + +- [ejabberd Business Edition](https://www.process-one.net/en/ejabberd/) – Explore professional support and managed services on your infrastructure + +## Cloud Hosting (Fluux) + +- [Fluux.io](https://fluux.io) – Opt for ejabberd hosting with a user-friendly web dashboard diff --git a/content/admin/install/next-steps.md b/content/admin/install/next-steps.md new file mode 100644 index 00000000..24c41d18 --- /dev/null +++ b/content/admin/install/next-steps.md @@ -0,0 +1,111 @@ +# Next Steps + +## Starting ejabberd + +Depending on how you installed ejabberd, it may be started automatically by the operating system at system boot time. + +You can use the `ejabberdctl` command line administration script to start and stop ejabberd, check its status and many other administrative tasks. + +If you provided the configure option `--enable-user=USER` (see compilation `options`, you can execute `ejabberdctl` with either that system account or root. + +Usage example: + +``` sh +prompt> ejabberdctl start + +prompt> ejabberdctl status +The node ejabberd@localhost is started with status: started +ejabberd is running in that node + +prompt> ejabberdctl stop +``` + +If ejabberd doesn't start correctly and a crash dump file is generated, there was a severe problem. +You can try to start ejabberd in interactive mode with the command `bin/ejabberdctl live` to see the error messages provided by Erlang and identify the exact the problem. + +The `ejabberdctl` administration script is included in the `bin` directory in the Linux Installers and Docker image. + +Please refer to the section [ejabberdctl](../guide/managing.md#ejabberdctl) for details about `ejabberdctl`, and configurable options to fine tune the Erlang runtime system. + +## Autostart on Linux + +If you compiled ejabberd from source code or some other method that doesn't setup autostarting ejabberd, you can try this method. + +On a \*nix system, create a system user called 'ejabberd', give it write access to the directories `database/` and `logs/`, and set that as home. + +If you want ejabberd to be started as daemon at boot time with that user, copy `ejabberd.init` from the `bin` directory to something like `/etc/init.d/ejabberd`. +Then you can call `/etc/inid.d/ejabberd start` to start the server. + +Or if you have a `systemd` distribution: + +1. copy `ejabberd.service` to `/etc/systemd/system/` +2. run `systemctl daemon-reload` +3. run `systemctl enable ejabberd.service` +4. To start the server, you can run `systemctl start ejabberd` + +When ejabberd is started, the processes that are started in the system +are `beam` or `beam.smp`, and also `epmd`. For more information +regarding `epmd` consult the section relating to +[epmd](../guide/security.md#epmd). + +## Administration Account + +Some ejabberd installation methods ask you details for the first account, and take care to register that account and grant it administrative rights; +in that case you can skip this section. + +After installing ejabberd from source code or other methods, you may want to register the first XMPP account and grant it administrative rights: + +1. Register an XMPP account on your ejabberd server. + For example, if `example.org` is configured in the + [hosts](../configuration/basic.md#host-names) + section in your ejabberd configuration file, + then you may want to register an account with JID `admin1@example.org`. + + There are two ways to register an XMPP account in ejabberd: + + - Using an XMPP client and [In-Band Registration](../configuration/modules.md#mod_register). + + - Using [ejabberdctl](../guide/managing.md#ejabberdctl): + + ``` sh + ejabberdctl register admin1 example.org password + ``` + +2. Edit the ejabberd configuration file to give administration + rights to the XMPP account you registered: + + ``` yaml + acl: + admin: + user: admin1@example.org + + access_rules: + configure: + allow: admin + ``` + + You can grant administrative privileges to many XMPP accounts, and + also to accounts in other XMPP servers. + +3. Restart ejabberd to load the new configuration, or run the + [reload_config](../../developer/ejabberd-api/admin-api.md#reload_config) command. + +4. Open the Web Admin page in your favourite browser. + The exact address depends on your ejabberd configuration, + and may be: + - [http://localhost:5280/admin/](http://localhost:5280/admin/) + on [binary installers](binary-installer.md) + - [https://localhost:5443/admin/](https://localhost:5443/admin/) + on [binary installers](binary-installer.md) + - [https://localhost:5280/admin/](https://localhost:5280/admin/) + on [Debian package](os-package.md) + +5. Your web browser shows a login window. Introduce the **full JID**, + in this example `admin1@example.org`, and the account password. + If the web address hostname is the same that the account JID, + you can provide simply the username instead of the full JID: `admin1`. + See [Web Admin](../guide/managing.md#web-admin) for details. + +## Configuring ejabberd + +Now that you got ejabberd installed and running, it's time to configure it to your needs. You can follow on the [Configuration](../configuration/index.md) section and take also a look at the [Tutorials](../../tutorials/index.md). diff --git a/content/admin/install/os-package.md b/content/admin/install/os-package.md new file mode 100644 index 00000000..62d8a479 --- /dev/null +++ b/content/admin/install/os-package.md @@ -0,0 +1,20 @@ +# Operating System Packages + +Many operating systems provide specific ejabberd packages adapted to the system architecture and libraries. +They usually also check dependencies and perform basic configuration tasks like creating the initial administrator account. + +List of known ejabberd packages: + +- [Alpine Linux](https://pkgs.alpinelinux.org/packages?name=ejabberd&branch=edge) +- [Arch Linux](https://archlinux.org/packages/extra/x86_64/ejabberd/) +- [Debian](https://tracker.debian.org/pkg/ejabberd) +- [Fedora](https://packages.fedoraproject.org/pkgs/ejabberd/ejabberd/) +- [FreeBSD](https://www.freshports.org/net-im/ejabberd/) +- [Gentoo](https://packages.gentoo.org/packages/net-im/ejabberd) +- [OpenSUSE](https://software.opensuse.org/package/ejabberd) +- [NetBSD](https://pkgsrc.se/chat/ejabberd/) +- [Ubuntu](https://packages.ubuntu.com/search?keywords=ejabberd) + +Consult the resources provided by your Operating System for more information. + +There's also an [ejabberd snap](https://snapcraft.io/ejabberd) to install ejabberd on several operating systems using `Snap` package manager. diff --git a/content/admin/install/source.md b/content/admin/install/source.md new file mode 100644 index 00000000..afd249eb --- /dev/null +++ b/content/admin/install/source.md @@ -0,0 +1,357 @@ +# Install ejabberd from Source Code + +The canonical form for distribution of ejabberd stable releases is the source code package. +Compiling ejabberd from source code is quite easy in \*nix systems, as long as your system have all the dependencies. + +## Requirements + +To compile ejabberd you need: + +- GNU Make +- GCC +- Libexpat ≥ 1.95 +- Libyaml ≥ 0.1.4 +- [Erlang/OTP](https://www.erlang.org/) ≥ 20.0. We recommend using Erlang OTP 25.3, which is the version used in the binary installers and container images. +- OpenSSL ≥ 1.0.0 + +Other optional libraries are: + +- Zlib ≥ 1.2.3, For [Zlib Stream Compression](../configuration/listen-options.md#zlib) +- PAM library, for [PAM Authentication](../configuration/authentication.md#pam-authentication) +- ImageMagick’s Convert program and Ghostscript fonts, for [CAPTCHA challenges](../configuration/basic.md/#captcha). +- [Elixir](https://elixir-lang.org/) ≥ 1.10.3, for [Elixir Development](../../developer/extending-ejabberd/elixir.md). It is recommended Elixir 1.13.4 or higher and Erlang/OTP 23.0 or higher. + +If your system splits packages in libraries and development headers, +install the development packages too. + +For example, in Debian: + +``` sh +apt-get install libexpat1-dev libgd-dev libpam0g-dev \ + libsqlite3-dev libwebp-dev libyaml-dev \ + autoconf automake erlang elixir rebar3 +``` + +## Download + +There are several ways to obtain the ejabberd source code: + +- Source code archive from [ProcessOne Downloads][p1dl] +- Source code package from [ejabberd GitHub Releases][ghr] +- Latest development code from [ejabberd Git repository][gitrepo] + +[p1dl]: https://www.process-one.net/en/ejabberd/downloads/ +[ghr]: https://github.com/processone/ejabberd/releases +[gitrepo]: https://github.com/processone/ejabberd + +The latest development source code can be retrieved +from the Git repository using the commands: + +``` sh +git clone git://github.com/processone/ejabberd.git +cd ejabberd +``` + +## Compile + +The general instructions to compile ejabberd are: + +``` sh +./autogen.sh +./configure +make +``` + +In this example, [`./configure`](#configure) prepares the installed program to run with a user called `ejabberd` that should exist in the system (it isn't recommended to run ejabberd with `root` user): + +``` sh +./autogen.sh +./configure --enable-user=ejabberd --enable-mysql +make +``` + +[`make`](#make) gets the dependencies and compiles everything. + +*Note*: To build ejabberd, you will need Internet access, as dependencies will be downloaded depending on the selected options. + +### `./configure` + +The build configuration script supports many options. +Get the full list: + +``` sh +./configure --help +``` + +Options details: + +- **`--bindir=/`**: Specify the path to the user executables (where `epmd` and `iex` are available). + +- **`--prefix=/`**: Specify the path prefix where the files will be copied when running the `make install` command. + +- **`--with-rebar=/`**: Specify the path to rebar, rebar3 or + [mix](../../developer/extending-ejabberd/elixir.md) + + + +- **`--enable-user[=USER]`**: Allow this normal system user to execute the ejabberdctl script (see section [ejabberdctl](../guide/managing.md#ejabberdctl)), read the configuration files, read and write in the spool directory, read and write in the log directory. +The account user and group must exist in the machine before running `make install`. +This account needs a HOME directory, because the [Erlang cookie file](../guide/security.md#erlang-cookie) will be created and read there. + +- **`--enable-group[=GROUP]`**: Use this option additionally to `--enable-user` + when that account is in a group that doesn't coincide with its username. + +- **`--enable-all`**: Enable many of the database and dependencies + options described here, this is useful for Dialyzer checks: + --enable-debug --enable-elixir --enable-mysql --enable-odbc + --enable-pam --enable-pgsql --enable-redis --enable-sip + --enable-sqlite --enable-stun --enable-tools --enable-zlib + +- **`--disable-debug`**: Compile without `+debug_info`. + +- **`--enable-elixir`**: Build ejabberd with Elixir extension support. + Works only with rebar3, not rebar2. Requires to have Elixir installed. + If interested in Elixir development, you may prefer to use `--with-rebar=mix` + + + +- **`--disable-erlang-version-check`**: Don't check Erlang/OTP version. + +- **`--enable-full-xml`**: Use XML features in XMPP stream (ex: CDATA). This requires XML compliant clients). + +- **`--enable-hipe`**: Compile natively with HiPE. This is an experimental feature, and not recommended. + +- **`--enable-lager`**: Use lager Erlang logging tool instead of standard error logger. + +- **`--enable-latest-deps`**: Makes rebar use latest versions of + dependencies developed alongside ejabberd instead of version + specified in rebar.config. Should be only used when developing + ejabberd. + +- **`--enable-lua`**: Enable Lua support, to import from Prosody. + + + +- **`--enable-mssql`**: Enable Microsoft SQL Server support, this + option requires --enable-odbc (see [Supported storages][18]). + +- **`--enable-mysql`**: Enable MySQL support (see [Supported storages][18]). + +- **`--enable-new-sql-schema`**: Use new SQL schema. + +- **`--enable-odbc`**: Enable pure ODBC support. + +- **`--enable-pam`**: Enable the PAM authentication method (see [PAM Authentication](../configuration/authentication.md#pam-authentication) section). + +- **`--enable-pgsql`**: Enable PostgreSQL support (see [Supported storages][18]). + +- **`--enable-redis`**: Enable Redis support to use for external session storage. + +- **`--enable-roster-gateway-workaround`**: Turn on workaround for processing gateway subscriptions. + +- **`--enable-sip`**: Enable SIP support. + +- **`--enable-sqlite`**: Enable SQLite support (see [Supported storages][18]). + +- **`--disable-stun`**: Disable STUN/TURN support. + +- **`--enable-system-deps`**: Makes rebar use locally installed + dependencies instead of downloading them. + +- **`--enable-tools`**: Enable the use of development tools. + + + +- **`--disable-zlib`**: Disable Stream Compression (XEP-0138) using zlib. + +### `make` + +This tool is used to compile ejabberd and perform other tasks: + +- Get, update, compile dependencies; clean files +- [System install](#system-install), uninstall +- Build OTP [production](#production-release) / [development](#production-release) releases +- Development: edoc, [options](../../developer/guide.md#configuration), [translations](../../developer/extending-ejabberd/localization.md), tags +- Testing: dialyzer, [hooks](../../developer/guide.md#hooks), [test](../../developer/extending-ejabberd/testing.md), xref + +Get the full list and details: + +``` sh +make help +``` + +## Install + +There are several ways to install and run the ejabberd compiled from source code: +[system install](#system-install), building a [production](#production-release) release, or building a [development](#production-release) release. + +### System Install + +To install ejabberd in the destination directories, run the command `make install`. + +Note that you probably need administrative privileges in the system to install ejabberd. + +The created files and directories depend on the options provided to [`./configure`](#configure), by default they are: + + + +- `/etc/ejabberd/`: Configuration directory: + + + `ejabberd.yml`: ejabberd configuration file (see [File Format](../configuration/file-format.md)) + + `ejabberdctl.cfg`: Configuration file of the administration script (see [Erlang Runtime System](../guide/managing.md#erlang-runtime-system)) + + `inetrc`: Network DNS configuration file for Erlang + +- `/lib/ejabberd/`: + + * `ebin/`: Erlang binary files (\*.beam) + * `include/`: Erlang header files (\*.hrl) + * `priv/`: Additional files required at runtime + * `bin/`: Executable programs + * `lib/`: Binary system libraries (\*.so) + * `msgs/`: Translation files (\*.msgs) (see [Default Language](../configuration/basic.md#default-language)) + +- `/sbin/ejabberdctl`: Administration script (see [ejabberdctl](../guide/managing.md#ejabberdctl)) + +- `/share/doc/ejabberd/`: Documentation of ejabberd + +- `/var/lib/ejabberd/`: Spool directory: + + - `.erlang.cookie`: The [Erlang cookie file](../guide/security.md#erlang-cookie) + - `acl.DCD, ...`: Mnesia database spool files (\*.DCD, \*.DCL, \*.DAT) + +- `/var/log/ejabberd/`: Log directory (see [Logging](../configuration/basic.md#logging)): + + - `ejabberd.log`: ejabberd service log + - `erlang.log`: Erlang/OTP system log + +### Production Release + + + +You can build an OTP release that includes ejabberd, Erlang/OTP +and all the required erlang dependencies in a single tar.gz file. +Then you can copy that file to another machine that has the same machine +architecture, and run ejabberd without installing anything else. + +To build that production release, run: + +``` sh +make prod +``` + +If you provided to [`./configure`](#configure) the option + `--with-rebar` to use rebar3 or mix, this will directly +produce a tar.gz that you can copy. + +This example uses rebar3 to manage the compilation, +builds an OTP production release, +copies the resulting package to a temporary path, +and starts ejabberd there: + +``` sh +./autogen.sh +./configure --with-rebar=rebar3 +make +make prod +mkdir $HOME/eja-release +tar -xzvf _build/prod/ejabberd-*.tar.gz -C $HOME/eja-release +$HOME/eja-release/bin/ejabberdctl live +``` + +### Development Release + + + +If you provided to [`./configure`](#configure) the option + `--with-rebar` to use rebar3 or mix, +you can build an OTP development release. + +This is designed to run ejabberd in the local machine for development, +manual testing... without installing in the system. + +This development release has some customizations: uses a dummy certificate file, +if you register the account admin@localhost it has admin rights... + +This example [uses Elixir's mix](../../developer/extending-ejabberd/elixir.md) +to manage the compilation, +builds an OTP development release, +and starts ejabberd there: + +``` sh +./autogen.sh +./configure --with-rebar=mix +make +make dev +_build/dev/rel/ejabberd/bin/ejabberdctl live +``` + +## Specific notes + +### asdf + +When Erlang/OTP (and/or Elixir) is installed using [asdf](https://asdf-vm.com/) (multiple runtime version manager), +it is available only for your account, in `$HOME/.asdf/shims/erl`. +In that case, you cannot install ejabberd globally in the system, and you cannot use the `root` account to start it, because that account doesn't have access to erlang. + +In that scenario, there are several ways to run/install ejabberd: + +- Run a [development release](#development-release) locally without installing + +- Copy a [production release](#production-release) locally + +- Use [system install](#system-install), but install it locally: + +``` sh +./autogen.sh +./configure --prefix=$HOME/eja-install --enable-user +make +make install +$HOME/eja-install/sbin/ejabberdctl live +``` + +### BSD + +The command to compile ejabberd in BSD systems is `gmake`. + +You may want to check [pkgsrc.se for ejabberd](https://pkgsrc.se/chat/ejabberd/). + +Up to ejabberd [23.04](../../archive/23.04/index.md), +some old scripts where included in ejabberd source for NetBSD compilation, and you can take a look to those files for reference in ejabberd [`23.04/examples/mtr/`](https://github.com/processone/ejabberd/tree/23.04/examples/mtr) path. + +### macOS + +If compiling from sources on Mac OS X, you must configure ejabberd to use custom OpenSSL, Yaml, iconv. +The best approach is to use [Homebrew](https://brew.sh/) to install your dependencies, then exports your custom path to let configure and make be aware of them. + +``` sh +brew install git erlang elixir openssl expat libyaml libiconv libgd sqlite rebar rebar3 automake autoconf +export LDFLAGS="-L/usr/local/opt/openssl/lib -L/usr/local/lib -L/usr/local/opt/expat/lib" +export CFLAGS="-I/usr/local/opt/openssl/include -I/usr/local/include -I/usr/local/opt/expat/include" +export CPPFLAGS="-I/usr/local/opt/openssl/include/ -I/usr/local/include -I/usr/local/opt/expat/include" +./configure +make +``` + +Check also the guide for [Installing ejabberd development environment on OSX](../../developer/install-osx.md) + +## Start + +You can use the `ejabberdctl` command line administration script to +start and stop ejabberd. Some examples, depending on your installation method: + +- When installed in the system: +``` sh +ejabberdctl start +/sbin/ejabberdctl start +``` + +- When built an OTP production release: +``` sh +_build/prod/rel/ejabberd/bin/ejabberdctl start +_build/prod/rel/ejabberd/bin/ejabberdctl live +``` + +- Start interactively without installing or building OTP release: +``` sh +make relive +``` diff --git a/content/admin/installation.md b/content/admin/installation.md deleted file mode 100644 index f10c0658..00000000 --- a/content/admin/installation.md +++ /dev/null @@ -1,680 +0,0 @@ ---- -title: Installing ejabberd -menu: Installation -toc: true -order: 2 ---- - -There are several ways to install ejabberd Community Server: - -- [Linux RUN Installer](#linux-run-installer) – for any Linux -- [Linux DEB and RPM Installers](#linux-deb-and-rpm-installers) – for DEB and RPM based Linux -- [Operating System packages](#operating-system-packages) – for System Operators -- [Docker Image](#docker-image) – for Windows, macOS, Linux, ... -- [Homebrew](#homebrew) – for macOS -- [Source Code](#source-code) – for developers and advanced administrators - -Once installed, you can head to the next steps: - -- [Starting ejabberd](#starting-ejabberd) -- [Autostart on Linux](#autostart-on-linux) -- [Administration Account](#administration-account) -- [Configuring ejabberd](#configuring-ejabberd) - -# Linux RUN Installer - -The `*.run` binary installer will deploy and configure a full featured -ejabberd server and does not require any extra dependencies. It -includes a stripped down version of Erlang. As such, when using -ejabberd installer, you do not need to install Erlang separately. - -Those instructions assume installation on `localhost` for development purposes. -In this document, when mentioning `ejabberd-YY.MM`, we assume `YY.MM` -is the release number, for example 18.01. - -Installation using the `*.run` binary installer: - -1. Go to [ejabberd GitHub Releases](https://github.com/processone/ejabberd/releases). - -2. Download the `run` package for your architecture - -3. Right-click on the downloaded file and select "Properties", - click on the "Permissions" tab and tick the box that says "Allow executing file as program". - Alternatively, you can set the installer as executable using the command line: - ``` bash - chmod +x ejabberd-YY.MM-1-linux-x64.run - ``` - -4. If the installer runs as superuser (by `root` or using `sudo`), - it installs ejabberd binaries in `/opt/ejabberd-XX.YY/`; - installs your configuration, Mnesia database and logs in `/opt/ejabberd/`, - and setups an ejabberd service unit in `systemd`: - ``` bash - sudo ./ejabberd-YY.MM-1-linux-x64.run - ``` - -5. If the installer runs as a regular user, - it asks the base path where ejabberd should be installed. - In that case, the ejabberd service unit is not set in `systemd`, - and `systemctl` cannot be used to start ejabberd; start it manually. - -6. After successful installation by root, ejabberd is automatically started. - Check its status with - ``` bash - systemctl status ejabberd - ``` -7. Now that ejabberd is installed and running with the default configuration, - it's time to do some basic setup: edit `/opt/ejabberd/conf/ejabberd.yml` - and setup in the `hosts` option the domain that you want ejabberd to serve. - By default it's set to the name of your computer on the local network. - -8. Restart ejabberd completely using systemctl, or using ejabberdctl, - or simply tell it to reload the configuration file: - ``` bash - sudo systemctl restart ejabberd - sudo /opt/ejabberd-22.05/bin/ejabberdctl restart - sudo /opt/ejabberd-22.05/bin/ejabberdctl reload_config - ``` - -9. Quite probably you will want to register an account and grant it admin rights, - please check [Administration Account](/admin/installation/#administration-account). - -7. Now you can go to the web dashboard at `http://localhost:5280/admin/` - and fill the username field with the full account JID, - for example `admin@domain` (or `admin@localhost` as above). - Then fill the password field with that account's `password`. - The next step is to get to know [how to configure ejabberd](/admin/configuration/). - -8. If something goes wrong during the installation - and you would like to start from scratch, - you will find the steps to uninstall in the file - `/opt/ejabberd-22.05/uninstall.txt`. - -# Linux DEB and RPM Installers - -ProcessOne provides DEB and RPM all-in-one binary installers with the same content -that the `*.run` binary installer mentioned in the previous section. - -Those are self-sufficient packages that contain a minimal Erlang distribution, -this ensures that it does not interfere with your existing Erlang version -and is also a good way to make sure ejabberd will run with the latest Erlang version. - -Those packages install ejabberd in `/opt/ejabberd-XX.YY/`. -Your configuration, Mnesia database and logs are available in `/opt/ejabberd/`. - -You can download directly the DEB and RPM packages from -[ejabberd GitHub Releases](https://github.com/processone/ejabberd/releases). - -If you prefer, you can also get those packages from our official [ejabberd packages repository](https://repo.process-one.net). - -# Operating System Packages - -Many operating systems provide specific ejabberd packages adapted -to the system architecture and libraries. They usually also check -dependencies and perform basic configuration tasks like creating the -initial administrator account. - -List of known ejabberd packages: - -- [Alpine Linux](https://pkgs.alpinelinux.org/packages?name=ejabberd&branch=edge) -- [Arch Linux](https://archlinux.org/packages/community/x86_64/ejabberd/) -- [Debian](https://tracker.debian.org/pkg/ejabberd) -- [Fedora](https://packages.fedoraproject.org/pkgs/ejabberd/ejabberd/) -- [FreeBSD](https://www.freshports.org/net-im/ejabberd/) -- [Gentoo](https://packages.gentoo.org/packages/net-im/ejabberd) -- [OpenSUSE](https://software.opensuse.org/package/ejabberd) -- [NetBSD](https://pkgsrc.se/chat/ejabberd/) -- [Ubuntu](https://packages.ubuntu.com/search?keywords=ejabberd) - -Consult the resources provided by your Operating System for more information. - -There's also an [ejabberd snap](https://snapcraft.io/ejabberd) -to install ejabberd on several operating systems using Snap package manager. - -# Docker Image - -The [`"ecs"`](https://hub.docker.com/r/ejabberd/ecs) container image -allows to get ejabberd stable releases in x64 machines. -Check the [`"ecs"` container documentation](https://github.com/processone/docker-ejabberd/tree/master/ecs#readme). -Download ejabberd with: - -``` bash -docker pull docker.io/ejabberd/ecs -``` - -There is an alternative -[`"ejabberd"`](https://github.com/processone/ejabberd/pkgs/container/ejabberd) container image -available in the GitHub Container Registry. -This one is available for x64 and arm64, both for stable ejabberd releases and the `master` branch. -Check the [`"ejabberd"` container documentation](https://github.com/processone/ejabberd/blob/master/CONTAINER.md). -For example, download the latest stable ejabberd release: - -``` bash -docker pull ghcr.io/processone/ejabberd -``` - -If you use Microsoft Windows 7, 10, or similar operating systems, check those tutorials: - -- [Install ejabberd on Windows 10 using Docker Desktop](https://www.process-one.net/blog/install-ejabberd-on-windows-10-using-docker-desktop/) -- [Install ejabberd on Windows 7 using Docker Toolbox](https://www.process-one.net/blog/install-ejabberd-on-windows-7-using-docker-toolbox/) - -For bug reports and improvement suggestions, -if you use the `"ecs"` container image please go to the -[docker-ejabberd GitHub Issues](https://github.com/processone/docker-ejabberd/issues), -if using the `"ejabberd"` container image from github please go to the -[ejabberd GitHub Issues](https://github.com/processone/ejabberd/issues?q=is%3Aopen+is%3Aissue+label%3APackaging%3AContainer) - -# Homebrew - -[Homebrew](https://brew.sh/) is a package manager for macOS that aims to port the many Unix & Linux software that is not easily available or compatible. Homebrew installation is simple and the instruction is available on its website. - -Check also the guide for -[Installing ejabberd development environment on OSX](/developer/install-osx/) - -The ejabberd configuration included in Homebrew's ejabberd -has as default domain `localhost`, -and has already granted administrative privileges to the account `admin@localhost`. - -1. Once you have Homebrew installed, open Terminal. Run - - ``` bash - brew install ejabberd - ``` - - This should install the latest or at most the one-before-latest version of ejabberd. The installation directory should be reported at the end of this process, but usually the main executable is stored at `/usr/local/sbin/ejabberdctl`. - -2. Start ejabberd in interactive mode, which prints useful messages in the Terminal. - - ``` bash - /usr/local/sbin/ejabberdctl live - ``` - -3. Create the account `admin@localhost` with password set as `password`: - - ``` bash - /usr/local/sbin/ejabberdctl register admin localhost password - ``` - -4. Now you can go to the web dashboard at `http://localhost:5280/admin/` and fill the username field with the full account JID, for example `admin@localhost`, then fill the password field with that account's `password`. - -5. Without configuration there's not much to see here, therefore the next step is to get to know [how to configure ejabberd](/admin/configuration/). - -# Source Code - -The canonical form for distribution of ejabberd stable releases is -the source code package. Compiling ejabberd from source code is -quite easy in \*nix systems, as long as your system have all the -dependencies. - -## Requirements - -To compile ejabberd on a ‘Unix-like’ operating system, you need: - -- GNU Make -- GCC -- Libexpat 1.95 or higher -- Libyaml 0.1.4 or higher -- [Erlang/OTP](https://www.erlang.org/) 19.3 or higher, - preferably 20.0 or higher. - We recommend using Erlang OTP 25.3, - which is the version used in the binary installers and container images. -- OpenSSL 1.0.0 or higher, for STARTTLS, SASL and SSL encryption. -- Zlib 1.2.3 or higher. Optional. - For [Zlib Stream Compression](/admin/configuration/listen-options/#zlib) -- PAM library. Optional. - For [PAM Authentication](/admin/configuration/authentication/#pam-authentication) -- ImageMagick’s Convert program and Ghostscript fonts. Optional. - For [CAPTCHA challenges](/admin/configuration/basic/#captcha). -- [Elixir](https://elixir-lang.org/) 1.10.3 or higher. Optional. - For [Elixir Development](/developer/extending-ejabberd/elixir/) - -## Downloading - -Released versions of ejabberd are available for download from -[ejabberd GitHub Releases](https://github.com/processone/ejabberd/releases). - -Alternatively, the latest development source code can be retrieved -from the Git repository using the commands: - -``` bash -git clone git://github.com/processone/ejabberd.git ejabberd -cd ejabberd -``` - -## Compilation - -To compile ejabberd execute the commands: - -``` bash -./autogen.sh -./configure --enable-user=ejabberd --enable-mysql -make -``` - -In this example, [`./configure`](#configure) prepares the installed program -to run with a user called ejabberd, so please create that user -or tell to use another local user. -It isn't recommended to run ejabberd with `root` user. - -[`make`](#make) gets the dependencies and compiles everything. - -*Note*: To build ejabberd, you will need Internet access, as - dependencies will be downloaded depending on the selected options. - -### `./configure` - -The build configuration script supports many options. -Get the full list: - -``` bash -./configure --help -``` - -Options details: - -- **`--bindir=/`**: Specify the path to the user executables - (where `epmd` and `iex` are available). - -- **`--prefix=/`**: Specify the path prefix where the files will be - copied when running the `make install` command. - -
added in 20.12 -and improved in 21.07
- -
- -- **`--with-rebar=/`**: Specify the path to rebar, rebar3 or - [mix](/developer/extending-ejabberd/elixir/) - -- **`--enable-user[=USER]`**: Allow this normal system user to execute - the ejabberdctl script (see section [ejabberdctl](/admin/guide/managing/#ejabberdctl)), read the - configuration files, read and write in the spool directory, read and - write in the log directory. The account user and group must exist in - the machine before running `make install`. - This account needs a HOME directory, because the - [Erlang cookie file](/admin/guide/security/#erlang-cookie) - will be created and read there. - -- **`--enable-group[=GROUP]`**: Use this option additionally to `--enable-user` - when that account is in a group that doesn't coincide with its username. - -- **`--enable-all`**: Enable many of the database and dependencies - options described here, this is useful for Dialyzer checks: - --enable-debug --enable-elixir --enable-mysql --enable-odbc - --enable-pam --enable-pgsql --enable-redis --enable-sip - --enable-sqlite --enable-stun --enable-tools --enable-zlib - -- **`--disable-debug`**: Compile without `+debug_info`. - -
improved in 21.07
- -
- -- **`--enable-elixir`**: Build ejabberd with Elixir extension support. - Works only with rebar2. If interested in Elixir development, you may - prefer to install Elixir yourself and use `--with-rebar=mix` - -- **`--disable-erlang-version-check`**: Don't check Erlang/OTP version. - -- **`--enable-full-xml`**: Use XML features in XMPP stream (ex: - CDATA). This requires XML compliant clients). - -- **`--enable-hipe`**: Compile natively with HiPE. This is an - experimental feature, and not recommended. - -- **`--enable-lager`**: Use lager Erlang logging tool instead of - standard error logger. - -- **`--enable-latest-deps`**: Makes rebar use latest versions of - dependencies developed alongside ejabberd instead of version - specified in rebar.config. Should be only used when developing - ejabberd. - -
added in 21.04
- -- **`--enable-lua`**: Enable Lua support, to import from Prosody. - -- **`--enable-mssql`**: Enable Microsoft SQL Server support, this - option requires --enable-odbc (see [Supported storages][18]). - -- **`--enable-mysql`**: Enable MySQL support (see [Supported storages][18]). - -- **`--enable-new-sql-schema`**: Use new SQL schema. - -- **`--enable-odbc`**: Enable pure ODBC support. - -- **`--enable-pam`**: Enable the PAM authentication method (see [PAM Authentication](/admin/configuration/authentication/#pam-authentication) section). - -- **`--enable-pgsql`**: Enable PostgreSQL support (see [Supported storages][18]). - -- **`--enable-redis`**: Enable Redis support to use for external - session storage. - -- **`--enable-roster-gateway-workaround`**: Turn on workaround for - processing gateway subscriptions. - -- **`--enable-sip`**: Enable SIP support. - -- **`--enable-sqlite`**: Enable SQLite support (see [Supported storages][18]). - -- **`--disable-stun`**: Disable STUN/TURN support. - -- **`--enable-system-deps`**: Makes rebar use locally installed - dependencies instead of downloading them. - -
changed in 21.04
- -- **`--enable-tools`**: Enable the use of development tools. - -- **`--disable-zlib`**: Disable Stream Compression (XEP-0138) using zlib. - -### `make` - -This tool is used to compile ejabberd and perform other tasks: - -- Get, update, compile dependencies; clean files -- [System install](#system-install), uninstall -- Build OTP [production](#production-release) -/ [development](#production-release) releases -- Development: edoc, [options](/developer/guide/#configuration), - [translations](/developer/extending-ejabberd/localization/), tags -- Testing: dialyzer, [hooks](/developer/guide/#hooks), - [test](/developer/extending-ejabberd/testing/), xref - -Get the full list and details: - -``` bash -make help -``` - -## Installation - -There are several ways to install and run the ejabberd compiled from source code: -[system install](#system-install), -building a [production](#production-release) release, -or building a [development](#production-release) release. - -### System Install - -To install ejabberd in the destination directories, run the command `make install`. - -Note that you probably need administrative privileges in the system to -install ejabberd. - -The created files and directories depend on the options -provided to [`./configure`](#configure), by default they are: - - - -- `/etc/ejabberd/`: Configuration directory: - - - `ejabberd.yml`: ejabberd configuration file (see [File Format](/admin/configuration/file-format/)) - - `ejabberdctl.cfg`: Configuration file of the administration script (see [Erlang Runtime System](/admin/guide/managing/#erlang-runtime-system)) - - `inetrc`: Network DNS configuration file for Erlang - -- `/lib/ejabberd/`: - - - `ebin/`: Erlang binary files (\*.beam) - - `include/`: Erlang header files (\*.hrl) - - `priv/`: Additional files required at runtime - - `bin/`: Executable programs - - `lib/`: Binary system libraries (\*.so) - - `msgs/`: Translation files (\*.msgs) (see [Default Language](/admin/configuration/basic/#default-language)) - -- `/sbin/ejabberdctl`: Administration script (see [ejabberdctl](/admin/guide/managing/#ejabberdctl)) - -- `/share/doc/ejabberd/`: Documentation of ejabberd - -- `/var/lib/ejabberd/`: Spool directory: - - - `.erlang.cookie`: The [Erlang cookie file](/admin/guide/security/#erlang-cookie) - - `acl.DCD, ...`: Mnesia database spool files (\*.DCD, \*.DCL, \*.DAT) - -- `/var/log/ejabberd/`: Log directory (see [Logging](/admin/configuration/basic/#logging)): - - - `ejabberd.log`: ejabberd service log - - `erlang.log`: Erlang/OTP system log - -
improved in 21.07
-### Production Release - -You can build an OTP release that includes ejabberd, Erlang/OTP -and all the required erlang dependencies in a single tar.gz file. -Then you can copy that file to another machine that has the same machine -architecture, and run ejabberd without installing anything else. - -To build that release, run: -``` bash -make rel -``` - -If you provided to [`./configure`](#configure) the option - `--with-rebar` to use rebar3 or mix, this will directly -produce a tar.gz that you can copy. - -This example uses rebar3 to manage the compilation, -builds an OTP production release, -copies the resulting package to a temporary path, -and starts ejabberd there: - -``` bash -./autogen.sh -./configure --with-rebar=rebar3 -make -make rel -mkdir $HOME/eja-release -tar -xzvf _build/prod/ejabberd-*.tar.gz -C $HOME/eja-release -$HOME/eja-release/bin/ejabberdctl live -``` - -
new in 21.07
-### Development Release - -If you provided to [`./configure`](#configure) the option - `--with-rebar` to use rebar3 or mix, -you can build an OTP development release. - -This is designed to run ejabberd in the local machine for development, -manual testing... without installing in the system. - -This development release has some customizations: uses a dummy certificate file, -if you register the account admin@localhost it has admin rights... - -This example [uses Elixir's mix](/developer/extending-ejabberd/elixir/) -to manage the compilation, -builds an OTP development release, -and starts ejabberd there: - -``` bash -./autogen.sh -./configure --with-rebar=mix -make -make dev -_build/dev/rel/ejabberd/bin/ejabberdctl live -``` - -## Specific notes - -### asdf - -When Erlang/OTP (and/or Elixir) is installed -using [asdf](https://asdf-vm.com/) (multiple runtime version manager), -it is available only for your account, in `$HOME/.asdf/shims/erl`. -In that case, you cannot install ejabberd globally in the system, -and you cannot use the `root` account to start it, -because that account doesn't have access to erlang. - -In that scenario, there are several ways to run/install ejabberd: - -* Run a [development release](#development-release) locally without installing - -* Copy a [production release](#production-release) locally - -* Use [system install](#system-install), but install it locally: -```bash -./autogen.sh -./configure --prefix=$HOME/eja-install --enable-user -make -make install -$HOME/eja-install/sbin/ejabberdctl live -``` - -### BSD - -The command to compile ejabberd in BSD systems is `gmake`. - -You may want to check -[pkgsrc.se for ejabberd](https://pkgsrc.se/chat/ejabberd/). - -Up to ejabberd 23.04, some old scripts where included in ejabberd source for NetBSD compilation, and you can take a look to those files for reference in ejabberd -[`23.04/examples/mtr/`](https://github.com/processone/ejabberd/tree/23.04/examples/mtr) path. - -### macOS - -If compiling from sources on Mac OS X, you must configure ejabberd to use custom OpenSSL, Yaml, iconv. -The best approach is to use [Homebrew](https://brew.sh/) to install your dependencies, then -exports your custom path to let configure and make be aware of them. - -``` bash -brew install git erlang elixir openssl expat libyaml libiconv libgd sqlite rebar rebar3 automake autoconf -export LDFLAGS="-L/usr/local/opt/openssl/lib -L/usr/local/lib -L/usr/local/opt/expat/lib" -export CFLAGS="-I/usr/local/opt/openssl/include -I/usr/local/include -I/usr/local/opt/expat/include" -export CPPFLAGS="-I/usr/local/opt/openssl/include/ -I/usr/local/include -I/usr/local/opt/expat/include" -./configure -make -``` - -Check also the guide for -[Installing ejabberd development environment on OSX](/developer/install-osx/) - -# Next Steps - -## Starting ejabberd - -Depending on how you installed ejabberd, it may be started automatically by -the operating system at system boot time. - -You can use the `ejabberdctl` command line administration script to -start and stop ejabberd, check its status and many other administrative tasks. - -If you provided the configure option -`--enable-user=USER` (see compilation [options](#options)), you can execute `ejabberdctl` -with either that system account or root. - -Usage example: - -``` bash -prompt> ejabberdctl start - -prompt> ejabberdctl status -The node ejabberd@localhost is started with status: started -ejabberd is running in that node - -prompt> ejabberdctl stop -``` - -If ejabberd doesn't start correctly and a crash dump file is generated, -there was a severe problem. -You can try to start ejabberd in interactive mode with the command -`bin/ejabberdctl live` -to see the error messages provided by Erlang and identify the exact the problem. - -The `ejabberdctl` administration script is included in the `bin` -directory in the Linux Installers and Docker image. - -Please refer to the section -[ejabberdctl](/admin/guide/managing/#ejabberdctl) -for details -about `ejabberdctl`, and configurable options to fine tune the Erlang -runtime system. - -## Autostart on Linux - -If you compiled ejabberd from source code or some other method -that doesn't setup autostarting ejabberd, you can try this method. - -On a \*nix system, create a system user called 'ejabberd', give it write access -to the directories `database/` and `logs/`, and set that as home. - -If you want ejabberd to be started as daemon at boot time with that user, -copy `ejabberd.init` from the `bin` directory to something like `/etc/init.d/ejabberd`. -Then you can call `/etc/inid.d/ejabberd start` to start the server. - -Or if you have a `systemd` distribution: - -1. copy `ejabberd.service` to `/etc/systemd/system/` -2. run `systemctl daemon-reload` -3. run `systemctl enable ejabberd.service` -4. To start the server, you can run `systemctl start ejabberd` - -When ejabberd is started, the processes that are started in the system -are `beam` or `beam.smp`, and also `epmd`. For more information -regarding `epmd` consult the section relating to -[epmd](/admin/guide/security/#epmd). - - -## Administration Account - -Some ejabberd installation methods ask you details for the first account, -and take care to register that account and grant it administrative rights; -in that case you can skip this section. - -After installing ejabberd from source code or other methods, -you may want to register the first XMPP account and grant it administrative rights: - -1. Register an XMPP account on your ejabberd server. - For example, if `example.org` is configured in the - [hosts](/admin/configuration/basic/#host-names) - section in your ejabberd configuration file, - then you may want to register an account with JID `admin1@example.org`. - There are two ways to register an XMPP account in ejabberd: - - - Using an XMPP client and [In-Band Registration](/admin/configuration/modules/#mod-register). - - - Using [ejabberdctl](/admin/guide/managing/#ejabberdctl): - ``` bash - ejabberdctl register admin1 example.org password - ``` - -2. Edit the ejabberd configuration file to give administration - rights to the XMPP account you registered: - - ``` yaml - acl: - admin: - user: admin1@example.org - - access_rules: - configure: - allow: admin - ``` - - You can grant administrative privileges to many XMPP accounts, and - also to accounts in other XMPP servers. - -3. Restart ejabberd to load the new configuration, or run the - [reload_config](/developer/ejabberd-api/admin-api/#reload-config) command. - -4. Open the Web Admin page in your favourite browser. - The exact address depends on your ejabberd configuration, - and may be - [http://localhost:5280/admin/](http://localhost:5280/admin/), - [https://localhost:5443/admin/](https://localhost:5443/admin/), - [https://localhost:5280/admin/](https://localhost:5280/admin/) ... - -5. Your web browser shows a login window. Introduce the **full JID**, - in this example `admin1@example.org`, and the account password. - If the web address hostname is the same that the account JID, - you can provide simply the username instead of the full JID: `admin1`. - See [Web Admin](/admin/guide/managing/#web-admin) for details. - - -## Configuring ejabberd - -Now that you got ejabberd installed and running, it's time to configure it -to your needs. You can follow on the -[Configuration](/admin/configuration/) section -and take also a look at the -[Tutorials](/tutorials/). - - diff --git a/content/admin/introduction.md b/content/admin/introduction.md old mode 100755 new mode 100644 index 80974ac5..e55fb12c --- a/content/admin/introduction.md +++ b/content/admin/introduction.md @@ -1,8 +1,4 @@ ---- -title: Introduction -menu: Introduction -order: 1 ---- +# Features `ejabberd` is a *free and open source* instant messaging server written in [`Erlang/OTP`][1]. @@ -12,95 +8,100 @@ order: 1 `ejabberd` is suitable for small deployments, whether they need to be *scalable* or not, as well as extremely large deployments. -# Key Features +Check also the features in [ejabberd.im][im], +[ejabberd at ProcessOne][p1home], and the list of [supported protocols in ProcessOne][xeps] +and [XMPP.org][xmppej]. -`ejabberd` is: - -- *Cross-platform:* `ejabberd` runs under Microsoft Windows and Unix-derived systems such as Linux, FreeBSD and NetBSD. - -- *Distributed:* You can run `ejabberd` on a cluster of machines all serving the same Jabber domain(s). When you need more capacity you can simply add a new cheap node to your cluster. Accordingly, you do not need to buy an expensive high-end machine to support tens of thousands concurrent users. - -- *Fault-tolerant:* You can deploy an `ejabberd` cluster so that all the information required for a properly working service will be replicated permanently on all nodes. This means that if one of the nodes crashes, the others will continue working without disruption. In addition, nodes can be added or replaced on the fly. - -- *Administrator Friendly:* `ejabberd` is built on top of the Erlang programming language. As a result, if you wish, you can perform self-contained deployments. You are not required to install an external database, an external web server, amongst others because everything is already included, and ready to run out of the box. Other administrator benefits include: - - - Comprehensive documentation. - - Straightforward installers for Linux, Mac OS X, and Windows. - - Web Administration. - - Shared Roster Groups. - - Command line administration tool. - - Can integrate with existing authentication mechanisms. - - Capability to send announce messages. - -- *Internationalized:* `ejabberd` leads in internationalization and is well suited to build services available across the world. Related features are: - - - Translated to 25 languages. - - Support for [`IDNA`][2]. +[im]: https://ejabberd.im/ +[p1home]: https://www.process-one.net/en/ejabberd/ +[xeps]: https://www.process-one.net/en/ejabberd/protocols/ +[xmppej]: https://xmpp.org/software/servers/ejabberd/ -- *Open Standards:* `ejabberd` is the first Open Source Jabber server staking a claiming to full complyiance to the XMPP standard. - - - Fully XMPP compliant. - - XML-based protocol. - - [Many protocols supported][3]. - -# Additional Features - -`ejabberd` also comes with a wide range of other state-of-the-art features: - -- Modular - - - Load only the modules you want. - - Extend `ejabberd` with your own custom modules. +## Key Features +`ejabberd` is: -- Security +- *Cross-platform:* `ejabberd` runs under Microsoft Windows and Unix-derived systems such as Linux, FreeBSD and NetBSD. - - SASL and STARTTLS for c2s and s2s connections. - - STARTTLS and Dialback s2s connections. - - Web Admin accessible via HTTPS secure access. +- *Distributed:* You can run `ejabberd` on a cluster of machines all serving the same Jabber domain(s). When you need more capacity you can simply add a new cheap node to your cluster. Accordingly, you do not need to buy an expensive high-end machine to support tens of thousands concurrent users. +- *Fault-tolerant:* You can deploy an `ejabberd` cluster so that all the information required for a properly working service will be replicated permanently on all nodes. This means that if one of the nodes crashes, the others will continue working without disruption. In addition, nodes can be added or replaced on the fly. -- Databases +- *Administrator Friendly:* `ejabberd` is built on top of the Erlang programming language. As a result, if you wish, you can perform self-contained deployments. You are not required to install an external database, an external web server, amongst others because everything is already included, and ready to run out of the box. Other administrator benefits include: - - Internal database for fast deployment (Mnesia). - - Native MySQL support. - - Native PostgreSQL support. - - ODBC data storage support. - - Microsoft SQL Server support. - - SQLite support. + - Comprehensive documentation. + - Straightforward installers for Linux, Mac OS X, and Windows. + - Web Administration. + - Shared Roster Groups. + - Command line administration tool. + - Can integrate with existing authentication mechanisms. + - Capability to send announce messages. +- *Internationalized:* `ejabberd` leads in internationalization and is well suited to build services available across the world. Related features are: -- Authentication + - Translated to 25 languages. + - Support for [`IDNA`][2]. - - Internal Authentication. - - PAM, LDAP and SQL. - - External Authentication script. +- *Open Standards:* `ejabberd` is the first Open Source Jabber server staking a claiming to full complyiance to the XMPP standard. + - Fully XMPP compliant. + - XML-based protocol. + - [Many protocols supported][3]. -- Others +## Additional Features - - Support for virtual hosting. - - Compressing XML streams with Stream Compression - ([`XEP-0138`][4]). - - Statistics via Statistics Gathering - ([`XEP-0039`][5]). - - IPv6 support both for c2s and s2s connections. - - [`Multi-User Chat`][6] module with support for clustering and HTML logging. - - Users Directory based on users vCards. - - [`Publish-Subscribe`][7] component with support for - [`Personal Eventing via Pubsub`][8]. - - Support for web clients: Support for [XMPP subprotocol for WebSocket][9] and [`HTTP Binding (BOSH)`][10] services. - - IRC transport. - - SIP support. - - Component support: interface with networks such as AIM, ICQ and MSN installing special transports. +`ejabberd` also comes with a wide range of other state-of-the-art features: -[1]: https://erlang.org/ -[2]: https://tools.ietf.org/html/rfc3490 -[3]: https://ejabberd.im/protocols -[4]: https://xmpp.org/extensions/xep-0138.html -[5]: https://xmpp.org/extensions/xep-0039.html -[6]: https://xmpp.org/extensions/xep-0045.html -[7]: https://xmpp.org/extensions/xep-0060.html -[8]: https://xmpp.org/extensions/xep-0163.html -[9]: https://tools.ietf.org/html/rfc7395 -[10]: https://xmpp.org/extensions/xep-0206.html +- Modular + + - Load only the modules you want. + - Extend `ejabberd` with your own custom modules. + +- Security + + - SASL and STARTTLS for c2s and s2s connections. + - STARTTLS and Dialback s2s connections. + - Web Admin accessible via HTTPS secure access. + +- Databases + + - Internal database for fast deployment (Mnesia). + - Native MySQL support. + - Native PostgreSQL support. + - ODBC data storage support. + - Microsoft SQL Server support. + - SQLite support. + +- Authentication + + - Internal Authentication. + - PAM, LDAP and SQL. + - External Authentication script. + +- Others + + - Support for virtual hosting. + - Compressing XML streams with Stream Compression + ([`XEP-0138`][4]). + - Statistics via Statistics Gathering + ([`XEP-0039`][5]). + - IPv6 support both for c2s and s2s connections. + - [`Multi-User Chat`][6] module with support for clustering and HTML logging. + - Users Directory based on users vCards. + - [`Publish-Subscribe`][7] component with support for + [`Personal Eventing via Pubsub`][8]. + - Support for web clients: Support for [XMPP subprotocol for WebSocket][9] and [`HTTP Binding (BOSH)`][10] services. + - IRC transport. + - SIP support. + - Component support: interface with networks such as AIM, ICQ and MSN installing special transports. + +[1]: https://erlang.org/ +[2]: https://tools.ietf.org/html/rfc3490 +[3]: https://ejabberd.im/protocols +[4]: https://xmpp.org/extensions/xep-0138.html +[5]: https://xmpp.org/extensions/xep-0039.html +[6]: https://xmpp.org/extensions/xep-0045.html +[7]: https://xmpp.org/extensions/xep-0060.html +[8]: https://xmpp.org/extensions/xep-0163.html +[9]: https://tools.ietf.org/html/rfc7395 +[10]: https://xmpp.org/extensions/xep-0206.html diff --git a/content/admin/upgrade/index.md b/content/admin/upgrade/index.md old mode 100755 new mode 100644 index 453c1d5f..4629dd2c --- a/content/admin/upgrade/index.md +++ b/content/admin/upgrade/index.md @@ -1,10 +1,4 @@ ---- -title: Upgrade Procedure for ejabberd -menu: Upgrading ejabberd -categories: ecs -toc: true -order: 15 ---- +# Upgrade Procedure for ejabberd This document contains administration procedure for each version upgrade. Only upgrade from version N to N+1 is documented and supported. @@ -18,7 +12,7 @@ cluster, upgrade from older release than previous one, or have explicit note soft upgrade does not work, then you have to fallback to standalone upgrade process. -# Generic upgrade process +## Generic upgrade process This is the simplest process, and require service restart. @@ -29,14 +23,14 @@ This is the simplest process, and require service restart. - install new version - extract database archive in new path - if systemctl is used to manage ejabberd, copy the new service file and reload systemctl: -``` +``` sh cp ejabberd-21.12/bin/ejabberd.service /etc/systemd/system/ systemctl daemon-reload ``` - start new node -# Soft upgrade process +## Soft upgrade process This process needs you to run in cluster, with at least two nodes. In this case, we assume you run node A and B with version N, and will upgrade to version N+1. @@ -45,19 +39,19 @@ we assume you run node A and B with version N, and will upgrade to version N+1. make sure it does not explicitly states "soft upgrade is not supported". - apply the required changes in database from the upgrade note. - make sure node A is running -- run [leave_cluster](/developer/ejabberd-api/admin-api/#leave-cluster) on node B +- run [leave_cluster](../../developer/ejabberd-api/admin-api.md#leave_cluster) on node B - stop old node B - install new version on B's host - start new node B -- run [join_cluster](/developer/ejabberd-api/admin-api/#join-cluster) on node B, passing node A as parameter +- run [join_cluster](../../developer/ejabberd-api/admin-api.md#join_cluster) on node B, passing node A as parameter - make sure both nodes are running and working as expected -- run [leave_cluster](/developer/ejabberd-api/admin-api/#leave-cluster) on node A +- run [leave_cluster](../../developer/ejabberd-api/admin-api.md#leave_cluster) on node A - stop old node A - install new version on A's host - start new node A -- run [join_cluster](/developer/ejabberd-api/admin-api/#join-cluster) on node A, passing node B as parameter +- run [join_cluster](../../developer/ejabberd-api/admin-api.md#join_cluster) on node A, passing node B as parameter -# Module update process +## Module update process Instead of upgrading all ejabberd to a brand new version, maybe you just want to update a few modules with bugfixes... @@ -77,49 +71,54 @@ How to do this? 5. This will load into memory the corresponding `*.beam` files If you prefer to use commands, check -[update_list](/developer/ejabberd-api/admin-api/#update-list) -+ [update](/developer/ejabberd-api/admin-api/#update). +[update_list](../../developer/ejabberd-api/admin-api.md#update_list) ++ [update](../../developer/ejabberd-api/admin-api.md#update). -Notice this does not restart [modules](/admin/configuration/modules/) +Notice this does not restart [modules](../configuration/modules.md) or any other tasks. If the fix you plan to apply requires a module restart, you can use this alternative: -[restart_module](/developer/ejabberd-api/admin-api/#restart-module). +[restart_module](../../developer/ejabberd-api/admin-api.md#restart_module). -# Note on database schema upgrade +## Note on database schema upgrade `ejabberd` automatically updates the Mnesia table definitions at startup when needed. -If you also use an external [database](/admin/configuration/database/) (like MySQL, ...) +If you also use an external [database](../configuration/database.md) (like MySQL, ...) for storage of some modules, check in the corresponding [upgrade notes](#specific-version-upgrade-notes) of the new ejabberd version if you need to update those tables yourself manually. -# Specific version upgrade notes - -- [Upgrading from ejabberd 23.04 to 23.10](/admin/upgrade/from_23.04_to_23.10/) -- [Upgrading from ejabberd 23.01 to 23.04](/admin/upgrade/from_23.01_to_23.04/) -- [Upgrading from ejabberd 22.10 to 23.01](/admin/upgrade/from_22.10_to_23.01/) -- [Upgrading from ejabberd 22.05 to 22.10](/admin/upgrade/from_22.05_to_22.10/) -- [Upgrading from ejabberd 21.12 to 22.05](/admin/upgrade/from_21.12_to_22.05/) -- [Upgrading from ejabberd 21.07 to 21.12](/admin/upgrade/from_21.07_to_21.12/) -- [Upgrading from ejabberd 21.04 to 21.07](/admin/upgrade/from_21.04_to_21.07/) -- [Upgrading from ejabberd 21.01 to 21.04](/admin/upgrade/from_21.01_to_21.04/) -- [Upgrading from ejabberd 19.08 to 20.01](/admin/upgrade/from_19.08_to_20.01/) -- [Upgrading from ejabberd 19.05 to 19.08](/admin/upgrade/from_19.05_to_19.08/) -- [Upgrading from ejabberd 19.02 to 19.05](/admin/upgrade/from_19.02_to_19.05/) -- [Upgrading from ejabberd 18.12 to 19.02](/admin/upgrade/from_18.12_to_19.02/) -- [Upgrading from ejabberd 18.09 to 18.12](/admin/upgrade/from_18.09_to_18.12/) -- [Upgrading from ejabberd 18.06 to 18.09](/admin/upgrade/from_18.06_to_18.09/) -- [Upgrading from ejabberd 18.04 to 18.06](/admin/upgrade/from_18.04_to_18.06/) -- [Upgrading from ejabberd 18.03 to 18.04](/admin/upgrade/from_18.03_to_18.04/) -- [Upgrading from ejabberd 18.01 to 18.03](/admin/upgrade/from_18.01_to_18.03/) -- [Upgrading from ejabberd 17.11 to 18.01](/admin/upgrade/from_17.11_to_18.01/) -- [Upgrading from ejabberd 17.09 to 17.11](/admin/upgrade/from_17.09_to_17.11/) -- [Upgrading from ejabberd ≥17.06 and ≤17.08 to 17.09](/admin/upgrade/from_17.06_to_17.09/) -- [Upgrading from ejabberd 17.03 or 17.04 to 17.06](/admin/upgrade/from_17.03_to_17.06/) -- [Upgrading from ejabberd ≥16.08 and ≤17.01 to 17.03](/admin/upgrade/from_16.08_to_17.03/) -- [Upgrading from ejabberd 16.06 to 16.08](/admin/upgrade/from_16.06_to_16.08/) -- [Upgrading from ejabberd 16.04 to 16.06](/admin/upgrade/from_16.04_to_16.06/) -- [Upgrading from ejabberd 16.03 to 16.04](/admin/upgrade/from_16.03_to_16.04/) -- [Upgrading from ejabberd 16.02 to 16.03](/admin/upgrade/from_16.02_to_16.03/) -- [Upgrading from ejabberd 15.11 to 16.02](/admin/upgrade/from_15.11_to_16.02/) -- [Upgrading from ejabberd 2.1.1x to 16.02](/admin/upgrade/from_2.1.1x_to_16.02/) +## Specific version upgrade notes + +The corresponsing ugprade notes are available in the release notes of each release, +and also available in the [Archive](../../archive/index.md) section: + +- [Upgrading from ejabberd 24.02 to 24.06](../../archive/24.06/upgrade.md) +- [Upgrading from ejabberd 23.10 to 24.02](../../archive/24.02/upgrade.md) +- [Upgrading from ejabberd 23.04 to 23.10](../../archive/23.10/upgrade.md) +- [Upgrading from ejabberd 23.01 to 23.04](../../archive/23.04/upgrade.md) +- [Upgrading from ejabberd 22.10 to 23.01](../../archive/23.01/upgrade.md) +- [Upgrading from ejabberd 22.05 to 22.10](../../archive/22.10/upgrade.md) +- [Upgrading from ejabberd 21.12 to 22.05](../../archive/22.05/upgrade.md) +- [Upgrading from ejabberd 21.07 to 21.12](../../archive/21.12/upgrade.md) +- [Upgrading from ejabberd 21.04 to 21.07](../../archive/21.07/upgrade.md) +- [Upgrading from ejabberd 21.01 to 21.04](../../archive/21.04/upgrade.md) +- [Upgrading from ejabberd 19.08 to 20.01](../../archive/20.01/upgrade.md) +- [Upgrading from ejabberd 19.05 to 19.08](../../archive/older-releases/from_19.05_to_19.08.md) +- [Upgrading from ejabberd 19.02 to 19.05](../../archive/older-releases/from_19.02_to_19.05.md) +- [Upgrading from ejabberd 18.12 to 19.02](../../archive/older-releases/from_18.12_to_19.02.md) +- [Upgrading from ejabberd 18.09 to 18.12](../../archive/older-releases/from_18.09_to_18.12.md) +- [Upgrading from ejabberd 18.06 to 18.09](../../archive/older-releases/from_18.06_to_18.09.md) +- [Upgrading from ejabberd 18.04 to 18.06](../../archive/older-releases/from_18.04_to_18.06.md) +- [Upgrading from ejabberd 18.03 to 18.04](../../archive/older-releases/from_18.03_to_18.04.md) +- [Upgrading from ejabberd 18.01 to 18.03](../../archive/older-releases/from_18.01_to_18.03.md) +- [Upgrading from ejabberd 17.11 to 18.01](../../archive/older-releases/from_17.11_to_18.01.md) +- [Upgrading from ejabberd 17.09 to 17.11](../../archive/older-releases/from_17.09_to_17.11.md) +- [Upgrading from ejabberd ≥17.06 and ≤17.08 to 17.09](../../archive/older-releases/from_17.06_to_17.09.md) +- [Upgrading from ejabberd 17.03 or 17.04 to 17.06](../../archive/older-releases/from_17.03_to_17.06.md) +- [Upgrading from ejabberd ≥16.08 and ≤17.01 to 17.03](../../archive/older-releases/from_16.08_to_17.03.md) +- [Upgrading from ejabberd 16.06 to 16.08](../../archive/older-releases/from_16.06_to_16.08.md) +- [Upgrading from ejabberd 16.04 to 16.06](../../archive/older-releases/from_16.04_to_16.06.md) +- [Upgrading from ejabberd 16.03 to 16.04](../../archive/older-releases/from_16.03_to_16.04.md) +- [Upgrading from ejabberd 16.02 to 16.03](../../archive/older-releases/from_16.02_to_16.03.md) +- [Upgrading from ejabberd 15.11 to 16.02](../../archive/older-releases/from_15.11_to_16.02.md) +- [Upgrading from ejabberd 2.1.1x to 16.02](../../archive/older-releases/from_2.1.1x_to_16.02.md) diff --git a/content/architect/index.md b/content/architect/index.md deleted file mode 100755 index 0f96b59f..00000000 --- a/content/architect/index.md +++ /dev/null @@ -1,3 +0,0 @@ ---- -redirect: /developer/extending-ejabberd/architecture/ ---- diff --git a/content/archive/20_01/index.md b/content/archive/20.01/index.md similarity index 66% rename from content/archive/20_01/index.md rename to content/archive/20.01/index.md index 7260a4cd..a5e02487 100644 --- a/content/archive/20_01/index.md +++ b/content/archive/20.01/index.md @@ -1,11 +1,6 @@ ---- -title: Archived Documentation for 20.01 -menu: 20.01 -order: 7998 ---- +# Archived Documentation for 20.01 If you are upgrading ejabberd from a previous release, you can check: * [ejabberd 20.01 release announcement](https://www.process-one.net/blog/ejabberd-20-01/) -* [ejabberd Github Compare from 19.09.1](https://github.com/processone/ejabberd/compare/19.09.1...20.01) - +* [ejabberd Github Compare from 19.09.1](https://github.com/processone/ejabberd/compare/19.09.1..20.01) diff --git a/content/admin/upgrade/from_19.08_to_20.01.md b/content/archive/20.01/upgrade.md similarity index 93% rename from content/admin/upgrade/from_19.08_to_20.01.md rename to content/archive/20.01/upgrade.md index 4b812171..01e2d534 100644 --- a/content/admin/upgrade/from_19.08_to_20.01.md +++ b/content/archive/20.01/upgrade.md @@ -1,6 +1,4 @@ ---- -title: Upgrade to ejabberd 20.01 ---- +# Upgrade to ejabberd 20.01 ## Database changes @@ -10,14 +8,14 @@ To migrate from 19.08 (or 19.09) to 20.01, you have to use the following command If you are using the legacy `mysql.sql` schema: -```sql +``` sql ALTER TABLE oauth_client CHANGE `client` `client_id` text PRIMARY KEY; ALTER TABLE oauth_client CHANGE `secret` `client_name` text NOT NULL; ``` If you are using the newer `mysql.new.sql` schema: -```sql +``` sql CREATE TABLE oauth_client ( client_id varchar(191) NOT NULL PRIMARY KEY, client_name text NOT NULL, @@ -28,7 +26,7 @@ CREATE TABLE oauth_client ( ### PostgreSQL -```sql +``` sql CREATE TABLE oauth_client ( client_id text PRIMARY KEY, client_name text NOT NULL, diff --git a/content/archive/20_02/index.md b/content/archive/20.02/index.md similarity index 67% rename from content/archive/20_02/index.md rename to content/archive/20.02/index.md index da050b1d..ff4105f7 100644 --- a/content/archive/20_02/index.md +++ b/content/archive/20.02/index.md @@ -1,11 +1,6 @@ ---- -title: Archived Documentation for 20.02 -menu: 20.02 -order: 7997 ---- +# Archived Documentation for 20.02 If you are upgrading ejabberd from a previous release, you can check: * [ejabberd 20.02 release announcement](https://www.process-one.net/blog/ejabberd-20-02/) -* [ejabberd Github Compare from 20.01](https://github.com/processone/ejabberd/compare/20.01...20.02) - +* [ejabberd Github Compare from 20.01](https://github.com/processone/ejabberd/compare/20.01..20.02) diff --git a/content/archive/20_03/index.md b/content/archive/20.03/index.md similarity index 67% rename from content/archive/20_03/index.md rename to content/archive/20.03/index.md index ce4a7928..8552ce68 100644 --- a/content/archive/20_03/index.md +++ b/content/archive/20.03/index.md @@ -1,11 +1,6 @@ ---- -title: Archived Documentation for 20.03 -menu: 20.03 -order: 7996 ---- +# Archived Documentation for 20.03 If you are upgrading ejabberd from a previous release, you can check: * [ejabberd 20.03 release announcement](https://www.process-one.net/blog/ejabberd-20-03/) -* [ejabberd Github Compare from 20.02](https://github.com/processone/ejabberd/compare/20.02...20.03) - +* [ejabberd Github Compare from 20.02](https://github.com/processone/ejabberd/compare/20.02..20.03) diff --git a/content/archive/20_04/admin-api.md b/content/archive/20.04/admin-api.md similarity index 91% rename from content/archive/20_04/admin-api.md rename to content/archive/20.04/admin-api.md index 37026132..8b6d326e 100644 --- a/content/archive/20_04/admin-api.md +++ b/content/archive/20.04/admin-api.md @@ -1,17 +1,14 @@ --- -title: Administration API reference -toc: true -menu: Administration API -// Autogenerated with 'ejabberdctl gen_markdown_doc_for_commands' +search: + exclude: true --- +# API Reference ## add_rosteritem - Add an item to a user's roster (supports ODBC) - Group can be several groups separated by ; for example: "g1;g2;g3" __Arguments:__ @@ -30,8 +27,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/add_rosteritem { "localuser": "user1", @@ -45,14 +41,10 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## backup - Store the database to backup file __Arguments:__ @@ -65,8 +57,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/backup { "file": "/var/lib/ejabberd/database.backup" @@ -74,14 +65,10 @@ __Examples:__ HTTP/1.1 200 OK "Success" -~~~ - - - +``` ## ban_account - Ban an account: kick sessions and set random password __Arguments:__ @@ -96,8 +83,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/ban_account { "user": "attacker", @@ -107,14 +93,10 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## bookmarks_to_pep - Export private XML storage bookmarks to PEP __Arguments:__ @@ -128,8 +110,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/bookmarks_to_pep { "user": "bob", @@ -138,14 +119,10 @@ __Examples:__ HTTP/1.1 200 OK "Bookmarks exported" -~~~ - - - +``` ## change_password - Change the password of an account __Arguments:__ @@ -160,8 +137,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/change_password { "user": "peter", @@ -171,14 +147,10 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## change_room_option - Change an option in a MUC room __Arguments:__ @@ -194,8 +166,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/change_room_option { "name": "room1", @@ -206,14 +177,10 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## check_account - Check if an account exists or not __Arguments:__ @@ -227,8 +194,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/check_account { "user": "peter", @@ -237,14 +203,10 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## check_password - Check if a password is correct __Arguments:__ @@ -259,8 +221,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/check_password { "user": "peter", @@ -270,17 +231,12 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## check_password_hash - Check if the password hash is correct - Allows hash methods from crypto application __Arguments:__ @@ -296,8 +252,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/check_password_hash { "user": "peter", @@ -308,27 +263,21 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## clear_cache - Clear database cache on all nodes __Arguments:__ - __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Examples:__ - -~~~ json +``` json POST /api/clear_cache { @@ -336,14 +285,10 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## compile - Recompile and reload Erlang source code file __Arguments:__ @@ -356,8 +301,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/compile { "file": "/home/me/srcs/ejabberd/mod_example.erl" @@ -365,27 +309,21 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## connected_users - List all established sessions __Arguments:__ - __Result:__ - *connected_users* :: [sessions::string] : List of users sessions __Examples:__ - -~~~ json +``` json POST /api/connected_users { @@ -396,27 +334,21 @@ __Examples:__ "user1@example.com", "user2@example.com" ] -~~~ - - - +``` ## connected_users_info - List all established sessions and their information __Arguments:__ - __Result:__ - *connected_users_info* :: [{jid::string, connection::string, ip::string, port::integer, priority::integer, node::string, uptime::integer, status::string, resource::string, statustext::string}] __Examples:__ - -~~~ json +``` json POST /api/connected_users_info { @@ -437,27 +369,21 @@ __Examples:__ "statustext": "" } ] -~~~ - - - +``` ## connected_users_number - Get the number of established sessions __Arguments:__ - __Result:__ - *num_sessions* :: integer __Examples:__ - -~~~ json +``` json POST /api/connected_users_number { @@ -465,14 +391,10 @@ __Examples:__ HTTP/1.1 200 OK {"num_sessions": 2} -~~~ - - - +``` ## connected_users_vhost - Get the list of established sessions in a vhost __Arguments:__ @@ -485,8 +407,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/connected_users_vhost { "host": "myexample.com" @@ -497,14 +418,10 @@ __Examples:__ "user1@myserver.com/tka", "user2@localhost/tka" ] -~~~ - - - +``` ## convert_to_scram - Convert the passwords of users to SCRAM __Arguments:__ @@ -517,8 +434,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/convert_to_scram { "host": "example.com" @@ -526,14 +442,10 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## convert_to_yaml - Convert the input file from Erlang to YAML format __Arguments:__ @@ -547,8 +459,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/convert_to_yaml { "in": "/etc/ejabberd/ejabberd.cfg", @@ -557,14 +468,10 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## create_room - Create a MUC room name@service in host __Arguments:__ @@ -579,8 +486,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/create_room { "name": "room1", @@ -590,14 +496,10 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## create_room_with_opts - Create a MUC room name@service in host with given options __Arguments:__ @@ -613,8 +515,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/create_room_with_opts { "name": "room1", @@ -630,17 +531,12 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## create_rooms_file - Create the rooms indicated in file - Provide one room JID per line. Rooms will be created after restart. __Arguments:__ @@ -653,8 +549,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/create_rooms_file { "file": "/home/ejabberd/rooms.txt" @@ -662,27 +557,21 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## delete_expired_messages - Delete expired offline messages from database __Arguments:__ - __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Examples:__ - -~~~ json +``` json POST /api/delete_expired_messages { @@ -690,14 +579,10 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## delete_mnesia - Delete elements in Mnesia database for a given vhost __Arguments:__ @@ -710,8 +595,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/delete_mnesia { "host": "example.com" @@ -719,17 +603,12 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## delete_old_mam_messages - Delete MAM messages older than DAYS - Valid message TYPEs: "chat", "groupchat", "all". __Arguments:__ @@ -743,8 +622,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/delete_old_mam_messages { "type": "all", @@ -753,14 +631,10 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## delete_old_messages - Delete offline messages older than DAYS __Arguments:__ @@ -773,8 +647,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/delete_old_messages { "days": 31 @@ -782,14 +655,10 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## delete_old_push_sessions - Remove push sessions older than DAYS __Arguments:__ @@ -802,8 +671,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/delete_old_push_sessions { "days": 1 @@ -811,24 +679,18 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## delete_old_users - Delete users that didn't log in last days, or that never logged - To protect admin accounts, configure this for example: access_rules: protect_old_users: - allow: admin - deny: all - __Arguments:__ - *days* :: integer : Last login age in days of accounts that should be removed @@ -839,8 +701,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/delete_old_users { "days": 30 @@ -848,24 +709,18 @@ __Examples:__ HTTP/1.1 200 OK "Deleted 2 users: ["oldman@myserver.com", "test@myserver.com"]" -~~~ - - - +``` ## delete_old_users_vhost - Delete users that didn't log in last days in vhost, or that never logged - To protect admin accounts, configure this for example: access_rules: delete_old_users: - deny: admin - allow: all - __Arguments:__ - *host* :: string : Server name @@ -877,8 +732,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/delete_old_users_vhost { "host": "myserver.com", @@ -887,14 +741,10 @@ __Examples:__ HTTP/1.1 200 OK "Deleted 2 users: ["oldman@myserver.com", "test@myserver.com"]" -~~~ - - - +``` ## delete_rosteritem - Delete an item from a user's roster (supports ODBC) __Arguments:__ @@ -910,8 +760,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/delete_rosteritem { "localuser": "user1", @@ -922,14 +771,10 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## destroy_room - Destroy a MUC room __Arguments:__ @@ -943,8 +788,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/destroy_room { "name": "room1", @@ -953,17 +797,12 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## destroy_rooms_file - Destroy the rooms indicated in file - Provide one room JID per line. __Arguments:__ @@ -976,8 +815,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/destroy_rooms_file { "file": "/home/ejabberd/rooms.txt" @@ -985,14 +823,10 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## dump - Dump the database to a text file __Arguments:__ @@ -1005,8 +839,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/dump { "file": "/var/lib/ejabberd/database.txt" @@ -1014,14 +847,10 @@ __Examples:__ HTTP/1.1 200 OK "Success" -~~~ - - - +``` ## dump_config - Dump configuration in YAML format as seen by ejabberd __Arguments:__ @@ -1034,8 +863,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/dump_config { "out": "/tmp/ejabberd.yml" @@ -1043,14 +871,10 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## dump_table - Dump a table to a text file __Arguments:__ @@ -1064,8 +888,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/dump_table { "file": "/var/lib/ejabberd/table-muc-registered.txt", @@ -1074,17 +897,12 @@ __Examples:__ HTTP/1.1 200 OK "Success" -~~~ - - - +``` ## export2sql - Export virtual host information from Mnesia tables to SQL file - Configure the modules to use SQL, then call this command. __Arguments:__ @@ -1098,8 +916,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/export2sql { "host": "example.com", @@ -1108,14 +925,10 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## export_piefxis - Export data of all users in the server to PIEFXIS files (XEP-0227) __Arguments:__ @@ -1128,8 +941,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/export_piefxis { "dir": "/var/lib/ejabberd/" @@ -1137,14 +949,10 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## export_piefxis_host - Export data of users in a host to PIEFXIS files (XEP-0227) __Arguments:__ @@ -1158,8 +966,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/export_piefxis_host { "dir": "/var/lib/ejabberd/", @@ -1168,27 +975,21 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## gc - Force full garbage collection __Arguments:__ - __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Examples:__ - -~~~ json +``` json POST /api/gc { @@ -1196,14 +997,10 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## gen_html_doc_for_commands - Generates html documentation for ejabberd_commands __Arguments:__ @@ -1218,8 +1015,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/gen_html_doc_for_commands { "file": "/home/me/docs/api.html", @@ -1229,14 +1025,10 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## gen_markdown_doc_for_commands - Generates markdown documentation for ejabberd_commands __Arguments:__ @@ -1251,8 +1043,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/gen_markdown_doc_for_commands { "file": "/home/me/docs/api.html", @@ -1262,27 +1053,21 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## get_cookie - Get the Erlang cookie of this node __Arguments:__ - __Result:__ - *cookie* :: string : Erlang cookie used for authentication by ejabberd __Examples:__ - -~~~ json +``` json POST /api/get_cookie { @@ -1290,17 +1075,12 @@ __Examples:__ HTTP/1.1 200 OK {"cookie": "MWTAVMODFELNLSMYXPPD"} -~~~ - - - +``` ## get_last - Get last activity information - Timestamp is UTC and XEP-0082 format, for example: 2017-02-23T22:25:28.063062Z ONLINE __Arguments:__ @@ -1314,8 +1094,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/get_last { "user": "user1", @@ -1327,27 +1106,21 @@ __Examples:__ "timestamp": "2017-06-30T14:32:16.060684Z", "status": "ONLINE" } -~~~ - - - +``` ## get_loglevel - Get the current loglevel __Arguments:__ - __Result:__ - *levelatom* :: string : Tuple with the log level number, its keyword and description __Examples:__ - -~~~ json +``` json POST /api/get_loglevel { @@ -1355,14 +1128,10 @@ __Examples:__ HTTP/1.1 200 OK {"levelatom": "warning"} -~~~ - - - +``` ## get_offline_count - Get the number of unread offline messages __Arguments:__ @@ -1376,8 +1145,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/get_offline_count { "user": "aaaaa", @@ -1386,25 +1154,21 @@ __Examples:__ HTTP/1.1 200 OK {"value": 5} -~~~ - - - +``` ## get_presence - Retrieve the resource with highest priority, and its presence (show and status message) for a given user. - The 'jid' value contains the user jid with resource. The 'show' value contains the user presence flag. It can take limited values: - - available - - chat (Free for chat) - - away - - dnd (Do not disturb) - - xa (Not available, extended away) - - unavailable (Not connected) + +- available +- chat (Free for chat) +- away +- dnd (Do not disturb) +- xa (Not available, extended away) +- unavailable (Not connected) 'status' is a free text defined by the user client. @@ -1419,8 +1183,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/get_presence { "user": "peter", @@ -1433,14 +1196,10 @@ __Examples:__ "show": "dnd", "status": "Busy" } -~~~ - - - +``` ## get_room_affiliation - Get affiliation of a user in MUC room __Arguments:__ @@ -1455,8 +1214,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/get_room_affiliation { "name": "room1", @@ -1466,14 +1224,10 @@ __Examples:__ HTTP/1.1 200 OK {"affiliation": "member"} -~~~ - - - +``` ## get_room_affiliations - Get the list of affiliations of a MUC room __Arguments:__ @@ -1487,8 +1241,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/get_room_affiliations { "name": "room1", @@ -1504,14 +1257,10 @@ __Examples:__ "reason": "member" } ] -~~~ - - - +``` ## get_room_occupants - Get the list of occupants of a MUC room __Arguments:__ @@ -1525,8 +1274,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/get_room_occupants { "name": "room1", @@ -1541,14 +1289,10 @@ __Examples:__ "role": "owner" } ] -~~~ - - - +``` ## get_room_occupants_number - Get the number of occupants of a MUC room __Arguments:__ @@ -1562,8 +1306,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/get_room_occupants_number { "name": "room1", @@ -1572,14 +1315,10 @@ __Examples:__ HTTP/1.1 200 OK {"occupants": 7} -~~~ - - - +``` ## get_room_options - Get options from a MUC room __Arguments:__ @@ -1593,8 +1332,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/get_room_options { "name": "room1", @@ -1608,14 +1346,10 @@ __Examples:__ "value": "true" } ] -~~~ - - - +``` ## get_roster - Get roster of a local user __Arguments:__ @@ -1629,8 +1363,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/get_roster { "user": "aaaaa", @@ -1654,14 +1387,10 @@ __Examples:__ "group": "jjjjj" } ] -~~~ - - - +``` ## get_subscribers - List subscribers of a MUC conference __Arguments:__ @@ -1675,8 +1404,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/get_subscribers { "name": "room1", @@ -1688,14 +1416,10 @@ __Examples:__ "user2@example.com", "user3@example.com" ] -~~~ - - - +``` ## get_user_rooms - Get the list of rooms where this user is occupant __Arguments:__ @@ -1709,8 +1433,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/get_user_rooms { "user": "tom", @@ -1722,26 +1445,21 @@ __Examples:__ "room1@muc.example.com", "room2@muc.example.com" ] -~~~ - - - +``` ## get_vcard - Get content from a vCard field - Some vcard field names in get/set_vcard are: -* FN - Full Name -* NICKNAME - Nickname -* BDAY - Birthday -* TITLE - Work: Position -* ROLE - Work: Role +- FN - Full Name +- NICKNAME - Nickname +- BDAY - Birthday +- TITLE - Work: Position +- ROLE - Work: Role -For a full list of vCard fields check XEP-0054: vcard-temp at https://xmpp.org/extensions/xep-0054.html +For a full list of vCard fields check XEP-0054: vcard-temp at __Arguments:__ @@ -1755,8 +1473,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/get_vcard { "user": "user1", @@ -1766,33 +1483,28 @@ __Examples:__ HTTP/1.1 200 OK {"content": "User 1"} -~~~ - - - +``` ## get_vcard2 - Get content from a vCard subfield - Some vcard field names and subnames in get/set_vcard2 are: -* N FAMILY - Family name -* N GIVEN - Given name -* N MIDDLE - Middle name -* ADR CTRY - Address: Country -* ADR LOCALITY - Address: City -* TEL HOME - Telephone: Home -* TEL CELL - Telephone: Cellphone -* TEL WORK - Telephone: Work -* TEL VOICE - Telephone: Voice -* EMAIL USERID - E-Mail Address -* ORG ORGNAME - Work: Company -* ORG ORGUNIT - Work: Department +- N FAMILY - Family name +- N GIVEN - Given name +- N MIDDLE - Middle name +- ADR CTRY - Address: Country +- ADR LOCALITY - Address: City +- TEL HOME - Telephone: Home +- TEL CELL - Telephone: Cellphone +- TEL WORK - Telephone: Work +- TEL VOICE - Telephone: Voice +- EMAIL USERID - E-Mail Address +- ORG ORGNAME - Work: Company +- ORG ORGUNIT - Work: Department -For a full list of vCard fields check XEP-0054: vcard-temp at https://xmpp.org/extensions/xep-0054.html +For a full list of vCard fields check XEP-0054: vcard-temp at __Arguments:__ @@ -1807,8 +1519,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/get_vcard2 { "user": "user1", @@ -1819,33 +1530,28 @@ __Examples:__ HTTP/1.1 200 OK {"content": "Schubert"} -~~~ - - - +``` ## get_vcard2_multi - Get multiple contents from a vCard field - Some vcard field names and subnames in get/set_vcard2 are: -* N FAMILY - Family name -* N GIVEN - Given name -* N MIDDLE - Middle name -* ADR CTRY - Address: Country -* ADR LOCALITY - Address: City -* TEL HOME - Telephone: Home -* TEL CELL - Telephone: Cellphone -* TEL WORK - Telephone: Work -* TEL VOICE - Telephone: Voice -* EMAIL USERID - E-Mail Address -* ORG ORGNAME - Work: Company -* ORG ORGUNIT - Work: Department +- N FAMILY - Family name +- N GIVEN - Given name +- N MIDDLE - Middle name +- ADR CTRY - Address: Country +- ADR LOCALITY - Address: City +- TEL HOME - Telephone: Home +- TEL CELL - Telephone: Cellphone +- TEL WORK - Telephone: Work +- TEL VOICE - Telephone: Voice +- EMAIL USERID - E-Mail Address +- ORG ORGNAME - Work: Company +- ORG ORGUNIT - Work: Department -For a full list of vCard fields check XEP-0054: vcard-temp at https://xmpp.org/extensions/xep-0054.html +For a full list of vCard fields check XEP-0054: vcard-temp at __Arguments:__ @@ -1860,8 +1566,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/get_vcard2_multi { "user": "aaaaa", @@ -1875,14 +1580,10 @@ __Examples:__ "aaaaa", "bbbbb" ] -~~~ - - - +``` ## import_dir - Import users data from jabberd14 spool dir __Arguments:__ @@ -1895,8 +1596,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/import_dir { "file": "/var/lib/ejabberd/jabberd14/" @@ -1904,14 +1604,10 @@ __Examples:__ HTTP/1.1 200 OK "Success" -~~~ - - - +``` ## import_file - Import user data from jabberd14 spool file __Arguments:__ @@ -1924,8 +1620,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/import_file { "file": "/var/lib/ejabberd/jabberd14.spool" @@ -1933,14 +1628,10 @@ __Examples:__ HTTP/1.1 200 OK "Success" -~~~ - - - +``` ## import_piefxis - Import users data from a PIEFXIS file (XEP-0227) __Arguments:__ @@ -1953,8 +1644,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/import_piefxis { "file": "/var/lib/ejabberd/example.com.xml" @@ -1962,17 +1652,12 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## import_prosody - Import data from Prosody - Note: this method requires ejabberd compiled with optional tools support and package must provide optional luerl dependency. __Arguments:__ @@ -1985,8 +1670,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/import_prosody { "dir": "/var/lib/prosody/datadump/" @@ -1994,27 +1678,21 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## incoming_s2s_number - Number of incoming s2s connections on the node __Arguments:__ - __Result:__ - *s2s_incoming* :: integer __Examples:__ - -~~~ json +``` json POST /api/incoming_s2s_number { @@ -2022,14 +1700,10 @@ __Examples:__ HTTP/1.1 200 OK {"s2s_incoming": 1} -~~~ - - - +``` ## install_fallback - Install the database from a fallback file __Arguments:__ @@ -2042,8 +1716,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/install_fallback { "file": "/var/lib/ejabberd/database.fallback" @@ -2051,17 +1724,12 @@ __Examples:__ HTTP/1.1 200 OK "Success" -~~~ - - - +``` ## join_cluster - Join this node into the cluster handled by Node - This command works only with ejabberdctl, not mod_http_api or other code that runs inside the same ejabberd node that will be joined. __Arguments:__ @@ -2074,8 +1742,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/join_cluster { "node": "ejabberd1@machine7" @@ -2083,14 +1750,10 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## kick_session - Kick a user session __Arguments:__ @@ -2106,8 +1769,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/kick_session { "user": "peter", @@ -2118,14 +1780,10 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## kick_user - Disconnect user's active sessions __Arguments:__ @@ -2139,8 +1797,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/kick_user { "user": "user1", @@ -2149,17 +1806,12 @@ __Examples:__ HTTP/1.1 200 OK {"num_resources": 3} -~~~ - - - +``` ## leave_cluster - Remove and shutdown Node from the running cluster - This command can be run from any running node of the cluster, even the node to be removed. In the removed node, this command works only when using ejabberdctl, not mod_http_api or other code that runs inside the same ejabberd node that will leave. __Arguments:__ @@ -2172,8 +1824,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/leave_cluster { "node": "ejabberd1@machine8" @@ -2181,27 +1832,21 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## list_cluster - List nodes that are part of the cluster handled by Node __Arguments:__ - __Result:__ - *nodes* :: [node::string] __Examples:__ - -~~~ json +``` json POST /api/list_cluster { @@ -2212,14 +1857,10 @@ __Examples:__ "ejabberd1@machine7", "ejabberd1@machine8" ] -~~~ - - - +``` ## load - Restore the database from a text file __Arguments:__ @@ -2232,8 +1873,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/load { "file": "/var/lib/ejabberd/database.txt" @@ -2241,27 +1881,21 @@ __Examples:__ HTTP/1.1 200 OK "Success" -~~~ - - - +``` ## man - Generate Unix manpage for current ejabberd version __Arguments:__ - __Result:__ - *res* :: string : Raw result string __Examples:__ - -~~~ json +``` json POST /api/man { @@ -2269,14 +1903,10 @@ __Examples:__ HTTP/1.1 200 OK "Success" -~~~ - - - +``` ## mnesia_change_nodename - Change the erlang node name in a backup file __Arguments:__ @@ -2292,8 +1922,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/mnesia_change_nodename { "oldnodename": "ejabberd@machine1", @@ -2304,27 +1933,21 @@ __Examples:__ HTTP/1.1 200 OK "Success" -~~~ - - - +``` ## mnesia_info - Dump info on global Mnesia state __Arguments:__ - __Result:__ - *res* :: string __Examples:__ - -~~~ json +``` json POST /api/mnesia_info { @@ -2332,14 +1955,10 @@ __Examples:__ HTTP/1.1 200 OK {"res": "aaaaa"} -~~~ - - - +``` ## mnesia_table_info - Dump info on Mnesia table state __Arguments:__ @@ -2352,8 +1971,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/mnesia_table_info { "table": "roster" @@ -2361,14 +1979,10 @@ __Examples:__ HTTP/1.1 200 OK {"res": "aaaaa"} -~~~ - - - +``` ## module_check - Check the contributed module repository compliance __Arguments:__ @@ -2381,8 +1995,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/module_check { "module": "mod_rest" @@ -2390,14 +2003,10 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## module_install - Compile, install and start an available contributed module __Arguments:__ @@ -2410,8 +2019,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/module_install { "module": "mod_rest" @@ -2419,14 +2027,10 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## module_uninstall - Uninstall a contributed module __Arguments:__ @@ -2439,8 +2043,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/module_uninstall { "module": "mod_rest" @@ -2448,17 +2051,12 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## module_upgrade - Upgrade the running code of an installed module - In practice, this uninstalls and installs the module __Arguments:__ @@ -2471,8 +2069,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/module_upgrade { "module": "mod_rest" @@ -2480,27 +2077,21 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## modules_available - List the contributed modules available to install __Arguments:__ - __Result:__ - *modules* :: [{name::string, summary::string}] : List of tuples with module name and description __Examples:__ - -~~~ json +``` json POST /api/modules_available { @@ -2511,27 +2102,21 @@ __Examples:__ "mod_cron": "Execute scheduled commands", "mod_rest": "ReST frontend" } -~~~ - - - +``` ## modules_installed - List the contributed modules already installed __Arguments:__ - __Result:__ - *modules* :: [{name::string, summary::string}] : List of tuples with module name and description __Examples:__ - -~~~ json +``` json POST /api/modules_installed { @@ -2542,30 +2127,23 @@ __Examples:__ "mod_cron": "Execute scheduled commands", "mod_rest": "ReST frontend" } -~~~ - - - +``` ## modules_update_specs - Update the module source code from Git - A connection to Internet is required __Arguments:__ - __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Examples:__ - -~~~ json +``` json POST /api/modules_update_specs { @@ -2573,14 +2151,10 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## muc_online_rooms - List existing rooms ('global' to get all vhosts) __Arguments:__ @@ -2593,8 +2167,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/muc_online_rooms { "service": "muc.example.com" @@ -2605,14 +2178,10 @@ __Examples:__ "room1@muc.example.com", "room2@muc.example.com" ] -~~~ - - - +``` ## muc_online_rooms_by_regex - List existing rooms ('global' to get all vhosts) by regex __Arguments:__ @@ -2626,8 +2195,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/muc_online_rooms_by_regex { "service": "muc.example.com", @@ -2647,14 +2215,10 @@ __Examples:__ "participants": 10 } ] -~~~ - - - +``` ## muc_register_nick - Register a nick to a User JID in a MUC service __Arguments:__ @@ -2669,8 +2233,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/muc_register_nick { "nick": "Tim", @@ -2680,14 +2243,10 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## muc_unregister_nick - Unregister the nick registered by that account in the MUC service __Arguments:__ @@ -2701,8 +2260,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/muc_unregister_nick { "jid": "tim@example.org", @@ -2711,14 +2269,10 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## num_resources - Get the number of resources of a user __Arguments:__ @@ -2732,8 +2286,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/num_resources { "user": "peter", @@ -2742,14 +2295,10 @@ __Examples:__ HTTP/1.1 200 OK {"resources": 5} -~~~ - - - +``` ## oauth_add_client_implicit - Add OAUTH client_id with implicit grant type __Arguments:__ @@ -2764,8 +2313,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/oauth_add_client_implicit { "client_id": "aaaaa", @@ -2775,14 +2323,10 @@ __Examples:__ HTTP/1.1 200 OK "Success" -~~~ - - - +``` ## oauth_add_client_password - Add OAUTH client_id with password grant type __Arguments:__ @@ -2797,8 +2341,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/oauth_add_client_password { "client_id": "aaaaa", @@ -2808,14 +2351,10 @@ __Examples:__ HTTP/1.1 200 OK "Success" -~~~ - - - +``` ## oauth_issue_token - Issue an oauth token for the given jid __Arguments:__ @@ -2830,8 +2369,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/oauth_issue_token { "jid": "user@server.com", @@ -2845,30 +2383,23 @@ __Examples:__ "scopes": "bbbbb", "expires_in": "ccccc" } -~~~ - - - +``` ## oauth_list_tokens - List oauth tokens, user, scope, and seconds to expire (only Mnesia) - List oauth tokens, their user and scope, and how many seconds remain until expirity __Arguments:__ - __Result:__ - *tokens* :: [{token::string, user::string, scope::string, expires_in::string}] __Examples:__ - -~~~ json +``` json POST /api/oauth_list_tokens { @@ -2889,14 +2420,10 @@ __Examples:__ "expires_in": "hhhhh" } ] -~~~ - - - +``` ## oauth_remove_client - Remove OAUTH client_id __Arguments:__ @@ -2909,8 +2436,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/oauth_remove_client { "client_id": "aaaaa" @@ -2918,14 +2444,10 @@ __Examples:__ HTTP/1.1 200 OK "Success" -~~~ - - - +``` ## oauth_revoke_token - Revoke authorization for a token (only Mnesia) __Arguments:__ @@ -2938,8 +2460,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/oauth_revoke_token { "token": "aaaaa" @@ -2960,27 +2481,21 @@ __Examples:__ "expires_in": "hhhhh" } ] -~~~ - - - +``` ## outgoing_s2s_number - Number of outgoing s2s connections on the node __Arguments:__ - __Result:__ - *s2s_outgoing* :: integer __Examples:__ - -~~~ json +``` json POST /api/outgoing_s2s_number { @@ -2988,14 +2503,10 @@ __Examples:__ HTTP/1.1 200 OK {"s2s_outgoing": 1} -~~~ - - - +``` ## privacy_set - Send a IQ set privacy stanza for a local account __Arguments:__ @@ -3010,8 +2521,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/privacy_set { "user": "user1", @@ -3021,14 +2531,10 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## private_get - Get some information from a user private storage __Arguments:__ @@ -3044,8 +2550,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/private_get { "user": "user1", @@ -3056,14 +2561,10 @@ __Examples:__ HTTP/1.1 200 OK {"res": "aaaaa"} -~~~ - - - +``` ## private_set - Set to the user private storage __Arguments:__ @@ -3078,8 +2579,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/private_set { "user": "user1", @@ -3089,33 +2589,29 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## process_rosteritems - List/delete rosteritems that match filter - Explanation of each argument: - - action: what to do with each rosteritem that matches all the filtering options - - subs: subscription type - - asks: pending subscription - - users: the JIDs of the local user - - contacts: the JIDs of the contact in the roster - *** Mnesia: +- action: what to do with each rosteritem that matches all the filtering options +- subs: subscription type +- asks: pending subscription +- users: the JIDs of the local user +- contacts: the JIDs of the contact in the roster + + *** Mnesia: Allowed values in the arguments: ACTION = list | delete - SUBS = SUB[:SUB]* | any + SUBS = SUB[:SUB]*| any SUB = none | from | to | both ASKS = ASK[:ASK]* | any ASK = none | out | in - USERS = JID[:JID]* | any + USERS = JID[:JID]*| any CONTACTS = JID[:JID]* | any JID = characters valid in a JID, and can use the globs: *, ?, ! and [...] @@ -3149,8 +2645,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/process_rosteritems { "action": "aaaaa", @@ -3171,14 +2666,10 @@ __Examples:__ "contact": "ddddd" } ] -~~~ - - - +``` ## push_alltoall - Add all the users to all the users of Host in Group __Arguments:__ @@ -3192,8 +2683,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/push_alltoall { "host": "myserver.com", @@ -3202,17 +2692,12 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## push_roster - Push template roster from file to a user - The text file must contain an erlang term: a list of tuples with username, servername, group and nick. Example: [{<<"user1">>, <<"localhost">>, <<"Workers">>, <<"User 1">>}, {<<"user2">>, <<"localhost">>, <<"Workers">>, <<"User 2">>}]. @@ -3231,8 +2716,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/push_roster { "file": "/home/ejabberd/roster.txt", @@ -3242,17 +2726,12 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## push_roster_all - Push template roster from file to all those users - The text file must contain an erlang term: a list of tuples with username, servername, group and nick. Example: [{"user1", "localhost", "Workers", "User 1"}, {"user2", "localhost", "Workers", "User 2"}]. @@ -3267,8 +2746,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/push_roster_all { "file": "/home/ejabberd/roster.txt" @@ -3276,14 +2754,10 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## register - Register a user __Arguments:__ @@ -3298,8 +2772,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/register { "user": "bob", @@ -3309,14 +2782,10 @@ __Examples:__ HTTP/1.1 200 OK "Success" -~~~ - - - +``` ## registered_users - List all registered users in HOST __Arguments:__ @@ -3329,8 +2798,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/registered_users { "host": "example.com" @@ -3341,27 +2809,21 @@ __Examples:__ "user1", "user2" ] -~~~ - - - +``` ## registered_vhosts - List all registered vhosts in SERVER __Arguments:__ - __Result:__ - *vhosts* :: [vhost::string] : List of available vhosts __Examples:__ - -~~~ json +``` json POST /api/registered_vhosts { @@ -3372,27 +2834,21 @@ __Examples:__ "example.com", "anon.example.com" ] -~~~ - - - +``` ## reload_config - Reload config file in memory __Arguments:__ - __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Examples:__ - -~~~ json +``` json POST /api/reload_config { @@ -3400,14 +2856,10 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## remove_mam_for_user - Remove mam archive for user __Arguments:__ @@ -3421,8 +2873,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/remove_mam_for_user { "user": "bob", @@ -3431,14 +2882,10 @@ __Examples:__ HTTP/1.1 200 OK "MAM archive removed" -~~~ - - - +``` ## remove_mam_for_user_with_peer - Remove mam archive for user with peer __Arguments:__ @@ -3453,8 +2900,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/remove_mam_for_user_with_peer { "user": "bob", @@ -3464,27 +2910,21 @@ __Examples:__ HTTP/1.1 200 OK "MAM archive removed" -~~~ - - - +``` ## reopen_log - Reopen the log files __Arguments:__ - __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Examples:__ - -~~~ json +``` json POST /api/reopen_log { @@ -3492,14 +2932,10 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## resource_num - Resource string of a session number __Arguments:__ @@ -3514,8 +2950,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/resource_num { "user": "peter", @@ -3524,28 +2959,22 @@ __Examples:__ } HTTP/1.1 200 OK - {"resource": "Psi"} -~~~ - - - + {"resource": "Psi"} +``` ## restart - Restart ejabberd gracefully __Arguments:__ - __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Examples:__ - -~~~ json +``` json POST /api/restart { @@ -3553,14 +2982,10 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## restart_module - Stop an ejabberd module, reload code and start __Arguments:__ @@ -3571,14 +2996,13 @@ __Arguments:__ __Result:__ - *res* :: integer : Returns integer code: - - 0: code reloaded, module restarted - - 1: error: module not loaded - - 2: code not reloaded, but module restarted +- 0: code reloaded, module restarted +- 1: error: module not loaded +- 2: code not reloaded, but module restarted __Examples:__ - -~~~ json +``` json POST /api/restart_module { "host": "myserver.com", @@ -3587,14 +3011,10 @@ __Examples:__ HTTP/1.1 200 OK {"res": 0} -~~~ - - - +``` ## restore - Restore the database from backup file __Arguments:__ @@ -3607,8 +3027,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/restore { "file": "/var/lib/ejabberd/database.backup" @@ -3616,17 +3035,12 @@ __Examples:__ HTTP/1.1 200 OK "Success" -~~~ - - - +``` ## rooms_empty_destroy - Destroy the rooms that have no messages in archive - The MUC service argument can be 'global' to get all hosts. __Arguments:__ @@ -3639,8 +3053,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/rooms_empty_destroy { "service": "muc.example.com" @@ -3651,17 +3064,12 @@ __Examples:__ "room1@muc.example.com", "room2@muc.example.com" ] -~~~ - - - +``` ## rooms_empty_list - List the rooms that have no messages in archive - The MUC service argument can be 'global' to get all hosts. __Arguments:__ @@ -3674,8 +3082,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/rooms_empty_list { "service": "muc.example.com" @@ -3686,17 +3093,12 @@ __Examples:__ "room1@muc.example.com", "room2@muc.example.com" ] -~~~ - - - +``` ## rooms_unused_destroy - Destroy the rooms that are unused for many days in the service - The room recent history is used, so it's recommended to wait a few days after service start before running this. The MUC service argument can be 'global' to get all hosts. __Arguments:__ @@ -3710,8 +3112,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/rooms_unused_destroy { "service": "muc.example.com", @@ -3723,17 +3124,12 @@ __Examples:__ "room1@muc.example.com", "room2@muc.example.com" ] -~~~ - - - +``` ## rooms_unused_list - List the rooms that are unused for many days in the service - The room recent history is used, so it's recommended to wait a few days after service start before running this. The MUC service argument can be 'global' to get all hosts. __Arguments:__ @@ -3747,8 +3143,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/rooms_unused_list { "service": "muc.example.com", @@ -3760,27 +3155,21 @@ __Examples:__ "room1@muc.example.com", "room2@muc.example.com" ] -~~~ - - - +``` ## rotate_log - Rotate the log files __Arguments:__ - __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Examples:__ - -~~~ json +``` json POST /api/rotate_log { @@ -3788,18 +3177,13 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## send_direct_invitation - Send a direct invitation to several destinations - -Password and Message can also be: none. Users JIDs are separated with : +Password and Message can also be: none. Users JIDs are separated with : __Arguments:__ @@ -3815,8 +3199,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/send_direct_invitation { "name": "room1", @@ -3828,17 +3211,12 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## send_message - Send a message to a local or remote bare of full JID - When sending a groupchat message to a MUC room, FROM must be the full JID of a room occupant, or the bare JID of a MUC service admin, or the bare JID of a MUC/Sub subscribed user. __Arguments:__ @@ -3855,8 +3233,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/send_message { "type": "headline", @@ -3868,14 +3245,10 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## send_stanza - Send a stanza; provide From JID and valid To JID __Arguments:__ @@ -3890,8 +3263,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/send_stanza { "from": "admin@localhost", @@ -3901,14 +3273,10 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## send_stanza_c2s - Send a stanza as if sent from a c2s session __Arguments:__ @@ -3924,8 +3292,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/send_stanza_c2s { "user": "admin", @@ -3936,17 +3303,12 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## set_last - Set last activity information - Timestamp is the seconds since 1970-01-01 00:00:00 UTC, for example: date +%s __Arguments:__ @@ -3962,8 +3324,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/set_last { "user": "user1", @@ -3974,14 +3335,10 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## set_loglevel - Set the loglevel __Arguments:__ @@ -3994,8 +3351,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/set_loglevel { "loglevel": "debug" @@ -4003,17 +3359,12 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## set_master - Set master node of the clustered Mnesia tables - If you provide as nodename "self", this node will be set as its own master. __Arguments:__ @@ -4026,8 +3377,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/set_master { "nodename": "ejabberd@machine7" @@ -4035,14 +3385,10 @@ __Examples:__ HTTP/1.1 200 OK "Success" -~~~ - - - +``` ## set_nickname - Set nickname in a user's vCard __Arguments:__ @@ -4057,8 +3403,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/set_nickname { "user": "user1", @@ -4068,14 +3413,10 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## set_presence - Set presence of a session __Arguments:__ @@ -4094,8 +3435,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/set_presence { "user": "user1", @@ -4109,14 +3449,10 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## set_room_affiliation - Change an affiliation in a MUC room __Arguments:__ @@ -4132,8 +3468,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/set_room_affiliation { "name": "room1", @@ -4144,26 +3479,21 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## set_vcard - Set content in a vCard field - Some vcard field names in get/set_vcard are: -* FN - Full Name -* NICKNAME - Nickname -* BDAY - Birthday -* TITLE - Work: Position -* ROLE - Work: Role +- FN - Full Name +- NICKNAME - Nickname +- BDAY - Birthday +- TITLE - Work: Position +- ROLE - Work: Role -For a full list of vCard fields check XEP-0054: vcard-temp at https://xmpp.org/extensions/xep-0054.html +For a full list of vCard fields check XEP-0054: vcard-temp at __Arguments:__ @@ -4178,8 +3508,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/set_vcard { "user": "user1", @@ -4190,33 +3519,28 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## set_vcard2 - Set content in a vCard subfield - Some vcard field names and subnames in get/set_vcard2 are: -* N FAMILY - Family name -* N GIVEN - Given name -* N MIDDLE - Middle name -* ADR CTRY - Address: Country -* ADR LOCALITY - Address: City -* TEL HOME - Telephone: Home -* TEL CELL - Telephone: Cellphone -* TEL WORK - Telephone: Work -* TEL VOICE - Telephone: Voice -* EMAIL USERID - E-Mail Address -* ORG ORGNAME - Work: Company -* ORG ORGUNIT - Work: Department +- N FAMILY - Family name +- N GIVEN - Given name +- N MIDDLE - Middle name +- ADR CTRY - Address: Country +- ADR LOCALITY - Address: City +- TEL HOME - Telephone: Home +- TEL CELL - Telephone: Cellphone +- TEL WORK - Telephone: Work +- TEL VOICE - Telephone: Voice +- EMAIL USERID - E-Mail Address +- ORG ORGNAME - Work: Company +- ORG ORGUNIT - Work: Department -For a full list of vCard fields check XEP-0054: vcard-temp at https://xmpp.org/extensions/xep-0054.html +For a full list of vCard fields check XEP-0054: vcard-temp at __Arguments:__ @@ -4232,8 +3556,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/set_vcard2 { "user": "user1", @@ -4245,33 +3568,28 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## set_vcard2_multi - Set multiple contents in a vCard subfield - Some vcard field names and subnames in get/set_vcard2 are: -* N FAMILY - Family name -* N GIVEN - Given name -* N MIDDLE - Middle name -* ADR CTRY - Address: Country -* ADR LOCALITY - Address: City -* TEL HOME - Telephone: Home -* TEL CELL - Telephone: Cellphone -* TEL WORK - Telephone: Work -* TEL VOICE - Telephone: Voice -* EMAIL USERID - E-Mail Address -* ORG ORGNAME - Work: Company -* ORG ORGUNIT - Work: Department +- N FAMILY - Family name +- N GIVEN - Given name +- N MIDDLE - Middle name +- ADR CTRY - Address: Country +- ADR LOCALITY - Address: City +- TEL HOME - Telephone: Home +- TEL CELL - Telephone: Cellphone +- TEL WORK - Telephone: Work +- TEL VOICE - Telephone: Voice +- EMAIL USERID - E-Mail Address +- ORG ORGNAME - Work: Company +- ORG ORGUNIT - Work: Department -For a full list of vCard fields check XEP-0054: vcard-temp at https://xmpp.org/extensions/xep-0054.html +For a full list of vCard fields check XEP-0054: vcard-temp at __Arguments:__ @@ -4287,8 +3605,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/set_vcard2_multi { "user": "aaaaa", @@ -4303,17 +3620,12 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## srg_create - Create a Shared Roster Group - If you want to specify several group identifiers in the Display argument, put \ " around the argument and separate the identifiers with \ \ n @@ -4334,8 +3646,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/srg_create { "group": "group3", @@ -4347,14 +3658,10 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## srg_delete - Delete a Shared Roster Group __Arguments:__ @@ -4368,8 +3675,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/srg_delete { "group": "group3", @@ -4378,14 +3684,10 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## srg_get_info - Get info of a Shared Roster Group __Arguments:__ @@ -4399,8 +3701,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/srg_get_info { "group": "group3", @@ -4418,14 +3719,10 @@ __Examples:__ "value": "group1" } ] -~~~ - - - +``` ## srg_get_members - Get members of a Shared Roster Group __Arguments:__ @@ -4439,8 +3736,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/srg_get_members { "group": "group3", @@ -4452,14 +3748,10 @@ __Examples:__ "user1@localhost", "user2@localhost" ] -~~~ - - - +``` ## srg_list - List the Shared Roster Groups in Host __Arguments:__ @@ -4472,8 +3764,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/srg_list { "host": "myserver.com" @@ -4484,14 +3775,10 @@ __Examples:__ "group1", "group2" ] -~~~ - - - +``` ## srg_user_add - Add the JID user@host to the Shared Roster Group __Arguments:__ @@ -4507,8 +3794,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/srg_user_add { "user": "user1", @@ -4519,14 +3805,10 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## srg_user_del - Delete this JID user@host from the Shared Roster Group __Arguments:__ @@ -4542,8 +3824,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/srg_user_del { "user": "user1", @@ -4554,14 +3835,10 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## stats - Get statistical value: registeredusers onlineusers onlineusersnode uptimeseconds processes __Arguments:__ @@ -4574,8 +3851,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/stats { "name": "registeredusers" @@ -4583,14 +3859,10 @@ __Examples:__ HTTP/1.1 200 OK {"stat": 6} -~~~ - - - +``` ## stats_host - Get statistical value for this host: registeredusers onlineusers __Arguments:__ @@ -4604,8 +3876,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/stats_host { "name": "registeredusers", @@ -4614,27 +3885,21 @@ __Examples:__ HTTP/1.1 200 OK {"stat": 6} -~~~ - - - +``` ## status - Get status of the ejabberd server __Arguments:__ - __Result:__ - *res* :: string : Raw result string __Examples:__ - -~~~ json +``` json POST /api/status { @@ -4642,14 +3907,10 @@ __Examples:__ HTTP/1.1 200 OK "The node ejabberd@localhost is started with status: startedejabberd X.X is running in that node" -~~~ - - - +``` ## status_list - List of logged users with this status __Arguments:__ @@ -4662,8 +3923,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/status_list { "status": "dnd" @@ -4679,14 +3939,10 @@ __Examples:__ "status": "Busy" } ] -~~~ - - - +``` ## status_list_host - List of users logged in host with their statuses __Arguments:__ @@ -4700,8 +3956,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/status_list_host { "host": "myserver.com", @@ -4718,14 +3973,10 @@ __Examples:__ "status": "Busy" } ] -~~~ - - - +``` ## status_num - Number of logged users with this status __Arguments:__ @@ -4738,8 +3989,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/status_num { "status": "dnd" @@ -4747,14 +3997,10 @@ __Examples:__ HTTP/1.1 200 OK {"users": 23} -~~~ - - - +``` ## status_num_host - Number of logged users with this status in host __Arguments:__ @@ -4768,8 +4014,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/status_num_host { "host": "myserver.com", @@ -4778,27 +4023,21 @@ __Examples:__ HTTP/1.1 200 OK {"users": 23} -~~~ - - - +``` ## stop - Stop ejabberd gracefully __Arguments:__ - __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Examples:__ - -~~~ json +``` json POST /api/stop { @@ -4806,18 +4045,13 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## stop_kindly - Inform users and rooms, wait, and stop the server - -Provide the delay in seconds, and the announcement quoted, for example: +Provide the delay in seconds, and the announcement quoted, for example: ejabberdctl stop_kindly 60 \"The server will stop in one minute.\" __Arguments:__ @@ -4831,8 +4065,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/stop_kindly { "delay": 60, @@ -4841,27 +4074,21 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## stop_s2s_connections - Stop all s2s outgoing and incoming connections __Arguments:__ - __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Examples:__ - -~~~ json +``` json POST /api/stop_s2s_connections { @@ -4869,14 +4096,10 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## subscribe_room - Subscribe to a MUC conference __Arguments:__ @@ -4892,8 +4115,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/subscribe_room { "user": "tom@localhost", @@ -4907,17 +4129,12 @@ __Examples:__ "urn:xmpp:mucsub:nodes:messages", "urn:xmpp:mucsub:nodes:affiliations" ] -~~~ - - - +``` ## unban_ip - Remove banned IP addresses from the fail2ban table - Accepts an IP address with a network mask. Returns the number of unbanned addresses, or a negative integer if there were any error. __Arguments:__ @@ -4930,8 +4147,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/unban_ip { "address": "::FFFF:127.0.0.1/128" @@ -4939,14 +4155,10 @@ __Examples:__ HTTP/1.1 200 OK {"unbanned": 3} -~~~ - - - +``` ## unregister - Unregister a user. Calling this API will delete the user and all its data. __Arguments:__ @@ -4960,8 +4172,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/unregister { "user": "bob", @@ -4970,14 +4181,10 @@ __Examples:__ HTTP/1.1 200 OK "Success" -~~~ - - - +``` ## unsubscribe_room - Unsubscribe from a MUC conference __Arguments:__ @@ -4991,8 +4198,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/unsubscribe_room { "user": "tom@localhost", @@ -5001,14 +4207,10 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## update - Update the given module, or use the keyword: all __Arguments:__ @@ -5021,8 +4223,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/update { "module": "mod_vcard" @@ -5030,27 +4231,21 @@ __Examples:__ HTTP/1.1 200 OK "Success" -~~~ - - - +``` ## update_list - List modified modules that can be updated __Arguments:__ - __Result:__ - *modules* :: [module::string] __Examples:__ - -~~~ json +``` json POST /api/update_list { @@ -5061,27 +4256,21 @@ __Examples:__ "mod_configure", "mod_vcard" ] -~~~ - - - +``` ## update_sql - Convert SQL DB to the new format __Arguments:__ - __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Examples:__ - -~~~ json +``` json POST /api/update_sql { @@ -5089,14 +4278,10 @@ __Examples:__ HTTP/1.1 200 OK "" -~~~ - - - +``` ## user_resources - List user's connected resources __Arguments:__ @@ -5110,8 +4295,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/user_resources { "user": "user1", @@ -5124,14 +4308,10 @@ __Examples:__ "Gajim", "mobile-app" ] -~~~ - - - +``` ## user_sessions_info - Get information about all sessions of a user __Arguments:__ @@ -5145,8 +4325,7 @@ __Result:__ __Examples:__ - -~~~ json +``` json POST /api/user_sessions_info { "user": "peter", @@ -5167,6 +4346,4 @@ __Examples:__ "statustext": "" } ] -~~~ - - +``` diff --git a/content/archive/20_04/index.md b/content/archive/20.04/index.md similarity index 60% rename from content/archive/20_04/index.md rename to content/archive/20.04/index.md index 98adc1ff..93f0012f 100644 --- a/content/archive/20_04/index.md +++ b/content/archive/20.04/index.md @@ -1,15 +1,10 @@ ---- -title: Archived Documentation for 20.04 -menu: 20.04 -order: 7995 ---- +# Archived Documentation for 20.04 This section contains some archived sections for ejabberd 20.04. If you are upgrading ejabberd from a previous release, you can check: -* [Specific version upgrade notes](/admin/upgrade/#specific-version-upgrade-notes) +* [Specific version upgrade notes](../../admin/upgrade/index.md#specific_version_upgrade_notes) * [ejabberd 20.04 release announcement](https://www.process-one.net/blog/ejabberd-20-04/) -* [Docs Github Compare from 20.03](https://github.com/processone/docs.ejabberd.im/compare/20.03...20.04) -* [ejabberd Github Compare from 20.03](https://github.com/processone/ejabberd/compare/20.03...20.04) - +* [Docs Github Compare from 20.03](https://github.com/processone/docs.ejabberd.im/compare/20.03..20.04) +* [ejabberd Github Compare from 20.03](https://github.com/processone/ejabberd/compare/20.03..20.04) diff --git a/content/archive/20.04/listen-options.md b/content/archive/20.04/listen-options.md new file mode 100644 index 00000000..d78082c8 --- /dev/null +++ b/content/archive/20.04/listen-options.md @@ -0,0 +1,318 @@ +--- +search: + exclude: true +--- + +# Listen Options + +This is a detailed description of each option allowed by the listening +modules: + +## access + +*AccessName* + +This option defines access to the port. The default value is `all`. + +## backlog + +*Value* + +The backlog value defines the maximum length that the queue of + pending connections may grow to. This should be increased if the + server is going to handle lots of new incoming connections as they + may be dropped if there is no space in the queue (and ejabberd was + not able to accept them immediately). Default value is 5. + +## cafile + +*Path* + +Path to a file of CA root certificates. +The default is to use system defined file if possible. + +## certfile + +*Path* + +Path to the certificate file. +Only makes sense when the [`tls`](#tls) +options is set. +If this option is not set, you should set the +[`certfiles`](toplevel.md#certfiles) top-level option +or configure [ACME](../../admin/configuration/basic.md#acme). + +## check_from + +*true | false* + +This option can be used with +[`ejabberd_service`](listen.md#ejabberd_service) only. + [`XEP-0114`](https://xmpp.org/extensions/xep-0114.html) requires that + the domain must match the hostname of the component. If this option + is set to `false`, `ejabberd` will allow the component to send + stanzas with any arbitrary domain in the ’from’ attribute. Only use + this option if you are completely sure about it. The default value + is `true`, to be compliant with + [`XEP-0114`](https://xmpp.org/extensions/xep-0114.html). + +## ciphers + +*Ciphers* + +OpenSSL ciphers list in the same format accepted by + ‘`openssl ciphers`’ command. + +## custom_headers + +*{Name: Value}* + +Specify additional HTTP headers to be included in all HTTP responses. +Default value is: `[]` + +## default_host + +*undefined | HostName* + +If the HTTP request received by ejabberd contains the HTTP header + `Host` with an ambiguous virtual host that doesn’t match any one + defined in ejabberd (see + [Host Names](../../admin/configuration/basic.md#host_names)), + then this configured HostName + is set as the request Host. The default value of this option is: + `undefined`. + +## dhfile + +*Path* + +Full path to a file containing custom parameters for Diffie-Hellman key + exchange. Such a file could be created with the command + `openssl dhparam -out dh.pem 2048`. If this option is not specified, + default parameters will be used, which might not provide the same level + of security as using custom parameters. + +## global_routes + +*true | false* + +This option emulates legacy behaviour which registers all routes +defined in [`hosts`](toplevel.md#hosts) +on a component connected. This behaviour +is considered harmful in the case when it's desired to multiplex +different components on the same port, so, to disable it, +set `global_routes` to `false`. + +The default value is `true`, +e.g. legacy behaviour is emulated: the only reason for this is +to maintain backward compatibility with existing deployments. + +## hosts + +*{Hostname: [HostOption, ...]}* + +The external Jabber component that connects to this +[`ejabberd_service`](listen.md#ejabberd_service) +can serve one or more hostnames. As `HostOption` + you can define options for the component; currently the only allowed + option is the password required to the component when attempt to + connect to ejabberd: `password: Secret`. Note that you + cannot define in a single `ejabberd_service` components of different + services: add an `ejabberd_service` for each service, as seen in an + example below. This option may not be necessary if the component + already provides the host in its packets; in that case, you can simply + provide the password option that will be used for all the hosts + (see port 5236 definition in the example below). + +## max_fsm_queue + +*Size* + +This option specifies the maximum number of elements in the queue of + the FSM (Finite State Machine). Roughly speaking, each message in + such queues represents one XML stanza queued to be sent into its + relevant outgoing stream. If queue size reaches the limit (because, + for example, the receiver of stanzas is too slow), the FSM and the + corresponding connection (if any) will be terminated and error + message will be logged. The reasonable value for this option depends + on your hardware configuration. This option can be specified for + [`ejabberd_service`](listen.md#ejabberd_service) + and [`ejabberd_c2s`](listen.md#ejabberd_c2s) + listeners, or also globally for + [`ejabberd_s2s_out`](listen.md#ejabberd_s2s-out). + If the option is not specified for + `ejabberd_service` or `ejabberd_c2s` listeners, the globally + configured value is used. The allowed values are integers and + ’undefined’. Default value: ’10000’. + +## max_payload_size + +*Size* + +Specify the maximum payload size in bytes. +It can be either an integer or the word `infinity`. +The default value is `infinity`. + +## max_stanza_size + +*Size* + +This option specifies an approximate maximum size in bytes of XML + stanzas. Approximate, because it is calculated with the precision of + one block of read data. For example `{max_stanza_size, 65536}`. The + default value is `infinity`. Recommended values are 65536 for c2s + connections and 131072 for s2s connections. s2s max stanza size must + always much higher than c2s limit. Change this value with extreme + care as it can cause unwanted disconnect if set too low. + +## password + +*Secret* + +Specify the password to verify an external component that connects to the port. + +## protocol_options + +*ProtocolOpts* + +List of general options relating to SSL/TLS. These map to + [`OpenSSL’s set_options()`](https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_options.html). + The default entry is: `"no_sslv3|cipher_server_preference|no_compression"` + +## request_handlers + +*{Path: Module}* + +To define one or several handlers that will serve HTTP requests in +[`ejabberd_http`](listen.md#ejabberd_http). The + Path is a string; so the URIs that start with that Path will be + served by Module. For example, if you want `mod_foo` to serve the + URIs that start with `/a/b/`, and you also want `mod_bosh` to + serve the URIs `/bosh/`, use this option: + + request_handlers: + /a/b: mod_foo + /bosh: mod_bosh + /mqtt: mod_mqtt + +## shaper + +*none | ShaperName* + +This option defines a shaper for the port (see section +[Shapers](../../admin/configuration/basic.md#shapers)). + The default value is `none`. + +## shaper_rule + +*none | ShaperRule* + +This option defines a shaper rule for +[`ejabberd_service`](listen.md#ejabberd_service) (see +section [Shapers](../../admin/configuration/basic.md#shapers)). +The recommended value is `fast`. + +## starttls + +*true | false* + +This option specifies that STARTTLS encryption is available on +connections to the port. You should also set the +[`certfiles`](toplevel.md#certfiles) top-level option +or configure [ACME](../../admin/configuration/basic.md#acme). + +## starttls_required + +*true | false* + +This option specifies that STARTTLS encryption is required on +connections to the port. No unencrypted connections will be allowed. +You should also set the +[`certfiles`](toplevel.md#certfiles) top-level option +or configure [ACME](../../admin/configuration/basic.md#acme). + +## tag + +*String* + +Allow specifying a tag in a `listen` section +and later use it to have a special +[`api_permissions`](toplevel.md#api_permissions) +just for it. + +For example: + + listen: + - + port: 4000 + module: ejabberd_http + tag: "magic_listener" + + api_permissions: + "magic_access": + from: + - tag: "magic_listener" + who: all + what: "*" + +The default value is the empty string: `""`. + +## timeout + +*Integer* + +Timeout of the connections, expressed in milliseconds. Default: 5000 + +## tls + +*true | false* + +This option specifies that traffic on the port will be encrypted + using SSL immediately after connecting. This was the traditional + encryption method in the early Jabber software, commonly on port + 5223 for client-to-server communications. But this method is + nowadays deprecated and not recommended. The preferable encryption + method is STARTTLS on port 5222, as defined + [`RFC 6120: XMPP Core`](https://xmpp.org/rfcs/rfc6120.html#tls), + which can be enabled in `ejabberd` with the option + [`starttls`](#starttls). + +If this option is set, you should also set the + [`certfiles`](toplevel.md#certfiles) top-level + option or configure [ACME](../../admin/configuration/basic.md#acme). + +The option `tls` can also be used in + [`ejabberd_http`](listen.md#ejabberd_http) + to support HTTPS. + +## tls_compression + +*true | false* + +Whether to enable or disable TLS compression. The default value is + `false`. + +## tls_verify + +*false | true* + +This option specifies whether to verify the certificate or not when TLS is enabled. + +The default value is `false`, which means no checks are performed. + +## use_proxy_protocol + +*true | false* + +Is this listener accessed by proxy service that is using + proxy protocol for supplying real IP addresses to ejabberd server. You can read about this protocol + in [Proxy protocol specification](https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt). + The default value of this option is`false`. + +## zlib + +*true | false* + +This option specifies that Zlib stream compression (as defined in + [`XEP-0138`](https://xmpp.org/extensions/xep-0138.html)) is available + on connections to the port. diff --git a/content/archive/20.04/listen.md b/content/archive/20.04/listen.md new file mode 100644 index 00000000..64a32d3e --- /dev/null +++ b/content/archive/20.04/listen.md @@ -0,0 +1,790 @@ +--- +search: + exclude: true +--- + +# Listen Modules + +## Listen Option + +The **listen option** defines for which ports, addresses and network +protocols `ejabberd` will listen and what services will be run on them. +Each element of the list is an associative array with the following +elements: + +- Port number. Optionally also the IP address and/or a transport + protocol. + +- Listening module that serves this port. + +- Options for the TCP socket and for the listening module. + +For example: + +``` yaml + listen: + - + port: 5222 + module: ejabberd_c2s + ip: 127.0.0.1 + starttls: true + - + port: 5269 + module: ejabberd_s2s_in + transport: tcp +``` + +The **port number** defines which port to listen for incoming connections. +It can be a Jabber/XMPP standard port or any other valid port number. + +The **IP address** can be represented as a string. The socket will listen +only in that network interface. It is possible to specify a generic +address ("0.0.0.0" for IPv4 or "::" for IPv6), so `ejabberd` will listen +in all addresses. Depending on the type of the IP address, IPv4 or IPv6 +will be used. When the IP address is not specified, it will listen on +all IPv4 network addresses. + +Note that on some operating systems and/or OS configurations, listening +on "::" will mean listening for IPv4 traffic as well as IPv6 traffic. + +Some example values for IP address: + +- `"0.0.0.0"` to listen in all IPv4 network interfaces. This is the + default value when no IP is specified. + +- `"::"` to listen in all IPv6 network interfaces + +- `"10.11.12.13"` is the IPv4 address `10.11.12.13` + +- `"::FFFF:127.0.0.1"` is the IPv6 address `::FFFF:127.0.0.1/128` + +The **transport protocol** can be `tcp` or `udp`. Default is `tcp`. + +## Summary of Listen Modules + +The available modules, their purpose and the options allowed by each one +are: + +### ejabberd_c2s + +Handles c2s connections. + +Options: +[access](listen-options.md#access), +[cafile](listen-options.md#cafile), +[ciphers](listen-options.md#ciphers), +[dhfile](listen-options.md#dhfile), +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_stanza_size](listen-options.md#max_stanza_size), +[protocol_options](listen-options.md#protocol_options), +[shaper](listen-options.md#shaper), +[starttls](listen-options.md#starttls), +[starttls_required](listen-options.md#starttls_required), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls-compression), +[tls_verify](listen-options.md#tls_verify), +[zlib](listen-options.md#zlib). + +### ejabberd_s2s_in + +Handles incoming s2s connections. + +Options: +[cafile](listen-options.md#cafile), +[ciphers](listen-options.md#ciphers), +[dhfile](listen-options.md#dhfile), +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_stanza_size](listen-options.md#max_stanza_size), +[protocol_options](listen-options.md#protocol_options), +[shaper](listen-options.md#shaper), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls-compression). + +### ejabberd_service + +Interacts with an + [`external component`](https://ejabberd.im/tutorials-transports) + (as defined in the Jabber Component Protocol + ([`XEP-0114`](https://xmpp.org/extensions/xep-0114.html)). + +Options: +[access](listen-options.md#access), +[cafile](listen-options.md#cafile), +[certfile](listen-options.md#certfile), +[check_from](listen-options.md#check_from), +[ciphers](listen-options.md#ciphers), +[dhfile](listen-options.md#dhfile), +[global_routes](listen-options.md#global_routes), +[hosts](listen-options.md#hosts), +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_stanza_size](listen-options.md#max_stanza_size), +[password](listen-options.md#password), +[protocol_options](listen-options.md#protocol_options), +[shaper](listen-options.md#shaper), +[shaper_rule](listen-options.md#shaper-rule), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls-compression). + +### ejabberd_sip + +Handles SIP requests as defined in + [`RFC 3261`](https://tools.ietf.org/html/rfc3261). + +For details please check the +[ejabberd_sip](listen.md#ejabberd_sip_1) +and [mod_sip](modules.md#mod_sip) sections. + +General listener options: +[certfile](listen-options.md#certfile), +[tls](listen-options.md#tls). + +### ejabberd_stun + +Handles STUN/TURN requests as defined in + [`RFC 5389`](https://tools.ietf.org/html/rfc5389) and + [`RFC 5766`](https://tools.ietf.org/html/rfc5766). + +For the specific module options, please check the +[ejabberd_stun](listen.md#ejabberd_stun_1) section: +`auth_realm`, +`auth_type`, +`server_name`, +`turn_ip`, +`turn_max_allocations`, +`turn_max_permissions`, +`turn_max_port`, +`turn_min_port`, +`use_turn`. + +General listener options: +[certfile](listen-options.md#certfile), +[shaper](listen-options.md#shaper), +[tls](listen-options.md#tls), + +### ejabberd_http + +Handles incoming HTTP connections. + +With the proper request handlers configured, this serves HTTP services like +[ACME](../../admin/configuration/basic.md#acme), +[API](modules.md#mod_http_api), +[BOSH](modules.md#mod_bosh), +[CAPTCHA](../../admin/configuration/basic.md#captcha), +[Fileserver](modules.md#mod_http_fileserver), +[OAuth](../../developer/ejabberd-api/oauth.md), +[Upload](modules.md#mod_http_upload), +[WebAdmin](../../admin/guide/managing.md#web_admin), +[WebSocket](listen.md#ejabberd_http_ws), +[XMP-RPC](listen.md#ejabberd_xmlrpc). + +Options: +[cafile](listen-options.md#cafile), +[ciphers](listen-options.md#ciphers), +[custom_headers](listen-options.md#custom_headers), +[default_host](listen-options.md#default_host), +[dhfile](listen-options.md#dhfile), +[protocol_options](listen-options.md#protocol_options), +[request_handlers](listen-options.md#request_handlers), +[tag](listen-options.md#tag), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls-compression), +and the [trusted_proxies](toplevel.md#trusted_proxies) top-level option. + +### mod_mqtt + +Support for MQTT requires configuring `mod_mqtt` both in the +[listen](toplevel.md#listen) and the +[modules](toplevel.md#modules) sections. +Check the [mod_mqtt modules options](modules.md#mod_mqtt). +Check the advanded documentation in [MQTT Support](../../admin/guide/mqtt/index.md). + +Listen options: +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_payload_size](listen-options.md#max_payload_size), +[tls](listen-options.md#tls), +[tls_verify](listen-options.md#tls_verify). + +## ejabberd_stun + +`ejabberd` is able to act as a stand-alone STUN/TURN server +([`RFC 5389`](https://tools.ietf.org/html/rfc5389)/[`RFC 5766`](https://tools.ietf.org/html/rfc5766). +In that role `ejabberd` helps clients with ICE +([`RFC 5245`](https://tools.ietf.org/html/rfc5245) or Jingle ICE +([`XEP-0176`](https://xmpp.org/extensions/xep-0176.html) support to +discover their external addresses and ports and to relay media traffic +when it is impossible to establish direct peer-to-peer connection. + +The specific configurable options are: + +**`tls: true|false`**: If enabled, `certfile` option must be set, otherwise `ejabberd` will + not be able to accept TLS connections. Obviously, this option makes + sense for `tcp` transport only. The default is `false`. + +**`certfile: Path`**: Path to the certificate file. Only makes sense when `tls` is set. + +**`use_turn: true|false`**: Enables/disables TURN (media relay) functionality. The default is + `false`. + +**`turn_ip: String`**: The IPv4 address advertised by your TURN server. The address should + not be NAT’ed or firewalled. There is not default, so you should set + this option explicitly. Implies `use_turn`. + +**`turn_min_port: Integer`**: Together with `turn_max_port` forms port range to allocate from. The + default is 49152. Implies `use_turn`. + +**`turn_max_port: Integer`**: Together with `turn_min_port` forms port range to allocate from. The + default is 65535. Implies `use_turn`. + +**`turn_max_allocations: Integer|infinity`**: Maximum number of TURN allocations available from the particular IP + address. The default value is 10. Implies `use_turn`. + +**`turn_max_permissions: Integer|infinity`**: Maximum number of TURN permissions available from the particular IP + address. The default value is 10. Implies `use_turn`. + +**`auth_type: user|anonymous`**: Which authentication type to use for TURN allocation requests. When + type `user` is set, ejabberd authentication backend is used. For + `anonymous` type no authentication is performed (not recommended for + public services). The default is `user`. Implies `use_turn`. + +**`auth_realm: String`**: When `auth_type` is set to `user` and you have several virtual hosts + configured you should set this option explicitly to the virtual host + you want to serve on this particular listening port. Implies + `use_turn`. + +**`shaper: Atom`**: For `tcp` transports defines shaper to use. The default is `none`. + +**`server_name: String`**: Defines software version to return with every response. The default + is the STUN library version. + +Example configuration with disabled TURN functionality (STUN only): + +``` yaml + listen: + ... + - + port: 3478 + transport: udp + module: ejabberd_stun + - + port: 3478 + module: ejabberd_stun + - + port: 5349 + module: ejabberd_stun + certfile: /etc/ejabberd/server.pem + ... +``` + +Example configuration with TURN functionality. Note that STUN is always +enabled if TURN is enabled. Here, only UDP section is shown: + +``` yaml + listen: + ... + - + port: 3478 + transport: udp + use_turn: true + turn_ip: 10.20.30.1 + module: ejabberd_stun + ... +``` + +You also need to configure DNS SRV records properly so clients can +easily discover a STUN/TURN server serving your XMPP domain. Refer to +section +[`DNS Discovery of a Server`](https://tools.ietf.org/html/rfc5389#section-9) +of [`RFC 5389`](https://tools.ietf.org/html/rfc5389) and section +[`Creating an Allocation`](https://tools.ietf.org/html/rfc5766#section-6) +of [`RFC 5766`](https://tools.ietf.org/html/rfc5766) for details. + +Example DNS SRV configuration for STUN only: + +``` sh + _stun._udp IN SRV 0 0 3478 stun.example.com. + _stun._tcp IN SRV 0 0 3478 stun.example.com. + _stuns._tcp IN SRV 0 0 5349 stun.example.com. +``` + +And you should also add these in the case if TURN is enabled: + +``` sh + _turn._udp IN SRV 0 0 3478 turn.example.com. + _turn._tcp IN SRV 0 0 3478 turn.example.com. + _turns._tcp IN SRV 0 0 5349 turn.example.com. +``` + +## ejabberd_sip + +### SIP Configuration + +`ejabberd` has built-in SIP support. To activate this feature, +add the [`ejabberd_sip`](#ejabberd_sip) listen module, enable +[`mod_sip`](modules.md#mod_sip) module +for the desired virtual host, and configure DNS properly. + +To add a listener you should configure `ejabberd_sip` listening module +as described in [Listen](#listen-option) section. +If option [`tls`](listen-options.md#tls) is specified, +option [`certfile`](listen-options.md#certfile) +must be specified as well, otherwise incoming TLS connections +would fail. + +Example configuration with standard ports (as per +[`RFC 3261`](https://tools.ietf.org/html/rfc3261)): + +``` yaml + listen: + ... + - + port: 5060 + transport: udp + module: ejabberd_sip + - + port: 5060 + module: ejabberd_sip + - + port: 5061 + module: ejabberd_sip + tls: true + certfile: /etc/ejabberd/server.pem + ... +``` + +Note that there is no StartTLS support in SIP and +[`SNI`](https://en.wikipedia.org/wiki/Server_Name_Indication) support is +somewhat tricky, so for TLS you have to configure different virtual +hosts on different ports if you have different certificate files for +them. + +Next you need to configure DNS SIP records for your virtual domains. +Refer to [`RFC 3263`](https://tools.ietf.org/html/rfc3263) for the +detailed explanation. Simply put, you should add NAPTR and SRV records +for your domains. Skip NAPTR configuration if your DNS provider doesn't +support this type of records. It’s not fatal, however, highly +recommended. + +Example configuration of NAPTR records: + + example.com IN NAPTR 10 0 "s" "SIPS+D2T" "" _sips._tcp.example.com. + example.com IN NAPTR 20 0 "s" "SIP+D2T" "" _sip._tcp.example.com. + example.com IN NAPTR 30 0 "s" "SIP+D2U" "" _sip._udp.example.com. + +Example configuration of SRV records with standard ports (as per +[`RFC 3261`](https://tools.ietf.org/html/rfc3261): + + _sip._udp IN SRV 0 0 5060 sip.example.com. + _sip._tcp IN SRV 0 0 5060 sip.example.com. + _sips._tcp IN SRV 0 0 5061 sip.example.com. + +### Note on SIP usage + +SIP authentication does not support SCRAM. As such, it is not possible +to use `mod_sip` to authenticate when ejabberd has been set to encrypt +password with SCRAM. + +## ejabberd_http_ws + +This module enables XMPP communication over Websocket connection as +described in [`RFC 7395`](https://tools.ietf.org/html/rfc7395). + +### Enabling Websocket support + +To enable this module it must have handler added to `request_handlers` +section of `ejabberd_http` listener: + +``` yaml + listen: + ... + - + port: 5280 + module: ejabberd_http + request_handlers: + ... + /xmpp: ejabberd_http_ws + ... + ... +``` + +This module can be configured by using those options that should be +placed in general section of config file: [websocket\_origin](toplevel.md#websocket_origin), [websocket\_ping\_interval](toplevel.md#websocket_ping_interval), [websocket\_timeout](toplevel.md#websocket_timeout). + +### Discovery + +You also need to configure DNS SRV records properly so clients can +easily discover Websocket service for your XMPP domain. Refer to +[XEP-0156](https://xmpp.org/extensions/xep-0156.html). + +Example DNS TXT configuration for Websocket: + +``` sh +_xmppconnect IN TXT "[ _xmpp-client-websocket=wss://web.example.com:443/ws ]" +``` + +### Testing Websocket + +A test client can be found on Github: [Websocket test client](https://github.com/processone/xmpp-websocket-client) + + + +## ejabberd_xmlrpc + +Handles XML-RPC requests to execute +[ejabberd commands](../../admin/guide/managing.md#ejabberd_commands). +It is configured as a request handler in +[ejabberd_http](listen.md#ejabberd_http). + +By default there is no restriction to who can execute what commands, +so it is strongly recommended that you configure restrictions using +[API Permissions](https://docs.ejabberd.im/developer/ejabberd-api/permissions/). + +This is the minimum configuration required to enable the feature: + +``` yaml + listen: + - + port: 4560 + module: ejabberd_http + request_handlers: + /: ejabberd_xmlrpc +``` + +Example Python script: + +``` py + import xmlrpclib + server = xmlrpclib.Server('http://127.0.0.1:4560/'); + params = {} + params["host"] = "localhost" + print server.registered_users(params) +``` + +This example configuration adds some restrictions: + +``` yaml + listen: + - + port: 5281 + ip: "::" + module: ejabberd_http + request_handlers: + /api: mod_http_api + /xmlrpc: ejabberd_xmlrpc + + api_permissions: + "some XMLRPC commands": + from: ejabberd_xmlrpc + who: + - ip: 127.0.0.1 + - user: user1@localhost + what: + - registered_users + - connected_users_number +``` + +With that configuration, it is possible to execute two specific commands using +`ejabberd_xmlrpc`, with two access restrictions. Example Python script: + +``` py + import xmlrpclib + server = xmlrpclib.Server('http://127.0.0.1:5281/xmlrpc') + LOGIN = {'user':'user1', + 'server':'localhost', + 'password':'mypass11', + 'admin':True} + def calling(command, data): + fn = getattr(server, command) + return fn(LOGIN, data) + print calling('registered_users', {'host':'localhost'}) +``` + +It's possible to use OAuth for authentication instead of plain password, see +[OAuth Support](../../developer/ejabberd-api/oauth.md). + +In ejabberd 20.03 and older, it was possible to configure `ejabberd_xmlrpc` as a +listener, see the old document for reference and example configuration: +[Listening Module](../old.md#listening_module). + +Just for reference, there's also the old +[`ejabberd_xmlrpc documentation`](https://ejabberd.im/ejabberd_xmlrpc). + +## Examples + +For example, the following simple configuration defines: + +- There are three domains. The default certificate file is + `server.pem`. However, the c2s and s2s connections to the domain + `example.com` use the file `example_com.pem`. + +- Port 5222 listens for c2s connections with STARTTLS, and also allows + plain connections for old clients. + +- Port 5223 listens for c2s connections with the old SSL. + +- Port 5269 listens for s2s connections with STARTTLS. The socket is + set for IPv6 instead of IPv4. + +- Port 3478 listens for STUN requests over UDP. + +- Port 5280 listens for HTTP requests, and serves the HTTP-Bind (BOSH) + service. + +- Port 5281 listens for HTTP requests, using HTTPS to serve HTTP-Bind + (BOSH) and the Web Admin as explained in [Managing: Web Admin](../../admin/guide/managing.md#web_admin). The + socket only listens connections to the IP address 127.0.0.1. + +``` yaml + hosts: + - example.com + - example.org + - example.net + + certfiles: + - /etc/ejabberd/server.pem + - /etc/ejabberd/example_com.pem + + listen: + - + port: 5222 + module: ejabberd_c2s + access: c2s + shaper: c2s_shaper + starttls: true + max_stanza_size: 65536 + - + port: 5223 + module: ejabberd_c2s + access: c2s + shaper: c2s_shaper + tls: true + max_stanza_size: 65536 + - + port: 5269 + ip: "::" + module: ejabberd_s2s_in + shaper: s2s_shaper + max_stanza_size: 131072 + - + port: 3478 + transport: udp + module: ejabberd_stun + - + port: 5280 + module: ejabberd_http + request_handlers: + /bosh: mod_bosh + - + port: 5281 + ip: 127.0.0.1 + module: ejabberd_http + tls: true + request_handlers: + /admin: ejabberd_web_admin + /bosh: mod_bosh + + s2s_use_starttls: optional + outgoing_s2s_families: + - ipv4 + - ipv6 + outgoing_s2s_timeout: 10000 + trusted_proxies: [127.0.0.1, 192.168.1.11] +``` + +In this example, the following configuration defines that: + +- c2s connections are listened for on port 5222 (all IPv4 addresses) + and on port 5223 (SSL, IP 192.168.0.1 and fdca:8ab6:a243:75ef::1) + and denied for the user called ‘`bad`’. + +- s2s connections are listened for on port 5269 (all IPv4 addresses) + with STARTTLS for secured traffic strictly required, and the + certificates are verified. Incoming and outgoing connections of + remote XMPP servers are denied, only two servers can connect: + “jabber.example.org” and “example.com”. + +- Port 5280 is serving the Web Admin and the HTTP-Bind (BOSH) service in + all the IPv4 addresses. Note that it is also possible to serve them + on different ports. The second example in section [Managing: Web Admin](../../admin/guide/managing.md#web_admin) shows + how exactly this can be done. A request handler to serve MQTT over Websocket is also defined. + +- All users except for the administrators have a traffic of limit + 1,000Bytes/second + +- The [`AIM transport`](https://ejabberd.im/pyaimt) + `aim.example.org` is connected to port 5233 on localhost IP + addresses (127.0.0.1 and ::1) with password ‘`aimsecret`’. + +- The ICQ transport JIT (`icq.example.org` and `sms.example.org`) is + connected to port 5234 with password ‘`jitsecret`’. + +- The [`MSN transport`](https://ejabberd.im/pymsnt) + `msn.example.org` is connected to port 5235 with password + ‘`msnsecret`’. + +- The [`Yahoo! transport`](https://ejabberd.im/yahoo-transport-2) + `yahoo.example.org` is connected to port 5236 with password + ‘`yahoosecret`’. + +- The + [`Gadu-Gadu transport`](https://ejabberd.im/jabber-gg-transport) + `gg.example.org` is connected to port 5237 with password + ‘`ggsecret`’. + +- The [`Jabber Mail Component`](https://ejabberd.im/jmc) + `jmc.example.org` is connected to port 5238 with password + ‘`jmcsecret`’. + +- The service custom has enabled the special option to avoiding + checking the `from` attribute in the packets send by this component. + The component can send packets in behalf of any users from the + server, or even on behalf of any server. + +``` yaml + acl: + blocked: + user: bad + trusted_servers: + server: + - example.com + - jabber.example.org + xmlrpc_bot: + user: + - xmlrpc-robot@example.org + shaper: + normal: 1000 + shaper_rules: + c2s_shaper: + - none: admin + - normal + access_rules: + c2s: + - deny: blocked + - allow + xmlrpc_access: + - allow: xmlrpc_bot + s2s: + - allow: trusted_servers + certfiles: + - /path/to/ssl.pem + s2s_access: s2s + s2s_use_starttls: required_trusted + listen: + - + port: 5222 + module: ejabberd_c2s + shaper: c2s_shaper + access: c2s + - + ip: 192.168.0.1 + port: 5223 + module: ejabberd_c2s + tls: true + access: c2s + - + ip: "FDCA:8AB6:A243:75EF::1" + port: 5223 + module: ejabberd_c2s + tls: true + access: c2s + - + port: 5269 + module: ejabberd_s2s_in + - + port: 5280 + module: ejabberd_http + request_handlers: + /admin: ejabberd_web_admin + /bosh: mod_bosh + /mqtt: mod_mqtt + - + port: 4560 + module: ejabberd_xmlrpc + access_commands: {} + - + ip: 127.0.0.1 + port: 5233 + module: ejabberd_service + hosts: + aim.example.org: + password: aimsecret + - + ip: "::1" + port: 5233 + module: ejabberd_service + hosts: + aim.example.org: + password: aimsecret + - + port: 5234 + module: ejabberd_service + hosts: + icq.example.org: + password: jitsecret + sms.example.org: + password: jitsecret + - + port: 5235 + module: ejabberd_service + hosts: + msn.example.org: + password: msnsecret + - + port: 5236 + module: ejabberd_service + password: yahoosecret + - + port: 5237 + module: ejabberd_service + hosts: + gg.example.org: + password: ggsecret + - + port: 5238 + module: ejabberd_service + hosts: + jmc.example.org: + password: jmcsecret + - + port: 5239 + module: ejabberd_service + check_from: false + hosts: + custom.example.org: + password: customsecret +``` + +Note, that for services based in jabberd14 or WPJabber you have to make +the transports log and do XDB by themselves: + + + +``` xml + + + + %d: [%t] (%h): %s + /var/log/jabber/service.log + + ``` + + + +``` xml + + + + + /usr/lib/jabber/xdb_file.so + + + /var/spool/jabber + + +``` diff --git a/content/archive/20_04/modules.md b/content/archive/20.04/modules.md similarity index 86% rename from content/archive/20_04/modules.md rename to content/archive/20.04/modules.md index 01a61b68..68778fea 100644 --- a/content/archive/20_04/modules.md +++ b/content/archive/20.04/modules.md @@ -1,10 +1,9 @@ --- -title: Modules Options -toc: true -menu: Modules Options -order: 95 +search: + exclude: true --- +# Modules Options mod\_adhoc ---------- @@ -15,7 +14,7 @@ module and is only needed by some of the other modules. __Available options:__ -- **report\_commands\_node**: *true | false* +- __report\_commands\_node__: *true | false* Provide the Commands item in the Service Discovery. Default value: *false*. @@ -26,20 +25,20 @@ This module provides additional administrative commands. Details for some commands: -- *ban-acount*: This command kicks all the connected sessions of the +- *ban-acount*: This command kicks all the connected sessions of the account from the server. It also changes their password to a randomly generated one, so they can’t login anymore unless a server administrator changes their password again. It is possible to define the reason of the ban. The new password also includes the reason and the date and time of the ban. See an example below. -- *pushroster*: (and *pushroster-all*) The roster file must be placed, +- *pushroster*: (and *pushroster-all*) The roster file must be placed, if using Windows, on the directory where you installed ejabberd: C:/Program Files/ejabberd or similar. If you use other Operating System, place the file on the same directory where the .beam files are installed. See below an example roster file. -- *srg-create*: If you want to put a group Name with blankspaces, use +- *srg-create*: If you want to put a group Name with blankspaces, use the characters "' and '" to define when the Name starts and ends. See an example below. @@ -107,54 +106,54 @@ JID in each entry will apply only to the specified virtual host example.org, while the JID between brackets will apply to all virtual hosts in ejabberd: -- example.org/announce/all (example.org/announce/all-hosts/all):: The +- example.org/announce/all (example.org/announce/all-hosts/all):: The message is sent to all registered users. If the user is online and connected to several resources, only the resource with the highest priority will receive the message. If the registered user is not connected, the message will be stored offline in assumption that offline storage (see *mod\_offline*) is enabled. -- example.org/announce/online +- example.org/announce/online (example.org/announce/all-hosts/online):: The message is sent to all connected users. If the user is online and connected to several resources, all resources will receive the message. -- example.org/announce/motd (example.org/announce/all-hosts/motd):: +- example.org/announce/motd (example.org/announce/all-hosts/motd):: The message is set as the message of the day (MOTD) and is sent to users when they login. In addition the message is sent to all connected users (similar to announce/online). -- example.org/announce/motd/update +- example.org/announce/motd/update (example.org/announce/all-hosts/motd/update):: The message is set as message of the day (MOTD) and is sent to users when they login. The message is not sent to any currently connected user. -- example.org/announce/motd/delete +- example.org/announce/motd/delete (example.org/announce/all-hosts/motd/delete):: Any message sent to this JID removes the existing message of the day (MOTD). __Available options:__ -- **access**: *AccessName* +- __access__: *AccessName* This option specifies who is allowed to send announcements and to set the message of the day. The default value is *none* (i.e. nobody is able to send such messages). -- **cache\_life\_time**: *timeout()* +- __cache\_life\_time__: *timeout()* Same as top-level *cache\_life\_time* option, but applied to this module only. -- **cache\_missed**: *true | false* +- __cache\_missed__: *true | false* Same as top-level *cache\_missed* option, but applied to this module only. -- **cache\_size**: *pos\_integer() | infinity* +- __cache\_size__: *pos\_integer() | infinity* Same as top-level *cache\_size* option, but applied to this module only. -- **db\_type**: *mnesia | sql* +- __db\_type__: *mnesia | sql* Same as top-level *default\_db* option, but applied to this module only. -- **use\_cache**: *true | false* +- __use\_cache__: *true | false* Same as top-level *use\_cache* option, but applied to this module only. mod\_avatar @@ -173,19 +172,19 @@ The module depends on *mod\_vcard*, *mod\_vcard\_xupdate* and __Available options:__ -- **convert**: *{From: To}* +- __convert__: *{From: To}* Defines image conversion rules: the format in *From* will be converted to format in *To*. The value of *From* can also be *default*, which is match-all rule. NOTE: the list of supported formats is detected at compile time depending on the image libraries installed in the system. - **Example**: + __Example__: convert: webp: jpg default: png -- **rate\_limit**: *Number* +- __rate\_limit__: *Number* Limit any given JID by the number of avatars it is able to convert per minute. This is to protect the server from image conversion DoS. The default value is *10*. @@ -200,7 +199,7 @@ that entity. Enable this module if you want to drop SPAM messages. __Available options:__ -- **access**: *AccessName* +- __access__: *AccessName* The option is supposed to be used when *allow\_local\_users* and *allow\_transports* are not enough. It’s an ACL where *deny* means the message will be rejected (or a CAPTCHA would be generated for a @@ -208,26 +207,26 @@ presence, if configured), and *allow* means the sender is whitelisted and the stanza will pass through. The default value is *none*, which means nothing is whitelisted. -- **allow\_local\_users**: *true | false* +- __allow\_local\_users__: *true | false* This option specifies if strangers from the same local host should be accepted or not. The default value is *true*. -- **allow\_transports**: *true | false* +- __allow\_transports__: *true | false* If set to *true* and some server’s JID is in user’s roster, then messages from any user of this server are accepted even if no subscription present. The default value is *true*. -- **captcha**: *true | false* +- __captcha__: *true | false* Whether to generate CAPTCHA or not in response to messages from strangers. See also section [CAPTCHA](https://docs.ejabberd.im/admin/configuration/#captcha) of the Configuration Guide. The default value is *false*. -- **drop**: *true | false* +- __drop__: *true | false* This option specifies if strangers messages should be dropped or not. The default value is *true*. -- **log**: *true | false* +- __log__: *true | false* This option specifies if strangers' messages should be logged (as info message) in ejabberd.log. The default value is *false*. @@ -256,44 +255,44 @@ while having to get through an HTTP proxy. __Available options:__ -- **cache\_life\_time**: *timeout()* +- __cache\_life\_time__: *timeout()* Same as top-level *cache\_life\_time* option, but applied to this module only. -- **cache\_missed**: *true | false* +- __cache\_missed__: *true | false* Same as top-level *cache\_missed* option, but applied to this module only. -- **cache\_size**: *pos\_integer() | infinity* +- __cache\_size__: *pos\_integer() | infinity* Same as top-level *cache\_size* option, but applied to this module only. -- **json**: *true | false* +- __json__: *true | false* This option has no effect. -- **max\_concat**: *pos\_integer() | infinity* +- __max\_concat__: *pos\_integer() | infinity* This option limits the number of stanzas that the server will send in a single bosh request. The default value is *unlimited*. -- **max\_inactivity**: *timeout()* +- __max\_inactivity__: *timeout()* The option defines the maximum inactivity period. The default value is *30* seconds. -- **max\_pause**: *pos\_integer()* +- __max\_pause__: *pos\_integer()* Indicate the maximum length of a temporary session pause (in seconds) that a client can request. The default value is *120*. -- **prebind**: *true | false* +- __prebind__: *true | false* If enabled, the client can create the session without going through authentication. Basically, it creates a new session with anonymous authentication. The default value is *false*. -- **queue\_type**: *ram | file* +- __queue\_type__: *ram | file* Same as top-level *queue\_type* option, but applied to this module only. -- **ram\_db\_type**: *mnesia | sql | redis* +- __ram\_db\_type__: *mnesia | sql | redis* Same as *default\_ram\_db* but applied to this module only. -- **use\_cache**: *true | false* +- __use\_cache__: *true | false* Same as top-level *use\_cache* option, but applied to this module only. __**Example**:__ @@ -321,21 +320,21 @@ purpose of the module is to provide PEP functionality (see __Available options:__ -- **cache\_life\_time**: *timeout()* +- __cache\_life\_time__: *timeout()* Same as top-level *cache\_life\_time* option, but applied to this module only. -- **cache\_missed**: *true | false* +- __cache\_missed__: *true | false* Same as top-level *cache\_missed* option, but applied to this module only. -- **cache\_size**: *pos\_integer() | infinity* +- __cache\_size__: *pos\_integer() | infinity* Same as top-level *cache\_size* option, but applied to this module only. -- **db\_type**: *mnesia | sql* +- __db\_type__: *mnesia | sql* Same as top-level *default\_db* option, but applied to this module only. -- **use\_cache**: *true | false* +- __use\_cache__: *true | false* Same as top-level *use\_cache* option, but applied to this module only. mod\_carboncopy @@ -364,17 +363,17 @@ stanzas), or if the client becomes active again. __Available options:__ -- **queue\_chat\_states**: *true | false* +- __queue\_chat\_states__: *true | false* Queue "standalone" chat state notifications (as defined in [XEP-0085: Chat State Notifications](https://xmpp.org/extensions/xep-0085.html)) while a client indicates inactivity. The default value is *true*. -- **queue\_pep**: *true | false* +- __queue\_pep__: *true | false* Queue PEP notifications while a client is inactive. When the queue is flushed, only the most recent notification of a given PEP node is delivered. The default value is *true*. -- **queue\_presence**: *true | false* +- __queue\_presence__: *true | false* While a client is inactive, queue presence stanzas that indicate (un)availability. The default value is *true*. @@ -409,15 +408,15 @@ external PEP service. __Available options:__ -- **namespaces**: *{Namespace: Options}* +- __namespaces__: *{Namespace: Options}* If you want to delegate namespaces to a component, specify them in this option, and associate them to an access rule. The *Options* are: - - **access**: *AccessName* +- __access__: *AccessName* The option defines which components are allowed for namespace delegation. The default value is *none*. - - **filtering**: *Attributes* +- __filtering__: *Attributes* The list of attributes. Currently not used. @@ -456,35 +455,35 @@ enabled, services on your server can be discovered by XMPP clients. __Available options:__ -- **extra\_domains**: *\[Domain, ...\]* +- __extra\_domains__: *\[Domain, ...\]* With this option, you can specify a list of extra domains that are added to the Service Discovery item list. The default value is an empty list. -- **name**: *Name* +- __name__: *Name* A name of the server in the Service Discovery. This will only be displayed by special XMPP clients. The default value is *ejabberd*. -- **server\_info**: *\[Info, ...\]* +- __server\_info__: *\[Info, ...\]* Specify additional information about the server, as described in [XEP-0157: Contact Addresses for XMPP Services](https://xmpp.org/extensions/xep-0157.html). Every *Info* element in the list is constructed from the following options: - - **modules**: *all | \[Module, ...\]* +- __modules__: *all | \[Module, ...\]* The value can be the keyword *all*, in which case the information is reported in all the services, or a list of ejabberd modules, in which case the information is only specified for the services provided by those modules. - - **name**: *Name* +- __name__: *Name* Any arbitrary name of the contact. - - **urls**: *\[URI, ...\]* +- __urls__: *\[URI, ...\]* A list of contact URIs, such as HTTP URLs, XMPP URIs and so on. - **Example**: + __Example__: server_info: - @@ -532,17 +531,17 @@ traffic, but provides the client with a descriptive error message. __Available options:__ -- **access**: *AccessName* +- __access__: *AccessName* Specify an access rule for whitelisting IP addresses or networks. If the rule returns *allow* for a given IP address, that address will never be banned. The *AccessName* should be of type *ip*. The default value is *none*. -- **c2s\_auth\_ban\_lifetime**: *timeout()* +- __c2s\_auth\_ban\_lifetime__: *timeout()* The lifetime of the IP ban caused by too many C2S authentication failures. The default value is *1* hour. -- **c2s\_max\_auth\_failures**: *Number* +- __c2s\_max\_auth\_failures__: *Number* The number of C2S authentication failures to trigger the IP ban. The default value is *20*. @@ -559,7 +558,7 @@ To use a specific API version N, when defining the URL path in the request\_handlers, add a *vN*. For example: */api/v2: mod\_http\_api* To run a command, send a POST request to the corresponding URL: -*http://localhost:5280/api/<command\_name>* +*"http://localhost:5280/api/command\_name"* The module has no options. @@ -570,16 +569,16 @@ This simple module serves files from the local disk over HTTP. __Available options:__ -- **accesslog**: *Path* +- __accesslog__: *Path* File to log accesses using an Apache-like format. No log will be recorded if this option is not specified. -- **content\_types**: *{Extension: Type}* +- __content\_types__: *{Extension: Type}* Specify mappings of extension to content type. There are several content types already defined. With this option you can add new definitions or modify existing ones. The default values are: - **Example**: + __Example__: content_types: .css: text/css @@ -596,24 +595,24 @@ modify existing ones. The default values are: .xpi: application/x-xpinstall .xul: application/vnd.mozilla.xul+xml -- **custom\_headers**: *{Name: Value}* +- __custom\_headers__: *{Name: Value}* Indicate custom HTTP headers to be included in all responses. There are no custom headers by default. -- **default\_content\_type**: *Type* +- __default\_content\_type__: *Type* Specify the content type to use for unknown extensions. The default value is *application/octet-stream*. -- **directory\_indices**: *\[Index, ...\]* +- __directory\_indices__: *\[Index, ...\]* Indicate one or more directory index files, similarly to Apache’s *DirectoryIndex* variable. When an HTTP request hits a directory instead of a regular file, those directory indices are looked in order, and the first one found is returned. The default value is an empty list. -- **docroot**: *Path* +- __docroot__: *Path* Directory to serve the files from. This is a mandatory option. -- **must\_authenticate\_with**: *\[{Username, Hostname}, ...\]* +- __must\_authenticate\_with__: *\[{Username, Hostname}, ...\]* List of accounts that are allowed to use this service. Default value: *\[\]*. @@ -666,42 +665,42 @@ In order to use this module, it must be configured as a __Available options:__ -- **access**: *AccessName* +- __access__: *AccessName* This option defines the access rule to limit who is permitted to use the HTTP upload service. The default value is *local*. If no access rule of that name exists, no user will be allowed to use the service. -- **custom\_headers**: *{Name: Value}* +- __custom\_headers__: *{Name: Value}* This option specifies additional header fields to be included in all HTTP responses. By default no custom headers are included. -- **dir\_mode**: *Permission* +- __dir\_mode__: *Permission* This option defines the permission bits of the *docroot* directory and any directories created during file uploads. The bits are specified as an octal number (see the chmod(1) manual page) within double quotes. For example: "0755". The default is undefined, which means no explicit permissions will be set. -- **docroot**: *Path* +- __docroot__: *Path* Uploaded files are stored below the directory specified (as an absolute path) with this option. The keyword @HOME@ is replaced with the home directory of the user running ejabberd, and the keyword @HOST@ with the virtual host name. The default value is "@HOME@/upload". -- **external\_secret**: *Text* +- __external\_secret__: *Text* This option makes it possible to offload all HTTP Upload processing to a separate HTTP server. Both ejabberd and the HTTP server should share this secret and behave exactly as described at [Prosody’s mod\_http\_upload\_external](https://modules.prosody.im/mod_http_upload_external.html) in the *Implementation* section. There is no default value. -- **file\_mode**: *Permission* +- __file\_mode__: *Permission* This option defines the permission bits of uploaded files. The bits are specified as an octal number (see the chmod(1) manual page) within double quotes. For example: "0644". The default is undefined, which means no explicit permissions will be set. -- **get\_url**: *URL* +- __get\_url__: *URL* This option specifies the initial part of the GET URLs used for downloading the files. The default value is *undefined*. When this option is *undefined*, this option is set to the same value as @@ -711,57 +710,57 @@ must match the *put\_url*. Setting it to a different value only makes sense if an external web server or *mod\_http\_fileserver* is used to serve the uploaded files. -- **host** +- __host__ Deprecated. Use *hosts* instead. -- **hosts**: *\[Host, ...\]* +- __hosts__: *\[Host, ...\]* This option defines the Jabber IDs of the service. If the *hosts* option is not specified, the only Jabber ID will be the hostname of the virtual host with the prefix "upload.". The keyword *@HOST@* is replaced with the real virtual host name. -- **jid\_in\_url**: *node | sha1* +- __jid\_in\_url__: *node | sha1* When this option is set to *node*, the node identifier of the user’s JID (i.e., the user name) is included in the GET and PUT URLs generated by *mod\_http\_upload*. Otherwise, a SHA-1 hash of the user’s bare JID is included instead. The default value is *sha1*. -- **max\_size**: *Size* +- __max\_size__: *Size* This option limits the acceptable file size. Either a number of bytes (larger than zero) or *infinity* must be specified. The default value is *104857600*. -- **name**: *Name* +- __name__: *Name* A name of the service in the Service Discovery. This will only be displayed by special XMPP clients. The default value is "HTTP File Upload". -- **put\_url**: *URL* +- __put\_url__: *URL* This option specifies the initial part of the PUT URLs used for file uploads. The keyword @HOST@ is replaced with the virtual host name. NOTE: different virtual hosts cannot use the same PUT URL. The default value is "https://@HOST@:5443/upload". -- **rm\_on\_unregister**: *true | false* +- __rm\_on\_unregister__: *true | false* This option specifies whether files uploaded by a user should be removed when that user is unregistered. The default value is *true*. -- **secret\_length**: *Length* +- __secret\_length__: *Length* This option defines the length of the random string included in the GET and PUT URLs generated by *mod\_http\_upload*. The minimum length is 8 characters, but it is recommended to choose a larger value. The default value is *40*. -- **service\_url** +- __service\_url__ Deprecated. -- **thumbnail**: *true | false* +- __thumbnail__: *true | false* This option specifies whether ejabberd should create thumbnails of uploaded images. If a thumbnail is created, a <thumbnail/> element that contains the download <uri/> and some metadata is returned with the PUT response. The default value is *false*. -- **vcard**: *vCard* +- __vcard__: *vCard* A custom vCard of the service that will be displayed by some XMPP clients in Service Discovery. The value of *vCard* is a YAML map constructed from an XML representation of vCard. Since the @@ -816,7 +815,7 @@ This module depends on *mod\_http\_upload*. __Available options:__ -- **access\_hard\_quota**: *AccessName* +- __access\_hard\_quota__: *AccessName* This option defines which access rule is used to specify the "hard quota" for the matching JIDs. That rule must yield a positive number for any JID that is supposed to have a quota limit. This is the number of @@ -825,14 +824,14 @@ exceeded, ejabberd deletes the oldest files uploaded by that user until their disk usage equals or falls below the specified soft quota (see *access\_soft\_quota*). The default value is *hard\_upload\_quota*. -- **access\_soft\_quota**: *AccessName* +- __access\_soft\_quota__: *AccessName* This option defines which access rule is used to specify the "soft quota" for the matching JIDs. That rule must yield a positive number of megabytes for any JID that is supposed to have a quota limit. See the description of the *access\_hard\_quota* option for details. The default value is *soft\_upload\_quota*. -- **max\_days**: *Days* +- __max\_days__: *Days* If a number larger than zero is specified, any files (and directories) older than this number of days are removed from the subdirectories of the *docroot* directory, once per day. The default value is *infinity*. @@ -869,7 +868,7 @@ clients in certain constrained environments, or for testing purposes. __Available options:__ -- **access**: *AccessName* +- __access__: *AccessName* This option defines which access rule will be used to control who is allowed to use this service. The default value is *local*. @@ -884,21 +883,21 @@ of the ejabberd server. __Available options:__ -- **cache\_life\_time**: *timeout()* +- __cache\_life\_time__: *timeout()* Same as top-level *cache\_life\_time* option, but applied to this module only. -- **cache\_missed**: *true | false* +- __cache\_missed__: *true | false* Same as top-level *cache\_missed* option, but applied to this module only. -- **cache\_size**: *pos\_integer() | infinity* +- __cache\_size__: *pos\_integer() | infinity* Same as top-level *cache\_size* option, but applied to this module only. -- **db\_type**: *mnesia | sql* +- __db\_type__: *mnesia | sql* Same as top-level *default\_db* option, but applied to this module only. -- **use\_cache**: *true | false* +- __use\_cache__: *true | false* Same as top-level *use\_cache* option, but applied to this module only. mod\_legacy\_auth @@ -923,11 +922,11 @@ clients can use it to store their chat history on the server. __Available options:__ -- **access\_preferences**: *AccessName* +- __access\_preferences__: *AccessName* This access rule defines who is allowed to modify the MAM preferences. The default value is *all*. -- **assume\_mam\_usage**: *true | false* +- __assume\_mam\_usage__: *true | false* This option determines how ejabberd’s stream management code (see *mod\_stream\_mgmt*) handles unacknowledged messages when the connection is lost. Usually, such messages are either bounced or resent. However, @@ -936,46 +935,46 @@ if this option is set to *true*. In this case, ejabberd assumes those messages will be retrieved from the archive. The default value is *false*. -- **cache\_life\_time**: *timeout()* +- __cache\_life\_time__: *timeout()* Same as top-level *cache\_life\_time* option, but applied to this module only. -- **cache\_missed**: *true | false* +- __cache\_missed__: *true | false* Same as top-level *cache\_missed* option, but applied to this module only. -- **cache\_size**: *pos\_integer() | infinity* +- __cache\_size__: *pos\_integer() | infinity* Same as top-level *cache\_size* option, but applied to this module only. -- **clear\_archive\_on\_room\_destroy**: *true | false* +- __clear\_archive\_on\_room\_destroy__: *true | false* Whether to destroy message archive of a room (see *mod\_muc*) when it gets destroyed. The default value is *true*. -- **compress\_xml**: *true | false* +- __compress\_xml__: *true | false* When enabled, new messages added to archives are compressed using a custom compression algorithm. This feature works only with SQL backends. The default value is *false*. -- **db\_type**: *mnesia | sql* +- __db\_type__: *mnesia | sql* Same as top-level *default\_db* option, but applied to this module only. -- **default**: *always | never | roster* +- __default__: *always | never | roster* The option defines default policy for chat history. When *always* is set every chat message is stored. With *roster* only chat history with contacts from user’s roster is stored. And *never* fully disables chat history. Note that a client can change its policy via protocol commands. The default value is *never*. -- **request\_activates\_archiving**: *true | false* +- __request\_activates\_archiving__: *true | false* If the value is *true*, no messages are stored for a user until their client issue a MAM request, regardless of the value of the *default* option. Once the server received a request, that user’s messages are archived as usual. The default value is *false*. -- **use\_cache**: *true | false* +- __use\_cache__: *true | false* Same as top-level *use\_cache* option, but applied to this module only. -- **user\_mucsub\_from\_muc\_archive**: *true | false* +- __user\_mucsub\_from\_muc\_archive__: *true | false* When this option is disabled, for each individual subscriber a separa mucsub message is stored. With this option enabled, when a user fetches archive virtual mucsub, messages are generated from muc archives. The @@ -988,34 +987,34 @@ This module sends events to external backend (by now only [grapherl](https://github.com/processone/grapherl) is supported). Supported events are: -- sm\_register\_connection +- sm\_register\_connection -- sm\_remove\_connection +- sm\_remove\_connection -- user\_send\_packet +- user\_send\_packet -- user\_receive\_packet +- user\_receive\_packet -- s2s\_send\_packet +- s2s\_send\_packet -- s2s\_receive\_packet +- s2s\_receive\_packet -- register\_user +- register\_user -- remove\_user +- remove\_user -- offline\_message +- offline\_message When enabled, every call to these hooks triggers a counter event to be sent to the external backend. __Available options:__ -- **ip**: *IPv4Address* +- __ip__: *IPv4Address* IPv4 address where the backend is located. The default value is *127.0.0.1*. -- **port**: *Port* +- __port__: *Port* An internet port number at which the backend is listening for incoming connections/packets. The default value is *11111*. @@ -1037,23 +1036,23 @@ The module depends on *mod\_mam*. __Available options:__ -- **access\_create**: *AccessName* +- __access\_create__: *AccessName* An access rule to control MIX channels creations. The default value is *all*. -- **db\_type**: *mnesia | sql* +- __db\_type__: *mnesia | sql* Same as top-level *default\_db* option, but applied to this module only. -- **host** +- __host__ Deprecated. Use *hosts* instead. -- **hosts**: *\[Host, ...\]* +- __hosts__: *\[Host, ...\]* This option defines the Jabber IDs of the service. If the *hosts* option is not specified, the only Jabber ID will be the hostname of the virtual host with the prefix "mix.". The keyword *@HOST@* is replaced with the real virtual host name. -- **name**: *Name* +- __name__: *Name* A name of the service in the Service Discovery. This will only be displayed by special XMPP clients. The default value is *Channels*. @@ -1074,21 +1073,21 @@ channels (either on your server or on any remote servers). __Available options:__ -- **cache\_life\_time**: *timeout()* +- __cache\_life\_time__: *timeout()* Same as top-level *cache\_life\_time* option, but applied to this module only. -- **cache\_missed**: *true | false* +- __cache\_missed__: *true | false* Same as top-level *cache\_missed* option, but applied to this module only. -- **cache\_size**: *pos\_integer() | infinity* +- __cache\_size__: *pos\_integer() | infinity* Same as top-level *cache\_size* option, but applied to this module only. -- **db\_type**: *mnesia | sql* +- __db\_type__: *mnesia | sql* Same as top-level *default\_db* option, but applied to this module only. -- **use\_cache**: *true | false* +- __use\_cache__: *true | false* Same as top-level *use\_cache* option, but applied to this module only. mod\_mqtt @@ -1100,56 +1099,56 @@ sections. __Available options:__ -- **access\_publish**: *{TopicFilter: AccessName}* +- __access\_publish__: *{TopicFilter: AccessName}* Access rules to restrict access to topics for publishers. By default there are no restrictions. -- **access\_subscribe**: *{TopicFilter: AccessName}* +- __access\_subscribe__: *{TopicFilter: AccessName}* Access rules to restrict access to topics for subscribers. By default there are no restrictions. -- **cache\_life\_time**: *timeout()* +- __cache\_life\_time__: *timeout()* Same as top-level *cache\_life\_time* option, but applied to this module only. -- **cache\_missed**: *true | false* +- __cache\_missed__: *true | false* Same as top-level *cache\_missed* option, but applied to this module only. -- **cache\_size**: *pos\_integer() | infinity* +- __cache\_size__: *pos\_integer() | infinity* Same as top-level *cache\_size* option, but applied to this module only. -- **db\_type**: *mnesia | sql* +- __db\_type__: *mnesia | sql* Same as top-level *default\_db* option, but applied to this module only. -- **match\_retained\_limit**: *pos\_integer() | infinity* +- __match\_retained\_limit__: *pos\_integer() | infinity* The option limits the number of retained messages returned to a client when it subscribes to some topic filter. The default value is *1000*. -- **max\_queue**: *Size* +- __max\_queue__: *Size* Maximum queue size for outgoing packets. The default value is *5000*. -- **max\_topic\_aliases**: *0..65535* +- __max\_topic\_aliases__: *0..65535* The maximum number of aliases a client is able to associate with the topics. The default value is *100*. -- **max\_topic\_depth**: *Depth* +- __max\_topic\_depth__: *Depth* The maximum topic depth, i.e. the number of slashes (*/*) in the topic. The default value is *8*. -- **queue\_type**: *ram | file* +- __queue\_type__: *ram | file* Same as top-level *queue\_type* option, but applied to this module only. -- **ram\_db\_type**: *mnesia* +- __ram\_db\_type__: *mnesia* Same as top-level *default\_ram\_db* option, but applied to this module only. -- **session\_expiry**: *timeout()* +- __session\_expiry__: *timeout()* The option specifies how long to wait for an MQTT session resumption. When *0* is set, the session gets destroyed when the underlying client connection is closed. The default value is *5* minutes. -- **use\_cache**: *true | false* +- __use\_cache__: *true | false* Same as top-level *use\_cache* option, but applied to this module only. mod\_muc @@ -1174,11 +1173,11 @@ will be recreated on an available node on first connection attempt. __Available options:__ -- **access**: *AccessName* +- __access__: *AccessName* You can specify who is allowed to use the Multi-User Chat service. By default everyone is allowed to use it. -- **access\_admin**: *AccessName* +- __access\_admin__: *AccessName* This option specifies who is allowed to administrate the Multi-User Chat service. The default value is *none*, which means that only the room creator can administer their room. The administrators can send a normal @@ -1187,80 +1186,80 @@ a service message. The administrators can send a groupchat message to the JID of an active room, and the message will be shown in the room as a service message. -- **access\_create**: *AccessName* +- __access\_create__: *AccessName* To configure who is allowed to create new rooms at the Multi-User Chat service, this option can be used. The default value is *all*, which means everyone is allowed to create rooms. -- **access\_mam**: *AccessName* +- __access\_mam__: *AccessName* To configure who is allowed to modify the *mam* room option. The default value is *all*, which means everyone is allowed to modify that option. -- **access\_persistent**: *AccessName* +- __access\_persistent__: *AccessName* To configure who is allowed to modify the *persistent* room option. The default value is *all*, which means everyone is allowed to modify that option. -- **access\_register**: *AccessName* +- __access\_register__: *AccessName* This option specifies who is allowed to register nickname within the Multi-User Chat service. The default is *all* for backward compatibility, which means that any user is allowed to register any free nick. -- **db\_type**: *mnesia | sql* +- __db\_type__: *mnesia | sql* Define the type of persistent storage where the module will store room information. The default is the storage defined by the global option *default\_db*, or *mnesia* if omitted. -- **default\_room\_options**: *Options* +- __default\_room\_options__: *Options* This option allows to define the desired default room options. Note that the creator of a room can modify the options of his room at any time using an XMPP client with MUC capability. The *Options* are: - - **allow\_change\_subj**: *true | false* +- __allow\_change\_subj__: *true | false* Allow occupants to change the subject. The default value is *true*. - - **allow\_private\_messages**: *true | false* +- __allow\_private\_messages__: *true | false* Occupants can send private messages to other occupants. The default value is *true*. - - **allow\_private\_messages\_from\_visitors**: *anyone | moderators | +- __allow\_private\_messages\_from\_visitors__: *anyone | moderators | nobody* Visitors can send private messages to other occupants. The default value is *anyone* which means visitors can send private messages to any occupant. - - **allow\_query\_users**: *true | false* +- __allow\_query\_users__: *true | false* Occupants can send IQ queries to other occupants. The default value is *true*. - - **allow\_subscription**: *true | false* +- __allow\_subscription__: *true | false* Allow users to subscribe to room events as described in [Multi-User Chat Subscriptions](https://docs.ejabberd.im/developer/xmpp-clients-bots/extensions/muc-sub/). The default value is *false*. - - **allow\_user\_invites**: *true | false* +- __allow\_user\_invites__: *true | false* Allow occupants to send invitations. The default value is *false*. - - **allow\_visitor\_nickchange**: *true | false* +- __allow\_visitor\_nickchange__: *true | false* Allow visitors to change nickname. The default value is *true*. - - **allow\_visitor\_status**: *true | false* +- __allow\_visitor\_status__: *true | false* Allow visitors to send status text in presence updates. If disallowed, the status text is stripped before broadcasting the presence update to all the room occupants. The default value is *true*. - - **anonymous**: *true | false* +- __anonymous__: *true | false* The room is anonymous: occupants don’t see the real JIDs of other occupants. Note that the room moderators can always see the real JIDs of the occupants. The default value is *true*. - - **captcha\_protected**: *true | false* +- __captcha\_protected__: *true | false* When a user tries to join a room where they have no affiliation (not owner, admin or member), the room requires them to fill a CAPTCHA challenge (see section @@ -1268,49 +1267,49 @@ using an XMPP client with MUC capability. The *Options* are: order to accept their join in the room. The default value is *false*. - - **lang**: *Language* +- __lang__: *Language* Preferred language for the discussions in the room. The language format should conform to RFC 5646. There is no value by default. - - **logging**: *true | false* +- __logging__: *true | false* The public messages are logged using *mod\_muc\_log*. The default value is *false*. - - **mam**: *true | false* +- __mam__: *true | false* Enable message archiving. Implies mod\_mam is enabled. The default value is *false*. - - **max\_users**: *Number* +- __max\_users__: *Number* Maximum number of occupants in the room. The default value is *200*. - - **members\_by\_default**: *true | false* +- __members\_by\_default__: *true | false* The occupants that enter the room are participants by default, so they have "voice". The default value is *true*. - - **members\_only**: *true | false* +- __members\_only__: *true | false* Only members of the room can enter. The default value is *false*. - - **moderated**: *true | false* +- __moderated__: *true | false* Only occupants with "voice" can send public messages. The default value is *true*. - - **password**: *Password* +- __password__: *Password* Password of the room. Implies option *password\_protected* set to *true*. There is no default value. - - **password\_protected**: *true | false* +- __password\_protected__: *true | false* The password is required to enter the room. The default value is *false*. - - **persistent**: *true | false* +- __persistent__: *true | false* The room persists even if the last participant leaves. The default value is *false*. - - **presence\_broadcast**: *\[moderator | participant | visitor, +- __presence\_broadcast__: *\[moderator | participant | visitor, ...\]* List of roles for which presence is broadcasted. The list can contain one or several of: *moderator*, *participant*, *visitor*. The default value is shown in the example below: @@ -1322,25 +1321,25 @@ using an XMPP client with MUC capability. The *Options* are: - participant - visitor - - **public**: *true | false* +- __public__: *true | false* The room is public in the list of the MUC service, so it can be discovered. MUC admins and room participants will see private rooms in Service Discovery if their XMPP client supports this feature. The default value is *true*. - - **public\_list**: *true | false* +- __public\_list__: *true | false* The list of participants is public, without requiring to enter the room. The default value is *true*. - - **title**: *Room Title* +- __title__: *Room Title* A human-readable title of the room. There is no default value -- **hibernation\_timeout**: *infinity | Seconds* +- __hibernation\_timeout__: *infinity | Seconds* Timeout before hibernating the room process, expressed in seconds. The default value is *infinity*. -- **history\_size**: *Size* +- __history\_size__: *Size* A small history of the current discussion is sent to users when they enter the room. With this option you can define the number of history messages to keep and send to users joining the room. The value is a @@ -1351,56 +1350,56 @@ clients rely on Message Archives (XEP-0313), so feel free to disable the history feature if you’re only using modern clients and have *mod\_mam* module loaded. -- **host** +- __host__ Deprecated. Use *hosts* instead. -- **hosts**: *\[Host, ...\]* +- __hosts__: *\[Host, ...\]* This option defines the Jabber IDs of the service. If the *hosts* option is not specified, the only Jabber ID will be the hostname of the virtual host with the prefix "conference.". The keyword *@HOST@* is replaced with the real virtual host name. -- **max\_room\_desc**: *Number* +- __max\_room\_desc__: *Number* This option defines the maximum number of characters that Room Description can have when configuring the room. The default value is *infinity*. -- **max\_room\_id**: *Number* +- __max\_room\_id__: *Number* This option defines the maximum number of characters that Room ID can have when creating a new room. The default value is *infinity*. -- **max\_room\_name**: *Number* +- __max\_room\_name__: *Number* This option defines the maximum number of characters that Room Name can have when configuring the room. The default value is *infinity*. -- **max\_rooms\_discoitems**: *Number* +- __max\_rooms\_discoitems__: *Number* When there are more rooms than this *Number*, only the non-empty ones are returned in a Service Discovery query. The default value is *100*. -- **max\_user\_conferences**: *Number* +- __max\_user\_conferences__: *Number* This option defines the maximum number of rooms that any given user can join. The default value is *100*. This option is used to prevent possible abuses. Note that this is a soft limit: some users can sometimes join more conferences in cluster configurations. -- **max\_users**: *Number* +- __max\_users__: *Number* This option defines at the service level, the maximum number of users allowed per room. It can be lowered in each room configuration but cannot be increased in individual room configuration. The default value is *200*. -- **max\_users\_admin\_threshold**: *Number* +- __max\_users\_admin\_threshold__: *Number* This option defines the number of service admins or room owners allowed to enter the room when the maximum number of allowed occupants was reached. The default limit is *5*. -- **max\_users\_presence**: *Number* +- __max\_users\_presence__: *Number* This option defines after how many users in the room, it is considered overcrowded. When a MUC room is considered overcrowed, presence broadcasts are limited to reduce load, traffic and excessive presence "storm" received by participants. The default value is *1000*. -- **min\_message\_interval**: *Number* +- __min\_message\_interval__: *Number* This option defines the minimum interval between two messages send by an occupant in seconds. This option is global and valid for all rooms. A decimal value can be used. When this option is not defined, message rate @@ -1411,7 +1410,7 @@ second. If an occupant tries to send messages faster, an error is send back explaining that the message has been discarded and describing the reason why the message is not acceptable. -- **min\_presence\_interval**: *Number* +- __min\_presence\_interval__: *Number* This option defines the minimum of time between presence changes coming from a given occupant in seconds. This option is global and valid for all rooms. A decimal value can be used. When this option is not defined, @@ -1423,44 +1422,44 @@ in the room after expiration of the interval delay. Intermediate presence packets are silently discarded. A good value for this option is 4 seconds. -- **name**: *string()* +- __name__: *string()* The value of the service name. This name is only visible in some clients that support [XEP-0030: Service Discovery](https://xmpp.org/extensions/xep-0030.html). The default is *Chatrooms*. -- **preload\_rooms**: *true | false* +- __preload\_rooms__: *true | false* Whether to load all persistent rooms in memory on startup. If disabled, the room is only loaded on first participant join. The default is *true*. It makes sense to disable room preloading when the number of rooms is high: this will improve server startup time and memory consumption. -- **queue\_type**: *ram | file* +- __queue\_type__: *ram | file* Same as top-level *queue\_type* option, but applied to this module only. -- **ram\_db\_type**: *mnesia* +- __ram\_db\_type__: *mnesia* Define the type of volatile (in-memory) storage where the module will store room information. The only available value for this module is *mnesia*. -- **regexp\_room\_id**: *string()* +- __regexp\_room\_id__: *string()* This option defines the regular expression that a Room ID must satisfy to allow the room creation. The default value is the empty string. -- **room\_shaper**: *none | ShaperName* +- __room\_shaper__: *none | ShaperName* This option defines shaper for the MUC rooms. The default value is *none*. -- **user\_message\_shaper**: *none | ShaperName* +- __user\_message\_shaper__: *none | ShaperName* This option defines shaper for the users messages. The default value is *none*. -- **user\_presence\_shaper**: *none | ShaperName* +- __user\_presence\_shaper__: *none | ShaperName* This option defines shaper for the users presences. The default value is *none*. -- **vcard**: *vCard* +- __vcard__: *vCard* A custom vCard of the service that will be displayed by some XMPP clients in Service Discovery. The value of *vCard* is a YAML map constructed from an XML representation of vCard. Since the @@ -1507,100 +1506,100 @@ set the option to enable room logging. Features: -- Room details are added on top of each page: room title, JID, author, +- Room details are added on top of each page: room title, JID, author, subject and configuration. -- The room JID in the generated HTML is a link to join the room (using +- The room JID in the generated HTML is a link to join the room (using XMPP URI). -- Subject and room configuration changes are tracked and displayed. +- Subject and room configuration changes are tracked and displayed. -- Joins, leaves, nick changes, kicks, bans and */me* are tracked and +- Joins, leaves, nick changes, kicks, bans and */me* are tracked and displayed, including the reason if available. -- Generated HTML files are XHTML 1.0 Transitional and CSS compliant. +- Generated HTML files are XHTML 1.0 Transitional and CSS compliant. -- Timestamps are self-referencing links. +- Timestamps are self-referencing links. -- Links on top for quicker navigation: Previous day, Next day, Up. +- Links on top for quicker navigation: Previous day, Next day, Up. -- CSS is used for style definition, and a custom CSS file can be used. +- CSS is used for style definition, and a custom CSS file can be used. -- URLs on messages and subjects are converted to hyperlinks. +- URLs on messages and subjects are converted to hyperlinks. -- Timezone used on timestamps is shown on the log files. +- Timezone used on timestamps is shown on the log files. -- A custom link can be added on top of each page. +- A custom link can be added on top of each page. The module depends on *mod\_muc*. __Available options:__ -- **access\_log**: *AccessName* +- __access\_log__: *AccessName* This option restricts which occupants are allowed to enable or disable room logging. The default value is *muc\_admin*. NOTE: for this default setting you need to have an access rule for *muc\_admin* in order to take effect. -- **cssfile**: *Path | URL* +- __cssfile__: *Path | URL* With this option you can set whether the HTML files should have a custom CSS file or if they need to use the embedded CSS. Allowed values are either *Path* to local file or an *URL* to a remote file. By default a predefined CSS will be embedded into the HTML page. -- **dirname**: *room\_jid | room\_name* +- __dirname__: *room\_jid | room\_name* Allows to configure the name of the room directory. If set to *room\_jid*, the room directory name will be the full room JID. Otherwise, the room directory name will be only the room name, not including the MUC service name. The default value is *room\_jid*. -- **dirtype**: *subdirs | plain* +- __dirtype__: *subdirs | plain* The type of the created directories can be specified with this option. If set to *subdirs*, subdirectories are created for each year and month. Otherwise, the names of the log files contain the full date, and there are no subdirectories. The default value is *subdirs*. -- **file\_format**: *html | plaintext* +- __file\_format__: *html | plaintext* Define the format of the log files: *html* stores in HTML format, *plaintext* stores in plain text. The default value is *html*. -- **file\_permissions**: *{mode: Mode, group: Group}* +- __file\_permissions__: *{mode: Mode, group: Group}* Define the permissions that must be used when creating the log files: the number of the mode, and the numeric id of the group that will own the files. The default value is shown in the example below: - **Example**: + __Example__: file_permissions: mode: 644 group: 33 -- **outdir**: *Path* +- __outdir__: *Path* This option sets the full path to the directory in which the HTML files should be stored. Make sure the ejabberd daemon user has write access on that directory. The default value is *www/muc*. -- **spam\_prevention**: *true | false* +- __spam\_prevention__: *true | false* If set to *true*, a special attribute is added to links that prevent their indexation by search engines. The default value is *true*, which mean that *nofollow* attributes will be added to user submitted links. -- **timezone**: *local | universal* +- __timezone__: *local | universal* The time zone for the logs is configurable with this option. If set to *local*, the local time, as reported to Erlang emulator by the operating system, will be used. Otherwise, UTC time will be used. The default value is *local*. -- **top\_link**: *{URL: Text}* +- __top\_link__: *{URL: Text}* With this option you can customize the link on the top right corner of each log file. The default value is shown in the example below: - **Example**: + __Example__: top_link: /: Home -- **url**: *URL* +- __url__: *URL* A top level *URL* where a client can access logs of a particular conference. The conference name is appended to the URL if *dirname* option is set to *room\_name* or a conference JID is appended to the @@ -1614,28 +1613,28 @@ Addressing](https://xmpp.org/extensions/xep-0033.html). __Available options:__ -- **access**: *Access* +- __access__: *Access* The access rule to restrict who can send packets to the multicast service. Default value: *all*. -- **host** +- __host__ Deprecated. Use *hosts* instead. -- **hosts**: *\[Host, ...\]* +- __hosts__: *\[Host, ...\]* This option defines the Jabber IDs of the service. If the *hosts* option is not specified, the only Jabber ID will be the hostname of the virtual host with the prefix "multicast.". The keyword *@HOST@* is replaced with the real virtual host name. The default value is *multicast.@HOST@*. -- **limits**: *Sender: Stanza: Number* +- __limits__: *Sender: Stanza: Number* Specify a list of custom limits which override the default ones defined in XEP-0033. Limits are defined per sender type and stanza type, where: - - *sender* can be: *local* or *remote*. +- *sender* can be: *local* or *remote*. - - *stanza* can be: *message* or *presence*. +- *stanza* can be: *message* or *presence*. - - *number* can be a positive integer or *infinite*. +- *number* can be a positive integer or *infinite*. **Example**: @@ -1647,11 +1646,11 @@ in XEP-0033. Limits are defined per sender type and stanza type, where: message: 20 presence: 20 -- **name** +- __name__ Service name to provide in the Info query to the Service Discovery. Default is *"Multicast"*. -- **vcard** +- __vcard__ vCard element to return when queried. Default value is *undefined*. __**Example**:__ @@ -1709,14 +1708,14 @@ works. A user is considered offline if no session presence priority > __Available options:__ -- **access\_max\_user\_messages**: *AccessName* +- __access\_max\_user\_messages__: *AccessName* This option defines which access rule will be enforced to limit the maximum number of offline messages that a user can have (quota). When a user has too many offline messages, any new messages that they receive are discarded, and a <resource-constraint/> error is returned to the sender. The default value is *max\_user\_offline\_messages*. -- **bounce\_groupchat**: *true | false* +- __bounce\_groupchat__: *true | false* This option is use the disable an optimisation that avoids bouncing error messages when groupchat messages could not be stored as offline. It will reduce chat room load, without any drawback in standard use @@ -1727,31 +1726,31 @@ happen in the context of MucSub, so it is even more important to have it on large MucSub services. The default value is *false*, meaning the optimisation is enabled. -- **cache\_life\_time**: *timeout()* +- __cache\_life\_time__: *timeout()* Same as top-level *cache\_life\_time* option, but applied to this module only. -- **cache\_size**: *pos\_integer() | infinity* +- __cache\_size__: *pos\_integer() | infinity* Same as top-level *cache\_size* option, but applied to this module only. -- **db\_type**: *mnesia | sql* +- __db\_type__: *mnesia | sql* Same as top-level *default\_db* option, but applied to this module only. -- **store\_empty\_body**: *true | false | unless\_chat\_state* +- __store\_empty\_body__: *true | false | unless\_chat\_state* Whether or not to store messages that lack a <body/> element. The default value is *unless\_chat\_state*, which tells ejabberd to store messages even if they lack the <body/> element, unless they only contain a chat state notification (as defined in [XEP-0085: Chat State Notifications](https://xmpp.org/extensions/xep-0085.html). -- **store\_groupchat**: *true | false* +- __store\_groupchat__: *true | false* Whether or not to store groupchat messages. The default value is *false*. -- **use\_cache**: *true | false* +- __use\_cache__: *true | false* Same as top-level *use\_cache* option, but applied to this module only. -- **use\_mam\_for\_storage**: *true | false* +- __use\_mam\_for\_storage__: *true | false* This is an experimental option. Enabling this option will make *mod\_offline* not use the former spool table for storing MucSub offline messages, but will use the archive table instead. This use of the @@ -1801,23 +1800,23 @@ ping requests, as defined by the protocol. __Available options:__ -- **ping\_ack\_timeout**: *timeout()* +- __ping\_ack\_timeout__: *timeout()* How long to wait before deeming that a client has not answered a given server ping request. The default value is *undefined*. -- **ping\_interval**: *timeout()* +- __ping\_interval__: *timeout()* How often to send pings to connected clients, if option *send\_pings* is set to *true*. If a client connection does not send or receive any stanza within this interval, a ping request is sent to the client. The default value is *1* minute. -- **send\_pings**: *true | false* +- __send\_pings__: *true | false* If this option is set to *true*, the server sends pings to connected clients that are not active in a given interval defined in *ping\_interval* option. This is useful to keep client connections alive or checking availability. The default value is *false*. -- **timeout\_action**: *none | kill* +- __timeout\_action__: *none | kill* What to do when a client does not answer to a server ping request in less than period defined in *ping\_ack\_timeout* option: *kill* means destroying the underlying connection, *none* means to do nothing. NOTE: @@ -1845,14 +1844,14 @@ the exceeding stanzas are silently dropped, and a warning is logged. __Available options:__ -- **count**: *Number* +- __count__: *Number* The number of subscription presence stanzas (subscribe, unsubscribe, subscribed, unsubscribed) allowed for any direction (input or output) per time defined in *interval* option. Please note that two users subscribing to each other usually generate 4 stanzas, so the recommended value is *4* or more. The default value is *5*. -- **interval**: *timeout()* +- __interval__: *timeout()* The time interval. The default value is *1* minute. __**Example**:__ @@ -1879,21 +1878,21 @@ Lists](https://xmpp.org/extensions/xep-0016.html). __Available options:__ -- **cache\_life\_time**: *timeout()* +- __cache\_life\_time__: *timeout()* Same as top-level *cache\_life\_time* option, but applied to this module only. -- **cache\_missed**: *true | false* +- __cache\_missed__: *true | false* Same as top-level *cache\_missed* option, but applied to this module only. -- **cache\_size**: *pos\_integer() | infinity* +- __cache\_size__: *pos\_integer() | infinity* Same as top-level *cache\_size* option, but applied to this module only. -- **db\_type**: *mnesia | sql* +- __db\_type__: *mnesia | sql* Same as top-level *default\_db* option, but applied to this module only. -- **use\_cache**: *true | false* +- __use\_cache__: *true | false* Same as top-level *use\_cache* option, but applied to this module only. mod\_private @@ -1911,21 +1910,21 @@ Bookmarks](https://xmpp.org/extensions/xep-0048.html)). __Available options:__ -- **cache\_life\_time**: *timeout()* +- __cache\_life\_time__: *timeout()* Same as top-level *cache\_life\_time* option, but applied to this module only. -- **cache\_missed**: *true | false* +- __cache\_missed__: *true | false* Same as top-level *cache\_missed* option, but applied to this module only. -- **cache\_size**: *pos\_integer() | infinity* +- __cache\_size__: *pos\_integer() | infinity* Same as top-level *cache\_size* option, but applied to this module only. -- **db\_type**: *mnesia | sql* +- __db\_type__: *mnesia | sql* Same as top-level *default\_db* option, but applied to this module only. -- **use\_cache**: *true | false* +- __use\_cache__: *true | false* Same as top-level *use\_cache* option, but applied to this module only. mod\_privilege @@ -1961,42 +1960,42 @@ Check the section about listening ports for more information. __Available options:__ -- **message**: *Options* +- __message__: *Options* This option defines permissions for messages. By default no permissions are given. The *Options* are: - - **outgoing**: *AccessName* +- __outgoing__: *AccessName* The option defines an access rule for sending outgoing messages by the component. The default value is *none*. -- **presence**: *Options* +- __presence__: *Options* This option defines permissions for presences. By default no permissions are given. The *Options* are: - - **managed\_entity**: *AccessName* +- __managed\_entity__: *AccessName* An access rule that gives permissions to the component to receive server presences. The default value is *none*. - - **roster**: *AccessName* +- __roster__: *AccessName* An access rule that gives permissions to the component to receive the presence of both the users and the contacts in their roster. The default value is *none*. -- **roster**: *Options* +- __roster__: *Options* This option defines roster permissions. By default no permissions are given. The *Options* are: - - **both**: *AccessName* +- __both__: *AccessName* Sets read/write access to a user’s roster. The default value is *none*. - - **get**: *AccessName* +- __get__: *AccessName* Sets read access to a user’s roster. The default value is *none*. - - **set**: *AccessName* +- __set__: *AccessName* Sets write access to a user’s roster. The default value is *none*. @@ -2022,72 +2021,72 @@ ejabberd to act as a file transfer proxy between two XMPP clients. __Available options:__ -- **access**: *AccessName* +- __access__: *AccessName* Defines an access rule for file transfer initiators. The default value is *all*. You may want to restrict access to the users of your server only, in order to avoid abusing your proxy by the users of remote servers. -- **auth\_type**: *anonymous | plain* +- __auth\_type__: *anonymous | plain* SOCKS5 authentication type. The default value is *anonymous*. If set to *plain*, ejabberd will use authentication backend as it would for SASL PLAIN. -- **host** +- __host__ Deprecated. Use *hosts* instead. -- **hostname**: *Host* +- __hostname__: *Host* Defines a hostname offered by the proxy when establishing a session with clients. This is useful when you run the proxy behind a NAT. The keyword *@HOST@* is replaced with the virtual host name. The default is to use the value of *ip* option. Examples: *proxy.mydomain.org*, *200.150.100.50*. -- **hosts**: *\[Host, ...\]* +- __hosts__: *\[Host, ...\]* This option defines the Jabber IDs of the service. If the *hosts* option is not specified, the only Jabber ID will be the hostname of the virtual host with the prefix "proxy.". The keyword *@HOST@* is replaced with the real virtual host name. -- **ip**: *IPAddress* +- __ip__: *IPAddress* This option specifies which network interface to listen for. The default value is an IP address of the service’s DNS name, or, if fails, *127.0.0.1*. -- **max\_connections**: *pos\_integer() | infinity* +- __max\_connections__: *pos\_integer() | infinity* Maximum number of active connections per file transfer initiator. The default value is *infinity*. -- **name**: *Name* +- __name__: *Name* The value of the service name. This name is only visible in some clients that support [XEP-0030: Service Discovery](https://xmpp.org/extensions/xep-0030.html). The default is "SOCKS5 Bytestreams". -- **port**: *1..65535* +- __port__: *1..65535* A port number to listen for incoming connections. The default value is *7777*. -- **ram\_db\_type**: *mnesia | redis | sql* +- __ram\_db\_type__: *mnesia | redis | sql* Define the type of volatile (in-memory) storage where the module will store room information. -- **recbuf**: *Size* +- __recbuf__: *Size* A size of the buffer for incoming packets. If you define a shaper, set the value of this option to the size of the shaper in order to avoid traffic spikes in file transfers. The default value is *65536* bytes. -- **shaper**: *Shaper* +- __shaper__: *Shaper* This option defines a shaper for the file transfer peers. A shaper with the maximum bandwidth will be selected. The default is *none*, i.e. no shaper. -- **sndbuf**: *Size* +- __sndbuf__: *Size* A size of the buffer for outgoing packets. If you define a shaper, set the value of this option to the size of the shaper in order to avoid traffic spikes in file transfers. The default value is *65536* bytes. -- **vcard**: *vCard* +- __vcard__: *vCard* A custom vCard of the service that will be displayed by some XMPP clients in Service Discovery. The value of *vCard* is a YAML map constructed from an XML representation of vCard. Since the @@ -2158,80 +2157,80 @@ default ejabberd configuration file, and it requires *mod\_caps*. __Available options:__ -- **access\_createnode**: *AccessName* +- __access\_createnode__: *AccessName* This option restricts which users are allowed to create pubsub nodes using *acl* and *access*. By default any account in the local ejabberd server is allowed to create pubsub nodes. The default value is: *all*. -- **db\_type**: *mnesia | sql* +- __db\_type__: *mnesia | sql* Same as top-level *default\_db* option, but applied to this module only. -- **default\_node\_config**: *List of Key:Value* +- __default\_node\_config__: *List of Key:Value* To override default node configuration, regardless of node plugin. Value is a list of key-value definition. Node configuration still uses default configuration defined by node plugin, and overrides any items by value defined in this configurable list. -- **force\_node\_config**: *List of Node and the list of its Key:Value* +- __force\_node\_config__: *List of Node and the list of its Key:Value* Define the configuration for given nodes. The default value is: *\[\]*. - **Example**: + __Example__: force_node_config: ## Avoid buggy clients to make their bookmarks public storage:bookmarks: access_model: whitelist -- **host** +- __host__ Deprecated. Use *hosts* instead. -- **hosts**: *\[Host, ...\]* +- __hosts__: *\[Host, ...\]* This option defines the Jabber IDs of the service. If the *hosts* option is not specified, the only Jabber ID will be the hostname of the virtual host with the prefix "vjud.". The keyword *@HOST@* is replaced with the real virtual host name. -- **ignore\_pep\_from\_offline**: *false | true* +- __ignore\_pep\_from\_offline__: *false | true* To specify whether or not we should get last published PEP items from users in our roster which are offline when we connect. Value is *true* or *false*. If not defined, pubsub assumes true so we only get last items of online contacts. -- **last\_item\_cache**: *false | true* +- __last\_item\_cache__: *false | true* To specify whether or not pubsub should cache last items. Value is *true* or *false*. If not defined, pubsub does not cache last items. On systems with not so many nodes, caching last items speeds up pubsub and allows to raise user connection rate. The cost is memory usage, as every item is stored in memory. -- **max\_items\_node**: *MaxItems* +- __max\_items\_node__: *MaxItems* Define the maximum number of items that can be stored in a node. Default value is: *10*. -- **max\_nodes\_discoitems**: *pos\_integer() | infinity* +- __max\_nodes\_discoitems__: *pos\_integer() | infinity* The maximum number of nodes to return in a discoitem response. The default value is: *100*. -- **max\_subscriptions\_node**: *MaxSubs* +- __max\_subscriptions\_node__: *MaxSubs* Define the maximum number of subscriptions managed by a node. Default value is no limitation: *undefined*. -- **name**: *Name* +- __name__: *Name* The value of the service name. This name is only visible in some clients that support [XEP-0030: Service Discovery](https://xmpp.org/extensions/xep-0030.html). The default is *vCard User Search*. -- **nodetree**: *Nodetree* +- __nodetree__: *Nodetree* To specify which nodetree to use. If not defined, the default pubsub nodetree is used: *tree*. Only one nodetree can be used per host, and is shared by all node plugins. - - *tree* nodetree store node configuration and relations on the +- *tree* nodetree store node configuration and relations on the database. *flat* nodes are stored without any relationship, and *hometree* nodes can have child nodes. - - *virtual* nodetree does not store nodes on database. This saves +- *virtual* nodetree does not store nodes on database. This saves resources on systems with tons of nodes. If using the *virtual* nodetree, you can only enable those node plugins: *\[flat, pep\]* or *\[flat\]*; any other plugins configuration will not work. Also, all @@ -2240,16 +2239,16 @@ shared by all node plugins. database, it will not work if you used the default *tree* nodetree before. - - *dag* nodetree provides experimental support for PubSub Collection +- *dag* nodetree provides experimental support for PubSub Collection Nodes (XEP-0248). In that case you should also add *dag* node plugin as default, for example: *plugins: \[flat,pep\]* -- **pep\_mapping**: *List of Key:Value* +- __pep\_mapping__: *List of Key:Value* This allows to define a list of key-value to choose defined node plugins on given PEP namespace. The following example will use *node\_tune* instead of *node\_pep* for every PEP node with the tune namespace: - **Example**: + __Example__: modules: ... @@ -2258,21 +2257,21 @@ instead of *node\_pep* for every PEP node with the tune namespace: http://jabber.org/protocol/tune: tune ... -- **plugins**: *\[Plugin, ...\]* +- __plugins__: *\[Plugin, ...\]* To specify which pubsub node plugins to use. The first one in the list is used by default. If this option is not defined, the default plugins list is: *\[flat\]*. PubSub clients can define which plugin to use when creating a node: add *type='plugin-name*' attribute to the *create* stanza element. - - *flat* plugin handles the default behaviour and follows standard +- *flat* plugin handles the default behaviour and follows standard XEP-0060 implementation. - - *pep* plugin adds extension to handle Personal Eventing Protocol +- *pep* plugin adds extension to handle Personal Eventing Protocol (XEP-0163) to the PubSub engine. Adding pep allows to handle PEP automatically. -- **vcard**: *vCard* +- __vcard__: *vCard* A custom vCard of the server that will be displayed by some XMPP clients in Service Discovery. The value of *vCard* is a YAML map constructed from an XML representation of vCard. Since the representation has no @@ -2346,21 +2345,21 @@ platform-dependant backend services such as FCM or APNS. __Available options:__ -- **cache\_life\_time**: *timeout()* +- __cache\_life\_time__: *timeout()* Same as top-level *cache\_life\_time* option, but applied to this module only. -- **cache\_missed**: *true | false* +- __cache\_missed__: *true | false* Same as top-level *cache\_missed* option, but applied to this module only. -- **cache\_size**: *pos\_integer() | infinity* +- __cache\_size__: *pos\_integer() | infinity* Same as top-level *cache\_size* option, but applied to this module only. -- **db\_type**: *mnesia | sql* +- __db\_type__: *mnesia | sql* Same as top-level *default\_db* option, but applied to this module only. -- **include\_body**: *true | false | Text* +- __include\_body__: *true | false | Text* If this option is set to *true*, the message text is included with push notifications generated for incoming messages with a body. The option can instead be set to a static *Text*, in which case the specified text @@ -2369,12 +2368,12 @@ to signal the app server whether the notification was triggered by a message with body (as opposed to other types of traffic) without leaking actual message contents. The default value is "New message". -- **include\_sender**: *true | false* +- __include\_sender__: *true | false* If this option is set to *true*, the sender’s JID is included with push notifications generated for incoming messages with a body. The default value is *false*. -- **use\_cache**: *true | false* +- __use\_cache__: *true | false* Same as top-level *use\_cache* option, but applied to this module only. mod\_push\_keepalive @@ -2391,21 +2390,21 @@ The module depends on *mod\_push*. __Available options:__ -- **resume\_timeout**: *timeout()* +- __resume\_timeout__: *timeout()* This option specifies the period of time until the session of a disconnected push client times out. This timeout is only in effect as long as no push notification is issued. Once that happened, the resumption timeout configured for the *mod\_stream\_mgmt* module is restored. The default value is *72 hours*. -- **wake\_on\_start**: *true | false* +- __wake\_on\_start__: *true | false* If this option is set to *true*, notifications are generated for **all** registered push clients during server startup. This option should not be enabled on servers with many push clients as it can generate significant load on the involved push services and the server itself. The default value is *false*. -- **wake\_on\_timeout**: *true | false* +- __wake\_on\_timeout__: *true | false* If this option is set to *true*, a notification is generated shortly before the session would time out as per the *resume\_timeout* option. The default value is *true*. @@ -2417,11 +2416,11 @@ This module adds support for [XEP-0077: In-Band Registration](https://xmpp.org/extensions/xep-0077.html). This protocol enables end users to use a XMPP client to: -- Register a new account on the server. +- Register a new account on the server. -- Change the password from an existing account on the server. +- Change the password from an existing account on the server. -- Delete an existing account on the server. +- Delete an existing account on the server. This module reads also another option defined globally for the server: *registration\_timeout*. Please check that option documentation in the @@ -2429,49 +2428,49 @@ section with top-level options. __Available options:__ -- **access**: *AccessName* +- __access__: *AccessName* Specify rules to restrict what usernames can be registered and unregistered. If a rule returns *deny* on the requested username, registration and unregistration of that user name is denied. There are no restrictions by default. -- **access\_from**: *AccessName* +- __access\_from__: *AccessName* By default, *ejabberd* doesn’t allow to register new accounts from s2s or existing c2s sessions. You can change it by defining access rule in this option. Use with care: allowing registration from s2s leads to uncontrolled massive accounts creation by rogue users. -- **access\_remove**: *AccessName* +- __access\_remove__: *AccessName* Specify rules to restrict access for user unregistration. By default any user is able to unregister their account. -- **captcha\_protected**: *true | false* +- __captcha\_protected__: *true | false* Protect registrations with CAPTCHA (see section [CAPTCHA](https://docs.ejabberd.im/admin/configuration/#captcha) of the Configuration Guide). The default is *false*. -- **ip\_access**: *AccessName* +- __ip\_access__: *AccessName* Define rules to allow or deny account registration depending on the IP address of the XMPP client. The *AccessName* should be of type *ip*. The default value is *all*. -- **password\_strength**: *Entropy* +- __password\_strength__: *Entropy* This option sets the minimum [Shannon entropy](https://en.wikipedia.org/wiki/Entropy_(information_theory)) for passwords. The value *Entropy* is a number of bits of entropy. The recommended minimum is 32 bits. The default is *0*, i.e. no checks are performed. -- **redirect\_url**: *URL* +- __redirect\_url__: *URL* This option enables registration redirection as described in [XEP-0077: In-Band Registration: Redirection](https://xmpp.org/extensions/xep-0077.html#redirect). -- **registration\_watchers**: *\[JID, ...\]* +- __registration\_watchers__: *\[JID, ...\]* This option defines a list of JIDs which will be notified each time a new account is registered. -- **welcome\_message**: *{subject: Subject, body: Body}* +- __welcome\_message__: *{subject: Subject, body: Body}* Set a welcome message that is sent to each newly registered account. The message will have subject *Subject* and text *Body*. @@ -2480,18 +2479,18 @@ mod\_register\_web This module provides a web page where users can: -- Register a new account on the server. +- Register a new account on the server. -- Change the password from an existing account on the server. +- Change the password from an existing account on the server. -- Delete an existing account on the server. +- Delete an existing account on the server. This module supports CAPTCHA image to register a new account. To enable this feature, configure the options *captcha\_cmd* and *captcha\_url*, which are documented in the section with top-level options. As an example usage, the users of the host *example.org* can visit the -page: *https://example.org:5281/register/* It is important to include +page: *"https://example.org:5281/register/"* It is important to include the last / character in the URL, otherwise the subpages URL will be incorrect. @@ -2510,28 +2509,28 @@ Versioning](https://xmpp.org/extensions/xep-0237.html). __Available options:__ -- **access**: *AccessName* +- __access__: *AccessName* This option can be configured to specify rules to restrict roster management. If the rule returns *deny* on the requested user name, that user cannot modify their personal roster, i.e. they cannot add/remove/modify contacts or send presence subscriptions. The default value is *all*, i.e. no restrictions. -- **cache\_life\_time**: *timeout()* +- __cache\_life\_time__: *timeout()* Same as top-level *cache\_life\_time* option, but applied to this module only. -- **cache\_missed**: *true | false* +- __cache\_missed__: *true | false* Same as top-level *cache\_missed* option, but applied to this module only. -- **cache\_size**: *pos\_integer() | infinity* +- __cache\_size__: *pos\_integer() | infinity* Same as top-level *cache\_size* option, but applied to this module only. -- **db\_type**: *mnesia | sql* +- __db\_type__: *mnesia | sql* Same as top-level *default\_db* option, but applied to this module only. -- **store\_current\_id**: *true | false* +- __store\_current\_id__: *true | false* If this option is set to *true*, the current roster version number is stored on the database. If set to *false*, the roster version number is calculated on the fly each time. Enabling this option reduces the load @@ -2541,10 +2540,10 @@ set to *true*. The default value is *false*. IMPORTANT: if you use *mod\_shared\_roster* or *mod\_shared\_roster\_ldap*, you must set the value of the option to *false*. -- **use\_cache**: *true | false* +- __use\_cache__: *true | false* Same as top-level *use\_cache* option, but applied to this module only. -- **versioning**: *true | false* +- __versioning__: *true | false* Enables/disables Roster Versioning. The default value is *false*. __**Example**:__ @@ -2576,7 +2575,7 @@ identity verification based on DNS. __Available options:__ -- **access**: *AccessName* +- __access__: *AccessName* An access rule that can be used to restrict dialback for some servers. The default value is *all*. @@ -2602,7 +2601,7 @@ Forwarding](https://xmpp.org/extensions/xep-0297.html). __Available options:__ -- **loggers**: *\[Domain, ...\]* +- __loggers__: *\[Domain, ...\]* A list of servers or connected components to which stanzas will be forwarded. @@ -2636,11 +2635,11 @@ Shared roster groups can be edited via the Web Admin, and some API commands called *srg\_\**. Each group has a unique name and those parameters: -- Label: Used in the rosters where this group is displayed. +- Label: Used in the rosters where this group is displayed. -- Description: of the group, which has no effect. +- Description: of the group, which has no effect. -- Members: A list of JIDs of group members, entered one per line in +- Members: A list of JIDs of group members, entered one per line in the Web Admin. The special member directive *@all@* represents all the registered users in the virtual host; which is only recommended for a small server with just a few hundred users. The special member @@ -2648,7 +2647,7 @@ parameters: host. With those two directives, the actual list of members in those shared rosters is generated dynamically at retrieval time. -- Displayed: A list of groups that will be in the rosters of this +- Displayed: A list of groups that will be in the rosters of this group’s members. A group of other vhost can be identified with *groupid@vhost*. @@ -2657,24 +2656,24 @@ will return 503 errors. __Available options:__ -- **cache\_life\_time**: *timeout()* +- __cache\_life\_time__: *timeout()* Same as top-level *cache\_life\_time* option, but applied to this module only. -- **cache\_missed**: *true | false* +- __cache\_missed__: *true | false* Same as top-level *cache\_missed* option, but applied to this module only. -- **cache\_size**: *pos\_integer() | infinity* +- __cache\_size__: *pos\_integer() | infinity* Same as top-level *cache\_size* option, but applied to this module only. -- **db\_type**: *mnesia | sql* +- __db\_type__: *mnesia | sql* Define the type of storage where the module will create the tables and store user information. The default is the storage defined by the global option *default\_db*, or *mnesia* if omitted. If *sql* value is defined, make sure you have defined the database. -- **use\_cache**: *true | false* +- __use\_cache__: *true | false* Same as top-level *use\_cache* option, but applied to this module only. __Examples:__ @@ -2735,72 +2734,72 @@ unspecified, default to the values specified for the top level of configuration. This lets you avoid specifying, for example, the bind password in multiple places. -- Filters: *ldap\_rfilter*, *ldap\_ufilter*, *ldap\_gfilter*, +- Filters: *ldap\_rfilter*, *ldap\_ufilter*, *ldap\_gfilter*, *ldap\_filter*. These options specify LDAP filters used to query for shared roster information. All of them are run against the ldap\_base. -- Attributes: *ldap\_groupattr*, *ldap\_groupdesc*, +- Attributes: *ldap\_groupattr*, *ldap\_groupdesc*, *ldap\_memberattr*, *ldap\_userdesc*, *ldap\_useruid*. These options specify the names of the attributes which hold interesting data in the entries returned by running filters specified with the filter options. -- Control parameters: *ldap\_auth\_check*, +- Control parameters: *ldap\_auth\_check*, *ldap\_group\_cache\_validity*, *ldap\_memberattr\_format*, *ldap\_memberattr\_format\_re*, *ldap\_user\_cache\_validity*. These parameters control the behaviour of the module. -- Connection parameters: The module also accepts the connection +- Connection parameters: The module also accepts the connection parameters, all of which default to the top-level parameter of the same name, if unspecified. See [LDAP - Connection](/admin/configuration/database-ldap/#ldap-connection) section for + Connection](../../admin/configuration/ldap.md#ldap_connection) section for more information about them. Check also the [Configuration -examples](/admin/configuration/database-ldap/#configuration-examples) section to +examples](../../admin/configuration/ldap.md#configuration_examples) section to get details about retrieving the roster, and configuration examples including Flat DIT and Deep DIT. __Available options:__ -- **cache\_life\_time** +- __cache\_life\_time__ Same as top-level *cache\_life\_time* option, but applied to this module only. -- **cache\_missed** +- __cache\_missed__ Same as top-level *cache\_missed* option, but applied to this module only. -- **cache\_size** +- __cache\_size__ Same as top-level *cache\_size* option, but applied to this module only. -- **ldap\_auth\_check**: *true | false* +- __ldap\_auth\_check__: *true | false* Whether the module should check (via the ejabberd authentication subsystem) for existence of each user in the shared LDAP roster. Set to *false* if you want to disable the check. Default value is *true*. -- **ldap\_backups** +- __ldap\_backups__ Same as top-level *ldap\_backups* option, but applied to this module only. -- **ldap\_base** +- __ldap\_base__ Same as top-level *ldap\_base* option, but applied to this module only. -- **ldap\_deref\_aliases** +- __ldap\_deref\_aliases__ Same as top-level *ldap\_deref\_aliases* option, but applied to this module only. -- **ldap\_encrypt** +- __ldap\_encrypt__ Same as top-level *ldap\_encrypt* option, but applied to this module only. -- **ldap\_filter** +- __ldap\_filter__ Additional filter which is AND-ed together with "User Filter" and "Group Filter". For more information check the LDAP -[Filters](/admin/configuration/database-ldap/#filters) section. +[Filters](../../admin/configuration/ldap.md#filters) section. -- **ldap\_gfilter** +- __ldap\_gfilter__ "Group Filter", used when retrieving human-readable name (a.k.a. "Display Name") and the members of a group. See also the parameters *ldap\_groupattr*, *ldap\_groupdesc* and *ldap\_memberattr*. If @@ -2808,92 +2807,92 @@ unspecified, defaults to the top-level parameter of the same name. If that one also is unspecified, then the filter is constructed exactly like "User Filter". -- **ldap\_groupattr** +- __ldap\_groupattr__ The name of the attribute that holds the group name, and that is used to differentiate between them. Retrieved from results of the "Roster Filter" and "Group Filter". Defaults to *cn*. -- **ldap\_groupdesc** +- __ldap\_groupdesc__ The name of the attribute which holds the human-readable group name in the objects you use to represent groups. Retrieved from results of the "Group Filter". Defaults to whatever *ldap\_groupattr* is set. -- **ldap\_memberattr** +- __ldap\_memberattr__ The name of the attribute which holds the IDs of the members of a group. Retrieved from results of the "Group Filter". Defaults to *memberUid*. The name of the attribute differs depending on the objectClass you use for your group objects, for example: *posixGroup* → *memberUid*; *groupOfNames* → *member*; *groupOfUniqueNames* → *uniqueMember*. -- **ldap\_memberattr\_format** +- __ldap\_memberattr\_format__ A globbing format for extracting user ID from the value of the attribute named by *ldap\_memberattr*. Defaults to *%u*, which means that the whole value is the member ID. If you change it to something different, you may also need to specify the User and Group Filters manually; see section Filters. -- **ldap\_memberattr\_format\_re** +- __ldap\_memberattr\_format\_re__ A regex for extracting user ID from the value of the attribute named by *ldap\_memberattr*. Check the LDAP [Control -Parameters](/admin/configuration/database-ldap/#control-parameters) section. +Parameters](../../admin/configuration/ldap.md#control_parameters) section. -- **ldap\_password** +- __ldap\_password__ Same as top-level *ldap\_password* option, but applied to this module only. -- **ldap\_port** +- __ldap\_port__ Same as top-level *ldap\_port* option, but applied to this module only. -- **ldap\_rfilter** +- __ldap\_rfilter__ So called "Roster Filter". Used to find names of all "shared roster" groups. See also the *ldap\_groupattr* parameter. If unspecified, defaults to the top-level parameter of the same name. You must specify it in some place in the configuration, there is no default. -- **ldap\_rootdn** +- __ldap\_rootdn__ Same as top-level *ldap\_rootdn* option, but applied to this module only. -- **ldap\_servers** +- __ldap\_servers__ Same as top-level *ldap\_servers* option, but applied to this module only. -- **ldap\_tls\_cacertfile** +- __ldap\_tls\_cacertfile__ Same as top-level *ldap\_tls\_cacertfile* option, but applied to this module only. -- **ldap\_tls\_certfile** +- __ldap\_tls\_certfile__ Same as top-level *ldap\_tls\_certfile* option, but applied to this module only. -- **ldap\_tls\_depth** +- __ldap\_tls\_depth__ Same as top-level *ldap\_tls\_depth* option, but applied to this module only. -- **ldap\_tls\_verify** +- __ldap\_tls\_verify__ Same as top-level *ldap\_tls\_verify* option, but applied to this module only. -- **ldap\_ufilter** +- __ldap\_ufilter__ "User Filter", used for retrieving the human-readable name of roster entries (usually full names of people in the roster). See also the parameters *ldap\_userdesc* and *ldap\_useruid*. For more information -check the LDAP [Filters](/admin/configuration/database-ldap/#filters) section. +check the LDAP [Filters](../../admin/configuration/ldap.md#filters) section. -- **ldap\_uids** +- __ldap\_uids__ Same as top-level *ldap\_uids* option, but applied to this module only. -- **ldap\_userdesc** +- __ldap\_userdesc__ The name of the attribute which holds the human-readable user name. Retrieved from results of the "User Filter". Defaults to *cn*. -- **ldap\_useruid** +- __ldap\_useruid__ The name of the attribute which holds the ID of a roster item. Value of this attribute in the roster item objects needs to match the ID retrieved from the *ldap\_memberattr* attribute of a group object. Retrieved from results of the "User Filter". Defaults to *cn*. -- **use\_cache** +- __use\_cache__ Same as top-level *use\_cache* option, but applied to this module only. mod\_sic @@ -2921,39 +2920,39 @@ virtual host. > > It is not enough to just load this module. You should also configure > listeners and DNS records properly. For details see the section about -> the [ejabberd\_sip](/archive/20_04/listen/#ejabberd-sip) listen module in +> the [ejabberd\_sip](listen.md#ejabberd_sip) listen module in > the ejabberd Documentation. __Available options:__ -- **always\_record\_route**: *true | false* +- __always\_record\_route__: *true | false* Always insert "Record-Route" header into SIP messages. This approach allows to bypass NATs/firewalls a bit more easily. The default value is *true*. -- **flow\_timeout\_tcp**: *timeout()* +- __flow\_timeout\_tcp__: *timeout()* The option sets a keep-alive timer for [SIP outbound](https://tools.ietf.org/html/rfc5626) TCP connections. The default value is *2* minutes. -- **flow\_timeout\_udp**: *timeout()* +- __flow\_timeout\_udp__: *timeout()* The options sets a keep-alive timer for [SIP outbound](https://tools.ietf.org/html/rfc5626) UDP connections. The default value is *29* seconds. -- **record\_route**: *URI* +- __record\_route__: *URI* When the option *always\_record\_route* is set to *true* or when [SIP outbound](https://tools.ietf.org/html/rfc5626) is utilized, ejabberd inserts "Record-Route" header field with this *URI* into a SIP message. The default is a SIP URI constructed from the virtual host on which the module is loaded. -- **routes**: *\[URI, ...\]* +- __routes__: *\[URI, ...\]* You can set a list of SIP URIs of routes pointing to this SIP proxy server. The default is a list containing a single SIP URI constructed from the virtual host on which the module is loaded. -- **via**: *\[URI, ...\]* +- __via__: *\[URI, ...\]* A list to construct "Via" headers for inserting them into outgoing SIP messages. This is useful if you’re running your SIP proxy in a non-standard network topology. Every *URI* element in the list must be @@ -2988,16 +2987,16 @@ Gathering](https://xmpp.org/extensions/xep-0039.html). This protocol allows you to retrieve the following statistics from your ejabberd server: -- Total number of registered users on the current virtual host +- Total number of registered users on the current virtual host (users/total). -- Total number of registered users on all virtual hosts +- Total number of registered users on all virtual hosts (users/all-hosts/total). -- Total number of online users on the current virtual host +- Total number of online users on the current virtual host (users/online). -- Total number of online users on all virtual hosts +- Total number of online users on all virtual hosts (users/all-hosts/online). > **Note** @@ -3018,18 +3017,18 @@ including features for stanza acknowledgements and stream resumption. __Available options:__ -- **ack\_timeout**: *timeout()* +- __ack\_timeout__: *timeout()* A time to wait for stanza acknowledgements. Setting it to *infinity* effectively disables the timeout. The default value is *1* minute. -- **cache\_life\_time**: *timeout()* +- __cache\_life\_time__: *timeout()* Same as top-level *cache\_life\_time* option, but applied to this module only. -- **cache\_size**: *pos\_integer() | infinity* +- __cache\_size__: *pos\_integer() | infinity* Same as top-level *cache\_size* option, but applied to this module only. -- **max\_ack\_queue**: *Size* +- __max\_ack\_queue__: *Size* This option specifies the maximum number of unacknowledged stanzas queued for possible retransmission. When the limit is exceeded, the client session is terminated. The allowed values are positive integers @@ -3040,7 +3039,7 @@ should definitely be set higher that the size of the offline queue (for example at least 3 times the value of the max offline queue and never lower than *1000*). The default value is *5000*. -- **max\_resume\_timeout**: *timeout()* +- __max\_resume\_timeout__: *timeout()* A client may specify the period of time until a session times out if the connection is lost. During this period of time, the client may resume its session. This option limits the period of time a client is permitted @@ -3048,10 +3047,10 @@ to request. It must be set to a timeout equal to or larger than the default *resume\_timeout*. By default, it is set to the same value as the *resume\_timeout* option. -- **queue\_type**: *ram | file* +- __queue\_type__: *ram | file* Same as top-level *queue\_type* option, but applied to this module only. -- **resend\_on\_timeout**: *true | false | if\_offline* +- __resend\_on\_timeout__: *true | false | if\_offline* If this option is set to *true*, any message stanzas that weren’t acknowledged by the client will be resent on session timeout. This behavior might often be desired, but could have unexpected results under @@ -3063,7 +3062,7 @@ option may be set to *if\_offline*. In this case, unacknowledged messages are resent only if no other resource is online when the session times out. Otherwise, error messages are generated. -- **resume\_timeout**: *timeout()* +- __resume\_timeout__: *timeout()* This option configures the (default) period of time until a session times out if the connection is lost. During this period of time, a client may resume its session. Note that the client may request a @@ -3080,12 +3079,12 @@ Service Discovery](https://xmpp.org/extensions/xep-0215.html). __Available options:__ -- **access**: *AccessName* +- __access__: *AccessName* This option defines which access rule will be used to control who is allowed to discover STUN/TURN services and to request temporary credentials. The default value is *local*. -- **credentials\_lifetime**: *timeout()* +- __credentials\_lifetime__: *timeout()* The lifetime of temporary credentials offered to clients. If ejabberd’s built-in TURN service is used, TURN relays allocated using temporary credentials will be terminated shortly after the credentials expired. @@ -3093,7 +3092,7 @@ The default value is *12 hours*. Note that restarting the ejabberd node invalidates any temporary credentials offered before the restart unless a *secret* is specified (see below). -- **offer\_local\_services**: *true | false* +- __offer\_local\_services__: *true | false* This option specifies whether local STUN/TURN services configured as ejabberd listeners should be announced automatically. Note that this will not include TLS-enabled services, which must be configured manually @@ -3101,7 +3100,7 @@ using the *services* option (see below). For non-anonymous TURN services, temporary credentials will be offered to the client. The default value is *true*. -- **secret**: *Text* +- __secret__: *Text* The secret used for generating temporary credentials. If this option isn’t specified, a secret will be auto-generated. However, a secret must be specified explicitly if non-anonymous TURN services running on other @@ -3111,7 +3110,7 @@ invalidates any credentials offered before the restart. Therefore, it’s recommended to explicitly specify a secret if clients cache retrieved credentials (for later use) across service restarts. -- **services**: *\[Service, ...\]* +- __services__: *\[Service, ...\]* The list of services offered to clients. This list can include STUN/TURN services running on any ejabberd node and/or external services. However, if any listed TURN service not running on the local ejabberd node @@ -3124,35 +3123,35 @@ Unless the *offer\_local\_services* is set to *false*, the explicitly listed services will be offered in addition to those announced automatically. - - **host**: *Host* +- __host__: *Host* The hostname or IP address the STUN/TURN service is listening on. For non-TLS services, it’s recommended to specify an IP address (to avoid additional DNS lookup latency on the client side). For TLS services, the hostname (or IP address) should match the certificate. Specifying the *host* option is mandatory. - - **port**: *1..65535* +- __port__: *1..65535* The port number the STUN/TURN service is listening on. The default port number is 3478 for non-TLS services and 5349 for TLS services. - - **restricted**: *true | false* +- __restricted__: *true | false* This option determines whether temporary credentials for accessing the service are offered. The default is *false* for STUN/STUNS services and *true* for TURN/TURNS services. - - **transport**: *tcp | udp* +- __transport__: *tcp | udp* The transport protocol supported by the service. The default is *udp* for non-TLS services and *tcp* for TLS services. - - **type**: *stun | turn | stuns | turns* +- __type__: *stun | turn | stuns | turns* The type of service. Must be *stun* or *turn* for non-TLS services, *stuns* or *turns* for TLS services. The default type is *stun*. - **Example**: + __Example__: services: - @@ -3207,55 +3206,55 @@ queried. __Available options:__ -- **allow\_return\_all**: *true | false* +- __allow\_return\_all__: *true | false* This option enables you to specify if search operations with empty input fields should return all users who added some information to their vCard. The default value is *false*. -- **cache\_life\_time**: *timeout()* +- __cache\_life\_time__: *timeout()* Same as top-level *cache\_life\_time* option, but applied to this module only. -- **cache\_missed**: *true | false* +- __cache\_missed__: *true | false* Same as top-level *cache\_missed* option, but applied to this module only. -- **cache\_size**: *pos\_integer() | infinity* +- __cache\_size__: *pos\_integer() | infinity* Same as top-level *cache\_size* option, but applied to this module only. -- **db\_type**: *mnesia | sql | ldap* +- __db\_type__: *mnesia | sql | ldap* Same as top-level *default\_db* option, but applied to this module only. -- **host** +- __host__ Deprecated. Use *hosts* instead. -- **hosts**: *\[Host, ...\]* +- __hosts__: *\[Host, ...\]* This option defines the Jabber IDs of the service. If the *hosts* option is not specified, the only Jabber ID will be the hostname of the virtual host with the prefix "vjud.". The keyword *@HOST@* is replaced with the real virtual host name. -- **matches**: *pos\_integer() | infinity* +- __matches__: *pos\_integer() | infinity* With this option, the number of reported search results can be limited. If the option’s value is set to *infinity*, all search results are reported. The default value is *30*. -- **name**: *Name* +- __name__: *Name* The value of the service name. This name is only visible in some clients that support [XEP-0030: Service Discovery](https://xmpp.org/extensions/xep-0030.html). The default is *vCard User Search*. -- **search**: *true | false* +- __search__: *true | false* This option specifies whether the search functionality is enabled or not. If disabled, the options *hosts*, *name* and *vcard* will be ignored and the Jabber User Directory service will not appear in the Service Discovery item list. The default value is *false*. -- **use\_cache**: *true | false* +- __use\_cache__: *true | false* Same as top-level *use\_cache* option, but applied to this module only. -- **vcard**: *vCard* +- __vcard__: *vCard* A custom vCard of the server that will be displayed by some XMPP clients in Service Discovery. The value of *vCard* is a YAML map constructed from an XML representation of vCard. Since the representation has no @@ -3282,37 +3281,37 @@ will be translated to: __Available options for *ldap* backend:__ -- **ldap\_backups** +- __ldap\_backups__ Same as top-level *ldap\_backups* option, but applied to this module only. -- **ldap\_base** +- __ldap\_base__ Same as top-level *ldap\_base* option, but applied to this module only. -- **ldap\_deref\_aliases** +- __ldap\_deref\_aliases__ Same as top-level *ldap\_deref\_aliases* option, but applied to this module only. -- **ldap\_encrypt** +- __ldap\_encrypt__ Same as top-level *ldap\_encrypt* option, but applied to this module only. -- **ldap\_filter** +- __ldap\_filter__ Same as top-level *ldap\_filter* option, but applied to this module only. -- **ldap\_password** +- __ldap\_password__ Same as top-level *ldap\_password* option, but applied to this module only. -- **ldap\_port** +- __ldap\_port__ Same as top-level *ldap\_port* option, but applied to this module only. -- **ldap\_rootdn** +- __ldap\_rootdn__ Same as top-level *ldap\_rootdn* option, but applied to this module only. -- **ldap\_search\_fields**: *{Name: Attribute, ...}* +- __ldap\_search\_fields__: *{Name: Attribute, ...}* This option defines the search form and the LDAP attributes to search within. *Name* is the name of a search form field which will be automatically translated by using the translation files (see @@ -3334,7 +3333,7 @@ The default is: "Organization Name": o "Organization Unit": ou -- **ldap\_search\_reported**: *{SearchField: VcardField}, ...}* +- __ldap\_search\_reported__: *{SearchField: VcardField}, ...}* This option defines which search fields should be reported. *SearchField* is the name of a search form field which will be automatically translated by using the translation files (see @@ -3355,30 +3354,30 @@ The default is: "Organization Name": ORGNAME "Organization Unit": ORGUNIT -- **ldap\_servers** +- __ldap\_servers__ Same as top-level *ldap\_servers* option, but applied to this module only. -- **ldap\_tls\_cacertfile** +- __ldap\_tls\_cacertfile__ Same as top-level *ldap\_tls\_cacertfile* option, but applied to this module only. -- **ldap\_tls\_certfile** +- __ldap\_tls\_certfile__ Same as top-level *ldap\_tls\_certfile* option, but applied to this module only. -- **ldap\_tls\_depth** +- __ldap\_tls\_depth__ Same as top-level *ldap\_tls\_depth* option, but applied to this module only. -- **ldap\_tls\_verify** +- __ldap\_tls\_verify__ Same as top-level *ldap\_tls\_verify* option, but applied to this module only. -- **ldap\_uids** +- __ldap\_uids__ Same as top-level *ldap\_uids* option, but applied to this module only. -- **ldap\_vcard\_map**: *{Name: {Pattern, LDAPattributes}, ...}* +- __ldap\_vcard\_map__: *{Name: {Pattern, LDAPattributes}, ...}* With this option you can set the table that maps LDAP attributes to vCard fields. *Name* is the type name of the vCard as defined in [RFC 2426](https://tools.ietf.org/html/rfc2426). *Pattern* is a string which @@ -3413,7 +3412,7 @@ The default is: __Available options for *mnesia* backend:__ -- **search\_all\_hosts**: *true | false* +- __search\_all\_hosts__: *true | false* Whether to perform search on all virtual hosts or not. The default value is *true*. @@ -3453,18 +3452,18 @@ The module depends on *mod\_vcard*. __Available options:__ -- **cache\_life\_time**: *timeout()* +- __cache\_life\_time__: *timeout()* Same as top-level *cache\_life\_time* option, but applied to this module only. -- **cache\_missed**: *true | false* +- __cache\_missed__: *true | false* Same as top-level *cache\_missed* option, but applied to this module only. -- **cache\_size**: *pos\_integer() | infinity* +- __cache\_size__: *pos\_integer() | infinity* Same as top-level *cache\_size* option, but applied to this module only. -- **use\_cache**: *true | false* +- __use\_cache__: *true | false* Same as top-level *use\_cache* option, but applied to this module only. mod\_version @@ -3476,7 +3475,6 @@ answers ejabberd’s version when queried. __Available options:__ -- **show\_os**: *true | false* +- __show\_os__: *true | false* Should the operating system be revealed or not. The default value is *true*. - diff --git a/content/archive/20_04/toplevel.md b/content/archive/20.04/toplevel.md similarity index 97% rename from content/archive/20_04/toplevel.md rename to content/archive/20.04/toplevel.md index b3c84481..631f7224 100644 --- a/content/archive/20_04/toplevel.md +++ b/content/archive/20.04/toplevel.md @@ -1,10 +1,9 @@ --- -title: Top-Level Options -toc: true -menu: Top-Level Options -order: 80 +search: + exclude: true --- +# Top-Level Options ## access\_rules @@ -55,59 +54,59 @@ from other parts of the configuration file, for example in *access\_rules* option. The rules of *ACLName* are represented by mapping *{ACLType: ACLValue}*. These can be one of the following: -- **ip**: *Network* +- **ip**: *Network* The rule matches any IP address from the *Network*. -- **node\_glob**: *Pattern* +- **node\_glob**: *Pattern* Same as *node\_regexp*, but matching is performed on a specified *Pattern* according to the rules used by the Unix shell. -- **node\_regexp**: *user\_regexp@server\_regexp* +- **node\_regexp**: *user\_regexp@server\_regexp* The rule matches any JID with node part matching regular expression *user\_regexp* and server part matching regular expression *server\_regexp*. -- **resource**: *Resource* +- **resource**: *Resource* The rule matches any JID with a resource *Resource*. -- **resource\_glob**: *Pattern* +- **resource\_glob**: *Pattern* Same as *resource\_regexp*, but matching is performed on a specified *Pattern* according to the rules used by the Unix shell. -- **resource\_regexp**: *Regexp* +- **resource\_regexp**: *Regexp* The rule matches any JID with a resource that matches regular expression *Regexp*. -- **server**: *Server* +- **server**: *Server* The rule matches any JID from server *Server*. The value of *Server* must be a valid hostname or an IP address. -- **server\_glob**: *Pattern* +- **server\_glob**: *Pattern* Same as *server\_regexp*, but matching is performed on a specified *Pattern* according to the rules used by the Unix shell. -- **server\_regexp**: *Regexp* +- **server\_regexp**: *Regexp* The rule matches any JID from the server that matches regular expression *Regexp*. -- **user**: *Username* +- **user**: *Username* If *Username* is in the form of "user@server", the rule matches a JID against this value. Otherwise, if *Username* is in the form of "user", the rule matches any JID that has *Username* in the node part as long as the server part of this JID is any virtual host served by ejabberd. -- **user\_glob**: *Pattern* +- **user\_glob**: *Pattern* Same as *user\_regexp*, but matching is performed on a specified *Pattern* according to the rules used by the Unix shell. -- **user\_regexp**: *Regexp* +- **user\_regexp**: *Regexp* If *Regexp* is in the form of "regexp@server", the rule matches any JID with node part matching regular expression "regexp" as long as the server part of this JID @@ -120,31 +119,31 @@ mapping *{ACLType: ACLValue}*. These can be one of the following: *Options* -[ACME](/admin/configuration/basic/#acme) configuration, to automatically obtain SSL +[ACME](../../admin/configuration/basic.md#acme) configuration, to automatically obtain SSL certificates for the domains served by ejabberd, which means that certificate requests and renewals are performed to some CA server (aka "ACME server") in a fully automated mode. The *Options* are: -- **auto**: *true | false* +- **auto**: *true | false* Whether to automatically request certificates for all configured domains (that yet have no a certificate) on server start or configuration reload. The default is *true*. -- **ca\_url**: *URL* +- **ca\_url**: *URL* The ACME directory URL used as an entry point for the ACME server. The default value is - the directory URL of Let’s Encrypt authority. -- **cert\_type**: *rsa | ec* +- **cert\_type**: *rsa | ec* A type of a certificate key. Available values are *ec* and *rsa* for EC and RSA certificates respectively. It’s better to have RSA certificates for the purpose of backward compatibility with legacy clients and servers, thus the default is *rsa*. -- **contact**: *\[Contact, ...\]* +- **contact**: *\[Contact, ...\]* A list of contact addresses (typically emails) where an ACME server will send notifications when problems occur. The value of *Contact* must be in the form of @@ -495,11 +494,11 @@ automatically distributed. The algorithm to deliver messages to the component(s) can be specified by this option. For any component connected as *Domain*, available *Options* are: -- **component\_number**: *2..1000* +- **component\_number**: *2..1000* The number of components to balance. -- **type**: *random | source | destination | bare\_source | +- **type**: *random | source | destination | bare\_source | bare\_destination* How to deliver stanzas to connected components: *random* - an instance is chosen at random; *destination* - an instance is chosen by the full JID of the packet’s *to* attribute; @@ -546,7 +545,7 @@ default value is: *"/oauth"*. *URL* Define the base URI when performing ReST requests. The default value is: -*"http://localhost/api"*. +*""*. ## extauth\_pool\_name @@ -621,13 +620,13 @@ Read additional configuration from *Filename*. If the value is provided in *{Filename: Options}* format, the *Options* must be one of the following: -- **allow\_only**: *\[OptionName, ...\]* +- **allow\_only**: *\[OptionName, ...\]* Allows only the usage of those options in the included file *Filename*. The options that do not match this criteria are not accepted. The default value is to include all options. -- **disallow**: *\[OptionName, ...\]* +- **disallow**: *\[OptionName, ...\]* Disallows the usage of those options in the included file *Filename*. The options that match this criteria are not accepted. The default value is an empty list. @@ -811,7 +810,7 @@ JID. For example, "%.org". If the value is in the form of *\[Options, ...\]* The option for listeners configuration. See the [Listen -Modules](/archive/20_04/listen/) section for details. +Modules](./listen.md/) section for details. ## log\_rotate\_count @@ -853,7 +852,7 @@ value is *10000*. *{Module: Options}* -The option for modules configuration. See [Modules](/archive/20_04/modules/) +The option for modules configuration. See [Modules](./modules.md/) section for details. ## negotiation\_timeout @@ -1551,4 +1550,3 @@ default value is *60* seconds. Amount of time without any communication after which the connection would be closed. The default value is *300* seconds. - diff --git a/content/archive/20_07/admin-api.md b/content/archive/20.07/admin-api.md similarity index 94% rename from content/archive/20_07/admin-api.md rename to content/archive/20.07/admin-api.md index 57968330..aa0ec2f7 100644 --- a/content/archive/20_07/admin-api.md +++ b/content/archive/20.07/admin-api.md @@ -1,17 +1,14 @@ --- -title: Administration API reference -toc: true -menu: Administration API -// Autogenerated with 'ejabberdctl gen_markdown_doc_for_commands' +search: + exclude: true --- +# API Reference ## add_rosteritem - Add an item to a user's roster (supports ODBC) - Group can be several groups separated by ; for example: "g1;g2;g3" __Arguments:__ @@ -30,7 +27,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/add_rosteritem { @@ -47,12 +43,8 @@ __Examples:__ "" ~~~ - - - ## backup - Store the database to backup file __Arguments:__ @@ -65,7 +57,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/backup { @@ -76,12 +67,8 @@ __Examples:__ "Success" ~~~ - - - ## ban_account - Ban an account: kick sessions and set random password __Arguments:__ @@ -96,7 +83,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/ban_account { @@ -109,12 +95,8 @@ __Examples:__ "" ~~~ - - - ## bookmarks_to_pep - Export private XML storage bookmarks to PEP __Arguments:__ @@ -128,7 +110,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/bookmarks_to_pep { @@ -140,12 +121,8 @@ __Examples:__ "Bookmarks exported" ~~~ - - - ## change_password - Change the password of an account __Arguments:__ @@ -160,7 +137,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/change_password { @@ -173,12 +149,8 @@ __Examples:__ "" ~~~ - - - ## change_room_option - Change an option in a MUC room __Arguments:__ @@ -194,7 +166,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/change_room_option { @@ -208,12 +179,8 @@ __Examples:__ "" ~~~ - - - ## check_account - Check if an account exists or not __Arguments:__ @@ -227,7 +194,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/check_account { @@ -239,12 +205,8 @@ __Examples:__ "" ~~~ - - - ## check_password - Check if a password is correct __Arguments:__ @@ -259,7 +221,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/check_password { @@ -272,15 +233,10 @@ __Examples:__ "" ~~~ - - - ## check_password_hash - Check if the password hash is correct - Allows hash methods from crypto application __Arguments:__ @@ -296,7 +252,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/check_password_hash { @@ -310,24 +265,18 @@ __Examples:__ "" ~~~ - - - ## clear_cache - Clear database cache on all nodes __Arguments:__ - __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Examples:__ - ~~~ json POST /api/clear_cache { @@ -338,12 +287,8 @@ __Examples:__ "" ~~~ - - - ## compile - Recompile and reload Erlang source code file __Arguments:__ @@ -356,7 +301,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/compile { @@ -367,24 +311,18 @@ __Examples:__ "" ~~~ - - - ## connected_users - List all established sessions __Arguments:__ - __Result:__ - *connected_users* :: [sessions::string] : List of users sessions __Examples:__ - ~~~ json POST /api/connected_users { @@ -398,24 +336,18 @@ __Examples:__ ] ~~~ - - - ## connected_users_info - List all established sessions and their information __Arguments:__ - __Result:__ - *connected_users_info* :: [{jid::string, connection::string, ip::string, port::integer, priority::integer, node::string, uptime::integer, status::string, resource::string, statustext::string}] __Examples:__ - ~~~ json POST /api/connected_users_info { @@ -439,24 +371,18 @@ __Examples:__ ] ~~~ - - - ## connected_users_number - Get the number of established sessions __Arguments:__ - __Result:__ - *num_sessions* :: integer __Examples:__ - ~~~ json POST /api/connected_users_number { @@ -467,12 +393,8 @@ __Examples:__ {"num_sessions": 2} ~~~ - - - ## connected_users_vhost - Get the list of established sessions in a vhost __Arguments:__ @@ -485,7 +407,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/connected_users_vhost { @@ -499,12 +420,8 @@ __Examples:__ ] ~~~ - - - ## convert_to_scram - Convert the passwords of users to SCRAM __Arguments:__ @@ -517,7 +434,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/convert_to_scram { @@ -528,12 +444,8 @@ __Examples:__ "" ~~~ - - - ## convert_to_yaml - Convert the input file from Erlang to YAML format __Arguments:__ @@ -547,7 +459,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/convert_to_yaml { @@ -559,12 +470,8 @@ __Examples:__ "" ~~~ - - - ## create_room - Create a MUC room name@service in host __Arguments:__ @@ -579,7 +486,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/create_room { @@ -592,12 +498,8 @@ __Examples:__ "" ~~~ - - - ## create_room_with_opts - Create a MUC room name@service in host with given options __Arguments:__ @@ -613,7 +515,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/create_room_with_opts { @@ -632,15 +533,10 @@ __Examples:__ "" ~~~ - - - ## create_rooms_file - Create the rooms indicated in file - Provide one room JID per line. Rooms will be created after restart. __Arguments:__ @@ -653,7 +549,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/create_rooms_file { @@ -664,24 +559,18 @@ __Examples:__ "" ~~~ - - - ## delete_expired_messages - Delete expired offline messages from database __Arguments:__ - __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Examples:__ - ~~~ json POST /api/delete_expired_messages { @@ -692,12 +581,8 @@ __Examples:__ "" ~~~ - - - ## delete_mnesia - Delete elements in Mnesia database for a given vhost __Arguments:__ @@ -710,7 +595,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/delete_mnesia { @@ -721,15 +605,10 @@ __Examples:__ "" ~~~ - - - ## delete_old_mam_messages - Delete MAM messages older than DAYS - Valid message TYPEs: "chat", "groupchat", "all". __Arguments:__ @@ -743,7 +622,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/delete_old_mam_messages { @@ -755,12 +633,8 @@ __Examples:__ "" ~~~ - - - ## delete_old_messages - Delete offline messages older than DAYS __Arguments:__ @@ -773,7 +647,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/delete_old_messages { @@ -784,12 +657,8 @@ __Examples:__ "" ~~~ - - - ## delete_old_push_sessions - Remove push sessions older than DAYS __Arguments:__ @@ -802,7 +671,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/delete_old_push_sessions { @@ -813,22 +681,16 @@ __Examples:__ "" ~~~ - - - ## delete_old_users - Delete users that didn't log in last days, or that never logged - To protect admin accounts, configure this for example: access_rules: protect_old_users: - allow: admin - deny: all - __Arguments:__ - *days* :: integer : Last login age in days of accounts that should be removed @@ -839,7 +701,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/delete_old_users { @@ -850,22 +711,16 @@ __Examples:__ "Deleted 2 users: ["oldman@myserver.com", "test@myserver.com"]" ~~~ - - - ## delete_old_users_vhost - Delete users that didn't log in last days in vhost, or that never logged - To protect admin accounts, configure this for example: access_rules: delete_old_users: - deny: admin - allow: all - __Arguments:__ - *host* :: string : Server name @@ -877,7 +732,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/delete_old_users_vhost { @@ -889,12 +743,8 @@ __Examples:__ "Deleted 2 users: ["oldman@myserver.com", "test@myserver.com"]" ~~~ - - - ## delete_rosteritem - Delete an item from a user's roster (supports ODBC) __Arguments:__ @@ -910,7 +760,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/delete_rosteritem { @@ -924,12 +773,8 @@ __Examples:__ "" ~~~ - - - ## destroy_room - Destroy a MUC room __Arguments:__ @@ -943,7 +788,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/destroy_room { @@ -955,15 +799,10 @@ __Examples:__ "" ~~~ - - - ## destroy_rooms_file - Destroy the rooms indicated in file - Provide one room JID per line. __Arguments:__ @@ -976,7 +815,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/destroy_rooms_file { @@ -987,12 +825,8 @@ __Examples:__ "" ~~~ - - - ## dump - Dump the database to a text file __Arguments:__ @@ -1005,7 +839,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/dump { @@ -1016,12 +849,8 @@ __Examples:__ "Success" ~~~ - - - ## dump_config - Dump configuration in YAML format as seen by ejabberd __Arguments:__ @@ -1034,7 +863,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/dump_config { @@ -1045,12 +873,8 @@ __Examples:__ "" ~~~ - - - ## dump_table - Dump a table to a text file __Arguments:__ @@ -1064,7 +888,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/dump_table { @@ -1076,15 +899,10 @@ __Examples:__ "Success" ~~~ - - - ## export2sql - Export virtual host information from Mnesia tables to SQL file - Configure the modules to use SQL, then call this command. __Arguments:__ @@ -1098,7 +916,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/export2sql { @@ -1110,12 +927,8 @@ __Examples:__ "" ~~~ - - - ## export_piefxis - Export data of all users in the server to PIEFXIS files (XEP-0227) __Arguments:__ @@ -1128,7 +941,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/export_piefxis { @@ -1139,12 +951,8 @@ __Examples:__ "" ~~~ - - - ## export_piefxis_host - Export data of users in a host to PIEFXIS files (XEP-0227) __Arguments:__ @@ -1158,7 +966,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/export_piefxis_host { @@ -1170,24 +977,18 @@ __Examples:__ "" ~~~ - - - ## gc - Force full garbage collection __Arguments:__ - __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Examples:__ - ~~~ json POST /api/gc { @@ -1198,12 +999,8 @@ __Examples:__ "" ~~~ - - - ## gen_html_doc_for_commands - Generates html documentation for ejabberd_commands __Arguments:__ @@ -1218,7 +1015,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/gen_html_doc_for_commands { @@ -1231,12 +1027,8 @@ __Examples:__ "" ~~~ - - - ## gen_markdown_doc_for_commands - Generates markdown documentation for ejabberd_commands __Arguments:__ @@ -1251,7 +1043,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/gen_markdown_doc_for_commands { @@ -1264,24 +1055,18 @@ __Examples:__ "" ~~~ - - - ## get_cookie - Get the Erlang cookie of this node __Arguments:__ - __Result:__ - *cookie* :: string : Erlang cookie used for authentication by ejabberd __Examples:__ - ~~~ json POST /api/get_cookie { @@ -1292,15 +1077,10 @@ __Examples:__ {"cookie": "MWTAVMODFELNLSMYXPPD"} ~~~ - - - ## get_last - Get last activity information - Timestamp is UTC and XEP-0082 format, for example: 2017-02-23T22:25:28.063062Z ONLINE __Arguments:__ @@ -1314,7 +1094,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/get_last { @@ -1329,24 +1108,18 @@ __Examples:__ } ~~~ - - - ## get_loglevel - Get the current loglevel __Arguments:__ - __Result:__ - *levelatom* :: string : Tuple with the log level number, its keyword and description __Examples:__ - ~~~ json POST /api/get_loglevel { @@ -1357,12 +1130,8 @@ __Examples:__ {"levelatom": "warning"} ~~~ - - - ## get_offline_count - Get the number of unread offline messages __Arguments:__ @@ -1376,7 +1145,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/get_offline_count { @@ -1388,23 +1156,19 @@ __Examples:__ {"value": 5} ~~~ - - - ## get_presence - Retrieve the resource with highest priority, and its presence (show and status message) for a given user. - The 'jid' value contains the user jid with resource. The 'show' value contains the user presence flag. It can take limited values: - - available - - chat (Free for chat) - - away - - dnd (Do not disturb) - - xa (Not available, extended away) - - unavailable (Not connected) + +- available +- chat (Free for chat) +- away +- dnd (Do not disturb) +- xa (Not available, extended away) +- unavailable (Not connected) 'status' is a free text defined by the user client. @@ -1419,7 +1183,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/get_presence { @@ -1435,12 +1198,8 @@ __Examples:__ } ~~~ - - - ## get_room_affiliation - Get affiliation of a user in MUC room __Arguments:__ @@ -1455,7 +1214,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/get_room_affiliation { @@ -1468,12 +1226,8 @@ __Examples:__ {"affiliation": "member"} ~~~ - - - ## get_room_affiliations - Get the list of affiliations of a MUC room __Arguments:__ @@ -1487,7 +1241,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/get_room_affiliations { @@ -1506,12 +1259,8 @@ __Examples:__ ] ~~~ - - - ## get_room_occupants - Get the list of occupants of a MUC room __Arguments:__ @@ -1525,7 +1274,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/get_room_occupants { @@ -1543,12 +1291,8 @@ __Examples:__ ] ~~~ - - - ## get_room_occupants_number - Get the number of occupants of a MUC room __Arguments:__ @@ -1562,7 +1306,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/get_room_occupants_number { @@ -1574,12 +1317,8 @@ __Examples:__ {"occupants": 7} ~~~ - - - ## get_room_options - Get options from a MUC room __Arguments:__ @@ -1593,7 +1332,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/get_room_options { @@ -1610,12 +1348,8 @@ __Examples:__ ] ~~~ - - - ## get_roster - Get roster of a local user __Arguments:__ @@ -1629,7 +1363,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/get_roster { @@ -1656,12 +1389,8 @@ __Examples:__ ] ~~~ - - - ## get_subscribers - List subscribers of a MUC conference __Arguments:__ @@ -1675,7 +1404,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/get_subscribers { @@ -1690,12 +1418,8 @@ __Examples:__ ] ~~~ - - - ## get_user_rooms - Get the list of rooms where this user is occupant __Arguments:__ @@ -1709,7 +1433,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/get_user_rooms { @@ -1724,24 +1447,19 @@ __Examples:__ ] ~~~ - - - ## get_vcard - Get content from a vCard field - Some vcard field names in get/set_vcard are: -* FN - Full Name -* NICKNAME - Nickname -* BDAY - Birthday -* TITLE - Work: Position -* ROLE - Work: Role +- FN - Full Name +- NICKNAME - Nickname +- BDAY - Birthday +- TITLE - Work: Position +- ROLE - Work: Role -For a full list of vCard fields check XEP-0054: vcard-temp at http://www.xmpp.org/extensions/xep-0054.html +For a full list of vCard fields check XEP-0054: vcard-temp at __Arguments:__ @@ -1755,7 +1473,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/get_vcard { @@ -1768,31 +1485,26 @@ __Examples:__ {"content": "User 1"} ~~~ - - - ## get_vcard2 - Get content from a vCard subfield - Some vcard field names and subnames in get/set_vcard2 are: -* N FAMILY - Family name -* N GIVEN - Given name -* N MIDDLE - Middle name -* ADR CTRY - Address: Country -* ADR LOCALITY - Address: City -* TEL HOME - Telephone: Home -* TEL CELL - Telephone: Cellphone -* TEL WORK - Telephone: Work -* TEL VOICE - Telephone: Voice -* EMAIL USERID - E-Mail Address -* ORG ORGNAME - Work: Company -* ORG ORGUNIT - Work: Department +- N FAMILY - Family name +- N GIVEN - Given name +- N MIDDLE - Middle name +- ADR CTRY - Address: Country +- ADR LOCALITY - Address: City +- TEL HOME - Telephone: Home +- TEL CELL - Telephone: Cellphone +- TEL WORK - Telephone: Work +- TEL VOICE - Telephone: Voice +- EMAIL USERID - E-Mail Address +- ORG ORGNAME - Work: Company +- ORG ORGUNIT - Work: Department -For a full list of vCard fields check XEP-0054: vcard-temp at http://www.xmpp.org/extensions/xep-0054.html +For a full list of vCard fields check XEP-0054: vcard-temp at __Arguments:__ @@ -1807,7 +1519,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/get_vcard2 { @@ -1821,31 +1532,26 @@ __Examples:__ {"content": "Schubert"} ~~~ - - - ## get_vcard2_multi - Get multiple contents from a vCard field - Some vcard field names and subnames in get/set_vcard2 are: -* N FAMILY - Family name -* N GIVEN - Given name -* N MIDDLE - Middle name -* ADR CTRY - Address: Country -* ADR LOCALITY - Address: City -* TEL HOME - Telephone: Home -* TEL CELL - Telephone: Cellphone -* TEL WORK - Telephone: Work -* TEL VOICE - Telephone: Voice -* EMAIL USERID - E-Mail Address -* ORG ORGNAME - Work: Company -* ORG ORGUNIT - Work: Department +- N FAMILY - Family name +- N GIVEN - Given name +- N MIDDLE - Middle name +- ADR CTRY - Address: Country +- ADR LOCALITY - Address: City +- TEL HOME - Telephone: Home +- TEL CELL - Telephone: Cellphone +- TEL WORK - Telephone: Work +- TEL VOICE - Telephone: Voice +- EMAIL USERID - E-Mail Address +- ORG ORGNAME - Work: Company +- ORG ORGUNIT - Work: Department -For a full list of vCard fields check XEP-0054: vcard-temp at http://www.xmpp.org/extensions/xep-0054.html +For a full list of vCard fields check XEP-0054: vcard-temp at __Arguments:__ @@ -1860,7 +1566,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/get_vcard2_multi { @@ -1877,12 +1582,8 @@ __Examples:__ ] ~~~ - - - ## import_dir - Import users data from jabberd14 spool dir __Arguments:__ @@ -1895,7 +1596,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/import_dir { @@ -1906,12 +1606,8 @@ __Examples:__ "Success" ~~~ - - - ## import_file - Import user data from jabberd14 spool file __Arguments:__ @@ -1924,7 +1620,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/import_file { @@ -1935,12 +1630,8 @@ __Examples:__ "Success" ~~~ - - - ## import_piefxis - Import users data from a PIEFXIS file (XEP-0227) __Arguments:__ @@ -1953,7 +1644,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/import_piefxis { @@ -1964,15 +1654,10 @@ __Examples:__ "" ~~~ - - - ## import_prosody - Import data from Prosody - Note: this method requires ejabberd compiled with optional tools support and package must provide optional luerl dependency. __Arguments:__ @@ -1985,7 +1670,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/import_prosody { @@ -1996,24 +1680,18 @@ __Examples:__ "" ~~~ - - - ## incoming_s2s_number - Number of incoming s2s connections on the node __Arguments:__ - __Result:__ - *s2s_incoming* :: integer __Examples:__ - ~~~ json POST /api/incoming_s2s_number { @@ -2024,12 +1702,8 @@ __Examples:__ {"s2s_incoming": 1} ~~~ - - - ## install_fallback - Install the database from a fallback file __Arguments:__ @@ -2042,7 +1716,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/install_fallback { @@ -2053,15 +1726,10 @@ __Examples:__ "Success" ~~~ - - - ## join_cluster - Join this node into the cluster handled by Node - This command works only with ejabberdctl, not mod_http_api or other code that runs inside the same ejabberd node that will be joined. __Arguments:__ @@ -2074,7 +1742,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/join_cluster { @@ -2085,12 +1752,8 @@ __Examples:__ "" ~~~ - - - ## kick_session - Kick a user session __Arguments:__ @@ -2106,7 +1769,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/kick_session { @@ -2120,12 +1782,8 @@ __Examples:__ "" ~~~ - - - ## kick_user - Disconnect user's active sessions __Arguments:__ @@ -2139,7 +1797,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/kick_user { @@ -2151,15 +1808,10 @@ __Examples:__ {"num_resources": 3} ~~~ - - - ## leave_cluster - Remove and shutdown Node from the running cluster - This command can be run from any running node of the cluster, even the node to be removed. In the removed node, this command works only when using ejabberdctl, not mod_http_api or other code that runs inside the same ejabberd node that will leave. __Arguments:__ @@ -2172,7 +1824,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/leave_cluster { @@ -2183,24 +1834,18 @@ __Examples:__ "" ~~~ - - - ## list_cluster - List nodes that are part of the cluster handled by Node __Arguments:__ - __Result:__ - *nodes* :: [node::string] __Examples:__ - ~~~ json POST /api/list_cluster { @@ -2214,12 +1859,8 @@ __Examples:__ ] ~~~ - - - ## load - Restore the database from a text file __Arguments:__ @@ -2232,7 +1873,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/load { @@ -2243,24 +1883,18 @@ __Examples:__ "Success" ~~~ - - - ## man - Generate Unix manpage for current ejabberd version __Arguments:__ - __Result:__ - *res* :: string : Raw result string __Examples:__ - ~~~ json POST /api/man { @@ -2271,12 +1905,8 @@ __Examples:__ "Success" ~~~ - - - ## mnesia_change_nodename - Change the erlang node name in a backup file __Arguments:__ @@ -2292,7 +1922,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/mnesia_change_nodename { @@ -2306,24 +1935,18 @@ __Examples:__ "Success" ~~~ - - - ## mnesia_info - Dump info on global Mnesia state __Arguments:__ - __Result:__ - *res* :: string __Examples:__ - ~~~ json POST /api/mnesia_info { @@ -2334,12 +1957,8 @@ __Examples:__ {"res": "aaaaa"} ~~~ - - - ## mnesia_table_info - Dump info on Mnesia table state __Arguments:__ @@ -2352,7 +1971,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/mnesia_table_info { @@ -2363,12 +1981,8 @@ __Examples:__ {"res": "aaaaa"} ~~~ - - - ## module_check - Check the contributed module repository compliance __Arguments:__ @@ -2381,7 +1995,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/module_check { @@ -2392,12 +2005,8 @@ __Examples:__ "" ~~~ - - - ## module_install - Compile, install and start an available contributed module __Arguments:__ @@ -2410,7 +2019,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/module_install { @@ -2421,12 +2029,8 @@ __Examples:__ "" ~~~ - - - ## module_uninstall - Uninstall a contributed module __Arguments:__ @@ -2439,7 +2043,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/module_uninstall { @@ -2450,15 +2053,10 @@ __Examples:__ "" ~~~ - - - ## module_upgrade - Upgrade the running code of an installed module - In practice, this uninstalls and installs the module __Arguments:__ @@ -2471,7 +2069,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/module_upgrade { @@ -2482,24 +2079,18 @@ __Examples:__ "" ~~~ - - - ## modules_available - List the contributed modules available to install __Arguments:__ - __Result:__ - *modules* :: [{name::string, summary::string}] : List of tuples with module name and description __Examples:__ - ~~~ json POST /api/modules_available { @@ -2513,24 +2104,18 @@ __Examples:__ } ~~~ - - - ## modules_installed - List the contributed modules already installed __Arguments:__ - __Result:__ - *modules* :: [{name::string, summary::string}] : List of tuples with module name and description __Examples:__ - ~~~ json POST /api/modules_installed { @@ -2544,27 +2129,20 @@ __Examples:__ } ~~~ - - - ## modules_update_specs - Update the module source code from Git - A connection to Internet is required __Arguments:__ - __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Examples:__ - ~~~ json POST /api/modules_update_specs { @@ -2575,12 +2153,8 @@ __Examples:__ "" ~~~ - - - ## muc_online_rooms - List existing rooms ('global' to get all vhosts) __Arguments:__ @@ -2593,7 +2167,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/muc_online_rooms { @@ -2607,12 +2180,8 @@ __Examples:__ ] ~~~ - - - ## muc_online_rooms_by_regex - List existing rooms ('global' to get all vhosts) by regex __Arguments:__ @@ -2626,7 +2195,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/muc_online_rooms_by_regex { @@ -2649,12 +2217,8 @@ __Examples:__ ] ~~~ - - - ## muc_register_nick - Register a nick to a User JID in a MUC service __Arguments:__ @@ -2669,7 +2233,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/muc_register_nick { @@ -2682,12 +2245,8 @@ __Examples:__ "" ~~~ - - - ## muc_unregister_nick - Unregister the nick registered by that account in the MUC service __Arguments:__ @@ -2701,7 +2260,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/muc_unregister_nick { @@ -2713,12 +2271,8 @@ __Examples:__ "" ~~~ - - - ## num_resources - Get the number of resources of a user __Arguments:__ @@ -2732,7 +2286,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/num_resources { @@ -2744,12 +2297,8 @@ __Examples:__ {"resources": 5} ~~~ - - - ## oauth_add_client_implicit - Add OAUTH client_id with implicit grant type __Arguments:__ @@ -2764,7 +2313,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/oauth_add_client_implicit { @@ -2777,12 +2325,8 @@ __Examples:__ "Success" ~~~ - - - ## oauth_add_client_password - Add OAUTH client_id with password grant type __Arguments:__ @@ -2797,7 +2341,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/oauth_add_client_password { @@ -2810,12 +2353,8 @@ __Examples:__ "Success" ~~~ - - - ## oauth_issue_token - Issue an oauth token for the given jid __Arguments:__ @@ -2830,7 +2369,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/oauth_issue_token { @@ -2847,27 +2385,20 @@ __Examples:__ } ~~~ - - - ## oauth_list_tokens - List oauth tokens, user, scope, and seconds to expire (only Mnesia) - List oauth tokens, their user and scope, and how many seconds remain until expirity __Arguments:__ - __Result:__ - *tokens* :: [{token::string, user::string, scope::string, expires_in::string}] __Examples:__ - ~~~ json POST /api/oauth_list_tokens { @@ -2891,12 +2422,8 @@ __Examples:__ ] ~~~ - - - ## oauth_remove_client - Remove OAUTH client_id __Arguments:__ @@ -2909,7 +2436,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/oauth_remove_client { @@ -2920,12 +2446,8 @@ __Examples:__ "Success" ~~~ - - - ## oauth_revoke_token - Revoke authorization for a token (only Mnesia) __Arguments:__ @@ -2938,7 +2460,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/oauth_revoke_token { @@ -2962,24 +2483,18 @@ __Examples:__ ] ~~~ - - - ## outgoing_s2s_number - Number of outgoing s2s connections on the node __Arguments:__ - __Result:__ - *s2s_outgoing* :: integer __Examples:__ - ~~~ json POST /api/outgoing_s2s_number { @@ -2990,12 +2505,8 @@ __Examples:__ {"s2s_outgoing": 1} ~~~ - - - ## privacy_set - Send a IQ set privacy stanza for a local account __Arguments:__ @@ -3010,7 +2521,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/privacy_set { @@ -3023,12 +2533,8 @@ __Examples:__ "" ~~~ - - - ## private_get - Get some information from a user private storage __Arguments:__ @@ -3044,7 +2550,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/private_get { @@ -3058,12 +2563,8 @@ __Examples:__ {"res": "aaaaa"} ~~~ - - - ## private_set - Set to the user private storage __Arguments:__ @@ -3078,7 +2579,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/private_set { @@ -3091,31 +2591,27 @@ __Examples:__ "" ~~~ - - - ## process_rosteritems - List/delete rosteritems that match filter - Explanation of each argument: - - action: what to do with each rosteritem that matches all the filtering options - - subs: subscription type - - asks: pending subscription - - users: the JIDs of the local user - - contacts: the JIDs of the contact in the roster - *** Mnesia: +- action: what to do with each rosteritem that matches all the filtering options +- subs: subscription type +- asks: pending subscription +- users: the JIDs of the local user +- contacts: the JIDs of the contact in the roster + + *** Mnesia: Allowed values in the arguments: ACTION = list | delete - SUBS = SUB[:SUB]* | any + SUBS = SUB[:SUB]*| any SUB = none | from | to | both ASKS = ASK[:ASK]* | any ASK = none | out | in - USERS = JID[:JID]* | any + USERS = JID[:JID]*| any CONTACTS = JID[:JID]* | any JID = characters valid in a JID, and can use the globs: *, ?, ! and [...] @@ -3149,7 +2645,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/process_rosteritems { @@ -3173,12 +2668,8 @@ __Examples:__ ] ~~~ - - - ## push_alltoall - Add all the users to all the users of Host in Group __Arguments:__ @@ -3192,7 +2683,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/push_alltoall { @@ -3204,15 +2694,10 @@ __Examples:__ "" ~~~ - - - ## push_roster - Push template roster from file to a user - The text file must contain an erlang term: a list of tuples with username, servername, group and nick. Example: [{<<"user1">>, <<"localhost">>, <<"Workers">>, <<"User 1">>}, {<<"user2">>, <<"localhost">>, <<"Workers">>, <<"User 2">>}]. @@ -3231,7 +2716,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/push_roster { @@ -3244,15 +2728,10 @@ __Examples:__ "" ~~~ - - - ## push_roster_all - Push template roster from file to all those users - The text file must contain an erlang term: a list of tuples with username, servername, group and nick. Example: [{"user1", "localhost", "Workers", "User 1"}, {"user2", "localhost", "Workers", "User 2"}]. @@ -3267,7 +2746,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/push_roster_all { @@ -3278,12 +2756,8 @@ __Examples:__ "" ~~~ - - - ## register - Register a user __Arguments:__ @@ -3298,7 +2772,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/register { @@ -3311,12 +2784,8 @@ __Examples:__ "Success" ~~~ - - - ## registered_users - List all registered users in HOST __Arguments:__ @@ -3329,7 +2798,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/registered_users { @@ -3343,24 +2811,18 @@ __Examples:__ ] ~~~ - - - ## registered_vhosts - List all registered vhosts in SERVER __Arguments:__ - __Result:__ - *vhosts* :: [vhost::string] : List of available vhosts __Examples:__ - ~~~ json POST /api/registered_vhosts { @@ -3374,24 +2836,18 @@ __Examples:__ ] ~~~ - - - ## reload_config - Reload config file in memory __Arguments:__ - __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Examples:__ - ~~~ json POST /api/reload_config { @@ -3402,12 +2858,8 @@ __Examples:__ "" ~~~ - - - ## remove_mam_for_user - Remove mam archive for user __Arguments:__ @@ -3421,7 +2873,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/remove_mam_for_user { @@ -3433,12 +2884,8 @@ __Examples:__ "MAM archive removed" ~~~ - - - ## remove_mam_for_user_with_peer - Remove mam archive for user with peer __Arguments:__ @@ -3453,7 +2900,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/remove_mam_for_user_with_peer { @@ -3466,24 +2912,18 @@ __Examples:__ "MAM archive removed" ~~~ - - - ## reopen_log - Reopen the log files __Arguments:__ - __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Examples:__ - ~~~ json POST /api/reopen_log { @@ -3494,12 +2934,8 @@ __Examples:__ "" ~~~ - - - ## resource_num - Resource string of a session number __Arguments:__ @@ -3514,7 +2950,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/resource_num { @@ -3525,26 +2960,20 @@ __Examples:__ HTTP/1.1 200 OK {"resource": "Psi"} -~~~ - - - +~~~ ## restart - Restart ejabberd gracefully __Arguments:__ - __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Examples:__ - ~~~ json POST /api/restart { @@ -3555,12 +2984,8 @@ __Examples:__ "" ~~~ - - - ## restart_module - Stop an ejabberd module, reload code and start __Arguments:__ @@ -3571,13 +2996,12 @@ __Arguments:__ __Result:__ - *res* :: integer : Returns integer code: - - 0: code reloaded, module restarted - - 1: error: module not loaded - - 2: code not reloaded, but module restarted +- 0: code reloaded, module restarted +- 1: error: module not loaded +- 2: code not reloaded, but module restarted __Examples:__ - ~~~ json POST /api/restart_module { @@ -3589,12 +3013,8 @@ __Examples:__ {"res": 0} ~~~ - - - ## restore - Restore the database from backup file __Arguments:__ @@ -3607,7 +3027,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/restore { @@ -3618,15 +3037,10 @@ __Examples:__ "Success" ~~~ - - - ## rooms_empty_destroy - Destroy the rooms that have no messages in archive - The MUC service argument can be 'global' to get all hosts. __Arguments:__ @@ -3639,7 +3053,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/rooms_empty_destroy { @@ -3653,15 +3066,10 @@ __Examples:__ ] ~~~ - - - ## rooms_empty_list - List the rooms that have no messages in archive - The MUC service argument can be 'global' to get all hosts. __Arguments:__ @@ -3674,7 +3082,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/rooms_empty_list { @@ -3688,15 +3095,10 @@ __Examples:__ ] ~~~ - - - ## rooms_unused_destroy - Destroy the rooms that are unused for many days in the service - The room recent history is used, so it's recommended to wait a few days after service start before running this. The MUC service argument can be 'global' to get all hosts. __Arguments:__ @@ -3710,7 +3112,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/rooms_unused_destroy { @@ -3725,15 +3126,10 @@ __Examples:__ ] ~~~ - - - ## rooms_unused_list - List the rooms that are unused for many days in the service - The room recent history is used, so it's recommended to wait a few days after service start before running this. The MUC service argument can be 'global' to get all hosts. __Arguments:__ @@ -3747,7 +3143,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/rooms_unused_list { @@ -3762,24 +3157,18 @@ __Examples:__ ] ~~~ - - - ## rotate_log - Rotate the log files __Arguments:__ - __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Examples:__ - ~~~ json POST /api/rotate_log { @@ -3790,16 +3179,11 @@ __Examples:__ "" ~~~ - - - ## send_direct_invitation - Send a direct invitation to several destinations - -Password and Message can also be: none. Users JIDs are separated with : +Password and Message can also be: none. Users JIDs are separated with : __Arguments:__ @@ -3815,7 +3199,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/send_direct_invitation { @@ -3830,15 +3213,10 @@ __Examples:__ "" ~~~ - - - ## send_message - Send a message to a local or remote bare of full JID - When sending a groupchat message to a MUC room, FROM must be the full JID of a room occupant, or the bare JID of a MUC service admin, or the bare JID of a MUC/Sub subscribed user. __Arguments:__ @@ -3855,7 +3233,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/send_message { @@ -3870,12 +3247,8 @@ __Examples:__ "" ~~~ - - - ## send_stanza - Send a stanza; provide From JID and valid To JID __Arguments:__ @@ -3890,7 +3263,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/send_stanza { @@ -3903,12 +3275,8 @@ __Examples:__ "" ~~~ - - - ## send_stanza_c2s - Send a stanza as if sent from a c2s session __Arguments:__ @@ -3924,7 +3292,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/send_stanza_c2s { @@ -3938,15 +3305,10 @@ __Examples:__ "" ~~~ - - - ## set_last - Set last activity information - Timestamp is the seconds since 1970-01-01 00:00:00 UTC, for example: date +%s __Arguments:__ @@ -3962,7 +3324,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/set_last { @@ -3976,12 +3337,8 @@ __Examples:__ "" ~~~ - - - ## set_loglevel - Set the loglevel __Arguments:__ @@ -3994,7 +3351,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/set_loglevel { @@ -4005,15 +3361,10 @@ __Examples:__ "" ~~~ - - - ## set_master - Set master node of the clustered Mnesia tables - If you provide as nodename "self", this node will be set as its own master. __Arguments:__ @@ -4026,7 +3377,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/set_master { @@ -4037,12 +3387,8 @@ __Examples:__ "Success" ~~~ - - - ## set_nickname - Set nickname in a user's vCard __Arguments:__ @@ -4057,7 +3403,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/set_nickname { @@ -4070,12 +3415,8 @@ __Examples:__ "" ~~~ - - - ## set_presence - Set presence of a session __Arguments:__ @@ -4094,7 +3435,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/set_presence { @@ -4111,12 +3451,8 @@ __Examples:__ "" ~~~ - - - ## set_room_affiliation - Change an affiliation in a MUC room __Arguments:__ @@ -4132,7 +3468,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/set_room_affiliation { @@ -4146,24 +3481,19 @@ __Examples:__ "" ~~~ - - - ## set_vcard - Set content in a vCard field - Some vcard field names in get/set_vcard are: -* FN - Full Name -* NICKNAME - Nickname -* BDAY - Birthday -* TITLE - Work: Position -* ROLE - Work: Role +- FN - Full Name +- NICKNAME - Nickname +- BDAY - Birthday +- TITLE - Work: Position +- ROLE - Work: Role -For a full list of vCard fields check XEP-0054: vcard-temp at http://www.xmpp.org/extensions/xep-0054.html +For a full list of vCard fields check XEP-0054: vcard-temp at __Arguments:__ @@ -4178,7 +3508,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/set_vcard { @@ -4192,31 +3521,26 @@ __Examples:__ "" ~~~ - - - ## set_vcard2 - Set content in a vCard subfield - Some vcard field names and subnames in get/set_vcard2 are: -* N FAMILY - Family name -* N GIVEN - Given name -* N MIDDLE - Middle name -* ADR CTRY - Address: Country -* ADR LOCALITY - Address: City -* TEL HOME - Telephone: Home -* TEL CELL - Telephone: Cellphone -* TEL WORK - Telephone: Work -* TEL VOICE - Telephone: Voice -* EMAIL USERID - E-Mail Address -* ORG ORGNAME - Work: Company -* ORG ORGUNIT - Work: Department +- N FAMILY - Family name +- N GIVEN - Given name +- N MIDDLE - Middle name +- ADR CTRY - Address: Country +- ADR LOCALITY - Address: City +- TEL HOME - Telephone: Home +- TEL CELL - Telephone: Cellphone +- TEL WORK - Telephone: Work +- TEL VOICE - Telephone: Voice +- EMAIL USERID - E-Mail Address +- ORG ORGNAME - Work: Company +- ORG ORGUNIT - Work: Department -For a full list of vCard fields check XEP-0054: vcard-temp at http://www.xmpp.org/extensions/xep-0054.html +For a full list of vCard fields check XEP-0054: vcard-temp at __Arguments:__ @@ -4232,7 +3556,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/set_vcard2 { @@ -4247,31 +3570,26 @@ __Examples:__ "" ~~~ - - - ## set_vcard2_multi - Set multiple contents in a vCard subfield - Some vcard field names and subnames in get/set_vcard2 are: -* N FAMILY - Family name -* N GIVEN - Given name -* N MIDDLE - Middle name -* ADR CTRY - Address: Country -* ADR LOCALITY - Address: City -* TEL HOME - Telephone: Home -* TEL CELL - Telephone: Cellphone -* TEL WORK - Telephone: Work -* TEL VOICE - Telephone: Voice -* EMAIL USERID - E-Mail Address -* ORG ORGNAME - Work: Company -* ORG ORGUNIT - Work: Department +- N FAMILY - Family name +- N GIVEN - Given name +- N MIDDLE - Middle name +- ADR CTRY - Address: Country +- ADR LOCALITY - Address: City +- TEL HOME - Telephone: Home +- TEL CELL - Telephone: Cellphone +- TEL WORK - Telephone: Work +- TEL VOICE - Telephone: Voice +- EMAIL USERID - E-Mail Address +- ORG ORGNAME - Work: Company +- ORG ORGUNIT - Work: Department -For a full list of vCard fields check XEP-0054: vcard-temp at http://www.xmpp.org/extensions/xep-0054.html +For a full list of vCard fields check XEP-0054: vcard-temp at __Arguments:__ @@ -4287,7 +3605,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/set_vcard2_multi { @@ -4305,15 +3622,10 @@ __Examples:__ "" ~~~ - - - ## srg_create - Create a Shared Roster Group - If you want to specify several group identifiers in the Display argument, put \ " around the argument and separate the identifiers with \ \ n @@ -4334,7 +3646,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/srg_create { @@ -4349,12 +3660,8 @@ __Examples:__ "" ~~~ - - - ## srg_delete - Delete a Shared Roster Group __Arguments:__ @@ -4368,7 +3675,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/srg_delete { @@ -4380,12 +3686,8 @@ __Examples:__ "" ~~~ - - - ## srg_get_info - Get info of a Shared Roster Group __Arguments:__ @@ -4399,7 +3701,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/srg_get_info { @@ -4420,12 +3721,8 @@ __Examples:__ ] ~~~ - - - ## srg_get_members - Get members of a Shared Roster Group __Arguments:__ @@ -4439,7 +3736,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/srg_get_members { @@ -4454,12 +3750,8 @@ __Examples:__ ] ~~~ - - - ## srg_list - List the Shared Roster Groups in Host __Arguments:__ @@ -4472,7 +3764,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/srg_list { @@ -4486,12 +3777,8 @@ __Examples:__ ] ~~~ - - - ## srg_user_add - Add the JID user@host to the Shared Roster Group __Arguments:__ @@ -4507,7 +3794,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/srg_user_add { @@ -4521,12 +3807,8 @@ __Examples:__ "" ~~~ - - - ## srg_user_del - Delete this JID user@host from the Shared Roster Group __Arguments:__ @@ -4542,7 +3824,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/srg_user_del { @@ -4556,12 +3837,8 @@ __Examples:__ "" ~~~ - - - ## stats - Get statistical value: registeredusers onlineusers onlineusersnode uptimeseconds processes __Arguments:__ @@ -4574,7 +3851,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/stats { @@ -4585,12 +3861,8 @@ __Examples:__ {"stat": 6} ~~~ - - - ## stats_host - Get statistical value for this host: registeredusers onlineusers __Arguments:__ @@ -4604,7 +3876,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/stats_host { @@ -4616,24 +3887,18 @@ __Examples:__ {"stat": 6} ~~~ - - - ## status - Get status of the ejabberd server __Arguments:__ - __Result:__ - *res* :: string : Raw result string __Examples:__ - ~~~ json POST /api/status { @@ -4644,12 +3909,8 @@ __Examples:__ "The node ejabberd@localhost is started with status: startedejabberd X.X is running in that node" ~~~ - - - ## status_list - List of logged users with this status __Arguments:__ @@ -4662,7 +3923,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/status_list { @@ -4681,12 +3941,8 @@ __Examples:__ ] ~~~ - - - ## status_list_host - List of users logged in host with their statuses __Arguments:__ @@ -4700,7 +3956,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/status_list_host { @@ -4720,12 +3975,8 @@ __Examples:__ ] ~~~ - - - ## status_num - Number of logged users with this status __Arguments:__ @@ -4738,7 +3989,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/status_num { @@ -4749,12 +3999,8 @@ __Examples:__ {"users": 23} ~~~ - - - ## status_num_host - Number of logged users with this status in host __Arguments:__ @@ -4768,7 +4014,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/status_num_host { @@ -4780,24 +4025,18 @@ __Examples:__ {"users": 23} ~~~ - - - ## stop - Stop ejabberd gracefully __Arguments:__ - __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Examples:__ - ~~~ json POST /api/stop { @@ -4808,16 +4047,11 @@ __Examples:__ "" ~~~ - - - ## stop_kindly - Inform users and rooms, wait, and stop the server - -Provide the delay in seconds, and the announcement quoted, for example: +Provide the delay in seconds, and the announcement quoted, for example: ejabberdctl stop_kindly 60 \"The server will stop in one minute.\" __Arguments:__ @@ -4831,7 +4065,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/stop_kindly { @@ -4843,24 +4076,18 @@ __Examples:__ "" ~~~ - - - ## stop_s2s_connections - Stop all s2s outgoing and incoming connections __Arguments:__ - __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Examples:__ - ~~~ json POST /api/stop_s2s_connections { @@ -4871,12 +4098,8 @@ __Examples:__ "" ~~~ - - - ## subscribe_room - Subscribe to a MUC conference __Arguments:__ @@ -4892,7 +4115,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/subscribe_room { @@ -4909,15 +4131,10 @@ __Examples:__ ] ~~~ - - - ## unban_ip - Remove banned IP addresses from the fail2ban table - Accepts an IP address with a network mask. Returns the number of unbanned addresses, or a negative integer if there were any error. __Arguments:__ @@ -4930,7 +4147,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/unban_ip { @@ -4941,12 +4157,8 @@ __Examples:__ {"unbanned": 3} ~~~ - - - ## unregister - Unregister a user __Arguments:__ @@ -4960,7 +4172,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/unregister { @@ -4972,12 +4183,8 @@ __Examples:__ "Success" ~~~ - - - ## unsubscribe_room - Unsubscribe from a MUC conference __Arguments:__ @@ -4991,7 +4198,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/unsubscribe_room { @@ -5003,12 +4209,8 @@ __Examples:__ "" ~~~ - - - ## update - Update the given module, or use the keyword: all __Arguments:__ @@ -5021,7 +4223,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/update { @@ -5032,24 +4233,18 @@ __Examples:__ "Success" ~~~ - - - ## update_list - List modified modules that can be updated __Arguments:__ - __Result:__ - *modules* :: [module::string] __Examples:__ - ~~~ json POST /api/update_list { @@ -5063,24 +4258,18 @@ __Examples:__ ] ~~~ - - - ## update_sql - Convert SQL DB to the new format __Arguments:__ - __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Examples:__ - ~~~ json POST /api/update_sql { @@ -5091,12 +4280,8 @@ __Examples:__ "" ~~~ - - - ## user_resources - List user's connected resources __Arguments:__ @@ -5110,7 +4295,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/user_resources { @@ -5126,12 +4310,8 @@ __Examples:__ ] ~~~ - - - ## user_sessions_info - Get information about all sessions of a user __Arguments:__ @@ -5145,7 +4325,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/user_sessions_info { @@ -5168,5 +4347,3 @@ __Examples:__ } ] ~~~ - - diff --git a/content/archive/20_07/index.md b/content/archive/20.07/index.md similarity index 60% rename from content/archive/20_07/index.md rename to content/archive/20.07/index.md index 2b9e934d..07d91016 100644 --- a/content/archive/20_07/index.md +++ b/content/archive/20.07/index.md @@ -1,15 +1,10 @@ ---- -title: Archived Documentation for 20.07 -menu: 20.07 -order: 7992 ---- +# Archived Documentation for 20.07 This section contains some archived sections for ejabberd 20.07. If you are upgrading ejabberd from a previous release, you can check: -* [Specific version upgrade notes](/admin/upgrade/#specific-version-upgrade-notes) +* [Specific version upgrade notes](../../admin/upgrade/index.md#specific_version_upgrade_notes) * [ejabberd 20.07 release announcement](https://www.process-one.net/blog/ejabberd-20-07/) -* [Docs Github Compare from 20.04](https://github.com/processone/docs.ejabberd.im/compare/20.04...20.07) -* [ejabberd Github Compare from 20.04](https://github.com/processone/ejabberd/compare/20.04...20.07) - +* [Docs Github Compare from 20.04](https://github.com/processone/docs.ejabberd.im/compare/20.04..20.07) +* [ejabberd Github Compare from 20.04](https://github.com/processone/ejabberd/compare/20.04..20.07) diff --git a/content/archive/20.07/listen-options.md b/content/archive/20.07/listen-options.md new file mode 100644 index 00000000..75abcc47 --- /dev/null +++ b/content/archive/20.07/listen-options.md @@ -0,0 +1,332 @@ +--- +search: + exclude: true +--- + +# Listen Options + +This is a detailed description of each option allowed by the listening +modules: + +## access + +*AccessName* + +This option defines access to the port. The default value is `all`. + +## backlog + +*Value* + +The backlog value defines the maximum length that the queue of + pending connections may grow to. This should be increased if the + server is going to handle lots of new incoming connections as they + may be dropped if there is no space in the queue (and ejabberd was + not able to accept them immediately). Default value is 5. + +## cafile + +*Path* + +Path to a file of CA root certificates. +The default is to use system defined file if possible. + +## certfile + +*Path* + +Path to the certificate file. +Only makes sense when the [`tls`](#tls) +options is set. +If this option is not set, you should set the +[`certfiles`](toplevel.md#certfiles) top-level option +or configure [ACME](../../admin/configuration/basic.md#acme). + +## check_from + +*true | false* + +This option can be used with +[`ejabberd_service`](listen.md#ejabberd_service) only. + [`XEP-0114`](http://xmpp.org/extensions/xep-0114.html) requires that + the domain must match the hostname of the component. If this option + is set to `false`, `ejabberd` will allow the component to send + stanzas with any arbitrary domain in the ’from’ attribute. Only use + this option if you are completely sure about it. The default value + is `true`, to be compliant with + [`XEP-0114`](http://xmpp.org/extensions/xep-0114.html). + +## ciphers + +*Ciphers* + +OpenSSL ciphers list in the same format accepted by + ‘`openssl ciphers`’ command. + +## custom_headers + +*{Name: Value}* + +Specify additional HTTP headers to be included in all HTTP responses. +Default value is: `[]` + +## default_host + +*undefined | HostName* + +If the HTTP request received by ejabberd contains the HTTP header + `Host` with an ambiguous virtual host that doesn’t match any one + defined in ejabberd (see + [Host Names](../../admin/configuration/basic.md#host_names)), + then this configured HostName + is set as the request Host. The default value of this option is: + `undefined`. + +## dhfile + +*Path* + +Full path to a file containing custom parameters for Diffie-Hellman key + exchange. Such a file could be created with the command + `openssl dhparam -out dh.pem 2048`. If this option is not specified, + default parameters will be used, which might not provide the same level + of security as using custom parameters. + +## global_routes + +*true | false* + +This option emulates legacy behaviour which registers all routes +defined in [`hosts`](toplevel.md#hosts) +on a component connected. This behaviour +is considered harmful in the case when it's desired to multiplex +different components on the same port, so, to disable it, +set `global_routes` to `false`. + +The default value is `true`, +e.g. legacy behaviour is emulated: the only reason for this is +to maintain backward compatibility with existing deployments. + +## hosts + +*{Hostname: [HostOption, ...]}* + +The external Jabber component that connects to this +[`ejabberd_service`](listen.md#ejabberd_service) +can serve one or more hostnames. As `HostOption` + you can define options for the component; currently the only allowed + option is the password required to the component when attempt to + connect to ejabberd: `password: Secret`. Note that you + cannot define in a single `ejabberd_service` components of different + services: add an `ejabberd_service` for each service, as seen in an + example below. This option may not be necessary if the component + already provides the host in its packets; in that case, you can simply + provide the password option that will be used for all the hosts + (see port 5236 definition in the example below). + +## max_fsm_queue + +*Size* + +This option specifies the maximum number of elements in the queue of + the FSM (Finite State Machine). Roughly speaking, each message in + such queues represents one XML stanza queued to be sent into its + relevant outgoing stream. If queue size reaches the limit (because, + for example, the receiver of stanzas is too slow), the FSM and the + corresponding connection (if any) will be terminated and error + message will be logged. The reasonable value for this option depends + on your hardware configuration. This option can be specified for + [`ejabberd_service`](listen.md#ejabberd_service) + and [`ejabberd_c2s`](listen.md#ejabberd_c2s) + listeners, or also globally for + [`ejabberd_s2s_out`](listen.md#ejabberd_s2s-out). + If the option is not specified for + `ejabberd_service` or `ejabberd_c2s` listeners, the globally + configured value is used. The allowed values are integers and + ’undefined’. Default value: ’10000’. + +## max_payload_size + +*Size* + +Specify the maximum payload size in bytes. +It can be either an integer or the word `infinity`. +The default value is `infinity`. + +## max_stanza_size + +*Size* + +This option specifies an approximate maximum size in bytes of XML + stanzas. Approximate, because it is calculated with the precision of + one block of read data. For example `{max_stanza_size, 65536}`. The + default value is `infinity`. Recommended values are 65536 for c2s + connections and 131072 for s2s connections. s2s max stanza size must + always much higher than c2s limit. Change this value with extreme + care as it can cause unwanted disconnect if set too low. + +## password + +*Secret* + +Specify the password to verify an external component that connects to the port. + +## port + +* Port number, or unix domain socket path* + +Declares at which port/unix domain socket should be listening. + +Can be set to number between `1` and `65535` to listen on TCP or UDP socket, +or can be set to string in form`"unix:/path/to/socket"` to create and listen +on unix domain socket `/path/to/socket`. + +## protocol_options + +*ProtocolOpts* + +List of general options relating to SSL/TLS. These map to + [`OpenSSL’s set_options()`](https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_options.html). + The default entry is: `"no_sslv3|cipher_server_preference|no_compression"` + +## request_handlers + +*{Path: Module}* + +To define one or several handlers that will serve HTTP requests in +[`ejabberd_http`](listen.md#ejabberd_http). The + Path is a string; so the URIs that start with that Path will be + served by Module. For example, if you want `mod_foo` to serve the + URIs that start with `/a/b/`, and you also want `mod_bosh` to + serve the URIs `/bosh/`, use this option: + + request_handlers: + /a/b: mod_foo + /bosh: mod_bosh + /mqtt: mod_mqtt + +## shaper + +*none | ShaperName* + +This option defines a shaper for the port (see section +[Shapers](../../admin/configuration/basic.md#shapers)). + The default value is `none`. + +## shaper_rule + +*none | ShaperRule* + +This option defines a shaper rule for +[`ejabberd_service`](listen.md#ejabberd_service) (see +section [Shapers](../../admin/configuration/basic.md#shapers)). +The recommended value is `fast`. + +## starttls + +*true | false* + +This option specifies that STARTTLS encryption is available on +connections to the port. You should also set the +[`certfiles`](toplevel.md#certfiles) top-level option +or configure [ACME](../../admin/configuration/basic.md#acme). + +## starttls_required + +*true | false* + +This option specifies that STARTTLS encryption is required on +connections to the port. No unencrypted connections will be allowed. +You should also set the +[`certfiles`](toplevel.md#certfiles) top-level option +or configure [ACME](../../admin/configuration/basic.md#acme). + +## tag + +*String* + +Allow specifying a tag in a `listen` section +and later use it to have a special +[`api_permissions`](toplevel.md#api_permissions) +just for it. + +For example: + + listen: + - + port: 4000 + module: ejabberd_http + tag: "magic_listener" + + api_permissions: + "magic_access": + from: + - tag: "magic_listener" + who: all + what: "*" + +The default value is the empty string: `""`. + +## timeout + +*Integer* + +Timeout of the connections, expressed in milliseconds. Default: 5000 + +## tls + +*true | false* + +This option specifies that traffic on the port will be encrypted + using SSL immediately after connecting. This was the traditional + encryption method in the early Jabber software, commonly on port + 5223 for client-to-server communications. But this method is + nowadays deprecated and not recommended. The preferable encryption + method is STARTTLS on port 5222, as defined + [`RFC 6120: XMPP Core`](http://xmpp.org/rfcs/rfc6120.html#tls), + which can be enabled in `ejabberd` with the option + [`starttls`](#starttls). + +If this option is set, you should also set the + [`certfiles`](toplevel.md#certfiles) top-level + option or configure [ACME](../../admin/configuration/basic.md#acme). + +The option `tls` can also be used in + [`ejabberd_http`](listen.md#ejabberd_http) + to support HTTPS. + +## tls_compression + +*true | false* + +Whether to enable or disable TLS compression. The default value is + `false`. + +## tls_verify + +*false | true* + +This option specifies whether to verify the certificate or not when TLS is enabled. + +The default value is `false`, which means no checks are performed. + +The certificate will be checked against trusted CA roots, either defined at the operation system level or defined in the + listener [`cafile`](#cafile). If trusted, it will accept the jid that is embedded in the certificate in the + `subjectAltName` field of that certificate. + +## use_proxy_protocol + +*true | false* + +Is this listener accessed by proxy service that is using + proxy protocol for supplying real IP addresses to ejabberd server. You can read about this protocol + in [Proxy protocol specification](http://www.haproxy.org/download/1.8/doc/proxy-protocol.txt). + The default value of this option is`false`. + +## zlib + +*true | false* + +This option specifies that Zlib stream compression (as defined in + [`XEP-0138`](http://xmpp.org/extensions/xep-0138.html)) is available + on connections to the port. diff --git a/content/archive/20.07/listen.md b/content/archive/20.07/listen.md new file mode 100644 index 00000000..c938eb74 --- /dev/null +++ b/content/archive/20.07/listen.md @@ -0,0 +1,796 @@ +--- +search: + exclude: true +--- + +--- +title: Listen Modules +--- + +# Listen Option + +The **listen option** defines for which ports, addresses and network +protocols `ejabberd` will listen and what services will be run on them. +Each element of the list is an associative array with the following +elements: + +- Port number. Optionally also the IP address and/or a transport + protocol. + +- Listening module that serves this port. + +- Options for the TCP socket and for the listening module. + +For example: + +``` yaml + listen: + - + port: 5222 + module: ejabberd_c2s + ip: 127.0.0.1 + starttls: true + - + port: 5269 + module: ejabberd_s2s_in + transport: tcp +``` + +The **port number** defines which port to listen for incoming connections. +It can be a Jabber/XMPP standard port or any other valid port number. + +The **IP address** can be represented as a string. The socket will listen +only in that network interface. It is possible to specify a generic +address ("0.0.0.0" for IPv4 or "::" for IPv6), so `ejabberd` will listen +in all addresses. Depending on the type of the IP address, IPv4 or IPv6 +will be used. When the IP address is not specified, it will listen on +all IPv4 network addresses. + +Note that on some operating systems and/or OS configurations, listening +on "::" will mean listening for IPv4 traffic as well as IPv6 traffic. + +Some example values for IP address: + +- `"0.0.0.0"` to listen in all IPv4 network interfaces. This is the + default value when no IP is specified. + +- `"::"` to listen in all IPv6 network interfaces + +- `"10.11.12.13"` is the IPv4 address `10.11.12.13` + +- `"::FFFF:127.0.0.1"` is the IPv6 address `::FFFF:127.0.0.1/128` + +The **transport protocol** can be `tcp` or `udp`. Default is `tcp`. + +# Summary of Listen Modules + +The available modules, their purpose and the options allowed by each one +are: + +## ejabberd_c2s + +Handles c2s connections. + +Options: +[access](listen-options.md#access), +[cafile](listen-options.md#cafile), +[ciphers](listen-options.md#ciphers), +[dhfile](listen-options.md#dhfile), +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_stanza_size](listen-options.md#max_stanza_size), +[protocol_options](listen-options.md#protocol_options), +[shaper](listen-options.md#shaper), +[starttls](listen-options.md#starttls), +[starttls_required](listen-options.md#starttls_required), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls-compression), +[tls_verify](listen-options.md#tls_verify), +[zlib](listen-options.md#zlib). + +## ejabberd_s2s_in + +Handles incoming s2s connections. + +Options: +[cafile](listen-options.md#cafile), +[ciphers](listen-options.md#ciphers), +[dhfile](listen-options.md#dhfile), +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_stanza_size](listen-options.md#max_stanza_size), +[protocol_options](listen-options.md#protocol_options), +[shaper](listen-options.md#shaper), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls-compression). + +## ejabberd_service + +Interacts with an + [`external component`](http://www.ejabberd.im/tutorials-transports) + (as defined in the Jabber Component Protocol + ([`XEP-0114`](http://xmpp.org/extensions/xep-0114.html)). + +Options: +[access](listen-options.md#access), +[cafile](listen-options.md#cafile), +[certfile](listen-options.md#certfile), +[check_from](listen-options.md#check_from), +[ciphers](listen-options.md#ciphers), +[dhfile](listen-options.md#dhfile), +[global_routes](listen-options.md#global_routes), +[hosts](listen-options.md#hosts), +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_stanza_size](listen-options.md#max_stanza_size), +[password](listen-options.md#password), +[protocol_options](listen-options.md#protocol_options), +[shaper](listen-options.md#shaper), +[shaper_rule](listen-options.md#shaper-rule), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls-compression). + +## ejabberd_sip + +Handles SIP requests as defined in + [`RFC 3261`](http://tools.ietf.org/html/rfc3261). + +For details please check the +[ejabberd_sip](listen.md#ejabberd_sip_1) +and [mod_sip](modules.md#mod_sip) sections. + +General listener options: +[certfile](listen-options.md#certfile), +[tls](listen-options.md#tls). + +## ejabberd_stun + +Handles STUN/TURN requests as defined in + [`RFC 5389`](http://tools.ietf.org/html/rfc5389) and + [`RFC 5766`](http://tools.ietf.org/html/rfc5766). + +For the specific module options, please check the +[ejabberd_stun](listen.md#ejabberd_stun_1) section: +`auth_realm`, +`auth_type`, +`server_name`, +`turn_ip`, +`turn_max_allocations`, +`turn_max_permissions`, +`turn_max_port`, +`turn_min_port`, +`use_turn`. + +General listener options: +[certfile](listen-options.md#certfile), +[shaper](listen-options.md#shaper), +[tls](listen-options.md#tls), + +## ejabberd_http + +Handles incoming HTTP connections. + +With the proper request handlers configured, this serves HTTP services like +[ACME](../../admin/configuration/basic.md#acme), +[API](modules.md#mod_http_api), +[BOSH](modules.md#mod_bosh), +[CAPTCHA](../../admin/configuration/basic.md#captcha), +[Fileserver](modules.md#mod_http_fileserver), +[OAuth](../../developer/ejabberd-api/oauth.md), +[Upload](modules.md#mod_http_upload), +[WebAdmin](../../admin/guide/managing.md#web_admin), +[WebSocket](listen.md#ejabberd_http_ws), +[XMP-RPC](listen.md#ejabberd_xmlrpc). + +Options: +[cafile](listen-options.md#cafile), +[ciphers](listen-options.md#ciphers), +[custom_headers](listen-options.md#custom_headers), +[default_host](listen-options.md#default_host), +[dhfile](listen-options.md#dhfile), +[protocol_options](listen-options.md#protocol_options), +[request_handlers](listen-options.md#request_handlers), +[tag](listen-options.md#tag), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls-compression), +and the [trusted_proxies](toplevel.md#trusted_proxies) top-level option. + +## mod_mqtt + +Support for MQTT requires configuring `mod_mqtt` both in the +[listen](toplevel.md#listen) and the +[modules](toplevel.md#modules) sections. +Check the [mod_mqtt modules options](modules.md#mod_mqtt). +Check the advanded documentation in [MQTT Support](../../admin/guide/mqtt/index.md). + +Listen options: +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_payload_size](listen-options.md#max_payload_size), +[tls](listen-options.md#tls), +[tls_verify](listen-options.md#tls_verify). + +# ejabberd_stun + +`ejabberd` is able to act as a stand-alone STUN/TURN server +([`RFC 5389`](http://tools.ietf.org/html/rfc5389)/[`RFC 5766`](http://tools.ietf.org/html/rfc5766). +In that role `ejabberd` helps clients with ICE +([`RFC 5245`](http://tools.ietf.org/html/rfc5245) or Jingle ICE +([`XEP-0176`](http://xmpp.org/extensions/xep-0176.html) support to +discover their external addresses and ports and to relay media traffic +when it is impossible to establish direct peer-to-peer connection. + +The specific configurable options are: + +**`tls: true|false`**: If enabled, `certfile` option must be set, otherwise `ejabberd` will + not be able to accept TLS connections. Obviously, this option makes + sense for `tcp` transport only. The default is `false`. + +**`certfile: Path`**: Path to the certificate file. Only makes sense when `tls` is set. + +**`use_turn: true|false`**: Enables/disables TURN (media relay) functionality. The default is + `false`. + +**`turn_ip: String`**: The IPv4 address advertised by your TURN server. The address should + not be NAT’ed or firewalled. There is not default, so you should set + this option explicitly. Implies `use_turn`. + +**`turn_min_port: Integer`**: Together with `turn_max_port` forms port range to allocate from. The + default is 49152. Implies `use_turn`. + +**`turn_max_port: Integer`**: Together with `turn_min_port` forms port range to allocate from. The + default is 65535. Implies `use_turn`. + +**`turn_max_allocations: Integer|infinity`**: Maximum number of TURN allocations available from the particular IP + address. The default value is 10. Implies `use_turn`. + +**`turn_max_permissions: Integer|infinity`**: Maximum number of TURN permissions available from the particular IP + address. The default value is 10. Implies `use_turn`. + +**`auth_type: user|anonymous`**: Which authentication type to use for TURN allocation requests. When + type `user` is set, ejabberd authentication backend is used. For + `anonymous` type no authentication is performed (not recommended for + public services). The default is `user`. Implies `use_turn`. + +**`auth_realm: String`**: When `auth_type` is set to `user` and you have several virtual hosts + configured you should set this option explicitly to the virtual host + you want to serve on this particular listening port. Implies + `use_turn`. + +**`shaper: Atom`**: For `tcp` transports defines shaper to use. The default is `none`. + +**`server_name: String`**: Defines software version to return with every response. The default + is the STUN library version. + +Example configuration with disabled TURN functionality (STUN only): + +``` yaml + listen: + ... + - + port: 3478 + transport: udp + module: ejabberd_stun + - + port: 3478 + module: ejabberd_stun + - + port: 5349 + module: ejabberd_stun + certfile: /etc/ejabberd/server.pem + ... +``` + +Example configuration with TURN functionality. Note that STUN is always +enabled if TURN is enabled. Here, only UDP section is shown: + +``` yaml + listen: + ... + - + port: 3478 + transport: udp + use_turn: true + turn_ip: 10.20.30.1 + module: ejabberd_stun + ... +``` + +You also need to configure DNS SRV records properly so clients can +easily discover a STUN/TURN server serving your XMPP domain. Refer to +section +[`DNS Discovery of a Server`](http://tools.ietf.org/html/rfc5389#section-9) +of [`RFC 5389`](http://tools.ietf.org/html/rfc5389) and section +[`Creating an Allocation`](http://tools.ietf.org/html/rfc5766#section-6) +of [`RFC 5766`](http://tools.ietf.org/html/rfc5766) for details. + +Example DNS SRV configuration for STUN only: + +``` yaml + _stun._udp IN SRV 0 0 3478 stun.example.com. + _stun._tcp IN SRV 0 0 3478 stun.example.com. + _stuns._tcp IN SRV 0 0 5349 stun.example.com. +``` + +And you should also add these in the case if TURN is enabled: + +``` yaml + _turn._udp IN SRV 0 0 3478 turn.example.com. + _turn._tcp IN SRV 0 0 3478 turn.example.com. + _turns._tcp IN SRV 0 0 5349 turn.example.com. +``` + +# ejabberd_sip + +## SIP Configuration + +`ejabberd` has built-in SIP support. To activate this feature, +add the [`ejabberd_sip`](#ejabberd_sip) listen module, enable +[`mod_sip`](modules.md#mod_sip) module +for the desired virtual host, and configure DNS properly. + +To add a listener you should configure `ejabberd_sip` listening module +as described in [Listen](#listen-option) section. +If option [`tls`](listen-options.md#tls) is specified, +option [`certfile`](listen-options.md#certfile) +must be specified as well, otherwise incoming TLS connections +would fail. + +Example configuration with standard ports (as per +[`RFC 3261`](http://tools.ietf.org/html/rfc3261)): + +``` yaml + listen: + ... + - + port: 5060 + transport: udp + module: ejabberd_sip + - + port: 5060 + module: ejabberd_sip + - + port: 5061 + module: ejabberd_sip + tls: true + certfile: /etc/ejabberd/server.pem + ... +``` + +Note that there is no StartTLS support in SIP and +[`SNI`](http://en.wikipedia.org/wiki/Server_Name_Indication) support is +somewhat tricky, so for TLS you have to configure different virtual +hosts on different ports if you have different certificate files for +them. + +Next you need to configure DNS SIP records for your virtual domains. +Refer to [`RFC 3263`](http://tools.ietf.org/html/rfc3263) for the +detailed explanation. Simply put, you should add NAPTR and SRV records +for your domains. Skip NAPTR configuration if your DNS provider doesn't +support this type of records. It’s not fatal, however, highly +recommended. + +Example configuration of NAPTR records: + +``` yaml + example.com IN NAPTR 10 0 "s" "SIPS+D2T" "" _sips._tcp.example.com. + example.com IN NAPTR 20 0 "s" "SIP+D2T" "" _sip._tcp.example.com. + example.com IN NAPTR 30 0 "s" "SIP+D2U" "" _sip._udp.example.com. +``` + +Example configuration of SRV records with standard ports (as per +[`RFC 3261`](http://tools.ietf.org/html/rfc3261): + +``` yaml + _sip._udp IN SRV 0 0 5060 sip.example.com. + _sip._tcp IN SRV 0 0 5060 sip.example.com. + _sips._tcp IN SRV 0 0 5061 sip.example.com. +``` + +## Note on SIP usage + +SIP authentication does not support SCRAM. As such, it is not possible +to use `mod_sip` to authenticate when ejabberd has been set to encrypt +password with SCRAM. + +# ejabberd_http_ws + +This module enables XMPP communication over Websocket connection as +described in [`RFC 7395`](http://tools.ietf.org/html/rfc7395). + +## Enabling Websocket support + +To enable this module it must have handler added to `request_handlers` +section of `ejabberd_http` listener: + +``` yaml + listen: + ... + - + port: 5280 + module: ejabberd_http + request_handlers: + ... + /xmpp: ejabberd_http_ws + ... + ... +``` + +This module can be configured by using those options that should be +placed in general section of config file: [websocket\_origin](toplevel.md#websocket_origin), [websocket\_ping\_interval](toplevel.md#websocket_ping_interval), [websocket\_timeout](toplevel.md#websocket_timeout). + +## Discovery + +You also need to configure DNS SRV records properly so clients can +easily discover Websocket service for your XMPP domain. Refer to +[XEP-0156](https://xmpp.org/extensions/xep-0156.html). + +Example DNS TXT configuration for Websocket: + +``` sh + _xmppconnect IN TXT "[ _xmpp-client-websocket=wss://web.example.com:443/ws ]" +``` + +## Testing Websocket + +A test client can be found on Github: [Websocket test client](https://github.com/processone/xmpp-websocket-client) + + + +# ejabberd_xmlrpc + +Handles XML-RPC requests to execute +[ejabberd commands](../../admin/guide/managing.md#ejabberd_commands). +It is configured as a request handler in +[ejabberd_http](listen.md#ejabberd_http). + +By default there is no restriction to who can execute what commands, +so it is strongly recommended that you configure restrictions using +[API Permissions](https://docs.ejabberd.im/developer/ejabberd-api/permissions/). + +This is the minimum configuration required to enable the feature: + +``` yaml + listen: + - + port: 4560 + module: ejabberd_http + request_handlers: + /: ejabberd_xmlrpc +``` + +Example Python script: + +``` py + import xmlrpclib + server = xmlrpclib.Server('http://127.0.0.1:4560/'); + params = {} + params["host"] = "localhost" + print server.registered_users(params) +``` + +This example configuration adds some restrictions: + +``` yaml + listen: + - + port: 5281 + ip: "::" + module: ejabberd_http + request_handlers: + /api: mod_http_api + /xmlrpc: ejabberd_xmlrpc + + api_permissions: + "some XMLRPC commands": + from: ejabberd_xmlrpc + who: + - ip: 127.0.0.1 + - user: user1@localhost + what: + - registered_users + - connected_users_number +``` + +With that configuration, it is possible to execute two specific commands using +`ejabberd_xmlrpc`, with two access restrictions. Example Python script: + +``` py + import xmlrpclib + server = xmlrpclib.Server('http://127.0.0.1:5281/xmlrpc') + LOGIN = {'user':'user1', + 'server':'localhost', + 'password':'mypass11', + 'admin':True} + def calling(command, data): + fn = getattr(server, command) + return fn(LOGIN, data) + print calling('registered_users', {'host':'localhost'}) +``` + +It's possible to use OAuth for authentication instead of plain password, see +[OAuth Support](../../developer/ejabberd-api/oauth.md). + +In ejabberd 20.03 and older, it was possible to configure `ejabberd_xmlrpc` as a +listener, see the old document for reference and example configuration: +[Listening Module](../old.md#listening_module). + +Just for reference, there's also the old +[`ejabberd_xmlrpc documentation`](http://www.ejabberd.im/ejabberd_xmlrpc). + +# Examples + +For example, the following simple configuration defines: + +- There are three domains. The default certificate file is + `server.pem`. However, the c2s and s2s connections to the domain + `example.com` use the file `example_com.pem`. + +- Port 5222 listens for c2s connections with STARTTLS, and also allows + plain connections for old clients. + +- Port 5223 listens for c2s connections with the old SSL. + +- Port 5269 listens for s2s connections with STARTTLS. The socket is + set for IPv6 instead of IPv4. + +- Port 3478 listens for STUN requests over UDP. + +- Port 5280 listens for HTTP requests, and serves the HTTP-Bind (BOSH) + service. + +- Port 5281 listens for HTTP requests, using HTTPS to serve HTTP-Bind + (BOSH) and the Web Admin as explained in [Managing: Web Admin](../../admin/guide/managing.md#web_admin). The + socket only listens connections to the IP address 127.0.0.1. + +``` yaml + hosts: + - example.com + - example.org + - example.net + + certfiles: + - /etc/ejabberd/server.pem + - /etc/ejabberd/example_com.pem + + listen: + - + port: 5222 + module: ejabberd_c2s + access: c2s + shaper: c2s_shaper + starttls: true + max_stanza_size: 65536 + - + port: 5223 + module: ejabberd_c2s + access: c2s + shaper: c2s_shaper + tls: true + max_stanza_size: 65536 + - + port: 5269 + ip: "::" + module: ejabberd_s2s_in + shaper: s2s_shaper + max_stanza_size: 131072 + - + port: 3478 + transport: udp + module: ejabberd_stun + - + port: 5280 + module: ejabberd_http + request_handlers: + /bosh: mod_bosh + - + port: 5281 + ip: 127.0.0.1 + module: ejabberd_http + tls: true + request_handlers: + /admin: ejabberd_web_admin + /bosh: mod_bosh + + s2s_use_starttls: optional + outgoing_s2s_families: + - ipv4 + - ipv6 + outgoing_s2s_timeout: 10000 + trusted_proxies: [127.0.0.1, 192.168.1.11] +``` + +In this example, the following configuration defines that: + +- c2s connections are listened for on port 5222 (all IPv4 addresses) + and on port 5223 (SSL, IP 192.168.0.1 and fdca:8ab6:a243:75ef::1) + and denied for the user called ‘`bad`’. + +- s2s connections are listened for on port 5269 (all IPv4 addresses) + with STARTTLS for secured traffic strictly required, and the + certificates are verified. Incoming and outgoing connections of + remote XMPP servers are denied, only two servers can connect: + “jabber.example.org” and “example.com”. + +- Port 5280 is serving the Web Admin and the HTTP-Bind (BOSH) service in + all the IPv4 addresses. Note that it is also possible to serve them + on different ports. The second example in section [Managing: Web Admin](../../admin/guide/managing.md#web_admin) shows + how exactly this can be done. A request handler to serve MQTT over Websocket is also defined. + +- All users except for the administrators have a traffic of limit + 1,000Bytes/second + +- The [`AIM transport`](http://www.ejabberd.im/pyaimt) + `aim.example.org` is connected to port 5233 on localhost IP + addresses (127.0.0.1 and ::1) with password ‘`aimsecret`’. + +- The ICQ transport JIT (`icq.example.org` and `sms.example.org`) is + connected to port 5234 with password ‘`jitsecret`’. + +- The [`MSN transport`](http://www.ejabberd.im/pymsnt) + `msn.example.org` is connected to port 5235 with password + ‘`msnsecret`’. + +- The [`Yahoo! transport`](http://www.ejabberd.im/yahoo-transport-2) + `yahoo.example.org` is connected to port 5236 with password + ‘`yahoosecret`’. + +- The + [`Gadu-Gadu transport`](http://www.ejabberd.im/jabber-gg-transport) + `gg.example.org` is connected to port 5237 with password + ‘`ggsecret`’. + +- The [`Jabber Mail Component`](http://www.ejabberd.im/jmc) + `jmc.example.org` is connected to port 5238 with password + ‘`jmcsecret`’. + +- The service custom has enabled the special option to avoiding + checking the `from` attribute in the packets send by this component. + The component can send packets in behalf of any users from the + server, or even on behalf of any server. + +``` yaml + acl: + blocked: + user: bad + trusted_servers: + server: + - example.com + - jabber.example.org + xmlrpc_bot: + user: + - xmlrpc-robot@example.org + shaper: + normal: 1000 + shaper_rules: + c2s_shaper: + - none: admin + - normal + access_rules: + c2s: + - deny: blocked + - allow + xmlrpc_access: + - allow: xmlrpc_bot + s2s: + - allow: trusted_servers + certfiles: + - /path/to/ssl.pem + s2s_access: s2s + s2s_use_starttls: required_trusted + listen: + - + port: 5222 + module: ejabberd_c2s + shaper: c2s_shaper + access: c2s + - + ip: 192.168.0.1 + port: 5223 + module: ejabberd_c2s + tls: true + access: c2s + - + ip: "FDCA:8AB6:A243:75EF::1" + port: 5223 + module: ejabberd_c2s + tls: true + access: c2s + - + port: 5269 + module: ejabberd_s2s_in + - + port: 5280 + module: ejabberd_http + request_handlers: + /admin: ejabberd_web_admin + /bosh: mod_bosh + /mqtt: mod_mqtt + - + port: 4560 + module: ejabberd_xmlrpc + access_commands: {} + - + ip: 127.0.0.1 + port: 5233 + module: ejabberd_service + hosts: + aim.example.org: + password: aimsecret + - + ip: "::1" + port: 5233 + module: ejabberd_service + hosts: + aim.example.org: + password: aimsecret + - + port: 5234 + module: ejabberd_service + hosts: + icq.example.org: + password: jitsecret + sms.example.org: + password: jitsecret + - + port: 5235 + module: ejabberd_service + hosts: + msn.example.org: + password: msnsecret + - + port: 5236 + module: ejabberd_service + password: yahoosecret + - + port: 5237 + module: ejabberd_service + hosts: + gg.example.org: + password: ggsecret + - + port: 5238 + module: ejabberd_service + hosts: + jmc.example.org: + password: jmcsecret + - + port: 5239 + module: ejabberd_service + check_from: false + hosts: + custom.example.org: + password: customsecret +``` + +Note, that for services based in jabberd14 or WPJabber you have to make +the transports log and do XDB by themselves: + + + +``` xml + + + + %d: [%t] (%h): %s + /var/log/jabber/service.log + +``` + + + +``` xml + + + + + /usr/lib/jabber/xdb_file.so + + + /var/spool/jabber + + +``` diff --git a/content/archive/20_07/modules.md b/content/archive/20.07/modules.md similarity index 99% rename from content/archive/20_07/modules.md rename to content/archive/20.07/modules.md index ca15fd8d..9613c5a2 100644 --- a/content/archive/20_07/modules.md +++ b/content/archive/20.07/modules.md @@ -1,10 +1,9 @@ --- -title: Modules Options -toc: true -menu: Modules Options -order: 95 +search: + exclude: true --- +# Modules Options mod\_adhoc ---------- @@ -2754,11 +2753,11 @@ password in multiple places. - Connection parameters: The module also accepts the connection parameters, all of which default to the top-level parameter of the same name, if unspecified. See [LDAP - Connection](/admin/configuration/database-ldap/#ldap-connection) section for + Connection](../../admin/configuration/ldap.md#ldap_connection) section for more information about them. Check also the [Configuration -examples](/admin/configuration/database-ldap/#configuration-examples) section to +examples](../../admin/configuration/ldap.md#configuration_examples) section to get details about retrieving the roster, and configuration examples including Flat DIT and Deep DIT. @@ -2798,7 +2797,7 @@ only. - **ldap\_filter** Additional filter which is AND-ed together with "User Filter" and "Group Filter". For more information check the LDAP -[Filters](/admin/configuration/database-ldap/#filters) section. +[Filters](../../admin/configuration/ldap.md#filters) section. - **ldap\_gfilter** "Group Filter", used when retrieving human-readable name (a.k.a. @@ -2835,7 +2834,7 @@ section Filters. - **ldap\_memberattr\_format\_re** A regex for extracting user ID from the value of the attribute named by *ldap\_memberattr*. Check the LDAP [Control -Parameters](/admin/configuration/database-ldap/#control-parameters) section. +Parameters](../../admin/configuration/ldap.md#control_parameters) section. - **ldap\_password** Same as top-level *ldap\_password* option, but applied to this module @@ -2878,7 +2877,7 @@ only. "User Filter", used for retrieving the human-readable name of roster entries (usually full names of people in the roster). See also the parameters *ldap\_userdesc* and *ldap\_useruid*. For more information -check the LDAP [Filters](/admin/configuration/database-ldap/#filters) section. +check the LDAP [Filters](../../admin/configuration/ldap.md#filters) section. - **ldap\_uids** Same as top-level *ldap\_uids* option, but applied to this module only. @@ -2921,7 +2920,7 @@ virtual host. > > It is not enough to just load this module. You should also configure > listeners and DNS records properly. For details see the section about -> the [ejabberd\_sip](/archive/20_07/listen/#ejabberd-sip) listen module in +> the [ejabberd\_sip](listen.md#ejabberd_sip) listen module in > the ejabberd Documentation. __Available options:__ diff --git a/content/archive/20_07/toplevel.md b/content/archive/20.07/toplevel.md similarity index 99% rename from content/archive/20_07/toplevel.md rename to content/archive/20.07/toplevel.md index e388b0bc..b9106d61 100644 --- a/content/archive/20_07/toplevel.md +++ b/content/archive/20.07/toplevel.md @@ -1,10 +1,9 @@ --- -title: Top-Level Options -toc: true -menu: Top-Level Options -order: 80 +search: + exclude: true --- +# Top-Level Options ## access\_rules @@ -120,7 +119,7 @@ mapping *{ACLType: ACLValue}*. These can be one of the following: *Options* -[ACME](/admin/configuration/basic/#acme) configuration, to automatically obtain SSL +[ACME](../../admin/configuration/basic.md#acme) configuration, to automatically obtain SSL certificates for the domains served by ejabberd, which means that certificate requests and renewals are performed to some CA server (aka "ACME server") in a fully automated mode. The *Options* are: @@ -811,7 +810,7 @@ JID. For example, "%.org". If the value is in the form of *\[Options, ...\]* The option for listeners configuration. See the [Listen -Modules](/archive/20_07/listen/) section for details. +Modules](./listen.md/) section for details. ## log\_rotate\_count @@ -853,7 +852,7 @@ value is *10000*. *{Module: Options}* -The option for modules configuration. See [Modules](/archive/20_07/modules/) +The option for modules configuration. See [Modules](./modules.md/) section for details. ## negotiation\_timeout diff --git a/content/archive/20_12/admin-api.md b/content/archive/20.12/admin-api.md similarity index 94% rename from content/archive/20_12/admin-api.md rename to content/archive/20.12/admin-api.md index edcb16f8..83533a8c 100644 --- a/content/archive/20_12/admin-api.md +++ b/content/archive/20.12/admin-api.md @@ -1,17 +1,14 @@ --- -title: Administration API reference -toc: true -menu: Administration API -// Autogenerated with 'ejabberdctl gen_markdown_doc_for_commands' +search: + exclude: true --- +# API Reference ## add_rosteritem - Add an item to a user's roster (supports ODBC) - Group can be several groups separated by ; for example: "g1;g2;g3" __Arguments:__ @@ -30,7 +27,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/add_rosteritem { @@ -47,12 +43,8 @@ __Examples:__ "" ~~~ - - - ## backup - Store the database to backup file __Arguments:__ @@ -65,7 +57,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/backup { @@ -76,12 +67,8 @@ __Examples:__ "Success" ~~~ - - - ## ban_account - Ban an account: kick sessions and set random password __Arguments:__ @@ -96,7 +83,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/ban_account { @@ -109,12 +95,8 @@ __Examples:__ "" ~~~ - - - ## bookmarks_to_pep - Export private XML storage bookmarks to PEP __Arguments:__ @@ -128,7 +110,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/bookmarks_to_pep { @@ -140,12 +121,8 @@ __Examples:__ "Bookmarks exported" ~~~ - - - ## change_password - Change the password of an account __Arguments:__ @@ -160,7 +137,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/change_password { @@ -173,12 +149,8 @@ __Examples:__ "" ~~~ - - - ## change_room_option - Change an option in a MUC room __Arguments:__ @@ -194,7 +166,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/change_room_option { @@ -208,12 +179,8 @@ __Examples:__ "" ~~~ - - - ## check_account - Check if an account exists or not __Arguments:__ @@ -227,7 +194,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/check_account { @@ -239,12 +205,8 @@ __Examples:__ "" ~~~ - - - ## check_password - Check if a password is correct __Arguments:__ @@ -259,7 +221,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/check_password { @@ -272,15 +233,10 @@ __Examples:__ "" ~~~ - - - ## check_password_hash - Check if the password hash is correct - Allows hash methods from crypto application __Arguments:__ @@ -296,7 +252,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/check_password_hash { @@ -310,24 +265,18 @@ __Examples:__ "" ~~~ - - - ## clear_cache - Clear database cache on all nodes __Arguments:__ - __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Examples:__ - ~~~ json POST /api/clear_cache { @@ -338,12 +287,8 @@ __Examples:__ "" ~~~ - - - ## compile - Recompile and reload Erlang source code file __Arguments:__ @@ -356,7 +301,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/compile { @@ -367,24 +311,18 @@ __Examples:__ "" ~~~ - - - ## connected_users - List all established sessions __Arguments:__ - __Result:__ - *connected_users* :: [sessions::string] : List of users sessions __Examples:__ - ~~~ json POST /api/connected_users { @@ -398,24 +336,18 @@ __Examples:__ ] ~~~ - - - ## connected_users_info - List all established sessions and their information __Arguments:__ - __Result:__ - *connected_users_info* :: [{jid::string, connection::string, ip::string, port::integer, priority::integer, node::string, uptime::integer, status::string, resource::string, statustext::string}] __Examples:__ - ~~~ json POST /api/connected_users_info { @@ -439,24 +371,18 @@ __Examples:__ ] ~~~ - - - ## connected_users_number - Get the number of established sessions __Arguments:__ - __Result:__ - *num_sessions* :: integer __Examples:__ - ~~~ json POST /api/connected_users_number { @@ -467,12 +393,8 @@ __Examples:__ {"num_sessions": 2} ~~~ - - - ## connected_users_vhost - Get the list of established sessions in a vhost __Arguments:__ @@ -485,7 +407,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/connected_users_vhost { @@ -499,12 +420,8 @@ __Examples:__ ] ~~~ - - - ## convert_to_scram - Convert the passwords of users to SCRAM __Arguments:__ @@ -517,7 +434,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/convert_to_scram { @@ -528,12 +444,8 @@ __Examples:__ "" ~~~ - - - ## convert_to_yaml - Convert the input file from Erlang to YAML format __Arguments:__ @@ -547,7 +459,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/convert_to_yaml { @@ -559,12 +470,8 @@ __Examples:__ "" ~~~ - - - ## create_room - Create a MUC room name@service in host __Arguments:__ @@ -579,7 +486,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/create_room { @@ -592,12 +498,8 @@ __Examples:__ "" ~~~ - - - ## create_room_with_opts - Create a MUC room name@service in host with given options __Arguments:__ @@ -613,7 +515,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/create_room_with_opts { @@ -632,15 +533,10 @@ __Examples:__ "" ~~~ - - - ## create_rooms_file - Create the rooms indicated in file - Provide one room JID per line. Rooms will be created after restart. __Arguments:__ @@ -653,7 +549,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/create_rooms_file { @@ -664,24 +559,18 @@ __Examples:__ "" ~~~ - - - ## delete_expired_messages - Delete expired offline messages from database __Arguments:__ - __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Examples:__ - ~~~ json POST /api/delete_expired_messages { @@ -692,12 +581,8 @@ __Examples:__ "" ~~~ - - - ## delete_mnesia - Delete elements in Mnesia database for a given vhost __Arguments:__ @@ -710,7 +595,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/delete_mnesia { @@ -721,15 +605,10 @@ __Examples:__ "" ~~~ - - - ## delete_old_mam_messages - Delete MAM messages older than DAYS - Valid message TYPEs: "chat", "groupchat", "all". __Arguments:__ @@ -743,7 +622,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/delete_old_mam_messages { @@ -755,12 +633,8 @@ __Examples:__ "" ~~~ - - - ## delete_old_messages - Delete offline messages older than DAYS __Arguments:__ @@ -773,7 +647,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/delete_old_messages { @@ -784,12 +657,8 @@ __Examples:__ "" ~~~ - - - ## delete_old_push_sessions - Remove push sessions older than DAYS __Arguments:__ @@ -802,7 +671,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/delete_old_push_sessions { @@ -813,22 +681,16 @@ __Examples:__ "" ~~~ - - - ## delete_old_users - Delete users that didn't log in last days, or that never logged - To protect admin accounts, configure this for example: access_rules: protect_old_users: - allow: admin - deny: all - __Arguments:__ - *days* :: integer : Last login age in days of accounts that should be removed @@ -839,7 +701,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/delete_old_users { @@ -850,22 +711,16 @@ __Examples:__ "Deleted 2 users: ["oldman@myserver.com", "test@myserver.com"]" ~~~ - - - ## delete_old_users_vhost - Delete users that didn't log in last days in vhost, or that never logged - To protect admin accounts, configure this for example: access_rules: delete_old_users: - deny: admin - allow: all - __Arguments:__ - *host* :: string : Server name @@ -877,7 +732,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/delete_old_users_vhost { @@ -889,12 +743,8 @@ __Examples:__ "Deleted 2 users: ["oldman@myserver.com", "test@myserver.com"]" ~~~ - - - ## delete_rosteritem - Delete an item from a user's roster (supports ODBC) __Arguments:__ @@ -910,7 +760,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/delete_rosteritem { @@ -924,12 +773,8 @@ __Examples:__ "" ~~~ - - - ## destroy_room - Destroy a MUC room __Arguments:__ @@ -943,7 +788,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/destroy_room { @@ -955,15 +799,10 @@ __Examples:__ "" ~~~ - - - ## destroy_rooms_file - Destroy the rooms indicated in file - Provide one room JID per line. __Arguments:__ @@ -976,7 +815,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/destroy_rooms_file { @@ -987,12 +825,8 @@ __Examples:__ "" ~~~ - - - ## dump - Dump the database to a text file __Arguments:__ @@ -1005,7 +839,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/dump { @@ -1016,12 +849,8 @@ __Examples:__ "Success" ~~~ - - - ## dump_config - Dump configuration in YAML format as seen by ejabberd __Arguments:__ @@ -1034,7 +863,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/dump_config { @@ -1045,12 +873,8 @@ __Examples:__ "" ~~~ - - - ## dump_table - Dump a table to a text file __Arguments:__ @@ -1064,7 +888,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/dump_table { @@ -1076,15 +899,10 @@ __Examples:__ "Success" ~~~ - - - ## export2sql - Export virtual host information from Mnesia tables to SQL file - Configure the modules to use SQL, then call this command. __Arguments:__ @@ -1098,7 +916,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/export2sql { @@ -1110,12 +927,8 @@ __Examples:__ "" ~~~ - - - ## export_piefxis - Export data of all users in the server to PIEFXIS files (XEP-0227) __Arguments:__ @@ -1128,7 +941,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/export_piefxis { @@ -1139,12 +951,8 @@ __Examples:__ "" ~~~ - - - ## export_piefxis_host - Export data of users in a host to PIEFXIS files (XEP-0227) __Arguments:__ @@ -1158,7 +966,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/export_piefxis_host { @@ -1170,24 +977,18 @@ __Examples:__ "" ~~~ - - - ## gc - Force full garbage collection __Arguments:__ - __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Examples:__ - ~~~ json POST /api/gc { @@ -1198,12 +999,8 @@ __Examples:__ "" ~~~ - - - ## gen_html_doc_for_commands - Generates html documentation for ejabberd_commands __Arguments:__ @@ -1218,7 +1015,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/gen_html_doc_for_commands { @@ -1231,12 +1027,8 @@ __Examples:__ "" ~~~ - - - ## gen_markdown_doc_for_commands - Generates markdown documentation for ejabberd_commands __Arguments:__ @@ -1251,7 +1043,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/gen_markdown_doc_for_commands { @@ -1264,24 +1055,18 @@ __Examples:__ "" ~~~ - - - ## get_cookie - Get the Erlang cookie of this node __Arguments:__ - __Result:__ - *cookie* :: string : Erlang cookie used for authentication by ejabberd __Examples:__ - ~~~ json POST /api/get_cookie { @@ -1292,15 +1077,10 @@ __Examples:__ {"cookie": "MWTAVMODFELNLSMYXPPD"} ~~~ - - - ## get_last - Get last activity information - Timestamp is UTC and XEP-0082 format, for example: 2017-02-23T22:25:28.063062Z ONLINE __Arguments:__ @@ -1314,7 +1094,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/get_last { @@ -1329,24 +1108,18 @@ __Examples:__ } ~~~ - - - ## get_loglevel - Get the current loglevel __Arguments:__ - __Result:__ - *levelatom* :: string : Tuple with the log level number, its keyword and description __Examples:__ - ~~~ json POST /api/get_loglevel { @@ -1357,12 +1130,8 @@ __Examples:__ {"levelatom": "warning"} ~~~ - - - ## get_offline_count - Get the number of unread offline messages __Arguments:__ @@ -1376,7 +1145,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/get_offline_count { @@ -1388,23 +1156,19 @@ __Examples:__ {"value": 5} ~~~ - - - ## get_presence - Retrieve the resource with highest priority, and its presence (show and status message) for a given user. - The 'jid' value contains the user jid with resource. The 'show' value contains the user presence flag. It can take limited values: - - available - - chat (Free for chat) - - away - - dnd (Do not disturb) - - xa (Not available, extended away) - - unavailable (Not connected) + +- available +- chat (Free for chat) +- away +- dnd (Do not disturb) +- xa (Not available, extended away) +- unavailable (Not connected) 'status' is a free text defined by the user client. @@ -1419,7 +1183,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/get_presence { @@ -1435,12 +1198,8 @@ __Examples:__ } ~~~ - - - ## get_room_affiliation - Get affiliation of a user in MUC room __Arguments:__ @@ -1455,7 +1214,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/get_room_affiliation { @@ -1468,12 +1226,8 @@ __Examples:__ {"affiliation": "member"} ~~~ - - - ## get_room_affiliations - Get the list of affiliations of a MUC room __Arguments:__ @@ -1487,7 +1241,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/get_room_affiliations { @@ -1506,12 +1259,8 @@ __Examples:__ ] ~~~ - - - ## get_room_occupants - Get the list of occupants of a MUC room __Arguments:__ @@ -1525,7 +1274,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/get_room_occupants { @@ -1543,12 +1291,8 @@ __Examples:__ ] ~~~ - - - ## get_room_occupants_number - Get the number of occupants of a MUC room __Arguments:__ @@ -1562,7 +1306,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/get_room_occupants_number { @@ -1574,12 +1317,8 @@ __Examples:__ {"occupants": 7} ~~~ - - - ## get_room_options - Get options from a MUC room __Arguments:__ @@ -1593,7 +1332,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/get_room_options { @@ -1610,12 +1348,8 @@ __Examples:__ ] ~~~ - - - ## get_roster - Get roster of a local user __Arguments:__ @@ -1629,7 +1363,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/get_roster { @@ -1656,12 +1389,8 @@ __Examples:__ ] ~~~ - - - ## get_subscribers - List subscribers of a MUC conference __Arguments:__ @@ -1675,7 +1404,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/get_subscribers { @@ -1690,12 +1418,8 @@ __Examples:__ ] ~~~ - - - ## get_user_rooms - Get the list of rooms where this user is occupant __Arguments:__ @@ -1709,7 +1433,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/get_user_rooms { @@ -1724,24 +1447,19 @@ __Examples:__ ] ~~~ - - - ## get_vcard - Get content from a vCard field - Some vcard field names in get/set_vcard are: -* FN - Full Name -* NICKNAME - Nickname -* BDAY - Birthday -* TITLE - Work: Position -* ROLE - Work: Role +- FN - Full Name +- NICKNAME - Nickname +- BDAY - Birthday +- TITLE - Work: Position +- ROLE - Work: Role -For a full list of vCard fields check XEP-0054: vcard-temp at http://www.xmpp.org/extensions/xep-0054.html +For a full list of vCard fields check XEP-0054: vcard-temp at __Arguments:__ @@ -1755,7 +1473,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/get_vcard { @@ -1768,31 +1485,26 @@ __Examples:__ {"content": "User 1"} ~~~ - - - ## get_vcard2 - Get content from a vCard subfield - Some vcard field names and subnames in get/set_vcard2 are: -* N FAMILY - Family name -* N GIVEN - Given name -* N MIDDLE - Middle name -* ADR CTRY - Address: Country -* ADR LOCALITY - Address: City -* TEL HOME - Telephone: Home -* TEL CELL - Telephone: Cellphone -* TEL WORK - Telephone: Work -* TEL VOICE - Telephone: Voice -* EMAIL USERID - E-Mail Address -* ORG ORGNAME - Work: Company -* ORG ORGUNIT - Work: Department +- N FAMILY - Family name +- N GIVEN - Given name +- N MIDDLE - Middle name +- ADR CTRY - Address: Country +- ADR LOCALITY - Address: City +- TEL HOME - Telephone: Home +- TEL CELL - Telephone: Cellphone +- TEL WORK - Telephone: Work +- TEL VOICE - Telephone: Voice +- EMAIL USERID - E-Mail Address +- ORG ORGNAME - Work: Company +- ORG ORGUNIT - Work: Department -For a full list of vCard fields check XEP-0054: vcard-temp at http://www.xmpp.org/extensions/xep-0054.html +For a full list of vCard fields check XEP-0054: vcard-temp at __Arguments:__ @@ -1807,7 +1519,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/get_vcard2 { @@ -1821,31 +1532,26 @@ __Examples:__ {"content": "Schubert"} ~~~ - - - ## get_vcard2_multi - Get multiple contents from a vCard field - Some vcard field names and subnames in get/set_vcard2 are: -* N FAMILY - Family name -* N GIVEN - Given name -* N MIDDLE - Middle name -* ADR CTRY - Address: Country -* ADR LOCALITY - Address: City -* TEL HOME - Telephone: Home -* TEL CELL - Telephone: Cellphone -* TEL WORK - Telephone: Work -* TEL VOICE - Telephone: Voice -* EMAIL USERID - E-Mail Address -* ORG ORGNAME - Work: Company -* ORG ORGUNIT - Work: Department +- N FAMILY - Family name +- N GIVEN - Given name +- N MIDDLE - Middle name +- ADR CTRY - Address: Country +- ADR LOCALITY - Address: City +- TEL HOME - Telephone: Home +- TEL CELL - Telephone: Cellphone +- TEL WORK - Telephone: Work +- TEL VOICE - Telephone: Voice +- EMAIL USERID - E-Mail Address +- ORG ORGNAME - Work: Company +- ORG ORGUNIT - Work: Department -For a full list of vCard fields check XEP-0054: vcard-temp at http://www.xmpp.org/extensions/xep-0054.html +For a full list of vCard fields check XEP-0054: vcard-temp at __Arguments:__ @@ -1860,7 +1566,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/get_vcard2_multi { @@ -1877,12 +1582,8 @@ __Examples:__ ] ~~~ - - - ## import_dir - Import users data from jabberd14 spool dir __Arguments:__ @@ -1895,7 +1596,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/import_dir { @@ -1906,12 +1606,8 @@ __Examples:__ "Success" ~~~ - - - ## import_file - Import user data from jabberd14 spool file __Arguments:__ @@ -1924,7 +1620,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/import_file { @@ -1935,12 +1630,8 @@ __Examples:__ "Success" ~~~ - - - ## import_piefxis - Import users data from a PIEFXIS file (XEP-0227) __Arguments:__ @@ -1953,7 +1644,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/import_piefxis { @@ -1964,15 +1654,10 @@ __Examples:__ "" ~~~ - - - ## import_prosody - Import data from Prosody - Note: this method requires ejabberd compiled with optional tools support and package must provide optional luerl dependency. __Arguments:__ @@ -1985,7 +1670,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/import_prosody { @@ -1996,24 +1680,18 @@ __Examples:__ "" ~~~ - - - ## incoming_s2s_number - Number of incoming s2s connections on the node __Arguments:__ - __Result:__ - *s2s_incoming* :: integer __Examples:__ - ~~~ json POST /api/incoming_s2s_number { @@ -2024,12 +1702,8 @@ __Examples:__ {"s2s_incoming": 1} ~~~ - - - ## install_fallback - Install the database from a fallback file __Arguments:__ @@ -2042,7 +1716,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/install_fallback { @@ -2053,15 +1726,10 @@ __Examples:__ "Success" ~~~ - - - ## join_cluster - Join this node into the cluster handled by Node - This command works only with ejabberdctl, not mod_http_api or other code that runs inside the same ejabberd node that will be joined. __Arguments:__ @@ -2074,7 +1742,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/join_cluster { @@ -2085,12 +1752,8 @@ __Examples:__ "" ~~~ - - - ## kick_session - Kick a user session __Arguments:__ @@ -2106,7 +1769,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/kick_session { @@ -2120,12 +1782,8 @@ __Examples:__ "" ~~~ - - - ## kick_user - Disconnect user's active sessions __Arguments:__ @@ -2139,7 +1797,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/kick_user { @@ -2151,15 +1808,10 @@ __Examples:__ {"num_resources": 3} ~~~ - - - ## leave_cluster - Remove and shutdown Node from the running cluster - This command can be run from any running node of the cluster, even the node to be removed. In the removed node, this command works only when using ejabberdctl, not mod_http_api or other code that runs inside the same ejabberd node that will leave. __Arguments:__ @@ -2172,7 +1824,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/leave_cluster { @@ -2183,24 +1834,18 @@ __Examples:__ "" ~~~ - - - ## list_cluster - List nodes that are part of the cluster handled by Node __Arguments:__ - __Result:__ - *nodes* :: [node::string] __Examples:__ - ~~~ json POST /api/list_cluster { @@ -2214,12 +1859,8 @@ __Examples:__ ] ~~~ - - - ## load - Restore the database from a text file __Arguments:__ @@ -2232,7 +1873,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/load { @@ -2243,24 +1883,18 @@ __Examples:__ "Success" ~~~ - - - ## man - Generate Unix manpage for current ejabberd version __Arguments:__ - __Result:__ - *res* :: string : Raw result string __Examples:__ - ~~~ json POST /api/man { @@ -2271,12 +1905,8 @@ __Examples:__ "Success" ~~~ - - - ## mnesia_change_nodename - Change the erlang node name in a backup file __Arguments:__ @@ -2292,7 +1922,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/mnesia_change_nodename { @@ -2306,24 +1935,18 @@ __Examples:__ "Success" ~~~ - - - ## mnesia_info - Dump info on global Mnesia state __Arguments:__ - __Result:__ - *res* :: string __Examples:__ - ~~~ json POST /api/mnesia_info { @@ -2334,12 +1957,8 @@ __Examples:__ {"res": "aaaaa"} ~~~ - - - ## mnesia_table_info - Dump info on Mnesia table state __Arguments:__ @@ -2352,7 +1971,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/mnesia_table_info { @@ -2363,12 +1981,8 @@ __Examples:__ {"res": "aaaaa"} ~~~ - - - ## module_check - Check the contributed module repository compliance __Arguments:__ @@ -2381,7 +1995,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/module_check { @@ -2392,12 +2005,8 @@ __Examples:__ "" ~~~ - - - ## module_install - Compile, install and start an available contributed module __Arguments:__ @@ -2410,7 +2019,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/module_install { @@ -2421,12 +2029,8 @@ __Examples:__ "" ~~~ - - - ## module_uninstall - Uninstall a contributed module __Arguments:__ @@ -2439,7 +2043,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/module_uninstall { @@ -2450,15 +2053,10 @@ __Examples:__ "" ~~~ - - - ## module_upgrade - Upgrade the running code of an installed module - In practice, this uninstalls and installs the module __Arguments:__ @@ -2471,7 +2069,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/module_upgrade { @@ -2482,24 +2079,18 @@ __Examples:__ "" ~~~ - - - ## modules_available - List the contributed modules available to install __Arguments:__ - __Result:__ - *modules* :: [{name::string, summary::string}] : List of tuples with module name and description __Examples:__ - ~~~ json POST /api/modules_available { @@ -2513,24 +2104,18 @@ __Examples:__ } ~~~ - - - ## modules_installed - List the contributed modules already installed __Arguments:__ - __Result:__ - *modules* :: [{name::string, summary::string}] : List of tuples with module name and description __Examples:__ - ~~~ json POST /api/modules_installed { @@ -2544,27 +2129,20 @@ __Examples:__ } ~~~ - - - ## modules_update_specs - Update the module source code from Git - A connection to Internet is required __Arguments:__ - __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Examples:__ - ~~~ json POST /api/modules_update_specs { @@ -2575,12 +2153,8 @@ __Examples:__ "" ~~~ - - - ## muc_online_rooms - List existing rooms ('global' to get all vhosts) __Arguments:__ @@ -2593,7 +2167,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/muc_online_rooms { @@ -2607,12 +2180,8 @@ __Examples:__ ] ~~~ - - - ## muc_online_rooms_by_regex - List existing rooms ('global' to get all vhosts) by regex __Arguments:__ @@ -2626,7 +2195,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/muc_online_rooms_by_regex { @@ -2649,12 +2217,8 @@ __Examples:__ ] ~~~ - - - ## muc_register_nick - Register a nick to a User JID in a MUC service __Arguments:__ @@ -2669,7 +2233,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/muc_register_nick { @@ -2682,12 +2245,8 @@ __Examples:__ "" ~~~ - - - ## muc_unregister_nick - Unregister the nick registered by that account in the MUC service __Arguments:__ @@ -2701,7 +2260,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/muc_unregister_nick { @@ -2713,12 +2271,8 @@ __Examples:__ "" ~~~ - - - ## num_resources - Get the number of resources of a user __Arguments:__ @@ -2732,7 +2286,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/num_resources { @@ -2744,12 +2297,8 @@ __Examples:__ {"resources": 5} ~~~ - - - ## oauth_add_client_implicit - Add OAUTH client_id with implicit grant type __Arguments:__ @@ -2764,7 +2313,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/oauth_add_client_implicit { @@ -2777,12 +2325,8 @@ __Examples:__ "Success" ~~~ - - - ## oauth_add_client_password - Add OAUTH client_id with password grant type __Arguments:__ @@ -2797,7 +2341,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/oauth_add_client_password { @@ -2810,12 +2353,8 @@ __Examples:__ "Success" ~~~ - - - ## oauth_issue_token - Issue an oauth token for the given jid __Arguments:__ @@ -2830,7 +2369,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/oauth_issue_token { @@ -2847,27 +2385,20 @@ __Examples:__ } ~~~ - - - ## oauth_list_tokens - List oauth tokens, user, scope, and seconds to expire (only Mnesia) - List oauth tokens, their user and scope, and how many seconds remain until expirity __Arguments:__ - __Result:__ - *tokens* :: [{token::string, user::string, scope::string, expires_in::string}] __Examples:__ - ~~~ json POST /api/oauth_list_tokens { @@ -2891,12 +2422,8 @@ __Examples:__ ] ~~~ - - - ## oauth_remove_client - Remove OAUTH client_id __Arguments:__ @@ -2909,7 +2436,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/oauth_remove_client { @@ -2920,12 +2446,8 @@ __Examples:__ "Success" ~~~ - - - ## oauth_revoke_token - Revoke authorization for a token (only Mnesia) __Arguments:__ @@ -2938,7 +2460,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/oauth_revoke_token { @@ -2962,24 +2483,18 @@ __Examples:__ ] ~~~ - - - ## outgoing_s2s_number - Number of outgoing s2s connections on the node __Arguments:__ - __Result:__ - *s2s_outgoing* :: integer __Examples:__ - ~~~ json POST /api/outgoing_s2s_number { @@ -2990,12 +2505,8 @@ __Examples:__ {"s2s_outgoing": 1} ~~~ - - - ## privacy_set - Send a IQ set privacy stanza for a local account __Arguments:__ @@ -3010,7 +2521,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/privacy_set { @@ -3023,12 +2533,8 @@ __Examples:__ "" ~~~ - - - ## private_get - Get some information from a user private storage __Arguments:__ @@ -3044,7 +2550,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/private_get { @@ -3058,12 +2563,8 @@ __Examples:__ {"res": "aaaaa"} ~~~ - - - ## private_set - Set to the user private storage __Arguments:__ @@ -3078,7 +2579,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/private_set { @@ -3091,31 +2591,27 @@ __Examples:__ "" ~~~ - - - ## process_rosteritems - List/delete rosteritems that match filter - Explanation of each argument: - - action: what to do with each rosteritem that matches all the filtering options - - subs: subscription type - - asks: pending subscription - - users: the JIDs of the local user - - contacts: the JIDs of the contact in the roster - *** Mnesia: +- action: what to do with each rosteritem that matches all the filtering options +- subs: subscription type +- asks: pending subscription +- users: the JIDs of the local user +- contacts: the JIDs of the contact in the roster + + *** Mnesia: Allowed values in the arguments: ACTION = list | delete - SUBS = SUB[:SUB]* | any + SUBS = SUB[:SUB]*| any SUB = none | from | to | both ASKS = ASK[:ASK]* | any ASK = none | out | in - USERS = JID[:JID]* | any + USERS = JID[:JID]*| any CONTACTS = JID[:JID]* | any JID = characters valid in a JID, and can use the globs: *, ?, ! and [...] @@ -3149,7 +2645,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/process_rosteritems { @@ -3173,12 +2668,8 @@ __Examples:__ ] ~~~ - - - ## push_alltoall - Add all the users to all the users of Host in Group __Arguments:__ @@ -3192,7 +2683,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/push_alltoall { @@ -3204,15 +2694,10 @@ __Examples:__ "" ~~~ - - - ## push_roster - Push template roster from file to a user - The text file must contain an erlang term: a list of tuples with username, servername, group and nick. Example: [{<<"user1">>, <<"localhost">>, <<"Workers">>, <<"User 1">>}, {<<"user2">>, <<"localhost">>, <<"Workers">>, <<"User 2">>}]. @@ -3231,7 +2716,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/push_roster { @@ -3244,15 +2728,10 @@ __Examples:__ "" ~~~ - - - ## push_roster_all - Push template roster from file to all those users - The text file must contain an erlang term: a list of tuples with username, servername, group and nick. Example: [{"user1", "localhost", "Workers", "User 1"}, {"user2", "localhost", "Workers", "User 2"}]. @@ -3267,7 +2746,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/push_roster_all { @@ -3278,12 +2756,8 @@ __Examples:__ "" ~~~ - - - ## register - Register a user __Arguments:__ @@ -3298,7 +2772,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/register { @@ -3311,12 +2784,8 @@ __Examples:__ "Success" ~~~ - - - ## registered_users - List all registered users in HOST __Arguments:__ @@ -3329,7 +2798,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/registered_users { @@ -3343,24 +2811,18 @@ __Examples:__ ] ~~~ - - - ## registered_vhosts - List all registered vhosts in SERVER __Arguments:__ - __Result:__ - *vhosts* :: [vhost::string] : List of available vhosts __Examples:__ - ~~~ json POST /api/registered_vhosts { @@ -3374,24 +2836,18 @@ __Examples:__ ] ~~~ - - - ## reload_config - Reload config file in memory __Arguments:__ - __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Examples:__ - ~~~ json POST /api/reload_config { @@ -3402,12 +2858,8 @@ __Examples:__ "" ~~~ - - - ## remove_mam_for_user - Remove mam archive for user __Arguments:__ @@ -3421,7 +2873,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/remove_mam_for_user { @@ -3433,12 +2884,8 @@ __Examples:__ "MAM archive removed" ~~~ - - - ## remove_mam_for_user_with_peer - Remove mam archive for user with peer __Arguments:__ @@ -3453,7 +2900,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/remove_mam_for_user_with_peer { @@ -3466,24 +2912,18 @@ __Examples:__ "MAM archive removed" ~~~ - - - ## reopen_log - Reopen the log files __Arguments:__ - __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Examples:__ - ~~~ json POST /api/reopen_log { @@ -3494,12 +2934,8 @@ __Examples:__ "" ~~~ - - - ## resource_num - Resource string of a session number __Arguments:__ @@ -3514,7 +2950,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/resource_num { @@ -3525,26 +2960,20 @@ __Examples:__ HTTP/1.1 200 OK {"resource": "Psi"} -~~~ - - - +~~~ ## restart - Restart ejabberd gracefully __Arguments:__ - __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Examples:__ - ~~~ json POST /api/restart { @@ -3555,12 +2984,8 @@ __Examples:__ "" ~~~ - - - ## restart_module - Stop an ejabberd module, reload code and start __Arguments:__ @@ -3571,13 +2996,12 @@ __Arguments:__ __Result:__ - *res* :: integer : Returns integer code: - - 0: code reloaded, module restarted - - 1: error: module not loaded - - 2: code not reloaded, but module restarted +- 0: code reloaded, module restarted +- 1: error: module not loaded +- 2: code not reloaded, but module restarted __Examples:__ - ~~~ json POST /api/restart_module { @@ -3589,12 +3013,8 @@ __Examples:__ {"res": 0} ~~~ - - - ## restore - Restore the database from backup file __Arguments:__ @@ -3607,7 +3027,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/restore { @@ -3618,15 +3037,10 @@ __Examples:__ "Success" ~~~ - - - ## rooms_empty_destroy - Destroy the rooms that have no messages in archive - The MUC service argument can be 'global' to get all hosts. __Arguments:__ @@ -3639,7 +3053,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/rooms_empty_destroy { @@ -3653,15 +3066,10 @@ __Examples:__ ] ~~~ - - - ## rooms_empty_list - List the rooms that have no messages in archive - The MUC service argument can be 'global' to get all hosts. __Arguments:__ @@ -3674,7 +3082,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/rooms_empty_list { @@ -3688,15 +3095,10 @@ __Examples:__ ] ~~~ - - - ## rooms_unused_destroy - Destroy the rooms that are unused for many days in the service - The room recent history is used, so it's recommended to wait a few days after service start before running this. The MUC service argument can be 'global' to get all hosts. __Arguments:__ @@ -3710,7 +3112,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/rooms_unused_destroy { @@ -3725,15 +3126,10 @@ __Examples:__ ] ~~~ - - - ## rooms_unused_list - List the rooms that are unused for many days in the service - The room recent history is used, so it's recommended to wait a few days after service start before running this. The MUC service argument can be 'global' to get all hosts. __Arguments:__ @@ -3747,7 +3143,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/rooms_unused_list { @@ -3762,24 +3157,18 @@ __Examples:__ ] ~~~ - - - ## rotate_log - Rotate the log files __Arguments:__ - __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Examples:__ - ~~~ json POST /api/rotate_log { @@ -3790,18 +3179,13 @@ __Examples:__ "" ~~~ - - - ## send_direct_invitation - Send a direct invitation to several destinations - Since ejabberd 20.12, this command is asynchronous: the API call may return before the server has send all the invitations. -Password and Message can also be: none. Users JIDs are separated with : +Password and Message can also be: none. Users JIDs are separated with : __Arguments:__ @@ -3817,7 +3201,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/send_direct_invitation { @@ -3832,15 +3215,10 @@ __Examples:__ "" ~~~ - - - ## send_message - Send a message to a local or remote bare of full JID - When sending a groupchat message to a MUC room, FROM must be the full JID of a room occupant, or the bare JID of a MUC service admin, or the bare JID of a MUC/Sub subscribed user. __Arguments:__ @@ -3857,7 +3235,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/send_message { @@ -3872,12 +3249,8 @@ __Examples:__ "" ~~~ - - - ## send_stanza - Send a stanza; provide From JID and valid To JID __Arguments:__ @@ -3892,7 +3265,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/send_stanza { @@ -3905,12 +3277,8 @@ __Examples:__ "" ~~~ - - - ## send_stanza_c2s - Send a stanza as if sent from a c2s session __Arguments:__ @@ -3926,7 +3294,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/send_stanza_c2s { @@ -3940,15 +3307,10 @@ __Examples:__ "" ~~~ - - - ## set_last - Set last activity information - Timestamp is the seconds since 1970-01-01 00:00:00 UTC, for example: date +%s __Arguments:__ @@ -3964,7 +3326,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/set_last { @@ -3978,12 +3339,8 @@ __Examples:__ "" ~~~ - - - ## set_loglevel - Set the loglevel __Arguments:__ @@ -3996,7 +3353,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/set_loglevel { @@ -4007,15 +3363,10 @@ __Examples:__ "" ~~~ - - - ## set_master - Set master node of the clustered Mnesia tables - If you provide as nodename "self", this node will be set as its own master. __Arguments:__ @@ -4028,7 +3379,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/set_master { @@ -4039,12 +3389,8 @@ __Examples:__ "Success" ~~~ - - - ## set_nickname - Set nickname in a user's vCard __Arguments:__ @@ -4059,7 +3405,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/set_nickname { @@ -4072,12 +3417,8 @@ __Examples:__ "" ~~~ - - - ## set_presence - Set presence of a session __Arguments:__ @@ -4096,7 +3437,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/set_presence { @@ -4113,12 +3453,8 @@ __Examples:__ "" ~~~ - - - ## set_room_affiliation - Change an affiliation in a MUC room __Arguments:__ @@ -4134,7 +3470,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/set_room_affiliation { @@ -4148,24 +3483,19 @@ __Examples:__ "" ~~~ - - - ## set_vcard - Set content in a vCard field - Some vcard field names in get/set_vcard are: -* FN - Full Name -* NICKNAME - Nickname -* BDAY - Birthday -* TITLE - Work: Position -* ROLE - Work: Role +- FN - Full Name +- NICKNAME - Nickname +- BDAY - Birthday +- TITLE - Work: Position +- ROLE - Work: Role -For a full list of vCard fields check XEP-0054: vcard-temp at http://www.xmpp.org/extensions/xep-0054.html +For a full list of vCard fields check XEP-0054: vcard-temp at __Arguments:__ @@ -4180,7 +3510,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/set_vcard { @@ -4194,31 +3523,26 @@ __Examples:__ "" ~~~ - - - ## set_vcard2 - Set content in a vCard subfield - Some vcard field names and subnames in get/set_vcard2 are: -* N FAMILY - Family name -* N GIVEN - Given name -* N MIDDLE - Middle name -* ADR CTRY - Address: Country -* ADR LOCALITY - Address: City -* TEL HOME - Telephone: Home -* TEL CELL - Telephone: Cellphone -* TEL WORK - Telephone: Work -* TEL VOICE - Telephone: Voice -* EMAIL USERID - E-Mail Address -* ORG ORGNAME - Work: Company -* ORG ORGUNIT - Work: Department +- N FAMILY - Family name +- N GIVEN - Given name +- N MIDDLE - Middle name +- ADR CTRY - Address: Country +- ADR LOCALITY - Address: City +- TEL HOME - Telephone: Home +- TEL CELL - Telephone: Cellphone +- TEL WORK - Telephone: Work +- TEL VOICE - Telephone: Voice +- EMAIL USERID - E-Mail Address +- ORG ORGNAME - Work: Company +- ORG ORGUNIT - Work: Department -For a full list of vCard fields check XEP-0054: vcard-temp at http://www.xmpp.org/extensions/xep-0054.html +For a full list of vCard fields check XEP-0054: vcard-temp at __Arguments:__ @@ -4234,7 +3558,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/set_vcard2 { @@ -4249,31 +3572,26 @@ __Examples:__ "" ~~~ - - - ## set_vcard2_multi - Set multiple contents in a vCard subfield - Some vcard field names and subnames in get/set_vcard2 are: -* N FAMILY - Family name -* N GIVEN - Given name -* N MIDDLE - Middle name -* ADR CTRY - Address: Country -* ADR LOCALITY - Address: City -* TEL HOME - Telephone: Home -* TEL CELL - Telephone: Cellphone -* TEL WORK - Telephone: Work -* TEL VOICE - Telephone: Voice -* EMAIL USERID - E-Mail Address -* ORG ORGNAME - Work: Company -* ORG ORGUNIT - Work: Department +- N FAMILY - Family name +- N GIVEN - Given name +- N MIDDLE - Middle name +- ADR CTRY - Address: Country +- ADR LOCALITY - Address: City +- TEL HOME - Telephone: Home +- TEL CELL - Telephone: Cellphone +- TEL WORK - Telephone: Work +- TEL VOICE - Telephone: Voice +- EMAIL USERID - E-Mail Address +- ORG ORGNAME - Work: Company +- ORG ORGUNIT - Work: Department -For a full list of vCard fields check XEP-0054: vcard-temp at http://www.xmpp.org/extensions/xep-0054.html +For a full list of vCard fields check XEP-0054: vcard-temp at __Arguments:__ @@ -4289,7 +3607,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/set_vcard2_multi { @@ -4307,15 +3624,10 @@ __Examples:__ "" ~~~ - - - ## srg_create - Create a Shared Roster Group - If you want to specify several group identifiers in the Display argument, put \ " around the argument and separate the identifiers with \ \ n @@ -4336,7 +3648,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/srg_create { @@ -4351,12 +3662,8 @@ __Examples:__ "" ~~~ - - - ## srg_delete - Delete a Shared Roster Group __Arguments:__ @@ -4370,7 +3677,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/srg_delete { @@ -4382,12 +3688,8 @@ __Examples:__ "" ~~~ - - - ## srg_get_info - Get info of a Shared Roster Group __Arguments:__ @@ -4401,7 +3703,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/srg_get_info { @@ -4422,12 +3723,8 @@ __Examples:__ ] ~~~ - - - ## srg_get_members - Get members of a Shared Roster Group __Arguments:__ @@ -4441,7 +3738,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/srg_get_members { @@ -4456,12 +3752,8 @@ __Examples:__ ] ~~~ - - - ## srg_list - List the Shared Roster Groups in Host __Arguments:__ @@ -4474,7 +3766,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/srg_list { @@ -4488,12 +3779,8 @@ __Examples:__ ] ~~~ - - - ## srg_user_add - Add the JID user@host to the Shared Roster Group __Arguments:__ @@ -4509,7 +3796,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/srg_user_add { @@ -4523,12 +3809,8 @@ __Examples:__ "" ~~~ - - - ## srg_user_del - Delete this JID user@host from the Shared Roster Group __Arguments:__ @@ -4544,7 +3826,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/srg_user_del { @@ -4558,12 +3839,8 @@ __Examples:__ "" ~~~ - - - ## stats - Get statistical value: registeredusers onlineusers onlineusersnode uptimeseconds processes __Arguments:__ @@ -4576,7 +3853,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/stats { @@ -4587,12 +3863,8 @@ __Examples:__ {"stat": 6} ~~~ - - - ## stats_host - Get statistical value for this host: registeredusers onlineusers __Arguments:__ @@ -4606,7 +3878,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/stats_host { @@ -4618,24 +3889,18 @@ __Examples:__ {"stat": 6} ~~~ - - - ## status - Get status of the ejabberd server __Arguments:__ - __Result:__ - *res* :: string : Raw result string __Examples:__ - ~~~ json POST /api/status { @@ -4646,12 +3911,8 @@ __Examples:__ "The node ejabberd@localhost is started with status: startedejabberd X.X is running in that node" ~~~ - - - ## status_list - List of logged users with this status __Arguments:__ @@ -4664,7 +3925,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/status_list { @@ -4683,12 +3943,8 @@ __Examples:__ ] ~~~ - - - ## status_list_host - List of users logged in host with their statuses __Arguments:__ @@ -4702,7 +3958,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/status_list_host { @@ -4722,12 +3977,8 @@ __Examples:__ ] ~~~ - - - ## status_num - Number of logged users with this status __Arguments:__ @@ -4740,7 +3991,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/status_num { @@ -4751,12 +4001,8 @@ __Examples:__ {"users": 23} ~~~ - - - ## status_num_host - Number of logged users with this status in host __Arguments:__ @@ -4770,7 +4016,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/status_num_host { @@ -4782,24 +4027,18 @@ __Examples:__ {"users": 23} ~~~ - - - ## stop - Stop ejabberd gracefully __Arguments:__ - __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Examples:__ - ~~~ json POST /api/stop { @@ -4810,16 +4049,11 @@ __Examples:__ "" ~~~ - - - ## stop_kindly - Inform users and rooms, wait, and stop the server - -Provide the delay in seconds, and the announcement quoted, for example: +Provide the delay in seconds, and the announcement quoted, for example: ejabberdctl stop_kindly 60 \"The server will stop in one minute.\" __Arguments:__ @@ -4833,7 +4067,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/stop_kindly { @@ -4845,24 +4078,18 @@ __Examples:__ "" ~~~ - - - ## stop_s2s_connections - Stop all s2s outgoing and incoming connections __Arguments:__ - __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Examples:__ - ~~~ json POST /api/stop_s2s_connections { @@ -4873,12 +4100,8 @@ __Examples:__ "" ~~~ - - - ## subscribe_room - Subscribe to a MUC conference __Arguments:__ @@ -4894,7 +4117,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/subscribe_room { @@ -4911,15 +4133,10 @@ __Examples:__ ] ~~~ - - - ## unban_ip - Remove banned IP addresses from the fail2ban table - Accepts an IP address with a network mask. Returns the number of unbanned addresses, or a negative integer if there were any error. __Arguments:__ @@ -4932,7 +4149,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/unban_ip { @@ -4943,12 +4159,8 @@ __Examples:__ {"unbanned": 3} ~~~ - - - ## unregister - Unregister a user __Arguments:__ @@ -4962,7 +4174,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/unregister { @@ -4974,12 +4185,8 @@ __Examples:__ "Success" ~~~ - - - ## unsubscribe_room - Unsubscribe from a MUC conference __Arguments:__ @@ -4993,7 +4200,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/unsubscribe_room { @@ -5005,12 +4211,8 @@ __Examples:__ "" ~~~ - - - ## update - Update the given module, or use the keyword: all __Arguments:__ @@ -5023,7 +4225,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/update { @@ -5034,24 +4235,18 @@ __Examples:__ "Success" ~~~ - - - ## update_list - List modified modules that can be updated __Arguments:__ - __Result:__ - *modules* :: [module::string] __Examples:__ - ~~~ json POST /api/update_list { @@ -5065,24 +4260,18 @@ __Examples:__ ] ~~~ - - - ## update_sql - Convert SQL DB to the new format __Arguments:__ - __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Examples:__ - ~~~ json POST /api/update_sql { @@ -5093,12 +4282,8 @@ __Examples:__ "" ~~~ - - - ## user_resources - List user's connected resources __Arguments:__ @@ -5112,7 +4297,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/user_resources { @@ -5128,12 +4312,8 @@ __Examples:__ ] ~~~ - - - ## user_sessions_info - Get information about all sessions of a user __Arguments:__ @@ -5147,7 +4327,6 @@ __Result:__ __Examples:__ - ~~~ json POST /api/user_sessions_info { @@ -5170,5 +4349,3 @@ __Examples:__ } ] ~~~ - - diff --git a/content/archive/20_12/index.md b/content/archive/20.12/index.md similarity index 60% rename from content/archive/20_12/index.md rename to content/archive/20.12/index.md index d787603f..e1983e7c 100644 --- a/content/archive/20_12/index.md +++ b/content/archive/20.12/index.md @@ -1,15 +1,11 @@ ---- -title: Archived Documentation for 20.12 -menu: 20.12 -order: 7987 ---- +# Archived Documentation for 20.12 This section contains some archived sections for ejabberd 20.12. If you are upgrading ejabberd from a previous release, you can check: -* [Specific version upgrade notes](/admin/upgrade/#specific-version-upgrade-notes) +* [Specific version upgrade notes](../../admin/upgrade/index.md#specific_version_upgrade_notes) * [ejabberd 20.12 release announcement](https://www.process-one.net/blog/ejabberd-20-12/) -* [Docs Github Compare from 20.07](https://github.com/processone/docs.ejabberd.im/compare/20.07...20.12) -* [ejabberd Github Compare from 20.07](https://github.com/processone/ejabberd/compare/20.07...20.12) +* [Docs Github Compare from 20.07](https://github.com/processone/docs.ejabberd.im/compare/20.07..20.12) +* [ejabberd Github Compare from 20.07](https://github.com/processone/ejabberd/compare/20.07..20.12) diff --git a/content/archive/20_12/listen-options.md b/content/archive/20.12/listen-options.md similarity index 85% rename from content/archive/20_12/listen-options.md rename to content/archive/20.12/listen-options.md index e3becd54..de548b5f 100644 --- a/content/archive/20_12/listen-options.md +++ b/content/archive/20.12/listen-options.md @@ -1,10 +1,9 @@ --- -title: Listen Options -toc: true -menu: Listen Options -order: 51 +search: + exclude: true --- +# Listen Options This is a detailed description of each option allowed by the listening modules: @@ -34,11 +33,11 @@ The default is to use system defined file if possible. This option is useful to define the file for a specific port listener. To set a file for all client listeners or for specific vhosts, you can use the -[`c2s_cafile`](/archive/20_12/toplevel/#c2s-cafile) top-level option. +[`c2s_cafile`](toplevel.md#c2s-cafile) top-level option. To set a file for all server connections, you can use the -[`s2s_cafile`](/archive/20_12/toplevel/#s2s-cafile) top-level option +[`s2s_cafile`](toplevel.md#s2s-cafile) top-level option or the -[`ca_file`](/archive/20_12/toplevel/#ca-file) top-level option. +[`ca_file`](toplevel.md#ca_file) top-level option. ## certfile @@ -48,15 +47,15 @@ Path to the certificate file. Only makes sense when the [`tls`](#tls) options is set. If this option is not set, you should set the -[`certfiles`](/archive/20_12/toplevel/#certfiles) top-level option -or configure [ACME](/admin/configuration/basic/#acme). +[`certfiles`](toplevel.md#certfiles) top-level option +or configure [ACME](../../admin/configuration/basic.md#acme). ## check_from *true | false* This option can be used with -[`ejabberd_service`](/archive/20_12/listen/#ejabberd-service) only. +[`ejabberd_service`](listen.md#ejabberd_service) only. [`XEP-0114`](http://xmpp.org/extensions/xep-0114.html) requires that the domain must match the hostname of the component. If this option is set to `false`, `ejabberd` will allow the component to send @@ -86,7 +85,7 @@ Default value is: `[]` If the HTTP request received by ejabberd contains the HTTP header `Host` with an ambiguous virtual host that doesn’t match any one defined in ejabberd (see - [Host Names](/admin/configuration/basic/#host-names)), + [Host Names](../../admin/configuration/basic.md#host_names)), then this configured HostName is set as the request Host. The default value of this option is: `undefined`. @@ -106,7 +105,7 @@ Full path to a file containing custom parameters for Diffie-Hellman key *true | false* This option emulates legacy behaviour which registers all routes -defined in [`hosts`](/archive/20_12/toplevel/#hosts) +defined in [`hosts`](toplevel.md#hosts) on a component connected. This behaviour is considered harmful in the case when it's desired to multiplex different components on the same port, so, to disable it, @@ -121,7 +120,7 @@ to maintain backward compatibility with existing deployments. *{Hostname: [HostOption, ...]}* The external Jabber component that connects to this -[`ejabberd_service`](/archive/20_12/listen/#ejabberd-service) +[`ejabberd_service`](listen.md#ejabberd_service) can serve one or more hostnames. As `HostOption` you can define options for the component; currently the only allowed option is the password required to the component when attempt to @@ -145,10 +144,10 @@ This option specifies the maximum number of elements in the queue of corresponding connection (if any) will be terminated and error message will be logged. The reasonable value for this option depends on your hardware configuration. This option can be specified for - [`ejabberd_service`](/archive/20_12/listen/#ejabberd-service) - and [`ejabberd_c2s`](/archive/20_12/listen/#ejabberd-c2s) + [`ejabberd_service`](listen.md#ejabberd_service) + and [`ejabberd_c2s`](listen.md#ejabberd_c2s) listeners, or also globally for - [`ejabberd_s2s_out`](/archive/20_12/listen/#ejabberd-s2s-out). + [`ejabberd_s2s_out`](listen.md#ejabberd_s2s-out). If the option is not specified for `ejabberd_service` or `ejabberd_c2s` listeners, the globally configured value is used. The allowed values are integers and @@ -203,7 +202,7 @@ List of general options relating to SSL/TLS. These map to *{Path: Module}* To define one or several handlers that will serve HTTP requests in -[`ejabberd_http`](/archive/20_12/listen/#ejabberd-http). The +[`ejabberd_http`](listen.md#ejabberd_http). The Path is a string; so the URIs that start with that Path will be served by Module. For example, if you want `mod_foo` to serve the URIs that start with `/a/b/`, and you also want `mod_bosh` to @@ -219,7 +218,7 @@ To define one or several handlers that will serve HTTP requests in *none | ShaperName* This option defines a shaper for the port (see section  -[Shapers](/admin/configuration/basic/#shapers)). +[Shapers](../../admin/configuration/basic.md#shapers)). The default value is `none`. ## shaper_rule @@ -227,8 +226,8 @@ This option defines a shaper for the port (see section  *none | ShaperRule* This option defines a shaper rule for -[`ejabberd_service`](/archive/20_12/listen/#ejabberd-service) (see -section [Shapers](/admin/configuration/basic/#shapers)). +[`ejabberd_service`](listen.md#ejabberd_service) (see +section [Shapers](../../admin/configuration/basic.md#shapers)). The recommended value is `fast`. ## starttls @@ -237,8 +236,8 @@ The recommended value is `fast`. This option specifies that STARTTLS encryption is available on connections to the port. You should also set the -[`certfiles`](/archive/20_12/toplevel/#certfiles) top-level option -or configure [ACME](/admin/configuration/basic/#acme). +[`certfiles`](toplevel.md#certfiles) top-level option +or configure [ACME](../../admin/configuration/basic.md#acme). ## starttls_required @@ -247,8 +246,8 @@ or configure [ACME](/admin/configuration/basic/#acme). This option specifies that STARTTLS encryption is required on connections to the port. No unencrypted connections will be allowed. You should also set the -[`certfiles`](/archive/20_12/toplevel/#certfiles) top-level option -or configure [ACME](/admin/configuration/basic/#acme). +[`certfiles`](toplevel.md#certfiles) top-level option +or configure [ACME](../../admin/configuration/basic.md#acme). ## tag @@ -256,7 +255,7 @@ or configure [ACME](/admin/configuration/basic/#acme). Allow specifying a tag in a `listen` section and later use it to have a special -[`api_permissions`](/archive/20_12/toplevel/#api_permissions) +[`api_permissions`](toplevel.md#api_permissions) just for it. For example: @@ -297,11 +296,11 @@ This option specifies that traffic on the port will be encrypted [`starttls`](#starttls). If this option is set, you should also set the - [`certfiles`](/archive/20_12/toplevel/#certfiles) top-level - option or configure [ACME](/admin/configuration/basic/#acme). + [`certfiles`](toplevel.md#certfiles) top-level + option or configure [ACME](../../admin/configuration/basic.md#acme). The option `tls` can also be used in - [`ejabberd_http`](/archive/20_12/listen/#ejabberd-http) + [`ejabberd_http`](listen.md#ejabberd_http) to support HTTPS. ## tls_compression diff --git a/content/archive/20_12/listen.md b/content/archive/20.12/listen.md similarity index 79% rename from content/archive/20_12/listen.md rename to content/archive/20.12/listen.md index 0206d348..506d8241 100644 --- a/content/archive/20_12/listen.md +++ b/content/archive/20.12/listen.md @@ -1,11 +1,8 @@ --- -title: Listen Modules -toc: true -menu: Listen Modules -order: 50 +search: + exclude: true --- - # Listen Option The **listen option** defines for which ports, addresses and network @@ -73,35 +70,35 @@ are: Handles c2s connections. Options: -[access](/archive/20_12/listen-options/#access), -[cafile](/archive/20_12/listen-options/#cafile), -[ciphers](/archive/20_12/listen-options/#ciphers), -[dhfile](/archive/20_12/listen-options/#dhfile), -[max_fsm_queue](/archive/20_12/listen-options/#max-fsm-queue), -[max_stanza_size](/archive/20_12/listen-options/#max-stanza-size), -[protocol_options](/archive/20_12/listen-options/#protocol-options), -[shaper](/archive/20_12/listen-options/#shaper), -[starttls](/archive/20_12/listen-options/#starttls), -[starttls_required](/archive/20_12/listen-options/#starttls-required), -[tls](/archive/20_12/listen-options/#tls), -[tls_compression](/archive/20_12/listen-options/#tls-compression), -[tls_verify](/archive/20_12/listen-options/#tls-verify), -[zlib](/archive/20_12/listen-options/#zlib). +[access](listen-options.md#access), +[cafile](listen-options.md#cafile), +[ciphers](listen-options.md#ciphers), +[dhfile](listen-options.md#dhfile), +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_stanza_size](listen-options.md#max_stanza_size), +[protocol_options](listen-options.md#protocol_options), +[shaper](listen-options.md#shaper), +[starttls](listen-options.md#starttls), +[starttls_required](listen-options.md#starttls_required), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls-compression), +[tls_verify](listen-options.md#tls_verify), +[zlib](listen-options.md#zlib). ## ejabberd_s2s_in Handles incoming s2s connections. Options: -[cafile](/archive/20_12/listen-options/#cafile), -[ciphers](/archive/20_12/listen-options/#ciphers), -[dhfile](/archive/20_12/listen-options/#dhfile), -[max_fsm_queue](/archive/20_12/listen-options/#max-fsm-queue), -[max_stanza_size](/archive/20_12/listen-options/#max-stanza-size), -[protocol_options](/archive/20_12/listen-options/#protocol-options), -[shaper](/archive/20_12/listen-options/#shaper), -[tls](/archive/20_12/listen-options/#tls), -[tls_compression](/archive/20_12/listen-options/#tls-compression). +[cafile](listen-options.md#cafile), +[ciphers](listen-options.md#ciphers), +[dhfile](listen-options.md#dhfile), +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_stanza_size](listen-options.md#max_stanza_size), +[protocol_options](listen-options.md#protocol_options), +[shaper](listen-options.md#shaper), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls-compression). ## ejabberd_service @@ -111,22 +108,22 @@ Interacts with an ([`XEP-0114`](http://xmpp.org/extensions/xep-0114.html)). Options: -[access](/archive/20_12/listen-options/#access), -[cafile](/archive/20_12/listen-options/#cafile), -[certfile](/archive/20_12/listen-options/#certfile), -[check_from](/archive/20_12/listen-options/#check-from), -[ciphers](/archive/20_12/listen-options/#ciphers), -[dhfile](/archive/20_12/listen-options/#dhfile), -[global_routes](/archive/20_12/listen-options/#global-routes), -[hosts](/archive/20_12/listen-options/#hosts), -[max_fsm_queue](/archive/20_12/listen-options/#max-fsm-queue), -[max_stanza_size](/archive/20_12/listen-options/#max-stanza-size), -[password](/archive/20_12/listen-options/#password), -[protocol_options](/archive/20_12/listen-options/#protocol-options), -[shaper](/archive/20_12/listen-options/#shaper), -[shaper_rule](/archive/20_12/listen-options/#shaper-rule), -[tls](/archive/20_12/listen-options/#tls), -[tls_compression](/archive/20_12/listen-options/#tls-compression). +[access](listen-options.md#access), +[cafile](listen-options.md#cafile), +[certfile](listen-options.md#certfile), +[check_from](listen-options.md#check_from), +[ciphers](listen-options.md#ciphers), +[dhfile](listen-options.md#dhfile), +[global_routes](listen-options.md#global_routes), +[hosts](listen-options.md#hosts), +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_stanza_size](listen-options.md#max_stanza_size), +[password](listen-options.md#password), +[protocol_options](listen-options.md#protocol_options), +[shaper](listen-options.md#shaper), +[shaper_rule](listen-options.md#shaper-rule), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls-compression). ## ejabberd_sip @@ -134,12 +131,12 @@ Handles SIP requests as defined in [`RFC 3261`](http://tools.ietf.org/html/rfc3261). For details please check the -[ejabberd_sip](/archive/20_12/listen/#ejabberd-sip-1) -and [mod_sip](/archive/20_12/modules/#mod-sip) sections. +[ejabberd_sip](listen.md#ejabberd_sip_1) +and [mod_sip](modules.md#mod_sip) sections. General listener options: -[certfile](/archive/20_12/listen-options/#certfile), -[tls](/archive/20_12/listen-options/#tls). +[certfile](listen-options.md#certfile), +[tls](listen-options.md#tls). ## ejabberd_stun @@ -148,7 +145,7 @@ Handles STUN/TURN requests as defined in [`RFC 5766`](http://tools.ietf.org/html/rfc5766). For the specific module options, please check the -[ejabberd_stun](/archive/20_12/listen/#ejabberd-stun-1) section: +[ejabberd_stun](listen.md#ejabberd_stun_1) section: `auth_realm`, `auth_type`, `server_name`, @@ -162,58 +159,58 @@ For the specific module options, please check the `use_turn`. General listener options: -[certfile](/archive/20_12/listen-options/#certfile), -[shaper](/archive/20_12/listen-options/#shaper), -[tls](/archive/20_12/listen-options/#tls), +[certfile](listen-options.md#certfile), +[shaper](listen-options.md#shaper), +[tls](listen-options.md#tls), ## ejabberd_http Handles incoming HTTP connections. With the proper request handlers configured, this serves HTTP services like -[ACME](/admin/configuration/basic/#acme), -[API](/archive/20_12/modules/#mod-http-api), -[BOSH](/archive/20_12/modules/#mod-bosh), -[CAPTCHA](/admin/configuration/basic/#captcha), -[Fileserver](/archive/20_12/modules/#mod-http-fileserver), -[OAuth](/developer/ejabberd-api/oauth/), -[Upload](/archive/20_12/modules/#mod-http-upload), -[WebAdmin](/admin/guide/managing/#web-admin), -[WebSocket](/archive/20_12/listen/#ejabberd-http-ws), -[XMP-RPC](/archive/20_12/listen/#ejabberd-xmlrpc). +[ACME](../../admin/configuration/basic.md#acme), +[API](modules.md#mod_http_api), +[BOSH](modules.md#mod_bosh), +[CAPTCHA](../../admin/configuration/basic.md#captcha), +[Fileserver](modules.md#mod_http_fileserver), +[OAuth](../../developer/ejabberd-api/oauth.md), +[Upload](modules.md#mod_http_upload), +[WebAdmin](../../admin/guide/managing.md#web_admin), +[WebSocket](listen.md#ejabberd_http_ws), +[XMP-RPC](listen.md#ejabberd_xmlrpc). Options: -[cafile](/archive/20_12/listen-options/#cafile), -[ciphers](/archive/20_12/listen-options/#ciphers), -[custom_headers](/archive/20_12/listen-options/#custom-headers), -[default_host](/archive/20_12/listen-options/#default-host), -[dhfile](/archive/20_12/listen-options/#dhfile), -[protocol_options](/archive/20_12/listen-options/#protocol-options), -[request_handlers](/archive/20_12/listen-options/#request-handlers), -[tag](/archive/20_12/listen-options/#tag), -[tls](/archive/20_12/listen-options/#tls), -[tls_compression](/archive/20_12/listen-options/#tls-compression), -and the [trusted_proxies](/archive/20_12/toplevel/#trusted-proxies) top-level option. +[cafile](listen-options.md#cafile), +[ciphers](listen-options.md#ciphers), +[custom_headers](listen-options.md#custom_headers), +[default_host](listen-options.md#default_host), +[dhfile](listen-options.md#dhfile), +[protocol_options](listen-options.md#protocol_options), +[request_handlers](listen-options.md#request_handlers), +[tag](listen-options.md#tag), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls-compression), +and the [trusted_proxies](toplevel.md#trusted_proxies) top-level option. ## mod_mqtt Support for MQTT requires configuring `mod_mqtt` both in the -[listen](/archive/20_12/toplevel/#listen) and the -[modules](/archive/20_12/toplevel/#modules) sections. -Check the [mod_mqtt modules options](/archive/20_12/modules/#mod-mqtt). -Check the advanded documentation in [MQTT Support](/admin/guide/mqtt/). +[listen](toplevel.md#listen) and the +[modules](toplevel.md#modules) sections. +Check the [mod_mqtt modules options](modules.md#mod_mqtt). +Check the advanded documentation in [MQTT Support](../../admin/guide/mqtt/index.md). Listen options: -[max_fsm_queue](/archive/20_12/listen-options/#max-fsm-queue), -[max_payload_size](/archive/20_12/listen-options/#max-payload-size), -[tls](/archive/20_12/listen-options/#tls), -[tls_verify](/archive/20_12/listen-options/#tls-verify). +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_payload_size](listen-options.md#max_payload_size), +[tls](listen-options.md#tls), +[tls_verify](listen-options.md#tls_verify). # ejabberd_stun `ejabberd` is able to act as a stand-alone STUN/TURN server -([`RFC 5389`](http://tools.ietf.ml/rfc5389)/[`RFC 5766`](http://tools.ietf.org/html/rfc5766). +([`RFC 5389`](http://tools.ietf.org/html/rfc5389)/[`RFC 5766`](http://tools.ietf.org/html/rfc5766). In that role `ejabberd` helps clients with ICE ([`RFC 5245`](http://tools.ietf.org/html/rfc5245) or Jingle ICE ([`XEP-0176`](http://xmpp.org/extensions/xep-0176.html) support to @@ -328,14 +325,14 @@ And you should also add these in the case if TURN is enabled: ## SIP Configuration `ejabberd` has built-in SIP support. To activate this feature, -add the [`ejabberd_sip`](#ejabberd-sip) listen module, enable -[`mod_sip`](/archive/20_12/modules/#mod-sip) module +add the [`ejabberd_sip`](#ejabberd_sip) listen module, enable +[`mod_sip`](modules.md#mod_sip) module for the desired virtual host, and configure DNS properly. To add a listener you should configure `ejabberd_sip` listening module as described in [Listen](#listen-option) section. -If option [`tls`](/archive/20_12/listen-options/#tls) is specified, -option [`certfile`](/archive/20_12/listen-options/#certfile) +If option [`tls`](listen-options.md#tls) is specified, +option [`certfile`](listen-options.md#certfile) must be specified as well, otherwise incoming TLS connections would fail. @@ -413,7 +410,7 @@ section of `ejabberd_http` listener: ... This module can be configured by using those options that should be -placed in general section of config file: [websocket\_origin](/archive/20_12/toplevel/#websocket-origin), [websocket\_ping\_interval](/archive/20_12/toplevel/#websocket-ping-interval), [websocket\_timeout](/archive/20_12/toplevel/#websocket-timeout). +placed in general section of config file: [websocket\_origin](toplevel.md#websocket_origin), [websocket\_ping\_interval](toplevel.md#websocket_ping_interval), [websocket\_timeout](toplevel.md#websocket_timeout). ## Discovery @@ -434,9 +431,9 @@ A test client can be found on Github: [Websocket test client](https://github.com # ejabberd_xmlrpc Handles XML-RPC requests to execute -[ejabberd commands](/admin/guide/managing/#ejabberd-commands). +[ejabberd commands](../../admin/guide/managing.md#ejabberd_commands). It is configured as a request handler in -[ejabberd_http](/archive/20_12/listen/#ejabberd-http). +[ejabberd_http](listen.md#ejabberd_http). By default there is no restriction to who can execute what commands, so it is strongly recommended that you configure restrictions using @@ -495,11 +492,11 @@ With that configuration, it is possible to execute two specific commands using print calling('registered_users', {'host':'localhost'}) It's possible to use OAuth for authentication instead of plain password, see -[OAuth Support](/developer/ejabberd-api/oauth/). +[OAuth Support](../../developer/ejabberd-api/oauth.md). In ejabberd 20.03 and older, it was possible to configure `ejabberd_xmlrpc` as a listener, see the old document for reference and example configuration: -[Listening Module](/admin/configuration/old/#listening-module). +[Listening Module](../old.md#listening_module). Just for reference, there's also the old [`ejabberd_xmlrpc documentation`](http://www.ejabberd.im/ejabberd_xmlrpc). @@ -526,7 +523,7 @@ For example, the following simple configuration defines: service. - Port 5281 listens for HTTP requests, using HTTPS to serve HTTP-Bind - (BOSH) and the Web Admin as explained in [Managing: Web Admin](/admin/guide/managing/#web-admin). The + (BOSH) and the Web Admin as explained in [Managing: Web Admin](../../admin/guide/managing.md#web_admin). The socket only listens connections to the IP address 127.0.0.1. @@ -600,7 +597,7 @@ In this example, the following configuration defines that: - Port 5280 is serving the Web Admin and the HTTP-Bind (BOSH) service in all the IPv4 addresses. Note that it is also possible to serve them - on different ports. The second example in section [Managing: Web Admin](/admin/guide/managing/#web-admin) shows + on different ports. The second example in section [Managing: Web Admin](../../admin/guide/managing.md#web_admin) shows how exactly this can be done. A request handler to serve MQTT over Websocket is also defined. - All users except for the administrators have a traffic of limit diff --git a/content/archive/20_12/modules.md b/content/archive/20.12/modules.md similarity index 99% rename from content/archive/20_12/modules.md rename to content/archive/20.12/modules.md index ffe81ff6..7625444c 100644 --- a/content/archive/20_12/modules.md +++ b/content/archive/20.12/modules.md @@ -1,10 +1,9 @@ --- -title: Modules Options -toc: true -menu: Modules Options -order: 95 +search: + exclude: true --- +# Modules Options mod\_adhoc ---------- @@ -83,7 +82,7 @@ mod\_admin\_update\_sql This module can be used to update existing SQL database from the default to the new schema. Check the section [Default and New -Schemas](/admin/configuration/database-ldap/#default-and-new-schemas) for details. +Schemas](../../admin/configuration/ldap.md#default_and_new_schemas) for details. When the module is loaded use *update\_sql* ejabberdctl command. The module has no options. @@ -2751,11 +2750,11 @@ password in multiple places. - Connection parameters: The module also accepts the connection parameters, all of which default to the top-level parameter of the same name, if unspecified. See [LDAP - Connection](/admin/configuration/database-ldap/#ldap-connection) section for + Connection](../../admin/configuration/ldap.md#ldap_connection) section for more information about them. Check also the [Configuration -examples](/admin/configuration/database-ldap/#configuration-examples) section to +examples](../../admin/configuration/ldap.md#configuration_examples) section to get details about retrieving the roster, and configuration examples including Flat DIT and Deep DIT. @@ -2795,7 +2794,7 @@ only. - **ldap\_filter** Additional filter which is AND-ed together with "User Filter" and "Group Filter". For more information check the LDAP -[Filters](/admin/configuration/database-ldap/#filters) section. +[Filters](../../admin/configuration/ldap.md#filters) section. - **ldap\_gfilter** "Group Filter", used when retrieving human-readable name (a.k.a. @@ -2832,7 +2831,7 @@ section Filters. - **ldap\_memberattr\_format\_re** A regex for extracting user ID from the value of the attribute named by *ldap\_memberattr*. Check the LDAP [Control -Parameters](/admin/configuration/database-ldap/#control-parameters) section. +Parameters](../../admin/configuration/ldap.md#control_parameters) section. - **ldap\_password** Same as top-level *ldap\_password* option, but applied to this module @@ -2875,7 +2874,7 @@ only. "User Filter", used for retrieving the human-readable name of roster entries (usually full names of people in the roster). See also the parameters *ldap\_userdesc* and *ldap\_useruid*. For more information -check the LDAP [Filters](/admin/configuration/database-ldap/#filters) section. +check the LDAP [Filters](../../admin/configuration/ldap.md#filters) section. - **ldap\_uids** Same as top-level *ldap\_uids* option, but applied to this module only. @@ -2918,7 +2917,7 @@ virtual host. > > It is not enough to just load this module. You should also configure > listeners and DNS records properly. For details see the section about -> the [ejabberd\_sip](/archive/20_12/listen/#ejabberd-sip) listen module in +> the [ejabberd\_sip](listen.md#ejabberd_sip) listen module in > the ejabberd Documentation. __Available options:__ diff --git a/content/archive/20_12/toplevel.md b/content/archive/20.12/toplevel.md similarity index 98% rename from content/archive/20_12/toplevel.md rename to content/archive/20.12/toplevel.md index e142e293..66c9d73d 100644 --- a/content/archive/20_12/toplevel.md +++ b/content/archive/20.12/toplevel.md @@ -1,10 +1,9 @@ --- -title: Top-Level Options -toc: true -menu: Top-Level Options -order: 80 +search: + exclude: true --- +# Top-Level Options ## access\_rules @@ -120,7 +119,7 @@ mapping *{ACLType: ACLValue}*. These can be one of the following: *Options* -[ACME](/admin/configuration/basic/#acme) configuration, to automatically obtain SSL +[ACME](../../admin/configuration/basic.md#acme) configuration, to automatically obtain SSL certificates for the domains served by ejabberd, which means that certificate requests and renewals are performed to some CA server (aka "ACME server") in a fully automated mode. The *Options* are: @@ -283,11 +282,11 @@ format. All client certificates should be signed by one of these root CA certificates and should contain the corresponding JID(s) in *subjectAltName* field. There is no default value. -You can use [host\_config](/archive/20_12/toplevel/#host-config) to specify +You can use [host\_config](toplevel.md#host_config) to specify this option per-vhost. To set a specific file per listener, use the listener’s -[cafile](/archive/20_12/listen-options/#cafile) option. Please notice that +[cafile](listen-options.md#cafile) option. Please notice that *c2s\_cafile* overrides the listener’s *cafile* option. ## c2s\_ciphers @@ -346,7 +345,7 @@ Path to a file of CA root certificates. The default is to use system defined file if possible. For server connections, this *ca\_file* option is overridden by the -[s2s\_cafile](/archive/20_12/toplevel/#s2s-cafile) option. +[s2s\_cafile](toplevel.md#s2s-cafile) option. ## cache\_life\_time @@ -830,7 +829,7 @@ JID. For example, "%.org". If the value is in the form of *\[Options, ...\]* The option for listeners configuration. See the [Listen -Modules](/archive/20_12/listen/) section for details. +Modules](./listen.md/) section for details. ## log\_rotate\_count @@ -872,7 +871,7 @@ value is *10000*. *{Module: Options}* -The option for modules configuration. See [Modules](/archive/20_12/modules/) +The option for modules configuration. See [Modules](./modules.md/) section for details. ## negotiation\_timeout @@ -1204,9 +1203,9 @@ value is *all* which means no restrictions are applied. A path to a file with CA root certificates that will be used to authenticate s2s connections. If not set, the value of -[ca\_file](/archive/20_12/toplevel/#ca-file) will be used. +[ca\_file](toplevel.md#ca_file) will be used. -You can use [host\_config](/archive/20_12/toplevel/#host-config) to specify +You can use [host\_config](toplevel.md#host_config) to specify this option per-vhost. ## s2s\_ciphers diff --git a/content/archive/20_04/listen-options.md b/content/archive/20_04/listen-options.md deleted file mode 100644 index c1cc3bdb..00000000 --- a/content/archive/20_04/listen-options.md +++ /dev/null @@ -1,320 +0,0 @@ ---- -title: Listen Options -toc: true -menu: Listen Options -order: 51 ---- - - -This is a detailed description of each option allowed by the listening -modules: - -## access - -*AccessName* - -This option defines access to the port. The default value is `all`. - -## backlog - -*Value* - -The backlog value defines the maximum length that the queue of - pending connections may grow to. This should be increased if the - server is going to handle lots of new incoming connections as they - may be dropped if there is no space in the queue (and ejabberd was - not able to accept them immediately). Default value is 5. - -## cafile - -*Path* - -Path to a file of CA root certificates. -The default is to use system defined file if possible. - -## certfile - -*Path* - -Path to the certificate file. -Only makes sense when the [`tls`](#tls) -options is set. -If this option is not set, you should set the -[`certfiles`](/archive/20_04/toplevel/#certfiles) top-level option -or configure [ACME](/admin/configuration/basic/#acme). - -## check_from - -*true | false* - -This option can be used with -[`ejabberd_service`](/archive/20_04/listen/#ejabberd-service) only. - [`XEP-0114`](https://xmpp.org/extensions/xep-0114.html) requires that - the domain must match the hostname of the component. If this option - is set to `false`, `ejabberd` will allow the component to send - stanzas with any arbitrary domain in the ’from’ attribute. Only use - this option if you are completely sure about it. The default value - is `true`, to be compliant with - [`XEP-0114`](https://xmpp.org/extensions/xep-0114.html). - -## ciphers - -*Ciphers* - -OpenSSL ciphers list in the same format accepted by - ‘`openssl ciphers`’ command. - -## custom_headers - -*{Name: Value}* - -Specify additional HTTP headers to be included in all HTTP responses. -Default value is: `[]` - -## default_host - -*undefined | HostName* - -If the HTTP request received by ejabberd contains the HTTP header - `Host` with an ambiguous virtual host that doesn’t match any one - defined in ejabberd (see - [Host Names](/admin/configuration/basic/#host-names)), - then this configured HostName - is set as the request Host. The default value of this option is: - `undefined`. - -## dhfile - -*Path* - -Full path to a file containing custom parameters for Diffie-Hellman key - exchange. Such a file could be created with the command - `openssl dhparam -out dh.pem 2048`. If this option is not specified, - default parameters will be used, which might not provide the same level - of security as using custom parameters. - -## global_routes - -*true | false* - -This option emulates legacy behaviour which registers all routes -defined in [`hosts`](/archive/20_04/toplevel/#hosts) -on a component connected. This behaviour -is considered harmful in the case when it's desired to multiplex -different components on the same port, so, to disable it, -set `global_routes` to `false`. - -The default value is `true`, -e.g. legacy behaviour is emulated: the only reason for this is -to maintain backward compatibility with existing deployments. - -## hosts - -*{Hostname: [HostOption, ...]}* - -The external Jabber component that connects to this -[`ejabberd_service`](/archive/20_04/listen/#ejabberd-service) -can serve one or more hostnames. As `HostOption` - you can define options for the component; currently the only allowed - option is the password required to the component when attempt to - connect to ejabberd: `password: Secret`. Note that you - cannot define in a single `ejabberd_service` components of different - services: add an `ejabberd_service` for each service, as seen in an - example below. This option may not be necessary if the component - already provides the host in its packets; in that case, you can simply - provide the password option that will be used for all the hosts - (see port 5236 definition in the example below). - -## max_fsm_queue - -*Size* - -This option specifies the maximum number of elements in the queue of - the FSM (Finite State Machine). Roughly speaking, each message in - such queues represents one XML stanza queued to be sent into its - relevant outgoing stream. If queue size reaches the limit (because, - for example, the receiver of stanzas is too slow), the FSM and the - corresponding connection (if any) will be terminated and error - message will be logged. The reasonable value for this option depends - on your hardware configuration. This option can be specified for - [`ejabberd_service`](/archive/20_04/listen/#ejabberd-service) - and [`ejabberd_c2s`](/archive/20_04/listen/#ejabberd-c2s) - listeners, or also globally for - [`ejabberd_s2s_out`](/archive/20_04/listen/#ejabberd-s2s-out). - If the option is not specified for - `ejabberd_service` or `ejabberd_c2s` listeners, the globally - configured value is used. The allowed values are integers and - ’undefined’. Default value: ’10000’. - -## max_payload_size - -*Size* - -Specify the maximum payload size in bytes. -It can be either an integer or the word `infinity`. -The default value is `infinity`. - -## max_stanza_size - -*Size* - -This option specifies an approximate maximum size in bytes of XML - stanzas. Approximate, because it is calculated with the precision of - one block of read data. For example `{max_stanza_size, 65536}`. The - default value is `infinity`. Recommended values are 65536 for c2s - connections and 131072 for s2s connections. s2s max stanza size must - always much higher than c2s limit. Change this value with extreme - care as it can cause unwanted disconnect if set too low. - -## password - -*Secret* - -Specify the password to verify an external component that connects to the port. - -## protocol_options - -*ProtocolOpts* - -List of general options relating to SSL/TLS. These map to - [`OpenSSL’s set_options()`](https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_options.html). - The default entry is: `"no_sslv3|cipher_server_preference|no_compression"` - -## request_handlers - -*{Path: Module}* - -To define one or several handlers that will serve HTTP requests in -[`ejabberd_http`](/archive/20_04/listen/#ejabberd-http). The - Path is a string; so the URIs that start with that Path will be - served by Module. For example, if you want `mod_foo` to serve the - URIs that start with `/a/b/`, and you also want `mod_bosh` to - serve the URIs `/bosh/`, use this option: - - request_handlers: - /a/b: mod_foo - /bosh: mod_bosh - /mqtt: mod_mqtt - -## shaper - -*none | ShaperName* - -This option defines a shaper for the port (see section  -[Shapers](/admin/configuration/basic/#shapers)). - The default value is `none`. - -## shaper_rule - -*none | ShaperRule* - -This option defines a shaper rule for -[`ejabberd_service`](/archive/20_04/listen/#ejabberd-service) (see -section [Shapers](/admin/configuration/basic/#shapers)). -The recommended value is `fast`. - -## starttls - -*true | false* - -This option specifies that STARTTLS encryption is available on -connections to the port. You should also set the -[`certfiles`](/archive/20_04/toplevel/#certfiles) top-level option -or configure [ACME](/admin/configuration/basic/#acme). - -## starttls_required - -*true | false* - -This option specifies that STARTTLS encryption is required on -connections to the port. No unencrypted connections will be allowed. -You should also set the -[`certfiles`](/archive/20_04/toplevel/#certfiles) top-level option -or configure [ACME](/admin/configuration/basic/#acme). - -## tag - -*String* - -Allow specifying a tag in a `listen` section -and later use it to have a special -[`api_permissions`](/archive/20_04/toplevel/#api_permissions) -just for it. - -For example: - - listen: - - - port: 4000 - module: ejabberd_http - tag: "magic_listener" - - api_permissions: - "magic_access": - from: - - tag: "magic_listener" - who: all - what: "*" - -The default value is the empty string: `""`. - -## timeout - -*Integer* - -Timeout of the connections, expressed in milliseconds. Default: 5000 - -## tls - -*true | false* - -This option specifies that traffic on the port will be encrypted - using SSL immediately after connecting. This was the traditional - encryption method in the early Jabber software, commonly on port - 5223 for client-to-server communications. But this method is - nowadays deprecated and not recommended. The preferable encryption - method is STARTTLS on port 5222, as defined - [`RFC 6120: XMPP Core`](https://xmpp.org/rfcs/rfc6120.html#tls), - which can be enabled in `ejabberd` with the option - [`starttls`](#starttls). - -If this option is set, you should also set the - [`certfiles`](/archive/20_04/toplevel/#certfiles) top-level - option or configure [ACME](/admin/configuration/basic/#acme). - -The option `tls` can also be used in - [`ejabberd_http`](/archive/20_04/listen/#ejabberd-http) - to support HTTPS. - -## tls_compression - -*true | false* - -Whether to enable or disable TLS compression. The default value is - `false`. - -## tls_verify - -*false | true* - -This option specifies whether to verify the certificate or not when TLS is enabled. - -The default value is `false`, which means no checks are performed. - -## use_proxy_protocol - -*true | false* - -Is this listener accessed by proxy service that is using - proxy protocol for supplying real IP addresses to ejabberd server. You can read about this protocol - in [Proxy protocol specification](https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt). - The default value of this option is`false`. - -## zlib - -*true | false* - -This option specifies that Zlib stream compression (as defined in - [`XEP-0138`](https://xmpp.org/extensions/xep-0138.html)) is available - on connections to the port. - diff --git a/content/archive/20_04/listen.md b/content/archive/20_04/listen.md deleted file mode 100644 index 10c9f366..00000000 --- a/content/archive/20_04/listen.md +++ /dev/null @@ -1,771 +0,0 @@ ---- -title: Listen Modules -toc: true -menu: Listen Modules -order: 50 ---- - - -# Listen Option - -The **listen option** defines for which ports, addresses and network -protocols `ejabberd` will listen and what services will be run on them. -Each element of the list is an associative array with the following -elements: - -- Port number. Optionally also the IP address and/or a transport - protocol. - -- Listening module that serves this port. - -- Options for the TCP socket and for the listening module. - -For example: - - - listen: - - - port: 5222 - module: ejabberd_c2s - ip: 127.0.0.1 - starttls: true - - - port: 5269 - module: ejabberd_s2s_in - transport: tcp - - -The **port number** defines which port to listen for incoming connections. -It can be a Jabber/XMPP standard port or any other valid port number. - -The **IP address** can be represented as a string. The socket will listen -only in that network interface. It is possible to specify a generic -address ("0.0.0.0" for IPv4 or "::" for IPv6), so `ejabberd` will listen -in all addresses. Depending on the type of the IP address, IPv4 or IPv6 -will be used. When the IP address is not specified, it will listen on -all IPv4 network addresses. - -Note that on some operating systems and/or OS configurations, listening -on "::" will mean listening for IPv4 traffic as well as IPv6 traffic. - -Some example values for IP address: - -- `"0.0.0.0"` to listen in all IPv4 network interfaces. This is the - default value when no IP is specified. - -- `"::"` to listen in all IPv6 network interfaces - -- `"10.11.12.13"` is the IPv4 address `10.11.12.13` - -- `"::FFFF:127.0.0.1"` is the IPv6 address `::FFFF:127.0.0.1/128` - -The **transport protocol** can be `tcp` or `udp`. Default is `tcp`. - -# Summary of Listen Modules - -The available modules, their purpose and the options allowed by each one -are: - -## ejabberd_c2s - -Handles c2s connections. - -Options: -[access](/archive/20_04/listen-options/#access), -[cafile](/archive/20_04/listen-options/#cafile), -[ciphers](/archive/20_04/listen-options/#ciphers), -[dhfile](/archive/20_04/listen-options/#dhfile), -[max_fsm_queue](/archive/20_04/listen-options/#max-fsm-queue), -[max_stanza_size](/archive/20_04/listen-options/#max-stanza-size), -[protocol_options](/archive/20_04/listen-options/#protocol-options), -[shaper](/archive/20_04/listen-options/#shaper), -[starttls](/archive/20_04/listen-options/#starttls), -[starttls_required](/archive/20_04/listen-options/#starttls-required), -[tls](/archive/20_04/listen-options/#tls), -[tls_compression](/archive/20_04/listen-options/#tls-compression), -[tls_verify](/archive/20_04/listen-options/#tls-verify), -[zlib](/archive/20_04/listen-options/#zlib). - -## ejabberd_s2s_in - -Handles incoming s2s connections. - -Options: -[cafile](/archive/20_04/listen-options/#cafile), -[ciphers](/archive/20_04/listen-options/#ciphers), -[dhfile](/archive/20_04/listen-options/#dhfile), -[max_fsm_queue](/archive/20_04/listen-options/#max-fsm-queue), -[max_stanza_size](/archive/20_04/listen-options/#max-stanza-size), -[protocol_options](/archive/20_04/listen-options/#protocol-options), -[shaper](/archive/20_04/listen-options/#shaper), -[tls](/archive/20_04/listen-options/#tls), -[tls_compression](/archive/20_04/listen-options/#tls-compression). - -## ejabberd_service - -Interacts with an - [`external component`](https://ejabberd.im/tutorials-transports) - (as defined in the Jabber Component Protocol - ([`XEP-0114`](https://xmpp.org/extensions/xep-0114.html)). - -Options: -[access](/archive/20_04/listen-options/#access), -[cafile](/archive/20_04/listen-options/#cafile), -[certfile](/archive/20_04/listen-options/#certfile), -[check_from](/archive/20_04/listen-options/#check-from), -[ciphers](/archive/20_04/listen-options/#ciphers), -[dhfile](/archive/20_04/listen-options/#dhfile), -[global_routes](/archive/20_04/listen-options/#global-routes), -[hosts](/archive/20_04/listen-options/#hosts), -[max_fsm_queue](/archive/20_04/listen-options/#max-fsm-queue), -[max_stanza_size](/archive/20_04/listen-options/#max-stanza-size), -[password](/archive/20_04/listen-options/#password), -[protocol_options](/archive/20_04/listen-options/#protocol-options), -[shaper](/archive/20_04/listen-options/#shaper), -[shaper_rule](/archive/20_04/listen-options/#shaper-rule), -[tls](/archive/20_04/listen-options/#tls), -[tls_compression](/archive/20_04/listen-options/#tls-compression). - -## ejabberd_sip - -Handles SIP requests as defined in - [`RFC 3261`](https://tools.ietf.org/html/rfc3261). - -For details please check the -[ejabberd_sip](/archive/20_04/listen/#ejabberd-sip-1) -and [mod_sip](/archive/20_04/modules/#mod-sip) sections. - -General listener options: -[certfile](/archive/20_04/listen-options/#certfile), -[tls](/archive/20_04/listen-options/#tls). - -## ejabberd_stun - -Handles STUN/TURN requests as defined in - [`RFC 5389`](https://tools.ietf.org/html/rfc5389) and - [`RFC 5766`](https://tools.ietf.org/html/rfc5766). - -For the specific module options, please check the -[ejabberd_stun](/archive/20_04/listen/#ejabberd-stun-1) section: -`auth_realm`, -`auth_type`, -`server_name`, -`turn_ip`, -`turn_max_allocations`, -`turn_max_permissions`, -`turn_max_port`, -`turn_min_port`, -`use_turn`. - -General listener options: -[certfile](/archive/20_04/listen-options/#certfile), -[shaper](/archive/20_04/listen-options/#shaper), -[tls](/archive/20_04/listen-options/#tls), - -## ejabberd_http - -Handles incoming HTTP connections. - -With the proper request handlers configured, this serves HTTP services like -[ACME](/admin/configuration/basic/#acme), -[API](/archive/20_04/modules/#mod-http-api), -[BOSH](/archive/20_04/modules/#mod-bosh), -[CAPTCHA](/admin/configuration/basic/#captcha), -[Fileserver](/archive/20_04/modules/#mod-http-fileserver), -[OAuth](/developer/ejabberd-api/oauth/), -[Upload](/archive/20_04/modules/#mod-http-upload), -[WebAdmin](/admin/guide/managing/#web-admin), -[WebSocket](/archive/20_04/listen/#ejabberd-http-ws), -[XMP-RPC](/archive/20_04/listen/#ejabberd-xmlrpc). - -Options: -[cafile](/archive/20_04/listen-options/#cafile), -[ciphers](/archive/20_04/listen-options/#ciphers), -[custom_headers](/archive/20_04/listen-options/#custom-headers), -[default_host](/archive/20_04/listen-options/#default-host), -[dhfile](/archive/20_04/listen-options/#dhfile), -[protocol_options](/archive/20_04/listen-options/#protocol-options), -[request_handlers](/archive/20_04/listen-options/#request-handlers), -[tag](/archive/20_04/listen-options/#tag), -[tls](/archive/20_04/listen-options/#tls), -[tls_compression](/archive/20_04/listen-options/#tls-compression), -and the [trusted_proxies](/archive/20_04/toplevel/#trusted-proxies) top-level option. - -## mod_mqtt - -Support for MQTT requires configuring `mod_mqtt` both in the -[listen](/archive/20_04/toplevel/#listen) and the -[modules](/archive/20_04/toplevel/#modules) sections. -Check the [mod_mqtt modules options](/archive/20_04/modules/#mod-mqtt). -Check the advanded documentation in [MQTT Support](/admin/guide/mqtt/). - -Listen options: -[max_fsm_queue](/archive/20_04/listen-options/#max-fsm-queue), -[max_payload_size](/archive/20_04/listen-options/#max-payload-size), -[tls](/archive/20_04/listen-options/#tls), -[tls_verify](/archive/20_04/listen-options/#tls-verify). - - -# ejabberd_stun - -`ejabberd` is able to act as a stand-alone STUN/TURN server -([`RFC 5389`](https://tools.ietf.org/html/rfc5389)/[`RFC 5766`](https://tools.ietf.org/html/rfc5766). -In that role `ejabberd` helps clients with ICE -([`RFC 5245`](https://tools.ietf.org/html/rfc5245) or Jingle ICE -([`XEP-0176`](https://xmpp.org/extensions/xep-0176.html) support to -discover their external addresses and ports and to relay media traffic -when it is impossible to establish direct peer-to-peer connection. - -The specific configurable options are: - -**`tls: true|false`**: If enabled, `certfile` option must be set, otherwise `ejabberd` will - not be able to accept TLS connections. Obviously, this option makes - sense for `tcp` transport only. The default is `false`. - -**`certfile: Path`**: Path to the certificate file. Only makes sense when `tls` is set. - -**`use_turn: true|false`**: Enables/disables TURN (media relay) functionality. The default is - `false`. - -**`turn_ip: String`**: The IPv4 address advertised by your TURN server. The address should - not be NAT’ed or firewalled. There is not default, so you should set - this option explicitly. Implies `use_turn`. - -**`turn_min_port: Integer`**: Together with `turn_max_port` forms port range to allocate from. The - default is 49152. Implies `use_turn`. - -**`turn_max_port: Integer`**: Together with `turn_min_port` forms port range to allocate from. The - default is 65535. Implies `use_turn`. - -**`turn_max_allocations: Integer|infinity`**: Maximum number of TURN allocations available from the particular IP - address. The default value is 10. Implies `use_turn`. - -**`turn_max_permissions: Integer|infinity`**: Maximum number of TURN permissions available from the particular IP - address. The default value is 10. Implies `use_turn`. - -**`auth_type: user|anonymous`**: Which authentication type to use for TURN allocation requests. When - type `user` is set, ejabberd authentication backend is used. For - `anonymous` type no authentication is performed (not recommended for - public services). The default is `user`. Implies `use_turn`. - -**`auth_realm: String`**: When `auth_type` is set to `user` and you have several virtual hosts - configured you should set this option explicitly to the virtual host - you want to serve on this particular listening port. Implies - `use_turn`. - -**`shaper: Atom`**: For `tcp` transports defines shaper to use. The default is `none`. - -**`server_name: String`**: Defines software version to return with every response. The default - is the STUN library version. - -Example configuration with disabled TURN functionality (STUN only): - - - listen: - ... - - - port: 3478 - transport: udp - module: ejabberd_stun - - - port: 3478 - module: ejabberd_stun - - - port: 5349 - module: ejabberd_stun - certfile: /etc/ejabberd/server.pem - ... - -Example configuration with TURN functionality. Note that STUN is always -enabled if TURN is enabled. Here, only UDP section is shown: - - - listen: - ... - - - port: 3478 - transport: udp - use_turn: true - turn_ip: 10.20.30.1 - module: ejabberd_stun - ... - -You also need to configure DNS SRV records properly so clients can -easily discover a STUN/TURN server serving your XMPP domain. Refer to -section -[`DNS Discovery of a Server`](https://tools.ietf.org/html/rfc5389#section-9) -of [`RFC 5389`](https://tools.ietf.org/html/rfc5389) and section -[`Creating an Allocation`](https://tools.ietf.org/html/rfc5766#section-6) -of [`RFC 5766`](https://tools.ietf.org/html/rfc5766) for details. - -Example DNS SRV configuration for STUN only: - - _stun._udp IN SRV 0 0 3478 stun.example.com. - _stun._tcp IN SRV 0 0 3478 stun.example.com. - _stuns._tcp IN SRV 0 0 5349 stun.example.com. - -And you should also add these in the case if TURN is enabled: - - _turn._udp IN SRV 0 0 3478 turn.example.com. - _turn._tcp IN SRV 0 0 3478 turn.example.com. - _turns._tcp IN SRV 0 0 5349 turn.example.com. - -# ejabberd_sip - -## SIP Configuration - -`ejabberd` has built-in SIP support. To activate this feature, -add the [`ejabberd_sip`](#ejabberd-sip) listen module, enable -[`mod_sip`](/archive/20_04/modules/#mod-sip) module -for the desired virtual host, and configure DNS properly. - -To add a listener you should configure `ejabberd_sip` listening module -as described in [Listen](#listen-option) section. -If option [`tls`](/archive/20_04/listen-options/#tls) is specified, -option [`certfile`](/archive/20_04/listen-options/#certfile) -must be specified as well, otherwise incoming TLS connections -would fail. - -Example configuration with standard ports (as per -[`RFC 3261`](https://tools.ietf.org/html/rfc3261)): - - - listen: - ... - - - port: 5060 - transport: udp - module: ejabberd_sip - - - port: 5060 - module: ejabberd_sip - - - port: 5061 - module: ejabberd_sip - tls: true - certfile: /etc/ejabberd/server.pem - ... - -Note that there is no StartTLS support in SIP and -[`SNI`](https://en.wikipedia.org/wiki/Server_Name_Indication) support is -somewhat tricky, so for TLS you have to configure different virtual -hosts on different ports if you have different certificate files for -them. - -Next you need to configure DNS SIP records for your virtual domains. -Refer to [`RFC 3263`](https://tools.ietf.org/html/rfc3263) for the -detailed explanation. Simply put, you should add NAPTR and SRV records -for your domains. Skip NAPTR configuration if your DNS provider doesn't -support this type of records. It’s not fatal, however, highly -recommended. - -Example configuration of NAPTR records: - - example.com IN NAPTR 10 0 "s" "SIPS+D2T" "" _sips._tcp.example.com. - example.com IN NAPTR 20 0 "s" "SIP+D2T" "" _sip._tcp.example.com. - example.com IN NAPTR 30 0 "s" "SIP+D2U" "" _sip._udp.example.com. - -Example configuration of SRV records with standard ports (as per -[`RFC 3261`](https://tools.ietf.org/html/rfc3261): - - _sip._udp IN SRV 0 0 5060 sip.example.com. - _sip._tcp IN SRV 0 0 5060 sip.example.com. - _sips._tcp IN SRV 0 0 5061 sip.example.com. - -## Note on SIP usage - -SIP authentication does not support SCRAM. As such, it is not possible -to use `mod_sip` to authenticate when ejabberd has been set to encrypt -password with SCRAM. - -# ejabberd_http_ws - -This module enables XMPP communication over Websocket connection as -described in [`RFC 7395`](https://tools.ietf.org/html/rfc7395). - -## Enabling Websocket support - -To enable this module it must have handler added to `request_handlers` -section of `ejabberd_http` listener: - - listen: - ... - - - port: 5280 - module: ejabberd_http - request_handlers: - ... - /xmpp: ejabberd_http_ws - ... - ... - -This module can be configured by using those options that should be -placed in general section of config file: [websocket\_origin](/archive/20_04/toplevel/#websocket-origin), [websocket\_ping\_interval](/archive/20_04/toplevel/#websocket-ping-interval), [websocket\_timeout](/archive/20_04/toplevel/#websocket-timeout). - -## Discovery - -You also need to configure DNS SRV records properly so clients can -easily discover Websocket service for your XMPP domain. Refer to -[XEP-0156](https://xmpp.org/extensions/xep-0156.html). - -Example DNS TXT configuration for Websocket: - - _xmppconnect IN TXT "[ _xmpp-client-websocket=wss://web.example.com:443/ws ]" - -## Testing Websocket - -A test client can be found on Github: [Websocket test client](https://github.com/processone/xmpp-websocket-client) - - - -# ejabberd_xmlrpc - -Handles XML-RPC requests to execute -[ejabberd commands](/admin/guide/managing/#ejabberd-commands). -It is configured as a request handler in -[ejabberd_http](/archive/20_04/listen/#ejabberd-http). - -By default there is no restriction to who can execute what commands, -so it is strongly recommended that you configure restrictions using -[API Permissions](https://docs.ejabberd.im/developer/ejabberd-api/permissions/). - -This is the minimum configuration required to enable the feature: - - listen: - - - port: 4560 - module: ejabberd_http - request_handlers: - /: ejabberd_xmlrpc - -Example Python script: - - import xmlrpclib - server = xmlrpclib.Server('http://127.0.0.1:4560/'); - params = {} - params["host"] = "localhost" - print server.registered_users(params) - -This example configuration adds some restrictions: - - listen: - - - port: 5281 - ip: "::" - module: ejabberd_http - request_handlers: - /api: mod_http_api - /xmlrpc: ejabberd_xmlrpc - - api_permissions: - "some XMLRPC commands": - from: ejabberd_xmlrpc - who: - - ip: 127.0.0.1 - - user: user1@localhost - what: - - registered_users - - connected_users_number - -With that configuration, it is possible to execute two specific commands using -`ejabberd_xmlrpc`, with two access restrictions. Example Python script: - - import xmlrpclib - server = xmlrpclib.Server('http://127.0.0.1:5281/xmlrpc') - LOGIN = {'user':'user1', - 'server':'localhost', - 'password':'mypass11', - 'admin':True} - def calling(command, data): - fn = getattr(server, command) - return fn(LOGIN, data) - print calling('registered_users', {'host':'localhost'}) - -It's possible to use OAuth for authentication instead of plain password, see -[OAuth Support](/developer/ejabberd-api/oauth/). - -In ejabberd 20.03 and older, it was possible to configure `ejabberd_xmlrpc` as a -listener, see the old document for reference and example configuration: -[Listening Module](/admin/configuration/old/#listening-module). - -Just for reference, there's also the old -[`ejabberd_xmlrpc documentation`](https://ejabberd.im/ejabberd_xmlrpc). - -# Examples - -For example, the following simple configuration defines: - -- There are three domains. The default certificate file is - `server.pem`. However, the c2s and s2s connections to the domain - `example.com` use the file `example_com.pem`. - -- Port 5222 listens for c2s connections with STARTTLS, and also allows - plain connections for old clients. - -- Port 5223 listens for c2s connections with the old SSL. - -- Port 5269 listens for s2s connections with STARTTLS. The socket is - set for IPv6 instead of IPv4. - -- Port 3478 listens for STUN requests over UDP. - -- Port 5280 listens for HTTP requests, and serves the HTTP-Bind (BOSH) - service. - -- Port 5281 listens for HTTP requests, using HTTPS to serve HTTP-Bind - (BOSH) and the Web Admin as explained in [Managing: Web Admin](/admin/guide/managing/#web-admin). The - socket only listens connections to the IP address 127.0.0.1. - - - hosts: - - example.com - - example.org - - example.net - - certfiles: - - /etc/ejabberd/server.pem - - /etc/ejabberd/example_com.pem - - listen: - - - port: 5222 - module: ejabberd_c2s - access: c2s - shaper: c2s_shaper - starttls: true - max_stanza_size: 65536 - - - port: 5223 - module: ejabberd_c2s - access: c2s - shaper: c2s_shaper - tls: true - max_stanza_size: 65536 - - - port: 5269 - ip: "::" - module: ejabberd_s2s_in - shaper: s2s_shaper - max_stanza_size: 131072 - - - port: 3478 - transport: udp - module: ejabberd_stun - - - port: 5280 - module: ejabberd_http - request_handlers: - /bosh: mod_bosh - - - port: 5281 - ip: 127.0.0.1 - module: ejabberd_http - tls: true - request_handlers: - /admin: ejabberd_web_admin - /bosh: mod_bosh - - s2s_use_starttls: optional - outgoing_s2s_families: - - ipv4 - - ipv6 - outgoing_s2s_timeout: 10000 - trusted_proxies: [127.0.0.1, 192.168.1.11] - - -In this example, the following configuration defines that: - -- c2s connections are listened for on port 5222 (all IPv4 addresses) - and on port 5223 (SSL, IP 192.168.0.1 and fdca:8ab6:a243:75ef::1) - and denied for the user called ‘`bad`’. - -- s2s connections are listened for on port 5269 (all IPv4 addresses) - with STARTTLS for secured traffic strictly required, and the - certificates are verified. Incoming and outgoing connections of - remote XMPP servers are denied, only two servers can connect: - “jabber.example.org” and “example.com”. - -- Port 5280 is serving the Web Admin and the HTTP-Bind (BOSH) service in - all the IPv4 addresses. Note that it is also possible to serve them - on different ports. The second example in section [Managing: Web Admin](/admin/guide/managing/#web-admin) shows - how exactly this can be done. A request handler to serve MQTT over Websocket is also defined. - -- All users except for the administrators have a traffic of limit - 1,000Bytes/second - -- The [`AIM transport`](https://ejabberd.im/pyaimt) - `aim.example.org` is connected to port 5233 on localhost IP - addresses (127.0.0.1 and ::1) with password ‘`aimsecret`’. - -- The ICQ transport JIT (`icq.example.org` and `sms.example.org`) is - connected to port 5234 with password ‘`jitsecret`’. - -- The [`MSN transport`](https://ejabberd.im/pymsnt) - `msn.example.org` is connected to port 5235 with password - ‘`msnsecret`’. - -- The [`Yahoo! transport`](https://ejabberd.im/yahoo-transport-2) - `yahoo.example.org` is connected to port 5236 with password - ‘`yahoosecret`’. - -- The - [`Gadu-Gadu transport`](https://ejabberd.im/jabber-gg-transport) - `gg.example.org` is connected to port 5237 with password - ‘`ggsecret`’. - -- The [`Jabber Mail Component`](https://ejabberd.im/jmc) - `jmc.example.org` is connected to port 5238 with password - ‘`jmcsecret`’. - -- The service custom has enabled the special option to avoiding - checking the `from` attribute in the packets send by this component. - The component can send packets in behalf of any users from the - server, or even on behalf of any server. - - - acl: - blocked: - user: bad - trusted_servers: - server: - - example.com - - jabber.example.org - xmlrpc_bot: - user: - - xmlrpc-robot@example.org - shaper: - normal: 1000 - shaper_rules: - c2s_shaper: - - none: admin - - normal - access_rules: - c2s: - - deny: blocked - - allow - xmlrpc_access: - - allow: xmlrpc_bot - s2s: - - allow: trusted_servers - certfiles: - - /path/to/ssl.pem - s2s_access: s2s - s2s_use_starttls: required_trusted - listen: - - - port: 5222 - module: ejabberd_c2s - shaper: c2s_shaper - access: c2s - - - ip: 192.168.0.1 - port: 5223 - module: ejabberd_c2s - tls: true - access: c2s - - - ip: "FDCA:8AB6:A243:75EF::1" - port: 5223 - module: ejabberd_c2s - tls: true - access: c2s - - - port: 5269 - module: ejabberd_s2s_in - - - port: 5280 - module: ejabberd_http - request_handlers: - /admin: ejabberd_web_admin - /bosh: mod_bosh - /mqtt: mod_mqtt - - - port: 4560 - module: ejabberd_xmlrpc - access_commands: {} - - - ip: 127.0.0.1 - port: 5233 - module: ejabberd_service - hosts: - aim.example.org: - password: aimsecret - - - ip: "::1" - port: 5233 - module: ejabberd_service - hosts: - aim.example.org: - password: aimsecret - - - port: 5234 - module: ejabberd_service - hosts: - icq.example.org: - password: jitsecret - sms.example.org: - password: jitsecret - - - port: 5235 - module: ejabberd_service - hosts: - msn.example.org: - password: msnsecret - - - port: 5236 - module: ejabberd_service - password: yahoosecret - - - port: 5237 - module: ejabberd_service - hosts: - gg.example.org: - password: ggsecret - - - port: 5238 - module: ejabberd_service - hosts: - jmc.example.org: - password: jmcsecret - - - port: 5239 - module: ejabberd_service - check_from: false - hosts: - custom.example.org: - password: customsecret - - -Note, that for services based in jabberd14 or WPJabber you have to make -the transports log and do XDB by themselves: - - - - - - - - %d: [%t] (%h): %s - /var/log/jabber/service.log - - - - - - - - - /usr/lib/jabber/xdb_file.so - - - /var/spool/jabber - - - diff --git a/content/archive/20_04/sql-schema.md b/content/archive/20_04/sql-schema.md deleted file mode 100644 index a355ffec..00000000 --- a/content/archive/20_04/sql-schema.md +++ /dev/null @@ -1,310 +0,0 @@ ---- -title: ejabberd SQL Database Schema -toc: true -menu: SQL Schema ---- - - -We present the tables that might be in use, depending on your server configuration, together with a short explanation of the fields involved and their intended use. Tables are presented roughly grouped by related functionality. - -Consider this document a work in progress, not all tables are documented yet. - -Latest version of database schema are available in [ejabberd Github repository](https://github.com/processone/ejabberd): - -* [MySQL schema](https://github.com/processone/ejabberd/blob/master/sql/mysql.sql) -* [Postgres schema](https://github.com/processone/ejabberd/blob/master/sql/pg.sql) -* [SQLite schema](https://github.com/processone/ejabberd/blob/master/sql/lite.sql) -* [MS SQL Server schema](https://github.com/processone/ejabberd/blob/master/sql/mssql.sql). This - schema need testing / feedback and possibly improvement from SQL - Server users. - -# Authentication - -## Table `users` - -Contains the information required to authenticate users. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| password | string | User password, can be hashed | -| created_at | timestamp | When the user account was created | - - -The password are hashed if you use SCRAM authentication. In that case the next fields are also defined - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| serverkey | string | support for salted passwords | -| salt | string | support for salted passwords | -| iterationcount | integer | support for salted passwords | - - -# Rosters - -## Table `rosterusers` - -This is a quite complex table, used as a store for a quite complex protocol that is the one defined to manage -rosters and subscriptions on [rfc6121](https://tools.ietf.org/html/rfc6121). - -In the common case of two users adding each other as contacts, entries in the roster table follows a series of steps - as they moves from a subscription request to the final approval and bi-directional subscription being established. -This process can be initiated either by the user, or by the (possible remote) peer. Also need to account for the case -where the user, or the contact, might not be online at the moment of the subscription request is made. - -Steps are further complicated by the fact that entries in the roster aren't required to have corresponding subscriptions. -For details of the meaning of the different fields, refer to [the protocol itself](https://tools.ietf.org/html/rfc6121#section-2), as these are mostly a direct mapping of it. - -Note: -If you manage users contacts from outside the roster workflow of XMPP (for example your site backends perform the linking between -users), it is likely that you only need to care about the username, jid and nick fields, and set the subscription field to be always -'B' for a mutual link between users. - - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| jid | string | Contact jid | -| nick | string | Contact nickname | -| subscription | char | 'B'=both | 'T'=To | 'F'=From | 'N'=none | -| ask | char | 'S'=subscribe | 'U'=unsubscribe | B='both' | 'O'=out | 'I'=in | 'N'=none | -| askmessage | string | Message to be displayed on the subscription request | -| server | char | 'N' for normal users contacts | -| subscribe | string | | -| type | string | "item" | -| created_at | timestamp | Creation date of this roster entry | - - - - -## Table `rostergroups` - -## Table `sr_group` - -## Table `sr_user` - - - -# Messages - -## Table `spool` -Messages sent to users that are offline are stored in this table. -Do not confuse this with general message archiving: messages are only temporarily stored in this table, removed as soon as the target user -is back online and the pending messages delivered to it. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| xml | blob | Raw packet | -| seq | integer | Unique, autoincrement sequence number. | -| created_at | timestamp | When the message was stored | - -The seq field is used for sorting, and to easily identify a particular user message. - - -## Table `privacy_list_data` - -The table is used to store privacy rules. - -The table is a direct translation of the XMPP packet used to set -privacy lists. For more details, please read -[XEP-0016: Privacy Lists, Syntax and Semantics](https://xmpp.org/extensions/xep-0016.html#protocol-syntax). Here -is an example packet coming from privacy list specification: - - - - [] - [] - [] - [] - - -The table fields are defined as follow: - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| id | int | Privacy list rule id. | -| t | char | Privacy rule type: 'j' for jid, 'g' for group and 's' for subscription. | -| value | string | Privacy list value for match, whose content depends on privacy list rule type. | -| action | char | Privacy list action: 'd' for deny and 'a' for allow. | -| ord | int | Order for applying the privacy list rule. | -| match\_all | boolean (0 or 1) | If true (1), means any packet types will be matched. Other matches should be false (0). | -| match\_iq | boolean (0 or 1) | If true (1), means iq packets will be matched by rule. | -| match\_message | boolean (0 or 1) | If true (1), means message packets type will be matched by rule. | -| match\_presence\_in | boolean (0 or 1) | If true (1), means inbound presence packets type will be matched by rule. | -| match\_presence\_out | boolean (0 or 1) | If true (1), means outbound packets type will be matched by rule. | - - - -# Multiuser Chat Rooms - -## Table `muc_room` -It is used to store *persistent* rooms, that is, rooms that must be automatically started with the server. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| name | string | Room name | -| host | string | Hostname of the conference component | -| opts | string | Room options, encoded as erlang terms | -| created_at | timestamp | Creation date | - -The opts field is legible, but not mean to be modified directly. It contents depends on the implementation of mod_muc. -It contains the room configuration and affiliations. - - -## Table `muc_registered` -Contains a map of user to nicknames. When a user register a nickname with the conference module, that nick is reserved and can't be used by -anyone else, in any room from that conference host. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| jid | string | User jid | -| host | string | Hostname of the conference component | -| nick | string | Room options, encoded as erlang terms | -| created_at | timestamp | Creation date | - - -## Table `room_history` -In ejabberd Business Edition, -this table is used if persistent room history is enabled. If so, recent room history is saved to the DB before ejabberd is stopped, -allowing the recent history to survive server restarts. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| room | string | Room jid | -| nick | string | Nickname that sent the message | -| packet | string | XML stanza with the message | -| have_subject | boolean | True if the message stanza had subject | -| created_at | timestamp | Creation date | -| size | integer | Size in bytes of the xml packet | - -## Table `muc_online_room` -This table is used to store rooms that actually exists in the memory of the server. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| name | string | Room name | -| host | string | Hostname of the conference component | -| node | string | Erlang node where the room is | -| pid | string | Pid of the thread running the room | - -## Table `muc_online_users` -This table is used to store MucSub subscriptions. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User -| server | string | Hostname of the user | -| resource | string | User resource | -| name | string | Name of the room | -| host | string | Hostname of the conference component | -| node | string | Erlang node | - -## Table `muc_room_subscribers` -This table is used to store MucSub subscriptions. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| room | string | Room name | -| host | string | Hostname of the conference component | -| jid | string | User jid | -| nick | string | User nick | -| nodes | string | MucSub nodes | -| created_at | timestamp | Creation date | - - -# VCard - -## Table `vcard` - -The table is used to store raw vCard content for delivery of the vCard -"as is". - -The table fields are defined as follow: - -| Field | Type | Usage | -| -------------------- | ---------------- | -------------------- | -| username | string | Owner of the Vcard | -| vcard | text | Raw Vcard | -| created_at | timestamp | Record creation date | - -## Table `vcard_search` - -The table is used to store vCard index on a few of the Vcard field -used for vCard search in users directory. - -You can learn more about the vCard specification on Wikipedia -[vCard](https://en.wikipedia.org/wiki/VCard) page. - -The table fields are defined as follow: - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------- | -| username | string | Raw username for display | -| lusername | string | Lowercase username for search | -| fn | string | Raw fullname for display | -| lfn | string | Lowercase fullname for search | -| family | string | Raw family name for display | -| lfamilly | string | Lowercase family name for search | -| given | string | Raw given name for display | -| lgiven | string | Lowercase given name for search | -| middle | string | Raw middle name for display | -| lmiddle | string | Lowercase middle name for search | -| nickname | string | Raw nickname for display | -| lnickname | string | Lowercase nickname for search | -| bday | string | Raw birthday for display | -| lbday | string | Lowercase and processed birthday for search | -| ctry | string | Raw country for display | -| lctry | string | Lowercase country for search | -| locality | string | Raw city for display | -| llocality | string | Lowercase city for search | -| email | string | Raw email for display | -| lemail | string | Lowercase email for search | -| orgname | string | Raw organisation name for display | -| lorgname | string | Lowercase organisation name for search | -| orgunit | string | Raw organisation department name for display | -| lorgunit | string | Lowercase organisation department for search | - -# Others - -## Table `last` -This table is used to store the last time the user was seen online. -It is defined as follow: - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| seconds | string | Timestamp for the last time the user was seen online | -| state | string | Why user got disconnected. Usually is empty | - -Note that the table is *not* updated while the user has the session open. - - - -## Table `caps_features` -Ejabberd uses this table to keep a list of the entity capabilities discovered. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| node | string | Node | -| subnode | string | Subnode | -| feature | string | Entity feature | -| created_at | timestamp | Creation date | - -The subnode field correspond to the 'ver' ("verification string") of XEP-0115. -There is one entry in this table for each feature advertised by the given (node,subnode) pair. - -## Table `private_storage` -Used for user private data storage. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| namespace | string | XEP-0049 namespace of the stored data | -| data | string | Raw xml | -| created_at | timestamp | Creation date | - diff --git a/content/archive/20_07/listen-options.md b/content/archive/20_07/listen-options.md deleted file mode 100644 index 993bc05a..00000000 --- a/content/archive/20_07/listen-options.md +++ /dev/null @@ -1,334 +0,0 @@ ---- -title: Listen Options -toc: true -menu: Listen Options -order: 51 ---- - - -This is a detailed description of each option allowed by the listening -modules: - -## access - -*AccessName* - -This option defines access to the port. The default value is `all`. - -## backlog - -*Value* - -The backlog value defines the maximum length that the queue of - pending connections may grow to. This should be increased if the - server is going to handle lots of new incoming connections as they - may be dropped if there is no space in the queue (and ejabberd was - not able to accept them immediately). Default value is 5. - -## cafile - -*Path* - -Path to a file of CA root certificates. -The default is to use system defined file if possible. - -## certfile - -*Path* - -Path to the certificate file. -Only makes sense when the [`tls`](#tls) -options is set. -If this option is not set, you should set the -[`certfiles`](/archive/20_07/toplevel/#certfiles) top-level option -or configure [ACME](/admin/configuration/basic/#acme). - -## check_from - -*true | false* - -This option can be used with -[`ejabberd_service`](/archive/20_07/listen/#ejabberd-service) only. - [`XEP-0114`](http://xmpp.org/extensions/xep-0114.html) requires that - the domain must match the hostname of the component. If this option - is set to `false`, `ejabberd` will allow the component to send - stanzas with any arbitrary domain in the ’from’ attribute. Only use - this option if you are completely sure about it. The default value - is `true`, to be compliant with - [`XEP-0114`](http://xmpp.org/extensions/xep-0114.html). - -## ciphers - -*Ciphers* - -OpenSSL ciphers list in the same format accepted by - ‘`openssl ciphers`’ command. - -## custom_headers - -*{Name: Value}* - -Specify additional HTTP headers to be included in all HTTP responses. -Default value is: `[]` - -## default_host - -*undefined | HostName* - -If the HTTP request received by ejabberd contains the HTTP header - `Host` with an ambiguous virtual host that doesn’t match any one - defined in ejabberd (see - [Host Names](/admin/configuration/basic/#host-names)), - then this configured HostName - is set as the request Host. The default value of this option is: - `undefined`. - -## dhfile - -*Path* - -Full path to a file containing custom parameters for Diffie-Hellman key - exchange. Such a file could be created with the command - `openssl dhparam -out dh.pem 2048`. If this option is not specified, - default parameters will be used, which might not provide the same level - of security as using custom parameters. - -## global_routes - -*true | false* - -This option emulates legacy behaviour which registers all routes -defined in [`hosts`](/archive/20_07/toplevel/#hosts) -on a component connected. This behaviour -is considered harmful in the case when it's desired to multiplex -different components on the same port, so, to disable it, -set `global_routes` to `false`. - -The default value is `true`, -e.g. legacy behaviour is emulated: the only reason for this is -to maintain backward compatibility with existing deployments. - -## hosts - -*{Hostname: [HostOption, ...]}* - -The external Jabber component that connects to this -[`ejabberd_service`](/archive/20_07/listen/#ejabberd-service) -can serve one or more hostnames. As `HostOption` - you can define options for the component; currently the only allowed - option is the password required to the component when attempt to - connect to ejabberd: `password: Secret`. Note that you - cannot define in a single `ejabberd_service` components of different - services: add an `ejabberd_service` for each service, as seen in an - example below. This option may not be necessary if the component - already provides the host in its packets; in that case, you can simply - provide the password option that will be used for all the hosts - (see port 5236 definition in the example below). - -## max_fsm_queue - -*Size* - -This option specifies the maximum number of elements in the queue of - the FSM (Finite State Machine). Roughly speaking, each message in - such queues represents one XML stanza queued to be sent into its - relevant outgoing stream. If queue size reaches the limit (because, - for example, the receiver of stanzas is too slow), the FSM and the - corresponding connection (if any) will be terminated and error - message will be logged. The reasonable value for this option depends - on your hardware configuration. This option can be specified for - [`ejabberd_service`](/archive/20_07/listen/#ejabberd-service) - and [`ejabberd_c2s`](/archive/20_07/listen/#ejabberd-c2s) - listeners, or also globally for - [`ejabberd_s2s_out`](/archive/20_07/listen/#ejabberd-s2s-out). - If the option is not specified for - `ejabberd_service` or `ejabberd_c2s` listeners, the globally - configured value is used. The allowed values are integers and - ’undefined’. Default value: ’10000’. - -## max_payload_size - -*Size* - -Specify the maximum payload size in bytes. -It can be either an integer or the word `infinity`. -The default value is `infinity`. - -## max_stanza_size - -*Size* - -This option specifies an approximate maximum size in bytes of XML - stanzas. Approximate, because it is calculated with the precision of - one block of read data. For example `{max_stanza_size, 65536}`. The - default value is `infinity`. Recommended values are 65536 for c2s - connections and 131072 for s2s connections. s2s max stanza size must - always much higher than c2s limit. Change this value with extreme - care as it can cause unwanted disconnect if set too low. - -## password - -*Secret* - -Specify the password to verify an external component that connects to the port. - -## port - -* Port number, or unix domain socket path* - -Declares at which port/unix domain socket should be listening. - -Can be set to number between `1` and `65535` to listen on TCP or UDP socket, -or can be set to string in form`"unix:/path/to/socket"` to create and listen -on unix domain socket `/path/to/socket`. - -## protocol_options - -*ProtocolOpts* - -List of general options relating to SSL/TLS. These map to - [`OpenSSL’s set_options()`](https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_options.html). - The default entry is: `"no_sslv3|cipher_server_preference|no_compression"` - -## request_handlers - -*{Path: Module}* - -To define one or several handlers that will serve HTTP requests in -[`ejabberd_http`](/archive/20_07/listen/#ejabberd-http). The - Path is a string; so the URIs that start with that Path will be - served by Module. For example, if you want `mod_foo` to serve the - URIs that start with `/a/b/`, and you also want `mod_bosh` to - serve the URIs `/bosh/`, use this option: - - request_handlers: - /a/b: mod_foo - /bosh: mod_bosh - /mqtt: mod_mqtt - -## shaper - -*none | ShaperName* - -This option defines a shaper for the port (see section  -[Shapers](/admin/configuration/basic/#shapers)). - The default value is `none`. - -## shaper_rule - -*none | ShaperRule* - -This option defines a shaper rule for -[`ejabberd_service`](/archive/20_07/listen/#ejabberd-service) (see -section [Shapers](/admin/configuration/basic/#shapers)). -The recommended value is `fast`. - -## starttls - -*true | false* - -This option specifies that STARTTLS encryption is available on -connections to the port. You should also set the -[`certfiles`](/archive/20_07/toplevel/#certfiles) top-level option -or configure [ACME](/admin/configuration/basic/#acme). - -## starttls_required - -*true | false* - -This option specifies that STARTTLS encryption is required on -connections to the port. No unencrypted connections will be allowed. -You should also set the -[`certfiles`](/archive/20_07/toplevel/#certfiles) top-level option -or configure [ACME](/admin/configuration/basic/#acme). - -## tag - -*String* - -Allow specifying a tag in a `listen` section -and later use it to have a special -[`api_permissions`](/archive/20_07/toplevel/#api_permissions) -just for it. - -For example: - - listen: - - - port: 4000 - module: ejabberd_http - tag: "magic_listener" - - api_permissions: - "magic_access": - from: - - tag: "magic_listener" - who: all - what: "*" - -The default value is the empty string: `""`. - -## timeout - -*Integer* - -Timeout of the connections, expressed in milliseconds. Default: 5000 - -## tls - -*true | false* - -This option specifies that traffic on the port will be encrypted - using SSL immediately after connecting. This was the traditional - encryption method in the early Jabber software, commonly on port - 5223 for client-to-server communications. But this method is - nowadays deprecated and not recommended. The preferable encryption - method is STARTTLS on port 5222, as defined - [`RFC 6120: XMPP Core`](http://xmpp.org/rfcs/rfc6120.html#tls), - which can be enabled in `ejabberd` with the option - [`starttls`](#starttls). - -If this option is set, you should also set the - [`certfiles`](/archive/20_07/toplevel/#certfiles) top-level - option or configure [ACME](/admin/configuration/basic/#acme). - -The option `tls` can also be used in - [`ejabberd_http`](/archive/20_07/listen/#ejabberd-http) - to support HTTPS. - -## tls_compression - -*true | false* - -Whether to enable or disable TLS compression. The default value is - `false`. - -## tls_verify - -*false | true* - -This option specifies whether to verify the certificate or not when TLS is enabled. - -The default value is `false`, which means no checks are performed. - -The certificate will be checked against trusted CA roots, either defined at the operation system level or defined in the - listener [`cafile`](#cafile). If trusted, it will accept the jid that is embedded in the certificate in the - `subjectAltName` field of that certificate. - -## use_proxy_protocol - -*true | false* - -Is this listener accessed by proxy service that is using - proxy protocol for supplying real IP addresses to ejabberd server. You can read about this protocol - in [Proxy protocol specification](http://www.haproxy.org/download/1.8/doc/proxy-protocol.txt). - The default value of this option is`false`. - -## zlib - -*true | false* - -This option specifies that Zlib stream compression (as defined in - [`XEP-0138`](http://xmpp.org/extensions/xep-0138.html)) is available - on connections to the port. - diff --git a/content/archive/20_07/listen.md b/content/archive/20_07/listen.md deleted file mode 100644 index f22d1fcd..00000000 --- a/content/archive/20_07/listen.md +++ /dev/null @@ -1,771 +0,0 @@ ---- -title: Listen Modules -toc: true -menu: Listen Modules -order: 50 ---- - - -# Listen Option - -The **listen option** defines for which ports, addresses and network -protocols `ejabberd` will listen and what services will be run on them. -Each element of the list is an associative array with the following -elements: - -- Port number. Optionally also the IP address and/or a transport - protocol. - -- Listening module that serves this port. - -- Options for the TCP socket and for the listening module. - -For example: - - - listen: - - - port: 5222 - module: ejabberd_c2s - ip: 127.0.0.1 - starttls: true - - - port: 5269 - module: ejabberd_s2s_in - transport: tcp - - -The **port number** defines which port to listen for incoming connections. -It can be a Jabber/XMPP standard port or any other valid port number. - -The **IP address** can be represented as a string. The socket will listen -only in that network interface. It is possible to specify a generic -address ("0.0.0.0" for IPv4 or "::" for IPv6), so `ejabberd` will listen -in all addresses. Depending on the type of the IP address, IPv4 or IPv6 -will be used. When the IP address is not specified, it will listen on -all IPv4 network addresses. - -Note that on some operating systems and/or OS configurations, listening -on "::" will mean listening for IPv4 traffic as well as IPv6 traffic. - -Some example values for IP address: - -- `"0.0.0.0"` to listen in all IPv4 network interfaces. This is the - default value when no IP is specified. - -- `"::"` to listen in all IPv6 network interfaces - -- `"10.11.12.13"` is the IPv4 address `10.11.12.13` - -- `"::FFFF:127.0.0.1"` is the IPv6 address `::FFFF:127.0.0.1/128` - -The **transport protocol** can be `tcp` or `udp`. Default is `tcp`. - -# Summary of Listen Modules - -The available modules, their purpose and the options allowed by each one -are: - -## ejabberd_c2s - -Handles c2s connections. - -Options: -[access](/archive/20_07/listen-options/#access), -[cafile](/archive/20_07/listen-options/#cafile), -[ciphers](/archive/20_07/listen-options/#ciphers), -[dhfile](/archive/20_07/listen-options/#dhfile), -[max_fsm_queue](/archive/20_07/listen-options/#max-fsm-queue), -[max_stanza_size](/archive/20_07/listen-options/#max-stanza-size), -[protocol_options](/archive/20_07/listen-options/#protocol-options), -[shaper](/archive/20_07/listen-options/#shaper), -[starttls](/archive/20_07/listen-options/#starttls), -[starttls_required](/archive/20_07/listen-options/#starttls-required), -[tls](/archive/20_07/listen-options/#tls), -[tls_compression](/archive/20_07/listen-options/#tls-compression), -[tls_verify](/archive/20_07/listen-options/#tls-verify), -[zlib](/archive/20_07/listen-options/#zlib). - -## ejabberd_s2s_in - -Handles incoming s2s connections. - -Options: -[cafile](/archive/20_07/listen-options/#cafile), -[ciphers](/archive/20_07/listen-options/#ciphers), -[dhfile](/archive/20_07/listen-options/#dhfile), -[max_fsm_queue](/archive/20_07/listen-options/#max-fsm-queue), -[max_stanza_size](/archive/20_07/listen-options/#max-stanza-size), -[protocol_options](/archive/20_07/listen-options/#protocol-options), -[shaper](/archive/20_07/listen-options/#shaper), -[tls](/archive/20_07/listen-options/#tls), -[tls_compression](/archive/20_07/listen-options/#tls-compression). - -## ejabberd_service - -Interacts with an - [`external component`](http://www.ejabberd.im/tutorials-transports) - (as defined in the Jabber Component Protocol - ([`XEP-0114`](http://xmpp.org/extensions/xep-0114.html)). - -Options: -[access](/archive/20_07/listen-options/#access), -[cafile](/archive/20_07/listen-options/#cafile), -[certfile](/archive/20_07/listen-options/#certfile), -[check_from](/archive/20_07/listen-options/#check-from), -[ciphers](/archive/20_07/listen-options/#ciphers), -[dhfile](/archive/20_07/listen-options/#dhfile), -[global_routes](/archive/20_07/listen-options/#global-routes), -[hosts](/archive/20_07/listen-options/#hosts), -[max_fsm_queue](/archive/20_07/listen-options/#max-fsm-queue), -[max_stanza_size](/archive/20_07/listen-options/#max-stanza-size), -[password](/archive/20_07/listen-options/#password), -[protocol_options](/archive/20_07/listen-options/#protocol-options), -[shaper](/archive/20_07/listen-options/#shaper), -[shaper_rule](/archive/20_07/listen-options/#shaper-rule), -[tls](/archive/20_07/listen-options/#tls), -[tls_compression](/archive/20_07/listen-options/#tls-compression). - -## ejabberd_sip - -Handles SIP requests as defined in - [`RFC 3261`](http://tools.ietf.org/html/rfc3261). - -For details please check the -[ejabberd_sip](/archive/20_07/listen/#ejabberd-sip-1) -and [mod_sip](/archive/20_07/modules/#mod-sip) sections. - -General listener options: -[certfile](/archive/20_07/listen-options/#certfile), -[tls](/archive/20_07/listen-options/#tls). - -## ejabberd_stun - -Handles STUN/TURN requests as defined in - [`RFC 5389`](http://tools.ietf.org/html/rfc5389) and - [`RFC 5766`](http://tools.ietf.org/html/rfc5766). - -For the specific module options, please check the -[ejabberd_stun](/archive/20_07/listen/#ejabberd-stun-1) section: -`auth_realm`, -`auth_type`, -`server_name`, -`turn_ip`, -`turn_max_allocations`, -`turn_max_permissions`, -`turn_max_port`, -`turn_min_port`, -`use_turn`. - -General listener options: -[certfile](/archive/20_07/listen-options/#certfile), -[shaper](/archive/20_07/listen-options/#shaper), -[tls](/archive/20_07/listen-options/#tls), - -## ejabberd_http - -Handles incoming HTTP connections. - -With the proper request handlers configured, this serves HTTP services like -[ACME](/admin/configuration/basic/#acme), -[API](/archive/20_07/modules/#mod-http-api), -[BOSH](/archive/20_07/modules/#mod-bosh), -[CAPTCHA](/admin/configuration/basic/#captcha), -[Fileserver](/archive/20_07/modules/#mod-http-fileserver), -[OAuth](/developer/ejabberd-api/oauth/), -[Upload](/archive/20_07/modules/#mod-http-upload), -[WebAdmin](/admin/guide/managing/#web-admin), -[WebSocket](/archive/20_07/listen/#ejabberd-http-ws), -[XMP-RPC](/archive/20_07/listen/#ejabberd-xmlrpc). - -Options: -[cafile](/archive/20_07/listen-options/#cafile), -[ciphers](/archive/20_07/listen-options/#ciphers), -[custom_headers](/archive/20_07/listen-options/#custom-headers), -[default_host](/archive/20_07/listen-options/#default-host), -[dhfile](/archive/20_07/listen-options/#dhfile), -[protocol_options](/archive/20_07/listen-options/#protocol-options), -[request_handlers](/archive/20_07/listen-options/#request-handlers), -[tag](/archive/20_07/listen-options/#tag), -[tls](/archive/20_07/listen-options/#tls), -[tls_compression](/archive/20_07/listen-options/#tls-compression), -and the [trusted_proxies](/archive/20_07/toplevel/#trusted-proxies) top-level option. - -## mod_mqtt - -Support for MQTT requires configuring `mod_mqtt` both in the -[listen](/archive/20_07/toplevel/#listen) and the -[modules](/archive/20_07/toplevel/#modules) sections. -Check the [mod_mqtt modules options](/archive/20_07/modules/#mod-mqtt). -Check the advanded documentation in [MQTT Support](/admin/guide/mqtt/). - -Listen options: -[max_fsm_queue](/archive/20_07/listen-options/#max-fsm-queue), -[max_payload_size](/archive/20_07/listen-options/#max-payload-size), -[tls](/archive/20_07/listen-options/#tls), -[tls_verify](/archive/20_07/listen-options/#tls-verify). - - -# ejabberd_stun - -`ejabberd` is able to act as a stand-alone STUN/TURN server -([`RFC 5389`](http://tools.ietf.ml/rfc5389)/[`RFC 5766`](http://tools.ietf.org/html/rfc5766). -In that role `ejabberd` helps clients with ICE -([`RFC 5245`](http://tools.ietf.org/html/rfc5245) or Jingle ICE -([`XEP-0176`](http://xmpp.org/extensions/xep-0176.html) support to -discover their external addresses and ports and to relay media traffic -when it is impossible to establish direct peer-to-peer connection. - -The specific configurable options are: - -**`tls: true|false`**: If enabled, `certfile` option must be set, otherwise `ejabberd` will - not be able to accept TLS connections. Obviously, this option makes - sense for `tcp` transport only. The default is `false`. - -**`certfile: Path`**: Path to the certificate file. Only makes sense when `tls` is set. - -**`use_turn: true|false`**: Enables/disables TURN (media relay) functionality. The default is - `false`. - -**`turn_ip: String`**: The IPv4 address advertised by your TURN server. The address should - not be NAT’ed or firewalled. There is not default, so you should set - this option explicitly. Implies `use_turn`. - -**`turn_min_port: Integer`**: Together with `turn_max_port` forms port range to allocate from. The - default is 49152. Implies `use_turn`. - -**`turn_max_port: Integer`**: Together with `turn_min_port` forms port range to allocate from. The - default is 65535. Implies `use_turn`. - -**`turn_max_allocations: Integer|infinity`**: Maximum number of TURN allocations available from the particular IP - address. The default value is 10. Implies `use_turn`. - -**`turn_max_permissions: Integer|infinity`**: Maximum number of TURN permissions available from the particular IP - address. The default value is 10. Implies `use_turn`. - -**`auth_type: user|anonymous`**: Which authentication type to use for TURN allocation requests. When - type `user` is set, ejabberd authentication backend is used. For - `anonymous` type no authentication is performed (not recommended for - public services). The default is `user`. Implies `use_turn`. - -**`auth_realm: String`**: When `auth_type` is set to `user` and you have several virtual hosts - configured you should set this option explicitly to the virtual host - you want to serve on this particular listening port. Implies - `use_turn`. - -**`shaper: Atom`**: For `tcp` transports defines shaper to use. The default is `none`. - -**`server_name: String`**: Defines software version to return with every response. The default - is the STUN library version. - -Example configuration with disabled TURN functionality (STUN only): - - - listen: - ... - - - port: 3478 - transport: udp - module: ejabberd_stun - - - port: 3478 - module: ejabberd_stun - - - port: 5349 - module: ejabberd_stun - certfile: /etc/ejabberd/server.pem - ... - -Example configuration with TURN functionality. Note that STUN is always -enabled if TURN is enabled. Here, only UDP section is shown: - - - listen: - ... - - - port: 3478 - transport: udp - use_turn: true - turn_ip: 10.20.30.1 - module: ejabberd_stun - ... - -You also need to configure DNS SRV records properly so clients can -easily discover a STUN/TURN server serving your XMPP domain. Refer to -section -[`DNS Discovery of a Server`](http://tools.ietf.org/html/rfc5389#section-9) -of [`RFC 5389`](http://tools.ietf.org/html/rfc5389) and section -[`Creating an Allocation`](http://tools.ietf.org/html/rfc5766#section-6) -of [`RFC 5766`](http://tools.ietf.org/html/rfc5766) for details. - -Example DNS SRV configuration for STUN only: - - _stun._udp IN SRV 0 0 3478 stun.example.com. - _stun._tcp IN SRV 0 0 3478 stun.example.com. - _stuns._tcp IN SRV 0 0 5349 stun.example.com. - -And you should also add these in the case if TURN is enabled: - - _turn._udp IN SRV 0 0 3478 turn.example.com. - _turn._tcp IN SRV 0 0 3478 turn.example.com. - _turns._tcp IN SRV 0 0 5349 turn.example.com. - -# ejabberd_sip - -## SIP Configuration - -`ejabberd` has built-in SIP support. To activate this feature, -add the [`ejabberd_sip`](#ejabberd-sip) listen module, enable -[`mod_sip`](/archive/20_07/modules/#mod-sip) module -for the desired virtual host, and configure DNS properly. - -To add a listener you should configure `ejabberd_sip` listening module -as described in [Listen](#listen-option) section. -If option [`tls`](/archive/20_07/listen-options/#tls) is specified, -option [`certfile`](/archive/20_07/listen-options/#certfile) -must be specified as well, otherwise incoming TLS connections -would fail. - -Example configuration with standard ports (as per -[`RFC 3261`](http://tools.ietf.org/html/rfc3261)): - - - listen: - ... - - - port: 5060 - transport: udp - module: ejabberd_sip - - - port: 5060 - module: ejabberd_sip - - - port: 5061 - module: ejabberd_sip - tls: true - certfile: /etc/ejabberd/server.pem - ... - -Note that there is no StartTLS support in SIP and -[`SNI`](http://en.wikipedia.org/wiki/Server_Name_Indication) support is -somewhat tricky, so for TLS you have to configure different virtual -hosts on different ports if you have different certificate files for -them. - -Next you need to configure DNS SIP records for your virtual domains. -Refer to [`RFC 3263`](http://tools.ietf.org/html/rfc3263) for the -detailed explanation. Simply put, you should add NAPTR and SRV records -for your domains. Skip NAPTR configuration if your DNS provider doesn't -support this type of records. It’s not fatal, however, highly -recommended. - -Example configuration of NAPTR records: - - example.com IN NAPTR 10 0 "s" "SIPS+D2T" "" _sips._tcp.example.com. - example.com IN NAPTR 20 0 "s" "SIP+D2T" "" _sip._tcp.example.com. - example.com IN NAPTR 30 0 "s" "SIP+D2U" "" _sip._udp.example.com. - -Example configuration of SRV records with standard ports (as per -[`RFC 3261`](http://tools.ietf.org/html/rfc3261): - - _sip._udp IN SRV 0 0 5060 sip.example.com. - _sip._tcp IN SRV 0 0 5060 sip.example.com. - _sips._tcp IN SRV 0 0 5061 sip.example.com. - -## Note on SIP usage - -SIP authentication does not support SCRAM. As such, it is not possible -to use `mod_sip` to authenticate when ejabberd has been set to encrypt -password with SCRAM. - -# ejabberd_http_ws - -This module enables XMPP communication over Websocket connection as -described in [`RFC 7395`](http://tools.ietf.org/html/rfc7395). - -## Enabling Websocket support - -To enable this module it must have handler added to `request_handlers` -section of `ejabberd_http` listener: - - listen: - ... - - - port: 5280 - module: ejabberd_http - request_handlers: - ... - /xmpp: ejabberd_http_ws - ... - ... - -This module can be configured by using those options that should be -placed in general section of config file: [websocket\_origin](/archive/20_07/toplevel/#websocket-origin), [websocket\_ping\_interval](/archive/20_07/toplevel/#websocket-ping-interval), [websocket\_timeout](/archive/20_07/toplevel/#websocket-timeout). - -## Discovery - -You also need to configure DNS SRV records properly so clients can -easily discover Websocket service for your XMPP domain. Refer to -[XEP-0156](https://xmpp.org/extensions/xep-0156.html). - -Example DNS TXT configuration for Websocket: - - _xmppconnect IN TXT "[ _xmpp-client-websocket=wss://web.example.com:443/ws ]" - -## Testing Websocket - -A test client can be found on Github: [Websocket test client](https://github.com/processone/xmpp-websocket-client) - - - -# ejabberd_xmlrpc - -Handles XML-RPC requests to execute -[ejabberd commands](/admin/guide/managing/#ejabberd-commands). -It is configured as a request handler in -[ejabberd_http](/archive/20_07/listen/#ejabberd-http). - -By default there is no restriction to who can execute what commands, -so it is strongly recommended that you configure restrictions using -[API Permissions](https://docs.ejabberd.im/developer/ejabberd-api/permissions/). - -This is the minimum configuration required to enable the feature: - - listen: - - - port: 4560 - module: ejabberd_http - request_handlers: - /: ejabberd_xmlrpc - -Example Python script: - - import xmlrpclib - server = xmlrpclib.Server('http://127.0.0.1:4560/'); - params = {} - params["host"] = "localhost" - print server.registered_users(params) - -This example configuration adds some restrictions: - - listen: - - - port: 5281 - ip: "::" - module: ejabberd_http - request_handlers: - /api: mod_http_api - /xmlrpc: ejabberd_xmlrpc - - api_permissions: - "some XMLRPC commands": - from: ejabberd_xmlrpc - who: - - ip: 127.0.0.1 - - user: user1@localhost - what: - - registered_users - - connected_users_number - -With that configuration, it is possible to execute two specific commands using -`ejabberd_xmlrpc`, with two access restrictions. Example Python script: - - import xmlrpclib - server = xmlrpclib.Server('http://127.0.0.1:5281/xmlrpc') - LOGIN = {'user':'user1', - 'server':'localhost', - 'password':'mypass11', - 'admin':True} - def calling(command, data): - fn = getattr(server, command) - return fn(LOGIN, data) - print calling('registered_users', {'host':'localhost'}) - -It's possible to use OAuth for authentication instead of plain password, see -[OAuth Support](/developer/ejabberd-api/oauth/). - -In ejabberd 20.03 and older, it was possible to configure `ejabberd_xmlrpc` as a -listener, see the old document for reference and example configuration: -[Listening Module](/admin/configuration/old/#listening-module). - -Just for reference, there's also the old -[`ejabberd_xmlrpc documentation`](http://www.ejabberd.im/ejabberd_xmlrpc). - -# Examples - -For example, the following simple configuration defines: - -- There are three domains. The default certificate file is - `server.pem`. However, the c2s and s2s connections to the domain - `example.com` use the file `example_com.pem`. - -- Port 5222 listens for c2s connections with STARTTLS, and also allows - plain connections for old clients. - -- Port 5223 listens for c2s connections with the old SSL. - -- Port 5269 listens for s2s connections with STARTTLS. The socket is - set for IPv6 instead of IPv4. - -- Port 3478 listens for STUN requests over UDP. - -- Port 5280 listens for HTTP requests, and serves the HTTP-Bind (BOSH) - service. - -- Port 5281 listens for HTTP requests, using HTTPS to serve HTTP-Bind - (BOSH) and the Web Admin as explained in [Managing: Web Admin](/admin/guide/managing/#web-admin). The - socket only listens connections to the IP address 127.0.0.1. - - - hosts: - - example.com - - example.org - - example.net - - certfiles: - - /etc/ejabberd/server.pem - - /etc/ejabberd/example_com.pem - - listen: - - - port: 5222 - module: ejabberd_c2s - access: c2s - shaper: c2s_shaper - starttls: true - max_stanza_size: 65536 - - - port: 5223 - module: ejabberd_c2s - access: c2s - shaper: c2s_shaper - tls: true - max_stanza_size: 65536 - - - port: 5269 - ip: "::" - module: ejabberd_s2s_in - shaper: s2s_shaper - max_stanza_size: 131072 - - - port: 3478 - transport: udp - module: ejabberd_stun - - - port: 5280 - module: ejabberd_http - request_handlers: - /bosh: mod_bosh - - - port: 5281 - ip: 127.0.0.1 - module: ejabberd_http - tls: true - request_handlers: - /admin: ejabberd_web_admin - /bosh: mod_bosh - - s2s_use_starttls: optional - outgoing_s2s_families: - - ipv4 - - ipv6 - outgoing_s2s_timeout: 10000 - trusted_proxies: [127.0.0.1, 192.168.1.11] - - -In this example, the following configuration defines that: - -- c2s connections are listened for on port 5222 (all IPv4 addresses) - and on port 5223 (SSL, IP 192.168.0.1 and fdca:8ab6:a243:75ef::1) - and denied for the user called ‘`bad`’. - -- s2s connections are listened for on port 5269 (all IPv4 addresses) - with STARTTLS for secured traffic strictly required, and the - certificates are verified. Incoming and outgoing connections of - remote XMPP servers are denied, only two servers can connect: - “jabber.example.org” and “example.com”. - -- Port 5280 is serving the Web Admin and the HTTP-Bind (BOSH) service in - all the IPv4 addresses. Note that it is also possible to serve them - on different ports. The second example in section [Managing: Web Admin](/admin/guide/managing/#web-admin) shows - how exactly this can be done. A request handler to serve MQTT over Websocket is also defined. - -- All users except for the administrators have a traffic of limit - 1,000Bytes/second - -- The [`AIM transport`](http://www.ejabberd.im/pyaimt) - `aim.example.org` is connected to port 5233 on localhost IP - addresses (127.0.0.1 and ::1) with password ‘`aimsecret`’. - -- The ICQ transport JIT (`icq.example.org` and `sms.example.org`) is - connected to port 5234 with password ‘`jitsecret`’. - -- The [`MSN transport`](http://www.ejabberd.im/pymsnt) - `msn.example.org` is connected to port 5235 with password - ‘`msnsecret`’. - -- The [`Yahoo! transport`](http://www.ejabberd.im/yahoo-transport-2) - `yahoo.example.org` is connected to port 5236 with password - ‘`yahoosecret`’. - -- The - [`Gadu-Gadu transport`](http://www.ejabberd.im/jabber-gg-transport) - `gg.example.org` is connected to port 5237 with password - ‘`ggsecret`’. - -- The [`Jabber Mail Component`](http://www.ejabberd.im/jmc) - `jmc.example.org` is connected to port 5238 with password - ‘`jmcsecret`’. - -- The service custom has enabled the special option to avoiding - checking the `from` attribute in the packets send by this component. - The component can send packets in behalf of any users from the - server, or even on behalf of any server. - - - acl: - blocked: - user: bad - trusted_servers: - server: - - example.com - - jabber.example.org - xmlrpc_bot: - user: - - xmlrpc-robot@example.org - shaper: - normal: 1000 - shaper_rules: - c2s_shaper: - - none: admin - - normal - access_rules: - c2s: - - deny: blocked - - allow - xmlrpc_access: - - allow: xmlrpc_bot - s2s: - - allow: trusted_servers - certfiles: - - /path/to/ssl.pem - s2s_access: s2s - s2s_use_starttls: required_trusted - listen: - - - port: 5222 - module: ejabberd_c2s - shaper: c2s_shaper - access: c2s - - - ip: 192.168.0.1 - port: 5223 - module: ejabberd_c2s - tls: true - access: c2s - - - ip: "FDCA:8AB6:A243:75EF::1" - port: 5223 - module: ejabberd_c2s - tls: true - access: c2s - - - port: 5269 - module: ejabberd_s2s_in - - - port: 5280 - module: ejabberd_http - request_handlers: - /admin: ejabberd_web_admin - /bosh: mod_bosh - /mqtt: mod_mqtt - - - port: 4560 - module: ejabberd_xmlrpc - access_commands: {} - - - ip: 127.0.0.1 - port: 5233 - module: ejabberd_service - hosts: - aim.example.org: - password: aimsecret - - - ip: "::1" - port: 5233 - module: ejabberd_service - hosts: - aim.example.org: - password: aimsecret - - - port: 5234 - module: ejabberd_service - hosts: - icq.example.org: - password: jitsecret - sms.example.org: - password: jitsecret - - - port: 5235 - module: ejabberd_service - hosts: - msn.example.org: - password: msnsecret - - - port: 5236 - module: ejabberd_service - password: yahoosecret - - - port: 5237 - module: ejabberd_service - hosts: - gg.example.org: - password: ggsecret - - - port: 5238 - module: ejabberd_service - hosts: - jmc.example.org: - password: jmcsecret - - - port: 5239 - module: ejabberd_service - check_from: false - hosts: - custom.example.org: - password: customsecret - - -Note, that for services based in jabberd14 or WPJabber you have to make -the transports log and do XDB by themselves: - - - - - - - - %d: [%t] (%h): %s - /var/log/jabber/service.log - - - - - - - - - /usr/lib/jabber/xdb_file.so - - - /var/spool/jabber - - - diff --git a/content/archive/20_07/sql-schema.md b/content/archive/20_07/sql-schema.md deleted file mode 100644 index 9cf8ef33..00000000 --- a/content/archive/20_07/sql-schema.md +++ /dev/null @@ -1,310 +0,0 @@ ---- -title: ejabberd SQL Database Schema -toc: true -menu: SQL Schema ---- - - -We present the tables that might be in use, depending on your server configuration, together with a short explanation of the fields involved and their intended use. Tables are presented roughly grouped by related functionality. - -Consider this document a work in progress, not all tables are documented yet. - -Latest version of database schema are available in [ejabberd Github repository](https://github.com/processone/ejabberd): - -* [MySQL schema](https://github.com/processone/ejabberd/blob/master/sql/mysql.sql) -* [Postgres schema](https://github.com/processone/ejabberd/blob/master/sql/pg.sql) -* [SQLite schema](https://github.com/processone/ejabberd/blob/master/sql/lite.sql) -* [MS SQL Server schema](https://github.com/processone/ejabberd/blob/master/sql/mssql.sql). This - schema need testing / feedback and possibly improvement from SQL - Server users. - -# Authentication - -## Table `users` - -Contains the information required to authenticate users. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| password | string | User password, can be hashed | -| created_at | timestamp | When the user account was created | - - -The password are hashed if you use SCRAM authentication. In that case the next fields are also defined - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| serverkey | string | support for salted passwords | -| salt | string | support for salted passwords | -| iterationcount | integer | support for salted passwords | - - -# Rosters - -## Table `rosterusers` - -This is a quite complex table, used as a store for a quite complex protocol that is the one defined to manage -rosters and subscriptions on [rfc6121](http://tools.ietf.org/html/rfc6121). - -In the common case of two users adding each other as contacts, entries in the roster table follows a series of steps - as they moves from a subscription request to the final approval and bi-directional subscription being established. -This process can be initiated either by the user, or by the (possible remote) peer. Also need to account for the case -where the user, or the contact, might not be online at the moment of the subscription request is made. - -Steps are further complicated by the fact that entries in the roster aren't required to have corresponding subscriptions. -For details of the meaning of the different fields, refer to [the protocol itself](http://tools.ietf.org/html/rfc6121#section-2), as these are mostly a direct mapping of it. - -Note: -If you manage users contacts from outside the roster workflow of XMPP (for example your site backends perform the linking between -users), it is likely that you only need to care about the username, jid and nick fields, and set the subscription field to be always -'B' for a mutual link between users. - - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| jid | string | Contact jid | -| nick | string | Contact nickname | -| subscription | char | 'B'=both | 'T'=To | 'F'=From | 'N'=none | -| ask | char | 'S'=subscribe | 'U'=unsubscribe | B='both' | 'O'=out | 'I'=in | 'N'=none | -| askmessage | string | Message to be displayed on the subscription request | -| server | char | 'N' for normal users contacts | -| subscribe | string | | -| type | string | "item" | -| created_at | timestamp | Creation date of this roster entry | - - - - -## Table `rostergroups` - -## Table `sr_group` - -## Table `sr_user` - - - -# Messages - -## Table `spool` -Messages sent to users that are offline are stored in this table. -Do not confuse this with general message archiving: messages are only temporarily stored in this table, removed as soon as the target user -is back online and the pending messages delivered to it. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| xml | blob | Raw packet | -| seq | integer | Unique, autoincrement sequence number. | -| created_at | timestamp | When the message was stored | - -The seq field is used for sorting, and to easily identify a particular user message. - - -## Table `privacy_list_data` - -The table is used to store privacy rules. - -The table is a direct translation of the XMPP packet used to set -privacy lists. For more details, please read -[XEP-0016: Privacy Lists, Syntax and Semantics](http://xmpp.org/extensions/xep-0016.html#protocol-syntax). Here -is an example packet coming from privacy list specification: - - - - [] - [] - [] - [] - - -The table fields are defined as follow: - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| id | int | Privacy list rule id. | -| t | char | Privacy rule type: 'j' for jid, 'g' for group and 's' for subscription. | -| value | string | Privacy list value for match, whose content depends on privacy list rule type. | -| action | char | Privacy list action: 'd' for deny and 'a' for allow. | -| ord | int | Order for applying the privacy list rule. | -| match\_all | boolean (0 or 1) | If true (1), means any packet types will be matched. Other matches should be false (0). | -| match\_iq | boolean (0 or 1) | If true (1), means iq packets will be matched by rule. | -| match\_message | boolean (0 or 1) | If true (1), means message packets type will be matched by rule. | -| match\_presence\_in | boolean (0 or 1) | If true (1), means inbound presence packets type will be matched by rule. | -| match\_presence\_out | boolean (0 or 1) | If true (1), means outbound packets type will be matched by rule. | - - - -# Multiuser Chat Rooms - -## Table `muc_room` -It is used to store *persistent* rooms, that is, rooms that must be automatically started with the server. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| name | string | Room name | -| host | string | Hostname of the conference component | -| opts | string | Room options, encoded as erlang terms | -| created_at | timestamp | Creation date | - -The opts field is legible, but not mean to be modified directly. It contents depends on the implementation of mod_muc. -It contains the room configuration and affiliations. - - -## Table `muc_registered` -Contains a map of user to nicknames. When a user register a nickname with the conference module, that nick is reserved and can't be used by -anyone else, in any room from that conference host. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| jid | string | User jid | -| host | string | Hostname of the conference component | -| nick | string | Room options, encoded as erlang terms | -| created_at | timestamp | Creation date | - - -## Table `room_history` -In ejabberd Business Edition, -this table is used if persistent room history is enabled. If so, recent room history is saved to the DB before ejabberd is stopped, -allowing the recent history to survive server restarts. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| room | string | Room jid | -| nick | string | Nickname that sent the message | -| packet | string | XML stanza with the message | -| have_subject | boolean | True if the message stanza had subject | -| created_at | timestamp | Creation date | -| size | integer | Size in bytes of the xml packet | - -## Table `muc_online_room` -This table is used to store rooms that actually exists in the memory of the server. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| name | string | Room name | -| host | string | Hostname of the conference component | -| node | string | Erlang node where the room is | -| pid | string | Pid of the thread running the room | - -## Table `muc_online_users` -This table is used to store MucSub subscriptions. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User -| server | string | Hostname of the user | -| resource | string | User resource | -| name | string | Name of the room | -| host | string | Hostname of the conference component | -| node | string | Erlang node | - -## Table `muc_room_subscribers` -This table is used to store MucSub subscriptions. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| room | string | Room name | -| host | string | Hostname of the conference component | -| jid | string | User jid | -| nick | string | User nick | -| nodes | string | MucSub nodes | -| created_at | timestamp | Creation date | - - -# VCard - -## Table `vcard` - -The table is used to store raw vCard content for delivery of the vCard -"as is". - -The table fields are defined as follow: - -| Field | Type | Usage | -| -------------------- | ---------------- | -------------------- | -| username | string | Owner of the Vcard | -| vcard | text | Raw Vcard | -| created_at | timestamp | Record creation date | - -## Table `vcard_search` - -The table is used to store vCard index on a few of the Vcard field -used for vCard search in users directory. - -You can learn more about the vCard specification on Wikipedia -[vCard](https://en.wikipedia.org/wiki/VCard) page. - -The table fields are defined as follow: - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------- | -| username | string | Raw username for display | -| lusername | string | Lowercase username for search | -| fn | string | Raw fullname for display | -| lfn | string | Lowercase fullname for search | -| family | string | Raw family name for display | -| lfamilly | string | Lowercase family name for search | -| given | string | Raw given name for display | -| lgiven | string | Lowercase given name for search | -| middle | string | Raw middle name for display | -| lmiddle | string | Lowercase middle name for search | -| nickname | string | Raw nickname for display | -| lnickname | string | Lowercase nickname for search | -| bday | string | Raw birthday for display | -| lbday | string | Lowercase and processed birthday for search | -| ctry | string | Raw country for display | -| lctry | string | Lowercase country for search | -| locality | string | Raw city for display | -| llocality | string | Lowercase city for search | -| email | string | Raw email for display | -| lemail | string | Lowercase email for search | -| orgname | string | Raw organisation name for display | -| lorgname | string | Lowercase organisation name for search | -| orgunit | string | Raw organisation department name for display | -| lorgunit | string | Lowercase organisation department for search | - -# Others - -## Table `last` -This table is used to store the last time the user was seen online. -It is defined as follow: - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| seconds | string | Timestamp for the last time the user was seen online | -| state | string | Why user got disconnected. Usually is empty | - -Note that the table is *not* updated while the user has the session open. - - - -## Table `caps_features` -Ejabberd uses this table to keep a list of the entity capabilities discovered. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| node | string | Node | -| subnode | string | Subnode | -| feature | string | Entity feature | -| created_at | timestamp | Creation date | - -The subnode field correspond to the 'ver' ("verification string") of XEP-0115. -There is one entry in this table for each feature advertised by the given (node,subnode) pair. - -## Table `private_storage` -Used for user private data storage. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| namespace | string | XEP-0049 namespace of the stored data | -| data | string | Raw xml | -| created_at | timestamp | Creation date | - diff --git a/content/archive/20_12/sql-schema.md b/content/archive/20_12/sql-schema.md deleted file mode 100644 index 9cf8ef33..00000000 --- a/content/archive/20_12/sql-schema.md +++ /dev/null @@ -1,310 +0,0 @@ ---- -title: ejabberd SQL Database Schema -toc: true -menu: SQL Schema ---- - - -We present the tables that might be in use, depending on your server configuration, together with a short explanation of the fields involved and their intended use. Tables are presented roughly grouped by related functionality. - -Consider this document a work in progress, not all tables are documented yet. - -Latest version of database schema are available in [ejabberd Github repository](https://github.com/processone/ejabberd): - -* [MySQL schema](https://github.com/processone/ejabberd/blob/master/sql/mysql.sql) -* [Postgres schema](https://github.com/processone/ejabberd/blob/master/sql/pg.sql) -* [SQLite schema](https://github.com/processone/ejabberd/blob/master/sql/lite.sql) -* [MS SQL Server schema](https://github.com/processone/ejabberd/blob/master/sql/mssql.sql). This - schema need testing / feedback and possibly improvement from SQL - Server users. - -# Authentication - -## Table `users` - -Contains the information required to authenticate users. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| password | string | User password, can be hashed | -| created_at | timestamp | When the user account was created | - - -The password are hashed if you use SCRAM authentication. In that case the next fields are also defined - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| serverkey | string | support for salted passwords | -| salt | string | support for salted passwords | -| iterationcount | integer | support for salted passwords | - - -# Rosters - -## Table `rosterusers` - -This is a quite complex table, used as a store for a quite complex protocol that is the one defined to manage -rosters and subscriptions on [rfc6121](http://tools.ietf.org/html/rfc6121). - -In the common case of two users adding each other as contacts, entries in the roster table follows a series of steps - as they moves from a subscription request to the final approval and bi-directional subscription being established. -This process can be initiated either by the user, or by the (possible remote) peer. Also need to account for the case -where the user, or the contact, might not be online at the moment of the subscription request is made. - -Steps are further complicated by the fact that entries in the roster aren't required to have corresponding subscriptions. -For details of the meaning of the different fields, refer to [the protocol itself](http://tools.ietf.org/html/rfc6121#section-2), as these are mostly a direct mapping of it. - -Note: -If you manage users contacts from outside the roster workflow of XMPP (for example your site backends perform the linking between -users), it is likely that you only need to care about the username, jid and nick fields, and set the subscription field to be always -'B' for a mutual link between users. - - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| jid | string | Contact jid | -| nick | string | Contact nickname | -| subscription | char | 'B'=both | 'T'=To | 'F'=From | 'N'=none | -| ask | char | 'S'=subscribe | 'U'=unsubscribe | B='both' | 'O'=out | 'I'=in | 'N'=none | -| askmessage | string | Message to be displayed on the subscription request | -| server | char | 'N' for normal users contacts | -| subscribe | string | | -| type | string | "item" | -| created_at | timestamp | Creation date of this roster entry | - - - - -## Table `rostergroups` - -## Table `sr_group` - -## Table `sr_user` - - - -# Messages - -## Table `spool` -Messages sent to users that are offline are stored in this table. -Do not confuse this with general message archiving: messages are only temporarily stored in this table, removed as soon as the target user -is back online and the pending messages delivered to it. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| xml | blob | Raw packet | -| seq | integer | Unique, autoincrement sequence number. | -| created_at | timestamp | When the message was stored | - -The seq field is used for sorting, and to easily identify a particular user message. - - -## Table `privacy_list_data` - -The table is used to store privacy rules. - -The table is a direct translation of the XMPP packet used to set -privacy lists. For more details, please read -[XEP-0016: Privacy Lists, Syntax and Semantics](http://xmpp.org/extensions/xep-0016.html#protocol-syntax). Here -is an example packet coming from privacy list specification: - - - - [] - [] - [] - [] - - -The table fields are defined as follow: - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| id | int | Privacy list rule id. | -| t | char | Privacy rule type: 'j' for jid, 'g' for group and 's' for subscription. | -| value | string | Privacy list value for match, whose content depends on privacy list rule type. | -| action | char | Privacy list action: 'd' for deny and 'a' for allow. | -| ord | int | Order for applying the privacy list rule. | -| match\_all | boolean (0 or 1) | If true (1), means any packet types will be matched. Other matches should be false (0). | -| match\_iq | boolean (0 or 1) | If true (1), means iq packets will be matched by rule. | -| match\_message | boolean (0 or 1) | If true (1), means message packets type will be matched by rule. | -| match\_presence\_in | boolean (0 or 1) | If true (1), means inbound presence packets type will be matched by rule. | -| match\_presence\_out | boolean (0 or 1) | If true (1), means outbound packets type will be matched by rule. | - - - -# Multiuser Chat Rooms - -## Table `muc_room` -It is used to store *persistent* rooms, that is, rooms that must be automatically started with the server. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| name | string | Room name | -| host | string | Hostname of the conference component | -| opts | string | Room options, encoded as erlang terms | -| created_at | timestamp | Creation date | - -The opts field is legible, but not mean to be modified directly. It contents depends on the implementation of mod_muc. -It contains the room configuration and affiliations. - - -## Table `muc_registered` -Contains a map of user to nicknames. When a user register a nickname with the conference module, that nick is reserved and can't be used by -anyone else, in any room from that conference host. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| jid | string | User jid | -| host | string | Hostname of the conference component | -| nick | string | Room options, encoded as erlang terms | -| created_at | timestamp | Creation date | - - -## Table `room_history` -In ejabberd Business Edition, -this table is used if persistent room history is enabled. If so, recent room history is saved to the DB before ejabberd is stopped, -allowing the recent history to survive server restarts. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| room | string | Room jid | -| nick | string | Nickname that sent the message | -| packet | string | XML stanza with the message | -| have_subject | boolean | True if the message stanza had subject | -| created_at | timestamp | Creation date | -| size | integer | Size in bytes of the xml packet | - -## Table `muc_online_room` -This table is used to store rooms that actually exists in the memory of the server. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| name | string | Room name | -| host | string | Hostname of the conference component | -| node | string | Erlang node where the room is | -| pid | string | Pid of the thread running the room | - -## Table `muc_online_users` -This table is used to store MucSub subscriptions. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User -| server | string | Hostname of the user | -| resource | string | User resource | -| name | string | Name of the room | -| host | string | Hostname of the conference component | -| node | string | Erlang node | - -## Table `muc_room_subscribers` -This table is used to store MucSub subscriptions. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| room | string | Room name | -| host | string | Hostname of the conference component | -| jid | string | User jid | -| nick | string | User nick | -| nodes | string | MucSub nodes | -| created_at | timestamp | Creation date | - - -# VCard - -## Table `vcard` - -The table is used to store raw vCard content for delivery of the vCard -"as is". - -The table fields are defined as follow: - -| Field | Type | Usage | -| -------------------- | ---------------- | -------------------- | -| username | string | Owner of the Vcard | -| vcard | text | Raw Vcard | -| created_at | timestamp | Record creation date | - -## Table `vcard_search` - -The table is used to store vCard index on a few of the Vcard field -used for vCard search in users directory. - -You can learn more about the vCard specification on Wikipedia -[vCard](https://en.wikipedia.org/wiki/VCard) page. - -The table fields are defined as follow: - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------- | -| username | string | Raw username for display | -| lusername | string | Lowercase username for search | -| fn | string | Raw fullname for display | -| lfn | string | Lowercase fullname for search | -| family | string | Raw family name for display | -| lfamilly | string | Lowercase family name for search | -| given | string | Raw given name for display | -| lgiven | string | Lowercase given name for search | -| middle | string | Raw middle name for display | -| lmiddle | string | Lowercase middle name for search | -| nickname | string | Raw nickname for display | -| lnickname | string | Lowercase nickname for search | -| bday | string | Raw birthday for display | -| lbday | string | Lowercase and processed birthday for search | -| ctry | string | Raw country for display | -| lctry | string | Lowercase country for search | -| locality | string | Raw city for display | -| llocality | string | Lowercase city for search | -| email | string | Raw email for display | -| lemail | string | Lowercase email for search | -| orgname | string | Raw organisation name for display | -| lorgname | string | Lowercase organisation name for search | -| orgunit | string | Raw organisation department name for display | -| lorgunit | string | Lowercase organisation department for search | - -# Others - -## Table `last` -This table is used to store the last time the user was seen online. -It is defined as follow: - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| seconds | string | Timestamp for the last time the user was seen online | -| state | string | Why user got disconnected. Usually is empty | - -Note that the table is *not* updated while the user has the session open. - - - -## Table `caps_features` -Ejabberd uses this table to keep a list of the entity capabilities discovered. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| node | string | Node | -| subnode | string | Subnode | -| feature | string | Entity feature | -| created_at | timestamp | Creation date | - -The subnode field correspond to the 'ver' ("verification string") of XEP-0115. -There is one entry in this table for each feature advertised by the given (node,subnode) pair. - -## Table `private_storage` -Used for user private data storage. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| namespace | string | XEP-0049 namespace of the stored data | -| data | string | Raw xml | -| created_at | timestamp | Creation date | - diff --git a/content/archive/21_01/admin-api.md b/content/archive/21.01/admin-api.md similarity index 99% rename from content/archive/21_01/admin-api.md rename to content/archive/21.01/admin-api.md index de228f92..00427720 100644 --- a/content/archive/21_01/admin-api.md +++ b/content/archive/21.01/admin-api.md @@ -1,10 +1,9 @@ --- -title: Administration API reference -toc: true -menu: Administration API -// Autogenerated with 'ejabberdctl gen_markdown_doc_for_commands' +search: + exclude: true --- +# API Reference ## add_rosteritem diff --git a/content/archive/21_01/index.md b/content/archive/21.01/index.md similarity index 60% rename from content/archive/21_01/index.md rename to content/archive/21.01/index.md index 02bde7f9..145a62b6 100644 --- a/content/archive/21_01/index.md +++ b/content/archive/21.01/index.md @@ -1,15 +1,11 @@ ---- -title: Archived Documentation for 21.01 -menu: 21.01 -order: 7898 ---- +# Archived Documentation for 21.01 This section contains some archived sections for ejabberd 21.01. If you are upgrading ejabberd from a previous release, you can check: -* [Specific version upgrade notes](/admin/upgrade/#specific-version-upgrade-notes) +* [Specific version upgrade notes](../../admin/upgrade/index.md#specific_version_upgrade_notes) * [ejabberd 21.01 release announcement](https://www.process-one.net/blog/ejabberd-21-01/) -* [Docs Github Compare from 20.12](https://github.com/processone/docs.ejabberd.im/compare/20.12...21.01) -* [ejabberd Github Compare from 20.12](https://github.com/processone/ejabberd/compare/20.12...21.01) +* [Docs Github Compare from 20.12](https://github.com/processone/docs.ejabberd.im/compare/20.12..21.01) +* [ejabberd Github Compare from 20.12](https://github.com/processone/ejabberd/compare/20.12..21.01) diff --git a/content/archive/21_01/listen-options.md b/content/archive/21.01/listen-options.md similarity index 85% rename from content/archive/21_01/listen-options.md rename to content/archive/21.01/listen-options.md index 11e8b181..6caec5f4 100644 --- a/content/archive/21_01/listen-options.md +++ b/content/archive/21.01/listen-options.md @@ -1,10 +1,9 @@ --- -title: Listen Options -toc: true -menu: Listen Options -order: 51 +search: + exclude: true --- +# Listen Options This is a detailed description of each option allowed by the listening modules: @@ -34,11 +33,11 @@ The default is to use system defined file if possible. This option is useful to define the file for a specific port listener. To set a file for all client listeners or for specific vhosts, you can use the -[`c2s_cafile`](/archive/21_01/toplevel/#c2s-cafile) top-level option. +[`c2s_cafile`](toplevel.md#c2s-cafile) top-level option. To set a file for all server connections, you can use the -[`s2s_cafile`](/archive/21_01/toplevel/#s2s-cafile) top-level option +[`s2s_cafile`](toplevel.md#s2s-cafile) top-level option or the -[`ca_file`](/archive/21_01/toplevel/#ca-file) top-level option. +[`ca_file`](toplevel.md#ca_file) top-level option. ## certfile @@ -48,15 +47,15 @@ Path to the certificate file. Only makes sense when the [`tls`](#tls) options is set. If this option is not set, you should set the -[`certfiles`](/archive/21_01/toplevel/#certfiles) top-level option -or configure [ACME](/admin/configuration/basic/#acme). +[`certfiles`](toplevel.md#certfiles) top-level option +or configure [ACME](../../admin/configuration/basic.md#acme). ## check_from *true | false* This option can be used with -[`ejabberd_service`](/archive/21_01/listen/#ejabberd-service) only. +[`ejabberd_service`](listen.md#ejabberd_service) only. [`XEP-0114`](https://xmpp.org/extensions/xep-0114.html) requires that the domain must match the hostname of the component. If this option is set to `false`, `ejabberd` will allow the component to send @@ -86,7 +85,7 @@ Default value is: `[]` If the HTTP request received by ejabberd contains the HTTP header `Host` with an ambiguous virtual host that doesn’t match any one defined in ejabberd (see - [Host Names](/admin/configuration/basic/#host-names)), + [Host Names](../../admin/configuration/basic.md#host_names)), then this configured HostName is set as the request Host. The default value of this option is: `undefined`. @@ -106,7 +105,7 @@ Full path to a file containing custom parameters for Diffie-Hellman key *true | false* This option emulates legacy behaviour which registers all routes -defined in [`hosts`](/archive/21_01/toplevel/#hosts) +defined in [`hosts`](toplevel.md#hosts) on a component connected. This behaviour is considered harmful in the case when it's desired to multiplex different components on the same port, so, to disable it, @@ -121,7 +120,7 @@ to maintain backward compatibility with existing deployments. *{Hostname: [HostOption, ...]}* The external Jabber component that connects to this -[`ejabberd_service`](/archive/21_01/listen/#ejabberd-service) +[`ejabberd_service`](listen.md#ejabberd_service) can serve one or more hostnames. As `HostOption` you can define options for the component; currently the only allowed option is the password required to the component when attempt to @@ -145,10 +144,10 @@ This option specifies the maximum number of elements in the queue of corresponding connection (if any) will be terminated and error message will be logged. The reasonable value for this option depends on your hardware configuration. This option can be specified for - [`ejabberd_service`](/archive/21_01/listen/#ejabberd-service) - and [`ejabberd_c2s`](/archive/21_01/listen/#ejabberd-c2s) + [`ejabberd_service`](listen.md#ejabberd_service) + and [`ejabberd_c2s`](listen.md#ejabberd_c2s) listeners, or also globally for - [`ejabberd_s2s_out`](/archive/21_01/listen/#ejabberd-s2s-out). + [`ejabberd_s2s_out`](listen.md#ejabberd_s2s-out). If the option is not specified for `ejabberd_service` or `ejabberd_c2s` listeners, the globally configured value is used. The allowed values are integers and @@ -203,7 +202,7 @@ List of general options relating to SSL/TLS. These map to *{Path: Module}* To define one or several handlers that will serve HTTP requests in -[`ejabberd_http`](/archive/21_01/listen/#ejabberd-http). The +[`ejabberd_http`](listen.md#ejabberd_http). The Path is a string; so the URIs that start with that Path will be served by Module. For example, if you want `mod_foo` to serve the URIs that start with `/a/b/`, and you also want `mod_bosh` to @@ -219,7 +218,7 @@ To define one or several handlers that will serve HTTP requests in *none | ShaperName* This option defines a shaper for the port (see section  -[Shapers](/admin/configuration/basic/#shapers)). +[Shapers](../../admin/configuration/basic.md#shapers)). The default value is `none`. ## shaper_rule @@ -227,8 +226,8 @@ This option defines a shaper for the port (see section  *none | ShaperRule* This option defines a shaper rule for -[`ejabberd_service`](/archive/21_01/listen/#ejabberd-service) (see -section [Shapers](/admin/configuration/basic/#shapers)). +[`ejabberd_service`](listen.md#ejabberd_service) (see +section [Shapers](../../admin/configuration/basic.md#shapers)). The recommended value is `fast`. ## starttls @@ -237,8 +236,8 @@ The recommended value is `fast`. This option specifies that STARTTLS encryption is available on connections to the port. You should also set the -[`certfiles`](/archive/21_01/toplevel/#certfiles) top-level option -or configure [ACME](/admin/configuration/basic/#acme). +[`certfiles`](toplevel.md#certfiles) top-level option +or configure [ACME](../../admin/configuration/basic.md#acme). ## starttls_required @@ -247,8 +246,8 @@ or configure [ACME](/admin/configuration/basic/#acme). This option specifies that STARTTLS encryption is required on connections to the port. No unencrypted connections will be allowed. You should also set the -[`certfiles`](/archive/21_01/toplevel/#certfiles) top-level option -or configure [ACME](/admin/configuration/basic/#acme). +[`certfiles`](toplevel.md#certfiles) top-level option +or configure [ACME](../../admin/configuration/basic.md#acme). ## tag @@ -256,7 +255,7 @@ or configure [ACME](/admin/configuration/basic/#acme). Allow specifying a tag in a `listen` section and later use it to have a special -[`api_permissions`](/archive/21_01/toplevel/#api-permissions) +[`api_permissions`](toplevel.md#api_permissions) just for it. For example: @@ -297,11 +296,11 @@ This option specifies that traffic on the port will be encrypted [`starttls`](#starttls). If this option is set, you should also set the - [`certfiles`](/archive/21_01/toplevel/#certfiles) top-level - option or configure [ACME](/admin/configuration/basic/#acme). + [`certfiles`](toplevel.md#certfiles) top-level + option or configure [ACME](../../admin/configuration/basic.md#acme). The option `tls` can also be used in - [`ejabberd_http`](/archive/21_01/listen/#ejabberd-http) + [`ejabberd_http`](listen.md#ejabberd_http) to support HTTPS. ## tls_compression diff --git a/content/archive/21_04/listen.md b/content/archive/21.01/listen.md similarity index 79% rename from content/archive/21_04/listen.md rename to content/archive/21.01/listen.md index fb101b24..417dc851 100644 --- a/content/archive/21_04/listen.md +++ b/content/archive/21.01/listen.md @@ -1,11 +1,8 @@ --- -title: Listen Modules -toc: true -menu: Listen Modules -order: 50 +search: + exclude: true --- - # Listen Option The **listen option** defines for which ports, addresses and network @@ -73,35 +70,35 @@ are: Handles c2s connections. Options: -[access](/archive/21_04/listen-options/#access), -[cafile](/archive/21_04/listen-options/#cafile), -[ciphers](/archive/21_04/listen-options/#ciphers), -[dhfile](/archive/21_04/listen-options/#dhfile), -[max_fsm_queue](/archive/21_04/listen-options/#max-fsm-queue), -[max_stanza_size](/archive/21_04/listen-options/#max-stanza-size), -[protocol_options](/archive/21_04/listen-options/#protocol-options), -[shaper](/archive/21_04/listen-options/#shaper), -[starttls](/archive/21_04/listen-options/#starttls), -[starttls_required](/archive/21_04/listen-options/#starttls-required), -[tls](/archive/21_04/listen-options/#tls), -[tls_compression](/archive/21_04/listen-options/#tls-compression), -[tls_verify](/archive/21_04/listen-options/#tls-verify), -[zlib](/archive/21_04/listen-options/#zlib). +[access](listen-options.md#access), +[cafile](listen-options.md#cafile), +[ciphers](listen-options.md#ciphers), +[dhfile](listen-options.md#dhfile), +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_stanza_size](listen-options.md#max_stanza_size), +[protocol_options](listen-options.md#protocol_options), +[shaper](listen-options.md#shaper), +[starttls](listen-options.md#starttls), +[starttls_required](listen-options.md#starttls_required), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls-compression), +[tls_verify](listen-options.md#tls_verify), +[zlib](listen-options.md#zlib). ## ejabberd_s2s_in Handles incoming s2s connections. Options: -[cafile](/archive/21_04/listen-options/#cafile), -[ciphers](/archive/21_04/listen-options/#ciphers), -[dhfile](/archive/21_04/listen-options/#dhfile), -[max_fsm_queue](/archive/21_04/listen-options/#max-fsm-queue), -[max_stanza_size](/archive/21_04/listen-options/#max-stanza-size), -[protocol_options](/archive/21_04/listen-options/#protocol-options), -[shaper](/archive/21_04/listen-options/#shaper), -[tls](/archive/21_04/listen-options/#tls), -[tls_compression](/archive/21_04/listen-options/#tls-compression). +[cafile](listen-options.md#cafile), +[ciphers](listen-options.md#ciphers), +[dhfile](listen-options.md#dhfile), +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_stanza_size](listen-options.md#max_stanza_size), +[protocol_options](listen-options.md#protocol_options), +[shaper](listen-options.md#shaper), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls-compression). ## ejabberd_service @@ -111,22 +108,22 @@ Interacts with an ([`XEP-0114`](https://xmpp.org/extensions/xep-0114.html)). Options: -[access](/archive/21_04/listen-options/#access), -[cafile](/archive/21_04/listen-options/#cafile), -[certfile](/archive/21_04/listen-options/#certfile), -[check_from](/archive/21_04/listen-options/#check-from), -[ciphers](/archive/21_04/listen-options/#ciphers), -[dhfile](/archive/21_04/listen-options/#dhfile), -[global_routes](/archive/21_04/listen-options/#global-routes), -[hosts](/archive/21_04/listen-options/#hosts), -[max_fsm_queue](/archive/21_04/listen-options/#max-fsm-queue), -[max_stanza_size](/archive/21_04/listen-options/#max-stanza-size), -[password](/archive/21_04/listen-options/#password), -[protocol_options](/archive/21_04/listen-options/#protocol-options), -[shaper](/archive/21_04/listen-options/#shaper), -[shaper_rule](/archive/21_04/listen-options/#shaper-rule), -[tls](/archive/21_04/listen-options/#tls), -[tls_compression](/archive/21_04/listen-options/#tls-compression). +[access](listen-options.md#access), +[cafile](listen-options.md#cafile), +[certfile](listen-options.md#certfile), +[check_from](listen-options.md#check_from), +[ciphers](listen-options.md#ciphers), +[dhfile](listen-options.md#dhfile), +[global_routes](listen-options.md#global_routes), +[hosts](listen-options.md#hosts), +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_stanza_size](listen-options.md#max_stanza_size), +[password](listen-options.md#password), +[protocol_options](listen-options.md#protocol_options), +[shaper](listen-options.md#shaper), +[shaper_rule](listen-options.md#shaper-rule), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls-compression). ## ejabberd_sip @@ -134,12 +131,12 @@ Handles SIP requests as defined in [`RFC 3261`](https://tools.ietf.org/html/rfc3261). For details please check the -[ejabberd_sip](/archive/21_04/listen/#ejabberd-sip-1) -and [mod_sip](/archive/21_04/modules/#mod-sip) sections. +[ejabberd_sip](listen.md#ejabberd_sip_1) +and [mod_sip](modules.md#mod_sip) sections. General listener options: -[certfile](/archive/21_04/listen-options/#certfile), -[tls](/archive/21_04/listen-options/#tls). +[certfile](listen-options.md#certfile), +[tls](listen-options.md#tls). ## ejabberd_stun @@ -148,7 +145,7 @@ Handles STUN/TURN requests as defined in [`RFC 5766`](https://tools.ietf.org/html/rfc5766). For the specific module options, please check the -[ejabberd_stun](/archive/21_04/listen/#ejabberd-stun-1) section: +[ejabberd_stun](listen.md#ejabberd_stun_1) section: `auth_realm`, `auth_type`, `server_name`, @@ -162,52 +159,52 @@ For the specific module options, please check the `use_turn`. General listener options: -[certfile](/archive/21_04/listen-options/#certfile), -[shaper](/archive/21_04/listen-options/#shaper), -[tls](/archive/21_04/listen-options/#tls), +[certfile](listen-options.md#certfile), +[shaper](listen-options.md#shaper), +[tls](listen-options.md#tls), ## ejabberd_http Handles incoming HTTP connections. With the proper request handlers configured, this serves HTTP services like -[ACME](/admin/configuration/basic/#acme), -[API](/archive/21_04/modules/#mod-http-api), -[BOSH](/archive/21_04/modules/#mod-bosh), -[CAPTCHA](/admin/configuration/basic/#captcha), -[Fileserver](/archive/21_04/modules/#mod-http-fileserver), -[OAuth](/developer/ejabberd-api/oauth/), -[Upload](/archive/21_04/modules/#mod-http-upload), -[WebAdmin](/admin/guide/managing/#web-admin), -[WebSocket](/archive/21_04/listen/#ejabberd-http-ws), -[XMP-RPC](/archive/21_04/listen/#ejabberd-xmlrpc). +[ACME](../../admin/configuration/basic.md#acme), +[API](modules.md#mod_http_api), +[BOSH](modules.md#mod_bosh), +[CAPTCHA](../../admin/configuration/basic.md#captcha), +[Fileserver](modules.md#mod_http_fileserver), +[OAuth](../../developer/ejabberd-api/oauth.md), +[Upload](modules.md#mod_http_upload), +[WebAdmin](../../admin/guide/managing.md#web_admin), +[WebSocket](listen.md#ejabberd_http_ws), +[XMP-RPC](listen.md#ejabberd_xmlrpc). Options: -[cafile](/archive/21_04/listen-options/#cafile), -[ciphers](/archive/21_04/listen-options/#ciphers), -[custom_headers](/archive/21_04/listen-options/#custom-headers), -[default_host](/archive/21_04/listen-options/#default-host), -[dhfile](/archive/21_04/listen-options/#dhfile), -[protocol_options](/archive/21_04/listen-options/#protocol-options), -[request_handlers](/archive/21_04/listen-options/#request-handlers), -[tag](/archive/21_04/listen-options/#tag), -[tls](/archive/21_04/listen-options/#tls), -[tls_compression](/archive/21_04/listen-options/#tls-compression), -and the [trusted_proxies](/archive/21_04/toplevel/#trusted-proxies) top-level option. +[cafile](listen-options.md#cafile), +[ciphers](listen-options.md#ciphers), +[custom_headers](listen-options.md#custom_headers), +[default_host](listen-options.md#default_host), +[dhfile](listen-options.md#dhfile), +[protocol_options](listen-options.md#protocol_options), +[request_handlers](listen-options.md#request_handlers), +[tag](listen-options.md#tag), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls-compression), +and the [trusted_proxies](toplevel.md#trusted_proxies) top-level option. ## mod_mqtt Support for MQTT requires configuring `mod_mqtt` both in the -[listen](/archive/21_04/toplevel/#listen) and the -[modules](/archive/21_04/toplevel/#modules) sections. -Check the [mod_mqtt modules options](/archive/21_04/modules/#mod-mqtt). -Check the advanded documentation in [MQTT Support](/admin/guide/mqtt/). +[listen](toplevel.md#listen) and the +[modules](toplevel.md#modules) sections. +Check the [mod_mqtt modules options](modules.md#mod_mqtt). +Check the advanded documentation in [MQTT Support](../../admin/guide/mqtt/index.md). Listen options: -[max_fsm_queue](/archive/21_04/listen-options/#max-fsm-queue), -[max_payload_size](/archive/21_04/listen-options/#max-payload-size), -[tls](/archive/21_04/listen-options/#tls), -[tls_verify](/archive/21_04/listen-options/#tls-verify). +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_payload_size](listen-options.md#max_payload_size), +[tls](listen-options.md#tls), +[tls_verify](listen-options.md#tls_verify). # ejabberd_stun @@ -328,14 +325,14 @@ And you should also add these in the case if TURN is enabled: ## SIP Configuration `ejabberd` has built-in SIP support. To activate this feature, -add the [`ejabberd_sip`](#ejabberd-sip) listen module, enable -[`mod_sip`](/archive/21_04/modules/#mod-sip) module +add the [`ejabberd_sip`](#ejabberd_sip) listen module, enable +[`mod_sip`](modules.md#mod_sip) module for the desired virtual host, and configure DNS properly. To add a listener you should configure `ejabberd_sip` listening module as described in [Listen](#listen-option) section. -If option [`tls`](/archive/21_04/listen-options/#tls) is specified, -option [`certfile`](/archive/21_04/listen-options/#certfile) +If option [`tls`](listen-options.md#tls) is specified, +option [`certfile`](listen-options.md#certfile) must be specified as well, otherwise incoming TLS connections would fail. @@ -413,7 +410,7 @@ section of `ejabberd_http` listener: ... This module can be configured by using those options that should be -placed in general section of config file: [websocket\_origin](/archive/21_04/toplevel/#websocket-origin), [websocket\_ping\_interval](/archive/21_04/toplevel/#websocket-ping-interval), [websocket\_timeout](/archive/21_04/toplevel/#websocket-timeout). +placed in general section of config file: [websocket\_origin](toplevel.md#websocket_origin), [websocket\_ping\_interval](toplevel.md#websocket_ping_interval), [websocket\_timeout](toplevel.md#websocket_timeout). ## Discovery @@ -434,9 +431,9 @@ A test client can be found on Github: [Websocket test client](https://github.com # ejabberd_xmlrpc Handles XML-RPC requests to execute -[ejabberd commands](/admin/guide/managing/#ejabberd-commands). +[ejabberd commands](../../admin/guide/managing.md#ejabberd_commands). It is configured as a request handler in -[ejabberd_http](/archive/21_04/listen/#ejabberd-http). +[ejabberd_http](listen.md#ejabberd_http). By default there is no restriction to who can execute what commands, so it is strongly recommended that you configure restrictions using @@ -495,11 +492,11 @@ With that configuration, it is possible to execute two specific commands using print calling('registered_users', {'host':'localhost'}) It's possible to use OAuth for authentication instead of plain password, see -[OAuth Support](/developer/ejabberd-api/oauth/). +[OAuth Support](../../developer/ejabberd-api/oauth.md). In ejabberd 20.03 and older, it was possible to configure `ejabberd_xmlrpc` as a listener, see the old document for reference and example configuration: -[Listening Module](/admin/configuration/old/#listening-module). +[Listening Module](../old.md#listening_module). Just for reference, there's also the old [`ejabberd_xmlrpc documentation`](https://ejabberd.im/ejabberd_xmlrpc). @@ -526,7 +523,7 @@ For example, the following simple configuration defines: service. - Port 5281 listens for HTTP requests, using HTTPS to serve HTTP-Bind - (BOSH) and the Web Admin as explained in [Managing: Web Admin](/admin/guide/managing/#web-admin). The + (BOSH) and the Web Admin as explained in [Managing: Web Admin](../../admin/guide/managing.md#web_admin). The socket only listens connections to the IP address 127.0.0.1. @@ -600,7 +597,7 @@ In this example, the following configuration defines that: - Port 5280 is serving the Web Admin and the HTTP-Bind (BOSH) service in all the IPv4 addresses. Note that it is also possible to serve them - on different ports. The second example in section [Managing: Web Admin](/admin/guide/managing/#web-admin) shows + on different ports. The second example in section [Managing: Web Admin](../../admin/guide/managing.md#web_admin) shows how exactly this can be done. A request handler to serve MQTT over Websocket is also defined. - All users except for the administrators have a traffic of limit diff --git a/content/archive/21_01/modules.md b/content/archive/21.01/modules.md similarity index 99% rename from content/archive/21_01/modules.md rename to content/archive/21.01/modules.md index f1a8f79f..30d98809 100644 --- a/content/archive/21_01/modules.md +++ b/content/archive/21.01/modules.md @@ -1,10 +1,9 @@ --- -title: Modules Options -toc: true -menu: Modules Options -order: 95 +search: + exclude: true --- +# Modules Options mod\_adhoc ---------- @@ -83,7 +82,7 @@ mod\_admin\_update\_sql This module can be used to update existing SQL database from the default to the new schema. Check the section [Default and New -Schemas](/admin/configuration/database-ldap/#default-and-new-schemas) for details. +Schemas](../../admin/configuration/ldap.md#default_and_new_schemas) for details. When the module is loaded use *update\_sql* ejabberdctl command. The module has no options. @@ -2760,11 +2759,11 @@ password in multiple places. - Connection parameters: The module also accepts the connection parameters, all of which default to the top-level parameter of the same name, if unspecified. See [LDAP - Connection](/admin/configuration/database-ldap/#ldap-connection) section for + Connection](../../admin/configuration/ldap.md#ldap_connection) section for more information about them. Check also the [Configuration -examples](/admin/configuration/database-ldap/#configuration-examples) section to +examples](../../admin/configuration/ldap.md#configuration_examples) section to get details about retrieving the roster, and configuration examples including Flat DIT and Deep DIT. @@ -2804,7 +2803,7 @@ only. - **ldap\_filter** Additional filter which is AND-ed together with "User Filter" and "Group Filter". For more information check the LDAP -[Filters](/admin/configuration/database-ldap/#filters) section. +[Filters](../../admin/configuration/ldap.md#filters) section. - **ldap\_gfilter** "Group Filter", used when retrieving human-readable name (a.k.a. @@ -2841,7 +2840,7 @@ section Filters. - **ldap\_memberattr\_format\_re** A regex for extracting user ID from the value of the attribute named by *ldap\_memberattr*. Check the LDAP [Control -Parameters](/admin/configuration/database-ldap/#control-parameters) section. +Parameters](../../admin/configuration/ldap.md#control_parameters) section. - **ldap\_password** Same as top-level *ldap\_password* option, but applied to this module @@ -2884,7 +2883,7 @@ only. "User Filter", used for retrieving the human-readable name of roster entries (usually full names of people in the roster). See also the parameters *ldap\_userdesc* and *ldap\_useruid*. For more information -check the LDAP [Filters](/admin/configuration/database-ldap/#filters) section. +check the LDAP [Filters](../../admin/configuration/ldap.md#filters) section. - **ldap\_uids** Same as top-level *ldap\_uids* option, but applied to this module only. @@ -2932,7 +2931,7 @@ virtual host. > > It is not enough to just load this module. You should also configure > listeners and DNS records properly. For details see the section about -> the [ejabberd\_sip](/archive/21_01/listen/#ejabberd-sip) listen module in +> the [ejabberd\_sip](listen.md#ejabberd_sip) listen module in > the ejabberd Documentation. __Available options:__ diff --git a/content/archive/21_01/toplevel.md b/content/archive/21.01/toplevel.md similarity index 98% rename from content/archive/21_01/toplevel.md rename to content/archive/21.01/toplevel.md index bc4b5c6f..cc2597a1 100644 --- a/content/archive/21_01/toplevel.md +++ b/content/archive/21.01/toplevel.md @@ -1,10 +1,9 @@ --- -title: Top-Level Options -toc: true -menu: Top-Level Options -order: 80 +search: + exclude: true --- +# Top-Level Options ## access\_rules @@ -120,7 +119,7 @@ mapping *{ACLType: ACLValue}*. These can be one of the following: *Options* -[ACME](/admin/configuration/basic/#acme) configuration, to automatically obtain SSL +[ACME](../../admin/configuration/basic.md#acme) configuration, to automatically obtain SSL certificates for the domains served by ejabberd, which means that certificate requests and renewals are performed to some CA server (aka "ACME server") in a fully automated mode. The *Options* are: @@ -283,11 +282,11 @@ format. All client certificates should be signed by one of these root CA certificates and should contain the corresponding JID(s) in *subjectAltName* field. There is no default value. -You can use [host\_config](/archive/21_01/toplevel/#host-config) to specify +You can use [host\_config](toplevel.md#host_config) to specify this option per-vhost. To set a specific file per listener, use the listener’s -[cafile](/archive/21_01/listen-options/#cafile) option. Please notice that +[cafile](listen-options.md#cafile) option. Please notice that *c2s\_cafile* overrides the listener’s *cafile* option. ## c2s\_ciphers @@ -346,7 +345,7 @@ Path to a file of CA root certificates. The default is to use system defined file if possible. For server connections, this *ca\_file* option is overridden by the -[s2s\_cafile](/archive/21_01/toplevel/#s2s-cafile) option. +[s2s\_cafile](toplevel.md#s2s-cafile) option. ## cache\_life\_time @@ -830,7 +829,7 @@ JID. For example, "%.org". If the value is in the form of *\[Options, ...\]* The option for listeners configuration. See the [Listen -Modules](/archive/21_01/listen/) section for details. +Modules](./listen.md/) section for details. ## log\_rotate\_count @@ -873,7 +872,7 @@ value is *10000*. *{Module: Options}* -The option for modules configuration. See [Modules](/archive/21_01/modules/) +The option for modules configuration. See [Modules](./modules.md/) section for details. ## negotiation\_timeout @@ -1212,9 +1211,9 @@ value is *all* which means no restrictions are applied. A path to a file with CA root certificates that will be used to authenticate s2s connections. If not set, the value of -[ca\_file](/archive/21_01/toplevel/#ca-file) will be used. +[ca\_file](toplevel.md#ca_file) will be used. -You can use [host\_config](/archive/21_01/toplevel/#host-config) to specify +You can use [host\_config](toplevel.md#host_config) to specify this option per-vhost. ## s2s\_ciphers diff --git a/content/archive/21_04/admin-api.md b/content/archive/21.04/admin-api.md similarity index 99% rename from content/archive/21_04/admin-api.md rename to content/archive/21.04/admin-api.md index a3b9b249..cd8f3634 100644 --- a/content/archive/21_04/admin-api.md +++ b/content/archive/21.04/admin-api.md @@ -1,10 +1,9 @@ --- -title: Administration API reference -toc: true -menu: Administration API -// Autogenerated with 'ejabberdctl gen_markdown_doc_for_commands' +search: + exclude: true --- +# API Reference ## add_rosteritem diff --git a/content/archive/21_04/index.md b/content/archive/21.04/index.md similarity index 60% rename from content/archive/21_04/index.md rename to content/archive/21.04/index.md index abf25c1f..23a7e069 100644 --- a/content/archive/21_04/index.md +++ b/content/archive/21.04/index.md @@ -1,15 +1,11 @@ ---- -title: Archived Documentation for 21.04 -menu: 21.04 -order: 7895 ---- +# Archived Documentation for 21.04 This section contains some archived sections for ejabberd 21.04. If you are upgrading ejabberd from a previous release, you can check: -* [Specific version upgrade notes](/admin/upgrade/#specific-version-upgrade-notes) +* [Specific version upgrade notes](upgrade.md) * [ejabberd 21.04 release announcement](https://www.process-one.net/blog/ejabberd-21-04/) -* [Docs Github Compare from 21.01](https://github.com/processone/docs.ejabberd.im/compare/21.01...21.04) -* [ejabberd Github Compare from 21.01](https://github.com/processone/ejabberd/compare/21.01...21.04) +* [Docs Github Compare from 21.01](https://github.com/processone/docs.ejabberd.im/compare/21.01..21.04) +* [ejabberd Github Compare from 21.01](https://github.com/processone/ejabberd/compare/21.01..21.04) diff --git a/content/archive/21_04/listen-options.md b/content/archive/21.04/listen-options.md similarity index 85% rename from content/archive/21_04/listen-options.md rename to content/archive/21.04/listen-options.md index 6bf95a32..6caec5f4 100644 --- a/content/archive/21_04/listen-options.md +++ b/content/archive/21.04/listen-options.md @@ -1,10 +1,9 @@ --- -title: Listen Options -toc: true -menu: Listen Options -order: 51 +search: + exclude: true --- +# Listen Options This is a detailed description of each option allowed by the listening modules: @@ -34,11 +33,11 @@ The default is to use system defined file if possible. This option is useful to define the file for a specific port listener. To set a file for all client listeners or for specific vhosts, you can use the -[`c2s_cafile`](/archive/21_04/toplevel/#c2s-cafile) top-level option. +[`c2s_cafile`](toplevel.md#c2s-cafile) top-level option. To set a file for all server connections, you can use the -[`s2s_cafile`](/archive/21_04/toplevel/#s2s-cafile) top-level option +[`s2s_cafile`](toplevel.md#s2s-cafile) top-level option or the -[`ca_file`](/archive/21_04/toplevel/#ca-file) top-level option. +[`ca_file`](toplevel.md#ca_file) top-level option. ## certfile @@ -48,15 +47,15 @@ Path to the certificate file. Only makes sense when the [`tls`](#tls) options is set. If this option is not set, you should set the -[`certfiles`](/archive/21_04/toplevel/#certfiles) top-level option -or configure [ACME](/admin/configuration/basic/#acme). +[`certfiles`](toplevel.md#certfiles) top-level option +or configure [ACME](../../admin/configuration/basic.md#acme). ## check_from *true | false* This option can be used with -[`ejabberd_service`](/archive/21_04/listen/#ejabberd-service) only. +[`ejabberd_service`](listen.md#ejabberd_service) only. [`XEP-0114`](https://xmpp.org/extensions/xep-0114.html) requires that the domain must match the hostname of the component. If this option is set to `false`, `ejabberd` will allow the component to send @@ -86,7 +85,7 @@ Default value is: `[]` If the HTTP request received by ejabberd contains the HTTP header `Host` with an ambiguous virtual host that doesn’t match any one defined in ejabberd (see - [Host Names](/admin/configuration/basic/#host-names)), + [Host Names](../../admin/configuration/basic.md#host_names)), then this configured HostName is set as the request Host. The default value of this option is: `undefined`. @@ -106,7 +105,7 @@ Full path to a file containing custom parameters for Diffie-Hellman key *true | false* This option emulates legacy behaviour which registers all routes -defined in [`hosts`](/archive/21_04/toplevel/#hosts) +defined in [`hosts`](toplevel.md#hosts) on a component connected. This behaviour is considered harmful in the case when it's desired to multiplex different components on the same port, so, to disable it, @@ -121,7 +120,7 @@ to maintain backward compatibility with existing deployments. *{Hostname: [HostOption, ...]}* The external Jabber component that connects to this -[`ejabberd_service`](/archive/21_04/listen/#ejabberd-service) +[`ejabberd_service`](listen.md#ejabberd_service) can serve one or more hostnames. As `HostOption` you can define options for the component; currently the only allowed option is the password required to the component when attempt to @@ -145,10 +144,10 @@ This option specifies the maximum number of elements in the queue of corresponding connection (if any) will be terminated and error message will be logged. The reasonable value for this option depends on your hardware configuration. This option can be specified for - [`ejabberd_service`](/archive/21_04/listen/#ejabberd-service) - and [`ejabberd_c2s`](/archive/21_04/listen/#ejabberd-c2s) + [`ejabberd_service`](listen.md#ejabberd_service) + and [`ejabberd_c2s`](listen.md#ejabberd_c2s) listeners, or also globally for - [`ejabberd_s2s_out`](/archive/21_04/listen/#ejabberd-s2s-out). + [`ejabberd_s2s_out`](listen.md#ejabberd_s2s-out). If the option is not specified for `ejabberd_service` or `ejabberd_c2s` listeners, the globally configured value is used. The allowed values are integers and @@ -203,7 +202,7 @@ List of general options relating to SSL/TLS. These map to *{Path: Module}* To define one or several handlers that will serve HTTP requests in -[`ejabberd_http`](/archive/21_04/listen/#ejabberd-http). The +[`ejabberd_http`](listen.md#ejabberd_http). The Path is a string; so the URIs that start with that Path will be served by Module. For example, if you want `mod_foo` to serve the URIs that start with `/a/b/`, and you also want `mod_bosh` to @@ -219,7 +218,7 @@ To define one or several handlers that will serve HTTP requests in *none | ShaperName* This option defines a shaper for the port (see section  -[Shapers](/admin/configuration/basic/#shapers)). +[Shapers](../../admin/configuration/basic.md#shapers)). The default value is `none`. ## shaper_rule @@ -227,8 +226,8 @@ This option defines a shaper for the port (see section  *none | ShaperRule* This option defines a shaper rule for -[`ejabberd_service`](/archive/21_04/listen/#ejabberd-service) (see -section [Shapers](/admin/configuration/basic/#shapers)). +[`ejabberd_service`](listen.md#ejabberd_service) (see +section [Shapers](../../admin/configuration/basic.md#shapers)). The recommended value is `fast`. ## starttls @@ -237,8 +236,8 @@ The recommended value is `fast`. This option specifies that STARTTLS encryption is available on connections to the port. You should also set the -[`certfiles`](/archive/21_04/toplevel/#certfiles) top-level option -or configure [ACME](/admin/configuration/basic/#acme). +[`certfiles`](toplevel.md#certfiles) top-level option +or configure [ACME](../../admin/configuration/basic.md#acme). ## starttls_required @@ -247,8 +246,8 @@ or configure [ACME](/admin/configuration/basic/#acme). This option specifies that STARTTLS encryption is required on connections to the port. No unencrypted connections will be allowed. You should also set the -[`certfiles`](/archive/21_04/toplevel/#certfiles) top-level option -or configure [ACME](/admin/configuration/basic/#acme). +[`certfiles`](toplevel.md#certfiles) top-level option +or configure [ACME](../../admin/configuration/basic.md#acme). ## tag @@ -256,7 +255,7 @@ or configure [ACME](/admin/configuration/basic/#acme). Allow specifying a tag in a `listen` section and later use it to have a special -[`api_permissions`](/archive/21_04/toplevel/#api-permissions) +[`api_permissions`](toplevel.md#api_permissions) just for it. For example: @@ -297,11 +296,11 @@ This option specifies that traffic on the port will be encrypted [`starttls`](#starttls). If this option is set, you should also set the - [`certfiles`](/archive/21_04/toplevel/#certfiles) top-level - option or configure [ACME](/admin/configuration/basic/#acme). + [`certfiles`](toplevel.md#certfiles) top-level + option or configure [ACME](../../admin/configuration/basic.md#acme). The option `tls` can also be used in - [`ejabberd_http`](/archive/21_04/listen/#ejabberd-http) + [`ejabberd_http`](listen.md#ejabberd_http) to support HTTPS. ## tls_compression diff --git a/content/archive/21_01/listen.md b/content/archive/21.04/listen.md similarity index 79% rename from content/archive/21_01/listen.md rename to content/archive/21.04/listen.md index 948e350a..417dc851 100644 --- a/content/archive/21_01/listen.md +++ b/content/archive/21.04/listen.md @@ -1,11 +1,8 @@ --- -title: Listen Modules -toc: true -menu: Listen Modules -order: 50 +search: + exclude: true --- - # Listen Option The **listen option** defines for which ports, addresses and network @@ -73,35 +70,35 @@ are: Handles c2s connections. Options: -[access](/archive/21_01/listen-options/#access), -[cafile](/archive/21_01/listen-options/#cafile), -[ciphers](/archive/21_01/listen-options/#ciphers), -[dhfile](/archive/21_01/listen-options/#dhfile), -[max_fsm_queue](/archive/21_01/listen-options/#max-fsm-queue), -[max_stanza_size](/archive/21_01/listen-options/#max-stanza-size), -[protocol_options](/archive/21_01/listen-options/#protocol-options), -[shaper](/archive/21_01/listen-options/#shaper), -[starttls](/archive/21_01/listen-options/#starttls), -[starttls_required](/archive/21_01/listen-options/#starttls-required), -[tls](/archive/21_01/listen-options/#tls), -[tls_compression](/archive/21_01/listen-options/#tls-compression), -[tls_verify](/archive/21_01/listen-options/#tls-verify), -[zlib](/archive/21_01/listen-options/#zlib). +[access](listen-options.md#access), +[cafile](listen-options.md#cafile), +[ciphers](listen-options.md#ciphers), +[dhfile](listen-options.md#dhfile), +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_stanza_size](listen-options.md#max_stanza_size), +[protocol_options](listen-options.md#protocol_options), +[shaper](listen-options.md#shaper), +[starttls](listen-options.md#starttls), +[starttls_required](listen-options.md#starttls_required), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls-compression), +[tls_verify](listen-options.md#tls_verify), +[zlib](listen-options.md#zlib). ## ejabberd_s2s_in Handles incoming s2s connections. Options: -[cafile](/archive/21_01/listen-options/#cafile), -[ciphers](/archive/21_01/listen-options/#ciphers), -[dhfile](/archive/21_01/listen-options/#dhfile), -[max_fsm_queue](/archive/21_01/listen-options/#max-fsm-queue), -[max_stanza_size](/archive/21_01/listen-options/#max-stanza-size), -[protocol_options](/archive/21_01/listen-options/#protocol-options), -[shaper](/archive/21_01/listen-options/#shaper), -[tls](/archive/21_01/listen-options/#tls), -[tls_compression](/archive/21_01/listen-options/#tls-compression). +[cafile](listen-options.md#cafile), +[ciphers](listen-options.md#ciphers), +[dhfile](listen-options.md#dhfile), +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_stanza_size](listen-options.md#max_stanza_size), +[protocol_options](listen-options.md#protocol_options), +[shaper](listen-options.md#shaper), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls-compression). ## ejabberd_service @@ -111,22 +108,22 @@ Interacts with an ([`XEP-0114`](https://xmpp.org/extensions/xep-0114.html)). Options: -[access](/archive/21_01/listen-options/#access), -[cafile](/archive/21_01/listen-options/#cafile), -[certfile](/archive/21_01/listen-options/#certfile), -[check_from](/archive/21_01/listen-options/#check-from), -[ciphers](/archive/21_01/listen-options/#ciphers), -[dhfile](/archive/21_01/listen-options/#dhfile), -[global_routes](/archive/21_01/listen-options/#global-routes), -[hosts](/archive/21_01/listen-options/#hosts), -[max_fsm_queue](/archive/21_01/listen-options/#max-fsm-queue), -[max_stanza_size](/archive/21_01/listen-options/#max-stanza-size), -[password](/archive/21_01/listen-options/#password), -[protocol_options](/archive/21_01/listen-options/#protocol-options), -[shaper](/archive/21_01/listen-options/#shaper), -[shaper_rule](/archive/21_01/listen-options/#shaper-rule), -[tls](/archive/21_01/listen-options/#tls), -[tls_compression](/archive/21_01/listen-options/#tls-compression). +[access](listen-options.md#access), +[cafile](listen-options.md#cafile), +[certfile](listen-options.md#certfile), +[check_from](listen-options.md#check_from), +[ciphers](listen-options.md#ciphers), +[dhfile](listen-options.md#dhfile), +[global_routes](listen-options.md#global_routes), +[hosts](listen-options.md#hosts), +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_stanza_size](listen-options.md#max_stanza_size), +[password](listen-options.md#password), +[protocol_options](listen-options.md#protocol_options), +[shaper](listen-options.md#shaper), +[shaper_rule](listen-options.md#shaper-rule), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls-compression). ## ejabberd_sip @@ -134,12 +131,12 @@ Handles SIP requests as defined in [`RFC 3261`](https://tools.ietf.org/html/rfc3261). For details please check the -[ejabberd_sip](/archive/21_01/listen/#ejabberd-sip-1) -and [mod_sip](/archive/21_01/modules/#mod-sip) sections. +[ejabberd_sip](listen.md#ejabberd_sip_1) +and [mod_sip](modules.md#mod_sip) sections. General listener options: -[certfile](/archive/21_01/listen-options/#certfile), -[tls](/archive/21_01/listen-options/#tls). +[certfile](listen-options.md#certfile), +[tls](listen-options.md#tls). ## ejabberd_stun @@ -148,7 +145,7 @@ Handles STUN/TURN requests as defined in [`RFC 5766`](https://tools.ietf.org/html/rfc5766). For the specific module options, please check the -[ejabberd_stun](/archive/21_01/listen/#ejabberd-stun-1) section: +[ejabberd_stun](listen.md#ejabberd_stun_1) section: `auth_realm`, `auth_type`, `server_name`, @@ -162,52 +159,52 @@ For the specific module options, please check the `use_turn`. General listener options: -[certfile](/archive/21_01/listen-options/#certfile), -[shaper](/archive/21_01/listen-options/#shaper), -[tls](/archive/21_01/listen-options/#tls), +[certfile](listen-options.md#certfile), +[shaper](listen-options.md#shaper), +[tls](listen-options.md#tls), ## ejabberd_http Handles incoming HTTP connections. With the proper request handlers configured, this serves HTTP services like -[ACME](/admin/configuration/basic/#acme), -[API](/archive/21_01/modules/#mod-http-api), -[BOSH](/archive/21_01/modules/#mod-bosh), -[CAPTCHA](/admin/configuration/basic/#captcha), -[Fileserver](/archive/21_01/modules/#mod-http-fileserver), -[OAuth](/developer/ejabberd-api/oauth/), -[Upload](/archive/21_01/modules/#mod-http-upload), -[WebAdmin](/admin/guide/managing/#web-admin), -[WebSocket](/archive/21_01/listen/#ejabberd-http-ws), -[XMP-RPC](/archive/21_01/listen/#ejabberd-xmlrpc). +[ACME](../../admin/configuration/basic.md#acme), +[API](modules.md#mod_http_api), +[BOSH](modules.md#mod_bosh), +[CAPTCHA](../../admin/configuration/basic.md#captcha), +[Fileserver](modules.md#mod_http_fileserver), +[OAuth](../../developer/ejabberd-api/oauth.md), +[Upload](modules.md#mod_http_upload), +[WebAdmin](../../admin/guide/managing.md#web_admin), +[WebSocket](listen.md#ejabberd_http_ws), +[XMP-RPC](listen.md#ejabberd_xmlrpc). Options: -[cafile](/archive/21_01/listen-options/#cafile), -[ciphers](/archive/21_01/listen-options/#ciphers), -[custom_headers](/archive/21_01/listen-options/#custom-headers), -[default_host](/archive/21_01/listen-options/#default-host), -[dhfile](/archive/21_01/listen-options/#dhfile), -[protocol_options](/archive/21_01/listen-options/#protocol-options), -[request_handlers](/archive/21_01/listen-options/#request-handlers), -[tag](/archive/21_01/listen-options/#tag), -[tls](/archive/21_01/listen-options/#tls), -[tls_compression](/archive/21_01/listen-options/#tls-compression), -and the [trusted_proxies](/archive/21_01/toplevel/#trusted-proxies) top-level option. +[cafile](listen-options.md#cafile), +[ciphers](listen-options.md#ciphers), +[custom_headers](listen-options.md#custom_headers), +[default_host](listen-options.md#default_host), +[dhfile](listen-options.md#dhfile), +[protocol_options](listen-options.md#protocol_options), +[request_handlers](listen-options.md#request_handlers), +[tag](listen-options.md#tag), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls-compression), +and the [trusted_proxies](toplevel.md#trusted_proxies) top-level option. ## mod_mqtt Support for MQTT requires configuring `mod_mqtt` both in the -[listen](/archive/21_01/toplevel/#listen) and the -[modules](/archive/21_01/toplevel/#modules) sections. -Check the [mod_mqtt modules options](/archive/21_01/modules/#mod-mqtt). -Check the advanded documentation in [MQTT Support](/admin/guide/mqtt/). +[listen](toplevel.md#listen) and the +[modules](toplevel.md#modules) sections. +Check the [mod_mqtt modules options](modules.md#mod_mqtt). +Check the advanded documentation in [MQTT Support](../../admin/guide/mqtt/index.md). Listen options: -[max_fsm_queue](/archive/21_01/listen-options/#max-fsm-queue), -[max_payload_size](/archive/21_01/listen-options/#max-payload-size), -[tls](/archive/21_01/listen-options/#tls), -[tls_verify](/archive/21_01/listen-options/#tls-verify). +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_payload_size](listen-options.md#max_payload_size), +[tls](listen-options.md#tls), +[tls_verify](listen-options.md#tls_verify). # ejabberd_stun @@ -328,14 +325,14 @@ And you should also add these in the case if TURN is enabled: ## SIP Configuration `ejabberd` has built-in SIP support. To activate this feature, -add the [`ejabberd_sip`](#ejabberd-sip) listen module, enable -[`mod_sip`](/archive/21_01/modules/#mod-sip) module +add the [`ejabberd_sip`](#ejabberd_sip) listen module, enable +[`mod_sip`](modules.md#mod_sip) module for the desired virtual host, and configure DNS properly. To add a listener you should configure `ejabberd_sip` listening module as described in [Listen](#listen-option) section. -If option [`tls`](/archive/21_01/listen-options/#tls) is specified, -option [`certfile`](/archive/21_01/listen-options/#certfile) +If option [`tls`](listen-options.md#tls) is specified, +option [`certfile`](listen-options.md#certfile) must be specified as well, otherwise incoming TLS connections would fail. @@ -413,7 +410,7 @@ section of `ejabberd_http` listener: ... This module can be configured by using those options that should be -placed in general section of config file: [websocket\_origin](/archive/21_01/toplevel/#websocket-origin), [websocket\_ping\_interval](/archive/21_01/toplevel/#websocket-ping-interval), [websocket\_timeout](/archive/21_01/toplevel/#websocket-timeout). +placed in general section of config file: [websocket\_origin](toplevel.md#websocket_origin), [websocket\_ping\_interval](toplevel.md#websocket_ping_interval), [websocket\_timeout](toplevel.md#websocket_timeout). ## Discovery @@ -434,9 +431,9 @@ A test client can be found on Github: [Websocket test client](https://github.com # ejabberd_xmlrpc Handles XML-RPC requests to execute -[ejabberd commands](/admin/guide/managing/#ejabberd-commands). +[ejabberd commands](../../admin/guide/managing.md#ejabberd_commands). It is configured as a request handler in -[ejabberd_http](/archive/21_01/listen/#ejabberd-http). +[ejabberd_http](listen.md#ejabberd_http). By default there is no restriction to who can execute what commands, so it is strongly recommended that you configure restrictions using @@ -495,11 +492,11 @@ With that configuration, it is possible to execute two specific commands using print calling('registered_users', {'host':'localhost'}) It's possible to use OAuth for authentication instead of plain password, see -[OAuth Support](/developer/ejabberd-api/oauth/). +[OAuth Support](../../developer/ejabberd-api/oauth.md). In ejabberd 20.03 and older, it was possible to configure `ejabberd_xmlrpc` as a listener, see the old document for reference and example configuration: -[Listening Module](/admin/configuration/old/#listening-module). +[Listening Module](../old.md#listening_module). Just for reference, there's also the old [`ejabberd_xmlrpc documentation`](https://ejabberd.im/ejabberd_xmlrpc). @@ -526,7 +523,7 @@ For example, the following simple configuration defines: service. - Port 5281 listens for HTTP requests, using HTTPS to serve HTTP-Bind - (BOSH) and the Web Admin as explained in [Managing: Web Admin](/admin/guide/managing/#web-admin). The + (BOSH) and the Web Admin as explained in [Managing: Web Admin](../../admin/guide/managing.md#web_admin). The socket only listens connections to the IP address 127.0.0.1. @@ -600,7 +597,7 @@ In this example, the following configuration defines that: - Port 5280 is serving the Web Admin and the HTTP-Bind (BOSH) service in all the IPv4 addresses. Note that it is also possible to serve them - on different ports. The second example in section [Managing: Web Admin](/admin/guide/managing/#web-admin) shows + on different ports. The second example in section [Managing: Web Admin](../../admin/guide/managing.md#web_admin) shows how exactly this can be done. A request handler to serve MQTT over Websocket is also defined. - All users except for the administrators have a traffic of limit diff --git a/content/archive/21_04/modules.md b/content/archive/21.04/modules.md similarity index 99% rename from content/archive/21_04/modules.md rename to content/archive/21.04/modules.md index dd8ffe0a..9af56903 100644 --- a/content/archive/21_04/modules.md +++ b/content/archive/21.04/modules.md @@ -1,10 +1,9 @@ --- -title: Modules Options -toc: true -menu: Modules Options -order: 95 +search: + exclude: true --- +# Modules Options mod\_adhoc ---------- @@ -83,7 +82,7 @@ mod\_admin\_update\_sql This module can be used to update existing SQL database from the default to the new schema. Check the section [Default and New -Schemas](/admin/configuration/database-ldap/#default-and-new-schemas) for details. +Schemas](../../admin/configuration/ldap.md#default_and_new_schemas) for details. When the module is loaded use *update\_sql* ejabberdctl command. The module has no options. @@ -2760,11 +2759,11 @@ password in multiple places. - Connection parameters: The module also accepts the connection parameters, all of which default to the top-level parameter of the same name, if unspecified. See [LDAP - Connection](/admin/configuration/database-ldap/#ldap-connection) section for + Connection](../../admin/configuration/ldap.md#ldap_connection) section for more information about them. Check also the [Configuration -examples](/admin/configuration/database-ldap/#configuration-examples) section to +examples](../../admin/configuration/ldap.md#configuration_examples) section to get details about retrieving the roster, and configuration examples including Flat DIT and Deep DIT. @@ -2804,7 +2803,7 @@ only. - **ldap\_filter** Additional filter which is AND-ed together with "User Filter" and "Group Filter". For more information check the LDAP -[Filters](/admin/configuration/database-ldap/#filters) section. +[Filters](../../admin/configuration/ldap.md#filters) section. - **ldap\_gfilter** "Group Filter", used when retrieving human-readable name (a.k.a. @@ -2841,7 +2840,7 @@ section Filters. - **ldap\_memberattr\_format\_re** A regex for extracting user ID from the value of the attribute named by *ldap\_memberattr*. Check the LDAP [Control -Parameters](/admin/configuration/database-ldap/#control-parameters) section. +Parameters](../../admin/configuration/ldap.md#control_parameters) section. - **ldap\_password** Same as top-level *ldap\_password* option, but applied to this module @@ -2884,7 +2883,7 @@ only. "User Filter", used for retrieving the human-readable name of roster entries (usually full names of people in the roster). See also the parameters *ldap\_userdesc* and *ldap\_useruid*. For more information -check the LDAP [Filters](/admin/configuration/database-ldap/#filters) section. +check the LDAP [Filters](../../admin/configuration/ldap.md#filters) section. - **ldap\_uids** Same as top-level *ldap\_uids* option, but applied to this module only. @@ -2932,7 +2931,7 @@ virtual host. > > It is not enough to just load this module. You should also configure > listeners and DNS records properly. For details see the section about -> the [ejabberd\_sip](/archive/21_04/listen/#ejabberd-sip) listen module in +> the [ejabberd\_sip](listen.md#ejabberd_sip) listen module in > the ejabberd Documentation. __Available options:__ diff --git a/content/archive/21_04/toplevel.md b/content/archive/21.04/toplevel.md similarity index 98% rename from content/archive/21_04/toplevel.md rename to content/archive/21.04/toplevel.md index 48a932c7..37466fda 100644 --- a/content/archive/21_04/toplevel.md +++ b/content/archive/21.04/toplevel.md @@ -1,10 +1,9 @@ --- -title: Top-Level Options -toc: true -menu: Top-Level Options -order: 80 +search: + exclude: true --- +# Top-Level Options ## access\_rules @@ -120,7 +119,7 @@ mapping *{ACLType: ACLValue}*. These can be one of the following: *Options* -[ACME](/admin/configuration/basic/#acme) configuration, to automatically obtain SSL +[ACME](../../admin/configuration/basic.md#acme) configuration, to automatically obtain SSL certificates for the domains served by ejabberd, which means that certificate requests and renewals are performed to some CA server (aka "ACME server") in a fully automated mode. The *Options* are: @@ -283,11 +282,11 @@ format. All client certificates should be signed by one of these root CA certificates and should contain the corresponding JID(s) in *subjectAltName* field. There is no default value. -You can use [host\_config](/archive/21_04/toplevel/#host-config) to specify +You can use [host\_config](toplevel.md#host_config) to specify this option per-vhost. To set a specific file per listener, use the listener’s -[cafile](/archive/21_04/listen-options/#cafile) option. Please notice that +[cafile](listen-options.md#cafile) option. Please notice that *c2s\_cafile* overrides the listener’s *cafile* option. ## c2s\_ciphers @@ -346,7 +345,7 @@ Path to a file of CA root certificates. The default is to use system defined file if possible. For server connections, this *ca\_file* option is overridden by the -[s2s\_cafile](/archive/21_04/toplevel/#s2s-cafile) option. +[s2s\_cafile](toplevel.md#s2s-cafile) option. ## cache\_life\_time @@ -830,7 +829,7 @@ JID. For example, "%.org". If the value is in the form of *\[Options, ...\]* The option for listeners configuration. See the [Listen -Modules](/archive/21_04/listen/) section for details. +Modules](./listen.md/) section for details. ## log\_rotate\_count @@ -873,7 +872,7 @@ value is *10000*. *{Module: Options}* -The option for modules configuration. See [Modules](/archive/21_04/modules/) +The option for modules configuration. See [Modules](./modules.md/) section for details. ## negotiation\_timeout @@ -1212,9 +1211,9 @@ value is *all* which means no restrictions are applied. A path to a file with CA root certificates that will be used to authenticate s2s connections. If not set, the value of -[ca\_file](/archive/21_04/toplevel/#ca-file) will be used. +[ca\_file](toplevel.md#ca_file) will be used. -You can use [host\_config](/archive/21_04/toplevel/#host-config) to specify +You can use [host\_config](toplevel.md#host_config) to specify this option per-vhost. ## s2s\_ciphers diff --git a/content/admin/upgrade/from_21.01_to_21.04.md b/content/archive/21.04/upgrade.md similarity index 94% rename from content/admin/upgrade/from_21.01_to_21.04.md rename to content/archive/21.04/upgrade.md index 2da8fb38..8d8e7f14 100644 --- a/content/admin/upgrade/from_21.01_to_21.04.md +++ b/content/archive/21.04/upgrade.md @@ -1,6 +1,4 @@ ---- -title: Upgrade to ejabberd 21.04 ---- +# Upgrade to ejabberd 21.04 ## Database changes @@ -20,7 +18,7 @@ However, if you feel like it, after you upgrade to ejabberd 21.04, you can apply the following SQL command to convert your existing MySQL database character set to the latest definition: -```sql +``` sql alter table push_session convert to character set utf8mb4 collate utf8mb4_unicode_ci; alter table mqtt_pub convert to character set utf8mb4 collate utf8mb4_unicode_ci; ``` diff --git a/content/archive/21_07/admin-api.md b/content/archive/21.07/admin-api.md similarity index 99% rename from content/archive/21_07/admin-api.md rename to content/archive/21.07/admin-api.md index cb18a472..71a54b59 100644 --- a/content/archive/21_07/admin-api.md +++ b/content/archive/21.07/admin-api.md @@ -1,10 +1,9 @@ --- -title: Administration API reference -toc: true -menu: Administration API -// Autogenerated with 'ejabberdctl gen_markdown_doc_for_commands' +search: + exclude: true --- +# API Reference ## add_rosteritem @@ -1085,7 +1084,7 @@ __Examples:__ Export virtual host information from Mnesia tables to SQL file -Configure the modules to use SQL, then call this command. After correctly exported the database of a vhost, you may want to delete from mnesia with the [delete_mnesia](/archive/21_07/admin-api/#delete-mnesia) command. +Configure the modules to use SQL, then call this command. After correctly exported the database of a vhost, you may want to delete from mnesia with the [delete_mnesia](admin-api.md#delete_mnesia) command. __Arguments:__ @@ -1171,7 +1170,7 @@ __Examples:__ ~~~ -
added in 20.01
+
added in 20.01
## gc @@ -1725,7 +1724,7 @@ __Examples:__ ~~~ -
added in 21.04
+
added in 21.04
## get_user_subscriptions @@ -2283,7 +2282,7 @@ __Examples:__ ~~~ -
added in 20.01
+
added in 20.01
## man @@ -3838,7 +3837,7 @@ __Examples:__ Send a direct invitation to several destinations -Since ejabberd 20.10, this command is asynchronous: the API call may return before the server has send all the invitations. +Since ejabberd 20.12, this command is asynchronous: the API call may return before the server has send all the invitations. Password and Message can also be: none. Users JIDs are separated with : @@ -4350,7 +4349,7 @@ __Examples:__ ~~~ -
changed in 21.07
+
changed in 21.07
## srg_create diff --git a/content/archive/21_07/index.md b/content/archive/21.07/index.md similarity index 60% rename from content/archive/21_07/index.md rename to content/archive/21.07/index.md index f471772f..08b09e62 100644 --- a/content/archive/21_07/index.md +++ b/content/archive/21.07/index.md @@ -1,15 +1,11 @@ ---- -title: Archived Documentation for 21.07 -menu: 21.07 -order: 7892 ---- +# Archived Documentation for 21.07 This section contains some archived sections for ejabberd 21.07. If you are upgrading ejabberd from a previous release, you can check: -* [Specific version upgrade notes](/admin/upgrade/#specific-version-upgrade-notes) +* [Specific version upgrade notes](upgrade.md) * [ejabberd 21.07 release announcement](https://www.process-one.net/blog/ejabberd-21-07/) -* [Docs Github Compare from 21.04](https://github.com/processone/docs.ejabberd.im/compare/21.04...21.07) -* [ejabberd Github Compare from 21.04](https://github.com/processone/ejabberd/compare/21.04...21.07) +* [Docs Github Compare from 21.04](https://github.com/processone/docs.ejabberd.im/compare/21.04..21.07) +* [ejabberd Github Compare from 21.04](https://github.com/processone/ejabberd/compare/21.04..21.07) diff --git a/content/archive/21_12/listen-options.md b/content/archive/21.07/listen-options.md similarity index 77% rename from content/archive/21_12/listen-options.md rename to content/archive/21.07/listen-options.md index b39add6f..f85c63bf 100644 --- a/content/archive/21_12/listen-options.md +++ b/content/archive/21.07/listen-options.md @@ -1,10 +1,9 @@ --- -title: Listen Options -toc: true -menu: Listen Opts -order: 51 +search: + exclude: true --- +# Listen Options This is a detailed description of each option allowed by the listening modules: @@ -34,18 +33,18 @@ The default is to use system defined file if possible. This option is useful to define the file for a specific port listener. To set a file for all client listeners or for specific vhosts, you can use the -[`c2s_cafile`](/archive/21_12/toplevel/#c2s-cafile) top-level option. +[`c2s_cafile`](toplevel.md#c2s-cafile) top-level option. To set a file for all server connections, you can use the -[`s2s_cafile`](/archive/21_12/toplevel/#s2s-cafile) top-level option +[`s2s_cafile`](toplevel.md#s2s-cafile) top-level option or the -[`ca_file`](/archive/21_12/toplevel/#ca-file) top-level option. +[`ca_file`](toplevel.md#ca_file) top-level option. Please note: if this option is set in -[`ejabberd_c2s`](/archive/21_12/listen/#ejabberd-c2s) -or [`ejabberd_s2s_in`](/archive/21_12/listen/#ejabberd-s2s-in) +[`ejabberd_c2s`](listen.md#ejabberd_c2s) +or [`ejabberd_s2s_in`](listen.md#ejabberd_s2s-in) and the corresponding top-level option is also set -([`c2s_cafile`](/archive/21_12/toplevel/#c2s-cafile), -[`s2s_cafile`](/archive/21_12/toplevel/#s2s-cafile)), +([`c2s_cafile`](toplevel.md#c2s-cafile), +[`s2s_cafile`](toplevel.md#s2s-cafile)), then the top-level option is used, not this one. ## certfile @@ -56,15 +55,15 @@ Path to the certificate file. Only makes sense when the [`tls`](#tls) options is set. If this option is not set, you should set the -[`certfiles`](/archive/21_12/toplevel/#certfiles) top-level option -or configure [ACME](/admin/configuration/basic/#acme). +[`certfiles`](toplevel.md#certfiles) top-level option +or configure [ACME](../../admin/configuration/basic.md#acme). ## check_from *true | false* This option can be used with -[`ejabberd_service`](/archive/21_12/listen/#ejabberd-service) only. +[`ejabberd_service`](listen.md#ejabberd_service) only. [`XEP-0114`](https://xmpp.org/extensions/xep-0114.html) requires that the domain must match the hostname of the component. If this option is set to `false`, `ejabberd` will allow the component to send @@ -81,11 +80,11 @@ OpenSSL ciphers list in the same format accepted by ‘`openssl ciphers`’ command. Please note: if this option is set in -[`ejabberd_c2s`](/archive/21_12/listen/#ejabberd-c2s) -or [`ejabberd_s2s_in`](/archive/21_12/listen/#ejabberd-s2s-in) +[`ejabberd_c2s`](listen.md#ejabberd_c2s) +or [`ejabberd_s2s_in`](listen.md#ejabberd_s2s-in) and the corresponding top-level option is also set -([`c2s_ciphers`](/archive/21_12/toplevel/#c2s-ciphers), -[`s2s_ciphers`](/archive/21_12/toplevel/#s2s-ciphers)), +([`c2s_ciphers`](toplevel.md#c2s-ciphers), +[`s2s_ciphers`](toplevel.md#s2s-ciphers)), then the top-level option is used, not this one. ## custom_headers @@ -102,7 +101,7 @@ Default value is: `[]` If the HTTP request received by ejabberd contains the HTTP header `Host` with an ambiguous virtual host that doesn’t match any one defined in ejabberd (see - [Host Names](/admin/configuration/basic/#host-names)), + [Host Names](../../admin/configuration/basic.md#host_names)), then this configured HostName is set as the request Host. The default value of this option is: `undefined`. @@ -118,11 +117,11 @@ Full path to a file containing custom parameters for Diffie-Hellman key of security as using custom parameters. Please note: if this option is set in -[`ejabberd_c2s`](/archive/21_12/listen/#ejabberd-c2s) -or [`ejabberd_s2s_in`](/archive/21_12/listen/#ejabberd-s2s-in) +[`ejabberd_c2s`](listen.md#ejabberd_c2s) +or [`ejabberd_s2s_in`](listen.md#ejabberd_s2s-in) and the corresponding top-level option is also set -([`c2s_dhfile`](/archive/21_12/toplevel/#c2s-dhfile), -[`s2s_dhfile`](/archive/21_12/toplevel/#s2s-dhfile)), +([`c2s_dhfile`](toplevel.md#c2s-dhfile), +[`s2s_dhfile`](toplevel.md#s2s-dhfile)), then the top-level option is used, not this one. ## global_routes @@ -130,7 +129,7 @@ then the top-level option is used, not this one. *true | false* This option emulates legacy behaviour which registers all routes -defined in [`hosts`](/archive/21_12/toplevel/#hosts) +defined in [`hosts`](toplevel.md#hosts) on a component connected. This behaviour is considered harmful in the case when it's desired to multiplex different components on the same port, so, to disable it, @@ -145,7 +144,7 @@ to maintain backward compatibility with existing deployments. *{Hostname: [HostOption, ...]}* The external Jabber component that connects to this -[`ejabberd_service`](/archive/21_12/listen/#ejabberd-service) +[`ejabberd_service`](listen.md#ejabberd_service) can serve one or more hostnames. As `HostOption` you can define options for the component; currently the only allowed option is the password required to the component when attempt to @@ -169,10 +168,10 @@ This option specifies the maximum number of elements in the queue of corresponding connection (if any) will be terminated and error message will be logged. The reasonable value for this option depends on your hardware configuration. This option can be specified for - [`ejabberd_service`](/archive/21_12/listen/#ejabberd-service) - and [`ejabberd_c2s`](/archive/21_12/listen/#ejabberd-c2s) + [`ejabberd_service`](listen.md#ejabberd_service) + and [`ejabberd_c2s`](listen.md#ejabberd_c2s) listeners, or also globally for - [`ejabberd_s2s_out`](/archive/21_12/listen/#ejabberd-s2s-out). + [`ejabberd_s2s_out`](listen.md#ejabberd_s2s-out). If the option is not specified for `ejabberd_service` or `ejabberd_c2s` listeners, the globally configured value is used. The allowed values are integers and @@ -204,7 +203,7 @@ This option specifies an approximate maximum size in bytes of XML Specify the password to verify an external component that connects to the port. -
improved in 20.07
+
improved in 20.07
## port @@ -225,11 +224,11 @@ List of general options relating to SSL/TLS. These map to The default entry is: `"no_sslv3|cipher_server_preference|no_compression"` Please note: if this option is set in -[`ejabberd_c2s`](/archive/21_12/listen/#ejabberd-c2s) -or [`ejabberd_s2s_in`](/archive/21_12/listen/#ejabberd-s2s-in) +[`ejabberd_c2s`](listen.md#ejabberd_c2s) +or [`ejabberd_s2s_in`](listen.md#ejabberd_s2s-in) and the corresponding top-level option is also set -([`c2s_protocol_options`](/archive/21_12/toplevel/#c2s-protocol-options), -[`s2s_protocol_options`](/archive/21_12/toplevel/#s2s-protocol-options)), +([`c2s_protocol_options`](toplevel.md#c2s-protocol-options), +[`s2s_protocol_options`](toplevel.md#s2s-protocol-options)), then the top-level option is used, not this one. ## request_handlers @@ -237,7 +236,7 @@ then the top-level option is used, not this one. *{Path: Module}* To define one or several handlers that will serve HTTP requests in -[`ejabberd_http`](/archive/21_12/listen/#ejabberd-http). The +[`ejabberd_http`](listen.md#ejabberd_http). The Path is a string; so the URIs that start with that Path will be served by Module. For example, if you want `mod_foo` to serve the URIs that start with `/a/b/`, and you also want `mod_bosh` to @@ -248,7 +247,7 @@ To define one or several handlers that will serve HTTP requests in /bosh: mod_bosh /mqtt: mod_mqtt -
new in 21.07
+
new in 21.07
## send_timeout @@ -261,7 +260,7 @@ Sets the longest time that data can wait to be accepted to sent by OS socket. Tr *none | ShaperName* This option defines a shaper for the port (see section  -[Shapers](/admin/configuration/basic/#shapers)). +[Shapers](../../admin/configuration/basic.md#shapers)). The default value is `none`. ## shaper_rule @@ -269,8 +268,8 @@ This option defines a shaper for the port (see section  *none | ShaperRule* This option defines a shaper rule for -[`ejabberd_service`](/archive/21_12/listen/#ejabberd-service) (see -section [Shapers](/admin/configuration/basic/#shapers)). +[`ejabberd_service`](listen.md#ejabberd_service) (see +section [Shapers](../../admin/configuration/basic.md#shapers)). The recommended value is `fast`. ## starttls @@ -279,11 +278,11 @@ The recommended value is `fast`. This option specifies that STARTTLS encryption is available on connections to the port. You should also set the -[`certfiles`](/archive/21_12/toplevel/#certfiles) top-level option -or configure [ACME](/admin/configuration/basic/#acme). +[`certfiles`](toplevel.md#certfiles) top-level option +or configure [ACME](../../admin/configuration/basic.md#acme). This option gets implicitly enabled when enabling -[`starttls_required`](#starttls-required) or [`tls_verify`](#tls-verify). +[`starttls_required`](#starttls_required) or [`tls_verify`](#tls_verify). ## starttls_required @@ -292,8 +291,8 @@ This option gets implicitly enabled when enabling This option specifies that STARTTLS encryption is required on connections to the port. No unencrypted connections will be allowed. You should also set the -[`certfiles`](/archive/21_12/toplevel/#certfiles) top-level option -or configure [ACME](/admin/configuration/basic/#acme). +[`certfiles`](toplevel.md#certfiles) top-level option +or configure [ACME](../../admin/configuration/basic.md#acme). Enabling this option implicitly enables also the [`starttls`](#starttls) option. @@ -303,7 +302,7 @@ Enabling this option implicitly enables also the [`starttls`](#starttls) option. Allow specifying a tag in a `listen` section and later use it to have a special -[`api_permissions`](/archive/21_12/toplevel/#api-permissions) +[`api_permissions`](toplevel.md#api_permissions) just for it. For example: @@ -344,11 +343,11 @@ This option specifies that traffic on the port will be encrypted [`starttls`](#starttls). If this option is set, you should also set the - [`certfiles`](/archive/21_12/toplevel/#certfiles) top-level - option or configure [ACME](/admin/configuration/basic/#acme). + [`certfiles`](toplevel.md#certfiles) top-level + option or configure [ACME](../../admin/configuration/basic.md#acme). The option `tls` can also be used in - [`ejabberd_http`](/archive/21_12/listen/#ejabberd-http) + [`ejabberd_http`](listen.md#ejabberd_http) to support HTTPS. Enabling this option implicitly disables the [`starttls`](#starttls) option. @@ -361,11 +360,11 @@ Whether to enable or disable TLS compression. The default value is `false`. Please note: if this option is set in -[`ejabberd_c2s`](/archive/21_12/listen/#ejabberd-c2s) -or [`ejabberd_s2s_in`](/archive/21_12/listen/#ejabberd-s2s-in) +[`ejabberd_c2s`](listen.md#ejabberd_c2s) +or [`ejabberd_s2s_in`](listen.md#ejabberd_s2s-in) and the corresponding top-level option is also set -([`c2s_tls_compression`](/archive/21_12/toplevel/#c2s-tls-compression), -[`s2s_tls_compression`](/archive/21_12/toplevel/#s2s-tls-compression)), +([`c2s_tls_compression`](toplevel.md#c2s-tls-compression), +[`s2s_tls_compression`](toplevel.md#s2s-tls-compression)), then the top-level option is used, not this one. ## tls_verify diff --git a/content/archive/21_07/listen.md b/content/archive/21.07/listen.md similarity index 78% rename from content/archive/21_07/listen.md rename to content/archive/21.07/listen.md index 0184f8ac..5ab7eeab 100644 --- a/content/archive/21_07/listen.md +++ b/content/archive/21.07/listen.md @@ -1,11 +1,8 @@ --- -title: Listen Modules -toc: true -menu: Listen Modules -order: 50 +search: + exclude: true --- - # Listen Option The **listen option** defines for which ports, addresses and network @@ -73,37 +70,37 @@ are: Handles c2s connections. Options: -[access](/archive/21_07/listen-options/#access), -[cafile](/archive/21_07/listen-options/#cafile), -[ciphers](/archive/21_07/listen-options/#ciphers), -[dhfile](/archive/21_07/listen-options/#dhfile), -[max_fsm_queue](/archive/21_07/listen-options/#max-fsm-queue), -[max_stanza_size](/archive/21_07/listen-options/#max-stanza-size), -[protocol_options](/archive/21_07/listen-options/#protocol-options), -[send_timeout](/archive/21_07/listen-options/#send-timeout), -[shaper](/archive/21_07/listen-options/#shaper), -[starttls](/archive/21_07/listen-options/#starttls), -[starttls_required](/archive/21_07/listen-options/#starttls-required), -[tls](/archive/21_07/listen-options/#tls), -[tls_compression](/archive/21_07/listen-options/#tls-compression), -[tls_verify](/archive/21_07/listen-options/#tls-verify), -[zlib](/archive/21_07/listen-options/#zlib). +[access](listen-options.md#access), +[cafile](listen-options.md#cafile), +[ciphers](listen-options.md#ciphers), +[dhfile](listen-options.md#dhfile), +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_stanza_size](listen-options.md#max_stanza_size), +[protocol_options](listen-options.md#protocol_options), +[send_timeout](listen-options.md#send_timeout), +[shaper](listen-options.md#shaper), +[starttls](listen-options.md#starttls), +[starttls_required](listen-options.md#starttls_required), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls-compression), +[tls_verify](listen-options.md#tls_verify), +[zlib](listen-options.md#zlib). ## ejabberd_s2s_in Handles incoming s2s connections. Options: -[cafile](/archive/21_07/listen-options/#cafile), -[ciphers](/archive/21_07/listen-options/#ciphers), -[dhfile](/archive/21_07/listen-options/#dhfile), -[max_fsm_queue](/archive/21_07/listen-options/#max-fsm-queue), -[max_stanza_size](/archive/21_07/listen-options/#max-stanza-size), -[protocol_options](/archive/21_07/listen-options/#protocol-options), -[send_timeout](/archive/21_07/listen-options/#send-timeout), -[shaper](/archive/21_07/listen-options/#shaper), -[tls](/archive/21_07/listen-options/#tls), -[tls_compression](/archive/21_07/listen-options/#tls-compression). +[cafile](listen-options.md#cafile), +[ciphers](listen-options.md#ciphers), +[dhfile](listen-options.md#dhfile), +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_stanza_size](listen-options.md#max_stanza_size), +[protocol_options](listen-options.md#protocol_options), +[send_timeout](listen-options.md#send_timeout), +[shaper](listen-options.md#shaper), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls-compression). ## ejabberd_service @@ -113,23 +110,23 @@ Interacts with an ([`XEP-0114`](https://xmpp.org/extensions/xep-0114.html)). Options: -[access](/archive/21_07/listen-options/#access), -[cafile](/archive/21_07/listen-options/#cafile), -[certfile](/archive/21_07/listen-options/#certfile), -[check_from](/archive/21_07/listen-options/#check-from), -[ciphers](/archive/21_07/listen-options/#ciphers), -[dhfile](/archive/21_07/listen-options/#dhfile), -[global_routes](/archive/21_07/listen-options/#global-routes), -[hosts](/archive/21_07/listen-options/#hosts), -[max_fsm_queue](/archive/21_07/listen-options/#max-fsm-queue), -[max_stanza_size](/archive/21_07/listen-options/#max-stanza-size), -[password](/archive/21_07/listen-options/#password), -[protocol_options](/archive/21_07/listen-options/#protocol-options), -[send_timeout](/archive/21_07/listen-options/#send-timeout), -[shaper](/archive/21_07/listen-options/#shaper), -[shaper_rule](/archive/21_07/listen-options/#shaper-rule), -[tls](/archive/21_07/listen-options/#tls), -[tls_compression](/archive/21_07/listen-options/#tls-compression). +[access](listen-options.md#access), +[cafile](listen-options.md#cafile), +[certfile](listen-options.md#certfile), +[check_from](listen-options.md#check_from), +[ciphers](listen-options.md#ciphers), +[dhfile](listen-options.md#dhfile), +[global_routes](listen-options.md#global_routes), +[hosts](listen-options.md#hosts), +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_stanza_size](listen-options.md#max_stanza_size), +[password](listen-options.md#password), +[protocol_options](listen-options.md#protocol_options), +[send_timeout](listen-options.md#send_timeout), +[shaper](listen-options.md#shaper), +[shaper_rule](listen-options.md#shaper-rule), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls-compression). ## ejabberd_sip @@ -137,13 +134,13 @@ Handles SIP requests as defined in [`RFC 3261`](https://tools.ietf.org/html/rfc3261). For details please check the -[ejabberd_sip](/archive/21_07/listen/#ejabberd-sip-1) -and [mod_sip](/archive/21_07/modules/#mod-sip) sections. +[ejabberd_sip](listen.md#ejabberd_sip_1) +and [mod_sip](modules.md#mod_sip) sections. General listener options: -[certfile](/archive/21_07/listen-options/#certfile), -[send_timeout](/archive/21_07/listen-options/#send-timeout), -[tls](/archive/21_07/listen-options/#tls). +[certfile](listen-options.md#certfile), +[send_timeout](listen-options.md#send_timeout), +[tls](listen-options.md#tls). ## ejabberd_stun @@ -152,7 +149,7 @@ Handles STUN/TURN requests as defined in [`RFC 5766`](https://tools.ietf.org/html/rfc5766). For the specific module options, please check the -[ejabberd_stun](/archive/21_07/listen/#ejabberd-stun-1) section: +[ejabberd_stun](listen.md#ejabberd_stun_1) section: `auth_realm`, `auth_type`, `server_name`, @@ -166,55 +163,55 @@ For the specific module options, please check the `use_turn`. General listener options: -[certfile](/archive/21_07/listen-options/#certfile), -[send_timeout](/archive/21_07/listen-options/#send-timeout), -[shaper](/archive/21_07/listen-options/#shaper), -[tls](/archive/21_07/listen-options/#tls), +[certfile](listen-options.md#certfile), +[send_timeout](listen-options.md#send_timeout), +[shaper](listen-options.md#shaper), +[tls](listen-options.md#tls), ## ejabberd_http Handles incoming HTTP connections. With the proper request handlers configured, this serves HTTP services like -[ACME](/admin/configuration/basic/#acme), -[API](/archive/21_07/modules/#mod-http-api), -[BOSH](/archive/21_07/modules/#mod-bosh), -[CAPTCHA](/admin/configuration/basic/#captcha), -[Fileserver](/archive/21_07/modules/#mod-http-fileserver), -[OAuth](/developer/ejabberd-api/oauth/), -[Upload](/archive/21_07/modules/#mod-http-upload), -[WebAdmin](/admin/guide/managing/#web-admin), -[WebSocket](/archive/21_07/listen/#ejabberd-http-ws), -[XMP-RPC](/archive/21_07/listen/#ejabberd-xmlrpc). +[ACME](../../admin/configuration/basic.md#acme), +[API](modules.md#mod_http_api), +[BOSH](modules.md#mod_bosh), +[CAPTCHA](../../admin/configuration/basic.md#captcha), +[Fileserver](modules.md#mod_http_fileserver), +[OAuth](../../developer/ejabberd-api/oauth.md), +[Upload](modules.md#mod_http_upload), +[WebAdmin](../../admin/guide/managing.md#web_admin), +[WebSocket](listen.md#ejabberd_http_ws), +[XMP-RPC](listen.md#ejabberd_xmlrpc). Options: -[cafile](/archive/21_07/listen-options/#cafile), -[ciphers](/archive/21_07/listen-options/#ciphers), -[custom_headers](/archive/21_07/listen-options/#custom-headers), -[default_host](/archive/21_07/listen-options/#default-host), -[dhfile](/archive/21_07/listen-options/#dhfile), -[protocol_options](/archive/21_07/listen-options/#protocol-options), -[request_handlers](/archive/21_07/listen-options/#request-handlers), -[send_timeout](/archive/21_07/listen-options/#send-timeout), -[tag](/archive/21_07/listen-options/#tag), -[tls](/archive/21_07/listen-options/#tls), -[tls_compression](/archive/21_07/listen-options/#tls-compression), -and the [trusted_proxies](/archive/21_07/toplevel/#trusted-proxies) top-level option. +[cafile](listen-options.md#cafile), +[ciphers](listen-options.md#ciphers), +[custom_headers](listen-options.md#custom_headers), +[default_host](listen-options.md#default_host), +[dhfile](listen-options.md#dhfile), +[protocol_options](listen-options.md#protocol_options), +[request_handlers](listen-options.md#request_handlers), +[send_timeout](listen-options.md#send_timeout), +[tag](listen-options.md#tag), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls-compression), +and the [trusted_proxies](toplevel.md#trusted_proxies) top-level option. ## mod_mqtt Support for MQTT requires configuring `mod_mqtt` both in the -[listen](/archive/21_07/toplevel/#listen) and the -[modules](/archive/21_07/toplevel/#modules) sections. -Check the [mod_mqtt modules options](/archive/21_07/modules/#mod-mqtt). -Check the advanded documentation in [MQTT Support](/admin/guide/mqtt/). +[listen](toplevel.md#listen) and the +[modules](toplevel.md#modules) sections. +Check the [mod_mqtt modules options](modules.md#mod_mqtt). +Check the advanded documentation in [MQTT Support](../../admin/guide/mqtt/index.md). Listen options: -[max_fsm_queue](/archive/21_07/listen-options/#max-fsm-queue), -[max_payload_size](/archive/21_07/listen-options/#max-payload-size), -[send_timeout](/archive/21_07/listen-options/#send-timeout), -[tls](/archive/21_07/listen-options/#tls), -[tls_verify](/archive/21_07/listen-options/#tls-verify). +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_payload_size](listen-options.md#max_payload_size), +[send_timeout](listen-options.md#send_timeout), +[tls](listen-options.md#tls), +[tls_verify](listen-options.md#tls_verify). # ejabberd_stun @@ -335,14 +332,14 @@ And you should also add these in the case if TURN is enabled: ## SIP Configuration `ejabberd` has built-in SIP support. To activate this feature, -add the [`ejabberd_sip`](#ejabberd-sip) listen module, enable -[`mod_sip`](/archive/21_07/modules/#mod-sip) module +add the [`ejabberd_sip`](#ejabberd_sip) listen module, enable +[`mod_sip`](modules.md#mod_sip) module for the desired virtual host, and configure DNS properly. To add a listener you should configure `ejabberd_sip` listening module as described in [Listen](#listen-option) section. -If option [`tls`](/archive/21_07/listen-options/#tls) is specified, -option [`certfile`](/archive/21_07/listen-options/#certfile) +If option [`tls`](listen-options.md#tls) is specified, +option [`certfile`](listen-options.md#certfile) must be specified as well, otherwise incoming TLS connections would fail. @@ -420,7 +417,7 @@ section of `ejabberd_http` listener: ... This module can be configured by using those options that should be -placed in general section of config file: [websocket\_origin](/archive/21_07/toplevel/#websocket-origin), [websocket\_ping\_interval](/archive/21_07/toplevel/#websocket-ping-interval), [websocket\_timeout](/archive/21_07/toplevel/#websocket-timeout). +placed in general section of config file: [websocket\_origin](toplevel.md#websocket_origin), [websocket\_ping\_interval](toplevel.md#websocket_ping_interval), [websocket\_timeout](toplevel.md#websocket_timeout). ## Discovery @@ -441,13 +438,13 @@ A test client can be found on Github: [Websocket test client](https://github.com # ejabberd_xmlrpc Handles XML-RPC requests to execute -[ejabberd commands](/admin/guide/managing/#ejabberd-commands). +[ejabberd commands](../../admin/guide/managing.md#ejabberd_commands). It is configured as a request handler in -[ejabberd_http](/archive/21_07/listen/#ejabberd-http). +[ejabberd_http](listen.md#ejabberd_http). By default there is no restriction to who can execute what commands, so it is strongly recommended that you configure restrictions using -[API Permissions](/developer/ejabberd-api/permissions/). +[API Permissions](../../developer/ejabberd-api/permissions.md). This is the minimum configuration required to enable the feature: @@ -502,11 +499,11 @@ With that configuration, it is possible to execute two specific commands using print calling('registered_users', {'host':'localhost'}) It's possible to use OAuth for authentication instead of plain password, see -[OAuth Support](/developer/ejabberd-api/oauth/). +[OAuth Support](../../developer/ejabberd-api/oauth.md). In ejabberd 20.03 and older, it was possible to configure `ejabberd_xmlrpc` as a listener, see the old document for reference and example configuration: -[Listening Module](/admin/configuration/old/#listening-module). +[Listening Module](../old.md#listening_module). Just for reference, there's also the old [`ejabberd_xmlrpc documentation`](https://ejabberd.im/ejabberd_xmlrpc). @@ -533,7 +530,7 @@ For example, the following simple configuration defines: service. - Port 5281 listens for HTTP requests, using HTTPS to serve HTTP-Bind - (BOSH) and the Web Admin as explained in [Managing: Web Admin](/admin/guide/managing/#web-admin). The + (BOSH) and the Web Admin as explained in [Managing: Web Admin](../../admin/guide/managing.md#web_admin). The socket only listens connections to the IP address 127.0.0.1. @@ -607,7 +604,7 @@ In this example, the following configuration defines that: - Port 5280 is serving the Web Admin and the HTTP-Bind (BOSH) service in all the IPv4 addresses. Note that it is also possible to serve them - on different ports. The second example in section [Managing: Web Admin](/admin/guide/managing/#web-admin) shows + on different ports. The second example in section [Managing: Web Admin](../../admin/guide/managing.md#web_admin) shows how exactly this can be done. A request handler to serve MQTT over Websocket is also defined. - All users except for the administrators have a traffic of limit diff --git a/content/archive/21_07/modules.md b/content/archive/21.07/modules.md similarity index 99% rename from content/archive/21_07/modules.md rename to content/archive/21.07/modules.md index dea7f188..7b637a8e 100644 --- a/content/archive/21_07/modules.md +++ b/content/archive/21.07/modules.md @@ -1,10 +1,9 @@ --- -title: Modules Options -toc: true -menu: Modules Options -order: 95 +search: + exclude: true --- +# Modules Options mod\_adhoc ---------- @@ -83,7 +82,7 @@ mod\_admin\_update\_sql This module can be used to update existing SQL database from the default to the new schema. Check the section [Default and New -Schemas](/admin/configuration/database-ldap/#default-and-new-schemas) for details. +Schemas](../../admin/configuration/ldap.md#default_and_new_schemas) for details. Please note that only PostgreSQL is supported. When the module is loaded use *update\_sql* ejabberdctl command. @@ -1027,8 +1026,8 @@ mod\_mix This module is an experimental implementation of [XEP-0369: Mediated Information eXchange (MIX)](https://xmpp.org/extensions/xep-0369.html). -MIX support was added in ejabberd 16.03 as an experimental feature, -updated in 19.02, and is not yet ready to use in production. It’s +MIX support was added in ejabberd 16.03 as an experimental feature, +updated in 19.02, and is not yet ready to use in production. It’s asserted that the MIX protocol is going to replace the MUC protocol in the future (see *mod\_muc*). @@ -1363,14 +1362,14 @@ is not specified, the only Jabber ID will be the hostname of the virtual host with the prefix "conference.". The keyword *@HOST@* is replaced with the real virtual host name. -
added in 21.01
+
added in 21.01
- **max\_captcha\_whitelist**: *Number* This option defines the maximum number of characters that Captcha Whitelist can have when configuring the room. The default value is *infinity*. -
added in 21.01
+
added in 21.01
- **max\_password**: *Number* This option defines the maximum number of characters that Password can @@ -2764,11 +2763,11 @@ password in multiple places. - Connection parameters: The module also accepts the connection parameters, all of which default to the top-level parameter of the same name, if unspecified. See [LDAP - Connection](/admin/configuration/database-ldap/#ldap-connection) section for + Connection](../../admin/configuration/ldap.md#ldap_connection) section for more information about them. Check also the [Configuration -examples](/admin/configuration/database-ldap/#configuration-examples) section to +examples](../../admin/configuration/ldap.md#configuration_examples) section to get details about retrieving the roster, and configuration examples including Flat DIT and Deep DIT. @@ -2808,7 +2807,7 @@ only. - **ldap\_filter** Additional filter which is AND-ed together with "User Filter" and "Group Filter". For more information check the LDAP -[Filters](/admin/configuration/database-ldap/#filters) section. +[Filters](../../admin/configuration/ldap.md#filters) section. - **ldap\_gfilter** "Group Filter", used when retrieving human-readable name (a.k.a. @@ -2845,7 +2844,7 @@ section Filters. - **ldap\_memberattr\_format\_re** A regex for extracting user ID from the value of the attribute named by *ldap\_memberattr*. Check the LDAP [Control -Parameters](/admin/configuration/database-ldap/#control-parameters) section. +Parameters](../../admin/configuration/ldap.md#control_parameters) section. - **ldap\_password** Same as top-level *ldap\_password* option, but applied to this module @@ -2888,7 +2887,7 @@ only. "User Filter", used for retrieving the human-readable name of roster entries (usually full names of people in the roster). See also the parameters *ldap\_userdesc* and *ldap\_useruid*. For more information -check the LDAP [Filters](/admin/configuration/database-ldap/#filters) section. +check the LDAP [Filters](../../admin/configuration/ldap.md#filters) section. - **ldap\_uids** Same as top-level *ldap\_uids* option, but applied to this module only. @@ -2936,7 +2935,7 @@ virtual host. > > It is not enough to just load this module. You should also configure > listeners and DNS records properly. For details see the section about -> the [ejabberd\_sip](/archive/21_07/listen/#ejabberd-sip) listen module in +> the [ejabberd\_sip](listen.md#ejabberd_sip) listen module in > the ejabberd Documentation. __Available options:__ @@ -3092,7 +3091,7 @@ mod\_stun\_disco This module allows XMPP clients to discover STUN/TURN services and to obtain temporary credentials for using them as per [XEP-0215: External Service Discovery](https://xmpp.org/extensions/xep-0215.html). This -module is included in ejabberd since version 20.04. +module is included in ejabberd since version 20.04. __Available options:__ diff --git a/content/archive/21_07/toplevel.md b/content/archive/21.07/toplevel.md similarity index 97% rename from content/archive/21_07/toplevel.md rename to content/archive/21.07/toplevel.md index a8e29546..131a380d 100644 --- a/content/archive/21_07/toplevel.md +++ b/content/archive/21.07/toplevel.md @@ -1,10 +1,9 @@ --- -title: Top-Level Options -toc: true -menu: Top-Level Options -order: 80 +search: + exclude: true --- +# Top-Level Options ## access\_rules @@ -120,7 +119,7 @@ mapping *{ACLType: ACLValue}*. These can be one of the following: *Options* -[ACME](/admin/configuration/basic/#acme) configuration, to automatically obtain SSL +[ACME](../../admin/configuration/basic.md#acme) configuration, to automatically obtain SSL certificates for the domains served by ejabberd, which means that certificate requests and renewals are performed to some CA server (aka "ACME server") in a fully automated mode. The *Options* are: @@ -241,7 +240,7 @@ This is used by the contributed module *ejabberd\_auth\_http* that can be installed from the *ejabberd-contrib* Git repository. Please refer to that module’s README file for details. -
improved in 20.01
+
improved in 20.01
## auth\_password\_format @@ -285,11 +284,11 @@ format. All client certificates should be signed by one of these root CA certificates and should contain the corresponding JID(s) in *subjectAltName* field. There is no default value. -You can use [host\_config](/archive/21_07/toplevel/#host-config) to specify +You can use [host\_config](toplevel.md#host_config) to specify this option per-vhost. To set a specific file per listener, use the listener’s -[cafile](/archive/21_07/listen-options/#cafile) option. Please notice that +[cafile](listen-options.md#cafile) option. Please notice that *c2s\_cafile* overrides the listener’s *cafile* option. ## c2s\_ciphers @@ -348,7 +347,7 @@ Path to a file of CA root certificates. The default is to use system defined file if possible. For server connections, this *ca\_file* option is overridden by the -[s2s\_cafile](/archive/21_07/toplevel/#s2s-cafile) option. +[s2s\_cafile](toplevel.md#s2s-cafile) option. ## cache\_life\_time @@ -832,7 +831,7 @@ JID. For example, "%.org". If the value is in the form of *\[Options, ...\]* The option for listeners configuration. See the [Listen -Modules](/archive/21_07/listen/) section for details. +Modules](./listen.md/) section for details. ## log\_rotate\_count @@ -875,7 +874,7 @@ value is *10000*. *{Module: Options}* -The option for modules configuration. See [Modules](/archive/21_07/modules/) +The option for modules configuration. See [Modules](./modules.md/) section for details. ## negotiation\_timeout @@ -934,7 +933,7 @@ set, the value from *cache\_life\_time* will be used. Same as *cache\_missed*, but applied to OAuth cache only. If not set, the value from *cache\_missed* will be used. -
added in 21.01
+
added in 21.01
## oauth\_cache\_rest\_failure\_life\_time @@ -1018,7 +1017,7 @@ Specify which address families to try, in what order. The default is *\[ipv4, ipv6\]* which means it first tries connecting with IPv4, if that fails it tries using IPv6. -
added in 20.12
+
added in 20.12
## outgoing\_s2s\_ipv4\_address @@ -1028,7 +1027,7 @@ Specify the IPv4 address that will be used when establishing an outgoing S2S IPv4 connection, for example "127.0.0.1". The default value is *undefined*. -
added in 20.12
+
added in 20.12
## outgoing\_s2s\_ipv6\_address @@ -1220,9 +1219,9 @@ value is *all* which means no restrictions are applied. A path to a file with CA root certificates that will be used to authenticate s2s connections. If not set, the value of -[ca\_file](/archive/21_07/toplevel/#ca-file) will be used. +[ca\_file](toplevel.md#ca_file) will be used. -You can use [host\_config](/archive/21_07/toplevel/#host-config) to specify +You can use [host\_config](toplevel.md#host_config) to specify this option per-vhost. ## s2s\_ciphers @@ -1428,7 +1427,7 @@ An interval to make a dummy SQL request to keep alive the connections to the database. There is no default value, so no keepalive requests are made. -
added in 20.12
+
added in 20.12
## sql\_odbc\_driver @@ -1461,7 +1460,7 @@ The port where the SQL server is accepting connections. The default is *3306* for MySQL, *5432* for PostgreSQL and *1433* for MS SQL. The option has no effect for SQLite. -
added in 20.01
+
added in 20.01
## sql\_prepared\_statements @@ -1492,7 +1491,7 @@ defined in *queue\_type* or *ram* if the latter is not set. A hostname or an IP address of the SQL server. The default value is *localhost*. -
improved in 20.03
+
improved in 20.03
## sql\_ssl diff --git a/content/admin/upgrade/from_21.04_to_21.07.md b/content/archive/21.07/upgrade.md similarity index 95% rename from content/admin/upgrade/from_21.04_to_21.07.md rename to content/archive/21.07/upgrade.md index 51099189..9fa9101b 100644 --- a/content/admin/upgrade/from_21.04_to_21.07.md +++ b/content/archive/21.07/upgrade.md @@ -1,8 +1,10 @@ --- -title: Upgrade to ejabberd 21.07 -toc: true +search: + exclude: true --- +# Upgrade to ejabberd 21.07 + ## Database changes ### Add missing indexes to SQL `sr_group` table @@ -17,7 +19,7 @@ If you store Shared Roster Groups in a SQL database, you can create the index co The MySQL database schema has improved to support scram-sha512 ([#3582](https://github.com/processone/ejabberd/issues/3582)) If you have a MySQL database, you can update your schema with: -```sql +``` sql ALTER TABLE users MODIFY serverkey varchar(128) NOT NULL DEFAULT ’’; ALTER TABLE users MODIFY salt varchar(128) NOT NULL DEFAULT ’’; ``` diff --git a/content/archive/21_12/admin-api.md b/content/archive/21.12/admin-api.md similarity index 83% rename from content/archive/21_12/admin-api.md rename to content/archive/21.12/admin-api.md index 64de7d3b..2c53d27a 100644 --- a/content/archive/21_12/admin-api.md +++ b/content/archive/21.12/admin-api.md @@ -1,12 +1,9 @@ --- -title: Administration API reference -toc: true -menu: API Reference -order: 1 -// Autogenerated with 'ejabberdctl gen_markdown_doc_for_commands' +search: + exclude: true --- - +# API Reference ## add_rosteritem @@ -31,10 +28,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[roster](/developer/ejabberd-api/admin-tags/#roster) +[roster](../../developer/ejabberd-api/admin-tags.md#roster) __Module:__ -[mod_admin_extra](/archive/21_12/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -72,7 +69,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -106,10 +103,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) __Module:__ -[mod_admin_extra](/archive/21_12/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -144,10 +141,10 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[private](/developer/ejabberd-api/admin-tags/#private) +[private](../../developer/ejabberd-api/admin-tags.md#private) __Module:__ -[mod_private](/archive/21_12/modules/#mod-private) +[mod_private](modules.md#mod_private) __Examples:__ @@ -182,10 +179,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) __Module:__ -[mod_admin_extra](/archive/21_12/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -222,10 +219,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc-room) __Module:__ -[mod_muc_admin](/archive/21_12/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -261,10 +258,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) __Module:__ -[mod_admin_extra](/archive/21_12/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -299,10 +296,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) __Module:__ -[mod_admin_extra](/archive/21_12/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -342,10 +339,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) __Module:__ -[mod_admin_extra](/archive/21_12/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -379,7 +376,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](../../developer/ejabberd-api/admin-tags.md#server) __Examples:__ @@ -411,10 +408,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[erlang](/developer/ejabberd-api/admin-tags/#erlang) +[erlang](../../developer/ejabberd-api/admin-tags.md#erlang) __Module:__ -[mod_admin_extra](/archive/21_12/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -445,7 +442,7 @@ __Result:__ - *connected_users* :: [sessions::string] : List of users sessions __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Examples:__ @@ -479,10 +476,10 @@ __Result:__ - *connected_users_info* :: [{jid::string, connection::string, ip::string, port::integer, priority::integer, node::string, uptime::integer, status::string, resource::string, statustext::string}] __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/21_12/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -526,7 +523,7 @@ __Result:__ - *num_sessions* :: integer __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) [statistics](/developer/ejabberd-api/admin-tags/#statistics) +[session](../../developer/ejabberd-api/admin-tags.md#session) [statistics](../../developer/ejabberd-api/admin-tags.md#statistics) __Examples:__ @@ -558,10 +555,10 @@ __Result:__ - *connected_users_vhost* :: [sessions::string] __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/21_12/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -596,7 +593,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[sql](/developer/ejabberd-api/admin-tags/#sql) +[sql](../../developer/ejabberd-api/admin-tags.md#sql) __Examples:__ @@ -629,7 +626,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[config](/developer/ejabberd-api/admin-tags/#config) +[config](../../developer/ejabberd-api/admin-tags.md#config) __Examples:__ @@ -664,10 +661,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc-room) __Module:__ -[mod_muc_admin](/archive/21_12/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -704,10 +701,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc-room) __Module:__ -[mod_muc_admin](/archive/21_12/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -750,10 +747,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/21_12/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -784,7 +781,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](../../developer/ejabberd-api/admin-tags.md#purge) __Examples:__ @@ -800,7 +797,7 @@ __Examples:__ ~~~ -
added in 21.12
+
added in 21.12
## delete_expired_pubsub_items @@ -815,10 +812,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](../../developer/ejabberd-api/admin-tags.md#purge) __Module:__ -[mod_pubsub](/archive/21_12/modules/#mod-pubsub) +[mod_pubsub](modules.md#mod_pubsub) __Examples:__ @@ -850,7 +847,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -886,10 +883,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](../../developer/ejabberd-api/admin-tags.md#purge) __Module:__ -[mod_mam](/archive/21_12/modules/#mod-mam) +[mod_mam](modules.md#mod_mam) __Examples:__ @@ -922,7 +919,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](../../developer/ejabberd-api/admin-tags.md#purge) __Examples:__ @@ -938,7 +935,7 @@ __Examples:__ ~~~ -
added in 21.12
+
added in 21.12
## delete_old_pubsub_items @@ -954,10 +951,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](../../developer/ejabberd-api/admin-tags.md#purge) __Module:__ -[mod_pubsub](/archive/21_12/modules/#mod-pubsub) +[mod_pubsub](modules.md#mod_pubsub) __Examples:__ @@ -989,10 +986,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](../../developer/ejabberd-api/admin-tags.md#purge) __Module:__ -[mod_push](/archive/21_12/modules/#mod-push) +[mod_push](modules.md#mod_push) __Examples:__ @@ -1032,10 +1029,10 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) [purge](/developer/ejabberd-api/admin-tags/#purge) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) [purge](../../developer/ejabberd-api/admin-tags.md#purge) __Module:__ -[mod_admin_extra](/archive/21_12/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -1076,10 +1073,10 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) [purge](/developer/ejabberd-api/admin-tags/#purge) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) [purge](../../developer/ejabberd-api/admin-tags.md#purge) __Module:__ -[mod_admin_extra](/archive/21_12/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -1115,10 +1112,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[roster](/developer/ejabberd-api/admin-tags/#roster) +[roster](../../developer/ejabberd-api/admin-tags.md#roster) __Module:__ -[mod_admin_extra](/archive/21_12/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -1154,10 +1151,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc-room) __Module:__ -[mod_muc_admin](/archive/21_12/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -1193,10 +1190,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/21_12/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -1228,7 +1225,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -1260,7 +1257,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[config](/developer/ejabberd-api/admin-tags/#config) +[config](../../developer/ejabberd-api/admin-tags.md#config) __Examples:__ @@ -1293,7 +1290,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -1318,7 +1315,7 @@ __Examples:__ Export virtual host information from Mnesia tables to SQL file -Configure the modules to use SQL, then call this command. After correctly exported the database of a vhost, you may want to delete from mnesia with the [delete_mnesia](/archive/21_12/admin-api/#delete-mnesia) command. +Configure the modules to use SQL, then call this command. After correctly exported the database of a vhost, you may want to delete from mnesia with the [delete_mnesia](admin-api.md#delete_mnesia) command. __Arguments:__ @@ -1330,7 +1327,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -1363,7 +1360,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -1396,7 +1393,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -1413,7 +1410,7 @@ __Examples:__ ~~~ -
added in 20.01
+
added in 20.01
## gc @@ -1428,7 +1425,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](../../developer/ejabberd-api/admin-tags.md#server) __Examples:__ @@ -1462,7 +1459,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[documentation](/developer/ejabberd-api/admin-tags/#documentation) +[documentation](../../developer/ejabberd-api/admin-tags.md#documentation) __Examples:__ @@ -1498,7 +1495,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[documentation](/developer/ejabberd-api/admin-tags/#documentation) +[documentation](../../developer/ejabberd-api/admin-tags.md#documentation) __Examples:__ @@ -1516,7 +1513,7 @@ __Examples:__ ~~~ -
added in 21.12
+
added in 21.12
## gen_markdown_doc_for_tags @@ -1532,7 +1529,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[documentation](/developer/ejabberd-api/admin-tags/#documentation) +[documentation](../../developer/ejabberd-api/admin-tags.md#documentation) __Examples:__ @@ -1563,10 +1560,10 @@ __Result:__ - *cookie* :: string : Erlang cookie used for authentication by ejabberd __Tags:__ -[erlang](/developer/ejabberd-api/admin-tags/#erlang) +[erlang](../../developer/ejabberd-api/admin-tags.md#erlang) __Module:__ -[mod_admin_extra](/archive/21_12/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -1602,10 +1599,10 @@ __Result:__ - *last_activity* :: {timestamp::string, status::string} : Last activity timestamp and status __Tags:__ -[last](/developer/ejabberd-api/admin-tags/#last) +[last](../../developer/ejabberd-api/admin-tags.md#last) __Module:__ -[mod_admin_extra](/archive/21_12/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -1640,7 +1637,7 @@ __Result:__ - *levelatom* :: string : Tuple with the log level number, its keyword and description __Tags:__ -[logs](/developer/ejabberd-api/admin-tags/#logs) +[logs](../../developer/ejabberd-api/admin-tags.md#logs) __Examples:__ @@ -1673,10 +1670,10 @@ __Result:__ - *value* :: integer : Number __Tags:__ -[offline](/developer/ejabberd-api/admin-tags/#offline) +[offline](../../developer/ejabberd-api/admin-tags.md#offline) __Module:__ -[mod_admin_extra](/archive/21_12/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -1722,10 +1719,10 @@ __Result:__ - *presence* :: {jid::string, show::string, status::string} __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/21_12/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -1764,10 +1761,10 @@ __Result:__ - *affiliation* :: string : Affiliation of the user __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc-room) __Module:__ -[mod_muc_admin](/archive/21_12/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -1802,10 +1799,10 @@ __Result:__ - *affiliations* :: [{username::string, domain::string, affiliation::string, reason::string}] : The list of affiliations with username, domain, affiliation and reason __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc-room) __Module:__ -[mod_muc_admin](/archive/21_12/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -1846,10 +1843,10 @@ __Result:__ - *occupants* :: [{jid::string, nick::string, role::string}] : The list of occupants with JID, nick and affiliation __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc-room) __Module:__ -[mod_muc_admin](/archive/21_12/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -1889,10 +1886,10 @@ __Result:__ - *occupants* :: integer : Number of room occupants __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc-room) __Module:__ -[mod_muc_admin](/archive/21_12/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -1926,10 +1923,10 @@ __Result:__ - *options* :: [{name::string, value::string}] : List of room options tuples with name and value __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc-room) __Module:__ -[mod_muc_admin](/archive/21_12/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -1968,10 +1965,10 @@ __Result:__ - *contacts* :: [{jid::string, nick::string, subscription::string, ask::string, group::string}] __Tags:__ -[roster](/developer/ejabberd-api/admin-tags/#roster) +[roster](../../developer/ejabberd-api/admin-tags.md#roster) __Module:__ -[mod_admin_extra](/archive/21_12/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -2020,10 +2017,10 @@ __Result:__ - *subscribers* :: [jid::string] : The list of users that are subscribed to that room __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc-room) __Module:__ -[mod_muc_admin](/archive/21_12/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -2060,10 +2057,10 @@ __Result:__ - *rooms* :: [room::string] __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/21_12/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -2083,7 +2080,7 @@ __Examples:__ ~~~ -
added in 21.04
+
added in 21.04
## get_user_subscriptions @@ -2100,10 +2097,10 @@ __Result:__ - *rooms* :: [{roomjid::string, usernick::string, nodes::[node::string]}] __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/21_12/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -2157,10 +2154,10 @@ __Result:__ - *content* :: string : Field content __Tags:__ -[vcard](/developer/ejabberd-api/admin-tags/#vcard) +[vcard](../../developer/ejabberd-api/admin-tags.md#vcard) __Module:__ -[mod_admin_extra](/archive/21_12/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -2215,10 +2212,10 @@ __Result:__ - *content* :: string : Field content __Tags:__ -[vcard](/developer/ejabberd-api/admin-tags/#vcard) +[vcard](../../developer/ejabberd-api/admin-tags.md#vcard) __Module:__ -[mod_admin_extra](/archive/21_12/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -2274,10 +2271,10 @@ __Result:__ - *contents* :: [value::string] __Tags:__ -[vcard](/developer/ejabberd-api/admin-tags/#vcard) +[vcard](../../developer/ejabberd-api/admin-tags.md#vcard) __Module:__ -[mod_admin_extra](/archive/21_12/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -2315,7 +2312,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -2347,7 +2344,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -2379,7 +2376,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -2414,7 +2411,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) [sql](/developer/ejabberd-api/admin-tags/#sql) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) [sql](../../developer/ejabberd-api/admin-tags.md#sql) __Examples:__ @@ -2445,7 +2442,7 @@ __Result:__ - *s2s_incoming* :: integer __Tags:__ -[statistics](/developer/ejabberd-api/admin-tags/#statistics) [s2s](/developer/ejabberd-api/admin-tags/#s2s) +[statistics](../../developer/ejabberd-api/admin-tags.md#statistics) [s2s](../../developer/ejabberd-api/admin-tags.md#s2s) __Examples:__ @@ -2481,7 +2478,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -2516,7 +2513,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[cluster](/developer/ejabberd-api/admin-tags/#cluster) +[cluster](../../developer/ejabberd-api/admin-tags.md#cluster) __Examples:__ @@ -2551,10 +2548,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/21_12/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -2590,7 +2587,7 @@ __Result:__ - *num_resources* :: integer : Number of resources that were kicked __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Examples:__ @@ -2626,7 +2623,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[cluster](/developer/ejabberd-api/admin-tags/#cluster) +[cluster](../../developer/ejabberd-api/admin-tags.md#cluster) __Examples:__ @@ -2657,7 +2654,7 @@ __Result:__ - *certificates* :: [{domain::string, file::string, used::string}] __Tags:__ -[acme](/developer/ejabberd-api/admin-tags/#acme) +[acme](../../developer/ejabberd-api/admin-tags.md#acme) __Examples:__ @@ -2699,7 +2696,7 @@ __Result:__ - *nodes* :: [node::string] __Tags:__ -[cluster](/developer/ejabberd-api/admin-tags/#cluster) +[cluster](../../developer/ejabberd-api/admin-tags.md#cluster) __Examples:__ @@ -2737,7 +2734,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -2753,7 +2750,7 @@ __Examples:__ ~~~ -
added in 20.01
+
added in 20.01
## man @@ -2768,7 +2765,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[documentation](/developer/ejabberd-api/admin-tags/#documentation) +[documentation](../../developer/ejabberd-api/admin-tags.md#documentation) __Examples:__ @@ -2803,7 +2800,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -2837,7 +2834,7 @@ __Result:__ - *res* :: string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -2869,7 +2866,7 @@ __Result:__ - *res* :: string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -2901,7 +2898,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[modules](/developer/ejabberd-api/admin-tags/#modules) +[modules](../../developer/ejabberd-api/admin-tags.md#modules) __Examples:__ @@ -2933,7 +2930,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[modules](/developer/ejabberd-api/admin-tags/#modules) +[modules](../../developer/ejabberd-api/admin-tags.md#modules) __Examples:__ @@ -2965,7 +2962,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[modules](/developer/ejabberd-api/admin-tags/#modules) +[modules](../../developer/ejabberd-api/admin-tags.md#modules) __Examples:__ @@ -3000,7 +2997,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[modules](/developer/ejabberd-api/admin-tags/#modules) +[modules](../../developer/ejabberd-api/admin-tags.md#modules) __Examples:__ @@ -3031,7 +3028,7 @@ __Result:__ - *modules* :: [{name::string, summary::string}] : List of tuples with module name and description __Tags:__ -[modules](/developer/ejabberd-api/admin-tags/#modules) +[modules](../../developer/ejabberd-api/admin-tags.md#modules) __Examples:__ @@ -3065,7 +3062,7 @@ __Result:__ - *modules* :: [{name::string, summary::string}] : List of tuples with module name and description __Tags:__ -[modules](/developer/ejabberd-api/admin-tags/#modules) +[modules](../../developer/ejabberd-api/admin-tags.md#modules) __Examples:__ @@ -3102,7 +3099,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[modules](/developer/ejabberd-api/admin-tags/#modules) +[modules](../../developer/ejabberd-api/admin-tags.md#modules) __Examples:__ @@ -3134,10 +3131,10 @@ __Result:__ - *rooms* :: [room::string] : List of rooms __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/21_12/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -3173,10 +3170,10 @@ __Result:__ - *rooms* :: [{jid::string, public::string, participants::integer}] : List of rooms with summary __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/21_12/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -3222,10 +3219,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/21_12/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -3260,10 +3257,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/21_12/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -3297,10 +3294,10 @@ __Result:__ - *resources* :: integer : Number of active resources for a user __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/21_12/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -3335,7 +3332,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[oauth](/developer/ejabberd-api/admin-tags/#oauth) +[oauth](../../developer/ejabberd-api/admin-tags.md#oauth) __Examples:__ @@ -3371,7 +3368,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[oauth](/developer/ejabberd-api/admin-tags/#oauth) +[oauth](../../developer/ejabberd-api/admin-tags.md#oauth) __Examples:__ @@ -3407,7 +3404,7 @@ __Result:__ - *result* :: {token::string, scopes::string, expires_in::string} __Tags:__ -[oauth](/developer/ejabberd-api/admin-tags/#oauth) +[oauth](../../developer/ejabberd-api/admin-tags.md#oauth) __Examples:__ @@ -3447,7 +3444,7 @@ __Result:__ - *tokens* :: [{token::string, user::string, scope::string, expires_in::string}] __Tags:__ -[oauth](/developer/ejabberd-api/admin-tags/#oauth) +[oauth](../../developer/ejabberd-api/admin-tags.md#oauth) __Examples:__ @@ -3492,7 +3489,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[oauth](/developer/ejabberd-api/admin-tags/#oauth) +[oauth](../../developer/ejabberd-api/admin-tags.md#oauth) __Examples:__ @@ -3524,7 +3521,7 @@ __Result:__ - *tokens* :: [{token::string, user::string, scope::string, expires_in::string}] : List of remaining tokens __Tags:__ -[oauth](/developer/ejabberd-api/admin-tags/#oauth) +[oauth](../../developer/ejabberd-api/admin-tags.md#oauth) __Examples:__ @@ -3568,7 +3565,7 @@ __Result:__ - *s2s_outgoing* :: integer __Tags:__ -[statistics](/developer/ejabberd-api/admin-tags/#statistics) [s2s](/developer/ejabberd-api/admin-tags/#s2s) +[statistics](../../developer/ejabberd-api/admin-tags.md#statistics) [s2s](../../developer/ejabberd-api/admin-tags.md#s2s) __Examples:__ @@ -3602,10 +3599,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[stanza](/developer/ejabberd-api/admin-tags/#stanza) +[stanza](../../developer/ejabberd-api/admin-tags.md#stanza) __Module:__ -[mod_admin_extra](/archive/21_12/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -3642,10 +3639,10 @@ __Result:__ - *res* :: string __Tags:__ -[private](/developer/ejabberd-api/admin-tags/#private) +[private](../../developer/ejabberd-api/admin-tags.md#private) __Module:__ -[mod_admin_extra](/archive/21_12/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -3682,10 +3679,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[private](/developer/ejabberd-api/admin-tags/#private) +[private](../../developer/ejabberd-api/admin-tags.md#private) __Module:__ -[mod_admin_extra](/archive/21_12/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -3759,10 +3756,10 @@ __Result:__ - *response* :: [{user::string, contact::string}] __Tags:__ -[roster](/developer/ejabberd-api/admin-tags/#roster) +[roster](../../developer/ejabberd-api/admin-tags.md#roster) __Module:__ -[mod_admin_extra](/archive/21_12/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -3808,10 +3805,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[roster](/developer/ejabberd-api/admin-tags/#roster) +[roster](../../developer/ejabberd-api/admin-tags.md#roster) __Module:__ -[mod_admin_extra](/archive/21_12/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -3853,10 +3850,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[roster](/developer/ejabberd-api/admin-tags/#roster) +[roster](../../developer/ejabberd-api/admin-tags.md#roster) __Module:__ -[mod_admin_extra](/archive/21_12/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -3895,10 +3892,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[roster](/developer/ejabberd-api/admin-tags/#roster) +[roster](../../developer/ejabberd-api/admin-tags.md#roster) __Module:__ -[mod_admin_extra](/archive/21_12/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -3932,7 +3929,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) __Examples:__ @@ -3966,7 +3963,7 @@ __Result:__ - *users* :: [username::string] : List of registered accounts usernames __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) __Examples:__ @@ -4000,7 +3997,7 @@ __Result:__ - *vhosts* :: [vhost::string] : List of available vhosts __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](../../developer/ejabberd-api/admin-tags.md#server) __Examples:__ @@ -4034,7 +4031,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[config](/developer/ejabberd-api/admin-tags/#config) +[config](../../developer/ejabberd-api/admin-tags.md#config) __Examples:__ @@ -4067,10 +4064,10 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mam](/developer/ejabberd-api/admin-tags/#mam) +[mam](../../developer/ejabberd-api/admin-tags.md#mam) __Module:__ -[mod_mam](/archive/21_12/modules/#mod-mam) +[mod_mam](modules.md#mod_mam) __Examples:__ @@ -4105,10 +4102,10 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mam](/developer/ejabberd-api/admin-tags/#mam) +[mam](../../developer/ejabberd-api/admin-tags.md#mam) __Module:__ -[mod_mam](/archive/21_12/modules/#mod-mam) +[mod_mam](modules.md#mod_mam) __Examples:__ @@ -4134,7 +4131,7 @@ __Examples:__ Reopen the log files after being renamed -This can be useful when an external tool is used for log rotation. See https://docs.ejabberd.im/admin/guide/troubleshooting/#log-files +This can be useful when an external tool is used for log rotation. See https://docs.ejabberd.im/admin/guide/troubleshooting/#log_files __Arguments:__ @@ -4144,7 +4141,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[logs](/developer/ejabberd-api/admin-tags/#logs) +[logs](../../developer/ejabberd-api/admin-tags.md#logs) __Examples:__ @@ -4176,7 +4173,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[acme](/developer/ejabberd-api/admin-tags/#acme) +[acme](../../developer/ejabberd-api/admin-tags.md#acme) __Examples:__ @@ -4210,10 +4207,10 @@ __Result:__ - *resource* :: string : Name of user resource __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/21_12/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -4246,7 +4243,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](../../developer/ejabberd-api/admin-tags.md#server) __Examples:__ @@ -4282,10 +4279,10 @@ __Result:__ - 2: code not reloaded, but module restarted __Tags:__ -[erlang](/developer/ejabberd-api/admin-tags/#erlang) +[erlang](../../developer/ejabberd-api/admin-tags.md#erlang) __Module:__ -[mod_admin_extra](/archive/21_12/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -4321,7 +4318,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -4353,7 +4350,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[acme](/developer/ejabberd-api/admin-tags/#acme) +[acme](../../developer/ejabberd-api/admin-tags.md#acme) __Examples:__ @@ -4388,10 +4385,10 @@ __Result:__ - *rooms* :: [room::string] : List of empty rooms that have been destroyed __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/21_12/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -4429,10 +4426,10 @@ __Result:__ - *rooms* :: [room::string] : List of empty rooms __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/21_12/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -4471,10 +4468,10 @@ __Result:__ - *rooms* :: [room::string] : List of unused rooms that has been destroyed __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/21_12/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -4514,10 +4511,10 @@ __Result:__ - *rooms* :: [room::string] : List of unused rooms __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/21_12/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -4552,7 +4549,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[logs](/developer/ejabberd-api/admin-tags/#logs) +[logs](../../developer/ejabberd-api/admin-tags.md#logs) __Examples:__ @@ -4576,7 +4573,7 @@ __Examples:__ Send a direct invitation to several destinations -Since ejabberd 20.10, this command is asynchronous: the API call may return before the server has send all the invitations. +Since ejabberd 20.12, this command is asynchronous: the API call may return before the server has send all the invitations. Password and Message can also be: none. Users JIDs are separated with : @@ -4593,10 +4590,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc-room) __Module:__ -[mod_muc_admin](/archive/21_12/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -4639,10 +4636,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[stanza](/developer/ejabberd-api/admin-tags/#stanza) +[stanza](../../developer/ejabberd-api/admin-tags.md#stanza) __Module:__ -[mod_admin_extra](/archive/21_12/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -4680,10 +4677,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[stanza](/developer/ejabberd-api/admin-tags/#stanza) +[stanza](../../developer/ejabberd-api/admin-tags.md#stanza) __Module:__ -[mod_admin_extra](/archive/21_12/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -4723,10 +4720,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[stanza](/developer/ejabberd-api/admin-tags/#stanza) +[stanza](../../developer/ejabberd-api/admin-tags.md#stanza) __Module:__ -[mod_admin_extra](/archive/21_12/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -4767,10 +4764,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[last](/developer/ejabberd-api/admin-tags/#last) +[last](../../developer/ejabberd-api/admin-tags.md#last) __Module:__ -[mod_admin_extra](/archive/21_12/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -4805,7 +4802,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[logs](/developer/ejabberd-api/admin-tags/#logs) +[logs](../../developer/ejabberd-api/admin-tags.md#logs) __Examples:__ @@ -4840,7 +4837,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[cluster](/developer/ejabberd-api/admin-tags/#cluster) +[cluster](../../developer/ejabberd-api/admin-tags.md#cluster) __Examples:__ @@ -4874,10 +4871,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[vcard](/developer/ejabberd-api/admin-tags/#vcard) +[vcard](../../developer/ejabberd-api/admin-tags.md#vcard) __Module:__ -[mod_admin_extra](/archive/21_12/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -4917,10 +4914,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/21_12/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -4961,10 +4958,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc-room) __Module:__ -[mod_muc_admin](/archive/21_12/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -5013,10 +5010,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[vcard](/developer/ejabberd-api/admin-tags/#vcard) +[vcard](../../developer/ejabberd-api/admin-tags.md#vcard) __Module:__ -[mod_admin_extra](/archive/21_12/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5073,10 +5070,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[vcard](/developer/ejabberd-api/admin-tags/#vcard) +[vcard](../../developer/ejabberd-api/admin-tags.md#vcard) __Module:__ -[mod_admin_extra](/archive/21_12/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5134,10 +5131,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[vcard](/developer/ejabberd-api/admin-tags/#vcard) +[vcard](../../developer/ejabberd-api/admin-tags.md#vcard) __Module:__ -[mod_admin_extra](/archive/21_12/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5160,7 +5157,7 @@ __Examples:__ ~~~ -
changed in 21.07
+
changed in 21.07
## srg_create @@ -5187,10 +5184,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[shared_roster_group](/developer/ejabberd-api/admin-tags/#shared-roster-group) +[shared_roster_group](../../developer/ejabberd-api/admin-tags.md#shared_roster_group) __Module:__ -[mod_admin_extra](/archive/21_12/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5227,10 +5224,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[shared_roster_group](/developer/ejabberd-api/admin-tags/#shared-roster-group) +[shared_roster_group](../../developer/ejabberd-api/admin-tags.md#shared_roster_group) __Module:__ -[mod_admin_extra](/archive/21_12/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5264,10 +5261,10 @@ __Result:__ - *information* :: [{key::string, value::string}] : List of group information, as key and value __Tags:__ -[shared_roster_group](/developer/ejabberd-api/admin-tags/#shared-roster-group) +[shared_roster_group](../../developer/ejabberd-api/admin-tags.md#shared_roster_group) __Module:__ -[mod_admin_extra](/archive/21_12/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5310,10 +5307,10 @@ __Result:__ - *members* :: [member::string] : List of group identifiers __Tags:__ -[shared_roster_group](/developer/ejabberd-api/admin-tags/#shared-roster-group) +[shared_roster_group](../../developer/ejabberd-api/admin-tags.md#shared_roster_group) __Module:__ -[mod_admin_extra](/archive/21_12/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5349,10 +5346,10 @@ __Result:__ - *groups* :: [id::string] : List of group identifiers __Tags:__ -[shared_roster_group](/developer/ejabberd-api/admin-tags/#shared-roster-group) +[shared_roster_group](../../developer/ejabberd-api/admin-tags.md#shared_roster_group) __Module:__ -[mod_admin_extra](/archive/21_12/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5390,10 +5387,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[shared_roster_group](/developer/ejabberd-api/admin-tags/#shared-roster-group) +[shared_roster_group](../../developer/ejabberd-api/admin-tags.md#shared_roster_group) __Module:__ -[mod_admin_extra](/archive/21_12/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5431,10 +5428,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[shared_roster_group](/developer/ejabberd-api/admin-tags/#shared-roster-group) +[shared_roster_group](../../developer/ejabberd-api/admin-tags.md#shared_roster_group) __Module:__ -[mod_admin_extra](/archive/21_12/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5469,10 +5466,10 @@ __Result:__ - *stat* :: integer : Integer statistic value __Tags:__ -[statistics](/developer/ejabberd-api/admin-tags/#statistics) +[statistics](../../developer/ejabberd-api/admin-tags.md#statistics) __Module:__ -[mod_admin_extra](/archive/21_12/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5505,10 +5502,10 @@ __Result:__ - *stat* :: integer : Integer statistic value __Tags:__ -[statistics](/developer/ejabberd-api/admin-tags/#statistics) +[statistics](../../developer/ejabberd-api/admin-tags.md#statistics) __Module:__ -[mod_admin_extra](/archive/21_12/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5540,7 +5537,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](../../developer/ejabberd-api/admin-tags.md#server) __Examples:__ @@ -5572,10 +5569,10 @@ __Result:__ - *users* :: [{user::string, host::string, resource::string, priority::integer, status::string}] __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/21_12/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5616,10 +5613,10 @@ __Result:__ - *users* :: [{user::string, host::string, resource::string, priority::integer, status::string}] __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/21_12/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5660,10 +5657,10 @@ __Result:__ - *users* :: integer : Number of connected sessions with given status type __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) [statistics](/developer/ejabberd-api/admin-tags/#statistics) +[session](../../developer/ejabberd-api/admin-tags.md#session) [statistics](../../developer/ejabberd-api/admin-tags.md#statistics) __Module:__ -[mod_admin_extra](/archive/21_12/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5696,10 +5693,10 @@ __Result:__ - *users* :: integer : Number of connected sessions with given status type __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) [statistics](/developer/ejabberd-api/admin-tags/#statistics) +[session](../../developer/ejabberd-api/admin-tags.md#session) [statistics](../../developer/ejabberd-api/admin-tags.md#statistics) __Module:__ -[mod_admin_extra](/archive/21_12/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5731,7 +5728,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](../../developer/ejabberd-api/admin-tags.md#server) __Examples:__ @@ -5768,7 +5765,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](../../developer/ejabberd-api/admin-tags.md#server) __Examples:__ @@ -5800,7 +5797,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[s2s](/developer/ejabberd-api/admin-tags/#s2s) +[s2s](../../developer/ejabberd-api/admin-tags.md#s2s) __Examples:__ @@ -5835,10 +5832,10 @@ __Result:__ - *nodes* :: [node::string] : The list of nodes that has subscribed __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc-room) __Module:__ -[mod_muc_admin](/archive/21_12/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -5879,10 +5876,10 @@ __Result:__ - *unbanned* :: integer : Amount of unbanned entries, or negative in case of error. __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) __Module:__ -[mod_fail2ban](/archive/21_12/modules/#mod-fail2ban) +[mod_fail2ban](modules.md#mod_fail2ban) __Examples:__ @@ -5915,7 +5912,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) __Examples:__ @@ -5949,10 +5946,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc-room) __Module:__ -[mod_muc_admin](/archive/21_12/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -5985,7 +5982,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](../../developer/ejabberd-api/admin-tags.md#server) __Examples:__ @@ -6016,7 +6013,7 @@ __Result:__ - *modules* :: [module::string] __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](../../developer/ejabberd-api/admin-tags.md#server) __Examples:__ @@ -6050,10 +6047,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[sql](/developer/ejabberd-api/admin-tags/#sql) +[sql](../../developer/ejabberd-api/admin-tags.md#sql) __Module:__ -[mod_admin_update_sql](/archive/21_12/modules/#mod-admin-update-sql) +[mod_admin_update_sql](modules.md#mod_admin_update_sql) __Examples:__ @@ -6086,7 +6083,7 @@ __Result:__ - *resources* :: [resource::string] __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Examples:__ @@ -6124,10 +6121,10 @@ __Result:__ - *sessions_info* :: [{connection::string, ip::string, port::integer, priority::integer, node::string, uptime::integer, status::string, resource::string, statustext::string}] __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/21_12/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ diff --git a/content/archive/21_12/index.md b/content/archive/21.12/index.md similarity index 60% rename from content/archive/21_12/index.md rename to content/archive/21.12/index.md index dfb43181..64d52e4e 100644 --- a/content/archive/21_12/index.md +++ b/content/archive/21.12/index.md @@ -1,15 +1,11 @@ ---- -title: Archived Documentation for 21.12 -menu: 21.12 -order: 7887 ---- +# Archived Documentation for 21.12 This section contains some archived sections for ejabberd 21.12. If you are upgrading ejabberd from a previous release, you can check: -* [Specific version upgrade notes](/admin/upgrade/#specific-version-upgrade-notes) +* [Specific version upgrade notes](upgrade.md) * [ejabberd 21.12 release announcement](https://www.process-one.net/blog/ejabberd-21-12/) -* [Docs Github Compare from 21.07](https://github.com/processone/docs.ejabberd.im/compare/21.07...21.12) -* [ejabberd Github Compare from 21.07](https://github.com/processone/ejabberd/compare/21.07...21.12) +* [Docs Github Compare from 21.07](https://github.com/processone/docs.ejabberd.im/compare/21.07..21.12) +* [ejabberd Github Compare from 21.07](https://github.com/processone/ejabberd/compare/21.07..21.12) diff --git a/content/archive/23_01/listen-options.md b/content/archive/21.12/listen-options.md similarity index 77% rename from content/archive/23_01/listen-options.md rename to content/archive/21.12/listen-options.md index d62abbca..f85c63bf 100644 --- a/content/archive/23_01/listen-options.md +++ b/content/archive/21.12/listen-options.md @@ -1,10 +1,9 @@ --- -title: Listen Options -toc: true -menu: Listen Opts -order: 51 +search: + exclude: true --- +# Listen Options This is a detailed description of each option allowed by the listening modules: @@ -34,18 +33,18 @@ The default is to use system defined file if possible. This option is useful to define the file for a specific port listener. To set a file for all client listeners or for specific vhosts, you can use the -[`c2s_cafile`](/archive/23_01/toplevel/#c2s-cafile) top-level option. +[`c2s_cafile`](toplevel.md#c2s-cafile) top-level option. To set a file for all server connections, you can use the -[`s2s_cafile`](/archive/23_01/toplevel/#s2s-cafile) top-level option +[`s2s_cafile`](toplevel.md#s2s-cafile) top-level option or the -[`ca_file`](/archive/23_01/toplevel/#ca-file) top-level option. +[`ca_file`](toplevel.md#ca_file) top-level option. Please note: if this option is set in -[`ejabberd_c2s`](/archive/23_01/listen/#ejabberd-c2s) -or [`ejabberd_s2s_in`](/archive/23_01/listen/#ejabberd-s2s-in) +[`ejabberd_c2s`](listen.md#ejabberd_c2s) +or [`ejabberd_s2s_in`](listen.md#ejabberd_s2s-in) and the corresponding top-level option is also set -([`c2s_cafile`](/archive/23_01/toplevel/#c2s-cafile), -[`s2s_cafile`](/archive/23_01/toplevel/#s2s-cafile)), +([`c2s_cafile`](toplevel.md#c2s-cafile), +[`s2s_cafile`](toplevel.md#s2s-cafile)), then the top-level option is used, not this one. ## certfile @@ -56,15 +55,15 @@ Path to the certificate file. Only makes sense when the [`tls`](#tls) options is set. If this option is not set, you should set the -[`certfiles`](/archive/23_01/toplevel/#certfiles) top-level option -or configure [ACME](/admin/configuration/basic/#acme). +[`certfiles`](toplevel.md#certfiles) top-level option +or configure [ACME](../../admin/configuration/basic.md#acme). ## check_from *true | false* This option can be used with -[`ejabberd_service`](/archive/23_01/listen/#ejabberd-service) only. +[`ejabberd_service`](listen.md#ejabberd_service) only. [`XEP-0114`](https://xmpp.org/extensions/xep-0114.html) requires that the domain must match the hostname of the component. If this option is set to `false`, `ejabberd` will allow the component to send @@ -81,11 +80,11 @@ OpenSSL ciphers list in the same format accepted by ‘`openssl ciphers`’ command. Please note: if this option is set in -[`ejabberd_c2s`](/archive/23_01/listen/#ejabberd-c2s) -or [`ejabberd_s2s_in`](/archive/23_01/listen/#ejabberd-s2s-in) +[`ejabberd_c2s`](listen.md#ejabberd_c2s) +or [`ejabberd_s2s_in`](listen.md#ejabberd_s2s-in) and the corresponding top-level option is also set -([`c2s_ciphers`](/archive/23_01/toplevel/#c2s-ciphers), -[`s2s_ciphers`](/archive/23_01/toplevel/#s2s-ciphers)), +([`c2s_ciphers`](toplevel.md#c2s-ciphers), +[`s2s_ciphers`](toplevel.md#s2s-ciphers)), then the top-level option is used, not this one. ## custom_headers @@ -102,7 +101,7 @@ Default value is: `[]` If the HTTP request received by ejabberd contains the HTTP header `Host` with an ambiguous virtual host that doesn’t match any one defined in ejabberd (see - [Host Names](/admin/configuration/basic/#host-names)), + [Host Names](../../admin/configuration/basic.md#host_names)), then this configured HostName is set as the request Host. The default value of this option is: `undefined`. @@ -118,11 +117,11 @@ Full path to a file containing custom parameters for Diffie-Hellman key of security as using custom parameters. Please note: if this option is set in -[`ejabberd_c2s`](/archive/23_01/listen/#ejabberd-c2s) -or [`ejabberd_s2s_in`](/archive/23_01/listen/#ejabberd-s2s-in) +[`ejabberd_c2s`](listen.md#ejabberd_c2s) +or [`ejabberd_s2s_in`](listen.md#ejabberd_s2s-in) and the corresponding top-level option is also set -([`c2s_dhfile`](/archive/23_01/toplevel/#c2s-dhfile), -[`s2s_dhfile`](/archive/23_01/toplevel/#s2s-dhfile)), +([`c2s_dhfile`](toplevel.md#c2s-dhfile), +[`s2s_dhfile`](toplevel.md#s2s-dhfile)), then the top-level option is used, not this one. ## global_routes @@ -130,7 +129,7 @@ then the top-level option is used, not this one. *true | false* This option emulates legacy behaviour which registers all routes -defined in [`hosts`](/archive/23_01/toplevel/#hosts) +defined in [`hosts`](toplevel.md#hosts) on a component connected. This behaviour is considered harmful in the case when it's desired to multiplex different components on the same port, so, to disable it, @@ -145,7 +144,7 @@ to maintain backward compatibility with existing deployments. *{Hostname: [HostOption, ...]}* The external Jabber component that connects to this -[`ejabberd_service`](/archive/23_01/listen/#ejabberd-service) +[`ejabberd_service`](listen.md#ejabberd_service) can serve one or more hostnames. As `HostOption` you can define options for the component; currently the only allowed option is the password required to the component when attempt to @@ -169,10 +168,10 @@ This option specifies the maximum number of elements in the queue of corresponding connection (if any) will be terminated and error message will be logged. The reasonable value for this option depends on your hardware configuration. This option can be specified for - [`ejabberd_service`](/archive/23_01/listen/#ejabberd-service) - and [`ejabberd_c2s`](/archive/23_01/listen/#ejabberd-c2s) + [`ejabberd_service`](listen.md#ejabberd_service) + and [`ejabberd_c2s`](listen.md#ejabberd_c2s) listeners, or also globally for - [`ejabberd_s2s_out`](/archive/23_01/listen/#ejabberd-s2s-out). + [`ejabberd_s2s_out`](listen.md#ejabberd_s2s-out). If the option is not specified for `ejabberd_service` or `ejabberd_c2s` listeners, the globally configured value is used. The allowed values are integers and @@ -204,7 +203,7 @@ This option specifies an approximate maximum size in bytes of XML Specify the password to verify an external component that connects to the port. -
improved in 20.07
+
improved in 20.07
## port @@ -225,11 +224,11 @@ List of general options relating to SSL/TLS. These map to The default entry is: `"no_sslv3|cipher_server_preference|no_compression"` Please note: if this option is set in -[`ejabberd_c2s`](/archive/23_01/listen/#ejabberd-c2s) -or [`ejabberd_s2s_in`](/archive/23_01/listen/#ejabberd-s2s-in) +[`ejabberd_c2s`](listen.md#ejabberd_c2s) +or [`ejabberd_s2s_in`](listen.md#ejabberd_s2s-in) and the corresponding top-level option is also set -([`c2s_protocol_options`](/archive/23_01/toplevel/#c2s-protocol-options), -[`s2s_protocol_options`](/archive/23_01/toplevel/#s2s-protocol-options)), +([`c2s_protocol_options`](toplevel.md#c2s-protocol-options), +[`s2s_protocol_options`](toplevel.md#s2s-protocol-options)), then the top-level option is used, not this one. ## request_handlers @@ -237,7 +236,7 @@ then the top-level option is used, not this one. *{Path: Module}* To define one or several handlers that will serve HTTP requests in -[`ejabberd_http`](/archive/23_01/listen/#ejabberd-http). The +[`ejabberd_http`](listen.md#ejabberd_http). The Path is a string; so the URIs that start with that Path will be served by Module. For example, if you want `mod_foo` to serve the URIs that start with `/a/b/`, and you also want `mod_bosh` to @@ -248,7 +247,7 @@ To define one or several handlers that will serve HTTP requests in /bosh: mod_bosh /mqtt: mod_mqtt -
new in 21.07
+
new in 21.07
## send_timeout @@ -261,7 +260,7 @@ Sets the longest time that data can wait to be accepted to sent by OS socket. Tr *none | ShaperName* This option defines a shaper for the port (see section  -[Shapers](/admin/configuration/basic/#shapers)). +[Shapers](../../admin/configuration/basic.md#shapers)). The default value is `none`. ## shaper_rule @@ -269,8 +268,8 @@ This option defines a shaper for the port (see section  *none | ShaperRule* This option defines a shaper rule for -[`ejabberd_service`](/archive/23_01/listen/#ejabberd-service) (see -section [Shapers](/admin/configuration/basic/#shapers)). +[`ejabberd_service`](listen.md#ejabberd_service) (see +section [Shapers](../../admin/configuration/basic.md#shapers)). The recommended value is `fast`. ## starttls @@ -279,11 +278,11 @@ The recommended value is `fast`. This option specifies that STARTTLS encryption is available on connections to the port. You should also set the -[`certfiles`](/archive/23_01/toplevel/#certfiles) top-level option -or configure [ACME](/admin/configuration/basic/#acme). +[`certfiles`](toplevel.md#certfiles) top-level option +or configure [ACME](../../admin/configuration/basic.md#acme). This option gets implicitly enabled when enabling -[`starttls_required`](#starttls-required) or [`tls_verify`](#tls-verify). +[`starttls_required`](#starttls_required) or [`tls_verify`](#tls_verify). ## starttls_required @@ -292,8 +291,8 @@ This option gets implicitly enabled when enabling This option specifies that STARTTLS encryption is required on connections to the port. No unencrypted connections will be allowed. You should also set the -[`certfiles`](/archive/23_01/toplevel/#certfiles) top-level option -or configure [ACME](/admin/configuration/basic/#acme). +[`certfiles`](toplevel.md#certfiles) top-level option +or configure [ACME](../../admin/configuration/basic.md#acme). Enabling this option implicitly enables also the [`starttls`](#starttls) option. @@ -303,7 +302,7 @@ Enabling this option implicitly enables also the [`starttls`](#starttls) option. Allow specifying a tag in a `listen` section and later use it to have a special -[`api_permissions`](/archive/23_01/toplevel/#api-permissions) +[`api_permissions`](toplevel.md#api_permissions) just for it. For example: @@ -344,11 +343,11 @@ This option specifies that traffic on the port will be encrypted [`starttls`](#starttls). If this option is set, you should also set the - [`certfiles`](/archive/23_01/toplevel/#certfiles) top-level - option or configure [ACME](/admin/configuration/basic/#acme). + [`certfiles`](toplevel.md#certfiles) top-level + option or configure [ACME](../../admin/configuration/basic.md#acme). The option `tls` can also be used in - [`ejabberd_http`](/archive/23_01/listen/#ejabberd-http) + [`ejabberd_http`](listen.md#ejabberd_http) to support HTTPS. Enabling this option implicitly disables the [`starttls`](#starttls) option. @@ -361,11 +360,11 @@ Whether to enable or disable TLS compression. The default value is `false`. Please note: if this option is set in -[`ejabberd_c2s`](/archive/23_01/listen/#ejabberd-c2s) -or [`ejabberd_s2s_in`](/archive/23_01/listen/#ejabberd-s2s-in) +[`ejabberd_c2s`](listen.md#ejabberd_c2s) +or [`ejabberd_s2s_in`](listen.md#ejabberd_s2s-in) and the corresponding top-level option is also set -([`c2s_tls_compression`](/archive/23_01/toplevel/#c2s-tls-compression), -[`s2s_tls_compression`](/archive/23_01/toplevel/#s2s-tls-compression)), +([`c2s_tls_compression`](toplevel.md#c2s-tls-compression), +[`s2s_tls_compression`](toplevel.md#s2s-tls-compression)), then the top-level option is used, not this one. ## tls_verify diff --git a/content/archive/21_12/listen.md b/content/archive/21.12/listen.md similarity index 77% rename from content/archive/21_12/listen.md rename to content/archive/21.12/listen.md index 266c609b..f1af7802 100644 --- a/content/archive/21_12/listen.md +++ b/content/archive/21.12/listen.md @@ -1,11 +1,8 @@ --- -title: Listen Modules -toc: true -menu: Listen Modules -order: 50 +search: + exclude: true --- - # Listen Option The **listen option** defines for which ports, addresses and network @@ -73,37 +70,37 @@ are: Handles c2s connections. Options: -[access](/archive/21_12/listen-options/#access), -[cafile](/archive/21_12/listen-options/#cafile), -[ciphers](/archive/21_12/listen-options/#ciphers), -[dhfile](/archive/21_12/listen-options/#dhfile), -[max_fsm_queue](/archive/21_12/listen-options/#max-fsm-queue), -[max_stanza_size](/archive/21_12/listen-options/#max-stanza-size), -[protocol_options](/archive/21_12/listen-options/#protocol-options), -[send_timeout](/archive/21_12/listen-options/#send-timeout), -[shaper](/archive/21_12/listen-options/#shaper), -[starttls](/archive/21_12/listen-options/#starttls), -[starttls_required](/archive/21_12/listen-options/#starttls-required), -[tls](/archive/21_12/listen-options/#tls), -[tls_compression](/archive/21_12/listen-options/#tls-compression), -[tls_verify](/archive/21_12/listen-options/#tls-verify), -[zlib](/archive/21_12/listen-options/#zlib). +[access](listen-options.md#access), +[cafile](listen-options.md#cafile), +[ciphers](listen-options.md#ciphers), +[dhfile](listen-options.md#dhfile), +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_stanza_size](listen-options.md#max_stanza_size), +[protocol_options](listen-options.md#protocol_options), +[send_timeout](listen-options.md#send_timeout), +[shaper](listen-options.md#shaper), +[starttls](listen-options.md#starttls), +[starttls_required](listen-options.md#starttls_required), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls_compression), +[tls_verify](listen-options.md#tls_verify), +[zlib](listen-options.md#zlib). ## ejabberd_s2s_in Handles incoming s2s connections. Options: -[cafile](/archive/21_12/listen-options/#cafile), -[ciphers](/archive/21_12/listen-options/#ciphers), -[dhfile](/archive/21_12/listen-options/#dhfile), -[max_fsm_queue](/archive/21_12/listen-options/#max-fsm-queue), -[max_stanza_size](/archive/21_12/listen-options/#max-stanza-size), -[protocol_options](/archive/21_12/listen-options/#protocol-options), -[send_timeout](/archive/21_12/listen-options/#send-timeout), -[shaper](/archive/21_12/listen-options/#shaper), -[tls](/archive/21_12/listen-options/#tls), -[tls_compression](/archive/21_12/listen-options/#tls-compression). +[cafile](listen-options.md#cafile), +[ciphers](listen-options.md#ciphers), +[dhfile](listen-options.md#dhfile), +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_stanza_size](listen-options.md#max_stanza_size), +[protocol_options](listen-options.md#protocol_options), +[send_timeout](listen-options.md#send_timeout), +[shaper](listen-options.md#shaper), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls_compression). ## ejabberd_service @@ -113,23 +110,23 @@ Interacts with an ([`XEP-0114`](https://xmpp.org/extensions/xep-0114.html)). Options: -[access](/archive/21_12/listen-options/#access), -[cafile](/archive/21_12/listen-options/#cafile), -[certfile](/archive/21_12/listen-options/#certfile), -[check_from](/archive/21_12/listen-options/#check-from), -[ciphers](/archive/21_12/listen-options/#ciphers), -[dhfile](/archive/21_12/listen-options/#dhfile), -[global_routes](/archive/21_12/listen-options/#global-routes), -[hosts](/archive/21_12/listen-options/#hosts), -[max_fsm_queue](/archive/21_12/listen-options/#max-fsm-queue), -[max_stanza_size](/archive/21_12/listen-options/#max-stanza-size), -[password](/archive/21_12/listen-options/#password), -[protocol_options](/archive/21_12/listen-options/#protocol-options), -[send_timeout](/archive/21_12/listen-options/#send-timeout), -[shaper](/archive/21_12/listen-options/#shaper), -[shaper_rule](/archive/21_12/listen-options/#shaper-rule), -[tls](/archive/21_12/listen-options/#tls), -[tls_compression](/archive/21_12/listen-options/#tls-compression). +[access](listen-options.md#access), +[cafile](listen-options.md#cafile), +[certfile](listen-options.md#certfile), +[check_from](listen-options.md#check_from), +[ciphers](listen-options.md#ciphers), +[dhfile](listen-options.md#dhfile), +[global_routes](listen-options.md#global_routes), +[hosts](listen-options.md#hosts), +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_stanza_size](listen-options.md#max_stanza_size), +[password](listen-options.md#password), +[protocol_options](listen-options.md#protocol_options), +[send_timeout](listen-options.md#send_timeout), +[shaper](listen-options.md#shaper), +[shaper_rule](listen-options.md#shaper_rule), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls_compression). ## ejabberd_sip @@ -137,13 +134,13 @@ Handles SIP requests as defined in [`RFC 3261`](https://tools.ietf.org/html/rfc3261). For details please check the -[ejabberd_sip](/archive/21_12/listen/#ejabberd-sip-1) -and [mod_sip](/archive/21_12/modules/#mod-sip) sections. +[ejabberd_sip](listen.md#ejabberd_sip_1) +and [mod_sip](modules.md#mod_sip) sections. General listener options: -[certfile](/archive/21_12/listen-options/#certfile), -[send_timeout](/archive/21_12/listen-options/#send-timeout), -[tls](/archive/21_12/listen-options/#tls). +[certfile](listen-options.md#certfile), +[send_timeout](listen-options.md#send_timeout), +[tls](listen-options.md#tls). ## ejabberd_stun @@ -152,7 +149,7 @@ Handles STUN/TURN requests as defined in [`RFC 5766`](https://tools.ietf.org/html/rfc5766). For the specific module options, please check the -[ejabberd_stun](/archive/21_12/listen/#ejabberd-stun-1) section: +[ejabberd_stun](listen.md#ejabberd_stun_1) section: `auth_realm`, `auth_type`, `server_name`, @@ -166,56 +163,56 @@ For the specific module options, please check the `use_turn`. General listener options: -[certfile](/archive/21_12/listen-options/#certfile), -[send_timeout](/archive/21_12/listen-options/#send-timeout), -[shaper](/archive/21_12/listen-options/#shaper), -[tls](/archive/21_12/listen-options/#tls), +[certfile](listen-options.md#certfile), +[send_timeout](listen-options.md#send_timeout), +[shaper](listen-options.md#shaper), +[tls](listen-options.md#tls), ## ejabberd_http Handles incoming HTTP connections. With the proper request handlers configured, this serves HTTP services like -[ACME](/admin/configuration/basic/#acme), -[API](/archive/21_12/modules/#mod-http-api), -[BOSH](/archive/21_12/modules/#mod-bosh), -[CAPTCHA](/admin/configuration/basic/#captcha), -[Fileserver](/archive/21_12/modules/#mod-http-fileserver), -[OAuth](/developer/ejabberd-api/oauth/), -[RegisterWeb](/archive/21_12/modules/#mod-register-web), -[Upload](/archive/21_12/modules/#mod-http-upload), -[WebAdmin](/admin/guide/managing/#web-admin), -[WebSocket](/archive/21_12/listen/#ejabberd-http-ws), -[XMP-RPC](/archive/21_12/listen/#ejabberd-xmlrpc). +[ACME](../../admin/configuration/basic.md#acme), +[API](modules.md#mod_http_api), +[BOSH](modules.md#mod_bosh), +[CAPTCHA](../../admin/configuration/basic.md#captcha), +[Fileserver](modules.md#mod_http_fileserver), +[OAuth](../../developer/ejabberd-api/oauth.md), +[RegisterWeb](modules.md#mod_register_web), +[Upload](modules.md#mod_http_upload), +[WebAdmin](../../admin/guide/managing.md#web_admin), +[WebSocket](listen.md#ejabberd_http_ws), +[XMP-RPC](listen.md#ejabberd_xmlrpc). Options: -[cafile](/archive/21_12/listen-options/#cafile), -[ciphers](/archive/21_12/listen-options/#ciphers), -[custom_headers](/archive/21_12/listen-options/#custom-headers), -[default_host](/archive/21_12/listen-options/#default-host), -[dhfile](/archive/21_12/listen-options/#dhfile), -[protocol_options](/archive/21_12/listen-options/#protocol-options), -[request_handlers](/archive/21_12/listen-options/#request-handlers), -[send_timeout](/archive/21_12/listen-options/#send-timeout), -[tag](/archive/21_12/listen-options/#tag), -[tls](/archive/21_12/listen-options/#tls), -[tls_compression](/archive/21_12/listen-options/#tls-compression), -and the [trusted_proxies](/archive/21_12/toplevel/#trusted-proxies) top-level option. +[cafile](listen-options.md#cafile), +[ciphers](listen-options.md#ciphers), +[custom_headers](listen-options.md#custom_headers), +[default_host](listen-options.md#default_host), +[dhfile](listen-options.md#dhfile), +[protocol_options](listen-options.md#protocol_options), +[request_handlers](listen-options.md#request_handlers), +[send_timeout](listen-options.md#send_timeout), +[tag](listen-options.md#tag), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls_compression), +and the [trusted_proxies](toplevel.md#trusted_proxies) top-level option. ## mod_mqtt Support for MQTT requires configuring `mod_mqtt` both in the -[listen](/archive/21_12/toplevel/#listen) and the -[modules](/archive/21_12/toplevel/#modules) sections. -Check the [mod_mqtt modules options](/archive/21_12/modules/#mod-mqtt). -Check the advanded documentation in [MQTT Support](/admin/guide/mqtt/). +[listen](toplevel.md#listen) and the +[modules](toplevel.md#modules) sections. +Check the [mod_mqtt modules options](modules.md#mod_mqtt). +Check the advanded documentation in [MQTT Support](../../admin/guide/mqtt/index.md). Listen options: -[max_fsm_queue](/archive/21_12/listen-options/#max-fsm-queue), -[max_payload_size](/archive/21_12/listen-options/#max-payload-size), -[send_timeout](/archive/21_12/listen-options/#send-timeout), -[tls](/archive/21_12/listen-options/#tls), -[tls_verify](/archive/21_12/listen-options/#tls-verify). +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_payload_size](listen-options.md#max_payload_size), +[send_timeout](listen-options.md#send_timeout), +[tls](listen-options.md#tls), +[tls_verify](listen-options.md#tls_verify). # ejabberd_stun @@ -336,14 +333,14 @@ And you should also add these in the case if TURN is enabled: ## SIP Configuration `ejabberd` has built-in SIP support. To activate this feature, -add the [`ejabberd_sip`](#ejabberd-sip) listen module, enable -[`mod_sip`](/archive/21_12/modules/#mod-sip) module +add the [`ejabberd_sip`](#ejabberd_sip) listen module, enable +[`mod_sip`](modules.md#mod_sip) module for the desired virtual host, and configure DNS properly. To add a listener you should configure `ejabberd_sip` listening module as described in [Listen](#listen-option) section. -If option [`tls`](/archive/21_12/listen-options/#tls) is specified, -option [`certfile`](/archive/21_12/listen-options/#certfile) +If option [`tls`](listen-options.md#tls) is specified, +option [`certfile`](listen-options.md#certfile) must be specified as well, otherwise incoming TLS connections would fail. @@ -421,7 +418,7 @@ section of `ejabberd_http` listener: ... This module can be configured by using those options that should be -placed in general section of config file: [websocket\_origin](/archive/21_12/toplevel/#websocket-origin), [websocket\_ping\_interval](/archive/21_12/toplevel/#websocket-ping-interval), [websocket\_timeout](/archive/21_12/toplevel/#websocket-timeout). +placed in general section of config file: [websocket\_origin](toplevel.md#websocket_origin), [websocket\_ping\_interval](toplevel.md#websocket_ping_interval), [websocket\_timeout](toplevel.md#websocket_timeout). ## Discovery @@ -442,13 +439,13 @@ A test client can be found on Github: [Websocket test client](https://github.com # ejabberd_xmlrpc Handles XML-RPC requests to execute -[ejabberd commands](/admin/guide/managing/#ejabberd-commands). +[ejabberd commands](../../admin/guide/managing.md#ejabberd_commands). It is configured as a request handler in -[ejabberd_http](/archive/21_12/listen/#ejabberd-http). +[ejabberd_http](listen.md#ejabberd_http). By default there is no restriction to who can execute what commands, so it is strongly recommended that you configure restrictions using -[API Permissions](/developer/ejabberd-api/permissions/). +[API Permissions](../../developer/ejabberd-api/permissions.md). This is the minimum configuration required to enable the feature: @@ -503,11 +500,11 @@ With that configuration, it is possible to execute two specific commands using print calling('registered_users', {'host':'localhost'}) It's possible to use OAuth for authentication instead of plain password, see -[OAuth Support](/developer/ejabberd-api/oauth/). +[OAuth Support](../../developer/ejabberd-api/oauth.md). In ejabberd 20.03 and older, it was possible to configure `ejabberd_xmlrpc` as a listener, see the old document for reference and example configuration: -[Listening Module](/admin/configuration/old/#listening-module). +[Listening Module](../old.md#listening_module). Just for reference, there's also the old [`ejabberd_xmlrpc documentation`](https://ejabberd.im/ejabberd_xmlrpc). @@ -534,7 +531,7 @@ For example, the following simple configuration defines: service. - Port 5281 listens for HTTP requests, using HTTPS to serve HTTP-Bind - (BOSH) and the Web Admin as explained in [Managing: Web Admin](/admin/guide/managing/#web-admin). The + (BOSH) and the Web Admin as explained in [Managing: Web Admin](../../admin/guide/managing.md#web_admin). The socket only listens connections to the IP address 127.0.0.1. @@ -608,7 +605,7 @@ In this example, the following configuration defines that: - Port 5280 is serving the Web Admin and the HTTP-Bind (BOSH) service in all the IPv4 addresses. Note that it is also possible to serve them - on different ports. The second example in section [Managing: Web Admin](/admin/guide/managing/#web-admin) shows + on different ports. The second example in section [Managing: Web Admin](../../admin/guide/managing.md#web_admin) shows how exactly this can be done. A request handler to serve MQTT over Websocket is also defined. - All users except for the administrators have a traffic of limit diff --git a/content/archive/21_12/modules.md b/content/archive/21.12/modules.md similarity index 87% rename from content/archive/21_12/modules.md rename to content/archive/21.12/modules.md index babf02a1..7d8f713b 100644 --- a/content/archive/21_12/modules.md +++ b/content/archive/21.12/modules.md @@ -1,10 +1,9 @@ --- -title: Modules Options -toc: true -menu: Modules Opts -order: 95 +search: + exclude: true --- +# Modules Options mod\_adhoc ---------- @@ -83,9 +82,9 @@ mod\_admin\_update\_sql This module can be used to update existing SQL database from the default to the new schema. Check the section [Default and New -Schemas](/admin/configuration/database/#default-and-new-schemas) for details. +Schemas](../../admin/configuration/database.md#default_and_new_schemas) for details. Please note that only PostgreSQL is supported. When the module is loaded -use [update_sql](/archive/21_12/admin-api/#update-sql) API. +use [update_sql](admin-api.md#update_sql) API. The module has no options. @@ -102,7 +101,7 @@ it may broadcast a lot of messages. This module should be disabled for instances of ejabberd with hundreds of thousands users. The Ad-hoc Commands are listed in the Server Discovery. For this feature -to work, [mod_adhoc](/archive/21_12/modules/#mod-adhoc) must be enabled. +to work, [mod_adhoc](modules.md#mod_adhoc) must be enabled. The specific JIDs where messages can be sent are listed below. The first JID in each entry will apply only to the specified virtual host @@ -114,7 +113,7 @@ hosts in ejabberd: connected to several resources, only the resource with the highest priority will receive the message. If the registered user is not connected, the message will be stored offline in assumption that - offline storage (see [mod_offline](/archive/21_12/modules/#mod-offline)) is enabled. + offline storage (see [mod_offline](modules.md#mod_offline)) is enabled. - example.org/announce/online (example.org/announce/all-hosts/online):: The message is sent to all @@ -143,23 +142,23 @@ the message of the day. The default value is *none* (i.e. nobody is able to send such messages). - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/21_12/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/21_12/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/21_12/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/21_12/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/21_12/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_avatar ----------- @@ -172,8 +171,8 @@ Conversion](https://xmpp.org/extensions/xep-0398.html). Also, the module supports conversion between avatar image formats on the fly. -The module depends on [mod_vcard](/archive/21_12/modules/#mod-vcard), [mod_vcard_xupdate](/archive/21_12/modules/#mod-vcard-xupdate) and -[mod_pubsub](/archive/21_12/modules/#mod-pubsub). +The module depends on [mod_vcard](modules.md#mod_vcard), [mod_vcard_xupdate](modules.md#mod_vcard_xupdate) and +[mod_pubsub](modules.md#mod_pubsub). __Available options:__ @@ -261,15 +260,15 @@ while having to get through an HTTP proxy. __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/21_12/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/21_12/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/21_12/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **json**: *true | false* @@ -293,14 +292,14 @@ authentication. Basically, it creates a new session with anonymous authentication. The default value is *false*. - **queue\_type**: *ram | file* -Same as top-level [queue_type](/archive/21_12/toplevel/#queue-type) option, but applied to this module +Same as top-level [queue_type](toplevel.md#queue_type) option, but applied to this module only. - **ram\_db\_type**: *mnesia | sql | redis* -Same as [default_ram_db](/archive/21_12/toplevel/#default-ram-db) but applied to this module only. +Same as [default_ram_db](toplevel.md#default_ram_db) but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/21_12/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. __**Example**:__ @@ -323,28 +322,28 @@ mod\_caps This module implements [XEP-0115: Entity Capabilities](https://xmpp.org/extensions/xep-0115.html). The main purpose of the module is to provide PEP functionality (see -[mod_pubsub](/archive/21_12/modules/#mod-pubsub)). +[mod_pubsub](modules.md#mod_pubsub)). __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/21_12/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/21_12/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/21_12/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/21_12/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/21_12/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_carboncopy --------------- @@ -391,7 +390,7 @@ mod\_configure The module provides server configuration functionality via [XEP-0050: Ad-Hoc Commands](https://xmpp.org/extensions/xep-0050.html). This module -requires [mod_adhoc](/archive/21_12/modules/#mod-adhoc) to be loaded. +requires [mod_adhoc](modules.md#mod_adhoc) to be loaded. The module has no options. @@ -401,18 +400,18 @@ mod\_conversejs This module serves a simple page for the [Converse](https://conversejs.org/) XMPP web browser client. -This module is available since ejabberd 21.12. +This module is available since ejabberd 21.12. To use this module, in addition to adding it to the *modules* section, you must also enable it in *listen* → *ejabberd\_http* → -[request\_handlers](/archive/21_12/listen-options/#request-handlers). +[request\_handlers](listen-options.md#request_handlers). You must also setup either the option *websocket\_url* or *bosh\_service\_url*. By default, the options *conversejs\_css* and *conversejs\_script* point to the public Converse.js client. Alternatively, you can host the client -locally using [mod_http_fileserver](/archive/21_12/modules/#mod-http-fileserver). +locally using [mod_http_fileserver](modules.md#mod_http_fileserver). __Available options:__ @@ -463,7 +462,7 @@ external PEP service. > **Note** > -> This module is complementary to [mod_privilege](/archive/21_12/modules/#mod-privilege) but can also be used +> This module is complementary to [mod_privilege](modules.md#mod_privilege) but can also be used > separately. __Available options:__ @@ -614,7 +613,7 @@ data. To use this module, in addition to adding it to the *modules* section, you must also enable it in *listen* → *ejabberd\_http* → -[request\_handlers](/archive/21_12/listen-options/#request-handlers). +[request\_handlers](listen-options.md#request_handlers). To use a specific API version N, when defining the URL path in the request\_handlers, add a *vN*. For example: */api/v2: mod\_http\_api* @@ -736,7 +735,7 @@ URL from which that file can later be downloaded. In order to use this module, it must be enabled in *listen* → *ejabberd\_http* → -[request\_handlers](/archive/21_12/listen-options/#request-handlers). +[request\_handlers](listen-options.md#request_handlers). __Available options:__ @@ -782,7 +781,7 @@ option is *undefined*, this option is set to the same value as *put\_url*. The keyword @HOST@ is replaced with the virtual host name. NOTE: if GET requests are handled by *mod\_http\_upload*, the *get\_url* must match the *put\_url*. Setting it to a different value only makes -sense if an external web server or [mod_http_fileserver](/archive/21_12/modules/#mod-http-fileserver) is used to +sense if an external web server or [mod_http_fileserver](modules.md#mod_http_fileserver) is used to serve the uploaded files. - **host** @@ -959,23 +958,23 @@ of the ejabberd server. __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/21_12/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/21_12/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/21_12/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/21_12/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/21_12/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_legacy\_auth ----------------- @@ -1005,7 +1004,7 @@ The default value is *all*. - **assume\_mam\_usage**: *true | false* This option determines how ejabberd’s stream management code (see -[mod_stream_mgmt](/archive/21_12/modules/#mod-stream-mgmt)) handles unacknowledged messages when the connection +[mod_stream_mgmt](modules.md#mod_stream_mgmt)) handles unacknowledged messages when the connection is lost. Usually, such messages are either bounced or resent. However, neither is done for messages that were stored in the user’s MAM archive if this option is set to *true*. In this case, ejabberd assumes those @@ -1013,19 +1012,19 @@ messages will be retrieved from the archive. The default value is *false*. - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/21_12/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/21_12/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/21_12/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **clear\_archive\_on\_room\_destroy**: *true | false* -Whether to destroy message archive of a room (see [mod_muc](/archive/21_12/modules/#mod-muc)) when it +Whether to destroy message archive of a room (see [mod_muc](modules.md#mod_muc)) when it gets destroyed. The default value is *true*. - **compress\_xml**: *true | false* @@ -1034,7 +1033,7 @@ custom compression algorithm. This feature works only with SQL backends. The default value is *false*. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/21_12/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **default**: *always | never | roster* @@ -1051,7 +1050,7 @@ option. Once the server received a request, that user’s messages are archived as usual. The default value is *false*. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/21_12/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. - **user\_mucsub\_from\_muc\_archive**: *true | false* When this option is disabled, for each individual subscriber a separa @@ -1102,16 +1101,16 @@ mod\_mix This module is an experimental implementation of [XEP-0369: Mediated Information eXchange (MIX)](https://xmpp.org/extensions/xep-0369.html). -MIX support was added in ejabberd 16.03 as an experimental feature, -updated in 19.02, and is not yet ready to use in production. It’s +MIX support was added in ejabberd 16.03 as an experimental feature, +updated in 19.02, and is not yet ready to use in production. It’s asserted that the MIX protocol is going to replace the MUC protocol in -the future (see [mod_muc](/archive/21_12/modules/#mod-muc)). +the future (see [mod_muc](modules.md#mod_muc)). To learn more about how to use that feature, you can refer to our tutorial: [Getting started with XEP-0369: Mediated Information eXchange (MIX) v0.1](https://docs.ejabberd.im/tutorials/mix-010/). -The module depends on [mod_mam](/archive/21_12/modules/#mod-mam). +The module depends on [mod_mam](modules.md#mod_mam). __Available options:__ @@ -1120,7 +1119,7 @@ An access rule to control MIX channels creations. The default value is *all*. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/21_12/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **host** @@ -1154,23 +1153,23 @@ channels (either on your server or on any remote servers). __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/21_12/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/21_12/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/21_12/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/21_12/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/21_12/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_mqtt --------- @@ -1191,19 +1190,19 @@ Access rules to restrict access to topics for subscribers. By default there are no restrictions. - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/21_12/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/21_12/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/21_12/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/21_12/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **match\_retained\_limit**: *pos\_integer() | infinity* @@ -1222,11 +1221,11 @@ The maximum topic depth, i.e. the number of slashes (*/*) in the topic. The default value is *8*. - **queue\_type**: *ram | file* -Same as top-level [queue_type](/archive/21_12/toplevel/#queue-type) option, but applied to this module +Same as top-level [queue_type](toplevel.md#queue_type) option, but applied to this module only. - **ram\_db\_type**: *mnesia* -Same as top-level [default_ram_db](/archive/21_12/toplevel/#default-ram-db) option, but applied to this module +Same as top-level [default_ram_db](toplevel.md#default_ram_db) option, but applied to this module only. - **session\_expiry**: *timeout()* @@ -1235,7 +1234,7 @@ When *0* is set, the session gets destroyed when the underlying client connection is closed. The default value is *5* minutes. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/21_12/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_muc -------- @@ -1360,7 +1359,7 @@ using an XMPP client with MUC capability. The *Options* are: - **logging**: *true | false* The public messages are logged using - [mod_muc_log](/archive/21_12/modules/#mod-muc-log). The default value is *false*. + [mod_muc_log](modules.md#mod_muc_log). The default value is *false*. - **mam**: *true | false* Enable message archiving. Implies mod\_mam @@ -1445,14 +1444,14 @@ is not specified, the only Jabber ID will be the hostname of the virtual host with the prefix "conference.". The keyword *@HOST@* is replaced with the real virtual host name. -
added in 21.01
+
added in 21.01
- **max\_captcha\_whitelist**: *Number* This option defines the maximum number of characters that Captcha Whitelist can have when configuring the room. The default value is *infinity*. -
added in 21.01
+
added in 21.01
- **max\_password**: *Number* This option defines the maximum number of characters that Password can @@ -1535,7 +1534,7 @@ rooms is high: this will improve server startup time and memory consumption. - **queue\_type**: *ram | file* -Same as top-level [queue_type](/archive/21_12/toplevel/#queue-type) option, but applied to this module +Same as top-level [queue_type](toplevel.md#queue_type) option, but applied to this module only. - **ram\_db\_type**: *mnesia | sql* @@ -1590,7 +1589,7 @@ This module provides commands to administer local MUC services and their MUC rooms. It also provides simple WebAdmin pages to view the existing rooms. -This module depends on [mod_muc](/archive/21_12/modules/#mod-muc). +This module depends on [mod_muc](modules.md#mod_muc). The module has no options. @@ -1630,7 +1629,7 @@ Features: - A custom link can be added on top of each page. -The module depends on [mod_muc](/archive/21_12/modules/#mod-muc). +The module depends on [mod_muc](modules.md#mod_muc). __Available options:__ @@ -1826,15 +1825,15 @@ on large MucSub services. The default value is *false*, meaning the optimisation is enabled. - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/21_12/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/21_12/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/21_12/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **store\_empty\_body**: *true | false | unless\_chat\_state* @@ -1849,7 +1848,7 @@ Whether or not to store groupchat messages. The default value is *false*. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/21_12/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. - **use\_mam\_for\_storage**: *true | false* This is an experimental option. Enabling this option will make @@ -1921,7 +1920,7 @@ or checking availability. The default value is *false*. What to do when a client does not answer to a server ping request in less than period defined in *ping\_ack\_timeout* option: *kill* means destroying the underlying connection, *none* means to do nothing. NOTE: -when [mod_stream_mgmt](/archive/21_12/modules/#mod-stream-mgmt) is loaded and stream management is enabled by a +when [mod_stream_mgmt](modules.md#mod_stream_mgmt) is loaded and stream management is enabled by a client, killing the client connection doesn’t mean killing the client session - the session will be kept alive in order to give the client a chance to resume it. The default value is *none*. @@ -1975,28 +1974,28 @@ Lists](https://xmpp.org/extensions/xep-0016.html). > Nowadays modern XMPP clients rely on [XEP-0191: Blocking > Command](https://xmpp.org/extensions/xep-0191.html) which is > implemented by *mod\_blocking* module. However, you still need -> *mod\_privacy* loaded in order for [mod_blocking](/archive/21_12/modules/#mod-blocking) to work. +> *mod\_privacy* loaded in order for [mod_blocking](modules.md#mod_blocking) to work. __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/21_12/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/21_12/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/21_12/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/21_12/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/21_12/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_private ------------ @@ -2014,23 +2013,23 @@ Bookmarks](https://xmpp.org/extensions/xep-0048.html)). __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/21_12/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/21_12/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/21_12/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/21_12/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/21_12/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_privilege -------------- @@ -2060,7 +2059,7 @@ Check the section about listening ports for more information. > **Note** > -> This module is complementary to [mod_delegation](/archive/21_12/modules/#mod-delegation), but can also be +> This module is complementary to [mod_delegation](modules.md#mod_delegation), but can also be > used separately. __Available options:__ @@ -2258,7 +2257,7 @@ Publish-Subscribe](https://xmpp.org/extensions/xep-0060.html). The functionality in *mod\_pubsub* can be extended using plugins. The plugin that implements PEP ([XEP-0163: Personal Eventing via Pubsub](https://xmpp.org/extensions/xep-0163.html)) is enabled in the -default ejabberd configuration file, and it requires [mod_caps](/archive/21_12/modules/#mod-caps). +default ejabberd configuration file, and it requires [mod_caps](modules.md#mod_caps). __Available options:__ @@ -2268,7 +2267,7 @@ using *acl* and *access*. By default any account in the local ejabberd server is allowed to create pubsub nodes. The default value is: *all*. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/21_12/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **default\_node\_config**: *List of Key:Value* @@ -2309,7 +2308,7 @@ systems with not so many nodes, caching last items speeds up pubsub and allows to raise user connection rate. The cost is memory usage, as every item is stored in memory. -
added in 21.12
+
added in 21.12
- **max\_item\_expire\_node**: *timeout() | infinity* Specify the maximum item epiry time. Default value is: *infinity*. @@ -2453,19 +2452,19 @@ platform-dependant backend services such as FCM or APNS. __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/21_12/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/21_12/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/21_12/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/21_12/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **include\_body**: *true | false | Text* @@ -2483,19 +2482,19 @@ notifications generated for incoming messages with a body. The default value is *false*. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/21_12/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_push\_keepalive -------------------- This module tries to keep the stream management session (see -[mod_stream_mgmt](/archive/21_12/modules/#mod-stream-mgmt)) of a disconnected mobile client alive if the client +[mod_stream_mgmt](modules.md#mod_stream_mgmt)) of a disconnected mobile client alive if the client enabled push notifications for that session. However, the normal session resumption timeout is restored once a push notification is issued, so the session will be closed if the client doesn’t respond to push notifications. -The module depends on [mod_push](/archive/21_12/modules/#mod-push). +The module depends on [mod_push](modules.md#mod_push). __Available options:__ @@ -2503,7 +2502,7 @@ __Available options:__ This option specifies the period of time until the session of a disconnected push client times out. This timeout is only in effect as long as no push notification is issued. Once that happened, the -resumption timeout configured for [mod_stream_mgmt](/archive/21_12/modules/#mod-stream-mgmt) is restored. The +resumption timeout configured for [mod_stream_mgmt](modules.md#mod_stream_mgmt) is restored. The default value is *72* hours. - **wake\_on\_start**: *true | false* @@ -2531,7 +2530,7 @@ enables end users to use an XMPP client to: - Delete an existing account on the server. -This module reads also the top-level [registration_timeout](/archive/21_12/toplevel/#registration-timeout) option +This module reads also the top-level [registration_timeout](toplevel.md#registration_timeout) option defined globally for the server, so please check that option documentation too. @@ -2552,7 +2551,7 @@ uncontrolled massive accounts creation by rogue users. Specify rules to restrict access for user unregistration. By default any user is able to unregister their account. -
added in 21.12
+
added in 21.12
- **allow\_modules**: *all | \[Module, ...\]* List of modules that can register accounts, or *all*. The default value @@ -2560,7 +2559,7 @@ is *all*, which is equivalent to something like *\[mod\_register, mod\_register\_web\]*. - **captcha\_protected**: *true | false* -Protect registrations with [CAPTCHA](/admin/configuration/basic/#captcha). The +Protect registrations with [CAPTCHA](../../admin/configuration/basic.md#captcha). The default is *false*. - **ip\_access**: *AccessName* @@ -2599,9 +2598,9 @@ This module provides a web page where users can: - Unregister an existing account on the server. -This module supports [CAPTCHA](/admin/configuration/basic/#captcha) to register a +This module supports [CAPTCHA](../../admin/configuration/basic.md#captcha) to register a new account. To enable this feature, configure the top-level -[captcha_cmd](/archive/21_12/toplevel/#captcha-cmd) and top-level [captcha_url](/archive/21_12/toplevel/#captcha-url) options. +[captcha_cmd](toplevel.md#captcha_cmd) and top-level [captcha_url](toplevel.md#captcha_url) options. As an example usage, the users of the host *localhost* can visit the page: *https://localhost:5280/register/* It is important to include the @@ -2609,8 +2608,8 @@ last / character in the URL, otherwise the subpages URL will be incorrect. This module is enabled in *listen* → *ejabberd\_http* → -[request\_handlers](/archive/21_12/listen-options/#request-handlers), no need -to enable in *modules*. The module depends on [mod_register](/archive/21_12/modules/#mod-register) where all +[request\_handlers](listen-options.md#request_handlers), no need +to enable in *modules*. The module depends on [mod_register](modules.md#mod_register) where all the configuration is performed. The module has no options. @@ -2645,19 +2644,19 @@ add/remove/modify contacts or send presence subscriptions. The default value is *all*, i.e. no restrictions. - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/21_12/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/21_12/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/21_12/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/21_12/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **store\_current\_id**: *true | false* @@ -2667,11 +2666,11 @@ calculated on the fly each time. Enabling this option reduces the load for both ejabberd and the database. This option does not affect the client in any way. This option is only useful if option *versioning* is set to *true*. The default value is *false*. IMPORTANT: if you use -[mod_shared_roster](/archive/21_12/modules/#mod-shared-roster) or [mod_shared_roster_ldap](/archive/21_12/modules/#mod-shared-roster-ldap), you must set the +[mod_shared_roster](modules.md#mod_shared_roster) or [mod_shared_roster_ldap](modules.md#mod_shared_roster_ldap), you must set the value of the option to *false*. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/21_12/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. - **versioning**: *true | false* Enables/disables Roster Versioning. The default value is *false*. @@ -2781,31 +2780,31 @@ parameters: group’s members. A group of other vhost can be identified with *groupid@vhost*. -This module depends on [mod_roster](/archive/21_12/modules/#mod-roster). If not enabled, roster queries +This module depends on [mod_roster](modules.md#mod_roster). If not enabled, roster queries will return 503 errors. __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/21_12/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/21_12/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/21_12/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* Define the type of storage where the module will create the tables and store user information. The default is the storage defined by the -top-level [default_db](/archive/21_12/toplevel/#default-db) option, or *mnesia* if omitted. If *sql* value +top-level [default_db](toplevel.md#default_db) option, or *mnesia* if omitted. If *sql* value is defined, make sure you have defined the database. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/21_12/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. __Examples:__ @@ -2884,26 +2883,26 @@ password in multiple places. - Connection parameters: The module also accepts the connection parameters, all of which default to the top-level parameter of the same name, if unspecified. See [LDAP - Connection](/admin/configuration/database-ldap/#ldap-connection) section for + Connection](../../admin/configuration/ldap.md#ldap_connection) section for more information about them. Check also the [Configuration -examples](/admin/configuration/database-ldap/#configuration-examples) section to +examples](../../admin/configuration/ldap.md#configuration_examples) section to get details about retrieving the roster, and configuration examples including Flat DIT and Deep DIT. __Available options:__ - **cache\_life\_time** -Same as top-level [cache_life_time](/archive/21_12/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed** -Same as top-level [cache_missed](/archive/21_12/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size** -Same as top-level [cache_size](/archive/21_12/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **ldap\_auth\_check**: *true | false* @@ -2912,24 +2911,24 @@ subsystem) for existence of each user in the shared LDAP roster. Set to *false* if you want to disable the check. Default value is *true*. - **ldap\_backups** -Same as top-level [ldap_backups](/archive/21_12/toplevel/#ldap-backups) option, but applied to this module +Same as top-level [ldap_backups](toplevel.md#ldap_backups) option, but applied to this module only. - **ldap\_base** -Same as top-level [ldap_base](/archive/21_12/toplevel/#ldap-base) option, but applied to this module only. +Same as top-level [ldap_base](toplevel.md#ldap_base) option, but applied to this module only. - **ldap\_deref\_aliases** -Same as top-level [ldap_deref_aliases](/archive/21_12/toplevel/#ldap-deref-aliases) option, but applied to this +Same as top-level [ldap_deref_aliases](toplevel.md#ldap_deref_aliases) option, but applied to this module only. - **ldap\_encrypt** -Same as top-level [ldap_encrypt](/archive/21_12/toplevel/#ldap-encrypt) option, but applied to this module +Same as top-level [ldap_encrypt](toplevel.md#ldap_encrypt) option, but applied to this module only. - **ldap\_filter** Additional filter which is AND-ed together with "User Filter" and "Group Filter". For more information check the LDAP -[Filters](/admin/configuration/database-ldap/#filters) section. +[Filters](../../admin/configuration/ldap.md#filters) section. - **ldap\_gfilter** "Group Filter", used when retrieving human-readable name (a.k.a. @@ -2966,14 +2965,14 @@ section Filters. - **ldap\_memberattr\_format\_re** A regex for extracting user ID from the value of the attribute named by *ldap\_memberattr*. Check the LDAP [Control -Parameters](/admin/configuration/database-ldap/#control-parameters) section. +Parameters](../../admin/configuration/ldap.md#control_parameters) section. - **ldap\_password** -Same as top-level [ldap_password](/archive/21_12/toplevel/#ldap-password) option, but applied to this module +Same as top-level [ldap_password](toplevel.md#ldap_password) option, but applied to this module only. - **ldap\_port** -Same as top-level [ldap_port](/archive/21_12/toplevel/#ldap-port) option, but applied to this module only. +Same as top-level [ldap_port](toplevel.md#ldap_port) option, but applied to this module only. - **ldap\_rfilter** So called "Roster Filter". Used to find names of all "shared roster" @@ -2982,37 +2981,37 @@ defaults to the top-level parameter of the same name. You must specify it in some place in the configuration, there is no default. - **ldap\_rootdn** -Same as top-level [ldap_rootdn](/archive/21_12/toplevel/#ldap-rootdn) option, but applied to this module +Same as top-level [ldap_rootdn](toplevel.md#ldap_rootdn) option, but applied to this module only. - **ldap\_servers** -Same as top-level [ldap_servers](/archive/21_12/toplevel/#ldap-servers) option, but applied to this module +Same as top-level [ldap_servers](toplevel.md#ldap_servers) option, but applied to this module only. - **ldap\_tls\_cacertfile** -Same as top-level [ldap_tls_cacertfile](/archive/21_12/toplevel/#ldap-tls-cacertfile) option, but applied to this +Same as top-level [ldap_tls_cacertfile](toplevel.md#ldap_tls_cacertfile) option, but applied to this module only. - **ldap\_tls\_certfile** -Same as top-level [ldap_tls_certfile](/archive/21_12/toplevel/#ldap-tls-certfile) option, but applied to this +Same as top-level [ldap_tls_certfile](toplevel.md#ldap_tls_certfile) option, but applied to this module only. - **ldap\_tls\_depth** -Same as top-level [ldap_tls_depth](/archive/21_12/toplevel/#ldap-tls-depth) option, but applied to this module +Same as top-level [ldap_tls_depth](toplevel.md#ldap_tls_depth) option, but applied to this module only. - **ldap\_tls\_verify** -Same as top-level [ldap_tls_verify](/archive/21_12/toplevel/#ldap-tls-verify) option, but applied to this module +Same as top-level [ldap_tls_verify](toplevel.md#ldap_tls_verify) option, but applied to this module only. - **ldap\_ufilter** "User Filter", used for retrieving the human-readable name of roster entries (usually full names of people in the roster). See also the parameters *ldap\_userdesc* and *ldap\_useruid*. For more information -check the LDAP [Filters](/admin/configuration/database-ldap/#filters) section. +check the LDAP [Filters](../../admin/configuration/ldap.md#filters) section. - **ldap\_uids** -Same as top-level [ldap_uids](/archive/21_12/toplevel/#ldap-uids) option, but applied to this module only. +Same as top-level [ldap_uids](toplevel.md#ldap_uids) option, but applied to this module only. - **ldap\_userdesc** The name of the attribute which holds the human-readable user name. @@ -3030,7 +3029,7 @@ retrieved from the *ldap\_memberattr* attribute of a group object. Retrieved from results of the "User Filter". Defaults to *cn*. - **use\_cache** -Same as top-level [use_cache](/archive/21_12/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_sic -------- @@ -3057,7 +3056,7 @@ virtual host. > > It is not enough to just load this module. You should also configure > listeners and DNS records properly. For details see the section about -> the [ejabberd\_sip](/archive/21_12/listen/#ejabberd-sip) listen module in +> the [ejabberd\_sip](listen.md#ejabberd_sip) listen module in > the ejabberd Documentation. __Available options:__ @@ -3159,11 +3158,11 @@ A time to wait for stanza acknowledgements. Setting it to *infinity* effectively disables the timeout. The default value is *1* minute. - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/21_12/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. The default value is *48 hours*. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/21_12/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **max\_ack\_queue**: *Size* @@ -3186,7 +3185,7 @@ default *resume\_timeout*. By default, it is set to the same value as the *resume\_timeout* option. - **queue\_type**: *ram | file* -Same as top-level [queue_type](/archive/21_12/toplevel/#queue-type) option, but applied to this module +Same as top-level [queue_type](toplevel.md#queue_type) option, but applied to this module only. - **resend\_on\_timeout**: *true | false | if\_offline* @@ -3215,7 +3214,7 @@ mod\_stun\_disco This module allows XMPP clients to discover STUN/TURN services and to obtain temporary credentials for using them as per [XEP-0215: External Service Discovery](https://xmpp.org/extensions/xep-0215.html). This -module is included in ejabberd since version 20.04. +module is included in ejabberd since version 20.04. __Available options:__ @@ -3352,19 +3351,19 @@ fields should return all users who added some information to their vCard. The default value is *false*. - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/21_12/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/21_12/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/21_12/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql | ldap* -Same as top-level [default_db](/archive/21_12/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **host** @@ -3394,7 +3393,7 @@ ignored and the Jabber User Directory service will not appear in the Service Discovery item list. The default value is *false*. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/21_12/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. - **vcard**: *vCard* A custom vCard of the server that will be displayed by some XMPP clients @@ -3424,33 +3423,33 @@ will be translated to: __Available options for *ldap* backend:__ - **ldap\_backups** -Same as top-level [ldap_backups](/archive/21_12/toplevel/#ldap-backups) option, but applied to this module +Same as top-level [ldap_backups](toplevel.md#ldap_backups) option, but applied to this module only. - **ldap\_base** -Same as top-level [ldap_base](/archive/21_12/toplevel/#ldap-base) option, but applied to this module only. +Same as top-level [ldap_base](toplevel.md#ldap_base) option, but applied to this module only. - **ldap\_deref\_aliases** -Same as top-level [ldap_deref_aliases](/archive/21_12/toplevel/#ldap-deref-aliases) option, but applied to this +Same as top-level [ldap_deref_aliases](toplevel.md#ldap_deref_aliases) option, but applied to this module only. - **ldap\_encrypt** -Same as top-level [ldap_encrypt](/archive/21_12/toplevel/#ldap-encrypt) option, but applied to this module +Same as top-level [ldap_encrypt](toplevel.md#ldap_encrypt) option, but applied to this module only. - **ldap\_filter** -Same as top-level [ldap_filter](/archive/21_12/toplevel/#ldap-filter) option, but applied to this module +Same as top-level [ldap_filter](toplevel.md#ldap_filter) option, but applied to this module only. - **ldap\_password** -Same as top-level [ldap_password](/archive/21_12/toplevel/#ldap-password) option, but applied to this module +Same as top-level [ldap_password](toplevel.md#ldap_password) option, but applied to this module only. - **ldap\_port** -Same as top-level [ldap_port](/archive/21_12/toplevel/#ldap-port) option, but applied to this module only. +Same as top-level [ldap_port](toplevel.md#ldap_port) option, but applied to this module only. - **ldap\_rootdn** -Same as top-level [ldap_rootdn](/archive/21_12/toplevel/#ldap-rootdn) option, but applied to this module +Same as top-level [ldap_rootdn](toplevel.md#ldap_rootdn) option, but applied to this module only. - **ldap\_search\_fields**: *{Name: Attribute, ...}* @@ -3497,27 +3496,27 @@ The default is: "Organization Unit": ORGUNIT - **ldap\_servers** -Same as top-level [ldap_servers](/archive/21_12/toplevel/#ldap-servers) option, but applied to this module +Same as top-level [ldap_servers](toplevel.md#ldap_servers) option, but applied to this module only. - **ldap\_tls\_cacertfile** -Same as top-level [ldap_tls_cacertfile](/archive/21_12/toplevel/#ldap-tls-cacertfile) option, but applied to this +Same as top-level [ldap_tls_cacertfile](toplevel.md#ldap_tls_cacertfile) option, but applied to this module only. - **ldap\_tls\_certfile** -Same as top-level [ldap_tls_certfile](/archive/21_12/toplevel/#ldap-tls-certfile) option, but applied to this +Same as top-level [ldap_tls_certfile](toplevel.md#ldap_tls_certfile) option, but applied to this module only. - **ldap\_tls\_depth** -Same as top-level [ldap_tls_depth](/archive/21_12/toplevel/#ldap-tls-depth) option, but applied to this module +Same as top-level [ldap_tls_depth](toplevel.md#ldap_tls_depth) option, but applied to this module only. - **ldap\_tls\_verify** -Same as top-level [ldap_tls_verify](/archive/21_12/toplevel/#ldap-tls-verify) option, but applied to this module +Same as top-level [ldap_tls_verify](toplevel.md#ldap_tls_verify) option, but applied to this module only. - **ldap\_uids** -Same as top-level [ldap_uids](/archive/21_12/toplevel/#ldap-uids) option, but applied to this module only. +Same as top-level [ldap_uids](toplevel.md#ldap_uids) option, but applied to this module only. - **ldap\_vcard\_map**: *{Name: {Pattern, LDAPattributes}, ...}* With this option you can set the table that maps LDAP attributes to @@ -3583,31 +3582,31 @@ that change frequently their presence. However, the overhead is significantly reduced by the use of caching, so you probably don’t want to set *use\_cache* to *false*. -The module depends on [mod_vcard](/archive/21_12/modules/#mod-vcard). +The module depends on [mod_vcard](modules.md#mod_vcard). > **Note** > > Nowadays [XEP-0153](https://xmpp.org/extensions/xep-0153.html) is used > mostly as "read-only", i.e. modern clients don’t publish their avatars > inside vCards. Thus in the majority of cases the module is only used -> along with [mod_avatar](/archive/21_12/modules/#mod-avatar) for providing backward compatibility. +> along with [mod_avatar](modules.md#mod_avatar) for providing backward compatibility. __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/21_12/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/21_12/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/21_12/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/21_12/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_version ------------ diff --git a/content/archive/21_12/toplevel.md b/content/archive/21.12/toplevel.md similarity index 83% rename from content/archive/21_12/toplevel.md rename to content/archive/21.12/toplevel.md index af8f3229..a57e1437 100644 --- a/content/archive/21_12/toplevel.md +++ b/content/archive/21.12/toplevel.md @@ -1,10 +1,9 @@ --- -title: Top-Level Options -toc: true -menu: Top-Level Opts -order: 80 +search: + exclude: true --- +# Top-Level Options ## access\_rules @@ -14,7 +13,7 @@ The option specifies access rules. Each access rule is assigned a name that can be referenced from other parts of the configuration file (mostly from *access* options of ejabberd modules). Each rule definition may contain arbitrary number of *allow* or *deny* sections, and each -section may contain any number of ACL rules (see [acl](/archive/21_12/toplevel/#acl) option). There +section may contain any number of ACL rules (see [acl](toplevel.md#acl) option). There are no access rules defined by default. **Example**: @@ -52,7 +51,7 @@ address). Every set of rules has name *ACLName*: it can be any string except *all* or *none* (those are predefined names for the rules that match all or nothing respectively). The name *ACLName* can be referenced from other parts of the configuration file, for example in -[access_rules](/archive/21_12/toplevel/#access-rules) option. The rules of *ACLName* are represented by +[access_rules](toplevel.md#access_rules) option. The rules of *ACLName* are represented by mapping *{ACLType: ACLValue}*. These can be one of the following: - **ip**: *Network* @@ -120,7 +119,7 @@ mapping *{ACLType: ACLValue}*. These can be one of the following: *Options* -[ACME](/admin/configuration/basic/#acme) configuration, to automatically obtain SSL +[ACME](../../admin/configuration/basic.md#acme) configuration, to automatically obtain SSL certificates for the domains served by ejabberd, which means that certificate requests and renewals are performed to some CA server (aka "ACME server") in a fully automated mode. The *Options* are: @@ -214,22 +213,22 @@ specific modules to certain virtual hosts. To accomplish that, *timeout()* -Same as [cache_life_time](/archive/21_12/toplevel/#cache-life-time), but applied to authentication cache only. -If not set, the value from [cache_life_time](/archive/21_12/toplevel/#cache-life-time) will be used. +Same as [cache_life_time](toplevel.md#cache_life_time), but applied to authentication cache only. +If not set, the value from [cache_life_time](toplevel.md#cache_life_time) will be used. ## auth\_cache\_missed *true | false* -Same as [cache_missed](/archive/21_12/toplevel/#cache-missed), but applied to authentication cache only. If -not set, the value from [cache_missed](/archive/21_12/toplevel/#cache-missed) will be used. +Same as [cache_missed](toplevel.md#cache_missed), but applied to authentication cache only. If +not set, the value from [cache_missed](toplevel.md#cache_missed) will be used. ## auth\_cache\_size *pos\_integer() | infinity* -Same as [cache_size](/archive/21_12/toplevel/#cache-size), but applied to authentication cache only. If not -set, the value from [cache_size](/archive/21_12/toplevel/#cache-size) will be used. +Same as [cache_size](toplevel.md#cache_size), but applied to authentication cache only. If not +set, the value from [cache_size](toplevel.md#cache_size) will be used. ## auth\_method @@ -248,7 +247,7 @@ be installed from the [ejabberd-contrib](https://github.com/processone/ejabberd-contrib) Git repository. Please refer to that module’s README file for details. -
improved in 20.01
+
improved in 20.01
## auth\_password\_format @@ -282,8 +281,8 @@ authenticate. The default value is *sha*. *true | false* -Same as [use_cache](/archive/21_12/toplevel/#use-cache), but applied to authentication cache only. If not -set, the value from [use_cache](/archive/21_12/toplevel/#use-cache) will be used. +Same as [use_cache](toplevel.md#use_cache), but applied to authentication cache only. If not +set, the value from [use_cache](toplevel.md#use_cache) will be used. ## c2s\_cafile @@ -294,11 +293,11 @@ format. All client certificates should be signed by one of these root CA certificates and should contain the corresponding JID(s) in *subjectAltName* field. There is no default value. -You can use [host\_config](/archive/21_12/toplevel/#host-config) to specify +You can use [host\_config](toplevel.md#host_config) to specify this option per-vhost. To set a specific file per listener, use the listener’s -[cafile](/archive/21_12/listen-options/#cafile) option. Please notice that +[cafile](listen-options.md#cafile) option. Please notice that *c2s\_cafile* overrides the listener’s *cafile* option. ## c2s\_ciphers @@ -357,7 +356,7 @@ Path to a file of CA root certificates. The default is to use system defined file if possible. For server connections, this *ca\_file* option is overridden by the -[s2s\_cafile](/archive/21_12/toplevel/#s2s-cafile) option. +[s2s\_cafile](toplevel.md#s2s-cafile) option. ## cache\_life\_time @@ -366,9 +365,9 @@ For server connections, this *ca\_file* option is overridden by the The time of a cached item to keep in cache. Once it’s expired, the corresponding item is erased from cache. The default value is *1 hour*. Several modules have a similar option; and some core ejabberd parts -support similar options too, see [auth_cache_life_time](/archive/21_12/toplevel/#auth-cache-life-time), -[oauth_cache_life_time](/archive/21_12/toplevel/#oauth-cache-life-time), [router_cache_life_time](/archive/21_12/toplevel/#router-cache-life-time), and -[sm_cache_life_time](/archive/21_12/toplevel/#sm-cache-life-time). +support similar options too, see [auth_cache_life_time](toplevel.md#auth_cache_life_time), +[oauth_cache_life_time](toplevel.md#oauth_cache_life_time), [router_cache_life_time](toplevel.md#router_cache_life_time), and +[sm_cache_life_time](toplevel.md#sm_cache_life_time). ## cache\_missed @@ -377,11 +376,11 @@ support similar options too, see [auth_cache_life_time](/archive/21_12/toplevel/ Whether or not to cache missed lookups. When there is an attempt to lookup for a value in a database and this value is not found and the option is set to *true*, this attempt will be cached and no attempts -will be performed until the cache expires (see [cache_life_time](/archive/21_12/toplevel/#cache-life-time)). +will be performed until the cache expires (see [cache_life_time](toplevel.md#cache_life_time)). Usually you don’t want to change it. Default is *true*. Several modules have a similar option; and some core ejabberd parts support similar -options too, see [auth_cache_missed](/archive/21_12/toplevel/#auth-cache-missed), [oauth_cache_missed](/archive/21_12/toplevel/#oauth-cache-missed), -[router_cache_missed](/archive/21_12/toplevel/#router-cache-missed), and [sm_cache_missed](/archive/21_12/toplevel/#sm-cache-missed). +options too, see [auth_cache_missed](toplevel.md#auth_cache_missed), [oauth_cache_missed](toplevel.md#oauth_cache_missed), +[router_cache_missed](toplevel.md#router_cache_missed), and [sm_cache_missed](toplevel.md#sm_cache_missed). ## cache\_size @@ -395,14 +394,14 @@ items are deleted, and the corresponding warning is logged. You should avoid frequent cache clearance, because this degrades performance. The default value is *1000*. Several modules have a similar option; and some core ejabberd parts support similar options too, see -[auth_cache_size](/archive/21_12/toplevel/#auth-cache-size), [oauth_cache_size](/archive/21_12/toplevel/#oauth-cache-size), [router_cache_size](/archive/21_12/toplevel/#router-cache-size), and -[sm_cache_size](/archive/21_12/toplevel/#sm-cache-size). +[auth_cache_size](toplevel.md#auth_cache_size), [oauth_cache_size](toplevel.md#oauth_cache_size), [router_cache_size](toplevel.md#router_cache_size), and +[sm_cache_size](toplevel.md#sm_cache_size). ## captcha\_cmd *Path* -Full path to a script that generates [CAPTCHA](/admin/configuration/basic/#captcha) +Full path to a script that generates [CAPTCHA](../../admin/configuration/basic.md#captcha) images. There is no default value: when this option is not set, CAPTCHA functionality is completely disabled. @@ -410,13 +409,13 @@ functionality is completely disabled. *String* -Deprecated. Use [captcha_url](/archive/21_12/toplevel/#captcha-url) instead. +Deprecated. Use [captcha_url](toplevel.md#captcha_url) instead. ## captcha\_limit *pos\_integer() | infinity* -Maximum number of [CAPTCHA](/admin/configuration/basic/#captcha) generated images +Maximum number of [CAPTCHA](../../admin/configuration/basic.md#captcha) generated images per minute for any given JID. The option is intended to protect the server from CAPTCHA DoS. The default value is *infinity*. @@ -424,7 +423,7 @@ server from CAPTCHA DoS. The default value is *infinity*. *URL* -An URL where [CAPTCHA](/admin/configuration/basic/#captcha) requests should be +An URL where [CAPTCHA](../../admin/configuration/basic.md#captcha) requests should be sent. NOTE: you need to configure *request\_handlers* for *ejabberd\_http* listener as well. There is no default value. @@ -699,7 +698,7 @@ attribute, the specified language is used. The default value is *"en"*. *\[Host, ...\]* A list of IP addresses or DNS names of LDAP backup servers. When no -servers listed in [ldap_servers](/archive/21_12/toplevel/#ldap-servers) option are reachable, ejabberd will +servers listed in [ldap_servers](toplevel.md#ldap_servers) option are reachable, ejabberd will try to connect to these backup servers. The default is an empty list, i.e. no backup servers specified. WARNING: ejabberd doesn’t try to reconnect back to the main servers when they become operational again, @@ -734,7 +733,7 @@ variables are consecutively replaced by values from the attributes in *FilterAttrs* and "%D" is replaced by Distinguished Name from the result set. There is no default value, which means the result is not filtered. WARNING: Since this filter makes additional LDAP lookups, use it only as -the last resort: try to define all filter rules in [ldap_filter](/archive/21_12/toplevel/#ldap-filter) +the last resort: try to define all filter rules in [ldap_filter](toplevel.md#ldap_filter) option if possible. **Example**: @@ -841,7 +840,7 @@ JID. For example, "%.org". If the value is in the form of *\[Options, ...\]* The option for listeners configuration. See the [Listen -Modules](/archive/21_12/listen/) section for details. +Modules](./listen.md/) section for details. ## log\_rotate\_count @@ -885,7 +884,7 @@ value is *10000*. *{Module: Options}* -The option for modules configuration. See [Modules](/archive/21_12/modules/) +The option for modules configuration. See [Modules](./modules.md/) section for details. ## negotiation\_timeout @@ -934,17 +933,17 @@ can create OAuth tokens, you can refer to an ejabberd access rule in the *timeout()* -Same as [cache_life_time](/archive/21_12/toplevel/#cache-life-time), but applied to OAuth cache only. If not -set, the value from [cache_life_time](/archive/21_12/toplevel/#cache-life-time) will be used. +Same as [cache_life_time](toplevel.md#cache_life_time), but applied to OAuth cache only. If not +set, the value from [cache_life_time](toplevel.md#cache_life_time) will be used. ## oauth\_cache\_missed *true | false* -Same as [cache_missed](/archive/21_12/toplevel/#cache-missed), but applied to OAuth cache only. If not set, -the value from [cache_missed](/archive/21_12/toplevel/#cache-missed) will be used. +Same as [cache_missed](toplevel.md#cache_missed), but applied to OAuth cache only. If not set, +the value from [cache_missed](toplevel.md#cache_missed) will be used. -
added in 21.01
+
added in 21.01
## oauth\_cache\_rest\_failure\_life\_time @@ -957,8 +956,8 @@ The time that a failure in OAuth ReST is cached. The default value is *pos\_integer() | infinity* -Same as [cache_size](/archive/21_12/toplevel/#cache-size), but applied to OAuth cache only. If not set, the -value from [cache_size](/archive/21_12/toplevel/#cache-size) will be used. +Same as [cache_size](toplevel.md#cache_size), but applied to OAuth cache only. If not set, the +value from [cache_size](toplevel.md#cache_size) will be used. ## oauth\_client\_id\_check @@ -973,7 +972,7 @@ value is *allow*. *mnesia | sql* Database backend to use for OAuth authentication. The default value is -picked from [default_db](/archive/21_12/toplevel/#default-db) option, or if it’s not set, *mnesia* will be +picked from [default_db](toplevel.md#default_db) option, or if it’s not set, *mnesia* will be used. ## oauth\_expire @@ -988,15 +987,15 @@ used and is removed from the database. The default is *4294967* seconds. *true | false* -Same as [use_cache](/archive/21_12/toplevel/#use-cache), but applied to OAuth cache only. If not set, the -value from [use_cache](/archive/21_12/toplevel/#use-cache) will be used. +Same as [use_cache](toplevel.md#use_cache), but applied to OAuth cache only. If not set, the +value from [use_cache](toplevel.md#use_cache) will be used. ## oom\_killer *true | false* Enable or disable OOM (out-of-memory) killer. When system memory raises -above the limit defined in [oom_watermark](/archive/21_12/toplevel/#oom-watermark) option, ejabberd triggers +above the limit defined in [oom_watermark](toplevel.md#oom_watermark) option, ejabberd triggers OOM killer to terminate most memory consuming Erlang processes. Note that in order to maintain functionality, ejabberd only attempts to kill transient processes, such as those managing client sessions, s2s or @@ -1008,7 +1007,7 @@ database connections. The default value is *true*. Trigger OOM killer when some of the running Erlang processes have messages queue above this *Size*. Note that such processes won’t be -killed if [oom_killer](/archive/21_12/toplevel/#oom-killer) option is set to *false* or if *oom\_watermark* +killed if [oom_killer](toplevel.md#oom_killer) option is set to *false* or if *oom\_watermark* is not reached yet. ## oom\_watermark @@ -1017,7 +1016,7 @@ is not reached yet. A percent of total system memory consumed at which OOM killer should be activated with some of the processes possibly be killed (see -[oom_killer](/archive/21_12/toplevel/#oom-killer) option). Later, when memory drops below this *Percent*, +[oom_killer](toplevel.md#oom_killer) option). Later, when memory drops below this *Percent*, OOM killer is deactivated. The default value is *80* percents. ## outgoing\_s2s\_families @@ -1028,7 +1027,7 @@ Specify which address families to try, in what order. The default is *\[ipv4, ipv6\]* which means it first tries connecting with IPv4, if that fails it tries using IPv6. -
added in 20.12
+
added in 20.12
## outgoing\_s2s\_ipv4\_address @@ -1038,7 +1037,7 @@ Specify the IPv4 address that will be used when establishing an outgoing S2S IPv4 connection, for example "127.0.0.1". The default value is *undefined*. -
added in 20.12
+
added in 20.12
## outgoing\_s2s\_ipv6\_address @@ -1089,7 +1088,7 @@ default value is *false*. *Directory* -If [queue_type](/archive/21_12/toplevel/#queue-type) option is set to *file*, use this *Directory* to store +If [queue_type](toplevel.md#queue_type) option is set to *file*, use this *Directory* to store file queues. The default is to keep queues inside Mnesia directory. ## queue\_type @@ -1098,7 +1097,7 @@ file queues. The default is to keep queues inside Mnesia directory. Default type of queues in ejabberd. Modules may have its own value of the option. The value of *ram* means that queues will be kept in memory. -If value *file* is set, you may also specify directory in [queue_dir](/archive/21_12/toplevel/#queue-dir) +If value *file* is set, you may also specify directory in [queue_dir](toplevel.md#queue_dir) option where file queues will be placed. The default value is *ram*. ## redis\_connect\_timeout @@ -1140,8 +1139,8 @@ The port where the Redis server is accepting connections. The default is *ram | file* The type of request queue for the Redis server. See description of -[queue_type](/archive/21_12/toplevel/#queue-type) option for the explanation. The default value is the -value defined in [queue_type](/archive/21_12/toplevel/#queue-type) or *ram* if the latter is not set. +[queue_type](toplevel.md#queue_type) option for the explanation. The default value is the +value defined in [queue_type](toplevel.md#queue_type) or *ram* if the latter is not set. ## redis\_server @@ -1154,7 +1153,7 @@ A hostname or an IP address of the Redis server. The default is *timeout()* -This is a global option for module [mod_register](/archive/21_12/modules/#mod-register). It limits the +This is a global option for module [mod_register](modules.md#mod_register). It limits the frequency of registrations from a given IP or username. So, a user that tries to register a new account from the same IP address or JID during this time after their previous registration will receive an error with @@ -1177,37 +1176,37 @@ action performed is *closeold*. *timeout()* -Same as [cache_life_time](/archive/21_12/toplevel/#cache-life-time), but applied to routing table cache only. If -not set, the value from [cache_life_time](/archive/21_12/toplevel/#cache-life-time) will be used. +Same as [cache_life_time](toplevel.md#cache_life_time), but applied to routing table cache only. If +not set, the value from [cache_life_time](toplevel.md#cache_life_time) will be used. ## router\_cache\_missed *true | false* -Same as [cache_missed](/archive/21_12/toplevel/#cache-missed), but applied to routing table cache only. If -not set, the value from [cache_missed](/archive/21_12/toplevel/#cache-missed) will be used. +Same as [cache_missed](toplevel.md#cache_missed), but applied to routing table cache only. If +not set, the value from [cache_missed](toplevel.md#cache_missed) will be used. ## router\_cache\_size *pos\_integer() | infinity* -Same as [cache_size](/archive/21_12/toplevel/#cache-size), but applied to routing table cache only. If not -set, the value from [cache_size](/archive/21_12/toplevel/#cache-size) will be used. +Same as [cache_size](toplevel.md#cache_size), but applied to routing table cache only. If not +set, the value from [cache_size](toplevel.md#cache_size) will be used. ## router\_db\_type *mnesia | redis | sql* Database backend to use for routing information. The default value is -picked from [default_ram_db](/archive/21_12/toplevel/#default-ram-db) option, or if it’s not set, *mnesia* will +picked from [default_ram_db](toplevel.md#default_ram_db) option, or if it’s not set, *mnesia* will be used. ## router\_use\_cache *true | false* -Same as [use_cache](/archive/21_12/toplevel/#use-cache), but applied to routing table cache only. If not -set, the value from [use_cache](/archive/21_12/toplevel/#use-cache) will be used. +Same as [use_cache](toplevel.md#use_cache), but applied to routing table cache only. If not +set, the value from [use_cache](toplevel.md#use_cache) will be used. ## rpc\_timeout @@ -1230,9 +1229,9 @@ value is *all* which means no restrictions are applied. A path to a file with CA root certificates that will be used to authenticate s2s connections. If not set, the value of -[ca\_file](/archive/21_12/toplevel/#ca-file) will be used. +[ca\_file](toplevel.md#ca_file) will be used. -You can use [host\_config](/archive/21_12/toplevel/#host-config) to specify +You can use [host\_config](toplevel.md#host_config) to specify this option per-vhost. ## s2s\_ciphers @@ -1300,9 +1299,9 @@ below: *ram | file* -The type of a queue for s2s packets. See description of [queue_type](/archive/21_12/toplevel/#queue-type) +The type of a queue for s2s packets. See description of [queue_type](toplevel.md#queue_type) option for the explanation. The default value is the value defined in -[queue_type](/archive/21_12/toplevel/#queue-type) or *ram* if the latter is not set. +[queue_type](toplevel.md#queue_type) or *ram* if the latter is not set. ## s2s\_timeout @@ -1343,7 +1342,7 @@ considered insecure. The option defines a set of shapers. Every shaper is assigned a name *ShaperName* that can be used in other parts of the configuration file, -such as [shaper_rules](/archive/21_12/toplevel/#shaper-rules) option. The shaper itself is defined by its +such as [shaper_rules](toplevel.md#shaper_rules) option. The shaper itself is defined by its *Rate*, where *Rate* stands for the maximum allowed incoming rate in **bytes** per second. When a connection exceeds this limit, ejabberd stops reading from the socket until the average rate is again below the @@ -1362,9 +1361,9 @@ speed to 1,000 bytes/sec and shaper *fast* limits the traffic speed to *{ShaperRuleName: {Number|ShaperName: ACLRule|ACLName}}* An entry allowing to declaring shaper to use for matching user/hosts. -Semantics is similar to [access_rules](/archive/21_12/toplevel/#access-rules) option, the only difference is +Semantics is similar to [access_rules](toplevel.md#access_rules) option, the only difference is that instead using *allow* or *deny*, a name of a shaper (defined in -[shaper](/archive/21_12/toplevel/#shaper) option) or a positive number should be used. +[shaper](toplevel.md#shaper) option) or a positive number should be used. **Example**: @@ -1384,37 +1383,37 @@ that instead using *allow* or *deny*, a name of a shaper (defined in *timeout()* -Same as [cache_life_time](/archive/21_12/toplevel/#cache-life-time), but applied to client sessions table cache -only. If not set, the value from [cache_life_time](/archive/21_12/toplevel/#cache-life-time) will be used. +Same as [cache_life_time](toplevel.md#cache_life_time), but applied to client sessions table cache +only. If not set, the value from [cache_life_time](toplevel.md#cache_life_time) will be used. ## sm\_cache\_missed *true | false* -Same as [cache_missed](/archive/21_12/toplevel/#cache-missed), but applied to client sessions table cache -only. If not set, the value from [cache_missed](/archive/21_12/toplevel/#cache-missed) will be used. +Same as [cache_missed](toplevel.md#cache_missed), but applied to client sessions table cache +only. If not set, the value from [cache_missed](toplevel.md#cache_missed) will be used. ## sm\_cache\_size *pos\_integer() | infinity* -Same as [cache_size](/archive/21_12/toplevel/#cache-size), but applied to client sessions table cache only. -If not set, the value from [cache_size](/archive/21_12/toplevel/#cache-size) will be used. +Same as [cache_size](toplevel.md#cache_size), but applied to client sessions table cache only. +If not set, the value from [cache_size](toplevel.md#cache_size) will be used. ## sm\_db\_type *mnesia | redis | sql* Database backend to use for client sessions information. The default -value is picked from [default_ram_db](/archive/21_12/toplevel/#default-ram-db) option, or if it’s not set, +value is picked from [default_ram_db](toplevel.md#default_ram_db) option, or if it’s not set, *mnesia* will be used. ## sm\_use\_cache *true | false* -Same as [use_cache](/archive/21_12/toplevel/#use-cache), but applied to client sessions table cache only. -If not set, the value from [use_cache](/archive/21_12/toplevel/#use-cache) will be used. +Same as [use_cache](toplevel.md#use_cache), but applied to client sessions table cache only. +If not set, the value from [use_cache](toplevel.md#use_cache) will be used. ## sql\_connect\_timeout @@ -1438,14 +1437,14 @@ An interval to make a dummy SQL request to keep alive the connections to the database. There is no default value, so no keepalive requests are made. -
added in 20.12
+
added in 20.12
## sql\_odbc\_driver *Path* Path to the ODBC driver to use to connect to a Microsoft SQL Server -database. This option is only valid if the [sql_type](/archive/21_12/toplevel/#sql-type) option is set to +database. This option is only valid if the [sql_type](toplevel.md#sql_type) option is set to *mssql*. The default value is: *libtdsodbc.so* ## sql\_password @@ -1471,7 +1470,7 @@ The port where the SQL server is accepting connections. The default is *3306* for MySQL, *5432* for PostgreSQL and *1433* for MS SQL. The option has no effect for SQLite. -
added in 20.01
+
added in 20.01
## sql\_prepared\_statements @@ -1492,8 +1491,8 @@ seconds. *ram | file* The type of a request queue for the SQL server. See description of -[queue_type](/archive/21_12/toplevel/#queue-type) option for the explanation. The default value is the -value defined in [queue_type](/archive/21_12/toplevel/#queue-type) or *ram* if the latter is not set. +[queue_type](toplevel.md#queue_type) option for the explanation. The default value is the +value defined in [queue_type](toplevel.md#queue_type) or *ram* if the latter is not set. ## sql\_server @@ -1502,7 +1501,7 @@ value defined in [queue_type](/archive/21_12/toplevel/#queue-type) or *ram* if t A hostname or an IP address of the SQL server. The default value is *localhost*. -
improved in 20.03
+
improved in 20.03
## sql\_ssl @@ -1517,7 +1516,7 @@ is only available for MySQL and PostgreSQL. The default value is *Path* A path to a file with CA root certificates that will be used to verify -SQL connections. Implies [sql_ssl](/archive/21_12/toplevel/#sql-ssl) and [sql_ssl_verify](/archive/21_12/toplevel/#sql-ssl-verify) options are +SQL connections. Implies [sql_ssl](toplevel.md#sql_ssl) and [sql_ssl_verify](toplevel.md#sql_ssl_verify) options are set to *true*. There is no default which means certificate verification is disabled. @@ -1526,7 +1525,7 @@ is disabled. *Path* A path to a certificate file that will be used for SSL connections to -the SQL server. Implies [sql_ssl](/archive/21_12/toplevel/#sql-ssl) option is set to *true*. There is no +the SQL server. Implies [sql_ssl](toplevel.md#sql_ssl) option is set to *true*. There is no default which means ejabberd won’t provide a client certificate to the SQL server. @@ -1535,7 +1534,7 @@ SQL server. *true | false* Whether to verify SSL connection to the SQL server against CA root -certificates defined in [sql_ssl_cafile](/archive/21_12/toplevel/#sql-ssl-cafile) option. Implies [sql_ssl](/archive/21_12/toplevel/#sql-ssl) +certificates defined in [sql_ssl_cafile](toplevel.md#sql_ssl_cafile) option. Implies [sql_ssl](toplevel.md#sql_ssl) option is set to *true*. The default value is *false*. ## sql\_start\_interval @@ -1577,8 +1576,8 @@ trusted for security rules in ejabberd. Enable or disable cache. The default is *true*. Several modules have a similar option; and some core ejabberd parts support similar options -too, see [auth_use_cache](/archive/21_12/toplevel/#auth-use-cache), [oauth_use_cache](/archive/21_12/toplevel/#oauth-use-cache), [router_use_cache](/archive/21_12/toplevel/#router-use-cache), -and [sm_use_cache](/archive/21_12/toplevel/#sm-use-cache). +too, see [auth_use_cache](toplevel.md#auth_use_cache), [oauth_use_cache](toplevel.md#oauth_use_cache), [router_use_cache](toplevel.md#router_use_cache), +and [sm_use_cache](toplevel.md#sm_use_cache). ## validate\_stream @@ -1596,7 +1595,7 @@ value is *false*. *string()* The option can be used to set custom ejabberd version, that will be used -by different parts of ejabberd, for example by [mod_version](/archive/21_12/modules/#mod-version) module. +by different parts of ejabberd, for example by [mod_version](modules.md#mod_version) module. The default value is obtained at compile time from the underlying version control system. diff --git a/content/admin/upgrade/from_21.07_to_21.12.md b/content/archive/21.12/upgrade.md similarity index 82% rename from content/admin/upgrade/from_21.07_to_21.12.md rename to content/archive/21.12/upgrade.md index a0631a2a..5a971848 100644 --- a/content/admin/upgrade/from_21.07_to_21.12.md +++ b/content/archive/21.12/upgrade.md @@ -1,14 +1,11 @@ ---- -title: Upgrade to ejabberd 21.12 -toc: true ---- +# Upgrade to ejabberd 21.12 ## PostgreSQL new schema If you migrated your PostgreSQL database from old to new schema using previous ejabberd versions, your database may be missing the migration steps for the `push_session` table. You can update it now with: -```sql +``` sql ALTER TABLE push_session ADD COLUMN server_host text NOT NULL DEFAULT ''; DROP INDEX i_push_usn; DROP INDEX i_push_ut; @@ -19,14 +16,14 @@ CREATE UNIQUE INDEX i_push_session_susn ON push_session USING btree (server_host In the PostgreSQL new schema, the primary key for the `vcard_search` table was wrong. How to update an existing database: -```sql +``` sql ALTER TABLE vcard_search DROP CONSTRAINT vcard_search_pkey; ALTER TABLE vcard_search ADD PRIMARY KEY (server_host, lusername); ``` ## mod_register_web restrictions -[mod_register_web](/admin/configuration/modules/#mod-register-web) +[mod_register_web](../../admin/configuration/modules.md#mod_register_web) is now affected by the restrictions that you configure in -[mod_register](/admin/configuration/modules/#mod-register). +[mod_register](../../admin/configuration/modules.md#mod_register). diff --git a/content/archive/21_01/sql-schema.md b/content/archive/21_01/sql-schema.md deleted file mode 100644 index a355ffec..00000000 --- a/content/archive/21_01/sql-schema.md +++ /dev/null @@ -1,310 +0,0 @@ ---- -title: ejabberd SQL Database Schema -toc: true -menu: SQL Schema ---- - - -We present the tables that might be in use, depending on your server configuration, together with a short explanation of the fields involved and their intended use. Tables are presented roughly grouped by related functionality. - -Consider this document a work in progress, not all tables are documented yet. - -Latest version of database schema are available in [ejabberd Github repository](https://github.com/processone/ejabberd): - -* [MySQL schema](https://github.com/processone/ejabberd/blob/master/sql/mysql.sql) -* [Postgres schema](https://github.com/processone/ejabberd/blob/master/sql/pg.sql) -* [SQLite schema](https://github.com/processone/ejabberd/blob/master/sql/lite.sql) -* [MS SQL Server schema](https://github.com/processone/ejabberd/blob/master/sql/mssql.sql). This - schema need testing / feedback and possibly improvement from SQL - Server users. - -# Authentication - -## Table `users` - -Contains the information required to authenticate users. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| password | string | User password, can be hashed | -| created_at | timestamp | When the user account was created | - - -The password are hashed if you use SCRAM authentication. In that case the next fields are also defined - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| serverkey | string | support for salted passwords | -| salt | string | support for salted passwords | -| iterationcount | integer | support for salted passwords | - - -# Rosters - -## Table `rosterusers` - -This is a quite complex table, used as a store for a quite complex protocol that is the one defined to manage -rosters and subscriptions on [rfc6121](https://tools.ietf.org/html/rfc6121). - -In the common case of two users adding each other as contacts, entries in the roster table follows a series of steps - as they moves from a subscription request to the final approval and bi-directional subscription being established. -This process can be initiated either by the user, or by the (possible remote) peer. Also need to account for the case -where the user, or the contact, might not be online at the moment of the subscription request is made. - -Steps are further complicated by the fact that entries in the roster aren't required to have corresponding subscriptions. -For details of the meaning of the different fields, refer to [the protocol itself](https://tools.ietf.org/html/rfc6121#section-2), as these are mostly a direct mapping of it. - -Note: -If you manage users contacts from outside the roster workflow of XMPP (for example your site backends perform the linking between -users), it is likely that you only need to care about the username, jid and nick fields, and set the subscription field to be always -'B' for a mutual link between users. - - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| jid | string | Contact jid | -| nick | string | Contact nickname | -| subscription | char | 'B'=both | 'T'=To | 'F'=From | 'N'=none | -| ask | char | 'S'=subscribe | 'U'=unsubscribe | B='both' | 'O'=out | 'I'=in | 'N'=none | -| askmessage | string | Message to be displayed on the subscription request | -| server | char | 'N' for normal users contacts | -| subscribe | string | | -| type | string | "item" | -| created_at | timestamp | Creation date of this roster entry | - - - - -## Table `rostergroups` - -## Table `sr_group` - -## Table `sr_user` - - - -# Messages - -## Table `spool` -Messages sent to users that are offline are stored in this table. -Do not confuse this with general message archiving: messages are only temporarily stored in this table, removed as soon as the target user -is back online and the pending messages delivered to it. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| xml | blob | Raw packet | -| seq | integer | Unique, autoincrement sequence number. | -| created_at | timestamp | When the message was stored | - -The seq field is used for sorting, and to easily identify a particular user message. - - -## Table `privacy_list_data` - -The table is used to store privacy rules. - -The table is a direct translation of the XMPP packet used to set -privacy lists. For more details, please read -[XEP-0016: Privacy Lists, Syntax and Semantics](https://xmpp.org/extensions/xep-0016.html#protocol-syntax). Here -is an example packet coming from privacy list specification: - - - - [] - [] - [] - [] - - -The table fields are defined as follow: - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| id | int | Privacy list rule id. | -| t | char | Privacy rule type: 'j' for jid, 'g' for group and 's' for subscription. | -| value | string | Privacy list value for match, whose content depends on privacy list rule type. | -| action | char | Privacy list action: 'd' for deny and 'a' for allow. | -| ord | int | Order for applying the privacy list rule. | -| match\_all | boolean (0 or 1) | If true (1), means any packet types will be matched. Other matches should be false (0). | -| match\_iq | boolean (0 or 1) | If true (1), means iq packets will be matched by rule. | -| match\_message | boolean (0 or 1) | If true (1), means message packets type will be matched by rule. | -| match\_presence\_in | boolean (0 or 1) | If true (1), means inbound presence packets type will be matched by rule. | -| match\_presence\_out | boolean (0 or 1) | If true (1), means outbound packets type will be matched by rule. | - - - -# Multiuser Chat Rooms - -## Table `muc_room` -It is used to store *persistent* rooms, that is, rooms that must be automatically started with the server. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| name | string | Room name | -| host | string | Hostname of the conference component | -| opts | string | Room options, encoded as erlang terms | -| created_at | timestamp | Creation date | - -The opts field is legible, but not mean to be modified directly. It contents depends on the implementation of mod_muc. -It contains the room configuration and affiliations. - - -## Table `muc_registered` -Contains a map of user to nicknames. When a user register a nickname with the conference module, that nick is reserved and can't be used by -anyone else, in any room from that conference host. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| jid | string | User jid | -| host | string | Hostname of the conference component | -| nick | string | Room options, encoded as erlang terms | -| created_at | timestamp | Creation date | - - -## Table `room_history` -In ejabberd Business Edition, -this table is used if persistent room history is enabled. If so, recent room history is saved to the DB before ejabberd is stopped, -allowing the recent history to survive server restarts. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| room | string | Room jid | -| nick | string | Nickname that sent the message | -| packet | string | XML stanza with the message | -| have_subject | boolean | True if the message stanza had subject | -| created_at | timestamp | Creation date | -| size | integer | Size in bytes of the xml packet | - -## Table `muc_online_room` -This table is used to store rooms that actually exists in the memory of the server. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| name | string | Room name | -| host | string | Hostname of the conference component | -| node | string | Erlang node where the room is | -| pid | string | Pid of the thread running the room | - -## Table `muc_online_users` -This table is used to store MucSub subscriptions. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User -| server | string | Hostname of the user | -| resource | string | User resource | -| name | string | Name of the room | -| host | string | Hostname of the conference component | -| node | string | Erlang node | - -## Table `muc_room_subscribers` -This table is used to store MucSub subscriptions. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| room | string | Room name | -| host | string | Hostname of the conference component | -| jid | string | User jid | -| nick | string | User nick | -| nodes | string | MucSub nodes | -| created_at | timestamp | Creation date | - - -# VCard - -## Table `vcard` - -The table is used to store raw vCard content for delivery of the vCard -"as is". - -The table fields are defined as follow: - -| Field | Type | Usage | -| -------------------- | ---------------- | -------------------- | -| username | string | Owner of the Vcard | -| vcard | text | Raw Vcard | -| created_at | timestamp | Record creation date | - -## Table `vcard_search` - -The table is used to store vCard index on a few of the Vcard field -used for vCard search in users directory. - -You can learn more about the vCard specification on Wikipedia -[vCard](https://en.wikipedia.org/wiki/VCard) page. - -The table fields are defined as follow: - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------- | -| username | string | Raw username for display | -| lusername | string | Lowercase username for search | -| fn | string | Raw fullname for display | -| lfn | string | Lowercase fullname for search | -| family | string | Raw family name for display | -| lfamilly | string | Lowercase family name for search | -| given | string | Raw given name for display | -| lgiven | string | Lowercase given name for search | -| middle | string | Raw middle name for display | -| lmiddle | string | Lowercase middle name for search | -| nickname | string | Raw nickname for display | -| lnickname | string | Lowercase nickname for search | -| bday | string | Raw birthday for display | -| lbday | string | Lowercase and processed birthday for search | -| ctry | string | Raw country for display | -| lctry | string | Lowercase country for search | -| locality | string | Raw city for display | -| llocality | string | Lowercase city for search | -| email | string | Raw email for display | -| lemail | string | Lowercase email for search | -| orgname | string | Raw organisation name for display | -| lorgname | string | Lowercase organisation name for search | -| orgunit | string | Raw organisation department name for display | -| lorgunit | string | Lowercase organisation department for search | - -# Others - -## Table `last` -This table is used to store the last time the user was seen online. -It is defined as follow: - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| seconds | string | Timestamp for the last time the user was seen online | -| state | string | Why user got disconnected. Usually is empty | - -Note that the table is *not* updated while the user has the session open. - - - -## Table `caps_features` -Ejabberd uses this table to keep a list of the entity capabilities discovered. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| node | string | Node | -| subnode | string | Subnode | -| feature | string | Entity feature | -| created_at | timestamp | Creation date | - -The subnode field correspond to the 'ver' ("verification string") of XEP-0115. -There is one entry in this table for each feature advertised by the given (node,subnode) pair. - -## Table `private_storage` -Used for user private data storage. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| namespace | string | XEP-0049 namespace of the stored data | -| data | string | Raw xml | -| created_at | timestamp | Creation date | - diff --git a/content/archive/21_04/sql-schema.md b/content/archive/21_04/sql-schema.md deleted file mode 100644 index a355ffec..00000000 --- a/content/archive/21_04/sql-schema.md +++ /dev/null @@ -1,310 +0,0 @@ ---- -title: ejabberd SQL Database Schema -toc: true -menu: SQL Schema ---- - - -We present the tables that might be in use, depending on your server configuration, together with a short explanation of the fields involved and their intended use. Tables are presented roughly grouped by related functionality. - -Consider this document a work in progress, not all tables are documented yet. - -Latest version of database schema are available in [ejabberd Github repository](https://github.com/processone/ejabberd): - -* [MySQL schema](https://github.com/processone/ejabberd/blob/master/sql/mysql.sql) -* [Postgres schema](https://github.com/processone/ejabberd/blob/master/sql/pg.sql) -* [SQLite schema](https://github.com/processone/ejabberd/blob/master/sql/lite.sql) -* [MS SQL Server schema](https://github.com/processone/ejabberd/blob/master/sql/mssql.sql). This - schema need testing / feedback and possibly improvement from SQL - Server users. - -# Authentication - -## Table `users` - -Contains the information required to authenticate users. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| password | string | User password, can be hashed | -| created_at | timestamp | When the user account was created | - - -The password are hashed if you use SCRAM authentication. In that case the next fields are also defined - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| serverkey | string | support for salted passwords | -| salt | string | support for salted passwords | -| iterationcount | integer | support for salted passwords | - - -# Rosters - -## Table `rosterusers` - -This is a quite complex table, used as a store for a quite complex protocol that is the one defined to manage -rosters and subscriptions on [rfc6121](https://tools.ietf.org/html/rfc6121). - -In the common case of two users adding each other as contacts, entries in the roster table follows a series of steps - as they moves from a subscription request to the final approval and bi-directional subscription being established. -This process can be initiated either by the user, or by the (possible remote) peer. Also need to account for the case -where the user, or the contact, might not be online at the moment of the subscription request is made. - -Steps are further complicated by the fact that entries in the roster aren't required to have corresponding subscriptions. -For details of the meaning of the different fields, refer to [the protocol itself](https://tools.ietf.org/html/rfc6121#section-2), as these are mostly a direct mapping of it. - -Note: -If you manage users contacts from outside the roster workflow of XMPP (for example your site backends perform the linking between -users), it is likely that you only need to care about the username, jid and nick fields, and set the subscription field to be always -'B' for a mutual link between users. - - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| jid | string | Contact jid | -| nick | string | Contact nickname | -| subscription | char | 'B'=both | 'T'=To | 'F'=From | 'N'=none | -| ask | char | 'S'=subscribe | 'U'=unsubscribe | B='both' | 'O'=out | 'I'=in | 'N'=none | -| askmessage | string | Message to be displayed on the subscription request | -| server | char | 'N' for normal users contacts | -| subscribe | string | | -| type | string | "item" | -| created_at | timestamp | Creation date of this roster entry | - - - - -## Table `rostergroups` - -## Table `sr_group` - -## Table `sr_user` - - - -# Messages - -## Table `spool` -Messages sent to users that are offline are stored in this table. -Do not confuse this with general message archiving: messages are only temporarily stored in this table, removed as soon as the target user -is back online and the pending messages delivered to it. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| xml | blob | Raw packet | -| seq | integer | Unique, autoincrement sequence number. | -| created_at | timestamp | When the message was stored | - -The seq field is used for sorting, and to easily identify a particular user message. - - -## Table `privacy_list_data` - -The table is used to store privacy rules. - -The table is a direct translation of the XMPP packet used to set -privacy lists. For more details, please read -[XEP-0016: Privacy Lists, Syntax and Semantics](https://xmpp.org/extensions/xep-0016.html#protocol-syntax). Here -is an example packet coming from privacy list specification: - - - - [] - [] - [] - [] - - -The table fields are defined as follow: - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| id | int | Privacy list rule id. | -| t | char | Privacy rule type: 'j' for jid, 'g' for group and 's' for subscription. | -| value | string | Privacy list value for match, whose content depends on privacy list rule type. | -| action | char | Privacy list action: 'd' for deny and 'a' for allow. | -| ord | int | Order for applying the privacy list rule. | -| match\_all | boolean (0 or 1) | If true (1), means any packet types will be matched. Other matches should be false (0). | -| match\_iq | boolean (0 or 1) | If true (1), means iq packets will be matched by rule. | -| match\_message | boolean (0 or 1) | If true (1), means message packets type will be matched by rule. | -| match\_presence\_in | boolean (0 or 1) | If true (1), means inbound presence packets type will be matched by rule. | -| match\_presence\_out | boolean (0 or 1) | If true (1), means outbound packets type will be matched by rule. | - - - -# Multiuser Chat Rooms - -## Table `muc_room` -It is used to store *persistent* rooms, that is, rooms that must be automatically started with the server. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| name | string | Room name | -| host | string | Hostname of the conference component | -| opts | string | Room options, encoded as erlang terms | -| created_at | timestamp | Creation date | - -The opts field is legible, but not mean to be modified directly. It contents depends on the implementation of mod_muc. -It contains the room configuration and affiliations. - - -## Table `muc_registered` -Contains a map of user to nicknames. When a user register a nickname with the conference module, that nick is reserved and can't be used by -anyone else, in any room from that conference host. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| jid | string | User jid | -| host | string | Hostname of the conference component | -| nick | string | Room options, encoded as erlang terms | -| created_at | timestamp | Creation date | - - -## Table `room_history` -In ejabberd Business Edition, -this table is used if persistent room history is enabled. If so, recent room history is saved to the DB before ejabberd is stopped, -allowing the recent history to survive server restarts. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| room | string | Room jid | -| nick | string | Nickname that sent the message | -| packet | string | XML stanza with the message | -| have_subject | boolean | True if the message stanza had subject | -| created_at | timestamp | Creation date | -| size | integer | Size in bytes of the xml packet | - -## Table `muc_online_room` -This table is used to store rooms that actually exists in the memory of the server. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| name | string | Room name | -| host | string | Hostname of the conference component | -| node | string | Erlang node where the room is | -| pid | string | Pid of the thread running the room | - -## Table `muc_online_users` -This table is used to store MucSub subscriptions. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User -| server | string | Hostname of the user | -| resource | string | User resource | -| name | string | Name of the room | -| host | string | Hostname of the conference component | -| node | string | Erlang node | - -## Table `muc_room_subscribers` -This table is used to store MucSub subscriptions. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| room | string | Room name | -| host | string | Hostname of the conference component | -| jid | string | User jid | -| nick | string | User nick | -| nodes | string | MucSub nodes | -| created_at | timestamp | Creation date | - - -# VCard - -## Table `vcard` - -The table is used to store raw vCard content for delivery of the vCard -"as is". - -The table fields are defined as follow: - -| Field | Type | Usage | -| -------------------- | ---------------- | -------------------- | -| username | string | Owner of the Vcard | -| vcard | text | Raw Vcard | -| created_at | timestamp | Record creation date | - -## Table `vcard_search` - -The table is used to store vCard index on a few of the Vcard field -used for vCard search in users directory. - -You can learn more about the vCard specification on Wikipedia -[vCard](https://en.wikipedia.org/wiki/VCard) page. - -The table fields are defined as follow: - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------- | -| username | string | Raw username for display | -| lusername | string | Lowercase username for search | -| fn | string | Raw fullname for display | -| lfn | string | Lowercase fullname for search | -| family | string | Raw family name for display | -| lfamilly | string | Lowercase family name for search | -| given | string | Raw given name for display | -| lgiven | string | Lowercase given name for search | -| middle | string | Raw middle name for display | -| lmiddle | string | Lowercase middle name for search | -| nickname | string | Raw nickname for display | -| lnickname | string | Lowercase nickname for search | -| bday | string | Raw birthday for display | -| lbday | string | Lowercase and processed birthday for search | -| ctry | string | Raw country for display | -| lctry | string | Lowercase country for search | -| locality | string | Raw city for display | -| llocality | string | Lowercase city for search | -| email | string | Raw email for display | -| lemail | string | Lowercase email for search | -| orgname | string | Raw organisation name for display | -| lorgname | string | Lowercase organisation name for search | -| orgunit | string | Raw organisation department name for display | -| lorgunit | string | Lowercase organisation department for search | - -# Others - -## Table `last` -This table is used to store the last time the user was seen online. -It is defined as follow: - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| seconds | string | Timestamp for the last time the user was seen online | -| state | string | Why user got disconnected. Usually is empty | - -Note that the table is *not* updated while the user has the session open. - - - -## Table `caps_features` -Ejabberd uses this table to keep a list of the entity capabilities discovered. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| node | string | Node | -| subnode | string | Subnode | -| feature | string | Entity feature | -| created_at | timestamp | Creation date | - -The subnode field correspond to the 'ver' ("verification string") of XEP-0115. -There is one entry in this table for each feature advertised by the given (node,subnode) pair. - -## Table `private_storage` -Used for user private data storage. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| namespace | string | XEP-0049 namespace of the stored data | -| data | string | Raw xml | -| created_at | timestamp | Creation date | - diff --git a/content/archive/21_07/listen-options.md b/content/archive/21_07/listen-options.md deleted file mode 100644 index aedab000..00000000 --- a/content/archive/21_07/listen-options.md +++ /dev/null @@ -1,400 +0,0 @@ ---- -title: Listen Options -toc: true -menu: Listen Options -order: 51 ---- - - -This is a detailed description of each option allowed by the listening -modules: - -## access - -*AccessName* - -This option defines access to the port. The default value is `all`. - -## backlog - -*Value* - -The backlog value defines the maximum length that the queue of - pending connections may grow to. This should be increased if the - server is going to handle lots of new incoming connections as they - may be dropped if there is no space in the queue (and ejabberd was - not able to accept them immediately). Default value is 5. - -## cafile - -*Path* - -Path to a file of CA root certificates. -The default is to use system defined file if possible. - -This option is useful to define the file for a specific port listener. -To set a file for all client listeners or for specific vhosts, you can use the -[`c2s_cafile`](/archive/21_07/toplevel/#c2s-cafile) top-level option. -To set a file for all server connections, you can use the -[`s2s_cafile`](/archive/21_07/toplevel/#s2s-cafile) top-level option -or the -[`ca_file`](/archive/21_07/toplevel/#ca-file) top-level option. - -Please note: if this option is set in -[`ejabberd_c2s`](/archive/21_07/listen/#ejabberd-c2s) -or [`ejabberd_s2s_in`](/archive/21_07/listen/#ejabberd-s2s-in) -and the corresponding top-level option is also set -([`c2s_cafile`](/archive/21_07/toplevel/#c2s-cafile), -[`s2s_cafile`](/archive/21_07/toplevel/#s2s-cafile)), -then the top-level option is used, not this one. - -## certfile - -*Path* - -Path to the certificate file. -Only makes sense when the [`tls`](#tls) -options is set. -If this option is not set, you should set the -[`certfiles`](/archive/21_07/toplevel/#certfiles) top-level option -or configure [ACME](/admin/configuration/basic/#acme). - -## check_from - -*true | false* - -This option can be used with -[`ejabberd_service`](/archive/21_07/listen/#ejabberd-service) only. - [`XEP-0114`](https://xmpp.org/extensions/xep-0114.html) requires that - the domain must match the hostname of the component. If this option - is set to `false`, `ejabberd` will allow the component to send - stanzas with any arbitrary domain in the ’from’ attribute. Only use - this option if you are completely sure about it. The default value - is `true`, to be compliant with - [`XEP-0114`](https://xmpp.org/extensions/xep-0114.html). - -## ciphers - -*Ciphers* - -OpenSSL ciphers list in the same format accepted by - ‘`openssl ciphers`’ command. - -Please note: if this option is set in -[`ejabberd_c2s`](/archive/21_07/listen/#ejabberd-c2s) -or [`ejabberd_s2s_in`](/archive/21_07/listen/#ejabberd-s2s-in) -and the corresponding top-level option is also set -([`c2s_ciphers`](/archive/21_07/toplevel/#c2s-ciphers), -[`s2s_ciphers`](/archive/21_07/toplevel/#s2s-ciphers)), -then the top-level option is used, not this one. - -## custom_headers - -*{Name: Value}* - -Specify additional HTTP headers to be included in all HTTP responses. -Default value is: `[]` - -## default_host - -*undefined | HostName* - -If the HTTP request received by ejabberd contains the HTTP header - `Host` with an ambiguous virtual host that doesn’t match any one - defined in ejabberd (see - [Host Names](/admin/configuration/basic/#host-names)), - then this configured HostName - is set as the request Host. The default value of this option is: - `undefined`. - -## dhfile - -*Path* - -Full path to a file containing custom parameters for Diffie-Hellman key - exchange. Such a file could be created with the command - `openssl dhparam -out dh.pem 2048`. If this option is not specified, - default parameters will be used, which might not provide the same level - of security as using custom parameters. - -Please note: if this option is set in -[`ejabberd_c2s`](/archive/21_07/listen/#ejabberd-c2s) -or [`ejabberd_s2s_in`](/archive/21_07/listen/#ejabberd-s2s-in) -and the corresponding top-level option is also set -([`c2s_dhfile`](/archive/21_07/toplevel/#c2s-dhfile), -[`s2s_dhfile`](/archive/21_07/toplevel/#s2s-dhfile)), -then the top-level option is used, not this one. - -## global_routes - -*true | false* - -This option emulates legacy behaviour which registers all routes -defined in [`hosts`](/archive/21_07/toplevel/#hosts) -on a component connected. This behaviour -is considered harmful in the case when it's desired to multiplex -different components on the same port, so, to disable it, -set `global_routes` to `false`. - -The default value is `true`, -e.g. legacy behaviour is emulated: the only reason for this is -to maintain backward compatibility with existing deployments. - -## hosts - -*{Hostname: [HostOption, ...]}* - -The external Jabber component that connects to this -[`ejabberd_service`](/archive/21_07/listen/#ejabberd-service) -can serve one or more hostnames. As `HostOption` - you can define options for the component; currently the only allowed - option is the password required to the component when attempt to - connect to ejabberd: `password: Secret`. Note that you - cannot define in a single `ejabberd_service` components of different - services: add an `ejabberd_service` for each service, as seen in an - example below. This option may not be necessary if the component - already provides the host in its packets; in that case, you can simply - provide the password option that will be used for all the hosts - (see port 5236 definition in the example below). - -## max_fsm_queue - -*Size* - -This option specifies the maximum number of elements in the queue of - the FSM (Finite State Machine). Roughly speaking, each message in - such queues represents one XML stanza queued to be sent into its - relevant outgoing stream. If queue size reaches the limit (because, - for example, the receiver of stanzas is too slow), the FSM and the - corresponding connection (if any) will be terminated and error - message will be logged. The reasonable value for this option depends - on your hardware configuration. This option can be specified for - [`ejabberd_service`](/archive/21_07/listen/#ejabberd-service) - and [`ejabberd_c2s`](/archive/21_07/listen/#ejabberd-c2s) - listeners, or also globally for - [`ejabberd_s2s_out`](/archive/21_07/listen/#ejabberd-s2s-out). - If the option is not specified for - `ejabberd_service` or `ejabberd_c2s` listeners, the globally - configured value is used. The allowed values are integers and - ’undefined’. Default value: ’10000’. - -## max_payload_size - -*Size* - -Specify the maximum payload size in bytes. -It can be either an integer or the word `infinity`. -The default value is `infinity`. - -## max_stanza_size - -*Size* - -This option specifies an approximate maximum size in bytes of XML - stanzas. Approximate, because it is calculated with the precision of - one block of read data. For example `{max_stanza_size, 65536}`. The - default value is `infinity`. Recommended values are 65536 for c2s - connections and 131072 for s2s connections. s2s max stanza size must - always much higher than c2s limit. Change this value with extreme - care as it can cause unwanted disconnect if set too low. - -## password - -*Secret* - -Specify the password to verify an external component that connects to the port. - -
improved in 20.07
- -## port - -*Port number, or unix domain socket path* - -Declares at which port/unix domain socket should be listening. - -Can be set to number between `1` and `65535` to listen on TCP or UDP socket, -or can be set to string in form `"unix:/path/to/socket"` to create and listen -on unix domain socket `/path/to/socket`. - -## protocol_options - -*ProtocolOpts* - -List of general options relating to SSL/TLS. These map to - [`OpenSSL’s set_options()`](https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_options.html). - The default entry is: `"no_sslv3|cipher_server_preference|no_compression"` - -Please note: if this option is set in -[`ejabberd_c2s`](/archive/21_07/listen/#ejabberd-c2s) -or [`ejabberd_s2s_in`](/archive/21_07/listen/#ejabberd-s2s-in) -and the corresponding top-level option is also set -([`c2s_protocol_options`](/archive/21_07/toplevel/#c2s-protocol-options), -[`s2s_protocol_options`](/archive/21_07/toplevel/#s2s-protocol-options)), -then the top-level option is used, not this one. - -## request_handlers - -*{Path: Module}* - -To define one or several handlers that will serve HTTP requests in -[`ejabberd_http`](/archive/21_07/listen/#ejabberd-http). The - Path is a string; so the URIs that start with that Path will be - served by Module. For example, if you want `mod_foo` to serve the - URIs that start with `/a/b/`, and you also want `mod_bosh` to - serve the URIs `/bosh/`, use this option: - - request_handlers: - /a/b: mod_foo - /bosh: mod_bosh - /mqtt: mod_mqtt - -
new in 21.07
- -## send_timeout - -*Integer | infinity* - -Sets the longest time that data can wait to be accepted to sent by OS socket. Triggering this timeout will cause the server to close it. By default it's set to 15 seconds, expressed in milliseconds: 15000 - -## shaper - -*none | ShaperName* - -This option defines a shaper for the port (see section  -[Shapers](/admin/configuration/basic/#shapers)). - The default value is `none`. - -## shaper_rule - -*none | ShaperRule* - -This option defines a shaper rule for -[`ejabberd_service`](/archive/21_07/listen/#ejabberd-service) (see -section [Shapers](/admin/configuration/basic/#shapers)). -The recommended value is `fast`. - -## starttls - -*true | false* - -This option specifies that STARTTLS encryption is available on -connections to the port. You should also set the -[`certfiles`](/archive/21_07/toplevel/#certfiles) top-level option -or configure [ACME](/admin/configuration/basic/#acme). - -This option gets implicitly enabled when enabling -[`starttls_required`](#starttls-required) or [`tls_verify`](#tls-verify). - -## starttls_required - -*true | false* - -This option specifies that STARTTLS encryption is required on -connections to the port. No unencrypted connections will be allowed. -You should also set the -[`certfiles`](/archive/21_07/toplevel/#certfiles) top-level option -or configure [ACME](/admin/configuration/basic/#acme). - -Enabling this option implicitly enables also the [`starttls`](#starttls) option. - -## tag - -*String* - -Allow specifying a tag in a `listen` section -and later use it to have a special -[`api_permissions`](/archive/21_07/toplevel/#api-permissions) -just for it. - -For example: - - listen: - - - port: 4000 - module: ejabberd_http - tag: "magic_listener" - - api_permissions: - "magic_access": - from: - - tag: "magic_listener" - who: all - what: "*" - -The default value is the empty string: `""`. - -## timeout - -*Integer* - -Timeout of the connections, expressed in milliseconds. Default: 5000 - -## tls - -*true | false* - -This option specifies that traffic on the port will be encrypted - using SSL immediately after connecting. This was the traditional - encryption method in the early Jabber software, commonly on port - 5223 for client-to-server communications. But this method is - nowadays deprecated and not recommended. The preferable encryption - method is STARTTLS on port 5222, as defined - [`RFC 6120: XMPP Core`](https://xmpp.org/rfcs/rfc6120.html#tls), - which can be enabled in `ejabberd` with the option - [`starttls`](#starttls). - -If this option is set, you should also set the - [`certfiles`](/archive/21_07/toplevel/#certfiles) top-level - option or configure [ACME](/admin/configuration/basic/#acme). - -The option `tls` can also be used in - [`ejabberd_http`](/archive/21_07/listen/#ejabberd-http) - to support HTTPS. - -Enabling this option implicitly disables the [`starttls`](#starttls) option. - -## tls_compression - -*true | false* - -Whether to enable or disable TLS compression. The default value is - `false`. - -Please note: if this option is set in -[`ejabberd_c2s`](/archive/21_07/listen/#ejabberd-c2s) -or [`ejabberd_s2s_in`](/archive/21_07/listen/#ejabberd-s2s-in) -and the corresponding top-level option is also set -([`c2s_tls_compression`](/archive/21_07/toplevel/#c2s-tls-compression), -[`s2s_tls_compression`](/archive/21_07/toplevel/#s2s-tls-compression)), -then the top-level option is used, not this one. - -## tls_verify - -*false | true* - -This option specifies whether to verify the certificate or not when TLS is enabled. - -The default value is `false`, which means no checks are performed. - -The certificate will be checked against trusted CA roots, either defined at the operation system level or defined in the - listener [`cafile`](#cafile). If trusted, it will accept the jid that is embedded in the certificate in the - `subjectAltName` field of that certificate. - -Enabling this option implicitly enables also the [`starttls`](#starttls) option. - -## use_proxy_protocol - -*true | false* - -Is this listener accessed by proxy service that is using - proxy protocol for supplying real IP addresses to ejabberd server. You can read about this protocol - in [Proxy protocol specification](https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt). - The default value of this option is`false`. - -## zlib - -*true | false* - -This option specifies that Zlib stream compression (as defined in - [`XEP-0138`](https://xmpp.org/extensions/xep-0138.html)) is available - on connections to the port. diff --git a/content/archive/21_07/sql-schema.md b/content/archive/21_07/sql-schema.md deleted file mode 100644 index a355ffec..00000000 --- a/content/archive/21_07/sql-schema.md +++ /dev/null @@ -1,310 +0,0 @@ ---- -title: ejabberd SQL Database Schema -toc: true -menu: SQL Schema ---- - - -We present the tables that might be in use, depending on your server configuration, together with a short explanation of the fields involved and their intended use. Tables are presented roughly grouped by related functionality. - -Consider this document a work in progress, not all tables are documented yet. - -Latest version of database schema are available in [ejabberd Github repository](https://github.com/processone/ejabberd): - -* [MySQL schema](https://github.com/processone/ejabberd/blob/master/sql/mysql.sql) -* [Postgres schema](https://github.com/processone/ejabberd/blob/master/sql/pg.sql) -* [SQLite schema](https://github.com/processone/ejabberd/blob/master/sql/lite.sql) -* [MS SQL Server schema](https://github.com/processone/ejabberd/blob/master/sql/mssql.sql). This - schema need testing / feedback and possibly improvement from SQL - Server users. - -# Authentication - -## Table `users` - -Contains the information required to authenticate users. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| password | string | User password, can be hashed | -| created_at | timestamp | When the user account was created | - - -The password are hashed if you use SCRAM authentication. In that case the next fields are also defined - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| serverkey | string | support for salted passwords | -| salt | string | support for salted passwords | -| iterationcount | integer | support for salted passwords | - - -# Rosters - -## Table `rosterusers` - -This is a quite complex table, used as a store for a quite complex protocol that is the one defined to manage -rosters and subscriptions on [rfc6121](https://tools.ietf.org/html/rfc6121). - -In the common case of two users adding each other as contacts, entries in the roster table follows a series of steps - as they moves from a subscription request to the final approval and bi-directional subscription being established. -This process can be initiated either by the user, or by the (possible remote) peer. Also need to account for the case -where the user, or the contact, might not be online at the moment of the subscription request is made. - -Steps are further complicated by the fact that entries in the roster aren't required to have corresponding subscriptions. -For details of the meaning of the different fields, refer to [the protocol itself](https://tools.ietf.org/html/rfc6121#section-2), as these are mostly a direct mapping of it. - -Note: -If you manage users contacts from outside the roster workflow of XMPP (for example your site backends perform the linking between -users), it is likely that you only need to care about the username, jid and nick fields, and set the subscription field to be always -'B' for a mutual link between users. - - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| jid | string | Contact jid | -| nick | string | Contact nickname | -| subscription | char | 'B'=both | 'T'=To | 'F'=From | 'N'=none | -| ask | char | 'S'=subscribe | 'U'=unsubscribe | B='both' | 'O'=out | 'I'=in | 'N'=none | -| askmessage | string | Message to be displayed on the subscription request | -| server | char | 'N' for normal users contacts | -| subscribe | string | | -| type | string | "item" | -| created_at | timestamp | Creation date of this roster entry | - - - - -## Table `rostergroups` - -## Table `sr_group` - -## Table `sr_user` - - - -# Messages - -## Table `spool` -Messages sent to users that are offline are stored in this table. -Do not confuse this with general message archiving: messages are only temporarily stored in this table, removed as soon as the target user -is back online and the pending messages delivered to it. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| xml | blob | Raw packet | -| seq | integer | Unique, autoincrement sequence number. | -| created_at | timestamp | When the message was stored | - -The seq field is used for sorting, and to easily identify a particular user message. - - -## Table `privacy_list_data` - -The table is used to store privacy rules. - -The table is a direct translation of the XMPP packet used to set -privacy lists. For more details, please read -[XEP-0016: Privacy Lists, Syntax and Semantics](https://xmpp.org/extensions/xep-0016.html#protocol-syntax). Here -is an example packet coming from privacy list specification: - - - - [] - [] - [] - [] - - -The table fields are defined as follow: - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| id | int | Privacy list rule id. | -| t | char | Privacy rule type: 'j' for jid, 'g' for group and 's' for subscription. | -| value | string | Privacy list value for match, whose content depends on privacy list rule type. | -| action | char | Privacy list action: 'd' for deny and 'a' for allow. | -| ord | int | Order for applying the privacy list rule. | -| match\_all | boolean (0 or 1) | If true (1), means any packet types will be matched. Other matches should be false (0). | -| match\_iq | boolean (0 or 1) | If true (1), means iq packets will be matched by rule. | -| match\_message | boolean (0 or 1) | If true (1), means message packets type will be matched by rule. | -| match\_presence\_in | boolean (0 or 1) | If true (1), means inbound presence packets type will be matched by rule. | -| match\_presence\_out | boolean (0 or 1) | If true (1), means outbound packets type will be matched by rule. | - - - -# Multiuser Chat Rooms - -## Table `muc_room` -It is used to store *persistent* rooms, that is, rooms that must be automatically started with the server. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| name | string | Room name | -| host | string | Hostname of the conference component | -| opts | string | Room options, encoded as erlang terms | -| created_at | timestamp | Creation date | - -The opts field is legible, but not mean to be modified directly. It contents depends on the implementation of mod_muc. -It contains the room configuration and affiliations. - - -## Table `muc_registered` -Contains a map of user to nicknames. When a user register a nickname with the conference module, that nick is reserved and can't be used by -anyone else, in any room from that conference host. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| jid | string | User jid | -| host | string | Hostname of the conference component | -| nick | string | Room options, encoded as erlang terms | -| created_at | timestamp | Creation date | - - -## Table `room_history` -In ejabberd Business Edition, -this table is used if persistent room history is enabled. If so, recent room history is saved to the DB before ejabberd is stopped, -allowing the recent history to survive server restarts. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| room | string | Room jid | -| nick | string | Nickname that sent the message | -| packet | string | XML stanza with the message | -| have_subject | boolean | True if the message stanza had subject | -| created_at | timestamp | Creation date | -| size | integer | Size in bytes of the xml packet | - -## Table `muc_online_room` -This table is used to store rooms that actually exists in the memory of the server. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| name | string | Room name | -| host | string | Hostname of the conference component | -| node | string | Erlang node where the room is | -| pid | string | Pid of the thread running the room | - -## Table `muc_online_users` -This table is used to store MucSub subscriptions. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User -| server | string | Hostname of the user | -| resource | string | User resource | -| name | string | Name of the room | -| host | string | Hostname of the conference component | -| node | string | Erlang node | - -## Table `muc_room_subscribers` -This table is used to store MucSub subscriptions. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| room | string | Room name | -| host | string | Hostname of the conference component | -| jid | string | User jid | -| nick | string | User nick | -| nodes | string | MucSub nodes | -| created_at | timestamp | Creation date | - - -# VCard - -## Table `vcard` - -The table is used to store raw vCard content for delivery of the vCard -"as is". - -The table fields are defined as follow: - -| Field | Type | Usage | -| -------------------- | ---------------- | -------------------- | -| username | string | Owner of the Vcard | -| vcard | text | Raw Vcard | -| created_at | timestamp | Record creation date | - -## Table `vcard_search` - -The table is used to store vCard index on a few of the Vcard field -used for vCard search in users directory. - -You can learn more about the vCard specification on Wikipedia -[vCard](https://en.wikipedia.org/wiki/VCard) page. - -The table fields are defined as follow: - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------- | -| username | string | Raw username for display | -| lusername | string | Lowercase username for search | -| fn | string | Raw fullname for display | -| lfn | string | Lowercase fullname for search | -| family | string | Raw family name for display | -| lfamilly | string | Lowercase family name for search | -| given | string | Raw given name for display | -| lgiven | string | Lowercase given name for search | -| middle | string | Raw middle name for display | -| lmiddle | string | Lowercase middle name for search | -| nickname | string | Raw nickname for display | -| lnickname | string | Lowercase nickname for search | -| bday | string | Raw birthday for display | -| lbday | string | Lowercase and processed birthday for search | -| ctry | string | Raw country for display | -| lctry | string | Lowercase country for search | -| locality | string | Raw city for display | -| llocality | string | Lowercase city for search | -| email | string | Raw email for display | -| lemail | string | Lowercase email for search | -| orgname | string | Raw organisation name for display | -| lorgname | string | Lowercase organisation name for search | -| orgunit | string | Raw organisation department name for display | -| lorgunit | string | Lowercase organisation department for search | - -# Others - -## Table `last` -This table is used to store the last time the user was seen online. -It is defined as follow: - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| seconds | string | Timestamp for the last time the user was seen online | -| state | string | Why user got disconnected. Usually is empty | - -Note that the table is *not* updated while the user has the session open. - - - -## Table `caps_features` -Ejabberd uses this table to keep a list of the entity capabilities discovered. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| node | string | Node | -| subnode | string | Subnode | -| feature | string | Entity feature | -| created_at | timestamp | Creation date | - -The subnode field correspond to the 'ver' ("verification string") of XEP-0115. -There is one entry in this table for each feature advertised by the given (node,subnode) pair. - -## Table `private_storage` -Used for user private data storage. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| namespace | string | XEP-0049 namespace of the stored data | -| data | string | Raw xml | -| created_at | timestamp | Creation date | - diff --git a/content/archive/21_12/sql-schema.md b/content/archive/21_12/sql-schema.md deleted file mode 100644 index a33ffa66..00000000 --- a/content/archive/21_12/sql-schema.md +++ /dev/null @@ -1,311 +0,0 @@ ---- -title: ejabberd SQL Database Schema -toc: true -menu: SQL Schema -order: 190 ---- - - -We present the tables that might be in use, depending on your server configuration, together with a short explanation of the fields involved and their intended use. Tables are presented roughly grouped by related functionality. - -Consider this document a work in progress, not all tables are documented yet. - -Latest version of database schema are available in [ejabberd Github repository](https://github.com/processone/ejabberd): - -* [MySQL schema](https://github.com/processone/ejabberd/blob/master/sql/mysql.sql) -* [Postgres schema](https://github.com/processone/ejabberd/blob/master/sql/pg.sql) -* [SQLite schema](https://github.com/processone/ejabberd/blob/master/sql/lite.sql) -* [MS SQL Server schema](https://github.com/processone/ejabberd/blob/master/sql/mssql.sql). This - schema need testing / feedback and possibly improvement from SQL - Server users. - -# Authentication - -## Table `users` - -Contains the information required to authenticate users. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| password | string | User password, can be hashed | -| created_at | timestamp | When the user account was created | - - -The password are hashed if you use SCRAM authentication. In that case the next fields are also defined - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| serverkey | string | support for salted passwords | -| salt | string | support for salted passwords | -| iterationcount | integer | support for salted passwords | - - -# Rosters - -## Table `rosterusers` - -This is a quite complex table, used as a store for a quite complex protocol that is the one defined to manage -rosters and subscriptions on [rfc6121](https://tools.ietf.org/html/rfc6121). - -In the common case of two users adding each other as contacts, entries in the roster table follows a series of steps - as they moves from a subscription request to the final approval and bi-directional subscription being established. -This process can be initiated either by the user, or by the (possible remote) peer. Also need to account for the case -where the user, or the contact, might not be online at the moment of the subscription request is made. - -Steps are further complicated by the fact that entries in the roster aren't required to have corresponding subscriptions. -For details of the meaning of the different fields, refer to [the protocol itself](https://tools.ietf.org/html/rfc6121#section-2), as these are mostly a direct mapping of it. - -Note: -If you manage users contacts from outside the roster workflow of XMPP (for example your site backends perform the linking between -users), it is likely that you only need to care about the username, jid and nick fields, and set the subscription field to be always -'B' for a mutual link between users. - - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| jid | string | Contact jid | -| nick | string | Contact nickname | -| subscription | char | 'B'=both | 'T'=To | 'F'=From | 'N'=none | -| ask | char | 'S'=subscribe | 'U'=unsubscribe | B='both' | 'O'=out | 'I'=in | 'N'=none | -| askmessage | string | Message to be displayed on the subscription request | -| server | char | 'N' for normal users contacts | -| subscribe | string | | -| type | string | "item" | -| created_at | timestamp | Creation date of this roster entry | - - - - -## Table `rostergroups` - -## Table `sr_group` - -## Table `sr_user` - - - -# Messages - -## Table `spool` -Messages sent to users that are offline are stored in this table. -Do not confuse this with general message archiving: messages are only temporarily stored in this table, removed as soon as the target user -is back online and the pending messages delivered to it. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| xml | blob | Raw packet | -| seq | integer | Unique, autoincrement sequence number. | -| created_at | timestamp | When the message was stored | - -The seq field is used for sorting, and to easily identify a particular user message. - - -## Table `privacy_list_data` - -The table is used to store privacy rules. - -The table is a direct translation of the XMPP packet used to set -privacy lists. For more details, please read -[XEP-0016: Privacy Lists, Syntax and Semantics](https://xmpp.org/extensions/xep-0016.html#protocol-syntax). Here -is an example packet coming from privacy list specification: - - - - [] - [] - [] - [] - - -The table fields are defined as follow: - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| id | int | Privacy list rule id. | -| t | char | Privacy rule type: 'j' for jid, 'g' for group and 's' for subscription. | -| value | string | Privacy list value for match, whose content depends on privacy list rule type. | -| action | char | Privacy list action: 'd' for deny and 'a' for allow. | -| ord | int | Order for applying the privacy list rule. | -| match\_all | boolean (0 or 1) | If true (1), means any packet types will be matched. Other matches should be false (0). | -| match\_iq | boolean (0 or 1) | If true (1), means iq packets will be matched by rule. | -| match\_message | boolean (0 or 1) | If true (1), means message packets type will be matched by rule. | -| match\_presence\_in | boolean (0 or 1) | If true (1), means inbound presence packets type will be matched by rule. | -| match\_presence\_out | boolean (0 or 1) | If true (1), means outbound packets type will be matched by rule. | - - - -# Multiuser Chat Rooms - -## Table `muc_room` -It is used to store *persistent* rooms, that is, rooms that must be automatically started with the server. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| name | string | Room name | -| host | string | Hostname of the conference component | -| opts | string | Room options, encoded as erlang terms | -| created_at | timestamp | Creation date | - -The opts field is legible, but not mean to be modified directly. It contents depends on the implementation of mod_muc. -It contains the room configuration and affiliations. - - -## Table `muc_registered` -Contains a map of user to nicknames. When a user register a nickname with the conference module, that nick is reserved and can't be used by -anyone else, in any room from that conference host. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| jid | string | User jid | -| host | string | Hostname of the conference component | -| nick | string | Room options, encoded as erlang terms | -| created_at | timestamp | Creation date | - - -## Table `room_history` -In ejabberd Business Edition, -this table is used if persistent room history is enabled. If so, recent room history is saved to the DB before ejabberd is stopped, -allowing the recent history to survive server restarts. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| room | string | Room jid | -| nick | string | Nickname that sent the message | -| packet | string | XML stanza with the message | -| have_subject | boolean | True if the message stanza had subject | -| created_at | timestamp | Creation date | -| size | integer | Size in bytes of the xml packet | - -## Table `muc_online_room` -This table is used to store rooms that actually exists in the memory of the server. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| name | string | Room name | -| host | string | Hostname of the conference component | -| node | string | Erlang node where the room is | -| pid | string | Pid of the thread running the room | - -## Table `muc_online_users` -This table is used to store MucSub subscriptions. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User -| server | string | Hostname of the user | -| resource | string | User resource | -| name | string | Name of the room | -| host | string | Hostname of the conference component | -| node | string | Erlang node | - -## Table `muc_room_subscribers` -This table is used to store MucSub subscriptions. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| room | string | Room name | -| host | string | Hostname of the conference component | -| jid | string | User jid | -| nick | string | User nick | -| nodes | string | MucSub nodes | -| created_at | timestamp | Creation date | - - -# VCard - -## Table `vcard` - -The table is used to store raw vCard content for delivery of the vCard -"as is". - -The table fields are defined as follow: - -| Field | Type | Usage | -| -------------------- | ---------------- | -------------------- | -| username | string | Owner of the Vcard | -| vcard | text | Raw Vcard | -| created_at | timestamp | Record creation date | - -## Table `vcard_search` - -The table is used to store vCard index on a few of the Vcard field -used for vCard search in users directory. - -You can learn more about the vCard specification on Wikipedia -[vCard](https://en.wikipedia.org/wiki/VCard) page. - -The table fields are defined as follow: - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------- | -| username | string | Raw username for display | -| lusername | string | Lowercase username for search | -| fn | string | Raw fullname for display | -| lfn | string | Lowercase fullname for search | -| family | string | Raw family name for display | -| lfamilly | string | Lowercase family name for search | -| given | string | Raw given name for display | -| lgiven | string | Lowercase given name for search | -| middle | string | Raw middle name for display | -| lmiddle | string | Lowercase middle name for search | -| nickname | string | Raw nickname for display | -| lnickname | string | Lowercase nickname for search | -| bday | string | Raw birthday for display | -| lbday | string | Lowercase and processed birthday for search | -| ctry | string | Raw country for display | -| lctry | string | Lowercase country for search | -| locality | string | Raw city for display | -| llocality | string | Lowercase city for search | -| email | string | Raw email for display | -| lemail | string | Lowercase email for search | -| orgname | string | Raw organisation name for display | -| lorgname | string | Lowercase organisation name for search | -| orgunit | string | Raw organisation department name for display | -| lorgunit | string | Lowercase organisation department for search | - -# Others - -## Table `last` -This table is used to store the last time the user was seen online. -It is defined as follow: - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| seconds | string | Timestamp for the last time the user was seen online | -| state | string | Why user got disconnected. Usually is empty | - -Note that the table is *not* updated while the user has the session open. - - - -## Table `caps_features` -Ejabberd uses this table to keep a list of the entity capabilities discovered. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| node | string | Node | -| subnode | string | Subnode | -| feature | string | Entity feature | -| created_at | timestamp | Creation date | - -The subnode field correspond to the 'ver' ("verification string") of XEP-0115. -There is one entry in this table for each feature advertised by the given (node,subnode) pair. - -## Table `private_storage` -Used for user private data storage. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| namespace | string | XEP-0049 namespace of the stored data | -| data | string | Raw xml | -| created_at | timestamp | Creation date | - diff --git a/content/archive/23_01/admin-api.md b/content/archive/22.05/admin-api.md similarity index 83% rename from content/archive/23_01/admin-api.md rename to content/archive/22.05/admin-api.md index 52e34cf5..175d9383 100644 --- a/content/archive/23_01/admin-api.md +++ b/content/archive/22.05/admin-api.md @@ -1,12 +1,11 @@ --- -title: Administration API reference -toc: true -menu: API Reference -order: 1 -// Autogenerated with 'ejabberdctl gen_markdown_doc_for_commands' +search: + exclude: true --- -
added in 22.05
+# API Reference + +
added in 22.05
## abort_delete_old_mam_messages @@ -22,10 +21,10 @@ __Result:__ - *status* :: string : Status text __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](../../developer/ejabberd-api/admin-tags.md#purge) __Module:__ -[mod_mam](/archive/23_01/modules/#mod-mam) +[mod_mam](modules.md#mod_mam) __Examples:__ @@ -41,7 +40,7 @@ __Examples:__ ~~~ -
added in 22.05
+
added in 22.05
## abort_delete_old_messages @@ -57,7 +56,7 @@ __Result:__ - *status* :: string : Status text __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](../../developer/ejabberd-api/admin-tags.md#purge) __Examples:__ @@ -98,10 +97,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[roster](/developer/ejabberd-api/admin-tags/#roster) +[roster](../../developer/ejabberd-api/admin-tags.md#roster) __Module:__ -[mod_admin_extra](/archive/23_01/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -139,7 +138,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -173,10 +172,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) __Module:__ -[mod_admin_extra](/archive/23_01/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -211,10 +210,10 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[private](/developer/ejabberd-api/admin-tags/#private) +[private](../../developer/ejabberd-api/admin-tags.md#private) __Module:__ -[mod_private](/archive/23_01/modules/#mod-private) +[mod_private](modules.md#mod_private) __Examples:__ @@ -249,10 +248,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) __Module:__ -[mod_admin_extra](/archive/23_01/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -289,10 +288,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/23_01/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -328,10 +327,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) __Module:__ -[mod_admin_extra](/archive/23_01/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -366,10 +365,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) __Module:__ -[mod_admin_extra](/archive/23_01/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -409,10 +408,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) __Module:__ -[mod_admin_extra](/archive/23_01/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -446,7 +445,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](../../developer/ejabberd-api/admin-tags.md#server) __Examples:__ @@ -478,10 +477,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[erlang](/developer/ejabberd-api/admin-tags/#erlang) +[erlang](../../developer/ejabberd-api/admin-tags.md#erlang) __Module:__ -[mod_admin_extra](/archive/23_01/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -512,7 +511,7 @@ __Result:__ - *connected_users* :: [sessions::string] : List of users sessions __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Examples:__ @@ -546,10 +545,10 @@ __Result:__ - *connected_users_info* :: [{jid::string, connection::string, ip::string, port::integer, priority::integer, node::string, uptime::integer, status::string, resource::string, statustext::string}] __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/23_01/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -593,7 +592,7 @@ __Result:__ - *num_sessions* :: integer __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) [statistics](/developer/ejabberd-api/admin-tags/#statistics) +[session](../../developer/ejabberd-api/admin-tags.md#session) [statistics](../../developer/ejabberd-api/admin-tags.md#statistics) __Examples:__ @@ -625,10 +624,10 @@ __Result:__ - *connected_users_vhost* :: [sessions::string] __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/23_01/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -663,7 +662,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[sql](/developer/ejabberd-api/admin-tags/#sql) +[sql](../../developer/ejabberd-api/admin-tags.md#sql) __Examples:__ @@ -696,7 +695,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[config](/developer/ejabberd-api/admin-tags/#config) +[config](../../developer/ejabberd-api/admin-tags.md#config) __Examples:__ @@ -731,10 +730,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/23_01/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -771,10 +770,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/23_01/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -817,10 +816,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/23_01/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -851,7 +850,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](../../developer/ejabberd-api/admin-tags.md#purge) __Examples:__ @@ -867,7 +866,7 @@ __Examples:__ ~~~ -
added in 21.12
+
added in 21.12
## delete_expired_pubsub_items @@ -882,10 +881,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](../../developer/ejabberd-api/admin-tags.md#purge) __Module:__ -[mod_pubsub](/archive/23_01/modules/#mod-pubsub) +[mod_pubsub](modules.md#mod_pubsub) __Examples:__ @@ -917,7 +916,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -953,10 +952,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](../../developer/ejabberd-api/admin-tags.md#purge) __Module:__ -[mod_mam](/archive/23_01/modules/#mod-mam) +[mod_mam](modules.md#mod_mam) __Examples:__ @@ -973,7 +972,7 @@ __Examples:__ ~~~ -
added in 22.05
+
added in 22.05
## delete_old_mam_messages_batch @@ -996,10 +995,10 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](../../developer/ejabberd-api/admin-tags.md#purge) __Module:__ -[mod_mam](/archive/23_01/modules/#mod-mam) +[mod_mam](modules.md#mod_mam) __Examples:__ @@ -1019,7 +1018,7 @@ __Examples:__ ~~~ -
added in 22.05
+
added in 22.05
## delete_old_mam_messages_status @@ -1035,10 +1034,10 @@ __Result:__ - *status* :: string : Status test __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](../../developer/ejabberd-api/admin-tags.md#purge) __Module:__ -[mod_mam](/archive/23_01/modules/#mod-mam) +[mod_mam](modules.md#mod_mam) __Examples:__ @@ -1070,7 +1069,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](../../developer/ejabberd-api/admin-tags.md#purge) __Examples:__ @@ -1086,7 +1085,7 @@ __Examples:__ ~~~ -
added in 22.05
+
added in 22.05
## delete_old_messages_batch @@ -1105,7 +1104,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](../../developer/ejabberd-api/admin-tags.md#purge) __Examples:__ @@ -1124,7 +1123,7 @@ __Examples:__ ~~~ -
added in 22.05
+
added in 22.05
## delete_old_messages_status @@ -1140,7 +1139,7 @@ __Result:__ - *status* :: string : Status test __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](../../developer/ejabberd-api/admin-tags.md#purge) __Examples:__ @@ -1156,7 +1155,7 @@ __Examples:__ ~~~ -
added in 21.12
+
added in 21.12
## delete_old_pubsub_items @@ -1172,10 +1171,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](../../developer/ejabberd-api/admin-tags.md#purge) __Module:__ -[mod_pubsub](/archive/23_01/modules/#mod-pubsub) +[mod_pubsub](modules.md#mod_pubsub) __Examples:__ @@ -1207,10 +1206,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](../../developer/ejabberd-api/admin-tags.md#purge) __Module:__ -[mod_push](/archive/23_01/modules/#mod-push) +[mod_push](modules.md#mod_push) __Examples:__ @@ -1250,10 +1249,10 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) [purge](/developer/ejabberd-api/admin-tags/#purge) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) [purge](../../developer/ejabberd-api/admin-tags.md#purge) __Module:__ -[mod_admin_extra](/archive/23_01/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -1294,10 +1293,10 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) [purge](/developer/ejabberd-api/admin-tags/#purge) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) [purge](../../developer/ejabberd-api/admin-tags.md#purge) __Module:__ -[mod_admin_extra](/archive/23_01/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -1333,10 +1332,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[roster](/developer/ejabberd-api/admin-tags/#roster) +[roster](../../developer/ejabberd-api/admin-tags.md#roster) __Module:__ -[mod_admin_extra](/archive/23_01/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -1372,10 +1371,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/23_01/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -1411,10 +1410,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/23_01/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -1446,7 +1445,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -1478,7 +1477,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[config](/developer/ejabberd-api/admin-tags/#config) +[config](../../developer/ejabberd-api/admin-tags.md#config) __Examples:__ @@ -1511,7 +1510,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -1536,7 +1535,7 @@ __Examples:__ Export virtual host information from Mnesia tables to SQL file -Configure the modules to use SQL, then call this command. After correctly exported the database of a vhost, you may want to delete from mnesia with the [delete_mnesia](/archive/23_01/admin-api/#delete-mnesia) command. +Configure the modules to use SQL, then call this command. After correctly exported the database of a vhost, you may want to delete from mnesia with the [delete_mnesia](admin-api.md#delete_mnesia) command. __Arguments:__ @@ -1548,7 +1547,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -1581,7 +1580,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -1614,7 +1613,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -1631,7 +1630,7 @@ __Examples:__ ~~~ -
added in 20.01
+
added in 20.01
## gc @@ -1646,7 +1645,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](../../developer/ejabberd-api/admin-tags.md#server) __Examples:__ @@ -1680,7 +1679,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[documentation](/developer/ejabberd-api/admin-tags/#documentation) +[documentation](../../developer/ejabberd-api/admin-tags.md#documentation) __Examples:__ @@ -1716,7 +1715,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[documentation](/developer/ejabberd-api/admin-tags/#documentation) +[documentation](../../developer/ejabberd-api/admin-tags.md#documentation) __Examples:__ @@ -1734,7 +1733,7 @@ __Examples:__ ~~~ -
added in 21.12
+
added in 21.12
## gen_markdown_doc_for_tags @@ -1750,7 +1749,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[documentation](/developer/ejabberd-api/admin-tags/#documentation) +[documentation](../../developer/ejabberd-api/admin-tags.md#documentation) __Examples:__ @@ -1781,10 +1780,10 @@ __Result:__ - *cookie* :: string : Erlang cookie used for authentication by ejabberd __Tags:__ -[erlang](/developer/ejabberd-api/admin-tags/#erlang) +[erlang](../../developer/ejabberd-api/admin-tags.md#erlang) __Module:__ -[mod_admin_extra](/archive/23_01/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -1820,10 +1819,10 @@ __Result:__ - *last_activity* :: {timestamp::string, status::string} : Last activity timestamp and status __Tags:__ -[last](/developer/ejabberd-api/admin-tags/#last) +[last](../../developer/ejabberd-api/admin-tags.md#last) __Module:__ -[mod_admin_extra](/archive/23_01/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -1858,7 +1857,7 @@ __Result:__ - *levelatom* :: string : Tuple with the log level number, its keyword and description __Tags:__ -[logs](/developer/ejabberd-api/admin-tags/#logs) +[logs](../../developer/ejabberd-api/admin-tags.md#logs) __Examples:__ @@ -1891,10 +1890,10 @@ __Result:__ - *value* :: integer : Number __Tags:__ -[offline](/developer/ejabberd-api/admin-tags/#offline) +[offline](../../developer/ejabberd-api/admin-tags.md#offline) __Module:__ -[mod_admin_extra](/archive/23_01/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -1940,10 +1939,10 @@ __Result:__ - *presence* :: {jid::string, show::string, status::string} __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/23_01/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -1982,10 +1981,10 @@ __Result:__ - *affiliation* :: string : Affiliation of the user __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/23_01/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -2020,10 +2019,10 @@ __Result:__ - *affiliations* :: [{username::string, domain::string, affiliation::string, reason::string}] : The list of affiliations with username, domain, affiliation and reason __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/23_01/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -2064,10 +2063,10 @@ __Result:__ - *occupants* :: [{jid::string, nick::string, role::string}] : The list of occupants with JID, nick and affiliation __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/23_01/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -2107,10 +2106,10 @@ __Result:__ - *occupants* :: integer : Number of room occupants __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/23_01/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -2144,10 +2143,10 @@ __Result:__ - *options* :: [{name::string, value::string}] : List of room options tuples with name and value __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/23_01/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -2186,10 +2185,10 @@ __Result:__ - *contacts* :: [{jid::string, nick::string, subscription::string, ask::string, group::string}] __Tags:__ -[roster](/developer/ejabberd-api/admin-tags/#roster) +[roster](../../developer/ejabberd-api/admin-tags.md#roster) __Module:__ -[mod_admin_extra](/archive/23_01/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -2238,10 +2237,10 @@ __Result:__ - *subscribers* :: [jid::string] : The list of users that are subscribed to that room __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/23_01/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -2278,10 +2277,10 @@ __Result:__ - *rooms* :: [room::string] __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/23_01/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -2301,7 +2300,7 @@ __Examples:__ ~~~ -
added in 21.04
+
added in 21.04
## get_user_subscriptions @@ -2318,10 +2317,10 @@ __Result:__ - *rooms* :: [{roomjid::string, usernick::string, nodes::[node::string]}] __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/23_01/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -2375,10 +2374,10 @@ __Result:__ - *content* :: string : Field content __Tags:__ -[vcard](/developer/ejabberd-api/admin-tags/#vcard) +[vcard](../../developer/ejabberd-api/admin-tags.md#vcard) __Module:__ -[mod_admin_extra](/archive/23_01/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -2433,10 +2432,10 @@ __Result:__ - *content* :: string : Field content __Tags:__ -[vcard](/developer/ejabberd-api/admin-tags/#vcard) +[vcard](../../developer/ejabberd-api/admin-tags.md#vcard) __Module:__ -[mod_admin_extra](/archive/23_01/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -2492,10 +2491,10 @@ __Result:__ - *contents* :: [value::string] __Tags:__ -[vcard](/developer/ejabberd-api/admin-tags/#vcard) +[vcard](../../developer/ejabberd-api/admin-tags.md#vcard) __Module:__ -[mod_admin_extra](/archive/23_01/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -2533,7 +2532,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -2565,7 +2564,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -2597,7 +2596,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -2632,7 +2631,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) [sql](/developer/ejabberd-api/admin-tags/#sql) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) [sql](../../developer/ejabberd-api/admin-tags.md#sql) __Examples:__ @@ -2663,7 +2662,7 @@ __Result:__ - *s2s_incoming* :: integer __Tags:__ -[statistics](/developer/ejabberd-api/admin-tags/#statistics) [s2s](/developer/ejabberd-api/admin-tags/#s2s) +[statistics](../../developer/ejabberd-api/admin-tags.md#statistics) [s2s](../../developer/ejabberd-api/admin-tags.md#s2s) __Examples:__ @@ -2699,7 +2698,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -2734,7 +2733,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[cluster](/developer/ejabberd-api/admin-tags/#cluster) +[cluster](../../developer/ejabberd-api/admin-tags.md#cluster) __Examples:__ @@ -2769,10 +2768,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/23_01/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -2808,7 +2807,7 @@ __Result:__ - *num_resources* :: integer : Number of resources that were kicked __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Examples:__ @@ -2844,7 +2843,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[cluster](/developer/ejabberd-api/admin-tags/#cluster) +[cluster](../../developer/ejabberd-api/admin-tags.md#cluster) __Examples:__ @@ -2875,7 +2874,7 @@ __Result:__ - *certificates* :: [{domain::string, file::string, used::string}] __Tags:__ -[acme](/developer/ejabberd-api/admin-tags/#acme) +[acme](../../developer/ejabberd-api/admin-tags.md#acme) __Examples:__ @@ -2917,7 +2916,7 @@ __Result:__ - *nodes* :: [node::string] __Tags:__ -[cluster](/developer/ejabberd-api/admin-tags/#cluster) +[cluster](../../developer/ejabberd-api/admin-tags.md#cluster) __Examples:__ @@ -2955,7 +2954,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -2971,7 +2970,7 @@ __Examples:__ ~~~ -
added in 20.01
+
added in 20.01
## man @@ -2986,7 +2985,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[documentation](/developer/ejabberd-api/admin-tags/#documentation) +[documentation](../../developer/ejabberd-api/admin-tags.md#documentation) __Examples:__ @@ -3021,7 +3020,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -3055,7 +3054,7 @@ __Result:__ - *res* :: string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -3087,7 +3086,7 @@ __Result:__ - *res* :: string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -3119,7 +3118,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[modules](/developer/ejabberd-api/admin-tags/#modules) +[modules](../../developer/ejabberd-api/admin-tags.md#modules) __Examples:__ @@ -3151,7 +3150,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[modules](/developer/ejabberd-api/admin-tags/#modules) +[modules](../../developer/ejabberd-api/admin-tags.md#modules) __Examples:__ @@ -3183,7 +3182,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[modules](/developer/ejabberd-api/admin-tags/#modules) +[modules](../../developer/ejabberd-api/admin-tags.md#modules) __Examples:__ @@ -3218,7 +3217,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[modules](/developer/ejabberd-api/admin-tags/#modules) +[modules](../../developer/ejabberd-api/admin-tags.md#modules) __Examples:__ @@ -3249,7 +3248,7 @@ __Result:__ - *modules* :: [{name::string, summary::string}] : List of tuples with module name and description __Tags:__ -[modules](/developer/ejabberd-api/admin-tags/#modules) +[modules](../../developer/ejabberd-api/admin-tags.md#modules) __Examples:__ @@ -3283,7 +3282,7 @@ __Result:__ - *modules* :: [{name::string, summary::string}] : List of tuples with module name and description __Tags:__ -[modules](/developer/ejabberd-api/admin-tags/#modules) +[modules](../../developer/ejabberd-api/admin-tags.md#modules) __Examples:__ @@ -3320,7 +3319,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[modules](/developer/ejabberd-api/admin-tags/#modules) +[modules](../../developer/ejabberd-api/admin-tags.md#modules) __Examples:__ @@ -3352,10 +3351,10 @@ __Result:__ - *rooms* :: [room::string] : List of rooms __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/23_01/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -3391,10 +3390,10 @@ __Result:__ - *rooms* :: [{jid::string, public::string, participants::integer}] : List of rooms with summary __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/23_01/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -3440,10 +3439,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/23_01/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -3478,10 +3477,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/23_01/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -3515,10 +3514,10 @@ __Result:__ - *resources* :: integer : Number of active resources for a user __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/23_01/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -3553,7 +3552,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[oauth](/developer/ejabberd-api/admin-tags/#oauth) +[oauth](../../developer/ejabberd-api/admin-tags.md#oauth) __Examples:__ @@ -3589,7 +3588,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[oauth](/developer/ejabberd-api/admin-tags/#oauth) +[oauth](../../developer/ejabberd-api/admin-tags.md#oauth) __Examples:__ @@ -3625,7 +3624,7 @@ __Result:__ - *result* :: {token::string, scopes::string, expires_in::string} __Tags:__ -[oauth](/developer/ejabberd-api/admin-tags/#oauth) +[oauth](../../developer/ejabberd-api/admin-tags.md#oauth) __Examples:__ @@ -3665,7 +3664,7 @@ __Result:__ - *tokens* :: [{token::string, user::string, scope::string, expires_in::string}] __Tags:__ -[oauth](/developer/ejabberd-api/admin-tags/#oauth) +[oauth](../../developer/ejabberd-api/admin-tags.md#oauth) __Examples:__ @@ -3710,7 +3709,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[oauth](/developer/ejabberd-api/admin-tags/#oauth) +[oauth](../../developer/ejabberd-api/admin-tags.md#oauth) __Examples:__ @@ -3726,7 +3725,7 @@ __Examples:__ ~~~ -
changed in 22.05
+
changed in 22.05
## oauth_revoke_token @@ -3742,7 +3741,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[oauth](/developer/ejabberd-api/admin-tags/#oauth) +[oauth](../../developer/ejabberd-api/admin-tags.md#oauth) __Examples:__ @@ -3773,7 +3772,7 @@ __Result:__ - *s2s_outgoing* :: integer __Tags:__ -[statistics](/developer/ejabberd-api/admin-tags/#statistics) [s2s](/developer/ejabberd-api/admin-tags/#s2s) +[statistics](../../developer/ejabberd-api/admin-tags.md#statistics) [s2s](../../developer/ejabberd-api/admin-tags.md#s2s) __Examples:__ @@ -3807,10 +3806,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[stanza](/developer/ejabberd-api/admin-tags/#stanza) +[stanza](../../developer/ejabberd-api/admin-tags.md#stanza) __Module:__ -[mod_admin_extra](/archive/23_01/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -3847,10 +3846,10 @@ __Result:__ - *res* :: string __Tags:__ -[private](/developer/ejabberd-api/admin-tags/#private) +[private](../../developer/ejabberd-api/admin-tags.md#private) __Module:__ -[mod_admin_extra](/archive/23_01/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -3887,10 +3886,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[private](/developer/ejabberd-api/admin-tags/#private) +[private](../../developer/ejabberd-api/admin-tags.md#private) __Module:__ -[mod_admin_extra](/archive/23_01/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -3964,10 +3963,10 @@ __Result:__ - *response* :: [{user::string, contact::string}] __Tags:__ -[roster](/developer/ejabberd-api/admin-tags/#roster) +[roster](../../developer/ejabberd-api/admin-tags.md#roster) __Module:__ -[mod_admin_extra](/archive/23_01/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -4013,10 +4012,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[roster](/developer/ejabberd-api/admin-tags/#roster) +[roster](../../developer/ejabberd-api/admin-tags.md#roster) __Module:__ -[mod_admin_extra](/archive/23_01/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -4058,10 +4057,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[roster](/developer/ejabberd-api/admin-tags/#roster) +[roster](../../developer/ejabberd-api/admin-tags.md#roster) __Module:__ -[mod_admin_extra](/archive/23_01/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -4100,10 +4099,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[roster](/developer/ejabberd-api/admin-tags/#roster) +[roster](../../developer/ejabberd-api/admin-tags.md#roster) __Module:__ -[mod_admin_extra](/archive/23_01/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -4137,7 +4136,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) __Examples:__ @@ -4171,7 +4170,7 @@ __Result:__ - *users* :: [username::string] : List of registered accounts usernames __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) __Examples:__ @@ -4205,7 +4204,7 @@ __Result:__ - *vhosts* :: [vhost::string] : List of available vhosts __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](../../developer/ejabberd-api/admin-tags.md#server) __Examples:__ @@ -4239,7 +4238,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[config](/developer/ejabberd-api/admin-tags/#config) +[config](../../developer/ejabberd-api/admin-tags.md#config) __Examples:__ @@ -4272,10 +4271,10 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mam](/developer/ejabberd-api/admin-tags/#mam) +[mam](../../developer/ejabberd-api/admin-tags.md#mam) __Module:__ -[mod_mam](/archive/23_01/modules/#mod-mam) +[mod_mam](modules.md#mod_mam) __Examples:__ @@ -4310,10 +4309,10 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mam](/developer/ejabberd-api/admin-tags/#mam) +[mam](../../developer/ejabberd-api/admin-tags.md#mam) __Module:__ -[mod_mam](/archive/23_01/modules/#mod-mam) +[mod_mam](modules.md#mod_mam) __Examples:__ @@ -4339,7 +4338,7 @@ __Examples:__ Reopen the log files after being renamed -This can be useful when an external tool is used for log rotation. See https://docs.ejabberd.im/admin/guide/troubleshooting/#log-files +This can be useful when an external tool is used for log rotation. See https://docs.ejabberd.im/admin/guide/troubleshooting/#log_files __Arguments:__ @@ -4349,7 +4348,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[logs](/developer/ejabberd-api/admin-tags/#logs) +[logs](../../developer/ejabberd-api/admin-tags.md#logs) __Examples:__ @@ -4381,7 +4380,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[acme](/developer/ejabberd-api/admin-tags/#acme) +[acme](../../developer/ejabberd-api/admin-tags.md#acme) __Examples:__ @@ -4415,10 +4414,10 @@ __Result:__ - *resource* :: string : Name of user resource __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/23_01/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -4451,7 +4450,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](../../developer/ejabberd-api/admin-tags.md#server) __Examples:__ @@ -4487,10 +4486,10 @@ __Result:__ - 2: code not reloaded, but module restarted __Tags:__ -[erlang](/developer/ejabberd-api/admin-tags/#erlang) +[erlang](../../developer/ejabberd-api/admin-tags.md#erlang) __Module:__ -[mod_admin_extra](/archive/23_01/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -4526,7 +4525,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -4558,7 +4557,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[acme](/developer/ejabberd-api/admin-tags/#acme) +[acme](../../developer/ejabberd-api/admin-tags.md#acme) __Examples:__ @@ -4593,10 +4592,10 @@ __Result:__ - *rooms* :: [room::string] : List of empty rooms that have been destroyed __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/23_01/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -4634,10 +4633,10 @@ __Result:__ - *rooms* :: [room::string] : List of empty rooms __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/23_01/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -4676,10 +4675,10 @@ __Result:__ - *rooms* :: [room::string] : List of unused rooms that has been destroyed __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/23_01/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -4719,10 +4718,10 @@ __Result:__ - *rooms* :: [room::string] : List of unused rooms __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/23_01/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -4757,7 +4756,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[logs](/developer/ejabberd-api/admin-tags/#logs) +[logs](../../developer/ejabberd-api/admin-tags.md#logs) __Examples:__ @@ -4781,7 +4780,7 @@ __Examples:__ Send a direct invitation to several destinations -Since ejabberd 20.12, this command is asynchronous: the API call may return before the server has send all the invitations. +Since ejabberd 20.12, this command is asynchronous: the API call may return before the server has send all the invitations. Password and Message can also be: none. Users JIDs are separated with : @@ -4798,10 +4797,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/23_01/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -4844,10 +4843,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[stanza](/developer/ejabberd-api/admin-tags/#stanza) +[stanza](../../developer/ejabberd-api/admin-tags.md#stanza) __Module:__ -[mod_admin_extra](/archive/23_01/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -4885,10 +4884,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[stanza](/developer/ejabberd-api/admin-tags/#stanza) +[stanza](../../developer/ejabberd-api/admin-tags.md#stanza) __Module:__ -[mod_admin_extra](/archive/23_01/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -4928,10 +4927,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[stanza](/developer/ejabberd-api/admin-tags/#stanza) +[stanza](../../developer/ejabberd-api/admin-tags.md#stanza) __Module:__ -[mod_admin_extra](/archive/23_01/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -4972,10 +4971,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[last](/developer/ejabberd-api/admin-tags/#last) +[last](../../developer/ejabberd-api/admin-tags.md#last) __Module:__ -[mod_admin_extra](/archive/23_01/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5010,7 +5009,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[logs](/developer/ejabberd-api/admin-tags/#logs) +[logs](../../developer/ejabberd-api/admin-tags.md#logs) __Examples:__ @@ -5045,7 +5044,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[cluster](/developer/ejabberd-api/admin-tags/#cluster) +[cluster](../../developer/ejabberd-api/admin-tags.md#cluster) __Examples:__ @@ -5079,10 +5078,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[vcard](/developer/ejabberd-api/admin-tags/#vcard) +[vcard](../../developer/ejabberd-api/admin-tags.md#vcard) __Module:__ -[mod_admin_extra](/archive/23_01/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5122,10 +5121,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/23_01/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5166,10 +5165,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/23_01/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -5218,10 +5217,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[vcard](/developer/ejabberd-api/admin-tags/#vcard) +[vcard](../../developer/ejabberd-api/admin-tags.md#vcard) __Module:__ -[mod_admin_extra](/archive/23_01/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5278,10 +5277,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[vcard](/developer/ejabberd-api/admin-tags/#vcard) +[vcard](../../developer/ejabberd-api/admin-tags.md#vcard) __Module:__ -[mod_admin_extra](/archive/23_01/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5339,10 +5338,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[vcard](/developer/ejabberd-api/admin-tags/#vcard) +[vcard](../../developer/ejabberd-api/admin-tags.md#vcard) __Module:__ -[mod_admin_extra](/archive/23_01/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5365,7 +5364,7 @@ __Examples:__ ~~~ -
changed in 21.07
+
changed in 21.07
## srg_create @@ -5392,10 +5391,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[shared_roster_group](/developer/ejabberd-api/admin-tags/#shared-roster-group) +[shared_roster_group](../../developer/ejabberd-api/admin-tags.md#shared_roster_group) __Module:__ -[mod_admin_extra](/archive/23_01/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5432,10 +5431,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[shared_roster_group](/developer/ejabberd-api/admin-tags/#shared-roster-group) +[shared_roster_group](../../developer/ejabberd-api/admin-tags.md#shared_roster_group) __Module:__ -[mod_admin_extra](/archive/23_01/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5469,10 +5468,10 @@ __Result:__ - *informations* :: [{key::string, value::string}] : List of group information, as key and value __Tags:__ -[shared_roster_group](/developer/ejabberd-api/admin-tags/#shared-roster-group) +[shared_roster_group](../../developer/ejabberd-api/admin-tags.md#shared_roster_group) __Module:__ -[mod_admin_extra](/archive/23_01/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5515,10 +5514,10 @@ __Result:__ - *members* :: [member::string] : List of group identifiers __Tags:__ -[shared_roster_group](/developer/ejabberd-api/admin-tags/#shared-roster-group) +[shared_roster_group](../../developer/ejabberd-api/admin-tags.md#shared_roster_group) __Module:__ -[mod_admin_extra](/archive/23_01/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5554,10 +5553,10 @@ __Result:__ - *groups* :: [id::string] : List of group identifiers __Tags:__ -[shared_roster_group](/developer/ejabberd-api/admin-tags/#shared-roster-group) +[shared_roster_group](../../developer/ejabberd-api/admin-tags.md#shared_roster_group) __Module:__ -[mod_admin_extra](/archive/23_01/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5595,10 +5594,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[shared_roster_group](/developer/ejabberd-api/admin-tags/#shared-roster-group) +[shared_roster_group](../../developer/ejabberd-api/admin-tags.md#shared_roster_group) __Module:__ -[mod_admin_extra](/archive/23_01/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5636,10 +5635,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[shared_roster_group](/developer/ejabberd-api/admin-tags/#shared-roster-group) +[shared_roster_group](../../developer/ejabberd-api/admin-tags.md#shared_roster_group) __Module:__ -[mod_admin_extra](/archive/23_01/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5674,10 +5673,10 @@ __Result:__ - *stat* :: integer : Integer statistic value __Tags:__ -[statistics](/developer/ejabberd-api/admin-tags/#statistics) +[statistics](../../developer/ejabberd-api/admin-tags.md#statistics) __Module:__ -[mod_admin_extra](/archive/23_01/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5710,10 +5709,10 @@ __Result:__ - *stat* :: integer : Integer statistic value __Tags:__ -[statistics](/developer/ejabberd-api/admin-tags/#statistics) +[statistics](../../developer/ejabberd-api/admin-tags.md#statistics) __Module:__ -[mod_admin_extra](/archive/23_01/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5745,7 +5744,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](../../developer/ejabberd-api/admin-tags.md#server) __Examples:__ @@ -5777,10 +5776,10 @@ __Result:__ - *users* :: [{user::string, host::string, resource::string, priority::integer, status::string}] __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/23_01/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5821,10 +5820,10 @@ __Result:__ - *users* :: [{user::string, host::string, resource::string, priority::integer, status::string}] __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/23_01/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5865,10 +5864,10 @@ __Result:__ - *users* :: integer : Number of connected sessions with given status type __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) [statistics](/developer/ejabberd-api/admin-tags/#statistics) +[session](../../developer/ejabberd-api/admin-tags.md#session) [statistics](../../developer/ejabberd-api/admin-tags.md#statistics) __Module:__ -[mod_admin_extra](/archive/23_01/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5901,10 +5900,10 @@ __Result:__ - *users* :: integer : Number of connected sessions with given status type __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) [statistics](/developer/ejabberd-api/admin-tags/#statistics) +[session](../../developer/ejabberd-api/admin-tags.md#session) [statistics](../../developer/ejabberd-api/admin-tags.md#statistics) __Module:__ -[mod_admin_extra](/archive/23_01/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5936,7 +5935,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](../../developer/ejabberd-api/admin-tags.md#server) __Examples:__ @@ -5973,7 +5972,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](../../developer/ejabberd-api/admin-tags.md#server) __Examples:__ @@ -6005,7 +6004,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[s2s](/developer/ejabberd-api/admin-tags/#s2s) +[s2s](../../developer/ejabberd-api/admin-tags.md#s2s) __Examples:__ @@ -6040,10 +6039,10 @@ __Result:__ - *nodes* :: [node::string] : The list of nodes that has subscribed __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/23_01/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -6065,7 +6064,7 @@ __Examples:__ ~~~ -
added in 22.05
+
added in 22.05
## subscribe_room_many @@ -6086,10 +6085,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/23_01/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -6135,10 +6134,10 @@ __Result:__ - *unbanned* :: integer : Amount of unbanned entries, or negative in case of error. __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) __Module:__ -[mod_fail2ban](/archive/23_01/modules/#mod-fail2ban) +[mod_fail2ban](modules.md#mod_fail2ban) __Examples:__ @@ -6174,7 +6173,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) __Examples:__ @@ -6208,10 +6207,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/23_01/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -6244,7 +6243,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](../../developer/ejabberd-api/admin-tags.md#server) __Examples:__ @@ -6275,7 +6274,7 @@ __Result:__ - *modules* :: [module::string] __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](../../developer/ejabberd-api/admin-tags.md#server) __Examples:__ @@ -6309,10 +6308,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[sql](/developer/ejabberd-api/admin-tags/#sql) +[sql](../../developer/ejabberd-api/admin-tags.md#sql) __Module:__ -[mod_admin_update_sql](/archive/23_01/modules/#mod-admin-update-sql) +[mod_admin_update_sql](modules.md#mod_admin_update_sql) __Examples:__ @@ -6345,7 +6344,7 @@ __Result:__ - *resources* :: [resource::string] __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Examples:__ @@ -6383,10 +6382,10 @@ __Result:__ - *sessions_info* :: [{connection::string, ip::string, port::integer, priority::integer, node::string, uptime::integer, status::string, resource::string, statustext::string}] __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/23_01/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ diff --git a/content/archive/22_05/index.md b/content/archive/22.05/index.md similarity index 60% rename from content/archive/22_05/index.md rename to content/archive/22.05/index.md index 7bfb63cc..3faeb58c 100644 --- a/content/archive/22_05/index.md +++ b/content/archive/22.05/index.md @@ -1,15 +1,11 @@ ---- -title: Archived Documentation for 22.05 -menu: 22.05 -order: 7794 ---- +# Archived Documentation for 22.05 This section contains some archived sections for ejabberd 22.05. If you are upgrading ejabberd from a previous release, you can check: -* [Specific version upgrade notes](/admin/upgrade/#specific-version-upgrade-notes) +* [Specific version upgrade notes](upgrade.md) * [ejabberd 22.05 release announcement](https://www.process-one.net/blog/ejabberd-22-05/) -* [Docs Github Compare from 21.12](https://github.com/processone/docs.ejabberd.im/compare/21.12...22.05) -* [ejabberd Github Compare from 21.12](https://github.com/processone/ejabberd/compare/21.12...22.05) +* [Docs Github Compare from 21.12](https://github.com/processone/docs.ejabberd.im/compare/21.12..22.05) +* [ejabberd Github Compare from 21.12](https://github.com/processone/ejabberd/compare/21.12..22.05) diff --git a/content/archive/22_05/listen-options.md b/content/archive/22.05/listen-options.md similarity index 77% rename from content/archive/22_05/listen-options.md rename to content/archive/22.05/listen-options.md index c5c8d62a..f85c63bf 100644 --- a/content/archive/22_05/listen-options.md +++ b/content/archive/22.05/listen-options.md @@ -1,10 +1,9 @@ --- -title: Listen Options -toc: true -menu: Listen Opts -order: 51 +search: + exclude: true --- +# Listen Options This is a detailed description of each option allowed by the listening modules: @@ -34,18 +33,18 @@ The default is to use system defined file if possible. This option is useful to define the file for a specific port listener. To set a file for all client listeners or for specific vhosts, you can use the -[`c2s_cafile`](/archive/22_05/toplevel/#c2s-cafile) top-level option. +[`c2s_cafile`](toplevel.md#c2s-cafile) top-level option. To set a file for all server connections, you can use the -[`s2s_cafile`](/archive/22_05/toplevel/#s2s-cafile) top-level option +[`s2s_cafile`](toplevel.md#s2s-cafile) top-level option or the -[`ca_file`](/archive/22_05/toplevel/#ca-file) top-level option. +[`ca_file`](toplevel.md#ca_file) top-level option. Please note: if this option is set in -[`ejabberd_c2s`](/archive/22_05/listen/#ejabberd-c2s) -or [`ejabberd_s2s_in`](/archive/22_05/listen/#ejabberd-s2s-in) +[`ejabberd_c2s`](listen.md#ejabberd_c2s) +or [`ejabberd_s2s_in`](listen.md#ejabberd_s2s-in) and the corresponding top-level option is also set -([`c2s_cafile`](/archive/22_05/toplevel/#c2s-cafile), -[`s2s_cafile`](/archive/22_05/toplevel/#s2s-cafile)), +([`c2s_cafile`](toplevel.md#c2s-cafile), +[`s2s_cafile`](toplevel.md#s2s-cafile)), then the top-level option is used, not this one. ## certfile @@ -56,15 +55,15 @@ Path to the certificate file. Only makes sense when the [`tls`](#tls) options is set. If this option is not set, you should set the -[`certfiles`](/archive/22_05/toplevel/#certfiles) top-level option -or configure [ACME](/admin/configuration/basic/#acme). +[`certfiles`](toplevel.md#certfiles) top-level option +or configure [ACME](../../admin/configuration/basic.md#acme). ## check_from *true | false* This option can be used with -[`ejabberd_service`](/archive/22_05/listen/#ejabberd-service) only. +[`ejabberd_service`](listen.md#ejabberd_service) only. [`XEP-0114`](https://xmpp.org/extensions/xep-0114.html) requires that the domain must match the hostname of the component. If this option is set to `false`, `ejabberd` will allow the component to send @@ -81,11 +80,11 @@ OpenSSL ciphers list in the same format accepted by ‘`openssl ciphers`’ command. Please note: if this option is set in -[`ejabberd_c2s`](/archive/22_05/listen/#ejabberd-c2s) -or [`ejabberd_s2s_in`](/archive/22_05/listen/#ejabberd-s2s-in) +[`ejabberd_c2s`](listen.md#ejabberd_c2s) +or [`ejabberd_s2s_in`](listen.md#ejabberd_s2s-in) and the corresponding top-level option is also set -([`c2s_ciphers`](/archive/22_05/toplevel/#c2s-ciphers), -[`s2s_ciphers`](/archive/22_05/toplevel/#s2s-ciphers)), +([`c2s_ciphers`](toplevel.md#c2s-ciphers), +[`s2s_ciphers`](toplevel.md#s2s-ciphers)), then the top-level option is used, not this one. ## custom_headers @@ -102,7 +101,7 @@ Default value is: `[]` If the HTTP request received by ejabberd contains the HTTP header `Host` with an ambiguous virtual host that doesn’t match any one defined in ejabberd (see - [Host Names](/admin/configuration/basic/#host-names)), + [Host Names](../../admin/configuration/basic.md#host_names)), then this configured HostName is set as the request Host. The default value of this option is: `undefined`. @@ -118,11 +117,11 @@ Full path to a file containing custom parameters for Diffie-Hellman key of security as using custom parameters. Please note: if this option is set in -[`ejabberd_c2s`](/archive/22_05/listen/#ejabberd-c2s) -or [`ejabberd_s2s_in`](/archive/22_05/listen/#ejabberd-s2s-in) +[`ejabberd_c2s`](listen.md#ejabberd_c2s) +or [`ejabberd_s2s_in`](listen.md#ejabberd_s2s-in) and the corresponding top-level option is also set -([`c2s_dhfile`](/archive/22_05/toplevel/#c2s-dhfile), -[`s2s_dhfile`](/archive/22_05/toplevel/#s2s-dhfile)), +([`c2s_dhfile`](toplevel.md#c2s-dhfile), +[`s2s_dhfile`](toplevel.md#s2s-dhfile)), then the top-level option is used, not this one. ## global_routes @@ -130,7 +129,7 @@ then the top-level option is used, not this one. *true | false* This option emulates legacy behaviour which registers all routes -defined in [`hosts`](/archive/22_05/toplevel/#hosts) +defined in [`hosts`](toplevel.md#hosts) on a component connected. This behaviour is considered harmful in the case when it's desired to multiplex different components on the same port, so, to disable it, @@ -145,7 +144,7 @@ to maintain backward compatibility with existing deployments. *{Hostname: [HostOption, ...]}* The external Jabber component that connects to this -[`ejabberd_service`](/archive/22_05/listen/#ejabberd-service) +[`ejabberd_service`](listen.md#ejabberd_service) can serve one or more hostnames. As `HostOption` you can define options for the component; currently the only allowed option is the password required to the component when attempt to @@ -169,10 +168,10 @@ This option specifies the maximum number of elements in the queue of corresponding connection (if any) will be terminated and error message will be logged. The reasonable value for this option depends on your hardware configuration. This option can be specified for - [`ejabberd_service`](/archive/22_05/listen/#ejabberd-service) - and [`ejabberd_c2s`](/archive/22_05/listen/#ejabberd-c2s) + [`ejabberd_service`](listen.md#ejabberd_service) + and [`ejabberd_c2s`](listen.md#ejabberd_c2s) listeners, or also globally for - [`ejabberd_s2s_out`](/archive/22_05/listen/#ejabberd-s2s-out). + [`ejabberd_s2s_out`](listen.md#ejabberd_s2s-out). If the option is not specified for `ejabberd_service` or `ejabberd_c2s` listeners, the globally configured value is used. The allowed values are integers and @@ -204,7 +203,7 @@ This option specifies an approximate maximum size in bytes of XML Specify the password to verify an external component that connects to the port. -
improved in 20.07
+
improved in 20.07
## port @@ -225,11 +224,11 @@ List of general options relating to SSL/TLS. These map to The default entry is: `"no_sslv3|cipher_server_preference|no_compression"` Please note: if this option is set in -[`ejabberd_c2s`](/archive/22_05/listen/#ejabberd-c2s) -or [`ejabberd_s2s_in`](/archive/22_05/listen/#ejabberd-s2s-in) +[`ejabberd_c2s`](listen.md#ejabberd_c2s) +or [`ejabberd_s2s_in`](listen.md#ejabberd_s2s-in) and the corresponding top-level option is also set -([`c2s_protocol_options`](/archive/22_05/toplevel/#c2s-protocol-options), -[`s2s_protocol_options`](/archive/22_05/toplevel/#s2s-protocol-options)), +([`c2s_protocol_options`](toplevel.md#c2s-protocol-options), +[`s2s_protocol_options`](toplevel.md#s2s-protocol-options)), then the top-level option is used, not this one. ## request_handlers @@ -237,7 +236,7 @@ then the top-level option is used, not this one. *{Path: Module}* To define one or several handlers that will serve HTTP requests in -[`ejabberd_http`](/archive/22_05/listen/#ejabberd-http). The +[`ejabberd_http`](listen.md#ejabberd_http). The Path is a string; so the URIs that start with that Path will be served by Module. For example, if you want `mod_foo` to serve the URIs that start with `/a/b/`, and you also want `mod_bosh` to @@ -248,7 +247,7 @@ To define one or several handlers that will serve HTTP requests in /bosh: mod_bosh /mqtt: mod_mqtt -
new in 21.07
+
new in 21.07
## send_timeout @@ -261,7 +260,7 @@ Sets the longest time that data can wait to be accepted to sent by OS socket. Tr *none | ShaperName* This option defines a shaper for the port (see section  -[Shapers](/admin/configuration/basic/#shapers)). +[Shapers](../../admin/configuration/basic.md#shapers)). The default value is `none`. ## shaper_rule @@ -269,8 +268,8 @@ This option defines a shaper for the port (see section  *none | ShaperRule* This option defines a shaper rule for -[`ejabberd_service`](/archive/22_05/listen/#ejabberd-service) (see -section [Shapers](/admin/configuration/basic/#shapers)). +[`ejabberd_service`](listen.md#ejabberd_service) (see +section [Shapers](../../admin/configuration/basic.md#shapers)). The recommended value is `fast`. ## starttls @@ -279,11 +278,11 @@ The recommended value is `fast`. This option specifies that STARTTLS encryption is available on connections to the port. You should also set the -[`certfiles`](/archive/22_05/toplevel/#certfiles) top-level option -or configure [ACME](/admin/configuration/basic/#acme). +[`certfiles`](toplevel.md#certfiles) top-level option +or configure [ACME](../../admin/configuration/basic.md#acme). This option gets implicitly enabled when enabling -[`starttls_required`](#starttls-required) or [`tls_verify`](#tls-verify). +[`starttls_required`](#starttls_required) or [`tls_verify`](#tls_verify). ## starttls_required @@ -292,8 +291,8 @@ This option gets implicitly enabled when enabling This option specifies that STARTTLS encryption is required on connections to the port. No unencrypted connections will be allowed. You should also set the -[`certfiles`](/archive/22_05/toplevel/#certfiles) top-level option -or configure [ACME](/admin/configuration/basic/#acme). +[`certfiles`](toplevel.md#certfiles) top-level option +or configure [ACME](../../admin/configuration/basic.md#acme). Enabling this option implicitly enables also the [`starttls`](#starttls) option. @@ -303,7 +302,7 @@ Enabling this option implicitly enables also the [`starttls`](#starttls) option. Allow specifying a tag in a `listen` section and later use it to have a special -[`api_permissions`](/archive/22_05/toplevel/#api-permissions) +[`api_permissions`](toplevel.md#api_permissions) just for it. For example: @@ -344,11 +343,11 @@ This option specifies that traffic on the port will be encrypted [`starttls`](#starttls). If this option is set, you should also set the - [`certfiles`](/archive/22_05/toplevel/#certfiles) top-level - option or configure [ACME](/admin/configuration/basic/#acme). + [`certfiles`](toplevel.md#certfiles) top-level + option or configure [ACME](../../admin/configuration/basic.md#acme). The option `tls` can also be used in - [`ejabberd_http`](/archive/22_05/listen/#ejabberd-http) + [`ejabberd_http`](listen.md#ejabberd_http) to support HTTPS. Enabling this option implicitly disables the [`starttls`](#starttls) option. @@ -361,11 +360,11 @@ Whether to enable or disable TLS compression. The default value is `false`. Please note: if this option is set in -[`ejabberd_c2s`](/archive/22_05/listen/#ejabberd-c2s) -or [`ejabberd_s2s_in`](/archive/22_05/listen/#ejabberd-s2s-in) +[`ejabberd_c2s`](listen.md#ejabberd_c2s) +or [`ejabberd_s2s_in`](listen.md#ejabberd_s2s-in) and the corresponding top-level option is also set -([`c2s_tls_compression`](/archive/22_05/toplevel/#c2s-tls-compression), -[`s2s_tls_compression`](/archive/22_05/toplevel/#s2s-tls-compression)), +([`c2s_tls_compression`](toplevel.md#c2s-tls-compression), +[`s2s_tls_compression`](toplevel.md#s2s-tls-compression)), then the top-level option is used, not this one. ## tls_verify diff --git a/content/archive/22_05/listen.md b/content/archive/22.05/listen.md similarity index 78% rename from content/archive/22_05/listen.md rename to content/archive/22.05/listen.md index 7d57336d..cb54c168 100644 --- a/content/archive/22_05/listen.md +++ b/content/archive/22.05/listen.md @@ -1,11 +1,8 @@ --- -title: Listen Modules -toc: true -menu: Listen Modules -order: 50 +search: + exclude: true --- - # Listen Option The **listen option** defines for which ports, addresses and network @@ -73,37 +70,37 @@ are: Handles c2s connections. Options: -[access](/archive/22_05/listen-options/#access), -[cafile](/archive/22_05/listen-options/#cafile), -[ciphers](/archive/22_05/listen-options/#ciphers), -[dhfile](/archive/22_05/listen-options/#dhfile), -[max_fsm_queue](/archive/22_05/listen-options/#max-fsm-queue), -[max_stanza_size](/archive/22_05/listen-options/#max-stanza-size), -[protocol_options](/archive/22_05/listen-options/#protocol-options), -[send_timeout](/archive/22_05/listen-options/#send-timeout), -[shaper](/archive/22_05/listen-options/#shaper), -[starttls](/archive/22_05/listen-options/#starttls), -[starttls_required](/archive/22_05/listen-options/#starttls-required), -[tls](/archive/22_05/listen-options/#tls), -[tls_compression](/archive/22_05/listen-options/#tls-compression), -[tls_verify](/archive/22_05/listen-options/#tls-verify), -[zlib](/archive/22_05/listen-options/#zlib). +[access](listen-options.md#access), +[cafile](listen-options.md#cafile), +[ciphers](listen-options.md#ciphers), +[dhfile](listen-options.md#dhfile), +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_stanza_size](listen-options.md#max_stanza_size), +[protocol_options](listen-options.md#protocol_options), +[send_timeout](listen-options.md#send_timeout), +[shaper](listen-options.md#shaper), +[starttls](listen-options.md#starttls), +[starttls_required](listen-options.md#starttls_required), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls_compression), +[tls_verify](listen-options.md#tls_verify), +[zlib](listen-options.md#zlib). ## ejabberd_s2s_in Handles incoming s2s connections. Options: -[cafile](/archive/22_05/listen-options/#cafile), -[ciphers](/archive/22_05/listen-options/#ciphers), -[dhfile](/archive/22_05/listen-options/#dhfile), -[max_fsm_queue](/archive/22_05/listen-options/#max-fsm-queue), -[max_stanza_size](/archive/22_05/listen-options/#max-stanza-size), -[protocol_options](/archive/22_05/listen-options/#protocol-options), -[send_timeout](/archive/22_05/listen-options/#send-timeout), -[shaper](/archive/22_05/listen-options/#shaper), -[tls](/archive/22_05/listen-options/#tls), -[tls_compression](/archive/22_05/listen-options/#tls-compression). +[cafile](listen-options.md#cafile), +[ciphers](listen-options.md#ciphers), +[dhfile](listen-options.md#dhfile), +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_stanza_size](listen-options.md#max_stanza_size), +[protocol_options](listen-options.md#protocol_options), +[send_timeout](listen-options.md#send_timeout), +[shaper](listen-options.md#shaper), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls_compression). ## ejabberd_service @@ -113,23 +110,23 @@ Interacts with an ([`XEP-0114`](https://xmpp.org/extensions/xep-0114.html)). Options: -[access](/archive/22_05/listen-options/#access), -[cafile](/archive/22_05/listen-options/#cafile), -[certfile](/archive/22_05/listen-options/#certfile), -[check_from](/archive/22_05/listen-options/#check-from), -[ciphers](/archive/22_05/listen-options/#ciphers), -[dhfile](/archive/22_05/listen-options/#dhfile), -[global_routes](/archive/22_05/listen-options/#global-routes), -[hosts](/archive/22_05/listen-options/#hosts), -[max_fsm_queue](/archive/22_05/listen-options/#max-fsm-queue), -[max_stanza_size](/archive/22_05/listen-options/#max-stanza-size), -[password](/archive/22_05/listen-options/#password), -[protocol_options](/archive/22_05/listen-options/#protocol-options), -[send_timeout](/archive/22_05/listen-options/#send-timeout), -[shaper](/archive/22_05/listen-options/#shaper), -[shaper_rule](/archive/22_05/listen-options/#shaper-rule), -[tls](/archive/22_05/listen-options/#tls), -[tls_compression](/archive/22_05/listen-options/#tls-compression). +[access](listen-options.md#access), +[cafile](listen-options.md#cafile), +[certfile](listen-options.md#certfile), +[check_from](listen-options.md#check_from), +[ciphers](listen-options.md#ciphers), +[dhfile](listen-options.md#dhfile), +[global_routes](listen-options.md#global_routes), +[hosts](listen-options.md#hosts), +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_stanza_size](listen-options.md#max_stanza_size), +[password](listen-options.md#password), +[protocol_options](listen-options.md#protocol_options), +[send_timeout](listen-options.md#send_timeout), +[shaper](listen-options.md#shaper), +[shaper_rule](listen-options.md#shaper_rule), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls_compression). ## ejabberd_sip @@ -137,13 +134,13 @@ Handles SIP requests as defined in [`RFC 3261`](https://tools.ietf.org/html/rfc3261). For details please check the -[ejabberd_sip](/archive/22_05/listen/#ejabberd-sip-1) -and [mod_sip](/archive/22_05/modules/#mod-sip) sections. +[ejabberd_sip](listen.md#ejabberd_sip_1) +and [mod_sip](modules.md#mod_sip) sections. General listener options: -[certfile](/archive/22_05/listen-options/#certfile), -[send_timeout](/archive/22_05/listen-options/#send-timeout), -[tls](/archive/22_05/listen-options/#tls). +[certfile](listen-options.md#certfile), +[send_timeout](listen-options.md#send_timeout), +[tls](listen-options.md#tls). ## ejabberd_stun @@ -152,7 +149,7 @@ Handles STUN/TURN requests as defined in [`RFC 5766`](https://tools.ietf.org/html/rfc5766). For the specific module options, please check the -[ejabberd_stun](/archive/22_05/listen/#ejabberd-stun-1) section: +[ejabberd_stun](listen.md#ejabberd_stun_1) section: `auth_realm`, `auth_type`, `server_name`, @@ -166,57 +163,57 @@ For the specific module options, please check the `use_turn`. General listener options: -[certfile](/archive/22_05/listen-options/#certfile), -[send_timeout](/archive/22_05/listen-options/#send-timeout), -[shaper](/archive/22_05/listen-options/#shaper), -[tls](/archive/22_05/listen-options/#tls), +[certfile](listen-options.md#certfile), +[send_timeout](listen-options.md#send_timeout), +[shaper](listen-options.md#shaper), +[tls](listen-options.md#tls), ## ejabberd_http Handles incoming HTTP connections. With the proper request handlers configured, this serves HTTP services like -[ACME](/admin/configuration/basic/#acme), -[API](/archive/22_05/modules/#mod-http-api), -[BOSH](/archive/22_05/modules/#mod-bosh), -[CAPTCHA](/admin/configuration/basic/#captcha), -[Fileserver](/archive/22_05/modules/#mod-http-fileserver), -[OAuth](/developer/ejabberd-api/oauth/), -[RegisterWeb](/archive/22_05/modules/#mod-register-web), -[Upload](/archive/22_05/modules/#mod-http-upload), -[WebAdmin](/admin/guide/managing/#web-admin), -[WebSocket](/archive/22_05/listen/#ejabberd-http-ws), -[XMP-RPC](/archive/22_05/listen/#ejabberd-xmlrpc). +[ACME](../../admin/configuration/basic.md#acme), +[API](modules.md#mod_http_api), +[BOSH](modules.md#mod_bosh), +[CAPTCHA](../../admin/configuration/basic.md#captcha), +[Fileserver](modules.md#mod_http_fileserver), +[OAuth](../../developer/ejabberd-api/oauth.md), +[RegisterWeb](modules.md#mod_register_web), +[Upload](modules.md#mod_http_upload), +[WebAdmin](../../admin/guide/managing.md#web_admin), +[WebSocket](listen.md#ejabberd_http_ws), +[XMP-RPC](listen.md#ejabberd_xmlrpc). Options: -[cafile](/archive/22_05/listen-options/#cafile), -[ciphers](/archive/22_05/listen-options/#ciphers), -[custom_headers](/archive/22_05/listen-options/#custom-headers), -[default_host](/archive/22_05/listen-options/#default-host), -[dhfile](/archive/22_05/listen-options/#dhfile), -[protocol_options](/archive/22_05/listen-options/#protocol-options), -[request_handlers](/archive/22_05/listen-options/#request-handlers), -[send_timeout](/archive/22_05/listen-options/#send-timeout), -[tag](/archive/22_05/listen-options/#tag), -[tls](/archive/22_05/listen-options/#tls), -[tls_compression](/archive/22_05/listen-options/#tls-compression), -and the [trusted_proxies](/archive/22_05/toplevel/#trusted-proxies) top-level option. +[cafile](listen-options.md#cafile), +[ciphers](listen-options.md#ciphers), +[custom_headers](listen-options.md#custom_headers), +[default_host](listen-options.md#default_host), +[dhfile](listen-options.md#dhfile), +[protocol_options](listen-options.md#protocol_options), +[request_handlers](listen-options.md#request_handlers), +[send_timeout](listen-options.md#send_timeout), +[tag](listen-options.md#tag), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls_compression), +and the [trusted_proxies](toplevel.md#trusted_proxies) top-level option. ## mod_mqtt Support for MQTT requires configuring `mod_mqtt` both in the -[listen](/archive/22_05/toplevel/#listen) and the -[modules](/archive/22_05/toplevel/#modules) sections. -Check the [mod_mqtt module](/archive/22_05/modules/#mod-mqtt) options, -and the [MQTT Support](/admin/guide/mqtt/) section. +[listen](toplevel.md#listen) and the +[modules](toplevel.md#modules) sections. +Check the [mod_mqtt module](modules.md#mod_mqtt) options, +and the [MQTT Support](../../admin/guide/mqtt/index.md) section. Listen options: -[backlog](/archive/22_05/listen-options/#backlog), -[max_fsm_queue](/archive/22_05/listen-options/#max-fsm-queue), -[max_payload_size](/archive/22_05/listen-options/#max-payload-size), -[send_timeout](/archive/22_05/listen-options/#send-timeout), -[tls](/archive/22_05/listen-options/#tls), -[tls_verify](/archive/22_05/listen-options/#tls-verify). +[backlog](listen-options.md#backlog), +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_payload_size](listen-options.md#max_payload_size), +[send_timeout](listen-options.md#send_timeout), +[tls](listen-options.md#tls), +[tls_verify](listen-options.md#tls_verify). @@ -339,14 +336,14 @@ And you should also add these in the case if TURN is enabled: ## SIP Configuration `ejabberd` has built-in SIP support. To activate this feature, -add the [`ejabberd_sip`](#ejabberd-sip) listen module, enable -[`mod_sip`](/archive/22_05/modules/#mod-sip) module +add the [`ejabberd_sip`](#ejabberd_sip) listen module, enable +[`mod_sip`](modules.md#mod_sip) module for the desired virtual host, and configure DNS properly. To add a listener you should configure `ejabberd_sip` listening module as described in [Listen](#listen-option) section. -If option [`tls`](/archive/22_05/listen-options/#tls) is specified, -option [`certfile`](/archive/22_05/listen-options/#certfile) +If option [`tls`](listen-options.md#tls) is specified, +option [`certfile`](listen-options.md#certfile) must be specified as well, otherwise incoming TLS connections would fail. @@ -426,9 +423,9 @@ section of an `ejabberd_http` listener: This module can be configured using those top-level options: -- [websocket\_origin](/archive/22_05/toplevel/#websocket-origin) -- [websocket\_ping\_interval](/archive/22_05/toplevel/#websocket-ping-interval) -- [websocket\_timeout](/archive/22_05/toplevel/#websocket-timeout) +- [websocket\_origin](toplevel.md#websocket_origin) +- [websocket\_ping\_interval](toplevel.md#websocket_ping_interval) +- [websocket\_timeout](toplevel.md#websocket_timeout) ## WebSocket Discovery @@ -451,13 +448,13 @@ There is an example configuration for WebSocket and Converse.js in the # ejabberd_xmlrpc Handles XML-RPC requests to execute -[ejabberd commands](/admin/guide/managing/#ejabberd-commands). +[ejabberd commands](../../admin/guide/managing.md#ejabberd_commands). It is configured as a request handler in -[ejabberd_http](/archive/22_05/listen/#ejabberd-http). +[ejabberd_http](listen.md#ejabberd_http). By default there is no restriction to who can execute what commands, so it is strongly recommended that you configure restrictions using -[API Permissions](/developer/ejabberd-api/permissions/). +[API Permissions](../../developer/ejabberd-api/permissions.md). This is the minimum configuration required to enable the feature: @@ -512,11 +509,11 @@ With that configuration, it is possible to execute two specific commands using print calling('registered_users', {'host':'localhost'}) It's possible to use OAuth for authentication instead of plain password, see -[OAuth Support](/developer/ejabberd-api/oauth/). +[OAuth Support](../../developer/ejabberd-api/oauth.md). In ejabberd 20.03 and older, it was possible to configure `ejabberd_xmlrpc` as a listener, see the old document for reference and example configuration: -[Listening Module](/admin/configuration/old/#listening-module). +[Listening Module](../old.md#listening_module). Just for reference, there's also the old [`ejabberd_xmlrpc documentation`](https://ejabberd.im/ejabberd_xmlrpc). @@ -543,7 +540,7 @@ For example, the following simple configuration defines: service. - Port 5281 listens for HTTP requests, using HTTPS to serve HTTP-Bind - (BOSH) and the Web Admin as explained in [Managing: Web Admin](/admin/guide/managing/#web-admin). The + (BOSH) and the Web Admin as explained in [Managing: Web Admin](../../admin/guide/managing.md#web_admin). The socket only listens connections to the IP address 127.0.0.1. @@ -617,7 +614,7 @@ In this example, the following configuration defines that: - Port 5280 is serving the Web Admin and the HTTP-Bind (BOSH) service in all the IPv4 addresses. Note that it is also possible to serve them - on different ports. The second example in section [Managing: Web Admin](/admin/guide/managing/#web-admin) shows + on different ports. The second example in section [Managing: Web Admin](../../admin/guide/managing.md#web_admin) shows how exactly this can be done. A request handler to serve MQTT over WebSocket is also defined. - All users except for the administrators have a traffic of limit diff --git a/content/archive/22_05/modules.md b/content/archive/22.05/modules.md similarity index 87% rename from content/archive/22_05/modules.md rename to content/archive/22.05/modules.md index 31f2226b..3cde5755 100644 --- a/content/archive/22_05/modules.md +++ b/content/archive/22.05/modules.md @@ -1,10 +1,9 @@ --- -title: Modules Options -toc: true -menu: Modules Opts -order: 95 +search: + exclude: true --- +# Modules Options mod\_adhoc ---------- @@ -83,9 +82,9 @@ mod\_admin\_update\_sql This module can be used to update existing SQL database from the default to the new schema. Check the section [Default and New -Schemas](/admin/configuration/database/#default-and-new-schemas) for details. +Schemas](../../admin/configuration/database.md#default_and_new_schemas) for details. Please note that only PostgreSQL is supported. When the module is loaded -use [update_sql](/archive/22_05/admin-api/#update-sql) API. +use [update_sql](admin-api.md#update_sql) API. The module has no options. @@ -102,7 +101,7 @@ it may broadcast a lot of messages. This module should be disabled for instances of ejabberd with hundreds of thousands users. The Ad-hoc Commands are listed in the Server Discovery. For this feature -to work, [mod_adhoc](/archive/22_05/modules/#mod-adhoc) must be enabled. +to work, [mod_adhoc](modules.md#mod_adhoc) must be enabled. The specific JIDs where messages can be sent are listed below. The first JID in each entry will apply only to the specified virtual host @@ -114,7 +113,7 @@ hosts in ejabberd: connected to several resources, only the resource with the highest priority will receive the message. If the registered user is not connected, the message will be stored offline in assumption that - offline storage (see [mod_offline](/archive/22_05/modules/#mod-offline)) is enabled. + offline storage (see [mod_offline](modules.md#mod_offline)) is enabled. - example.org/announce/online (example.org/announce/all-hosts/online):: The message is sent to all @@ -143,23 +142,23 @@ the message of the day. The default value is *none* (i.e. nobody is able to send such messages). - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/22_05/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/22_05/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/22_05/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/22_05/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/22_05/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_avatar ----------- @@ -172,8 +171,8 @@ Conversion](https://xmpp.org/extensions/xep-0398.html). Also, the module supports conversion between avatar image formats on the fly. -The module depends on [mod_vcard](/archive/22_05/modules/#mod-vcard), [mod_vcard_xupdate](/archive/22_05/modules/#mod-vcard-xupdate) and -[mod_pubsub](/archive/22_05/modules/#mod-pubsub). +The module depends on [mod_vcard](modules.md#mod_vcard), [mod_vcard_xupdate](modules.md#mod_vcard_xupdate) and +[mod_pubsub](modules.md#mod_pubsub). __Available options:__ @@ -261,15 +260,15 @@ while having to get through an HTTP proxy. __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/22_05/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/22_05/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/22_05/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **json**: *true | false* @@ -293,15 +292,15 @@ authentication. Basically, it creates a new session with anonymous authentication. The default value is *false*. - **queue\_type**: *ram | file* -Same as top-level [queue_type](/archive/22_05/toplevel/#queue-type) option, but applied to this module +Same as top-level [queue_type](toplevel.md#queue_type) option, but applied to this module only. - **ram\_db\_type**: *mnesia | sql | redis* -Same as top-level [default_ram_db](/archive/22_05/toplevel/#default-ram-db) option, but applied to this module +Same as top-level [default_ram_db](toplevel.md#default_ram_db) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/22_05/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. __**Example**:__ @@ -324,28 +323,28 @@ mod\_caps This module implements [XEP-0115: Entity Capabilities](https://xmpp.org/extensions/xep-0115.html). The main purpose of the module is to provide PEP functionality (see -[mod_pubsub](/archive/22_05/modules/#mod-pubsub)). +[mod_pubsub](modules.md#mod_pubsub)). __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/22_05/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/22_05/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/22_05/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/22_05/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/22_05/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_carboncopy --------------- @@ -392,7 +391,7 @@ mod\_configure The module provides server configuration functionality via [XEP-0050: Ad-Hoc Commands](https://xmpp.org/extensions/xep-0050.html). This module -requires [mod_adhoc](/archive/22_05/modules/#mod-adhoc) to be loaded. +requires [mod_adhoc](modules.md#mod_adhoc) to be loaded. The module has no options. @@ -402,15 +401,15 @@ mod\_conversejs This module serves a simple page for the [Converse](https://conversejs.org/) XMPP web browser client. -This module is available since ejabberd 21.12. Several options were -improved in ejabberd 22.05. +This module is available since ejabberd 21.12. Several options were +improved in ejabberd 22.05. To use this module, in addition to adding it to the *modules* section, you must also enable it in *listen* → *ejabberd\_http* → -[request\_handlers](/archive/22_05/listen-options/#request-handlers). +[request\_handlers](listen-options.md#request_handlers). Make sure either *mod\_bosh* or *ejabberd\_http\_ws* -[request\_handlers](/archive/22_05/listen-options/#request-handlers) are +[request\_handlers](listen-options.md#request_handlers) are enabled. When *conversejs\_css* and *conversejs\_script* are *auto*, by default @@ -428,7 +427,7 @@ value is *auto*. Converse CSS URL. The keyword *@HOST@* is replaced with the hostname. The default value is *auto*. -
added in 22.05
+
added in 22.05
- **conversejs\_options**: *{Name: Value}* Specify additional options to be passed to Converse. See [Converse @@ -436,7 +435,7 @@ configuration](https://conversejs.org/docs/html/configuration.html). Only boolean, integer and string values are supported; lists are not supported. -
added in 22.05
+
added in 22.05
- **conversejs\_resources**: *Path* Local path to the Converse files. If not set, the public Converse client @@ -520,7 +519,7 @@ external PEP service. > **Note** > -> This module is complementary to [mod_privilege](/archive/22_05/modules/#mod-privilege) but can also be used +> This module is complementary to [mod_privilege](modules.md#mod_privilege) but can also be used > separately. __Available options:__ @@ -670,11 +669,11 @@ This module serves small *host-meta* files as described in [XEP-0156: Discovering Alternative XMPP Connection Methods](https://xmpp.org/extensions/xep-0156.html). -This module is available since ejabberd 22.05. +This module is available since ejabberd 22.05. To use this module, in addition to adding it to the *modules* section, you must also enable it in *listen* → *ejabberd\_http* → -[request\_handlers](/archive/22_05/listen-options/#request-handlers). +[request\_handlers](listen-options.md#request_handlers). Notice it only works if ejabberd\_http has tls enabled. @@ -718,7 +717,7 @@ JSON data. To use this module, in addition to adding it to the *modules* section, you must also enable it in *listen* → *ejabberd\_http* → -[request\_handlers](/archive/22_05/listen-options/#request-handlers). +[request\_handlers](listen-options.md#request_handlers). To use a specific API version N, when defining the URL path in the request\_handlers, add a *vN*. For example: */api/v2: mod\_http\_api* @@ -840,7 +839,7 @@ URL from which that file can later be downloaded. In order to use this module, it must be enabled in *listen* → *ejabberd\_http* → -[request\_handlers](/archive/22_05/listen-options/#request-handlers). +[request\_handlers](listen-options.md#request_handlers). __Available options:__ @@ -886,7 +885,7 @@ option is *undefined*, this option is set to the same value as *put\_url*. The keyword @HOST@ is replaced with the virtual host name. NOTE: if GET requests are handled by *mod\_http\_upload*, the *get\_url* must match the *put\_url*. Setting it to a different value only makes -sense if an external web server or [mod_http_fileserver](/archive/22_05/modules/#mod-http-fileserver) is used to +sense if an external web server or [mod_http_fileserver](modules.md#mod_http_fileserver) is used to serve the uploaded files. - **host** @@ -1063,23 +1062,23 @@ of the ejabberd server. __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/22_05/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/22_05/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/22_05/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/22_05/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/22_05/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_legacy\_auth ----------------- @@ -1109,7 +1108,7 @@ The default value is *all*. - **assume\_mam\_usage**: *true | false* This option determines how ejabberd’s stream management code (see -[mod_stream_mgmt](/archive/22_05/modules/#mod-stream-mgmt)) handles unacknowledged messages when the connection +[mod_stream_mgmt](modules.md#mod_stream_mgmt)) handles unacknowledged messages when the connection is lost. Usually, such messages are either bounced or resent. However, neither is done for messages that were stored in the user’s MAM archive if this option is set to *true*. In this case, ejabberd assumes those @@ -1117,19 +1116,19 @@ messages will be retrieved from the archive. The default value is *false*. - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/22_05/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/22_05/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/22_05/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **clear\_archive\_on\_room\_destroy**: *true | false* -Whether to destroy message archive of a room (see [mod_muc](/archive/22_05/modules/#mod-muc)) when it +Whether to destroy message archive of a room (see [mod_muc](modules.md#mod_muc)) when it gets destroyed. The default value is *true*. - **compress\_xml**: *true | false* @@ -1138,7 +1137,7 @@ custom compression algorithm. This feature works only with SQL backends. The default value is *false*. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/22_05/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **default**: *always | never | roster* @@ -1155,7 +1154,7 @@ option. Once the server received a request, that user’s messages are archived as usual. The default value is *false*. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/22_05/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. - **user\_mucsub\_from\_muc\_archive**: *true | false* When this option is disabled, for each individual subscriber a separa @@ -1206,16 +1205,16 @@ mod\_mix This module is an experimental implementation of [XEP-0369: Mediated Information eXchange (MIX)](https://xmpp.org/extensions/xep-0369.html). -MIX support was added in ejabberd 16.03 as an experimental feature, -updated in 19.02, and is not yet ready to use in production. It’s +MIX support was added in ejabberd 16.03 as an experimental feature, +updated in 19.02, and is not yet ready to use in production. It’s asserted that the MIX protocol is going to replace the MUC protocol in -the future (see [mod_muc](/archive/22_05/modules/#mod-muc)). +the future (see [mod_muc](modules.md#mod_muc)). To learn more about how to use that feature, you can refer to our tutorial: [Getting started with XEP-0369: Mediated Information eXchange (MIX) v0.1](https://docs.ejabberd.im/tutorials/mix-010/). -The module depends on [mod_mam](/archive/22_05/modules/#mod-mam). +The module depends on [mod_mam](modules.md#mod_mam). __Available options:__ @@ -1224,7 +1223,7 @@ An access rule to control MIX channels creations. The default value is *all*. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/22_05/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **host** @@ -1258,23 +1257,23 @@ channels (either on your server or on any remote servers). __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/22_05/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/22_05/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/22_05/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/22_05/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/22_05/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_mqtt --------- @@ -1295,19 +1294,19 @@ Access rules to restrict access to topics for subscribers. By default there are no restrictions. - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/22_05/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/22_05/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/22_05/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/22_05/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **match\_retained\_limit**: *pos\_integer() | infinity* @@ -1326,11 +1325,11 @@ The maximum topic depth, i.e. the number of slashes (*/*) in the topic. The default value is *8*. - **queue\_type**: *ram | file* -Same as top-level [queue_type](/archive/22_05/toplevel/#queue-type) option, but applied to this module +Same as top-level [queue_type](toplevel.md#queue_type) option, but applied to this module only. - **ram\_db\_type**: *mnesia* -Same as top-level [default_ram_db](/archive/22_05/toplevel/#default-ram-db) option, but applied to this module +Same as top-level [default_ram_db](toplevel.md#default_ram_db) option, but applied to this module only. - **session\_expiry**: *timeout()* @@ -1339,7 +1338,7 @@ When *0* is set, the session gets destroyed when the underlying client connection is closed. The default value is *5* minutes. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/22_05/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_muc -------- @@ -1396,17 +1395,17 @@ Multi-User Chat service. The default is *all* for backward compatibility, which means that any user is allowed to register any free nick. -
added in 22.05
+
added in 22.05
- **cleanup\_affiliations\_on\_start**: *true | false* Remove affiliations for non-existing local users on startup. The default value is *false*. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/22_05/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. -
improved in 22.05
+
improved in 22.05
- **default\_room\_options**: *Options* This option allows to define the desired default room options. Note that @@ -1483,7 +1482,7 @@ using an XMPP client with MUC capability. The *Options* are: - **logging**: *true | false* The public messages are logged using - [mod_muc_log](/archive/22_05/modules/#mod-muc-log). The default value is *false*. + [mod_muc_log](modules.md#mod_muc_log). The default value is *false*. - **mam**: *true | false* Enable message archiving. Implies mod\_mam @@ -1580,14 +1579,14 @@ is not specified, the only Jabber ID will be the hostname of the virtual host with the prefix "conference.". The keyword *@HOST@* is replaced with the real virtual host name. -
added in 21.01
+
added in 21.01
- **max\_captcha\_whitelist**: *Number* This option defines the maximum number of characters that Captcha Whitelist can have when configuring the room. The default value is *infinity*. -
added in 21.01
+
added in 21.01
- **max\_password**: *Number* This option defines the maximum number of characters that Password can @@ -1670,11 +1669,11 @@ rooms is high: this will improve server startup time and memory consumption. - **queue\_type**: *ram | file* -Same as top-level [queue_type](/archive/22_05/toplevel/#queue-type) option, but applied to this module +Same as top-level [queue_type](toplevel.md#queue_type) option, but applied to this module only. - **ram\_db\_type**: *mnesia | sql* -Same as top-level [default_ram_db](/archive/22_05/toplevel/#default-ram-db) option, but applied to this module +Same as top-level [default_ram_db](toplevel.md#default_ram_db) option, but applied to this module only. - **regexp\_room\_id**: *string()* @@ -1725,11 +1724,11 @@ This module provides commands to administer local MUC services and their MUC rooms. It also provides simple WebAdmin pages to view the existing rooms. -This module depends on [mod_muc](/archive/22_05/modules/#mod-muc). +This module depends on [mod_muc](modules.md#mod_muc). __Available options:__ -
added in 22.05
+
added in 22.05
- **subscribe\_room\_many\_max\_users**: *Number* How many users can be subscribed to a room at once using the @@ -1771,7 +1770,7 @@ Features: - A custom link can be added on top of each page. -The module depends on [mod_muc](/archive/22_05/modules/#mod-muc). +The module depends on [mod_muc](modules.md#mod_muc). __Available options:__ @@ -1967,15 +1966,15 @@ on large MucSub services. The default value is *false*, meaning the optimisation is enabled. - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/22_05/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/22_05/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/22_05/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **store\_empty\_body**: *true | false | unless\_chat\_state* @@ -1990,7 +1989,7 @@ Whether or not to store groupchat messages. The default value is *false*. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/22_05/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. - **use\_mam\_for\_storage**: *true | false* This is an experimental option. Enabling this option, *mod\_offline* @@ -2061,7 +2060,7 @@ or checking availability. The default value is *false*. What to do when a client does not answer to a server ping request in less than period defined in *ping\_ack\_timeout* option: *kill* means destroying the underlying connection, *none* means to do nothing. NOTE: -when [mod_stream_mgmt](/archive/22_05/modules/#mod-stream-mgmt) is loaded and stream management is enabled by a +when [mod_stream_mgmt](modules.md#mod_stream_mgmt) is loaded and stream management is enabled by a client, killing the client connection doesn’t mean killing the client session - the session will be kept alive in order to give the client a chance to resume it. The default value is *none*. @@ -2115,28 +2114,28 @@ Lists](https://xmpp.org/extensions/xep-0016.html). > Nowadays modern XMPP clients rely on [XEP-0191: Blocking > Command](https://xmpp.org/extensions/xep-0191.html) which is > implemented by *mod\_blocking* module. However, you still need -> *mod\_privacy* loaded in order for [mod_blocking](/archive/22_05/modules/#mod-blocking) to work. +> *mod\_privacy* loaded in order for [mod_blocking](modules.md#mod_blocking) to work. __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/22_05/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/22_05/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/22_05/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/22_05/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/22_05/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_private ------------ @@ -2154,23 +2153,23 @@ Bookmarks](https://xmpp.org/extensions/xep-0048.html)). __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/22_05/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/22_05/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/22_05/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/22_05/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/22_05/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_privilege -------------- @@ -2200,7 +2199,7 @@ Check the section about listening ports for more information. > **Note** > -> This module is complementary to [mod_delegation](/archive/22_05/modules/#mod-delegation), but can also be +> This module is complementary to [mod_delegation](modules.md#mod_delegation), but can also be > used separately. __Available options:__ @@ -2313,7 +2312,7 @@ A port number to listen for incoming connections. The default value is *7777*. - **ram\_db\_type**: *mnesia | redis | sql* -Same as top-level [default_ram_db](/archive/22_05/toplevel/#default-ram-db) option, but applied to this module +Same as top-level [default_ram_db](toplevel.md#default_ram_db) option, but applied to this module only. - **recbuf**: *Size* @@ -2398,7 +2397,7 @@ Publish-Subscribe](https://xmpp.org/extensions/xep-0060.html). The functionality in *mod\_pubsub* can be extended using plugins. The plugin that implements PEP ([XEP-0163: Personal Eventing via Pubsub](https://xmpp.org/extensions/xep-0163.html)) is enabled in the -default ejabberd configuration file, and it requires [mod_caps](/archive/22_05/modules/#mod-caps). +default ejabberd configuration file, and it requires [mod_caps](modules.md#mod_caps). __Available options:__ @@ -2408,7 +2407,7 @@ using *acl* and *access*. By default any account in the local ejabberd server is allowed to create pubsub nodes. The default value is: *all*. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/22_05/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **default\_node\_config**: *List of Key:Value* @@ -2449,7 +2448,7 @@ systems with not so many nodes, caching last items speeds up pubsub and allows to raise user connection rate. The cost is memory usage, as every item is stored in memory. -
added in 21.12
+
added in 21.12
- **max\_item\_expire\_node**: *timeout() | infinity* Specify the maximum item epiry time. Default value is: *infinity*. @@ -2593,19 +2592,19 @@ platform-dependant backend services such as FCM or APNS. __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/22_05/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/22_05/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/22_05/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/22_05/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **include\_body**: *true | false | Text* @@ -2623,19 +2622,19 @@ notifications generated for incoming messages with a body. The default value is *false*. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/22_05/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_push\_keepalive -------------------- This module tries to keep the stream management session (see -[mod_stream_mgmt](/archive/22_05/modules/#mod-stream-mgmt)) of a disconnected mobile client alive if the client +[mod_stream_mgmt](modules.md#mod_stream_mgmt)) of a disconnected mobile client alive if the client enabled push notifications for that session. However, the normal session resumption timeout is restored once a push notification is issued, so the session will be closed if the client doesn’t respond to push notifications. -The module depends on [mod_push](/archive/22_05/modules/#mod-push). +The module depends on [mod_push](modules.md#mod_push). __Available options:__ @@ -2643,7 +2642,7 @@ __Available options:__ This option specifies the period of time until the session of a disconnected push client times out. This timeout is only in effect as long as no push notification is issued. Once that happened, the -resumption timeout configured for [mod_stream_mgmt](/archive/22_05/modules/#mod-stream-mgmt) is restored. The +resumption timeout configured for [mod_stream_mgmt](modules.md#mod_stream_mgmt) is restored. The default value is *72* hours. - **wake\_on\_start**: *true | false* @@ -2671,7 +2670,7 @@ enables end users to use an XMPP client to: - Delete an existing account on the server. -This module reads also the top-level [registration_timeout](/archive/22_05/toplevel/#registration-timeout) option +This module reads also the top-level [registration_timeout](toplevel.md#registration_timeout) option defined globally for the server, so please check that option documentation too. @@ -2692,7 +2691,7 @@ uncontrolled massive accounts creation by rogue users. Specify rules to restrict access for user unregistration. By default any user is able to unregister their account. -
added in 21.12
+
added in 21.12
- **allow\_modules**: *all | \[Module, ...\]* List of modules that can register accounts, or *all*. The default value @@ -2700,7 +2699,7 @@ is *all*, which is equivalent to something like *\[mod\_register, mod\_register\_web\]*. - **captcha\_protected**: *true | false* -Protect registrations with [CAPTCHA](/admin/configuration/basic/#captcha). The +Protect registrations with [CAPTCHA](../../admin/configuration/basic.md#captcha). The default is *false*. - **ip\_access**: *AccessName* @@ -2739,9 +2738,9 @@ This module provides a web page where users can: - Unregister an existing account on the server. -This module supports [CAPTCHA](/admin/configuration/basic/#captcha) to register a +This module supports [CAPTCHA](../../admin/configuration/basic.md#captcha) to register a new account. To enable this feature, configure the top-level -[captcha_cmd](/archive/22_05/toplevel/#captcha-cmd) and top-level [captcha_url](/archive/22_05/toplevel/#captcha-url) options. +[captcha_cmd](toplevel.md#captcha_cmd) and top-level [captcha_url](toplevel.md#captcha_url) options. As an example usage, the users of the host *localhost* can visit the page: *https://localhost:5280/register/* It is important to include the @@ -2749,8 +2748,8 @@ last / character in the URL, otherwise the subpages URL will be incorrect. This module is enabled in *listen* → *ejabberd\_http* → -[request\_handlers](/archive/22_05/listen-options/#request-handlers), no need -to enable in *modules*. The module depends on [mod_register](/archive/22_05/modules/#mod-register) where all +[request\_handlers](listen-options.md#request_handlers), no need +to enable in *modules*. The module depends on [mod_register](modules.md#mod_register) where all the configuration is performed. The module has no options. @@ -2785,19 +2784,19 @@ add/remove/modify contacts or send presence subscriptions. The default value is *all*, i.e. no restrictions. - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/22_05/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/22_05/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/22_05/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/22_05/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **store\_current\_id**: *true | false* @@ -2807,11 +2806,11 @@ calculated on the fly each time. Enabling this option reduces the load for both ejabberd and the database. This option does not affect the client in any way. This option is only useful if option *versioning* is set to *true*. The default value is *false*. IMPORTANT: if you use -[mod_shared_roster](/archive/22_05/modules/#mod-shared-roster) or [mod_shared_roster_ldap](/archive/22_05/modules/#mod-shared-roster-ldap), you must set the +[mod_shared_roster](modules.md#mod_shared_roster) or [mod_shared_roster_ldap](modules.md#mod_shared_roster_ldap), you must set the value of the option to *false*. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/22_05/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. - **versioning**: *true | false* Enables/disables Roster Versioning. The default value is *false*. @@ -2921,29 +2920,29 @@ parameters: group’s members. A group of other vhost can be identified with *groupid@vhost*. -This module depends on [mod_roster](/archive/22_05/modules/#mod-roster). If not enabled, roster queries +This module depends on [mod_roster](modules.md#mod_roster). If not enabled, roster queries will return 503 errors. __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/22_05/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/22_05/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/22_05/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/22_05/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/22_05/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. __Examples:__ @@ -3022,25 +3021,25 @@ password in multiple places. - Connection parameters: The module also accepts the connection parameters, all of which default to the top-level parameter of the same name, if unspecified. See [LDAP - Connection](/admin/configuration/ldap/#ldap-connection) section for more + Connection](../../admin/configuration/ldap.md#ldap_connection) section for more information about them. -Check also the [Configuration examples](/admin/configuration/ldap/#ldap-examples) +Check also the [Configuration examples](../../admin/configuration/ldap.md#ldap_examples) section to get details about retrieving the roster, and configuration examples including Flat DIT and Deep DIT. __Available options:__ - **cache\_life\_time** -Same as top-level [cache_life_time](/archive/22_05/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed** -Same as top-level [cache_missed](/archive/22_05/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size** -Same as top-level [cache_size](/archive/22_05/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **ldap\_auth\_check**: *true | false* @@ -3049,24 +3048,24 @@ subsystem) for existence of each user in the shared LDAP roster. Set to *false* if you want to disable the check. Default value is *true*. - **ldap\_backups** -Same as top-level [ldap_backups](/archive/22_05/toplevel/#ldap-backups) option, but applied to this module +Same as top-level [ldap_backups](toplevel.md#ldap_backups) option, but applied to this module only. - **ldap\_base** -Same as top-level [ldap_base](/archive/22_05/toplevel/#ldap-base) option, but applied to this module only. +Same as top-level [ldap_base](toplevel.md#ldap_base) option, but applied to this module only. - **ldap\_deref\_aliases** -Same as top-level [ldap_deref_aliases](/archive/22_05/toplevel/#ldap-deref-aliases) option, but applied to this +Same as top-level [ldap_deref_aliases](toplevel.md#ldap_deref_aliases) option, but applied to this module only. - **ldap\_encrypt** -Same as top-level [ldap_encrypt](/archive/22_05/toplevel/#ldap-encrypt) option, but applied to this module +Same as top-level [ldap_encrypt](toplevel.md#ldap_encrypt) option, but applied to this module only. - **ldap\_filter** Additional filter which is AND-ed together with "User Filter" and "Group Filter". For more information check the LDAP -[Filters](/admin/configuration/ldap/#filters) section. +[Filters](../../admin/configuration/ldap.md#filters) section. - **ldap\_gfilter** "Group Filter", used when retrieving human-readable name (a.k.a. @@ -3103,14 +3102,14 @@ section Filters. - **ldap\_memberattr\_format\_re** A regex for extracting user ID from the value of the attribute named by *ldap\_memberattr*. Check the LDAP [Control -Parameters](/admin/configuration/ldap/#control-parameters) section. +Parameters](../../admin/configuration/ldap.md#control_parameters) section. - **ldap\_password** -Same as top-level [ldap_password](/archive/22_05/toplevel/#ldap-password) option, but applied to this module +Same as top-level [ldap_password](toplevel.md#ldap_password) option, but applied to this module only. - **ldap\_port** -Same as top-level [ldap_port](/archive/22_05/toplevel/#ldap-port) option, but applied to this module only. +Same as top-level [ldap_port](toplevel.md#ldap_port) option, but applied to this module only. - **ldap\_rfilter** So called "Roster Filter". Used to find names of all "shared roster" @@ -3119,37 +3118,37 @@ defaults to the top-level parameter of the same name. You must specify it in some place in the configuration, there is no default. - **ldap\_rootdn** -Same as top-level [ldap_rootdn](/archive/22_05/toplevel/#ldap-rootdn) option, but applied to this module +Same as top-level [ldap_rootdn](toplevel.md#ldap_rootdn) option, but applied to this module only. - **ldap\_servers** -Same as top-level [ldap_servers](/archive/22_05/toplevel/#ldap-servers) option, but applied to this module +Same as top-level [ldap_servers](toplevel.md#ldap_servers) option, but applied to this module only. - **ldap\_tls\_cacertfile** -Same as top-level [ldap_tls_cacertfile](/archive/22_05/toplevel/#ldap-tls-cacertfile) option, but applied to this +Same as top-level [ldap_tls_cacertfile](toplevel.md#ldap_tls_cacertfile) option, but applied to this module only. - **ldap\_tls\_certfile** -Same as top-level [ldap_tls_certfile](/archive/22_05/toplevel/#ldap-tls-certfile) option, but applied to this +Same as top-level [ldap_tls_certfile](toplevel.md#ldap_tls_certfile) option, but applied to this module only. - **ldap\_tls\_depth** -Same as top-level [ldap_tls_depth](/archive/22_05/toplevel/#ldap-tls-depth) option, but applied to this module +Same as top-level [ldap_tls_depth](toplevel.md#ldap_tls_depth) option, but applied to this module only. - **ldap\_tls\_verify** -Same as top-level [ldap_tls_verify](/archive/22_05/toplevel/#ldap-tls-verify) option, but applied to this module +Same as top-level [ldap_tls_verify](toplevel.md#ldap_tls_verify) option, but applied to this module only. - **ldap\_ufilter** "User Filter", used for retrieving the human-readable name of roster entries (usually full names of people in the roster). See also the parameters *ldap\_userdesc* and *ldap\_useruid*. For more information -check the LDAP [Filters](/admin/configuration/ldap/#filters) section. +check the LDAP [Filters](../../admin/configuration/ldap.md#filters) section. - **ldap\_uids** -Same as top-level [ldap_uids](/archive/22_05/toplevel/#ldap-uids) option, but applied to this module only. +Same as top-level [ldap_uids](toplevel.md#ldap_uids) option, but applied to this module only. - **ldap\_userdesc** The name of the attribute which holds the human-readable user name. @@ -3167,7 +3166,7 @@ retrieved from the *ldap\_memberattr* attribute of a group object. Retrieved from results of the "User Filter". Defaults to *cn*. - **use\_cache** -Same as top-level [use_cache](/archive/22_05/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_sic -------- @@ -3194,7 +3193,7 @@ virtual host. > > It is not enough to just load this module. You should also configure > listeners and DNS records properly. For details see the section about -> the [ejabberd\_sip](/archive/22_05/listen/#ejabberd-sip) listen module in +> the [ejabberd\_sip](listen.md#ejabberd_sip) listen module in > the ejabberd Documentation. __Available options:__ @@ -3296,11 +3295,11 @@ A time to wait for stanza acknowledgements. Setting it to *infinity* effectively disables the timeout. The default value is *1* minute. - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/22_05/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. The default value is *48 hours*. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/22_05/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **max\_ack\_queue**: *Size* @@ -3323,7 +3322,7 @@ default *resume\_timeout*. By default, it is set to the same value as the *resume\_timeout* option. - **queue\_type**: *ram | file* -Same as top-level [queue_type](/archive/22_05/toplevel/#queue-type) option, but applied to this module +Same as top-level [queue_type](toplevel.md#queue_type) option, but applied to this module only. - **resend\_on\_timeout**: *true | false | if\_offline* @@ -3352,7 +3351,7 @@ mod\_stun\_disco This module allows XMPP clients to discover STUN/TURN services and to obtain temporary credentials for using them as per [XEP-0215: External Service Discovery](https://xmpp.org/extensions/xep-0215.html). This -module is included in ejabberd since version 20.04. +module is included in ejabberd since version 20.04. __Available options:__ @@ -3489,19 +3488,19 @@ fields should return all users who added some information to their vCard. The default value is *false*. - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/22_05/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/22_05/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/22_05/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql | ldap* -Same as top-level [default_db](/archive/22_05/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **host** @@ -3531,7 +3530,7 @@ ignored and the Jabber User Directory service will not appear in the Service Discovery item list. The default value is *false*. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/22_05/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. - **vcard**: *vCard* A custom vCard of the server that will be displayed by some XMPP clients @@ -3561,33 +3560,33 @@ will be translated to: __Available options for *ldap* backend:__ - **ldap\_backups** -Same as top-level [ldap_backups](/archive/22_05/toplevel/#ldap-backups) option, but applied to this module +Same as top-level [ldap_backups](toplevel.md#ldap_backups) option, but applied to this module only. - **ldap\_base** -Same as top-level [ldap_base](/archive/22_05/toplevel/#ldap-base) option, but applied to this module only. +Same as top-level [ldap_base](toplevel.md#ldap_base) option, but applied to this module only. - **ldap\_deref\_aliases** -Same as top-level [ldap_deref_aliases](/archive/22_05/toplevel/#ldap-deref-aliases) option, but applied to this +Same as top-level [ldap_deref_aliases](toplevel.md#ldap_deref_aliases) option, but applied to this module only. - **ldap\_encrypt** -Same as top-level [ldap_encrypt](/archive/22_05/toplevel/#ldap-encrypt) option, but applied to this module +Same as top-level [ldap_encrypt](toplevel.md#ldap_encrypt) option, but applied to this module only. - **ldap\_filter** -Same as top-level [ldap_filter](/archive/22_05/toplevel/#ldap-filter) option, but applied to this module +Same as top-level [ldap_filter](toplevel.md#ldap_filter) option, but applied to this module only. - **ldap\_password** -Same as top-level [ldap_password](/archive/22_05/toplevel/#ldap-password) option, but applied to this module +Same as top-level [ldap_password](toplevel.md#ldap_password) option, but applied to this module only. - **ldap\_port** -Same as top-level [ldap_port](/archive/22_05/toplevel/#ldap-port) option, but applied to this module only. +Same as top-level [ldap_port](toplevel.md#ldap_port) option, but applied to this module only. - **ldap\_rootdn** -Same as top-level [ldap_rootdn](/archive/22_05/toplevel/#ldap-rootdn) option, but applied to this module +Same as top-level [ldap_rootdn](toplevel.md#ldap_rootdn) option, but applied to this module only. - **ldap\_search\_fields**: *{Name: Attribute, ...}* @@ -3634,27 +3633,27 @@ The default is: "Organization Unit": ORGUNIT - **ldap\_servers** -Same as top-level [ldap_servers](/archive/22_05/toplevel/#ldap-servers) option, but applied to this module +Same as top-level [ldap_servers](toplevel.md#ldap_servers) option, but applied to this module only. - **ldap\_tls\_cacertfile** -Same as top-level [ldap_tls_cacertfile](/archive/22_05/toplevel/#ldap-tls-cacertfile) option, but applied to this +Same as top-level [ldap_tls_cacertfile](toplevel.md#ldap_tls_cacertfile) option, but applied to this module only. - **ldap\_tls\_certfile** -Same as top-level [ldap_tls_certfile](/archive/22_05/toplevel/#ldap-tls-certfile) option, but applied to this +Same as top-level [ldap_tls_certfile](toplevel.md#ldap_tls_certfile) option, but applied to this module only. - **ldap\_tls\_depth** -Same as top-level [ldap_tls_depth](/archive/22_05/toplevel/#ldap-tls-depth) option, but applied to this module +Same as top-level [ldap_tls_depth](toplevel.md#ldap_tls_depth) option, but applied to this module only. - **ldap\_tls\_verify** -Same as top-level [ldap_tls_verify](/archive/22_05/toplevel/#ldap-tls-verify) option, but applied to this module +Same as top-level [ldap_tls_verify](toplevel.md#ldap_tls_verify) option, but applied to this module only. - **ldap\_uids** -Same as top-level [ldap_uids](/archive/22_05/toplevel/#ldap-uids) option, but applied to this module only. +Same as top-level [ldap_uids](toplevel.md#ldap_uids) option, but applied to this module only. - **ldap\_vcard\_map**: *{Name: {Pattern, LDAPattributes}, ...}* With this option you can set the table that maps LDAP attributes to @@ -3720,31 +3719,31 @@ that change frequently their presence. However, the overhead is significantly reduced by the use of caching, so you probably don’t want to set *use\_cache* to *false*. -The module depends on [mod_vcard](/archive/22_05/modules/#mod-vcard). +The module depends on [mod_vcard](modules.md#mod_vcard). > **Note** > > Nowadays [XEP-0153](https://xmpp.org/extensions/xep-0153.html) is used > mostly as "read-only", i.e. modern clients don’t publish their avatars > inside vCards. Thus in the majority of cases the module is only used -> along with [mod_avatar](/archive/22_05/modules/#mod-avatar) for providing backward compatibility. +> along with [mod_avatar](modules.md#mod_avatar) for providing backward compatibility. __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/22_05/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/22_05/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/22_05/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/22_05/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_version ------------ diff --git a/content/archive/22_05/toplevel.md b/content/archive/22.05/toplevel.md similarity index 82% rename from content/archive/22_05/toplevel.md rename to content/archive/22.05/toplevel.md index 58911bd7..31048a6a 100644 --- a/content/archive/22_05/toplevel.md +++ b/content/archive/22.05/toplevel.md @@ -1,21 +1,20 @@ --- -title: Top-Level Options -toc: true -menu: Top-Level Opts -order: 80 +search: + exclude: true --- +# Top-Level Options ## access\_rules *{AccessName: {allow|deny: ACLRules|ACLName}}* -This option defines [Access Rules](/admin/configuration/basic/#access-rules). Each +This option defines [Access Rules](../../admin/configuration/basic.md#access_rules). Each access rule is assigned a name that can be referenced from other parts of the configuration file (mostly from *access* options of ejabberd modules). Each rule definition may contain arbitrary number of *allow* or *deny* sections, and each section may contain any number of ACL rules -(see [acl](/archive/22_05/toplevel/#acl) option). There are no access rules defined by default. +(see [acl](toplevel.md#acl) option). There are no access rules defined by default. **Example**: @@ -52,7 +51,7 @@ address). Every set of rules has name *ACLName*: it can be any string except *all* or *none* (those are predefined names for the rules that match all or nothing respectively). The name *ACLName* can be referenced from other parts of the configuration file, for example in -[access_rules](/archive/22_05/toplevel/#access-rules) option. The rules of *ACLName* are represented by +[access_rules](toplevel.md#access_rules) option. The rules of *ACLName* are represented by mapping *{ACLType: ACLValue}*. These can be one of the following: - **ip**: *Network* @@ -120,7 +119,7 @@ mapping *{ACLType: ACLValue}*. These can be one of the following: *Options* -[ACME](/admin/configuration/basic/#acme) configuration, to automatically obtain SSL +[ACME](../../admin/configuration/basic.md#acme) configuration, to automatically obtain SSL certificates for the domains served by ejabberd, which means that certificate requests and renewals are performed to some CA server (aka "ACME server") in a fully automated mode. The *Options* are: @@ -214,22 +213,22 @@ specific modules to certain virtual hosts. To accomplish that, *timeout()* -Same as [cache_life_time](/archive/22_05/toplevel/#cache-life-time), but applied to authentication cache only. -If not set, the value from [cache_life_time](/archive/22_05/toplevel/#cache-life-time) will be used. +Same as [cache_life_time](toplevel.md#cache_life_time), but applied to authentication cache only. +If not set, the value from [cache_life_time](toplevel.md#cache_life_time) will be used. ## auth\_cache\_missed *true | false* -Same as [cache_missed](/archive/22_05/toplevel/#cache-missed), but applied to authentication cache only. If -not set, the value from [cache_missed](/archive/22_05/toplevel/#cache-missed) will be used. +Same as [cache_missed](toplevel.md#cache_missed), but applied to authentication cache only. If +not set, the value from [cache_missed](toplevel.md#cache_missed) will be used. ## auth\_cache\_size *pos\_integer() | infinity* -Same as [cache_size](/archive/22_05/toplevel/#cache-size), but applied to authentication cache only. If not -set, the value from [cache_size](/archive/22_05/toplevel/#cache-size) will be used. +Same as [cache_size](toplevel.md#cache_size), but applied to authentication cache only. If not +set, the value from [cache_size](toplevel.md#cache_size) will be used. ## auth\_method @@ -248,7 +247,7 @@ be installed from the [ejabberd-contrib](https://github.com/processone/ejabberd-contrib) Git repository. Please refer to that module’s README file for details. -
improved in 20.01
+
improved in 20.01
## auth\_password\_format @@ -282,8 +281,8 @@ authenticate. The default value is *sha*. *true | false* -Same as [use_cache](/archive/22_05/toplevel/#use-cache), but applied to authentication cache only. If not -set, the value from [use_cache](/archive/22_05/toplevel/#use-cache) will be used. +Same as [use_cache](toplevel.md#use_cache), but applied to authentication cache only. If not +set, the value from [use_cache](toplevel.md#use_cache) will be used. ## c2s\_cafile @@ -294,11 +293,11 @@ format. All client certificates should be signed by one of these root CA certificates and should contain the corresponding JID(s) in *subjectAltName* field. There is no default value. -You can use [host\_config](/archive/22_05/toplevel/#host-config) to specify +You can use [host\_config](toplevel.md#host_config) to specify this option per-vhost. To set a specific file per listener, use the listener’s -[cafile](/archive/22_05/listen-options/#cafile) option. Please notice that +[cafile](listen-options.md#cafile) option. Please notice that *c2s\_cafile* overrides the listener’s *cafile* option. ## c2s\_ciphers @@ -357,7 +356,7 @@ Path to a file of CA root certificates. The default is to use system defined file if possible. For server connections, this *ca\_file* option is overridden by the -[s2s\_cafile](/archive/22_05/toplevel/#s2s-cafile) option. +[s2s\_cafile](toplevel.md#s2s-cafile) option. ## cache\_life\_time @@ -366,9 +365,9 @@ For server connections, this *ca\_file* option is overridden by the The time of a cached item to keep in cache. Once it’s expired, the corresponding item is erased from cache. The default value is *1 hour*. Several modules have a similar option; and some core ejabberd parts -support similar options too, see [auth_cache_life_time](/archive/22_05/toplevel/#auth-cache-life-time), -[oauth_cache_life_time](/archive/22_05/toplevel/#oauth-cache-life-time), [router_cache_life_time](/archive/22_05/toplevel/#router-cache-life-time), and -[sm_cache_life_time](/archive/22_05/toplevel/#sm-cache-life-time). +support similar options too, see [auth_cache_life_time](toplevel.md#auth_cache_life_time), +[oauth_cache_life_time](toplevel.md#oauth_cache_life_time), [router_cache_life_time](toplevel.md#router_cache_life_time), and +[sm_cache_life_time](toplevel.md#sm_cache_life_time). ## cache\_missed @@ -377,11 +376,11 @@ support similar options too, see [auth_cache_life_time](/archive/22_05/toplevel/ Whether or not to cache missed lookups. When there is an attempt to lookup for a value in a database and this value is not found and the option is set to *true*, this attempt will be cached and no attempts -will be performed until the cache expires (see [cache_life_time](/archive/22_05/toplevel/#cache-life-time)). +will be performed until the cache expires (see [cache_life_time](toplevel.md#cache_life_time)). Usually you don’t want to change it. Default is *true*. Several modules have a similar option; and some core ejabberd parts support similar -options too, see [auth_cache_missed](/archive/22_05/toplevel/#auth-cache-missed), [oauth_cache_missed](/archive/22_05/toplevel/#oauth-cache-missed), -[router_cache_missed](/archive/22_05/toplevel/#router-cache-missed), and [sm_cache_missed](/archive/22_05/toplevel/#sm-cache-missed). +options too, see [auth_cache_missed](toplevel.md#auth_cache_missed), [oauth_cache_missed](toplevel.md#oauth_cache_missed), +[router_cache_missed](toplevel.md#router_cache_missed), and [sm_cache_missed](toplevel.md#sm_cache_missed). ## cache\_size @@ -395,14 +394,14 @@ items are deleted, and the corresponding warning is logged. You should avoid frequent cache clearance, because this degrades performance. The default value is *1000*. Several modules have a similar option; and some core ejabberd parts support similar options too, see -[auth_cache_size](/archive/22_05/toplevel/#auth-cache-size), [oauth_cache_size](/archive/22_05/toplevel/#oauth-cache-size), [router_cache_size](/archive/22_05/toplevel/#router-cache-size), and -[sm_cache_size](/archive/22_05/toplevel/#sm-cache-size). +[auth_cache_size](toplevel.md#auth_cache_size), [oauth_cache_size](toplevel.md#oauth_cache_size), [router_cache_size](toplevel.md#router_cache_size), and +[sm_cache_size](toplevel.md#sm_cache_size). ## captcha\_cmd *Path* -Full path to a script that generates [CAPTCHA](/admin/configuration/basic/#captcha) +Full path to a script that generates [CAPTCHA](../../admin/configuration/basic.md#captcha) images. There is no default value: when this option is not set, CAPTCHA functionality is completely disabled. @@ -410,13 +409,13 @@ functionality is completely disabled. *String* -Deprecated. Use [captcha_url](/archive/22_05/toplevel/#captcha-url) instead. +Deprecated. Use [captcha_url](toplevel.md#captcha_url) instead. ## captcha\_limit *pos\_integer() | infinity* -Maximum number of [CAPTCHA](/admin/configuration/basic/#captcha) generated images +Maximum number of [CAPTCHA](../../admin/configuration/basic.md#captcha) generated images per minute for any given JID. The option is intended to protect the server from CAPTCHA DoS. The default value is *infinity*. @@ -424,7 +423,7 @@ server from CAPTCHA DoS. The default value is *infinity*. *URL* -An URL where [CAPTCHA](/admin/configuration/basic/#captcha) requests should be +An URL where [CAPTCHA](../../admin/configuration/basic.md#captcha) requests should be sent. NOTE: you need to configure *request\_handlers* for *ejabberd\_http* listener as well. There is no default value. @@ -699,7 +698,7 @@ attribute, the specified language is used. The default value is *"en"*. *\[Host, ...\]* A list of IP addresses or DNS names of LDAP backup servers. When no -servers listed in [ldap_servers](/archive/22_05/toplevel/#ldap-servers) option are reachable, ejabberd will +servers listed in [ldap_servers](toplevel.md#ldap_servers) option are reachable, ejabberd will try to connect to these backup servers. The default is an empty list, i.e. no backup servers specified. WARNING: ejabberd doesn’t try to reconnect back to the main servers when they become operational again, @@ -734,7 +733,7 @@ variables are consecutively replaced by values from the attributes in *FilterAttrs* and "%D" is replaced by Distinguished Name from the result set. There is no default value, which means the result is not filtered. WARNING: Since this filter makes additional LDAP lookups, use it only as -the last resort: try to define all filter rules in [ldap_filter](/archive/22_05/toplevel/#ldap-filter) +the last resort: try to define all filter rules in [ldap_filter](toplevel.md#ldap_filter) option if possible. **Example**: @@ -841,7 +840,7 @@ JID. For example, "%.org". If the value is in the form of *\[Options, ...\]* The option for listeners configuration. See the [Listen -Modules](/archive/22_05/listen/) section for details. +Modules](./listen.md/) section for details. ## log\_rotate\_count @@ -885,7 +884,7 @@ value is *10000*. *{Module: Options}* -The option for modules configuration. See [Modules](/archive/22_05/modules/) +The option for modules configuration. See [Modules](./modules.md/) section for details. ## negotiation\_timeout @@ -934,17 +933,17 @@ can create OAuth tokens, you can refer to an ejabberd access rule in the *timeout()* -Same as [cache_life_time](/archive/22_05/toplevel/#cache-life-time), but applied to OAuth cache only. If not -set, the value from [cache_life_time](/archive/22_05/toplevel/#cache-life-time) will be used. +Same as [cache_life_time](toplevel.md#cache_life_time), but applied to OAuth cache only. If not +set, the value from [cache_life_time](toplevel.md#cache_life_time) will be used. ## oauth\_cache\_missed *true | false* -Same as [cache_missed](/archive/22_05/toplevel/#cache-missed), but applied to OAuth cache only. If not set, -the value from [cache_missed](/archive/22_05/toplevel/#cache-missed) will be used. +Same as [cache_missed](toplevel.md#cache_missed), but applied to OAuth cache only. If not set, +the value from [cache_missed](toplevel.md#cache_missed) will be used. -
added in 21.01
+
added in 21.01
## oauth\_cache\_rest\_failure\_life\_time @@ -957,8 +956,8 @@ The time that a failure in OAuth ReST is cached. The default value is *pos\_integer() | infinity* -Same as [cache_size](/archive/22_05/toplevel/#cache-size), but applied to OAuth cache only. If not set, the -value from [cache_size](/archive/22_05/toplevel/#cache-size) will be used. +Same as [cache_size](toplevel.md#cache_size), but applied to OAuth cache only. If not set, the +value from [cache_size](toplevel.md#cache_size) will be used. ## oauth\_client\_id\_check @@ -973,7 +972,7 @@ value is *allow*. *mnesia | sql* Database backend to use for OAuth authentication. The default value is -picked from [default_db](/archive/22_05/toplevel/#default-db) option, or if it’s not set, *mnesia* will be +picked from [default_db](toplevel.md#default_db) option, or if it’s not set, *mnesia* will be used. ## oauth\_expire @@ -988,15 +987,15 @@ used and is removed from the database. The default is *4294967* seconds. *true | false* -Same as [use_cache](/archive/22_05/toplevel/#use-cache), but applied to OAuth cache only. If not set, the -value from [use_cache](/archive/22_05/toplevel/#use-cache) will be used. +Same as [use_cache](toplevel.md#use_cache), but applied to OAuth cache only. If not set, the +value from [use_cache](toplevel.md#use_cache) will be used. ## oom\_killer *true | false* Enable or disable OOM (out-of-memory) killer. When system memory raises -above the limit defined in [oom_watermark](/archive/22_05/toplevel/#oom-watermark) option, ejabberd triggers +above the limit defined in [oom_watermark](toplevel.md#oom_watermark) option, ejabberd triggers OOM killer to terminate most memory consuming Erlang processes. Note that in order to maintain functionality, ejabberd only attempts to kill transient processes, such as those managing client sessions, s2s or @@ -1008,7 +1007,7 @@ database connections. The default value is *true*. Trigger OOM killer when some of the running Erlang processes have messages queue above this *Size*. Note that such processes won’t be -killed if [oom_killer](/archive/22_05/toplevel/#oom-killer) option is set to *false* or if *oom\_watermark* +killed if [oom_killer](toplevel.md#oom_killer) option is set to *false* or if *oom\_watermark* is not reached yet. ## oom\_watermark @@ -1017,7 +1016,7 @@ is not reached yet. A percent of total system memory consumed at which OOM killer should be activated with some of the processes possibly be killed (see -[oom_killer](/archive/22_05/toplevel/#oom-killer) option). Later, when memory drops below this *Percent*, +[oom_killer](toplevel.md#oom_killer) option). Later, when memory drops below this *Percent*, OOM killer is deactivated. The default value is *80* percents. ## outgoing\_s2s\_families @@ -1028,7 +1027,7 @@ Specify which address families to try, in what order. The default is *\[ipv4, ipv6\]* which means it first tries connecting with IPv4, if that fails it tries using IPv6. -
added in 20.12
+
added in 20.12
## outgoing\_s2s\_ipv4\_address @@ -1038,7 +1037,7 @@ Specify the IPv4 address that will be used when establishing an outgoing S2S IPv4 connection, for example "127.0.0.1". The default value is *undefined*. -
added in 20.12
+
added in 20.12
## outgoing\_s2s\_ipv6\_address @@ -1089,7 +1088,7 @@ default value is *false*. *Directory* -If [queue_type](/archive/22_05/toplevel/#queue-type) option is set to *file*, use this *Directory* to store +If [queue_type](toplevel.md#queue_type) option is set to *file*, use this *Directory* to store file queues. The default is to keep queues inside Mnesia directory. ## queue\_type @@ -1098,7 +1097,7 @@ file queues. The default is to keep queues inside Mnesia directory. Default type of queues in ejabberd. Modules may have its own value of the option. The value of *ram* means that queues will be kept in memory. -If value *file* is set, you may also specify directory in [queue_dir](/archive/22_05/toplevel/#queue-dir) +If value *file* is set, you may also specify directory in [queue_dir](toplevel.md#queue_dir) option where file queues will be placed. The default value is *ram*. ## redis\_connect\_timeout @@ -1140,8 +1139,8 @@ The port where the Redis server is accepting connections. The default is *ram | file* The type of request queue for the Redis server. See description of -[queue_type](/archive/22_05/toplevel/#queue-type) option for the explanation. The default value is the -value defined in [queue_type](/archive/22_05/toplevel/#queue-type) or *ram* if the latter is not set. +[queue_type](toplevel.md#queue_type) option for the explanation. The default value is the +value defined in [queue_type](toplevel.md#queue_type) or *ram* if the latter is not set. ## redis\_server @@ -1154,7 +1153,7 @@ A hostname or an IP address of the Redis server. The default is *timeout()* -This is a global option for module [mod_register](/archive/22_05/modules/#mod-register). It limits the +This is a global option for module [mod_register](modules.md#mod_register). It limits the frequency of registrations from a given IP or username. So, a user that tries to register a new account from the same IP address or JID during this time after their previous registration will receive an error with @@ -1177,37 +1176,37 @@ action performed is *closeold*. *timeout()* -Same as [cache_life_time](/archive/22_05/toplevel/#cache-life-time), but applied to routing table cache only. If -not set, the value from [cache_life_time](/archive/22_05/toplevel/#cache-life-time) will be used. +Same as [cache_life_time](toplevel.md#cache_life_time), but applied to routing table cache only. If +not set, the value from [cache_life_time](toplevel.md#cache_life_time) will be used. ## router\_cache\_missed *true | false* -Same as [cache_missed](/archive/22_05/toplevel/#cache-missed), but applied to routing table cache only. If -not set, the value from [cache_missed](/archive/22_05/toplevel/#cache-missed) will be used. +Same as [cache_missed](toplevel.md#cache_missed), but applied to routing table cache only. If +not set, the value from [cache_missed](toplevel.md#cache_missed) will be used. ## router\_cache\_size *pos\_integer() | infinity* -Same as [cache_size](/archive/22_05/toplevel/#cache-size), but applied to routing table cache only. If not -set, the value from [cache_size](/archive/22_05/toplevel/#cache-size) will be used. +Same as [cache_size](toplevel.md#cache_size), but applied to routing table cache only. If not +set, the value from [cache_size](toplevel.md#cache_size) will be used. ## router\_db\_type *mnesia | redis | sql* Database backend to use for routing information. The default value is -picked from [default_ram_db](/archive/22_05/toplevel/#default-ram-db) option, or if it’s not set, *mnesia* will +picked from [default_ram_db](toplevel.md#default_ram_db) option, or if it’s not set, *mnesia* will be used. ## router\_use\_cache *true | false* -Same as [use_cache](/archive/22_05/toplevel/#use-cache), but applied to routing table cache only. If not -set, the value from [use_cache](/archive/22_05/toplevel/#use-cache) will be used. +Same as [use_cache](toplevel.md#use_cache), but applied to routing table cache only. If not +set, the value from [use_cache](toplevel.md#use_cache) will be used. ## rpc\_timeout @@ -1221,7 +1220,7 @@ are used for internal needs only. The default value is *5* seconds. *Access* -This [Access Rule](/admin/configuration/basic/#access-rules) defines to what remote +This [Access Rule](../../admin/configuration/basic.md#access_rules) defines to what remote servers can s2s connections be established. The default value is *all*; no restrictions are applied, it is allowed to connect s2s to/from all remote servers. @@ -1232,9 +1231,9 @@ remote servers. A path to a file with CA root certificates that will be used to authenticate s2s connections. If not set, the value of -[ca\_file](/archive/22_05/toplevel/#ca-file) will be used. +[ca\_file](toplevel.md#ca_file) will be used. -You can use [host\_config](/archive/22_05/toplevel/#host-config) to specify +You can use [host\_config](toplevel.md#host_config) to specify this option per-vhost. ## s2s\_ciphers @@ -1302,9 +1301,9 @@ below: *ram | file* -The type of a queue for s2s packets. See description of [queue_type](/archive/22_05/toplevel/#queue-type) +The type of a queue for s2s packets. See description of [queue_type](toplevel.md#queue_type) option for the explanation. The default value is the value defined in -[queue_type](/archive/22_05/toplevel/#queue-type) or *ram* if the latter is not set. +[queue_type](toplevel.md#queue_type) or *ram* if the latter is not set. ## s2s\_timeout @@ -1345,7 +1344,7 @@ considered insecure. The option defines a set of shapers. Every shaper is assigned a name *ShaperName* that can be used in other parts of the configuration file, -such as [shaper_rules](/archive/22_05/toplevel/#shaper-rules) option. The shaper itself is defined by its +such as [shaper_rules](toplevel.md#shaper_rules) option. The shaper itself is defined by its *Rate*, where *Rate* stands for the maximum allowed incoming rate in **bytes** per second. When a connection exceeds this limit, ejabberd stops reading from the socket until the average rate is again below the @@ -1364,9 +1363,9 @@ speed to 1,000 bytes/sec and shaper *fast* limits the traffic speed to *{ShaperRuleName: {Number|ShaperName: ACLRule|ACLName}}* An entry allowing to declaring shaper to use for matching user/hosts. -Semantics is similar to [access_rules](/archive/22_05/toplevel/#access-rules) option, the only difference is +Semantics is similar to [access_rules](toplevel.md#access_rules) option, the only difference is that instead using *allow* or *deny*, a name of a shaper (defined in -[shaper](/archive/22_05/toplevel/#shaper) option) or a positive number should be used. +[shaper](toplevel.md#shaper) option) or a positive number should be used. **Example**: @@ -1386,37 +1385,37 @@ that instead using *allow* or *deny*, a name of a shaper (defined in *timeout()* -Same as [cache_life_time](/archive/22_05/toplevel/#cache-life-time), but applied to client sessions table cache -only. If not set, the value from [cache_life_time](/archive/22_05/toplevel/#cache-life-time) will be used. +Same as [cache_life_time](toplevel.md#cache_life_time), but applied to client sessions table cache +only. If not set, the value from [cache_life_time](toplevel.md#cache_life_time) will be used. ## sm\_cache\_missed *true | false* -Same as [cache_missed](/archive/22_05/toplevel/#cache-missed), but applied to client sessions table cache -only. If not set, the value from [cache_missed](/archive/22_05/toplevel/#cache-missed) will be used. +Same as [cache_missed](toplevel.md#cache_missed), but applied to client sessions table cache +only. If not set, the value from [cache_missed](toplevel.md#cache_missed) will be used. ## sm\_cache\_size *pos\_integer() | infinity* -Same as [cache_size](/archive/22_05/toplevel/#cache-size), but applied to client sessions table cache only. -If not set, the value from [cache_size](/archive/22_05/toplevel/#cache-size) will be used. +Same as [cache_size](toplevel.md#cache_size), but applied to client sessions table cache only. +If not set, the value from [cache_size](toplevel.md#cache_size) will be used. ## sm\_db\_type *mnesia | redis | sql* Database backend to use for client sessions information. The default -value is picked from [default_ram_db](/archive/22_05/toplevel/#default-ram-db) option, or if it’s not set, +value is picked from [default_ram_db](toplevel.md#default_ram_db) option, or if it’s not set, *mnesia* will be used. ## sm\_use\_cache *true | false* -Same as [use_cache](/archive/22_05/toplevel/#use-cache), but applied to client sessions table cache only. -If not set, the value from [use_cache](/archive/22_05/toplevel/#use-cache) will be used. +Same as [use_cache](toplevel.md#use_cache), but applied to client sessions table cache only. +If not set, the value from [use_cache](toplevel.md#use_cache) will be used. ## sql\_connect\_timeout @@ -1440,14 +1439,14 @@ An interval to make a dummy SQL request to keep alive the connections to the database. There is no default value, so no keepalive requests are made. -
added in 20.12
+
added in 20.12
## sql\_odbc\_driver *Path* Path to the ODBC driver to use to connect to a Microsoft SQL Server -database. This option is only valid if the [sql_type](/archive/22_05/toplevel/#sql-type) option is set to +database. This option is only valid if the [sql_type](toplevel.md#sql_type) option is set to *mssql*. The default value is: *libtdsodbc.so* ## sql\_password @@ -1473,7 +1472,7 @@ The port where the SQL server is accepting connections. The default is *3306* for MySQL, *5432* for PostgreSQL and *1433* for MS SQL. The option has no effect for SQLite. -
added in 20.01
+
added in 20.01
## sql\_prepared\_statements @@ -1494,8 +1493,8 @@ seconds. *ram | file* The type of a request queue for the SQL server. See description of -[queue_type](/archive/22_05/toplevel/#queue-type) option for the explanation. The default value is the -value defined in [queue_type](/archive/22_05/toplevel/#queue-type) or *ram* if the latter is not set. +[queue_type](toplevel.md#queue_type) option for the explanation. The default value is the +value defined in [queue_type](toplevel.md#queue_type) or *ram* if the latter is not set. ## sql\_server @@ -1504,7 +1503,7 @@ value defined in [queue_type](/archive/22_05/toplevel/#queue-type) or *ram* if t A hostname or an IP address of the SQL server. The default value is *localhost*. -
improved in 20.03
+
improved in 20.03
## sql\_ssl @@ -1519,7 +1518,7 @@ is only available for MySQL and PostgreSQL. The default value is *Path* A path to a file with CA root certificates that will be used to verify -SQL connections. Implies [sql_ssl](/archive/22_05/toplevel/#sql-ssl) and [sql_ssl_verify](/archive/22_05/toplevel/#sql-ssl-verify) options are +SQL connections. Implies [sql_ssl](toplevel.md#sql_ssl) and [sql_ssl_verify](toplevel.md#sql_ssl_verify) options are set to *true*. There is no default which means certificate verification is disabled. @@ -1528,7 +1527,7 @@ is disabled. *Path* A path to a certificate file that will be used for SSL connections to -the SQL server. Implies [sql_ssl](/archive/22_05/toplevel/#sql-ssl) option is set to *true*. There is no +the SQL server. Implies [sql_ssl](toplevel.md#sql_ssl) option is set to *true*. There is no default which means ejabberd won’t provide a client certificate to the SQL server. @@ -1537,7 +1536,7 @@ SQL server. *true | false* Whether to verify SSL connection to the SQL server against CA root -certificates defined in [sql_ssl_cafile](/archive/22_05/toplevel/#sql-ssl-cafile) option. Implies [sql_ssl](/archive/22_05/toplevel/#sql-ssl) +certificates defined in [sql_ssl_cafile](toplevel.md#sql_ssl_cafile) option. Implies [sql_ssl](toplevel.md#sql_ssl) option is set to *true*. The default value is *false*. ## sql\_start\_interval @@ -1579,8 +1578,8 @@ trusted for security rules in ejabberd. Enable or disable cache. The default is *true*. Several modules have a similar option; and some core ejabberd parts support similar options -too, see [auth_use_cache](/archive/22_05/toplevel/#auth-use-cache), [oauth_use_cache](/archive/22_05/toplevel/#oauth-use-cache), [router_use_cache](/archive/22_05/toplevel/#router-use-cache), -and [sm_use_cache](/archive/22_05/toplevel/#sm-use-cache). +too, see [auth_use_cache](toplevel.md#auth_use_cache), [oauth_use_cache](toplevel.md#oauth_use_cache), [router_use_cache](toplevel.md#router_use_cache), +and [sm_use_cache](toplevel.md#sm_use_cache). ## validate\_stream @@ -1598,7 +1597,7 @@ value is *false*. *string()* The option can be used to set custom ejabberd version, that will be used -by different parts of ejabberd, for example by [mod_version](/archive/22_05/modules/#mod-version) module. +by different parts of ejabberd, for example by [mod_version](modules.md#mod_version) module. The default value is obtained at compile time from the underlying version control system. diff --git a/content/admin/upgrade/from_21.12_to_22.05.md b/content/archive/22.05/upgrade.md similarity index 92% rename from content/admin/upgrade/from_21.12_to_22.05.md rename to content/archive/22.05/upgrade.md index 81e2ffdd..42fb7fb3 100644 --- a/content/admin/upgrade/from_21.12_to_22.05.md +++ b/content/archive/22.05/upgrade.md @@ -1,7 +1,4 @@ ---- -title: Upgrade to ejabberd 22.05 -toc: true ---- +# Upgrade to ejabberd 22.05 ## New Indexes in SQL for MUC @@ -10,25 +7,25 @@ Two new indexes were added to optimize MUC. Those indexes can be added in the da To update an existing database, depending on the schema used to create it: - MySQL (`mysql.sql` or `mysql.new.sql`): -```sql +``` sql CREATE INDEX i_muc_room_host_created_at ON muc_room(host(75), created_at); CREATE INDEX i_muc_room_subscribers_jid USING BTREE ON muc_room_subscribers(jid); ``` - PostgreSQL (`pg.sql` or `pg.new.sql`): -```sql +``` sql CREATE INDEX i_muc_room_host_created_at ON muc_room USING btree (host, created_at); CREATE INDEX i_muc_room_subscribers_jid ON muc_room_subscribers USING btree (jid); ``` - SQLite (`lite.sql` or `lite.new.sql`): -```sql +``` sql CREATE INDEX i_muc_room_host_created_at ON muc_room (host, created_at); CREATE INDEX i_muc_room_subscribers_jid ON muc_room_subscribers(jid); ``` - MS SQL (`mssql.sql`): -```sql +``` sql CREATE INDEX [muc_room_host_created_at] ON [muc_registered] (host, nick) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON); CREATE INDEX [muc_room_subscribers_jid] ON [muc_room_subscribers] (jid); @@ -36,11 +33,11 @@ CREATE INDEX [muc_room_subscribers_jid] ON [muc_room_subscribers] (jid); ## Fixes in PostgreSQL New Schema -If you moved your PostgreSQL database from old to new schema using [mod_admin_update_sql](https://docs.ejabberd.im/admin/configuration/modules/#mod-admin-update-sql) or the [update_sql](https://docs.ejabberd.im/developer/ejabberd-api/admin-api/#update-sql) API command, be aware that those methods forgot to perform some updates. +If you moved your PostgreSQL database from old to new schema using [mod_admin_update_sql](https://docs.ejabberd.im/admin/configuration/modules/#mod_admin_update_sql) or the [update_sql](https://docs.ejabberd.im/developer/ejabberd-api/admin-api/#update-sql) API command, be aware that those methods forgot to perform some updates. To fix an existing PostgreSQL database schema, apply those changes manually: -```sql +``` sql ALTER TABLE archive DROP CONSTRAINT i_archive_sh_peer; ALTER TABLE archive DROP CONSTRAINT i_archive_sh_bare_peer; CREATE INDEX i_archive_sh_username_peer ON archive USING btree (server_host, username, peer); @@ -65,6 +62,6 @@ CREATE UNIQUE INDEX i_mqtt_topic_server ON mqtt_pub (topic, server_host); ## API Changes -The `oauth_revoke_token` API command has changed its returned result. Check [oauth_revoke_token](https://docs.ejabberd.im/developer/ejabberd-api/admin-api/#oauth-revoke-token) documentation. +The `oauth_revoke_token` API command has changed its returned result. Check [oauth_revoke_token](https://docs.ejabberd.im/developer/ejabberd-api/admin-api/#oauth_revoke_token) documentation. diff --git a/content/archive/22_10/admin-api.md b/content/archive/22.10/admin-api.md similarity index 83% rename from content/archive/22_10/admin-api.md rename to content/archive/22.10/admin-api.md index 2bf236fd..175d9383 100644 --- a/content/archive/22_10/admin-api.md +++ b/content/archive/22.10/admin-api.md @@ -1,12 +1,11 @@ --- -title: Administration API reference -toc: true -menu: API Reference -order: 1 -// Autogenerated with 'ejabberdctl gen_markdown_doc_for_commands' +search: + exclude: true --- -
added in 22.05
+# API Reference + +
added in 22.05
## abort_delete_old_mam_messages @@ -22,10 +21,10 @@ __Result:__ - *status* :: string : Status text __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](../../developer/ejabberd-api/admin-tags.md#purge) __Module:__ -[mod_mam](/archive/22_10/modules/#mod-mam) +[mod_mam](modules.md#mod_mam) __Examples:__ @@ -41,7 +40,7 @@ __Examples:__ ~~~ -
added in 22.05
+
added in 22.05
## abort_delete_old_messages @@ -57,7 +56,7 @@ __Result:__ - *status* :: string : Status text __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](../../developer/ejabberd-api/admin-tags.md#purge) __Examples:__ @@ -98,10 +97,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[roster](/developer/ejabberd-api/admin-tags/#roster) +[roster](../../developer/ejabberd-api/admin-tags.md#roster) __Module:__ -[mod_admin_extra](/archive/22_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -139,7 +138,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -173,10 +172,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) __Module:__ -[mod_admin_extra](/archive/22_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -211,10 +210,10 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[private](/developer/ejabberd-api/admin-tags/#private) +[private](../../developer/ejabberd-api/admin-tags.md#private) __Module:__ -[mod_private](/archive/22_10/modules/#mod-private) +[mod_private](modules.md#mod_private) __Examples:__ @@ -249,10 +248,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) __Module:__ -[mod_admin_extra](/archive/22_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -289,10 +288,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/22_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -328,10 +327,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) __Module:__ -[mod_admin_extra](/archive/22_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -366,10 +365,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) __Module:__ -[mod_admin_extra](/archive/22_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -409,10 +408,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) __Module:__ -[mod_admin_extra](/archive/22_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -446,7 +445,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](../../developer/ejabberd-api/admin-tags.md#server) __Examples:__ @@ -478,10 +477,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[erlang](/developer/ejabberd-api/admin-tags/#erlang) +[erlang](../../developer/ejabberd-api/admin-tags.md#erlang) __Module:__ -[mod_admin_extra](/archive/22_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -512,7 +511,7 @@ __Result:__ - *connected_users* :: [sessions::string] : List of users sessions __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Examples:__ @@ -546,10 +545,10 @@ __Result:__ - *connected_users_info* :: [{jid::string, connection::string, ip::string, port::integer, priority::integer, node::string, uptime::integer, status::string, resource::string, statustext::string}] __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/22_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -593,7 +592,7 @@ __Result:__ - *num_sessions* :: integer __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) [statistics](/developer/ejabberd-api/admin-tags/#statistics) +[session](../../developer/ejabberd-api/admin-tags.md#session) [statistics](../../developer/ejabberd-api/admin-tags.md#statistics) __Examples:__ @@ -625,10 +624,10 @@ __Result:__ - *connected_users_vhost* :: [sessions::string] __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/22_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -663,7 +662,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[sql](/developer/ejabberd-api/admin-tags/#sql) +[sql](../../developer/ejabberd-api/admin-tags.md#sql) __Examples:__ @@ -696,7 +695,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[config](/developer/ejabberd-api/admin-tags/#config) +[config](../../developer/ejabberd-api/admin-tags.md#config) __Examples:__ @@ -731,10 +730,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/22_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -771,10 +770,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/22_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -817,10 +816,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/22_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -851,7 +850,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](../../developer/ejabberd-api/admin-tags.md#purge) __Examples:__ @@ -867,7 +866,7 @@ __Examples:__ ~~~ -
added in 21.12
+
added in 21.12
## delete_expired_pubsub_items @@ -882,10 +881,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](../../developer/ejabberd-api/admin-tags.md#purge) __Module:__ -[mod_pubsub](/archive/22_10/modules/#mod-pubsub) +[mod_pubsub](modules.md#mod_pubsub) __Examples:__ @@ -917,7 +916,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -953,10 +952,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](../../developer/ejabberd-api/admin-tags.md#purge) __Module:__ -[mod_mam](/archive/22_10/modules/#mod-mam) +[mod_mam](modules.md#mod_mam) __Examples:__ @@ -973,7 +972,7 @@ __Examples:__ ~~~ -
added in 22.05
+
added in 22.05
## delete_old_mam_messages_batch @@ -996,10 +995,10 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](../../developer/ejabberd-api/admin-tags.md#purge) __Module:__ -[mod_mam](/archive/22_10/modules/#mod-mam) +[mod_mam](modules.md#mod_mam) __Examples:__ @@ -1019,7 +1018,7 @@ __Examples:__ ~~~ -
added in 22.05
+
added in 22.05
## delete_old_mam_messages_status @@ -1035,10 +1034,10 @@ __Result:__ - *status* :: string : Status test __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](../../developer/ejabberd-api/admin-tags.md#purge) __Module:__ -[mod_mam](/archive/22_10/modules/#mod-mam) +[mod_mam](modules.md#mod_mam) __Examples:__ @@ -1070,7 +1069,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](../../developer/ejabberd-api/admin-tags.md#purge) __Examples:__ @@ -1086,7 +1085,7 @@ __Examples:__ ~~~ -
added in 22.05
+
added in 22.05
## delete_old_messages_batch @@ -1105,7 +1104,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](../../developer/ejabberd-api/admin-tags.md#purge) __Examples:__ @@ -1124,7 +1123,7 @@ __Examples:__ ~~~ -
added in 22.05
+
added in 22.05
## delete_old_messages_status @@ -1140,7 +1139,7 @@ __Result:__ - *status* :: string : Status test __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](../../developer/ejabberd-api/admin-tags.md#purge) __Examples:__ @@ -1156,7 +1155,7 @@ __Examples:__ ~~~ -
added in 21.12
+
added in 21.12
## delete_old_pubsub_items @@ -1172,10 +1171,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](../../developer/ejabberd-api/admin-tags.md#purge) __Module:__ -[mod_pubsub](/archive/22_10/modules/#mod-pubsub) +[mod_pubsub](modules.md#mod_pubsub) __Examples:__ @@ -1207,10 +1206,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](../../developer/ejabberd-api/admin-tags.md#purge) __Module:__ -[mod_push](/archive/22_10/modules/#mod-push) +[mod_push](modules.md#mod_push) __Examples:__ @@ -1250,10 +1249,10 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) [purge](/developer/ejabberd-api/admin-tags/#purge) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) [purge](../../developer/ejabberd-api/admin-tags.md#purge) __Module:__ -[mod_admin_extra](/archive/22_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -1294,10 +1293,10 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) [purge](/developer/ejabberd-api/admin-tags/#purge) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) [purge](../../developer/ejabberd-api/admin-tags.md#purge) __Module:__ -[mod_admin_extra](/archive/22_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -1333,10 +1332,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[roster](/developer/ejabberd-api/admin-tags/#roster) +[roster](../../developer/ejabberd-api/admin-tags.md#roster) __Module:__ -[mod_admin_extra](/archive/22_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -1372,10 +1371,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/22_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -1411,10 +1410,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/22_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -1446,7 +1445,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -1478,7 +1477,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[config](/developer/ejabberd-api/admin-tags/#config) +[config](../../developer/ejabberd-api/admin-tags.md#config) __Examples:__ @@ -1511,7 +1510,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -1536,7 +1535,7 @@ __Examples:__ Export virtual host information from Mnesia tables to SQL file -Configure the modules to use SQL, then call this command. After correctly exported the database of a vhost, you may want to delete from mnesia with the [delete_mnesia](/archive/22_10/admin-api/#delete-mnesia) command. +Configure the modules to use SQL, then call this command. After correctly exported the database of a vhost, you may want to delete from mnesia with the [delete_mnesia](admin-api.md#delete_mnesia) command. __Arguments:__ @@ -1548,7 +1547,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -1581,7 +1580,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -1614,7 +1613,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -1631,7 +1630,7 @@ __Examples:__ ~~~ -
added in 20.01
+
added in 20.01
## gc @@ -1646,7 +1645,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](../../developer/ejabberd-api/admin-tags.md#server) __Examples:__ @@ -1680,7 +1679,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[documentation](/developer/ejabberd-api/admin-tags/#documentation) +[documentation](../../developer/ejabberd-api/admin-tags.md#documentation) __Examples:__ @@ -1716,7 +1715,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[documentation](/developer/ejabberd-api/admin-tags/#documentation) +[documentation](../../developer/ejabberd-api/admin-tags.md#documentation) __Examples:__ @@ -1734,7 +1733,7 @@ __Examples:__ ~~~ -
added in 21.12
+
added in 21.12
## gen_markdown_doc_for_tags @@ -1750,7 +1749,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[documentation](/developer/ejabberd-api/admin-tags/#documentation) +[documentation](../../developer/ejabberd-api/admin-tags.md#documentation) __Examples:__ @@ -1781,10 +1780,10 @@ __Result:__ - *cookie* :: string : Erlang cookie used for authentication by ejabberd __Tags:__ -[erlang](/developer/ejabberd-api/admin-tags/#erlang) +[erlang](../../developer/ejabberd-api/admin-tags.md#erlang) __Module:__ -[mod_admin_extra](/archive/22_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -1820,10 +1819,10 @@ __Result:__ - *last_activity* :: {timestamp::string, status::string} : Last activity timestamp and status __Tags:__ -[last](/developer/ejabberd-api/admin-tags/#last) +[last](../../developer/ejabberd-api/admin-tags.md#last) __Module:__ -[mod_admin_extra](/archive/22_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -1858,7 +1857,7 @@ __Result:__ - *levelatom* :: string : Tuple with the log level number, its keyword and description __Tags:__ -[logs](/developer/ejabberd-api/admin-tags/#logs) +[logs](../../developer/ejabberd-api/admin-tags.md#logs) __Examples:__ @@ -1891,10 +1890,10 @@ __Result:__ - *value* :: integer : Number __Tags:__ -[offline](/developer/ejabberd-api/admin-tags/#offline) +[offline](../../developer/ejabberd-api/admin-tags.md#offline) __Module:__ -[mod_admin_extra](/archive/22_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -1940,10 +1939,10 @@ __Result:__ - *presence* :: {jid::string, show::string, status::string} __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/22_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -1982,10 +1981,10 @@ __Result:__ - *affiliation* :: string : Affiliation of the user __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/22_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -2020,10 +2019,10 @@ __Result:__ - *affiliations* :: [{username::string, domain::string, affiliation::string, reason::string}] : The list of affiliations with username, domain, affiliation and reason __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/22_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -2064,10 +2063,10 @@ __Result:__ - *occupants* :: [{jid::string, nick::string, role::string}] : The list of occupants with JID, nick and affiliation __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/22_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -2107,10 +2106,10 @@ __Result:__ - *occupants* :: integer : Number of room occupants __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/22_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -2144,10 +2143,10 @@ __Result:__ - *options* :: [{name::string, value::string}] : List of room options tuples with name and value __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/22_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -2186,10 +2185,10 @@ __Result:__ - *contacts* :: [{jid::string, nick::string, subscription::string, ask::string, group::string}] __Tags:__ -[roster](/developer/ejabberd-api/admin-tags/#roster) +[roster](../../developer/ejabberd-api/admin-tags.md#roster) __Module:__ -[mod_admin_extra](/archive/22_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -2238,10 +2237,10 @@ __Result:__ - *subscribers* :: [jid::string] : The list of users that are subscribed to that room __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/22_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -2278,10 +2277,10 @@ __Result:__ - *rooms* :: [room::string] __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/22_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -2301,7 +2300,7 @@ __Examples:__ ~~~ -
added in 21.04
+
added in 21.04
## get_user_subscriptions @@ -2318,10 +2317,10 @@ __Result:__ - *rooms* :: [{roomjid::string, usernick::string, nodes::[node::string]}] __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/22_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -2375,10 +2374,10 @@ __Result:__ - *content* :: string : Field content __Tags:__ -[vcard](/developer/ejabberd-api/admin-tags/#vcard) +[vcard](../../developer/ejabberd-api/admin-tags.md#vcard) __Module:__ -[mod_admin_extra](/archive/22_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -2433,10 +2432,10 @@ __Result:__ - *content* :: string : Field content __Tags:__ -[vcard](/developer/ejabberd-api/admin-tags/#vcard) +[vcard](../../developer/ejabberd-api/admin-tags.md#vcard) __Module:__ -[mod_admin_extra](/archive/22_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -2492,10 +2491,10 @@ __Result:__ - *contents* :: [value::string] __Tags:__ -[vcard](/developer/ejabberd-api/admin-tags/#vcard) +[vcard](../../developer/ejabberd-api/admin-tags.md#vcard) __Module:__ -[mod_admin_extra](/archive/22_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -2533,7 +2532,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -2565,7 +2564,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -2597,7 +2596,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -2632,7 +2631,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) [sql](/developer/ejabberd-api/admin-tags/#sql) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) [sql](../../developer/ejabberd-api/admin-tags.md#sql) __Examples:__ @@ -2663,7 +2662,7 @@ __Result:__ - *s2s_incoming* :: integer __Tags:__ -[statistics](/developer/ejabberd-api/admin-tags/#statistics) [s2s](/developer/ejabberd-api/admin-tags/#s2s) +[statistics](../../developer/ejabberd-api/admin-tags.md#statistics) [s2s](../../developer/ejabberd-api/admin-tags.md#s2s) __Examples:__ @@ -2699,7 +2698,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -2734,7 +2733,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[cluster](/developer/ejabberd-api/admin-tags/#cluster) +[cluster](../../developer/ejabberd-api/admin-tags.md#cluster) __Examples:__ @@ -2769,10 +2768,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/22_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -2808,7 +2807,7 @@ __Result:__ - *num_resources* :: integer : Number of resources that were kicked __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Examples:__ @@ -2844,7 +2843,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[cluster](/developer/ejabberd-api/admin-tags/#cluster) +[cluster](../../developer/ejabberd-api/admin-tags.md#cluster) __Examples:__ @@ -2875,7 +2874,7 @@ __Result:__ - *certificates* :: [{domain::string, file::string, used::string}] __Tags:__ -[acme](/developer/ejabberd-api/admin-tags/#acme) +[acme](../../developer/ejabberd-api/admin-tags.md#acme) __Examples:__ @@ -2917,7 +2916,7 @@ __Result:__ - *nodes* :: [node::string] __Tags:__ -[cluster](/developer/ejabberd-api/admin-tags/#cluster) +[cluster](../../developer/ejabberd-api/admin-tags.md#cluster) __Examples:__ @@ -2955,7 +2954,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -2971,7 +2970,7 @@ __Examples:__ ~~~ -
added in 20.01
+
added in 20.01
## man @@ -2986,7 +2985,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[documentation](/developer/ejabberd-api/admin-tags/#documentation) +[documentation](../../developer/ejabberd-api/admin-tags.md#documentation) __Examples:__ @@ -3021,7 +3020,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -3055,7 +3054,7 @@ __Result:__ - *res* :: string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -3087,7 +3086,7 @@ __Result:__ - *res* :: string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -3119,7 +3118,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[modules](/developer/ejabberd-api/admin-tags/#modules) +[modules](../../developer/ejabberd-api/admin-tags.md#modules) __Examples:__ @@ -3151,7 +3150,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[modules](/developer/ejabberd-api/admin-tags/#modules) +[modules](../../developer/ejabberd-api/admin-tags.md#modules) __Examples:__ @@ -3183,7 +3182,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[modules](/developer/ejabberd-api/admin-tags/#modules) +[modules](../../developer/ejabberd-api/admin-tags.md#modules) __Examples:__ @@ -3218,7 +3217,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[modules](/developer/ejabberd-api/admin-tags/#modules) +[modules](../../developer/ejabberd-api/admin-tags.md#modules) __Examples:__ @@ -3249,7 +3248,7 @@ __Result:__ - *modules* :: [{name::string, summary::string}] : List of tuples with module name and description __Tags:__ -[modules](/developer/ejabberd-api/admin-tags/#modules) +[modules](../../developer/ejabberd-api/admin-tags.md#modules) __Examples:__ @@ -3283,7 +3282,7 @@ __Result:__ - *modules* :: [{name::string, summary::string}] : List of tuples with module name and description __Tags:__ -[modules](/developer/ejabberd-api/admin-tags/#modules) +[modules](../../developer/ejabberd-api/admin-tags.md#modules) __Examples:__ @@ -3320,7 +3319,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[modules](/developer/ejabberd-api/admin-tags/#modules) +[modules](../../developer/ejabberd-api/admin-tags.md#modules) __Examples:__ @@ -3352,10 +3351,10 @@ __Result:__ - *rooms* :: [room::string] : List of rooms __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/22_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -3391,10 +3390,10 @@ __Result:__ - *rooms* :: [{jid::string, public::string, participants::integer}] : List of rooms with summary __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/22_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -3440,10 +3439,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/22_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -3478,10 +3477,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/22_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -3515,10 +3514,10 @@ __Result:__ - *resources* :: integer : Number of active resources for a user __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/22_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -3553,7 +3552,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[oauth](/developer/ejabberd-api/admin-tags/#oauth) +[oauth](../../developer/ejabberd-api/admin-tags.md#oauth) __Examples:__ @@ -3589,7 +3588,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[oauth](/developer/ejabberd-api/admin-tags/#oauth) +[oauth](../../developer/ejabberd-api/admin-tags.md#oauth) __Examples:__ @@ -3625,7 +3624,7 @@ __Result:__ - *result* :: {token::string, scopes::string, expires_in::string} __Tags:__ -[oauth](/developer/ejabberd-api/admin-tags/#oauth) +[oauth](../../developer/ejabberd-api/admin-tags.md#oauth) __Examples:__ @@ -3665,7 +3664,7 @@ __Result:__ - *tokens* :: [{token::string, user::string, scope::string, expires_in::string}] __Tags:__ -[oauth](/developer/ejabberd-api/admin-tags/#oauth) +[oauth](../../developer/ejabberd-api/admin-tags.md#oauth) __Examples:__ @@ -3710,7 +3709,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[oauth](/developer/ejabberd-api/admin-tags/#oauth) +[oauth](../../developer/ejabberd-api/admin-tags.md#oauth) __Examples:__ @@ -3726,7 +3725,7 @@ __Examples:__ ~~~ -
changed in 22.05
+
changed in 22.05
## oauth_revoke_token @@ -3742,7 +3741,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[oauth](/developer/ejabberd-api/admin-tags/#oauth) +[oauth](../../developer/ejabberd-api/admin-tags.md#oauth) __Examples:__ @@ -3773,7 +3772,7 @@ __Result:__ - *s2s_outgoing* :: integer __Tags:__ -[statistics](/developer/ejabberd-api/admin-tags/#statistics) [s2s](/developer/ejabberd-api/admin-tags/#s2s) +[statistics](../../developer/ejabberd-api/admin-tags.md#statistics) [s2s](../../developer/ejabberd-api/admin-tags.md#s2s) __Examples:__ @@ -3807,10 +3806,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[stanza](/developer/ejabberd-api/admin-tags/#stanza) +[stanza](../../developer/ejabberd-api/admin-tags.md#stanza) __Module:__ -[mod_admin_extra](/archive/22_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -3847,10 +3846,10 @@ __Result:__ - *res* :: string __Tags:__ -[private](/developer/ejabberd-api/admin-tags/#private) +[private](../../developer/ejabberd-api/admin-tags.md#private) __Module:__ -[mod_admin_extra](/archive/22_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -3887,10 +3886,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[private](/developer/ejabberd-api/admin-tags/#private) +[private](../../developer/ejabberd-api/admin-tags.md#private) __Module:__ -[mod_admin_extra](/archive/22_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -3964,10 +3963,10 @@ __Result:__ - *response* :: [{user::string, contact::string}] __Tags:__ -[roster](/developer/ejabberd-api/admin-tags/#roster) +[roster](../../developer/ejabberd-api/admin-tags.md#roster) __Module:__ -[mod_admin_extra](/archive/22_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -4013,10 +4012,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[roster](/developer/ejabberd-api/admin-tags/#roster) +[roster](../../developer/ejabberd-api/admin-tags.md#roster) __Module:__ -[mod_admin_extra](/archive/22_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -4058,10 +4057,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[roster](/developer/ejabberd-api/admin-tags/#roster) +[roster](../../developer/ejabberd-api/admin-tags.md#roster) __Module:__ -[mod_admin_extra](/archive/22_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -4100,10 +4099,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[roster](/developer/ejabberd-api/admin-tags/#roster) +[roster](../../developer/ejabberd-api/admin-tags.md#roster) __Module:__ -[mod_admin_extra](/archive/22_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -4137,7 +4136,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) __Examples:__ @@ -4171,7 +4170,7 @@ __Result:__ - *users* :: [username::string] : List of registered accounts usernames __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) __Examples:__ @@ -4205,7 +4204,7 @@ __Result:__ - *vhosts* :: [vhost::string] : List of available vhosts __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](../../developer/ejabberd-api/admin-tags.md#server) __Examples:__ @@ -4239,7 +4238,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[config](/developer/ejabberd-api/admin-tags/#config) +[config](../../developer/ejabberd-api/admin-tags.md#config) __Examples:__ @@ -4272,10 +4271,10 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mam](/developer/ejabberd-api/admin-tags/#mam) +[mam](../../developer/ejabberd-api/admin-tags.md#mam) __Module:__ -[mod_mam](/archive/22_10/modules/#mod-mam) +[mod_mam](modules.md#mod_mam) __Examples:__ @@ -4310,10 +4309,10 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mam](/developer/ejabberd-api/admin-tags/#mam) +[mam](../../developer/ejabberd-api/admin-tags.md#mam) __Module:__ -[mod_mam](/archive/22_10/modules/#mod-mam) +[mod_mam](modules.md#mod_mam) __Examples:__ @@ -4339,7 +4338,7 @@ __Examples:__ Reopen the log files after being renamed -This can be useful when an external tool is used for log rotation. See https://docs.ejabberd.im/admin/guide/troubleshooting/#log-files +This can be useful when an external tool is used for log rotation. See https://docs.ejabberd.im/admin/guide/troubleshooting/#log_files __Arguments:__ @@ -4349,7 +4348,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[logs](/developer/ejabberd-api/admin-tags/#logs) +[logs](../../developer/ejabberd-api/admin-tags.md#logs) __Examples:__ @@ -4381,7 +4380,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[acme](/developer/ejabberd-api/admin-tags/#acme) +[acme](../../developer/ejabberd-api/admin-tags.md#acme) __Examples:__ @@ -4415,10 +4414,10 @@ __Result:__ - *resource* :: string : Name of user resource __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/22_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -4451,7 +4450,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](../../developer/ejabberd-api/admin-tags.md#server) __Examples:__ @@ -4487,10 +4486,10 @@ __Result:__ - 2: code not reloaded, but module restarted __Tags:__ -[erlang](/developer/ejabberd-api/admin-tags/#erlang) +[erlang](../../developer/ejabberd-api/admin-tags.md#erlang) __Module:__ -[mod_admin_extra](/archive/22_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -4526,7 +4525,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -4558,7 +4557,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[acme](/developer/ejabberd-api/admin-tags/#acme) +[acme](../../developer/ejabberd-api/admin-tags.md#acme) __Examples:__ @@ -4593,10 +4592,10 @@ __Result:__ - *rooms* :: [room::string] : List of empty rooms that have been destroyed __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/22_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -4634,10 +4633,10 @@ __Result:__ - *rooms* :: [room::string] : List of empty rooms __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/22_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -4676,10 +4675,10 @@ __Result:__ - *rooms* :: [room::string] : List of unused rooms that has been destroyed __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/22_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -4719,10 +4718,10 @@ __Result:__ - *rooms* :: [room::string] : List of unused rooms __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/22_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -4757,7 +4756,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[logs](/developer/ejabberd-api/admin-tags/#logs) +[logs](../../developer/ejabberd-api/admin-tags.md#logs) __Examples:__ @@ -4781,7 +4780,7 @@ __Examples:__ Send a direct invitation to several destinations -Since ejabberd 20.12, this command is asynchronous: the API call may return before the server has send all the invitations. +Since ejabberd 20.12, this command is asynchronous: the API call may return before the server has send all the invitations. Password and Message can also be: none. Users JIDs are separated with : @@ -4798,10 +4797,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/22_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -4844,10 +4843,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[stanza](/developer/ejabberd-api/admin-tags/#stanza) +[stanza](../../developer/ejabberd-api/admin-tags.md#stanza) __Module:__ -[mod_admin_extra](/archive/22_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -4885,10 +4884,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[stanza](/developer/ejabberd-api/admin-tags/#stanza) +[stanza](../../developer/ejabberd-api/admin-tags.md#stanza) __Module:__ -[mod_admin_extra](/archive/22_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -4928,10 +4927,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[stanza](/developer/ejabberd-api/admin-tags/#stanza) +[stanza](../../developer/ejabberd-api/admin-tags.md#stanza) __Module:__ -[mod_admin_extra](/archive/22_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -4972,10 +4971,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[last](/developer/ejabberd-api/admin-tags/#last) +[last](../../developer/ejabberd-api/admin-tags.md#last) __Module:__ -[mod_admin_extra](/archive/22_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5010,7 +5009,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[logs](/developer/ejabberd-api/admin-tags/#logs) +[logs](../../developer/ejabberd-api/admin-tags.md#logs) __Examples:__ @@ -5045,7 +5044,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[cluster](/developer/ejabberd-api/admin-tags/#cluster) +[cluster](../../developer/ejabberd-api/admin-tags.md#cluster) __Examples:__ @@ -5079,10 +5078,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[vcard](/developer/ejabberd-api/admin-tags/#vcard) +[vcard](../../developer/ejabberd-api/admin-tags.md#vcard) __Module:__ -[mod_admin_extra](/archive/22_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5122,10 +5121,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/22_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5166,10 +5165,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/22_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -5218,10 +5217,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[vcard](/developer/ejabberd-api/admin-tags/#vcard) +[vcard](../../developer/ejabberd-api/admin-tags.md#vcard) __Module:__ -[mod_admin_extra](/archive/22_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5278,10 +5277,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[vcard](/developer/ejabberd-api/admin-tags/#vcard) +[vcard](../../developer/ejabberd-api/admin-tags.md#vcard) __Module:__ -[mod_admin_extra](/archive/22_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5339,10 +5338,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[vcard](/developer/ejabberd-api/admin-tags/#vcard) +[vcard](../../developer/ejabberd-api/admin-tags.md#vcard) __Module:__ -[mod_admin_extra](/archive/22_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5365,7 +5364,7 @@ __Examples:__ ~~~ -
changed in 21.07
+
changed in 21.07
## srg_create @@ -5392,10 +5391,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[shared_roster_group](/developer/ejabberd-api/admin-tags/#shared-roster-group) +[shared_roster_group](../../developer/ejabberd-api/admin-tags.md#shared_roster_group) __Module:__ -[mod_admin_extra](/archive/22_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5432,10 +5431,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[shared_roster_group](/developer/ejabberd-api/admin-tags/#shared-roster-group) +[shared_roster_group](../../developer/ejabberd-api/admin-tags.md#shared_roster_group) __Module:__ -[mod_admin_extra](/archive/22_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5469,10 +5468,10 @@ __Result:__ - *informations* :: [{key::string, value::string}] : List of group information, as key and value __Tags:__ -[shared_roster_group](/developer/ejabberd-api/admin-tags/#shared-roster-group) +[shared_roster_group](../../developer/ejabberd-api/admin-tags.md#shared_roster_group) __Module:__ -[mod_admin_extra](/archive/22_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5515,10 +5514,10 @@ __Result:__ - *members* :: [member::string] : List of group identifiers __Tags:__ -[shared_roster_group](/developer/ejabberd-api/admin-tags/#shared-roster-group) +[shared_roster_group](../../developer/ejabberd-api/admin-tags.md#shared_roster_group) __Module:__ -[mod_admin_extra](/archive/22_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5554,10 +5553,10 @@ __Result:__ - *groups* :: [id::string] : List of group identifiers __Tags:__ -[shared_roster_group](/developer/ejabberd-api/admin-tags/#shared-roster-group) +[shared_roster_group](../../developer/ejabberd-api/admin-tags.md#shared_roster_group) __Module:__ -[mod_admin_extra](/archive/22_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5595,10 +5594,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[shared_roster_group](/developer/ejabberd-api/admin-tags/#shared-roster-group) +[shared_roster_group](../../developer/ejabberd-api/admin-tags.md#shared_roster_group) __Module:__ -[mod_admin_extra](/archive/22_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5636,10 +5635,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[shared_roster_group](/developer/ejabberd-api/admin-tags/#shared-roster-group) +[shared_roster_group](../../developer/ejabberd-api/admin-tags.md#shared_roster_group) __Module:__ -[mod_admin_extra](/archive/22_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5674,10 +5673,10 @@ __Result:__ - *stat* :: integer : Integer statistic value __Tags:__ -[statistics](/developer/ejabberd-api/admin-tags/#statistics) +[statistics](../../developer/ejabberd-api/admin-tags.md#statistics) __Module:__ -[mod_admin_extra](/archive/22_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5710,10 +5709,10 @@ __Result:__ - *stat* :: integer : Integer statistic value __Tags:__ -[statistics](/developer/ejabberd-api/admin-tags/#statistics) +[statistics](../../developer/ejabberd-api/admin-tags.md#statistics) __Module:__ -[mod_admin_extra](/archive/22_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5745,7 +5744,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](../../developer/ejabberd-api/admin-tags.md#server) __Examples:__ @@ -5777,10 +5776,10 @@ __Result:__ - *users* :: [{user::string, host::string, resource::string, priority::integer, status::string}] __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/22_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5821,10 +5820,10 @@ __Result:__ - *users* :: [{user::string, host::string, resource::string, priority::integer, status::string}] __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/22_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5865,10 +5864,10 @@ __Result:__ - *users* :: integer : Number of connected sessions with given status type __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) [statistics](/developer/ejabberd-api/admin-tags/#statistics) +[session](../../developer/ejabberd-api/admin-tags.md#session) [statistics](../../developer/ejabberd-api/admin-tags.md#statistics) __Module:__ -[mod_admin_extra](/archive/22_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5901,10 +5900,10 @@ __Result:__ - *users* :: integer : Number of connected sessions with given status type __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) [statistics](/developer/ejabberd-api/admin-tags/#statistics) +[session](../../developer/ejabberd-api/admin-tags.md#session) [statistics](../../developer/ejabberd-api/admin-tags.md#statistics) __Module:__ -[mod_admin_extra](/archive/22_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5936,7 +5935,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](../../developer/ejabberd-api/admin-tags.md#server) __Examples:__ @@ -5973,7 +5972,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](../../developer/ejabberd-api/admin-tags.md#server) __Examples:__ @@ -6005,7 +6004,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[s2s](/developer/ejabberd-api/admin-tags/#s2s) +[s2s](../../developer/ejabberd-api/admin-tags.md#s2s) __Examples:__ @@ -6040,10 +6039,10 @@ __Result:__ - *nodes* :: [node::string] : The list of nodes that has subscribed __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/22_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -6065,7 +6064,7 @@ __Examples:__ ~~~ -
added in 22.05
+
added in 22.05
## subscribe_room_many @@ -6086,10 +6085,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/22_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -6135,10 +6134,10 @@ __Result:__ - *unbanned* :: integer : Amount of unbanned entries, or negative in case of error. __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) __Module:__ -[mod_fail2ban](/archive/22_10/modules/#mod-fail2ban) +[mod_fail2ban](modules.md#mod_fail2ban) __Examples:__ @@ -6174,7 +6173,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) __Examples:__ @@ -6208,10 +6207,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/22_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -6244,7 +6243,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](../../developer/ejabberd-api/admin-tags.md#server) __Examples:__ @@ -6275,7 +6274,7 @@ __Result:__ - *modules* :: [module::string] __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](../../developer/ejabberd-api/admin-tags.md#server) __Examples:__ @@ -6309,10 +6308,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[sql](/developer/ejabberd-api/admin-tags/#sql) +[sql](../../developer/ejabberd-api/admin-tags.md#sql) __Module:__ -[mod_admin_update_sql](/archive/22_10/modules/#mod-admin-update-sql) +[mod_admin_update_sql](modules.md#mod_admin_update_sql) __Examples:__ @@ -6345,7 +6344,7 @@ __Result:__ - *resources* :: [resource::string] __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Examples:__ @@ -6383,10 +6382,10 @@ __Result:__ - *sessions_info* :: [{connection::string, ip::string, port::integer, priority::integer, node::string, uptime::integer, status::string, resource::string, statustext::string}] __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/22_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ diff --git a/content/archive/22_10/index.md b/content/archive/22.10/index.md similarity index 60% rename from content/archive/22_10/index.md rename to content/archive/22.10/index.md index 8104fa10..c435e85e 100644 --- a/content/archive/22_10/index.md +++ b/content/archive/22.10/index.md @@ -1,15 +1,11 @@ ---- -title: Archived Documentation for 22.10 -menu: 22.10 -order: 7789 ---- +# Archived Documentation for 22.10 This section contains some archived sections for ejabberd 22.10. If you are upgrading ejabberd from a previous release, you can check: -* [Specific version upgrade notes](/admin/upgrade/#specific-version-upgrade-notes) +* [Specific version upgrade notes](upgrade.md) * [ejabberd 22.10 release announcement](https://www.process-one.net/blog/ejabberd-22-10/) -* [Docs Github Compare from 22.05](https://github.com/processone/docs.ejabberd.im/compare/22.05...22.10) -* [ejabberd Github Compare from 22.05](https://github.com/processone/ejabberd/compare/22.05...22.10) +* [Docs Github Compare from 22.05](https://github.com/processone/docs.ejabberd.im/compare/22.05..22.10) +* [ejabberd Github Compare from 22.05](https://github.com/processone/ejabberd/compare/22.05..22.10) diff --git a/content/archive/22_10/listen-options.md b/content/archive/22.10/listen-options.md similarity index 77% rename from content/archive/22_10/listen-options.md rename to content/archive/22.10/listen-options.md index 768cf594..f85c63bf 100644 --- a/content/archive/22_10/listen-options.md +++ b/content/archive/22.10/listen-options.md @@ -1,10 +1,9 @@ --- -title: Listen Options -toc: true -menu: Listen Opts -order: 51 +search: + exclude: true --- +# Listen Options This is a detailed description of each option allowed by the listening modules: @@ -34,18 +33,18 @@ The default is to use system defined file if possible. This option is useful to define the file for a specific port listener. To set a file for all client listeners or for specific vhosts, you can use the -[`c2s_cafile`](/archive/22_10/toplevel/#c2s-cafile) top-level option. +[`c2s_cafile`](toplevel.md#c2s-cafile) top-level option. To set a file for all server connections, you can use the -[`s2s_cafile`](/archive/22_10/toplevel/#s2s-cafile) top-level option +[`s2s_cafile`](toplevel.md#s2s-cafile) top-level option or the -[`ca_file`](/archive/22_10/toplevel/#ca-file) top-level option. +[`ca_file`](toplevel.md#ca_file) top-level option. Please note: if this option is set in -[`ejabberd_c2s`](/archive/22_10/listen/#ejabberd-c2s) -or [`ejabberd_s2s_in`](/archive/22_10/listen/#ejabberd-s2s-in) +[`ejabberd_c2s`](listen.md#ejabberd_c2s) +or [`ejabberd_s2s_in`](listen.md#ejabberd_s2s-in) and the corresponding top-level option is also set -([`c2s_cafile`](/archive/22_10/toplevel/#c2s-cafile), -[`s2s_cafile`](/archive/22_10/toplevel/#s2s-cafile)), +([`c2s_cafile`](toplevel.md#c2s-cafile), +[`s2s_cafile`](toplevel.md#s2s-cafile)), then the top-level option is used, not this one. ## certfile @@ -56,15 +55,15 @@ Path to the certificate file. Only makes sense when the [`tls`](#tls) options is set. If this option is not set, you should set the -[`certfiles`](/archive/22_10/toplevel/#certfiles) top-level option -or configure [ACME](/admin/configuration/basic/#acme). +[`certfiles`](toplevel.md#certfiles) top-level option +or configure [ACME](../../admin/configuration/basic.md#acme). ## check_from *true | false* This option can be used with -[`ejabberd_service`](/archive/22_10/listen/#ejabberd-service) only. +[`ejabberd_service`](listen.md#ejabberd_service) only. [`XEP-0114`](https://xmpp.org/extensions/xep-0114.html) requires that the domain must match the hostname of the component. If this option is set to `false`, `ejabberd` will allow the component to send @@ -81,11 +80,11 @@ OpenSSL ciphers list in the same format accepted by ‘`openssl ciphers`’ command. Please note: if this option is set in -[`ejabberd_c2s`](/archive/22_10/listen/#ejabberd-c2s) -or [`ejabberd_s2s_in`](/archive/22_10/listen/#ejabberd-s2s-in) +[`ejabberd_c2s`](listen.md#ejabberd_c2s) +or [`ejabberd_s2s_in`](listen.md#ejabberd_s2s-in) and the corresponding top-level option is also set -([`c2s_ciphers`](/archive/22_10/toplevel/#c2s-ciphers), -[`s2s_ciphers`](/archive/22_10/toplevel/#s2s-ciphers)), +([`c2s_ciphers`](toplevel.md#c2s-ciphers), +[`s2s_ciphers`](toplevel.md#s2s-ciphers)), then the top-level option is used, not this one. ## custom_headers @@ -102,7 +101,7 @@ Default value is: `[]` If the HTTP request received by ejabberd contains the HTTP header `Host` with an ambiguous virtual host that doesn’t match any one defined in ejabberd (see - [Host Names](/admin/configuration/basic/#host-names)), + [Host Names](../../admin/configuration/basic.md#host_names)), then this configured HostName is set as the request Host. The default value of this option is: `undefined`. @@ -118,11 +117,11 @@ Full path to a file containing custom parameters for Diffie-Hellman key of security as using custom parameters. Please note: if this option is set in -[`ejabberd_c2s`](/archive/22_10/listen/#ejabberd-c2s) -or [`ejabberd_s2s_in`](/archive/22_10/listen/#ejabberd-s2s-in) +[`ejabberd_c2s`](listen.md#ejabberd_c2s) +or [`ejabberd_s2s_in`](listen.md#ejabberd_s2s-in) and the corresponding top-level option is also set -([`c2s_dhfile`](/archive/22_10/toplevel/#c2s-dhfile), -[`s2s_dhfile`](/archive/22_10/toplevel/#s2s-dhfile)), +([`c2s_dhfile`](toplevel.md#c2s-dhfile), +[`s2s_dhfile`](toplevel.md#s2s-dhfile)), then the top-level option is used, not this one. ## global_routes @@ -130,7 +129,7 @@ then the top-level option is used, not this one. *true | false* This option emulates legacy behaviour which registers all routes -defined in [`hosts`](/archive/22_10/toplevel/#hosts) +defined in [`hosts`](toplevel.md#hosts) on a component connected. This behaviour is considered harmful in the case when it's desired to multiplex different components on the same port, so, to disable it, @@ -145,7 +144,7 @@ to maintain backward compatibility with existing deployments. *{Hostname: [HostOption, ...]}* The external Jabber component that connects to this -[`ejabberd_service`](/archive/22_10/listen/#ejabberd-service) +[`ejabberd_service`](listen.md#ejabberd_service) can serve one or more hostnames. As `HostOption` you can define options for the component; currently the only allowed option is the password required to the component when attempt to @@ -169,10 +168,10 @@ This option specifies the maximum number of elements in the queue of corresponding connection (if any) will be terminated and error message will be logged. The reasonable value for this option depends on your hardware configuration. This option can be specified for - [`ejabberd_service`](/archive/22_10/listen/#ejabberd-service) - and [`ejabberd_c2s`](/archive/22_10/listen/#ejabberd-c2s) + [`ejabberd_service`](listen.md#ejabberd_service) + and [`ejabberd_c2s`](listen.md#ejabberd_c2s) listeners, or also globally for - [`ejabberd_s2s_out`](/archive/22_10/listen/#ejabberd-s2s-out). + [`ejabberd_s2s_out`](listen.md#ejabberd_s2s-out). If the option is not specified for `ejabberd_service` or `ejabberd_c2s` listeners, the globally configured value is used. The allowed values are integers and @@ -204,7 +203,7 @@ This option specifies an approximate maximum size in bytes of XML Specify the password to verify an external component that connects to the port. -
improved in 20.07
+
improved in 20.07
## port @@ -225,11 +224,11 @@ List of general options relating to SSL/TLS. These map to The default entry is: `"no_sslv3|cipher_server_preference|no_compression"` Please note: if this option is set in -[`ejabberd_c2s`](/archive/22_10/listen/#ejabberd-c2s) -or [`ejabberd_s2s_in`](/archive/22_10/listen/#ejabberd-s2s-in) +[`ejabberd_c2s`](listen.md#ejabberd_c2s) +or [`ejabberd_s2s_in`](listen.md#ejabberd_s2s-in) and the corresponding top-level option is also set -([`c2s_protocol_options`](/archive/22_10/toplevel/#c2s-protocol-options), -[`s2s_protocol_options`](/archive/22_10/toplevel/#s2s-protocol-options)), +([`c2s_protocol_options`](toplevel.md#c2s-protocol-options), +[`s2s_protocol_options`](toplevel.md#s2s-protocol-options)), then the top-level option is used, not this one. ## request_handlers @@ -237,7 +236,7 @@ then the top-level option is used, not this one. *{Path: Module}* To define one or several handlers that will serve HTTP requests in -[`ejabberd_http`](/archive/22_10/listen/#ejabberd-http). The +[`ejabberd_http`](listen.md#ejabberd_http). The Path is a string; so the URIs that start with that Path will be served by Module. For example, if you want `mod_foo` to serve the URIs that start with `/a/b/`, and you also want `mod_bosh` to @@ -248,7 +247,7 @@ To define one or several handlers that will serve HTTP requests in /bosh: mod_bosh /mqtt: mod_mqtt -
new in 21.07
+
new in 21.07
## send_timeout @@ -261,7 +260,7 @@ Sets the longest time that data can wait to be accepted to sent by OS socket. Tr *none | ShaperName* This option defines a shaper for the port (see section  -[Shapers](/admin/configuration/basic/#shapers)). +[Shapers](../../admin/configuration/basic.md#shapers)). The default value is `none`. ## shaper_rule @@ -269,8 +268,8 @@ This option defines a shaper for the port (see section  *none | ShaperRule* This option defines a shaper rule for -[`ejabberd_service`](/archive/22_10/listen/#ejabberd-service) (see -section [Shapers](/admin/configuration/basic/#shapers)). +[`ejabberd_service`](listen.md#ejabberd_service) (see +section [Shapers](../../admin/configuration/basic.md#shapers)). The recommended value is `fast`. ## starttls @@ -279,11 +278,11 @@ The recommended value is `fast`. This option specifies that STARTTLS encryption is available on connections to the port. You should also set the -[`certfiles`](/archive/22_10/toplevel/#certfiles) top-level option -or configure [ACME](/admin/configuration/basic/#acme). +[`certfiles`](toplevel.md#certfiles) top-level option +or configure [ACME](../../admin/configuration/basic.md#acme). This option gets implicitly enabled when enabling -[`starttls_required`](#starttls-required) or [`tls_verify`](#tls-verify). +[`starttls_required`](#starttls_required) or [`tls_verify`](#tls_verify). ## starttls_required @@ -292,8 +291,8 @@ This option gets implicitly enabled when enabling This option specifies that STARTTLS encryption is required on connections to the port. No unencrypted connections will be allowed. You should also set the -[`certfiles`](/archive/22_10/toplevel/#certfiles) top-level option -or configure [ACME](/admin/configuration/basic/#acme). +[`certfiles`](toplevel.md#certfiles) top-level option +or configure [ACME](../../admin/configuration/basic.md#acme). Enabling this option implicitly enables also the [`starttls`](#starttls) option. @@ -303,7 +302,7 @@ Enabling this option implicitly enables also the [`starttls`](#starttls) option. Allow specifying a tag in a `listen` section and later use it to have a special -[`api_permissions`](/archive/22_10/toplevel/#api-permissions) +[`api_permissions`](toplevel.md#api_permissions) just for it. For example: @@ -344,11 +343,11 @@ This option specifies that traffic on the port will be encrypted [`starttls`](#starttls). If this option is set, you should also set the - [`certfiles`](/archive/22_10/toplevel/#certfiles) top-level - option or configure [ACME](/admin/configuration/basic/#acme). + [`certfiles`](toplevel.md#certfiles) top-level + option or configure [ACME](../../admin/configuration/basic.md#acme). The option `tls` can also be used in - [`ejabberd_http`](/archive/22_10/listen/#ejabberd-http) + [`ejabberd_http`](listen.md#ejabberd_http) to support HTTPS. Enabling this option implicitly disables the [`starttls`](#starttls) option. @@ -361,11 +360,11 @@ Whether to enable or disable TLS compression. The default value is `false`. Please note: if this option is set in -[`ejabberd_c2s`](/archive/22_10/listen/#ejabberd-c2s) -or [`ejabberd_s2s_in`](/archive/22_10/listen/#ejabberd-s2s-in) +[`ejabberd_c2s`](listen.md#ejabberd_c2s) +or [`ejabberd_s2s_in`](listen.md#ejabberd_s2s-in) and the corresponding top-level option is also set -([`c2s_tls_compression`](/archive/22_10/toplevel/#c2s-tls-compression), -[`s2s_tls_compression`](/archive/22_10/toplevel/#s2s-tls-compression)), +([`c2s_tls_compression`](toplevel.md#c2s-tls-compression), +[`s2s_tls_compression`](toplevel.md#s2s-tls-compression)), then the top-level option is used, not this one. ## tls_verify diff --git a/content/archive/23_01/listen.md b/content/archive/22.10/listen.md similarity index 78% rename from content/archive/23_01/listen.md rename to content/archive/22.10/listen.md index 6f1e0440..78e02ebe 100644 --- a/content/archive/23_01/listen.md +++ b/content/archive/22.10/listen.md @@ -1,11 +1,8 @@ --- -title: Listen Modules -toc: true -menu: Listen Modules -order: 50 +search: + exclude: true --- - # Listen Option The **listen option** defines for which ports, addresses and network @@ -73,37 +70,37 @@ are: Handles c2s connections. Options: -[access](/archive/23_01/listen-options/#access), -[cafile](/archive/23_01/listen-options/#cafile), -[ciphers](/archive/23_01/listen-options/#ciphers), -[dhfile](/archive/23_01/listen-options/#dhfile), -[max_fsm_queue](/archive/23_01/listen-options/#max-fsm-queue), -[max_stanza_size](/archive/23_01/listen-options/#max-stanza-size), -[protocol_options](/archive/23_01/listen-options/#protocol-options), -[send_timeout](/archive/23_01/listen-options/#send-timeout), -[shaper](/archive/23_01/listen-options/#shaper), -[starttls](/archive/23_01/listen-options/#starttls), -[starttls_required](/archive/23_01/listen-options/#starttls-required), -[tls](/archive/23_01/listen-options/#tls), -[tls_compression](/archive/23_01/listen-options/#tls-compression), -[tls_verify](/archive/23_01/listen-options/#tls-verify), -[zlib](/archive/23_01/listen-options/#zlib). +[access](listen-options.md#access), +[cafile](listen-options.md#cafile), +[ciphers](listen-options.md#ciphers), +[dhfile](listen-options.md#dhfile), +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_stanza_size](listen-options.md#max_stanza_size), +[protocol_options](listen-options.md#protocol_options), +[send_timeout](listen-options.md#send_timeout), +[shaper](listen-options.md#shaper), +[starttls](listen-options.md#starttls), +[starttls_required](listen-options.md#starttls_required), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls_compression), +[tls_verify](listen-options.md#tls_verify), +[zlib](listen-options.md#zlib). ## ejabberd_s2s_in Handles incoming s2s connections. Options: -[cafile](/archive/23_01/listen-options/#cafile), -[ciphers](/archive/23_01/listen-options/#ciphers), -[dhfile](/archive/23_01/listen-options/#dhfile), -[max_fsm_queue](/archive/23_01/listen-options/#max-fsm-queue), -[max_stanza_size](/archive/23_01/listen-options/#max-stanza-size), -[protocol_options](/archive/23_01/listen-options/#protocol-options), -[send_timeout](/archive/23_01/listen-options/#send-timeout), -[shaper](/archive/23_01/listen-options/#shaper), -[tls](/archive/23_01/listen-options/#tls), -[tls_compression](/archive/23_01/listen-options/#tls-compression). +[cafile](listen-options.md#cafile), +[ciphers](listen-options.md#ciphers), +[dhfile](listen-options.md#dhfile), +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_stanza_size](listen-options.md#max_stanza_size), +[protocol_options](listen-options.md#protocol_options), +[send_timeout](listen-options.md#send_timeout), +[shaper](listen-options.md#shaper), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls_compression). ## ejabberd_service @@ -113,23 +110,23 @@ Interacts with an ([`XEP-0114`](https://xmpp.org/extensions/xep-0114.html)). Options: -[access](/archive/23_01/listen-options/#access), -[cafile](/archive/23_01/listen-options/#cafile), -[certfile](/archive/23_01/listen-options/#certfile), -[check_from](/archive/23_01/listen-options/#check-from), -[ciphers](/archive/23_01/listen-options/#ciphers), -[dhfile](/archive/23_01/listen-options/#dhfile), -[global_routes](/archive/23_01/listen-options/#global-routes), -[hosts](/archive/23_01/listen-options/#hosts), -[max_fsm_queue](/archive/23_01/listen-options/#max-fsm-queue), -[max_stanza_size](/archive/23_01/listen-options/#max-stanza-size), -[password](/archive/23_01/listen-options/#password), -[protocol_options](/archive/23_01/listen-options/#protocol-options), -[send_timeout](/archive/23_01/listen-options/#send-timeout), -[shaper](/archive/23_01/listen-options/#shaper), -[shaper_rule](/archive/23_01/listen-options/#shaper-rule), -[tls](/archive/23_01/listen-options/#tls), -[tls_compression](/archive/23_01/listen-options/#tls-compression). +[access](listen-options.md#access), +[cafile](listen-options.md#cafile), +[certfile](listen-options.md#certfile), +[check_from](listen-options.md#check_from), +[ciphers](listen-options.md#ciphers), +[dhfile](listen-options.md#dhfile), +[global_routes](listen-options.md#global_routes), +[hosts](listen-options.md#hosts), +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_stanza_size](listen-options.md#max_stanza_size), +[password](listen-options.md#password), +[protocol_options](listen-options.md#protocol_options), +[send_timeout](listen-options.md#send_timeout), +[shaper](listen-options.md#shaper), +[shaper_rule](listen-options.md#shaper_rule), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls_compression). ## ejabberd_sip @@ -137,13 +134,13 @@ Handles SIP requests as defined in [`RFC 3261`](https://tools.ietf.org/html/rfc3261). For details please check the -[ejabberd_sip](/archive/23_01/listen/#ejabberd-sip-1) -and [mod_sip](/archive/23_01/modules/#mod-sip) sections. +[ejabberd_sip](listen.md#ejabberd_sip_1) +and [mod_sip](modules.md#mod_sip) sections. General listener options: -[certfile](/archive/23_01/listen-options/#certfile), -[send_timeout](/archive/23_01/listen-options/#send-timeout), -[tls](/archive/23_01/listen-options/#tls). +[certfile](listen-options.md#certfile), +[send_timeout](listen-options.md#send_timeout), +[tls](listen-options.md#tls). ## ejabberd_stun @@ -152,7 +149,7 @@ Handles STUN/TURN requests as defined in [`RFC 5766`](https://tools.ietf.org/html/rfc5766). For the specific module options, please check the -[ejabberd_stun](/archive/23_01/listen/#ejabberd-stun-1) section: +[ejabberd_stun](listen.md#ejabberd_stun_1) section: `auth_realm`, `auth_type`, `server_name`, @@ -166,57 +163,57 @@ For the specific module options, please check the `use_turn`. General listener options: -[certfile](/archive/23_01/listen-options/#certfile), -[send_timeout](/archive/23_01/listen-options/#send-timeout), -[shaper](/archive/23_01/listen-options/#shaper), -[tls](/archive/23_01/listen-options/#tls), +[certfile](listen-options.md#certfile), +[send_timeout](listen-options.md#send_timeout), +[shaper](listen-options.md#shaper), +[tls](listen-options.md#tls), ## ejabberd_http Handles incoming HTTP connections. With the proper request handlers configured, this serves HTTP services like -[ACME](/admin/configuration/basic/#acme), -[API](/archive/23_01/modules/#mod-http-api), -[BOSH](/archive/23_01/modules/#mod-bosh), -[CAPTCHA](/admin/configuration/basic/#captcha), -[Fileserver](/archive/23_01/modules/#mod-http-fileserver), -[OAuth](/developer/ejabberd-api/oauth/), -[RegisterWeb](/archive/23_01/modules/#mod-register-web), -[Upload](/archive/23_01/modules/#mod-http-upload), -[WebAdmin](/admin/guide/managing/#web-admin), -[WebSocket](/archive/23_01/listen/#ejabberd-http-ws), -[XMP-RPC](/archive/23_01/listen/#ejabberd-xmlrpc). +[ACME](../../admin/configuration/basic.md#acme), +[API](modules.md#mod_http_api), +[BOSH](modules.md#mod_bosh), +[CAPTCHA](../../admin/configuration/basic.md#captcha), +[Fileserver](modules.md#mod_http_fileserver), +[OAuth](../../developer/ejabberd-api/oauth.md), +[RegisterWeb](modules.md#mod_register_web), +[Upload](modules.md#mod_http_upload), +[WebAdmin](../../admin/guide/managing.md#web_admin), +[WebSocket](listen.md#ejabberd_http_ws), +[XMP-RPC](listen.md#ejabberd_xmlrpc). Options: -[cafile](/archive/23_01/listen-options/#cafile), -[ciphers](/archive/23_01/listen-options/#ciphers), -[custom_headers](/archive/23_01/listen-options/#custom-headers), -[default_host](/archive/23_01/listen-options/#default-host), -[dhfile](/archive/23_01/listen-options/#dhfile), -[protocol_options](/archive/23_01/listen-options/#protocol-options), -[request_handlers](/archive/23_01/listen-options/#request-handlers), -[send_timeout](/archive/23_01/listen-options/#send-timeout), -[tag](/archive/23_01/listen-options/#tag), -[tls](/archive/23_01/listen-options/#tls), -[tls_compression](/archive/23_01/listen-options/#tls-compression), -and the [trusted_proxies](/archive/23_01/toplevel/#trusted-proxies) top-level option. +[cafile](listen-options.md#cafile), +[ciphers](listen-options.md#ciphers), +[custom_headers](listen-options.md#custom_headers), +[default_host](listen-options.md#default_host), +[dhfile](listen-options.md#dhfile), +[protocol_options](listen-options.md#protocol_options), +[request_handlers](listen-options.md#request_handlers), +[send_timeout](listen-options.md#send_timeout), +[tag](listen-options.md#tag), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls_compression), +and the [trusted_proxies](toplevel.md#trusted_proxies) top-level option. ## mod_mqtt Support for MQTT requires configuring `mod_mqtt` both in the -[listen](/archive/23_01/toplevel/#listen) and the -[modules](/archive/23_01/toplevel/#modules) sections. -Check the [mod_mqtt module](/archive/23_01/modules/#mod-mqtt) options, -and the [MQTT Support](/admin/guide/mqtt/) section. +[listen](toplevel.md#listen) and the +[modules](toplevel.md#modules) sections. +Check the [mod_mqtt module](modules.md#mod_mqtt) options, +and the [MQTT Support](../../admin/guide/mqtt/index.md) section. Listen options: -[backlog](/archive/23_01/listen-options/#backlog), -[max_fsm_queue](/archive/23_01/listen-options/#max-fsm-queue), -[max_payload_size](/archive/23_01/listen-options/#max-payload-size), -[send_timeout](/archive/23_01/listen-options/#send-timeout), -[tls](/archive/23_01/listen-options/#tls), -[tls_verify](/archive/23_01/listen-options/#tls-verify). +[backlog](listen-options.md#backlog), +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_payload_size](listen-options.md#max_payload_size), +[send_timeout](listen-options.md#send_timeout), +[tls](listen-options.md#tls), +[tls_verify](listen-options.md#tls_verify). @@ -339,14 +336,14 @@ And you should also add these in the case if TURN is enabled: ## SIP Configuration `ejabberd` has built-in SIP support. To activate this feature, -add the [`ejabberd_sip`](#ejabberd-sip) listen module, enable -[`mod_sip`](/archive/23_01/modules/#mod-sip) module +add the [`ejabberd_sip`](#ejabberd_sip) listen module, enable +[`mod_sip`](modules.md#mod_sip) module for the desired virtual host, and configure DNS properly. To add a listener you should configure `ejabberd_sip` listening module as described in [Listen](#listen-option) section. -If option [`tls`](/archive/23_01/listen-options/#tls) is specified, -option [`certfile`](/archive/23_01/listen-options/#certfile) +If option [`tls`](listen-options.md#tls) is specified, +option [`certfile`](listen-options.md#certfile) must be specified as well, otherwise incoming TLS connections would fail. @@ -426,9 +423,9 @@ section of an `ejabberd_http` listener: This module can be configured using those top-level options: -- [websocket\_origin](/archive/23_01/toplevel/#websocket-origin) -- [websocket\_ping\_interval](/archive/23_01/toplevel/#websocket-ping-interval) -- [websocket\_timeout](/archive/23_01/toplevel/#websocket-timeout) +- [websocket\_origin](toplevel.md#websocket_origin) +- [websocket\_ping\_interval](toplevel.md#websocket_ping_interval) +- [websocket\_timeout](toplevel.md#websocket_timeout) ## WebSocket Discovery @@ -439,7 +436,7 @@ You may want to provide a `host-meta` file so clients can easily discover WebSocket service for your XMPP domain (see [XEP-0156](https://xmpp.org/extensions/xep-0156.html#http)). One easy way to provide that file is using -[`mod_host_meta`](/archive/23_01/modules/#mod-host-meta). +[`mod_host_meta`](modules.md#mod_host_meta). ## Testing WebSocket @@ -453,13 +450,13 @@ There is an example configuration for WebSocket and Converse.js in the # ejabberd_xmlrpc Handles XML-RPC requests to execute -[ejabberd commands](/admin/guide/managing/#ejabberd-commands). +[ejabberd commands](../../admin/guide/managing.md#ejabberd_commands). It is configured as a request handler in -[ejabberd_http](/archive/23_01/listen/#ejabberd-http). +[ejabberd_http](listen.md#ejabberd_http). By default there is no restriction to who can execute what commands, so it is strongly recommended that you configure restrictions using -[API Permissions](/developer/ejabberd-api/permissions/). +[API Permissions](../../developer/ejabberd-api/permissions.md). This is the minimum configuration required to enable the feature: @@ -514,11 +511,11 @@ With that configuration, it is possible to execute two specific commands using print calling('registered_users', {'host':'localhost'}) It's possible to use OAuth for authentication instead of plain password, see -[OAuth Support](/developer/ejabberd-api/oauth/). +[OAuth Support](../../developer/ejabberd-api/oauth.md). In ejabberd 20.03 and older, it was possible to configure `ejabberd_xmlrpc` as a listener, see the old document for reference and example configuration: -[Listening Module](/admin/configuration/old/#listening-module). +[Listening Module](../old.md#listening_module). Just for reference, there's also the old [`ejabberd_xmlrpc documentation`](https://ejabberd.im/ejabberd_xmlrpc). @@ -545,7 +542,7 @@ For example, the following simple configuration defines: service. - Port 5281 listens for HTTP requests, using HTTPS to serve HTTP-Bind - (BOSH) and the Web Admin as explained in [Managing: Web Admin](/admin/guide/managing/#web-admin). The + (BOSH) and the Web Admin as explained in [Managing: Web Admin](../../admin/guide/managing.md#web_admin). The socket only listens connections to the IP address 127.0.0.1. @@ -619,7 +616,7 @@ In this example, the following configuration defines that: - Port 5280 is serving the Web Admin and the HTTP-Bind (BOSH) service in all the IPv4 addresses. Note that it is also possible to serve them - on different ports. The second example in section [Managing: Web Admin](/admin/guide/managing/#web-admin) shows + on different ports. The second example in section [Managing: Web Admin](../../admin/guide/managing.md#web_admin) shows how exactly this can be done. A request handler to serve MQTT over WebSocket is also defined. - All users except for the administrators have a traffic of limit diff --git a/content/archive/22_10/modules.md b/content/archive/22.10/modules.md similarity index 87% rename from content/archive/22_10/modules.md rename to content/archive/22.10/modules.md index 33a1f223..3cde5755 100644 --- a/content/archive/22_10/modules.md +++ b/content/archive/22.10/modules.md @@ -1,10 +1,9 @@ --- -title: Modules Options -toc: true -menu: Modules Opts -order: 95 +search: + exclude: true --- +# Modules Options mod\_adhoc ---------- @@ -83,9 +82,9 @@ mod\_admin\_update\_sql This module can be used to update existing SQL database from the default to the new schema. Check the section [Default and New -Schemas](/admin/configuration/database/#default-and-new-schemas) for details. +Schemas](../../admin/configuration/database.md#default_and_new_schemas) for details. Please note that only PostgreSQL is supported. When the module is loaded -use [update_sql](/archive/22_10/admin-api/#update-sql) API. +use [update_sql](admin-api.md#update_sql) API. The module has no options. @@ -102,7 +101,7 @@ it may broadcast a lot of messages. This module should be disabled for instances of ejabberd with hundreds of thousands users. The Ad-hoc Commands are listed in the Server Discovery. For this feature -to work, [mod_adhoc](/archive/22_10/modules/#mod-adhoc) must be enabled. +to work, [mod_adhoc](modules.md#mod_adhoc) must be enabled. The specific JIDs where messages can be sent are listed below. The first JID in each entry will apply only to the specified virtual host @@ -114,7 +113,7 @@ hosts in ejabberd: connected to several resources, only the resource with the highest priority will receive the message. If the registered user is not connected, the message will be stored offline in assumption that - offline storage (see [mod_offline](/archive/22_10/modules/#mod-offline)) is enabled. + offline storage (see [mod_offline](modules.md#mod_offline)) is enabled. - example.org/announce/online (example.org/announce/all-hosts/online):: The message is sent to all @@ -143,23 +142,23 @@ the message of the day. The default value is *none* (i.e. nobody is able to send such messages). - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/22_10/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/22_10/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/22_10/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/22_10/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/22_10/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_avatar ----------- @@ -172,8 +171,8 @@ Conversion](https://xmpp.org/extensions/xep-0398.html). Also, the module supports conversion between avatar image formats on the fly. -The module depends on [mod_vcard](/archive/22_10/modules/#mod-vcard), [mod_vcard_xupdate](/archive/22_10/modules/#mod-vcard-xupdate) and -[mod_pubsub](/archive/22_10/modules/#mod-pubsub). +The module depends on [mod_vcard](modules.md#mod_vcard), [mod_vcard_xupdate](modules.md#mod_vcard_xupdate) and +[mod_pubsub](modules.md#mod_pubsub). __Available options:__ @@ -261,15 +260,15 @@ while having to get through an HTTP proxy. __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/22_10/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/22_10/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/22_10/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **json**: *true | false* @@ -293,15 +292,15 @@ authentication. Basically, it creates a new session with anonymous authentication. The default value is *false*. - **queue\_type**: *ram | file* -Same as top-level [queue_type](/archive/22_10/toplevel/#queue-type) option, but applied to this module +Same as top-level [queue_type](toplevel.md#queue_type) option, but applied to this module only. - **ram\_db\_type**: *mnesia | sql | redis* -Same as top-level [default_ram_db](/archive/22_10/toplevel/#default-ram-db) option, but applied to this module +Same as top-level [default_ram_db](toplevel.md#default_ram_db) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/22_10/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. __**Example**:__ @@ -324,28 +323,28 @@ mod\_caps This module implements [XEP-0115: Entity Capabilities](https://xmpp.org/extensions/xep-0115.html). The main purpose of the module is to provide PEP functionality (see -[mod_pubsub](/archive/22_10/modules/#mod-pubsub)). +[mod_pubsub](modules.md#mod_pubsub)). __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/22_10/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/22_10/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/22_10/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/22_10/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/22_10/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_carboncopy --------------- @@ -392,7 +391,7 @@ mod\_configure The module provides server configuration functionality via [XEP-0050: Ad-Hoc Commands](https://xmpp.org/extensions/xep-0050.html). This module -requires [mod_adhoc](/archive/22_10/modules/#mod-adhoc) to be loaded. +requires [mod_adhoc](modules.md#mod_adhoc) to be loaded. The module has no options. @@ -402,15 +401,15 @@ mod\_conversejs This module serves a simple page for the [Converse](https://conversejs.org/) XMPP web browser client. -This module is available since ejabberd 21.12. Several options were -improved in ejabberd 22.05. +This module is available since ejabberd 21.12. Several options were +improved in ejabberd 22.05. To use this module, in addition to adding it to the *modules* section, you must also enable it in *listen* → *ejabberd\_http* → -[request\_handlers](/archive/22_10/listen-options/#request-handlers). +[request\_handlers](listen-options.md#request_handlers). Make sure either *mod\_bosh* or *ejabberd\_http\_ws* -[request\_handlers](/archive/22_10/listen-options/#request-handlers) are +[request\_handlers](listen-options.md#request_handlers) are enabled. When *conversejs\_css* and *conversejs\_script* are *auto*, by default @@ -428,7 +427,7 @@ value is *auto*. Converse CSS URL. The keyword *@HOST@* is replaced with the hostname. The default value is *auto*. -
added in 22.05
+
added in 22.05
- **conversejs\_options**: *{Name: Value}* Specify additional options to be passed to Converse. See [Converse @@ -436,7 +435,7 @@ configuration](https://conversejs.org/docs/html/configuration.html). Only boolean, integer and string values are supported; lists are not supported. -
added in 22.05
+
added in 22.05
- **conversejs\_resources**: *Path* Local path to the Converse files. If not set, the public Converse client @@ -520,7 +519,7 @@ external PEP service. > **Note** > -> This module is complementary to [mod_privilege](/archive/22_10/modules/#mod-privilege) but can also be used +> This module is complementary to [mod_privilege](modules.md#mod_privilege) but can also be used > separately. __Available options:__ @@ -670,11 +669,11 @@ This module serves small *host-meta* files as described in [XEP-0156: Discovering Alternative XMPP Connection Methods](https://xmpp.org/extensions/xep-0156.html). -This module is available since ejabberd 22.05. +This module is available since ejabberd 22.05. To use this module, in addition to adding it to the *modules* section, you must also enable it in *listen* → *ejabberd\_http* → -[request\_handlers](/archive/22_10/listen-options/#request-handlers). +[request\_handlers](listen-options.md#request_handlers). Notice it only works if ejabberd\_http has tls enabled. @@ -718,7 +717,7 @@ JSON data. To use this module, in addition to adding it to the *modules* section, you must also enable it in *listen* → *ejabberd\_http* → -[request\_handlers](/archive/22_10/listen-options/#request-handlers). +[request\_handlers](listen-options.md#request_handlers). To use a specific API version N, when defining the URL path in the request\_handlers, add a *vN*. For example: */api/v2: mod\_http\_api* @@ -840,7 +839,7 @@ URL from which that file can later be downloaded. In order to use this module, it must be enabled in *listen* → *ejabberd\_http* → -[request\_handlers](/archive/22_10/listen-options/#request-handlers). +[request\_handlers](listen-options.md#request_handlers). __Available options:__ @@ -886,7 +885,7 @@ option is *undefined*, this option is set to the same value as *put\_url*. The keyword @HOST@ is replaced with the virtual host name. NOTE: if GET requests are handled by *mod\_http\_upload*, the *get\_url* must match the *put\_url*. Setting it to a different value only makes -sense if an external web server or [mod_http_fileserver](/archive/22_10/modules/#mod-http-fileserver) is used to +sense if an external web server or [mod_http_fileserver](modules.md#mod_http_fileserver) is used to serve the uploaded files. - **host** @@ -1063,23 +1062,23 @@ of the ejabberd server. __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/22_10/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/22_10/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/22_10/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/22_10/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/22_10/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_legacy\_auth ----------------- @@ -1109,7 +1108,7 @@ The default value is *all*. - **assume\_mam\_usage**: *true | false* This option determines how ejabberd’s stream management code (see -[mod_stream_mgmt](/archive/22_10/modules/#mod-stream-mgmt)) handles unacknowledged messages when the connection +[mod_stream_mgmt](modules.md#mod_stream_mgmt)) handles unacknowledged messages when the connection is lost. Usually, such messages are either bounced or resent. However, neither is done for messages that were stored in the user’s MAM archive if this option is set to *true*. In this case, ejabberd assumes those @@ -1117,19 +1116,19 @@ messages will be retrieved from the archive. The default value is *false*. - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/22_10/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/22_10/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/22_10/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **clear\_archive\_on\_room\_destroy**: *true | false* -Whether to destroy message archive of a room (see [mod_muc](/archive/22_10/modules/#mod-muc)) when it +Whether to destroy message archive of a room (see [mod_muc](modules.md#mod_muc)) when it gets destroyed. The default value is *true*. - **compress\_xml**: *true | false* @@ -1138,7 +1137,7 @@ custom compression algorithm. This feature works only with SQL backends. The default value is *false*. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/22_10/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **default**: *always | never | roster* @@ -1155,7 +1154,7 @@ option. Once the server received a request, that user’s messages are archived as usual. The default value is *false*. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/22_10/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. - **user\_mucsub\_from\_muc\_archive**: *true | false* When this option is disabled, for each individual subscriber a separa @@ -1206,16 +1205,16 @@ mod\_mix This module is an experimental implementation of [XEP-0369: Mediated Information eXchange (MIX)](https://xmpp.org/extensions/xep-0369.html). -MIX support was added in ejabberd 16.03 as an experimental feature, -updated in 19.02, and is not yet ready to use in production. It’s +MIX support was added in ejabberd 16.03 as an experimental feature, +updated in 19.02, and is not yet ready to use in production. It’s asserted that the MIX protocol is going to replace the MUC protocol in -the future (see [mod_muc](/archive/22_10/modules/#mod-muc)). +the future (see [mod_muc](modules.md#mod_muc)). To learn more about how to use that feature, you can refer to our tutorial: [Getting started with XEP-0369: Mediated Information eXchange (MIX) v0.1](https://docs.ejabberd.im/tutorials/mix-010/). -The module depends on [mod_mam](/archive/22_10/modules/#mod-mam). +The module depends on [mod_mam](modules.md#mod_mam). __Available options:__ @@ -1224,7 +1223,7 @@ An access rule to control MIX channels creations. The default value is *all*. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/22_10/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **host** @@ -1258,23 +1257,23 @@ channels (either on your server or on any remote servers). __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/22_10/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/22_10/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/22_10/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/22_10/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/22_10/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_mqtt --------- @@ -1295,19 +1294,19 @@ Access rules to restrict access to topics for subscribers. By default there are no restrictions. - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/22_10/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/22_10/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/22_10/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/22_10/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **match\_retained\_limit**: *pos\_integer() | infinity* @@ -1326,11 +1325,11 @@ The maximum topic depth, i.e. the number of slashes (*/*) in the topic. The default value is *8*. - **queue\_type**: *ram | file* -Same as top-level [queue_type](/archive/22_10/toplevel/#queue-type) option, but applied to this module +Same as top-level [queue_type](toplevel.md#queue_type) option, but applied to this module only. - **ram\_db\_type**: *mnesia* -Same as top-level [default_ram_db](/archive/22_10/toplevel/#default-ram-db) option, but applied to this module +Same as top-level [default_ram_db](toplevel.md#default_ram_db) option, but applied to this module only. - **session\_expiry**: *timeout()* @@ -1339,7 +1338,7 @@ When *0* is set, the session gets destroyed when the underlying client connection is closed. The default value is *5* minutes. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/22_10/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_muc -------- @@ -1396,17 +1395,17 @@ Multi-User Chat service. The default is *all* for backward compatibility, which means that any user is allowed to register any free nick. -
added in 22.05
+
added in 22.05
- **cleanup\_affiliations\_on\_start**: *true | false* Remove affiliations for non-existing local users on startup. The default value is *false*. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/22_10/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. -
improved in 22.05
+
improved in 22.05
- **default\_room\_options**: *Options* This option allows to define the desired default room options. Note that @@ -1483,7 +1482,7 @@ using an XMPP client with MUC capability. The *Options* are: - **logging**: *true | false* The public messages are logged using - [mod_muc_log](/archive/22_10/modules/#mod-muc-log). The default value is *false*. + [mod_muc_log](modules.md#mod_muc_log). The default value is *false*. - **mam**: *true | false* Enable message archiving. Implies mod\_mam @@ -1580,14 +1579,14 @@ is not specified, the only Jabber ID will be the hostname of the virtual host with the prefix "conference.". The keyword *@HOST@* is replaced with the real virtual host name. -
added in 21.01
+
added in 21.01
- **max\_captcha\_whitelist**: *Number* This option defines the maximum number of characters that Captcha Whitelist can have when configuring the room. The default value is *infinity*. -
added in 21.01
+
added in 21.01
- **max\_password**: *Number* This option defines the maximum number of characters that Password can @@ -1670,11 +1669,11 @@ rooms is high: this will improve server startup time and memory consumption. - **queue\_type**: *ram | file* -Same as top-level [queue_type](/archive/22_10/toplevel/#queue-type) option, but applied to this module +Same as top-level [queue_type](toplevel.md#queue_type) option, but applied to this module only. - **ram\_db\_type**: *mnesia | sql* -Same as top-level [default_ram_db](/archive/22_10/toplevel/#default-ram-db) option, but applied to this module +Same as top-level [default_ram_db](toplevel.md#default_ram_db) option, but applied to this module only. - **regexp\_room\_id**: *string()* @@ -1725,11 +1724,11 @@ This module provides commands to administer local MUC services and their MUC rooms. It also provides simple WebAdmin pages to view the existing rooms. -This module depends on [mod_muc](/archive/22_10/modules/#mod-muc). +This module depends on [mod_muc](modules.md#mod_muc). __Available options:__ -
added in 22.05
+
added in 22.05
- **subscribe\_room\_many\_max\_users**: *Number* How many users can be subscribed to a room at once using the @@ -1771,7 +1770,7 @@ Features: - A custom link can be added on top of each page. -The module depends on [mod_muc](/archive/22_10/modules/#mod-muc). +The module depends on [mod_muc](modules.md#mod_muc). __Available options:__ @@ -1967,15 +1966,15 @@ on large MucSub services. The default value is *false*, meaning the optimisation is enabled. - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/22_10/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/22_10/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/22_10/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **store\_empty\_body**: *true | false | unless\_chat\_state* @@ -1990,7 +1989,7 @@ Whether or not to store groupchat messages. The default value is *false*. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/22_10/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. - **use\_mam\_for\_storage**: *true | false* This is an experimental option. Enabling this option, *mod\_offline* @@ -2061,7 +2060,7 @@ or checking availability. The default value is *false*. What to do when a client does not answer to a server ping request in less than period defined in *ping\_ack\_timeout* option: *kill* means destroying the underlying connection, *none* means to do nothing. NOTE: -when [mod_stream_mgmt](/archive/22_10/modules/#mod-stream-mgmt) is loaded and stream management is enabled by a +when [mod_stream_mgmt](modules.md#mod_stream_mgmt) is loaded and stream management is enabled by a client, killing the client connection doesn’t mean killing the client session - the session will be kept alive in order to give the client a chance to resume it. The default value is *none*. @@ -2115,28 +2114,28 @@ Lists](https://xmpp.org/extensions/xep-0016.html). > Nowadays modern XMPP clients rely on [XEP-0191: Blocking > Command](https://xmpp.org/extensions/xep-0191.html) which is > implemented by *mod\_blocking* module. However, you still need -> *mod\_privacy* loaded in order for [mod_blocking](/archive/22_10/modules/#mod-blocking) to work. +> *mod\_privacy* loaded in order for [mod_blocking](modules.md#mod_blocking) to work. __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/22_10/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/22_10/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/22_10/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/22_10/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/22_10/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_private ------------ @@ -2154,23 +2153,23 @@ Bookmarks](https://xmpp.org/extensions/xep-0048.html)). __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/22_10/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/22_10/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/22_10/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/22_10/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/22_10/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_privilege -------------- @@ -2200,7 +2199,7 @@ Check the section about listening ports for more information. > **Note** > -> This module is complementary to [mod_delegation](/archive/22_10/modules/#mod-delegation), but can also be +> This module is complementary to [mod_delegation](modules.md#mod_delegation), but can also be > used separately. __Available options:__ @@ -2313,7 +2312,7 @@ A port number to listen for incoming connections. The default value is *7777*. - **ram\_db\_type**: *mnesia | redis | sql* -Same as top-level [default_ram_db](/archive/22_10/toplevel/#default-ram-db) option, but applied to this module +Same as top-level [default_ram_db](toplevel.md#default_ram_db) option, but applied to this module only. - **recbuf**: *Size* @@ -2398,7 +2397,7 @@ Publish-Subscribe](https://xmpp.org/extensions/xep-0060.html). The functionality in *mod\_pubsub* can be extended using plugins. The plugin that implements PEP ([XEP-0163: Personal Eventing via Pubsub](https://xmpp.org/extensions/xep-0163.html)) is enabled in the -default ejabberd configuration file, and it requires [mod_caps](/archive/22_10/modules/#mod-caps). +default ejabberd configuration file, and it requires [mod_caps](modules.md#mod_caps). __Available options:__ @@ -2408,7 +2407,7 @@ using *acl* and *access*. By default any account in the local ejabberd server is allowed to create pubsub nodes. The default value is: *all*. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/22_10/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **default\_node\_config**: *List of Key:Value* @@ -2449,7 +2448,7 @@ systems with not so many nodes, caching last items speeds up pubsub and allows to raise user connection rate. The cost is memory usage, as every item is stored in memory. -
added in 21.12
+
added in 21.12
- **max\_item\_expire\_node**: *timeout() | infinity* Specify the maximum item epiry time. Default value is: *infinity*. @@ -2593,19 +2592,19 @@ platform-dependant backend services such as FCM or APNS. __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/22_10/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/22_10/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/22_10/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/22_10/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **include\_body**: *true | false | Text* @@ -2623,19 +2622,19 @@ notifications generated for incoming messages with a body. The default value is *false*. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/22_10/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_push\_keepalive -------------------- This module tries to keep the stream management session (see -[mod_stream_mgmt](/archive/22_10/modules/#mod-stream-mgmt)) of a disconnected mobile client alive if the client +[mod_stream_mgmt](modules.md#mod_stream_mgmt)) of a disconnected mobile client alive if the client enabled push notifications for that session. However, the normal session resumption timeout is restored once a push notification is issued, so the session will be closed if the client doesn’t respond to push notifications. -The module depends on [mod_push](/archive/22_10/modules/#mod-push). +The module depends on [mod_push](modules.md#mod_push). __Available options:__ @@ -2643,7 +2642,7 @@ __Available options:__ This option specifies the period of time until the session of a disconnected push client times out. This timeout is only in effect as long as no push notification is issued. Once that happened, the -resumption timeout configured for [mod_stream_mgmt](/archive/22_10/modules/#mod-stream-mgmt) is restored. The +resumption timeout configured for [mod_stream_mgmt](modules.md#mod_stream_mgmt) is restored. The default value is *72* hours. - **wake\_on\_start**: *true | false* @@ -2671,7 +2670,7 @@ enables end users to use an XMPP client to: - Delete an existing account on the server. -This module reads also the top-level [registration_timeout](/archive/22_10/toplevel/#registration-timeout) option +This module reads also the top-level [registration_timeout](toplevel.md#registration_timeout) option defined globally for the server, so please check that option documentation too. @@ -2692,7 +2691,7 @@ uncontrolled massive accounts creation by rogue users. Specify rules to restrict access for user unregistration. By default any user is able to unregister their account. -
added in 21.12
+
added in 21.12
- **allow\_modules**: *all | \[Module, ...\]* List of modules that can register accounts, or *all*. The default value @@ -2700,7 +2699,7 @@ is *all*, which is equivalent to something like *\[mod\_register, mod\_register\_web\]*. - **captcha\_protected**: *true | false* -Protect registrations with [CAPTCHA](/admin/configuration/basic/#captcha). The +Protect registrations with [CAPTCHA](../../admin/configuration/basic.md#captcha). The default is *false*. - **ip\_access**: *AccessName* @@ -2739,9 +2738,9 @@ This module provides a web page where users can: - Unregister an existing account on the server. -This module supports [CAPTCHA](/admin/configuration/basic/#captcha) to register a +This module supports [CAPTCHA](../../admin/configuration/basic.md#captcha) to register a new account. To enable this feature, configure the top-level -[captcha_cmd](/archive/22_10/toplevel/#captcha-cmd) and top-level [captcha_url](/archive/22_10/toplevel/#captcha-url) options. +[captcha_cmd](toplevel.md#captcha_cmd) and top-level [captcha_url](toplevel.md#captcha_url) options. As an example usage, the users of the host *localhost* can visit the page: *https://localhost:5280/register/* It is important to include the @@ -2749,8 +2748,8 @@ last / character in the URL, otherwise the subpages URL will be incorrect. This module is enabled in *listen* → *ejabberd\_http* → -[request\_handlers](/archive/22_10/listen-options/#request-handlers), no need -to enable in *modules*. The module depends on [mod_register](/archive/22_10/modules/#mod-register) where all +[request\_handlers](listen-options.md#request_handlers), no need +to enable in *modules*. The module depends on [mod_register](modules.md#mod_register) where all the configuration is performed. The module has no options. @@ -2785,19 +2784,19 @@ add/remove/modify contacts or send presence subscriptions. The default value is *all*, i.e. no restrictions. - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/22_10/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/22_10/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/22_10/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/22_10/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **store\_current\_id**: *true | false* @@ -2807,11 +2806,11 @@ calculated on the fly each time. Enabling this option reduces the load for both ejabberd and the database. This option does not affect the client in any way. This option is only useful if option *versioning* is set to *true*. The default value is *false*. IMPORTANT: if you use -[mod_shared_roster](/archive/22_10/modules/#mod-shared-roster) or [mod_shared_roster_ldap](/archive/22_10/modules/#mod-shared-roster-ldap), you must set the +[mod_shared_roster](modules.md#mod_shared_roster) or [mod_shared_roster_ldap](modules.md#mod_shared_roster_ldap), you must set the value of the option to *false*. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/22_10/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. - **versioning**: *true | false* Enables/disables Roster Versioning. The default value is *false*. @@ -2921,29 +2920,29 @@ parameters: group’s members. A group of other vhost can be identified with *groupid@vhost*. -This module depends on [mod_roster](/archive/22_10/modules/#mod-roster). If not enabled, roster queries +This module depends on [mod_roster](modules.md#mod_roster). If not enabled, roster queries will return 503 errors. __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/22_10/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/22_10/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/22_10/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/22_10/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/22_10/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. __Examples:__ @@ -3022,25 +3021,25 @@ password in multiple places. - Connection parameters: The module also accepts the connection parameters, all of which default to the top-level parameter of the same name, if unspecified. See [LDAP - Connection](/admin/configuration/ldap/#ldap-connection) section for more + Connection](../../admin/configuration/ldap.md#ldap_connection) section for more information about them. -Check also the [Configuration examples](/admin/configuration/ldap/#ldap-examples) +Check also the [Configuration examples](../../admin/configuration/ldap.md#ldap_examples) section to get details about retrieving the roster, and configuration examples including Flat DIT and Deep DIT. __Available options:__ - **cache\_life\_time** -Same as top-level [cache_life_time](/archive/22_10/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed** -Same as top-level [cache_missed](/archive/22_10/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size** -Same as top-level [cache_size](/archive/22_10/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **ldap\_auth\_check**: *true | false* @@ -3049,24 +3048,24 @@ subsystem) for existence of each user in the shared LDAP roster. Set to *false* if you want to disable the check. Default value is *true*. - **ldap\_backups** -Same as top-level [ldap_backups](/archive/22_10/toplevel/#ldap-backups) option, but applied to this module +Same as top-level [ldap_backups](toplevel.md#ldap_backups) option, but applied to this module only. - **ldap\_base** -Same as top-level [ldap_base](/archive/22_10/toplevel/#ldap-base) option, but applied to this module only. +Same as top-level [ldap_base](toplevel.md#ldap_base) option, but applied to this module only. - **ldap\_deref\_aliases** -Same as top-level [ldap_deref_aliases](/archive/22_10/toplevel/#ldap-deref-aliases) option, but applied to this +Same as top-level [ldap_deref_aliases](toplevel.md#ldap_deref_aliases) option, but applied to this module only. - **ldap\_encrypt** -Same as top-level [ldap_encrypt](/archive/22_10/toplevel/#ldap-encrypt) option, but applied to this module +Same as top-level [ldap_encrypt](toplevel.md#ldap_encrypt) option, but applied to this module only. - **ldap\_filter** Additional filter which is AND-ed together with "User Filter" and "Group Filter". For more information check the LDAP -[Filters](/admin/configuration/ldap/#filters) section. +[Filters](../../admin/configuration/ldap.md#filters) section. - **ldap\_gfilter** "Group Filter", used when retrieving human-readable name (a.k.a. @@ -3103,14 +3102,14 @@ section Filters. - **ldap\_memberattr\_format\_re** A regex for extracting user ID from the value of the attribute named by *ldap\_memberattr*. Check the LDAP [Control -Parameters](/admin/configuration/ldap/#control-parameters) section. +Parameters](../../admin/configuration/ldap.md#control_parameters) section. - **ldap\_password** -Same as top-level [ldap_password](/archive/22_10/toplevel/#ldap-password) option, but applied to this module +Same as top-level [ldap_password](toplevel.md#ldap_password) option, but applied to this module only. - **ldap\_port** -Same as top-level [ldap_port](/archive/22_10/toplevel/#ldap-port) option, but applied to this module only. +Same as top-level [ldap_port](toplevel.md#ldap_port) option, but applied to this module only. - **ldap\_rfilter** So called "Roster Filter". Used to find names of all "shared roster" @@ -3119,37 +3118,37 @@ defaults to the top-level parameter of the same name. You must specify it in some place in the configuration, there is no default. - **ldap\_rootdn** -Same as top-level [ldap_rootdn](/archive/22_10/toplevel/#ldap-rootdn) option, but applied to this module +Same as top-level [ldap_rootdn](toplevel.md#ldap_rootdn) option, but applied to this module only. - **ldap\_servers** -Same as top-level [ldap_servers](/archive/22_10/toplevel/#ldap-servers) option, but applied to this module +Same as top-level [ldap_servers](toplevel.md#ldap_servers) option, but applied to this module only. - **ldap\_tls\_cacertfile** -Same as top-level [ldap_tls_cacertfile](/archive/22_10/toplevel/#ldap-tls-cacertfile) option, but applied to this +Same as top-level [ldap_tls_cacertfile](toplevel.md#ldap_tls_cacertfile) option, but applied to this module only. - **ldap\_tls\_certfile** -Same as top-level [ldap_tls_certfile](/archive/22_10/toplevel/#ldap-tls-certfile) option, but applied to this +Same as top-level [ldap_tls_certfile](toplevel.md#ldap_tls_certfile) option, but applied to this module only. - **ldap\_tls\_depth** -Same as top-level [ldap_tls_depth](/archive/22_10/toplevel/#ldap-tls-depth) option, but applied to this module +Same as top-level [ldap_tls_depth](toplevel.md#ldap_tls_depth) option, but applied to this module only. - **ldap\_tls\_verify** -Same as top-level [ldap_tls_verify](/archive/22_10/toplevel/#ldap-tls-verify) option, but applied to this module +Same as top-level [ldap_tls_verify](toplevel.md#ldap_tls_verify) option, but applied to this module only. - **ldap\_ufilter** "User Filter", used for retrieving the human-readable name of roster entries (usually full names of people in the roster). See also the parameters *ldap\_userdesc* and *ldap\_useruid*. For more information -check the LDAP [Filters](/admin/configuration/ldap/#filters) section. +check the LDAP [Filters](../../admin/configuration/ldap.md#filters) section. - **ldap\_uids** -Same as top-level [ldap_uids](/archive/22_10/toplevel/#ldap-uids) option, but applied to this module only. +Same as top-level [ldap_uids](toplevel.md#ldap_uids) option, but applied to this module only. - **ldap\_userdesc** The name of the attribute which holds the human-readable user name. @@ -3167,7 +3166,7 @@ retrieved from the *ldap\_memberattr* attribute of a group object. Retrieved from results of the "User Filter". Defaults to *cn*. - **use\_cache** -Same as top-level [use_cache](/archive/22_10/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_sic -------- @@ -3194,7 +3193,7 @@ virtual host. > > It is not enough to just load this module. You should also configure > listeners and DNS records properly. For details see the section about -> the [ejabberd\_sip](/archive/22_10/listen/#ejabberd-sip) listen module in +> the [ejabberd\_sip](listen.md#ejabberd_sip) listen module in > the ejabberd Documentation. __Available options:__ @@ -3296,11 +3295,11 @@ A time to wait for stanza acknowledgements. Setting it to *infinity* effectively disables the timeout. The default value is *1* minute. - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/22_10/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. The default value is *48 hours*. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/22_10/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **max\_ack\_queue**: *Size* @@ -3323,7 +3322,7 @@ default *resume\_timeout*. By default, it is set to the same value as the *resume\_timeout* option. - **queue\_type**: *ram | file* -Same as top-level [queue_type](/archive/22_10/toplevel/#queue-type) option, but applied to this module +Same as top-level [queue_type](toplevel.md#queue_type) option, but applied to this module only. - **resend\_on\_timeout**: *true | false | if\_offline* @@ -3352,7 +3351,7 @@ mod\_stun\_disco This module allows XMPP clients to discover STUN/TURN services and to obtain temporary credentials for using them as per [XEP-0215: External Service Discovery](https://xmpp.org/extensions/xep-0215.html). This -module is included in ejabberd since version 20.04. +module is included in ejabberd since version 20.04. __Available options:__ @@ -3489,19 +3488,19 @@ fields should return all users who added some information to their vCard. The default value is *false*. - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/22_10/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/22_10/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/22_10/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql | ldap* -Same as top-level [default_db](/archive/22_10/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **host** @@ -3531,7 +3530,7 @@ ignored and the Jabber User Directory service will not appear in the Service Discovery item list. The default value is *false*. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/22_10/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. - **vcard**: *vCard* A custom vCard of the server that will be displayed by some XMPP clients @@ -3561,33 +3560,33 @@ will be translated to: __Available options for *ldap* backend:__ - **ldap\_backups** -Same as top-level [ldap_backups](/archive/22_10/toplevel/#ldap-backups) option, but applied to this module +Same as top-level [ldap_backups](toplevel.md#ldap_backups) option, but applied to this module only. - **ldap\_base** -Same as top-level [ldap_base](/archive/22_10/toplevel/#ldap-base) option, but applied to this module only. +Same as top-level [ldap_base](toplevel.md#ldap_base) option, but applied to this module only. - **ldap\_deref\_aliases** -Same as top-level [ldap_deref_aliases](/archive/22_10/toplevel/#ldap-deref-aliases) option, but applied to this +Same as top-level [ldap_deref_aliases](toplevel.md#ldap_deref_aliases) option, but applied to this module only. - **ldap\_encrypt** -Same as top-level [ldap_encrypt](/archive/22_10/toplevel/#ldap-encrypt) option, but applied to this module +Same as top-level [ldap_encrypt](toplevel.md#ldap_encrypt) option, but applied to this module only. - **ldap\_filter** -Same as top-level [ldap_filter](/archive/22_10/toplevel/#ldap-filter) option, but applied to this module +Same as top-level [ldap_filter](toplevel.md#ldap_filter) option, but applied to this module only. - **ldap\_password** -Same as top-level [ldap_password](/archive/22_10/toplevel/#ldap-password) option, but applied to this module +Same as top-level [ldap_password](toplevel.md#ldap_password) option, but applied to this module only. - **ldap\_port** -Same as top-level [ldap_port](/archive/22_10/toplevel/#ldap-port) option, but applied to this module only. +Same as top-level [ldap_port](toplevel.md#ldap_port) option, but applied to this module only. - **ldap\_rootdn** -Same as top-level [ldap_rootdn](/archive/22_10/toplevel/#ldap-rootdn) option, but applied to this module +Same as top-level [ldap_rootdn](toplevel.md#ldap_rootdn) option, but applied to this module only. - **ldap\_search\_fields**: *{Name: Attribute, ...}* @@ -3634,27 +3633,27 @@ The default is: "Organization Unit": ORGUNIT - **ldap\_servers** -Same as top-level [ldap_servers](/archive/22_10/toplevel/#ldap-servers) option, but applied to this module +Same as top-level [ldap_servers](toplevel.md#ldap_servers) option, but applied to this module only. - **ldap\_tls\_cacertfile** -Same as top-level [ldap_tls_cacertfile](/archive/22_10/toplevel/#ldap-tls-cacertfile) option, but applied to this +Same as top-level [ldap_tls_cacertfile](toplevel.md#ldap_tls_cacertfile) option, but applied to this module only. - **ldap\_tls\_certfile** -Same as top-level [ldap_tls_certfile](/archive/22_10/toplevel/#ldap-tls-certfile) option, but applied to this +Same as top-level [ldap_tls_certfile](toplevel.md#ldap_tls_certfile) option, but applied to this module only. - **ldap\_tls\_depth** -Same as top-level [ldap_tls_depth](/archive/22_10/toplevel/#ldap-tls-depth) option, but applied to this module +Same as top-level [ldap_tls_depth](toplevel.md#ldap_tls_depth) option, but applied to this module only. - **ldap\_tls\_verify** -Same as top-level [ldap_tls_verify](/archive/22_10/toplevel/#ldap-tls-verify) option, but applied to this module +Same as top-level [ldap_tls_verify](toplevel.md#ldap_tls_verify) option, but applied to this module only. - **ldap\_uids** -Same as top-level [ldap_uids](/archive/22_10/toplevel/#ldap-uids) option, but applied to this module only. +Same as top-level [ldap_uids](toplevel.md#ldap_uids) option, but applied to this module only. - **ldap\_vcard\_map**: *{Name: {Pattern, LDAPattributes}, ...}* With this option you can set the table that maps LDAP attributes to @@ -3720,31 +3719,31 @@ that change frequently their presence. However, the overhead is significantly reduced by the use of caching, so you probably don’t want to set *use\_cache* to *false*. -The module depends on [mod_vcard](/archive/22_10/modules/#mod-vcard). +The module depends on [mod_vcard](modules.md#mod_vcard). > **Note** > > Nowadays [XEP-0153](https://xmpp.org/extensions/xep-0153.html) is used > mostly as "read-only", i.e. modern clients don’t publish their avatars > inside vCards. Thus in the majority of cases the module is only used -> along with [mod_avatar](/archive/22_10/modules/#mod-avatar) for providing backward compatibility. +> along with [mod_avatar](modules.md#mod_avatar) for providing backward compatibility. __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/22_10/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/22_10/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/22_10/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/22_10/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_version ------------ diff --git a/content/archive/22_10/toplevel.md b/content/archive/22.10/toplevel.md similarity index 82% rename from content/archive/22_10/toplevel.md rename to content/archive/22.10/toplevel.md index 28fbd946..1ca43585 100644 --- a/content/archive/22_10/toplevel.md +++ b/content/archive/22.10/toplevel.md @@ -1,21 +1,20 @@ --- -title: Top-Level Options -toc: true -menu: Top-Level Opts -order: 80 +search: + exclude: true --- +# Top-Level Options ## access\_rules *{AccessName: {allow|deny: ACLRules|ACLName}}* -This option defines [Access Rules](/admin/configuration/basic/#access-rules). Each +This option defines [Access Rules](../../admin/configuration/basic.md#access_rules). Each access rule is assigned a name that can be referenced from other parts of the configuration file (mostly from *access* options of ejabberd modules). Each rule definition may contain arbitrary number of *allow* or *deny* sections, and each section may contain any number of ACL rules -(see [acl](/archive/22_10/toplevel/#acl) option). There are no access rules defined by default. +(see [acl](toplevel.md#acl) option). There are no access rules defined by default. **Example**: @@ -52,7 +51,7 @@ address). Every set of rules has name *ACLName*: it can be any string except *all* or *none* (those are predefined names for the rules that match all or nothing respectively). The name *ACLName* can be referenced from other parts of the configuration file, for example in -[access_rules](/archive/22_10/toplevel/#access-rules) option. The rules of *ACLName* are represented by +[access_rules](toplevel.md#access_rules) option. The rules of *ACLName* are represented by mapping *{ACLType: ACLValue}*. These can be one of the following: - **ip**: *Network* @@ -120,7 +119,7 @@ mapping *{ACLType: ACLValue}*. These can be one of the following: *Options* -[ACME](/admin/configuration/basic/#acme) configuration, to automatically obtain SSL +[ACME](../../admin/configuration/basic.md#acme) configuration, to automatically obtain SSL certificates for the domains served by ejabberd, which means that certificate requests and renewals are performed to some CA server (aka "ACME server") in a fully automated mode. The *Options* are: @@ -214,22 +213,22 @@ specific modules to certain virtual hosts. To accomplish that, *timeout()* -Same as [cache_life_time](/archive/22_10/toplevel/#cache-life-time), but applied to authentication cache only. -If not set, the value from [cache_life_time](/archive/22_10/toplevel/#cache-life-time) will be used. +Same as [cache_life_time](toplevel.md#cache_life_time), but applied to authentication cache only. +If not set, the value from [cache_life_time](toplevel.md#cache_life_time) will be used. ## auth\_cache\_missed *true | false* -Same as [cache_missed](/archive/22_10/toplevel/#cache-missed), but applied to authentication cache only. If -not set, the value from [cache_missed](/archive/22_10/toplevel/#cache-missed) will be used. +Same as [cache_missed](toplevel.md#cache_missed), but applied to authentication cache only. If +not set, the value from [cache_missed](toplevel.md#cache_missed) will be used. ## auth\_cache\_size *pos\_integer() | infinity* -Same as [cache_size](/archive/22_10/toplevel/#cache-size), but applied to authentication cache only. If not -set, the value from [cache_size](/archive/22_10/toplevel/#cache-size) will be used. +Same as [cache_size](toplevel.md#cache_size), but applied to authentication cache only. If not +set, the value from [cache_size](toplevel.md#cache_size) will be used. ## auth\_method @@ -248,7 +247,7 @@ be installed from the [ejabberd-contrib](https://github.com/processone/ejabberd-contrib) Git repository. Please refer to that module’s README file for details. -
improved in 20.01
+
improved in 20.01
## auth\_password\_format @@ -282,8 +281,8 @@ authenticate. The default value is *sha*. *true | false* -Same as [use_cache](/archive/22_10/toplevel/#use-cache), but applied to authentication cache only. If not -set, the value from [use_cache](/archive/22_10/toplevel/#use-cache) will be used. +Same as [use_cache](toplevel.md#use_cache), but applied to authentication cache only. If not +set, the value from [use_cache](toplevel.md#use_cache) will be used. ## c2s\_cafile @@ -294,11 +293,11 @@ format. All client certificates should be signed by one of these root CA certificates and should contain the corresponding JID(s) in *subjectAltName* field. There is no default value. -You can use [host\_config](/archive/22_10/toplevel/#host-config) to specify +You can use [host\_config](toplevel.md#host_config) to specify this option per-vhost. To set a specific file per listener, use the listener’s -[cafile](/archive/22_10/listen-options/#cafile) option. Please notice that +[cafile](listen-options.md#cafile) option. Please notice that *c2s\_cafile* overrides the listener’s *cafile* option. ## c2s\_ciphers @@ -357,7 +356,7 @@ Path to a file of CA root certificates. The default is to use system defined file if possible. For server connections, this *ca\_file* option is overridden by the -[s2s\_cafile](/archive/22_10/toplevel/#s2s-cafile) option. +[s2s\_cafile](toplevel.md#s2s-cafile) option. ## cache\_life\_time @@ -366,9 +365,9 @@ For server connections, this *ca\_file* option is overridden by the The time of a cached item to keep in cache. Once it’s expired, the corresponding item is erased from cache. The default value is *1 hour*. Several modules have a similar option; and some core ejabberd parts -support similar options too, see [auth_cache_life_time](/archive/22_10/toplevel/#auth-cache-life-time), -[oauth_cache_life_time](/archive/22_10/toplevel/#oauth-cache-life-time), [router_cache_life_time](/archive/22_10/toplevel/#router-cache-life-time), and -[sm_cache_life_time](/archive/22_10/toplevel/#sm-cache-life-time). +support similar options too, see [auth_cache_life_time](toplevel.md#auth_cache_life_time), +[oauth_cache_life_time](toplevel.md#oauth_cache_life_time), [router_cache_life_time](toplevel.md#router_cache_life_time), and +[sm_cache_life_time](toplevel.md#sm_cache_life_time). ## cache\_missed @@ -377,11 +376,11 @@ support similar options too, see [auth_cache_life_time](/archive/22_10/toplevel/ Whether or not to cache missed lookups. When there is an attempt to lookup for a value in a database and this value is not found and the option is set to *true*, this attempt will be cached and no attempts -will be performed until the cache expires (see [cache_life_time](/archive/22_10/toplevel/#cache-life-time)). +will be performed until the cache expires (see [cache_life_time](toplevel.md#cache_life_time)). Usually you don’t want to change it. Default is *true*. Several modules have a similar option; and some core ejabberd parts support similar -options too, see [auth_cache_missed](/archive/22_10/toplevel/#auth-cache-missed), [oauth_cache_missed](/archive/22_10/toplevel/#oauth-cache-missed), -[router_cache_missed](/archive/22_10/toplevel/#router-cache-missed), and [sm_cache_missed](/archive/22_10/toplevel/#sm-cache-missed). +options too, see [auth_cache_missed](toplevel.md#auth_cache_missed), [oauth_cache_missed](toplevel.md#oauth_cache_missed), +[router_cache_missed](toplevel.md#router_cache_missed), and [sm_cache_missed](toplevel.md#sm_cache_missed). ## cache\_size @@ -395,16 +394,16 @@ items are deleted, and the corresponding warning is logged. You should avoid frequent cache clearance, because this degrades performance. The default value is *1000*. Several modules have a similar option; and some core ejabberd parts support similar options too, see -[auth_cache_size](/archive/22_10/toplevel/#auth-cache-size), [oauth_cache_size](/archive/22_10/toplevel/#oauth-cache-size), [router_cache_size](/archive/22_10/toplevel/#router-cache-size), and -[sm_cache_size](/archive/22_10/toplevel/#sm-cache-size). +[auth_cache_size](toplevel.md#auth_cache_size), [oauth_cache_size](toplevel.md#oauth_cache_size), [router_cache_size](toplevel.md#router_cache_size), and +[sm_cache_size](toplevel.md#sm_cache_size). -
improved in 21.10
+
improved in 23.01
## captcha\_cmd *Path* -Full path to a script that generates [CAPTCHA](/admin/configuration/basic/#captcha) +Full path to a script that generates [CAPTCHA](../../admin/configuration/basic.md#captcha) images. @VERSION@ is replaced with ejabberd version number in XX.YY format. @SEMVER@ is replaced with ejabberd version number in semver format when compiled with Elixir’s mix, or XX.YY format otherwise. There @@ -420,13 +419,13 @@ captcha scripts can be used like this: *String* -Deprecated. Use [captcha_url](/archive/22_10/toplevel/#captcha-url) instead. +Deprecated. Use [captcha_url](toplevel.md#captcha_url) instead. ## captcha\_limit *pos\_integer() | infinity* -Maximum number of [CAPTCHA](/admin/configuration/basic/#captcha) generated images +Maximum number of [CAPTCHA](../../admin/configuration/basic.md#captcha) generated images per minute for any given JID. The option is intended to protect the server from CAPTCHA DoS. The default value is *infinity*. @@ -434,7 +433,7 @@ server from CAPTCHA DoS. The default value is *infinity*. *URL* -An URL where [CAPTCHA](/admin/configuration/basic/#captcha) requests should be +An URL where [CAPTCHA](../../admin/configuration/basic.md#captcha) requests should be sent. NOTE: you need to configure *request\_handlers* for *ejabberd\_http* listener as well. There is no default value. @@ -709,7 +708,7 @@ attribute, the specified language is used. The default value is *"en"*. *\[Host, ...\]* A list of IP addresses or DNS names of LDAP backup servers. When no -servers listed in [ldap_servers](/archive/22_10/toplevel/#ldap-servers) option are reachable, ejabberd will +servers listed in [ldap_servers](toplevel.md#ldap_servers) option are reachable, ejabberd will try to connect to these backup servers. The default is an empty list, i.e. no backup servers specified. WARNING: ejabberd doesn’t try to reconnect back to the main servers when they become operational again, @@ -744,7 +743,7 @@ variables are consecutively replaced by values from the attributes in *FilterAttrs* and "%D" is replaced by Distinguished Name from the result set. There is no default value, which means the result is not filtered. WARNING: Since this filter makes additional LDAP lookups, use it only as -the last resort: try to define all filter rules in [ldap_filter](/archive/22_10/toplevel/#ldap-filter) +the last resort: try to define all filter rules in [ldap_filter](toplevel.md#ldap_filter) option if possible. **Example**: @@ -851,9 +850,9 @@ JID. For example, "%.org". If the value is in the form of *\[Options, ...\]* The option for listeners configuration. See the [Listen -Modules](/archive/22_10/listen/) section for details. +Modules](./listen.md/) section for details. -
added in 22.10
+
added in 22.10
## log\_burst\_limit\_count @@ -862,7 +861,7 @@ Modules](/archive/22_10/listen/) section for details. The number of messages to accept in `log_burst_limit_window_time` period before starting to drop them. Default 500 -
added in 22.10
+
added in 22.10
## log\_burst\_limit\_window\_time @@ -912,7 +911,7 @@ value is *10000*. *{Module: Options}* -The option for modules configuration. See [Modules](/archive/22_10/modules/) +The option for modules configuration. See [Modules](./modules.md/) section for details. ## negotiation\_timeout @@ -961,17 +960,17 @@ can create OAuth tokens, you can refer to an ejabberd access rule in the *timeout()* -Same as [cache_life_time](/archive/22_10/toplevel/#cache-life-time), but applied to OAuth cache only. If not -set, the value from [cache_life_time](/archive/22_10/toplevel/#cache-life-time) will be used. +Same as [cache_life_time](toplevel.md#cache_life_time), but applied to OAuth cache only. If not +set, the value from [cache_life_time](toplevel.md#cache_life_time) will be used. ## oauth\_cache\_missed *true | false* -Same as [cache_missed](/archive/22_10/toplevel/#cache-missed), but applied to OAuth cache only. If not set, -the value from [cache_missed](/archive/22_10/toplevel/#cache-missed) will be used. +Same as [cache_missed](toplevel.md#cache_missed), but applied to OAuth cache only. If not set, +the value from [cache_missed](toplevel.md#cache_missed) will be used. -
added in 21.01
+
added in 21.01
## oauth\_cache\_rest\_failure\_life\_time @@ -984,8 +983,8 @@ The time that a failure in OAuth ReST is cached. The default value is *pos\_integer() | infinity* -Same as [cache_size](/archive/22_10/toplevel/#cache-size), but applied to OAuth cache only. If not set, the -value from [cache_size](/archive/22_10/toplevel/#cache-size) will be used. +Same as [cache_size](toplevel.md#cache_size), but applied to OAuth cache only. If not set, the +value from [cache_size](toplevel.md#cache_size) will be used. ## oauth\_client\_id\_check @@ -1000,7 +999,7 @@ value is *allow*. *mnesia | sql* Database backend to use for OAuth authentication. The default value is -picked from [default_db](/archive/22_10/toplevel/#default-db) option, or if it’s not set, *mnesia* will be +picked from [default_db](toplevel.md#default_db) option, or if it’s not set, *mnesia* will be used. ## oauth\_expire @@ -1015,15 +1014,15 @@ used and is removed from the database. The default is *4294967* seconds. *true | false* -Same as [use_cache](/archive/22_10/toplevel/#use-cache), but applied to OAuth cache only. If not set, the -value from [use_cache](/archive/22_10/toplevel/#use-cache) will be used. +Same as [use_cache](toplevel.md#use_cache), but applied to OAuth cache only. If not set, the +value from [use_cache](toplevel.md#use_cache) will be used. ## oom\_killer *true | false* Enable or disable OOM (out-of-memory) killer. When system memory raises -above the limit defined in [oom_watermark](/archive/22_10/toplevel/#oom-watermark) option, ejabberd triggers +above the limit defined in [oom_watermark](toplevel.md#oom_watermark) option, ejabberd triggers OOM killer to terminate most memory consuming Erlang processes. Note that in order to maintain functionality, ejabberd only attempts to kill transient processes, such as those managing client sessions, s2s or @@ -1035,7 +1034,7 @@ database connections. The default value is *true*. Trigger OOM killer when some of the running Erlang processes have messages queue above this *Size*. Note that such processes won’t be -killed if [oom_killer](/archive/22_10/toplevel/#oom-killer) option is set to *false* or if *oom\_watermark* +killed if [oom_killer](toplevel.md#oom_killer) option is set to *false* or if *oom\_watermark* is not reached yet. ## oom\_watermark @@ -1044,7 +1043,7 @@ is not reached yet. A percent of total system memory consumed at which OOM killer should be activated with some of the processes possibly be killed (see -[oom_killer](/archive/22_10/toplevel/#oom-killer) option). Later, when memory drops below this *Percent*, +[oom_killer](toplevel.md#oom_killer) option). Later, when memory drops below this *Percent*, OOM killer is deactivated. The default value is *80* percents. ## outgoing\_s2s\_families @@ -1055,7 +1054,7 @@ Specify which address families to try, in what order. The default is *\[ipv4, ipv6\]* which means it first tries connecting with IPv4, if that fails it tries using IPv6. -
added in 20.12
+
added in 20.12
## outgoing\_s2s\_ipv4\_address @@ -1065,7 +1064,7 @@ Specify the IPv4 address that will be used when establishing an outgoing S2S IPv4 connection, for example "127.0.0.1". The default value is *undefined*. -
added in 20.12
+
added in 20.12
## outgoing\_s2s\_ipv6\_address @@ -1116,7 +1115,7 @@ default value is *false*. *Directory* -If [queue_type](/archive/22_10/toplevel/#queue-type) option is set to *file*, use this *Directory* to store +If [queue_type](toplevel.md#queue_type) option is set to *file*, use this *Directory* to store file queues. The default is to keep queues inside Mnesia directory. ## queue\_type @@ -1125,7 +1124,7 @@ file queues. The default is to keep queues inside Mnesia directory. Default type of queues in ejabberd. Modules may have its own value of the option. The value of *ram* means that queues will be kept in memory. -If value *file* is set, you may also specify directory in [queue_dir](/archive/22_10/toplevel/#queue-dir) +If value *file* is set, you may also specify directory in [queue_dir](toplevel.md#queue_dir) option where file queues will be placed. The default value is *ram*. ## redis\_connect\_timeout @@ -1167,8 +1166,8 @@ The port where the Redis server is accepting connections. The default is *ram | file* The type of request queue for the Redis server. See description of -[queue_type](/archive/22_10/toplevel/#queue-type) option for the explanation. The default value is the -value defined in [queue_type](/archive/22_10/toplevel/#queue-type) or *ram* if the latter is not set. +[queue_type](toplevel.md#queue_type) option for the explanation. The default value is the +value defined in [queue_type](toplevel.md#queue_type) or *ram* if the latter is not set. ## redis\_server @@ -1181,7 +1180,7 @@ A hostname or an IP address of the Redis server. The default is *timeout()* -This is a global option for module [mod_register](/archive/22_10/modules/#mod-register). It limits the +This is a global option for module [mod_register](modules.md#mod_register). It limits the frequency of registrations from a given IP or username. So, a user that tries to register a new account from the same IP address or JID during this time after their previous registration will receive an error with @@ -1204,37 +1203,37 @@ action performed is *closeold*. *timeout()* -Same as [cache_life_time](/archive/22_10/toplevel/#cache-life-time), but applied to routing table cache only. If -not set, the value from [cache_life_time](/archive/22_10/toplevel/#cache-life-time) will be used. +Same as [cache_life_time](toplevel.md#cache_life_time), but applied to routing table cache only. If +not set, the value from [cache_life_time](toplevel.md#cache_life_time) will be used. ## router\_cache\_missed *true | false* -Same as [cache_missed](/archive/22_10/toplevel/#cache-missed), but applied to routing table cache only. If -not set, the value from [cache_missed](/archive/22_10/toplevel/#cache-missed) will be used. +Same as [cache_missed](toplevel.md#cache_missed), but applied to routing table cache only. If +not set, the value from [cache_missed](toplevel.md#cache_missed) will be used. ## router\_cache\_size *pos\_integer() | infinity* -Same as [cache_size](/archive/22_10/toplevel/#cache-size), but applied to routing table cache only. If not -set, the value from [cache_size](/archive/22_10/toplevel/#cache-size) will be used. +Same as [cache_size](toplevel.md#cache_size), but applied to routing table cache only. If not +set, the value from [cache_size](toplevel.md#cache_size) will be used. ## router\_db\_type *mnesia | redis | sql* Database backend to use for routing information. The default value is -picked from [default_ram_db](/archive/22_10/toplevel/#default-ram-db) option, or if it’s not set, *mnesia* will +picked from [default_ram_db](toplevel.md#default_ram_db) option, or if it’s not set, *mnesia* will be used. ## router\_use\_cache *true | false* -Same as [use_cache](/archive/22_10/toplevel/#use-cache), but applied to routing table cache only. If not -set, the value from [use_cache](/archive/22_10/toplevel/#use-cache) will be used. +Same as [use_cache](toplevel.md#use_cache), but applied to routing table cache only. If not +set, the value from [use_cache](toplevel.md#use_cache) will be used. ## rpc\_timeout @@ -1248,7 +1247,7 @@ are used for internal needs only. The default value is *5* seconds. *Access* -This [Access Rule](/admin/configuration/basic/#access-rules) defines to what remote +This [Access Rule](../../admin/configuration/basic.md#access_rules) defines to what remote servers can s2s connections be established. The default value is *all*; no restrictions are applied, it is allowed to connect s2s to/from all remote servers. @@ -1259,9 +1258,9 @@ remote servers. A path to a file with CA root certificates that will be used to authenticate s2s connections. If not set, the value of -[ca\_file](/archive/22_10/toplevel/#ca-file) will be used. +[ca\_file](toplevel.md#ca_file) will be used. -You can use [host\_config](/archive/22_10/toplevel/#host-config) to specify +You can use [host\_config](toplevel.md#host_config) to specify this option per-vhost. ## s2s\_ciphers @@ -1329,9 +1328,9 @@ below: *ram | file* -The type of a queue for s2s packets. See description of [queue_type](/archive/22_10/toplevel/#queue-type) +The type of a queue for s2s packets. See description of [queue_type](toplevel.md#queue_type) option for the explanation. The default value is the value defined in -[queue_type](/archive/22_10/toplevel/#queue-type) or *ram* if the latter is not set. +[queue_type](toplevel.md#queue_type) or *ram* if the latter is not set. ## s2s\_timeout @@ -1372,7 +1371,7 @@ considered insecure. The option defines a set of shapers. Every shaper is assigned a name *ShaperName* that can be used in other parts of the configuration file, -such as [shaper_rules](/archive/22_10/toplevel/#shaper-rules) option. The shaper itself is defined by its +such as [shaper_rules](toplevel.md#shaper_rules) option. The shaper itself is defined by its *Rate*, where *Rate* stands for the maximum allowed incoming rate in **bytes** per second. When a connection exceeds this limit, ejabberd stops reading from the socket until the average rate is again below the @@ -1391,9 +1390,9 @@ speed to 1,000 bytes/sec and shaper *fast* limits the traffic speed to *{ShaperRuleName: {Number|ShaperName: ACLRule|ACLName}}* An entry allowing to declaring shaper to use for matching user/hosts. -Semantics is similar to [access_rules](/archive/22_10/toplevel/#access-rules) option, the only difference is +Semantics is similar to [access_rules](toplevel.md#access_rules) option, the only difference is that instead using *allow* or *deny*, a name of a shaper (defined in -[shaper](/archive/22_10/toplevel/#shaper) option) or a positive number should be used. +[shaper](toplevel.md#shaper) option) or a positive number should be used. **Example**: @@ -1413,37 +1412,37 @@ that instead using *allow* or *deny*, a name of a shaper (defined in *timeout()* -Same as [cache_life_time](/archive/22_10/toplevel/#cache-life-time), but applied to client sessions table cache -only. If not set, the value from [cache_life_time](/archive/22_10/toplevel/#cache-life-time) will be used. +Same as [cache_life_time](toplevel.md#cache_life_time), but applied to client sessions table cache +only. If not set, the value from [cache_life_time](toplevel.md#cache_life_time) will be used. ## sm\_cache\_missed *true | false* -Same as [cache_missed](/archive/22_10/toplevel/#cache-missed), but applied to client sessions table cache -only. If not set, the value from [cache_missed](/archive/22_10/toplevel/#cache-missed) will be used. +Same as [cache_missed](toplevel.md#cache_missed), but applied to client sessions table cache +only. If not set, the value from [cache_missed](toplevel.md#cache_missed) will be used. ## sm\_cache\_size *pos\_integer() | infinity* -Same as [cache_size](/archive/22_10/toplevel/#cache-size), but applied to client sessions table cache only. -If not set, the value from [cache_size](/archive/22_10/toplevel/#cache-size) will be used. +Same as [cache_size](toplevel.md#cache_size), but applied to client sessions table cache only. +If not set, the value from [cache_size](toplevel.md#cache_size) will be used. ## sm\_db\_type *mnesia | redis | sql* Database backend to use for client sessions information. The default -value is picked from [default_ram_db](/archive/22_10/toplevel/#default-ram-db) option, or if it’s not set, +value is picked from [default_ram_db](toplevel.md#default_ram_db) option, or if it’s not set, *mnesia* will be used. ## sm\_use\_cache *true | false* -Same as [use_cache](/archive/22_10/toplevel/#use-cache), but applied to client sessions table cache only. -If not set, the value from [use_cache](/archive/22_10/toplevel/#use-cache) will be used. +Same as [use_cache](toplevel.md#use_cache), but applied to client sessions table cache only. +If not set, the value from [use_cache](toplevel.md#use_cache) will be used. ## sql\_connect\_timeout @@ -1467,14 +1466,14 @@ An interval to make a dummy SQL request to keep alive the connections to the database. There is no default value, so no keepalive requests are made. -
added in 20.12
+
added in 20.12
## sql\_odbc\_driver *Path* Path to the ODBC driver to use to connect to a Microsoft SQL Server -database. This option is only valid if the [sql_type](/archive/22_10/toplevel/#sql-type) option is set to +database. This option is only valid if the [sql_type](toplevel.md#sql_type) option is set to *mssql*. The default value is: *libtdsodbc.so* ## sql\_password @@ -1500,7 +1499,7 @@ The port where the SQL server is accepting connections. The default is *3306* for MySQL, *5432* for PostgreSQL and *1433* for MS SQL. The option has no effect for SQLite. -
added in 20.01
+
added in 20.01
## sql\_prepared\_statements @@ -1521,8 +1520,8 @@ seconds. *ram | file* The type of a request queue for the SQL server. See description of -[queue_type](/archive/22_10/toplevel/#queue-type) option for the explanation. The default value is the -value defined in [queue_type](/archive/22_10/toplevel/#queue-type) or *ram* if the latter is not set. +[queue_type](toplevel.md#queue_type) option for the explanation. The default value is the +value defined in [queue_type](toplevel.md#queue_type) or *ram* if the latter is not set. ## sql\_server @@ -1531,7 +1530,7 @@ value defined in [queue_type](/archive/22_10/toplevel/#queue-type) or *ram* if t A hostname or an IP address of the SQL server. The default value is *localhost*. -
improved in 20.03
+
improved in 20.03
## sql\_ssl @@ -1546,7 +1545,7 @@ is only available for MySQL and PostgreSQL. The default value is *Path* A path to a file with CA root certificates that will be used to verify -SQL connections. Implies [sql_ssl](/archive/22_10/toplevel/#sql-ssl) and [sql_ssl_verify](/archive/22_10/toplevel/#sql-ssl-verify) options are +SQL connections. Implies [sql_ssl](toplevel.md#sql_ssl) and [sql_ssl_verify](toplevel.md#sql_ssl_verify) options are set to *true*. There is no default which means certificate verification is disabled. @@ -1555,7 +1554,7 @@ is disabled. *Path* A path to a certificate file that will be used for SSL connections to -the SQL server. Implies [sql_ssl](/archive/22_10/toplevel/#sql-ssl) option is set to *true*. There is no +the SQL server. Implies [sql_ssl](toplevel.md#sql_ssl) option is set to *true*. There is no default which means ejabberd won’t provide a client certificate to the SQL server. @@ -1564,7 +1563,7 @@ SQL server. *true | false* Whether to verify SSL connection to the SQL server against CA root -certificates defined in [sql_ssl_cafile](/archive/22_10/toplevel/#sql-ssl-cafile) option. Implies [sql_ssl](/archive/22_10/toplevel/#sql-ssl) +certificates defined in [sql_ssl_cafile](toplevel.md#sql_ssl_cafile) option. Implies [sql_ssl](toplevel.md#sql_ssl) option is set to *true*. The default value is *false*. ## sql\_start\_interval @@ -1606,8 +1605,8 @@ trusted for security rules in ejabberd. Enable or disable cache. The default is *true*. Several modules have a similar option; and some core ejabberd parts support similar options -too, see [auth_use_cache](/archive/22_10/toplevel/#auth-use-cache), [oauth_use_cache](/archive/22_10/toplevel/#oauth-use-cache), [router_use_cache](/archive/22_10/toplevel/#router-use-cache), -and [sm_use_cache](/archive/22_10/toplevel/#sm-use-cache). +too, see [auth_use_cache](toplevel.md#auth_use_cache), [oauth_use_cache](toplevel.md#oauth_use_cache), [router_use_cache](toplevel.md#router_use_cache), +and [sm_use_cache](toplevel.md#sm_use_cache). ## validate\_stream @@ -1625,7 +1624,7 @@ value is *false*. *string()* The option can be used to set custom ejabberd version, that will be used -by different parts of ejabberd, for example by [mod_version](/archive/22_10/modules/#mod-version) module. +by different parts of ejabberd, for example by [mod_version](modules.md#mod_version) module. The default value is obtained at compile time from the underlying version control system. diff --git a/content/admin/upgrade/from_22.05_to_22.10.md b/content/archive/22.10/upgrade.md similarity index 91% rename from content/admin/upgrade/from_22.05_to_22.10.md rename to content/archive/22.10/upgrade.md index 769e6a10..62e8de31 100644 --- a/content/admin/upgrade/from_22.05_to_22.10.md +++ b/content/archive/22.10/upgrade.md @@ -1,7 +1,4 @@ ---- -title: Upgrade to ejabberd 22.10 -toc: true ---- +# Upgrade to ejabberd 22.10 There are no breaking changes in SQL schemas, configuration, or commands API. If you develop an ejabberd module, notice two hooks have changed: `muc_subscribed` and `muc_unsubscribed`. @@ -9,12 +6,12 @@ There are no breaking changes in SQL schemas, configuration, or commands API. If Two hooks have changed: `muc_subscribed` and `muc_unsubscribed`. Now they get the packet and room state, and can modify the sent packets. If you write source code that adds functions to those hooks, please notice that previously they were ran like: -```erlang +``` erlang ejabberd_hooks:run(muc_subscribed, ServerHost, [ServerHost, Room, Host, BareJID]); ``` and now they are ran like this: -```erlang +``` erlang {Packet2a, Packet2b} = ejabberd_hooks:run_fold(muc_subscribed, ServerHost, {Packet1a, Packet1b}, [ServerHost, Room, Host, BareJID, StateData]), ``` diff --git a/content/archive/22_05/sql-schema.md b/content/archive/22_05/sql-schema.md deleted file mode 100644 index a33ffa66..00000000 --- a/content/archive/22_05/sql-schema.md +++ /dev/null @@ -1,311 +0,0 @@ ---- -title: ejabberd SQL Database Schema -toc: true -menu: SQL Schema -order: 190 ---- - - -We present the tables that might be in use, depending on your server configuration, together with a short explanation of the fields involved and their intended use. Tables are presented roughly grouped by related functionality. - -Consider this document a work in progress, not all tables are documented yet. - -Latest version of database schema are available in [ejabberd Github repository](https://github.com/processone/ejabberd): - -* [MySQL schema](https://github.com/processone/ejabberd/blob/master/sql/mysql.sql) -* [Postgres schema](https://github.com/processone/ejabberd/blob/master/sql/pg.sql) -* [SQLite schema](https://github.com/processone/ejabberd/blob/master/sql/lite.sql) -* [MS SQL Server schema](https://github.com/processone/ejabberd/blob/master/sql/mssql.sql). This - schema need testing / feedback and possibly improvement from SQL - Server users. - -# Authentication - -## Table `users` - -Contains the information required to authenticate users. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| password | string | User password, can be hashed | -| created_at | timestamp | When the user account was created | - - -The password are hashed if you use SCRAM authentication. In that case the next fields are also defined - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| serverkey | string | support for salted passwords | -| salt | string | support for salted passwords | -| iterationcount | integer | support for salted passwords | - - -# Rosters - -## Table `rosterusers` - -This is a quite complex table, used as a store for a quite complex protocol that is the one defined to manage -rosters and subscriptions on [rfc6121](https://tools.ietf.org/html/rfc6121). - -In the common case of two users adding each other as contacts, entries in the roster table follows a series of steps - as they moves from a subscription request to the final approval and bi-directional subscription being established. -This process can be initiated either by the user, or by the (possible remote) peer. Also need to account for the case -where the user, or the contact, might not be online at the moment of the subscription request is made. - -Steps are further complicated by the fact that entries in the roster aren't required to have corresponding subscriptions. -For details of the meaning of the different fields, refer to [the protocol itself](https://tools.ietf.org/html/rfc6121#section-2), as these are mostly a direct mapping of it. - -Note: -If you manage users contacts from outside the roster workflow of XMPP (for example your site backends perform the linking between -users), it is likely that you only need to care about the username, jid and nick fields, and set the subscription field to be always -'B' for a mutual link between users. - - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| jid | string | Contact jid | -| nick | string | Contact nickname | -| subscription | char | 'B'=both | 'T'=To | 'F'=From | 'N'=none | -| ask | char | 'S'=subscribe | 'U'=unsubscribe | B='both' | 'O'=out | 'I'=in | 'N'=none | -| askmessage | string | Message to be displayed on the subscription request | -| server | char | 'N' for normal users contacts | -| subscribe | string | | -| type | string | "item" | -| created_at | timestamp | Creation date of this roster entry | - - - - -## Table `rostergroups` - -## Table `sr_group` - -## Table `sr_user` - - - -# Messages - -## Table `spool` -Messages sent to users that are offline are stored in this table. -Do not confuse this with general message archiving: messages are only temporarily stored in this table, removed as soon as the target user -is back online and the pending messages delivered to it. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| xml | blob | Raw packet | -| seq | integer | Unique, autoincrement sequence number. | -| created_at | timestamp | When the message was stored | - -The seq field is used for sorting, and to easily identify a particular user message. - - -## Table `privacy_list_data` - -The table is used to store privacy rules. - -The table is a direct translation of the XMPP packet used to set -privacy lists. For more details, please read -[XEP-0016: Privacy Lists, Syntax and Semantics](https://xmpp.org/extensions/xep-0016.html#protocol-syntax). Here -is an example packet coming from privacy list specification: - - - - [] - [] - [] - [] - - -The table fields are defined as follow: - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| id | int | Privacy list rule id. | -| t | char | Privacy rule type: 'j' for jid, 'g' for group and 's' for subscription. | -| value | string | Privacy list value for match, whose content depends on privacy list rule type. | -| action | char | Privacy list action: 'd' for deny and 'a' for allow. | -| ord | int | Order for applying the privacy list rule. | -| match\_all | boolean (0 or 1) | If true (1), means any packet types will be matched. Other matches should be false (0). | -| match\_iq | boolean (0 or 1) | If true (1), means iq packets will be matched by rule. | -| match\_message | boolean (0 or 1) | If true (1), means message packets type will be matched by rule. | -| match\_presence\_in | boolean (0 or 1) | If true (1), means inbound presence packets type will be matched by rule. | -| match\_presence\_out | boolean (0 or 1) | If true (1), means outbound packets type will be matched by rule. | - - - -# Multiuser Chat Rooms - -## Table `muc_room` -It is used to store *persistent* rooms, that is, rooms that must be automatically started with the server. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| name | string | Room name | -| host | string | Hostname of the conference component | -| opts | string | Room options, encoded as erlang terms | -| created_at | timestamp | Creation date | - -The opts field is legible, but not mean to be modified directly. It contents depends on the implementation of mod_muc. -It contains the room configuration and affiliations. - - -## Table `muc_registered` -Contains a map of user to nicknames. When a user register a nickname with the conference module, that nick is reserved and can't be used by -anyone else, in any room from that conference host. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| jid | string | User jid | -| host | string | Hostname of the conference component | -| nick | string | Room options, encoded as erlang terms | -| created_at | timestamp | Creation date | - - -## Table `room_history` -In ejabberd Business Edition, -this table is used if persistent room history is enabled. If so, recent room history is saved to the DB before ejabberd is stopped, -allowing the recent history to survive server restarts. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| room | string | Room jid | -| nick | string | Nickname that sent the message | -| packet | string | XML stanza with the message | -| have_subject | boolean | True if the message stanza had subject | -| created_at | timestamp | Creation date | -| size | integer | Size in bytes of the xml packet | - -## Table `muc_online_room` -This table is used to store rooms that actually exists in the memory of the server. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| name | string | Room name | -| host | string | Hostname of the conference component | -| node | string | Erlang node where the room is | -| pid | string | Pid of the thread running the room | - -## Table `muc_online_users` -This table is used to store MucSub subscriptions. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User -| server | string | Hostname of the user | -| resource | string | User resource | -| name | string | Name of the room | -| host | string | Hostname of the conference component | -| node | string | Erlang node | - -## Table `muc_room_subscribers` -This table is used to store MucSub subscriptions. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| room | string | Room name | -| host | string | Hostname of the conference component | -| jid | string | User jid | -| nick | string | User nick | -| nodes | string | MucSub nodes | -| created_at | timestamp | Creation date | - - -# VCard - -## Table `vcard` - -The table is used to store raw vCard content for delivery of the vCard -"as is". - -The table fields are defined as follow: - -| Field | Type | Usage | -| -------------------- | ---------------- | -------------------- | -| username | string | Owner of the Vcard | -| vcard | text | Raw Vcard | -| created_at | timestamp | Record creation date | - -## Table `vcard_search` - -The table is used to store vCard index on a few of the Vcard field -used for vCard search in users directory. - -You can learn more about the vCard specification on Wikipedia -[vCard](https://en.wikipedia.org/wiki/VCard) page. - -The table fields are defined as follow: - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------- | -| username | string | Raw username for display | -| lusername | string | Lowercase username for search | -| fn | string | Raw fullname for display | -| lfn | string | Lowercase fullname for search | -| family | string | Raw family name for display | -| lfamilly | string | Lowercase family name for search | -| given | string | Raw given name for display | -| lgiven | string | Lowercase given name for search | -| middle | string | Raw middle name for display | -| lmiddle | string | Lowercase middle name for search | -| nickname | string | Raw nickname for display | -| lnickname | string | Lowercase nickname for search | -| bday | string | Raw birthday for display | -| lbday | string | Lowercase and processed birthday for search | -| ctry | string | Raw country for display | -| lctry | string | Lowercase country for search | -| locality | string | Raw city for display | -| llocality | string | Lowercase city for search | -| email | string | Raw email for display | -| lemail | string | Lowercase email for search | -| orgname | string | Raw organisation name for display | -| lorgname | string | Lowercase organisation name for search | -| orgunit | string | Raw organisation department name for display | -| lorgunit | string | Lowercase organisation department for search | - -# Others - -## Table `last` -This table is used to store the last time the user was seen online. -It is defined as follow: - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| seconds | string | Timestamp for the last time the user was seen online | -| state | string | Why user got disconnected. Usually is empty | - -Note that the table is *not* updated while the user has the session open. - - - -## Table `caps_features` -Ejabberd uses this table to keep a list of the entity capabilities discovered. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| node | string | Node | -| subnode | string | Subnode | -| feature | string | Entity feature | -| created_at | timestamp | Creation date | - -The subnode field correspond to the 'ver' ("verification string") of XEP-0115. -There is one entry in this table for each feature advertised by the given (node,subnode) pair. - -## Table `private_storage` -Used for user private data storage. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| namespace | string | XEP-0049 namespace of the stored data | -| data | string | Raw xml | -| created_at | timestamp | Creation date | - diff --git a/content/archive/22_10/sql-schema.md b/content/archive/22_10/sql-schema.md deleted file mode 100644 index a33ffa66..00000000 --- a/content/archive/22_10/sql-schema.md +++ /dev/null @@ -1,311 +0,0 @@ ---- -title: ejabberd SQL Database Schema -toc: true -menu: SQL Schema -order: 190 ---- - - -We present the tables that might be in use, depending on your server configuration, together with a short explanation of the fields involved and their intended use. Tables are presented roughly grouped by related functionality. - -Consider this document a work in progress, not all tables are documented yet. - -Latest version of database schema are available in [ejabberd Github repository](https://github.com/processone/ejabberd): - -* [MySQL schema](https://github.com/processone/ejabberd/blob/master/sql/mysql.sql) -* [Postgres schema](https://github.com/processone/ejabberd/blob/master/sql/pg.sql) -* [SQLite schema](https://github.com/processone/ejabberd/blob/master/sql/lite.sql) -* [MS SQL Server schema](https://github.com/processone/ejabberd/blob/master/sql/mssql.sql). This - schema need testing / feedback and possibly improvement from SQL - Server users. - -# Authentication - -## Table `users` - -Contains the information required to authenticate users. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| password | string | User password, can be hashed | -| created_at | timestamp | When the user account was created | - - -The password are hashed if you use SCRAM authentication. In that case the next fields are also defined - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| serverkey | string | support for salted passwords | -| salt | string | support for salted passwords | -| iterationcount | integer | support for salted passwords | - - -# Rosters - -## Table `rosterusers` - -This is a quite complex table, used as a store for a quite complex protocol that is the one defined to manage -rosters and subscriptions on [rfc6121](https://tools.ietf.org/html/rfc6121). - -In the common case of two users adding each other as contacts, entries in the roster table follows a series of steps - as they moves from a subscription request to the final approval and bi-directional subscription being established. -This process can be initiated either by the user, or by the (possible remote) peer. Also need to account for the case -where the user, or the contact, might not be online at the moment of the subscription request is made. - -Steps are further complicated by the fact that entries in the roster aren't required to have corresponding subscriptions. -For details of the meaning of the different fields, refer to [the protocol itself](https://tools.ietf.org/html/rfc6121#section-2), as these are mostly a direct mapping of it. - -Note: -If you manage users contacts from outside the roster workflow of XMPP (for example your site backends perform the linking between -users), it is likely that you only need to care about the username, jid and nick fields, and set the subscription field to be always -'B' for a mutual link between users. - - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| jid | string | Contact jid | -| nick | string | Contact nickname | -| subscription | char | 'B'=both | 'T'=To | 'F'=From | 'N'=none | -| ask | char | 'S'=subscribe | 'U'=unsubscribe | B='both' | 'O'=out | 'I'=in | 'N'=none | -| askmessage | string | Message to be displayed on the subscription request | -| server | char | 'N' for normal users contacts | -| subscribe | string | | -| type | string | "item" | -| created_at | timestamp | Creation date of this roster entry | - - - - -## Table `rostergroups` - -## Table `sr_group` - -## Table `sr_user` - - - -# Messages - -## Table `spool` -Messages sent to users that are offline are stored in this table. -Do not confuse this with general message archiving: messages are only temporarily stored in this table, removed as soon as the target user -is back online and the pending messages delivered to it. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| xml | blob | Raw packet | -| seq | integer | Unique, autoincrement sequence number. | -| created_at | timestamp | When the message was stored | - -The seq field is used for sorting, and to easily identify a particular user message. - - -## Table `privacy_list_data` - -The table is used to store privacy rules. - -The table is a direct translation of the XMPP packet used to set -privacy lists. For more details, please read -[XEP-0016: Privacy Lists, Syntax and Semantics](https://xmpp.org/extensions/xep-0016.html#protocol-syntax). Here -is an example packet coming from privacy list specification: - - - - [] - [] - [] - [] - - -The table fields are defined as follow: - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| id | int | Privacy list rule id. | -| t | char | Privacy rule type: 'j' for jid, 'g' for group and 's' for subscription. | -| value | string | Privacy list value for match, whose content depends on privacy list rule type. | -| action | char | Privacy list action: 'd' for deny and 'a' for allow. | -| ord | int | Order for applying the privacy list rule. | -| match\_all | boolean (0 or 1) | If true (1), means any packet types will be matched. Other matches should be false (0). | -| match\_iq | boolean (0 or 1) | If true (1), means iq packets will be matched by rule. | -| match\_message | boolean (0 or 1) | If true (1), means message packets type will be matched by rule. | -| match\_presence\_in | boolean (0 or 1) | If true (1), means inbound presence packets type will be matched by rule. | -| match\_presence\_out | boolean (0 or 1) | If true (1), means outbound packets type will be matched by rule. | - - - -# Multiuser Chat Rooms - -## Table `muc_room` -It is used to store *persistent* rooms, that is, rooms that must be automatically started with the server. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| name | string | Room name | -| host | string | Hostname of the conference component | -| opts | string | Room options, encoded as erlang terms | -| created_at | timestamp | Creation date | - -The opts field is legible, but not mean to be modified directly. It contents depends on the implementation of mod_muc. -It contains the room configuration and affiliations. - - -## Table `muc_registered` -Contains a map of user to nicknames. When a user register a nickname with the conference module, that nick is reserved and can't be used by -anyone else, in any room from that conference host. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| jid | string | User jid | -| host | string | Hostname of the conference component | -| nick | string | Room options, encoded as erlang terms | -| created_at | timestamp | Creation date | - - -## Table `room_history` -In ejabberd Business Edition, -this table is used if persistent room history is enabled. If so, recent room history is saved to the DB before ejabberd is stopped, -allowing the recent history to survive server restarts. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| room | string | Room jid | -| nick | string | Nickname that sent the message | -| packet | string | XML stanza with the message | -| have_subject | boolean | True if the message stanza had subject | -| created_at | timestamp | Creation date | -| size | integer | Size in bytes of the xml packet | - -## Table `muc_online_room` -This table is used to store rooms that actually exists in the memory of the server. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| name | string | Room name | -| host | string | Hostname of the conference component | -| node | string | Erlang node where the room is | -| pid | string | Pid of the thread running the room | - -## Table `muc_online_users` -This table is used to store MucSub subscriptions. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User -| server | string | Hostname of the user | -| resource | string | User resource | -| name | string | Name of the room | -| host | string | Hostname of the conference component | -| node | string | Erlang node | - -## Table `muc_room_subscribers` -This table is used to store MucSub subscriptions. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| room | string | Room name | -| host | string | Hostname of the conference component | -| jid | string | User jid | -| nick | string | User nick | -| nodes | string | MucSub nodes | -| created_at | timestamp | Creation date | - - -# VCard - -## Table `vcard` - -The table is used to store raw vCard content for delivery of the vCard -"as is". - -The table fields are defined as follow: - -| Field | Type | Usage | -| -------------------- | ---------------- | -------------------- | -| username | string | Owner of the Vcard | -| vcard | text | Raw Vcard | -| created_at | timestamp | Record creation date | - -## Table `vcard_search` - -The table is used to store vCard index on a few of the Vcard field -used for vCard search in users directory. - -You can learn more about the vCard specification on Wikipedia -[vCard](https://en.wikipedia.org/wiki/VCard) page. - -The table fields are defined as follow: - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------- | -| username | string | Raw username for display | -| lusername | string | Lowercase username for search | -| fn | string | Raw fullname for display | -| lfn | string | Lowercase fullname for search | -| family | string | Raw family name for display | -| lfamilly | string | Lowercase family name for search | -| given | string | Raw given name for display | -| lgiven | string | Lowercase given name for search | -| middle | string | Raw middle name for display | -| lmiddle | string | Lowercase middle name for search | -| nickname | string | Raw nickname for display | -| lnickname | string | Lowercase nickname for search | -| bday | string | Raw birthday for display | -| lbday | string | Lowercase and processed birthday for search | -| ctry | string | Raw country for display | -| lctry | string | Lowercase country for search | -| locality | string | Raw city for display | -| llocality | string | Lowercase city for search | -| email | string | Raw email for display | -| lemail | string | Lowercase email for search | -| orgname | string | Raw organisation name for display | -| lorgname | string | Lowercase organisation name for search | -| orgunit | string | Raw organisation department name for display | -| lorgunit | string | Lowercase organisation department for search | - -# Others - -## Table `last` -This table is used to store the last time the user was seen online. -It is defined as follow: - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| seconds | string | Timestamp for the last time the user was seen online | -| state | string | Why user got disconnected. Usually is empty | - -Note that the table is *not* updated while the user has the session open. - - - -## Table `caps_features` -Ejabberd uses this table to keep a list of the entity capabilities discovered. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| node | string | Node | -| subnode | string | Subnode | -| feature | string | Entity feature | -| created_at | timestamp | Creation date | - -The subnode field correspond to the 'ver' ("verification string") of XEP-0115. -There is one entry in this table for each feature advertised by the given (node,subnode) pair. - -## Table `private_storage` -Used for user private data storage. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| namespace | string | XEP-0049 namespace of the stored data | -| data | string | Raw xml | -| created_at | timestamp | Creation date | - diff --git a/content/archive/22_05/admin-api.md b/content/archive/23.01/admin-api.md similarity index 83% rename from content/archive/22_05/admin-api.md rename to content/archive/23.01/admin-api.md index 1553b051..175d9383 100644 --- a/content/archive/22_05/admin-api.md +++ b/content/archive/23.01/admin-api.md @@ -1,12 +1,11 @@ --- -title: Administration API reference -toc: true -menu: API Reference -order: 1 -// Autogenerated with 'ejabberdctl gen_markdown_doc_for_commands' +search: + exclude: true --- -
added in 22.05
+# API Reference + +
added in 22.05
## abort_delete_old_mam_messages @@ -22,10 +21,10 @@ __Result:__ - *status* :: string : Status text __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](../../developer/ejabberd-api/admin-tags.md#purge) __Module:__ -[mod_mam](/archive/22_05/modules/#mod-mam) +[mod_mam](modules.md#mod_mam) __Examples:__ @@ -41,7 +40,7 @@ __Examples:__ ~~~ -
added in 22.05
+
added in 22.05
## abort_delete_old_messages @@ -57,7 +56,7 @@ __Result:__ - *status* :: string : Status text __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](../../developer/ejabberd-api/admin-tags.md#purge) __Examples:__ @@ -98,10 +97,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[roster](/developer/ejabberd-api/admin-tags/#roster) +[roster](../../developer/ejabberd-api/admin-tags.md#roster) __Module:__ -[mod_admin_extra](/archive/22_05/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -139,7 +138,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -173,10 +172,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) __Module:__ -[mod_admin_extra](/archive/22_05/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -211,10 +210,10 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[private](/developer/ejabberd-api/admin-tags/#private) +[private](../../developer/ejabberd-api/admin-tags.md#private) __Module:__ -[mod_private](/archive/22_05/modules/#mod-private) +[mod_private](modules.md#mod_private) __Examples:__ @@ -249,10 +248,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) __Module:__ -[mod_admin_extra](/archive/22_05/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -289,10 +288,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/22_05/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -328,10 +327,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) __Module:__ -[mod_admin_extra](/archive/22_05/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -366,10 +365,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) __Module:__ -[mod_admin_extra](/archive/22_05/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -409,10 +408,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) __Module:__ -[mod_admin_extra](/archive/22_05/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -446,7 +445,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](../../developer/ejabberd-api/admin-tags.md#server) __Examples:__ @@ -478,10 +477,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[erlang](/developer/ejabberd-api/admin-tags/#erlang) +[erlang](../../developer/ejabberd-api/admin-tags.md#erlang) __Module:__ -[mod_admin_extra](/archive/22_05/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -512,7 +511,7 @@ __Result:__ - *connected_users* :: [sessions::string] : List of users sessions __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Examples:__ @@ -546,10 +545,10 @@ __Result:__ - *connected_users_info* :: [{jid::string, connection::string, ip::string, port::integer, priority::integer, node::string, uptime::integer, status::string, resource::string, statustext::string}] __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/22_05/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -593,7 +592,7 @@ __Result:__ - *num_sessions* :: integer __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) [statistics](/developer/ejabberd-api/admin-tags/#statistics) +[session](../../developer/ejabberd-api/admin-tags.md#session) [statistics](../../developer/ejabberd-api/admin-tags.md#statistics) __Examples:__ @@ -625,10 +624,10 @@ __Result:__ - *connected_users_vhost* :: [sessions::string] __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/22_05/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -663,7 +662,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[sql](/developer/ejabberd-api/admin-tags/#sql) +[sql](../../developer/ejabberd-api/admin-tags.md#sql) __Examples:__ @@ -696,7 +695,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[config](/developer/ejabberd-api/admin-tags/#config) +[config](../../developer/ejabberd-api/admin-tags.md#config) __Examples:__ @@ -731,10 +730,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/22_05/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -771,10 +770,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/22_05/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -817,10 +816,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/22_05/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -851,7 +850,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](../../developer/ejabberd-api/admin-tags.md#purge) __Examples:__ @@ -867,7 +866,7 @@ __Examples:__ ~~~ -
added in 21.12
+
added in 21.12
## delete_expired_pubsub_items @@ -882,10 +881,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](../../developer/ejabberd-api/admin-tags.md#purge) __Module:__ -[mod_pubsub](/archive/22_05/modules/#mod-pubsub) +[mod_pubsub](modules.md#mod_pubsub) __Examples:__ @@ -917,7 +916,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -953,10 +952,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](../../developer/ejabberd-api/admin-tags.md#purge) __Module:__ -[mod_mam](/archive/22_05/modules/#mod-mam) +[mod_mam](modules.md#mod_mam) __Examples:__ @@ -973,7 +972,7 @@ __Examples:__ ~~~ -
added in 22.05
+
added in 22.05
## delete_old_mam_messages_batch @@ -996,10 +995,10 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](../../developer/ejabberd-api/admin-tags.md#purge) __Module:__ -[mod_mam](/archive/22_05/modules/#mod-mam) +[mod_mam](modules.md#mod_mam) __Examples:__ @@ -1019,7 +1018,7 @@ __Examples:__ ~~~ -
added in 22.05
+
added in 22.05
## delete_old_mam_messages_status @@ -1035,10 +1034,10 @@ __Result:__ - *status* :: string : Status test __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](../../developer/ejabberd-api/admin-tags.md#purge) __Module:__ -[mod_mam](/archive/22_05/modules/#mod-mam) +[mod_mam](modules.md#mod_mam) __Examples:__ @@ -1070,7 +1069,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](../../developer/ejabberd-api/admin-tags.md#purge) __Examples:__ @@ -1086,7 +1085,7 @@ __Examples:__ ~~~ -
added in 22.05
+
added in 22.05
## delete_old_messages_batch @@ -1105,7 +1104,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](../../developer/ejabberd-api/admin-tags.md#purge) __Examples:__ @@ -1124,7 +1123,7 @@ __Examples:__ ~~~ -
added in 22.05
+
added in 22.05
## delete_old_messages_status @@ -1140,7 +1139,7 @@ __Result:__ - *status* :: string : Status test __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](../../developer/ejabberd-api/admin-tags.md#purge) __Examples:__ @@ -1156,7 +1155,7 @@ __Examples:__ ~~~ -
added in 21.12
+
added in 21.12
## delete_old_pubsub_items @@ -1172,10 +1171,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](../../developer/ejabberd-api/admin-tags.md#purge) __Module:__ -[mod_pubsub](/archive/22_05/modules/#mod-pubsub) +[mod_pubsub](modules.md#mod_pubsub) __Examples:__ @@ -1207,10 +1206,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](../../developer/ejabberd-api/admin-tags.md#purge) __Module:__ -[mod_push](/archive/22_05/modules/#mod-push) +[mod_push](modules.md#mod_push) __Examples:__ @@ -1250,10 +1249,10 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) [purge](/developer/ejabberd-api/admin-tags/#purge) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) [purge](../../developer/ejabberd-api/admin-tags.md#purge) __Module:__ -[mod_admin_extra](/archive/22_05/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -1294,10 +1293,10 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) [purge](/developer/ejabberd-api/admin-tags/#purge) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) [purge](../../developer/ejabberd-api/admin-tags.md#purge) __Module:__ -[mod_admin_extra](/archive/22_05/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -1333,10 +1332,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[roster](/developer/ejabberd-api/admin-tags/#roster) +[roster](../../developer/ejabberd-api/admin-tags.md#roster) __Module:__ -[mod_admin_extra](/archive/22_05/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -1372,10 +1371,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/22_05/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -1411,10 +1410,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/22_05/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -1446,7 +1445,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -1478,7 +1477,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[config](/developer/ejabberd-api/admin-tags/#config) +[config](../../developer/ejabberd-api/admin-tags.md#config) __Examples:__ @@ -1511,7 +1510,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -1536,7 +1535,7 @@ __Examples:__ Export virtual host information from Mnesia tables to SQL file -Configure the modules to use SQL, then call this command. After correctly exported the database of a vhost, you may want to delete from mnesia with the [delete_mnesia](/archive/22_05/admin-api/#delete-mnesia) command. +Configure the modules to use SQL, then call this command. After correctly exported the database of a vhost, you may want to delete from mnesia with the [delete_mnesia](admin-api.md#delete_mnesia) command. __Arguments:__ @@ -1548,7 +1547,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -1581,7 +1580,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -1614,7 +1613,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -1631,7 +1630,7 @@ __Examples:__ ~~~ -
added in 20.01
+
added in 20.01
## gc @@ -1646,7 +1645,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](../../developer/ejabberd-api/admin-tags.md#server) __Examples:__ @@ -1680,7 +1679,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[documentation](/developer/ejabberd-api/admin-tags/#documentation) +[documentation](../../developer/ejabberd-api/admin-tags.md#documentation) __Examples:__ @@ -1716,7 +1715,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[documentation](/developer/ejabberd-api/admin-tags/#documentation) +[documentation](../../developer/ejabberd-api/admin-tags.md#documentation) __Examples:__ @@ -1734,7 +1733,7 @@ __Examples:__ ~~~ -
added in 21.12
+
added in 21.12
## gen_markdown_doc_for_tags @@ -1750,7 +1749,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[documentation](/developer/ejabberd-api/admin-tags/#documentation) +[documentation](../../developer/ejabberd-api/admin-tags.md#documentation) __Examples:__ @@ -1781,10 +1780,10 @@ __Result:__ - *cookie* :: string : Erlang cookie used for authentication by ejabberd __Tags:__ -[erlang](/developer/ejabberd-api/admin-tags/#erlang) +[erlang](../../developer/ejabberd-api/admin-tags.md#erlang) __Module:__ -[mod_admin_extra](/archive/22_05/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -1820,10 +1819,10 @@ __Result:__ - *last_activity* :: {timestamp::string, status::string} : Last activity timestamp and status __Tags:__ -[last](/developer/ejabberd-api/admin-tags/#last) +[last](../../developer/ejabberd-api/admin-tags.md#last) __Module:__ -[mod_admin_extra](/archive/22_05/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -1858,7 +1857,7 @@ __Result:__ - *levelatom* :: string : Tuple with the log level number, its keyword and description __Tags:__ -[logs](/developer/ejabberd-api/admin-tags/#logs) +[logs](../../developer/ejabberd-api/admin-tags.md#logs) __Examples:__ @@ -1891,10 +1890,10 @@ __Result:__ - *value* :: integer : Number __Tags:__ -[offline](/developer/ejabberd-api/admin-tags/#offline) +[offline](../../developer/ejabberd-api/admin-tags.md#offline) __Module:__ -[mod_admin_extra](/archive/22_05/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -1940,10 +1939,10 @@ __Result:__ - *presence* :: {jid::string, show::string, status::string} __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/22_05/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -1982,10 +1981,10 @@ __Result:__ - *affiliation* :: string : Affiliation of the user __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/22_05/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -2020,10 +2019,10 @@ __Result:__ - *affiliations* :: [{username::string, domain::string, affiliation::string, reason::string}] : The list of affiliations with username, domain, affiliation and reason __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/22_05/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -2064,10 +2063,10 @@ __Result:__ - *occupants* :: [{jid::string, nick::string, role::string}] : The list of occupants with JID, nick and affiliation __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/22_05/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -2107,10 +2106,10 @@ __Result:__ - *occupants* :: integer : Number of room occupants __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/22_05/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -2144,10 +2143,10 @@ __Result:__ - *options* :: [{name::string, value::string}] : List of room options tuples with name and value __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/22_05/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -2186,10 +2185,10 @@ __Result:__ - *contacts* :: [{jid::string, nick::string, subscription::string, ask::string, group::string}] __Tags:__ -[roster](/developer/ejabberd-api/admin-tags/#roster) +[roster](../../developer/ejabberd-api/admin-tags.md#roster) __Module:__ -[mod_admin_extra](/archive/22_05/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -2238,10 +2237,10 @@ __Result:__ - *subscribers* :: [jid::string] : The list of users that are subscribed to that room __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/22_05/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -2278,10 +2277,10 @@ __Result:__ - *rooms* :: [room::string] __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/22_05/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -2301,7 +2300,7 @@ __Examples:__ ~~~ -
added in 21.04
+
added in 21.04
## get_user_subscriptions @@ -2318,10 +2317,10 @@ __Result:__ - *rooms* :: [{roomjid::string, usernick::string, nodes::[node::string]}] __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/22_05/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -2375,10 +2374,10 @@ __Result:__ - *content* :: string : Field content __Tags:__ -[vcard](/developer/ejabberd-api/admin-tags/#vcard) +[vcard](../../developer/ejabberd-api/admin-tags.md#vcard) __Module:__ -[mod_admin_extra](/archive/22_05/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -2433,10 +2432,10 @@ __Result:__ - *content* :: string : Field content __Tags:__ -[vcard](/developer/ejabberd-api/admin-tags/#vcard) +[vcard](../../developer/ejabberd-api/admin-tags.md#vcard) __Module:__ -[mod_admin_extra](/archive/22_05/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -2492,10 +2491,10 @@ __Result:__ - *contents* :: [value::string] __Tags:__ -[vcard](/developer/ejabberd-api/admin-tags/#vcard) +[vcard](../../developer/ejabberd-api/admin-tags.md#vcard) __Module:__ -[mod_admin_extra](/archive/22_05/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -2533,7 +2532,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -2565,7 +2564,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -2597,7 +2596,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -2632,7 +2631,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) [sql](/developer/ejabberd-api/admin-tags/#sql) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) [sql](../../developer/ejabberd-api/admin-tags.md#sql) __Examples:__ @@ -2663,7 +2662,7 @@ __Result:__ - *s2s_incoming* :: integer __Tags:__ -[statistics](/developer/ejabberd-api/admin-tags/#statistics) [s2s](/developer/ejabberd-api/admin-tags/#s2s) +[statistics](../../developer/ejabberd-api/admin-tags.md#statistics) [s2s](../../developer/ejabberd-api/admin-tags.md#s2s) __Examples:__ @@ -2699,7 +2698,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -2734,7 +2733,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[cluster](/developer/ejabberd-api/admin-tags/#cluster) +[cluster](../../developer/ejabberd-api/admin-tags.md#cluster) __Examples:__ @@ -2769,10 +2768,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/22_05/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -2808,7 +2807,7 @@ __Result:__ - *num_resources* :: integer : Number of resources that were kicked __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Examples:__ @@ -2844,7 +2843,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[cluster](/developer/ejabberd-api/admin-tags/#cluster) +[cluster](../../developer/ejabberd-api/admin-tags.md#cluster) __Examples:__ @@ -2875,7 +2874,7 @@ __Result:__ - *certificates* :: [{domain::string, file::string, used::string}] __Tags:__ -[acme](/developer/ejabberd-api/admin-tags/#acme) +[acme](../../developer/ejabberd-api/admin-tags.md#acme) __Examples:__ @@ -2917,7 +2916,7 @@ __Result:__ - *nodes* :: [node::string] __Tags:__ -[cluster](/developer/ejabberd-api/admin-tags/#cluster) +[cluster](../../developer/ejabberd-api/admin-tags.md#cluster) __Examples:__ @@ -2955,7 +2954,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -2971,7 +2970,7 @@ __Examples:__ ~~~ -
added in 20.01
+
added in 20.01
## man @@ -2986,7 +2985,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[documentation](/developer/ejabberd-api/admin-tags/#documentation) +[documentation](../../developer/ejabberd-api/admin-tags.md#documentation) __Examples:__ @@ -3021,7 +3020,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -3055,7 +3054,7 @@ __Result:__ - *res* :: string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -3087,7 +3086,7 @@ __Result:__ - *res* :: string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -3119,7 +3118,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[modules](/developer/ejabberd-api/admin-tags/#modules) +[modules](../../developer/ejabberd-api/admin-tags.md#modules) __Examples:__ @@ -3151,7 +3150,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[modules](/developer/ejabberd-api/admin-tags/#modules) +[modules](../../developer/ejabberd-api/admin-tags.md#modules) __Examples:__ @@ -3183,7 +3182,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[modules](/developer/ejabberd-api/admin-tags/#modules) +[modules](../../developer/ejabberd-api/admin-tags.md#modules) __Examples:__ @@ -3218,7 +3217,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[modules](/developer/ejabberd-api/admin-tags/#modules) +[modules](../../developer/ejabberd-api/admin-tags.md#modules) __Examples:__ @@ -3249,7 +3248,7 @@ __Result:__ - *modules* :: [{name::string, summary::string}] : List of tuples with module name and description __Tags:__ -[modules](/developer/ejabberd-api/admin-tags/#modules) +[modules](../../developer/ejabberd-api/admin-tags.md#modules) __Examples:__ @@ -3283,7 +3282,7 @@ __Result:__ - *modules* :: [{name::string, summary::string}] : List of tuples with module name and description __Tags:__ -[modules](/developer/ejabberd-api/admin-tags/#modules) +[modules](../../developer/ejabberd-api/admin-tags.md#modules) __Examples:__ @@ -3320,7 +3319,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[modules](/developer/ejabberd-api/admin-tags/#modules) +[modules](../../developer/ejabberd-api/admin-tags.md#modules) __Examples:__ @@ -3352,10 +3351,10 @@ __Result:__ - *rooms* :: [room::string] : List of rooms __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/22_05/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -3391,10 +3390,10 @@ __Result:__ - *rooms* :: [{jid::string, public::string, participants::integer}] : List of rooms with summary __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/22_05/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -3440,10 +3439,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/22_05/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -3478,10 +3477,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/22_05/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -3515,10 +3514,10 @@ __Result:__ - *resources* :: integer : Number of active resources for a user __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/22_05/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -3553,7 +3552,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[oauth](/developer/ejabberd-api/admin-tags/#oauth) +[oauth](../../developer/ejabberd-api/admin-tags.md#oauth) __Examples:__ @@ -3589,7 +3588,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[oauth](/developer/ejabberd-api/admin-tags/#oauth) +[oauth](../../developer/ejabberd-api/admin-tags.md#oauth) __Examples:__ @@ -3625,7 +3624,7 @@ __Result:__ - *result* :: {token::string, scopes::string, expires_in::string} __Tags:__ -[oauth](/developer/ejabberd-api/admin-tags/#oauth) +[oauth](../../developer/ejabberd-api/admin-tags.md#oauth) __Examples:__ @@ -3665,7 +3664,7 @@ __Result:__ - *tokens* :: [{token::string, user::string, scope::string, expires_in::string}] __Tags:__ -[oauth](/developer/ejabberd-api/admin-tags/#oauth) +[oauth](../../developer/ejabberd-api/admin-tags.md#oauth) __Examples:__ @@ -3710,7 +3709,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[oauth](/developer/ejabberd-api/admin-tags/#oauth) +[oauth](../../developer/ejabberd-api/admin-tags.md#oauth) __Examples:__ @@ -3726,7 +3725,7 @@ __Examples:__ ~~~ -
changed in 22.05
+
changed in 22.05
## oauth_revoke_token @@ -3742,7 +3741,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[oauth](/developer/ejabberd-api/admin-tags/#oauth) +[oauth](../../developer/ejabberd-api/admin-tags.md#oauth) __Examples:__ @@ -3773,7 +3772,7 @@ __Result:__ - *s2s_outgoing* :: integer __Tags:__ -[statistics](/developer/ejabberd-api/admin-tags/#statistics) [s2s](/developer/ejabberd-api/admin-tags/#s2s) +[statistics](../../developer/ejabberd-api/admin-tags.md#statistics) [s2s](../../developer/ejabberd-api/admin-tags.md#s2s) __Examples:__ @@ -3807,10 +3806,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[stanza](/developer/ejabberd-api/admin-tags/#stanza) +[stanza](../../developer/ejabberd-api/admin-tags.md#stanza) __Module:__ -[mod_admin_extra](/archive/22_05/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -3847,10 +3846,10 @@ __Result:__ - *res* :: string __Tags:__ -[private](/developer/ejabberd-api/admin-tags/#private) +[private](../../developer/ejabberd-api/admin-tags.md#private) __Module:__ -[mod_admin_extra](/archive/22_05/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -3887,10 +3886,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[private](/developer/ejabberd-api/admin-tags/#private) +[private](../../developer/ejabberd-api/admin-tags.md#private) __Module:__ -[mod_admin_extra](/archive/22_05/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -3964,10 +3963,10 @@ __Result:__ - *response* :: [{user::string, contact::string}] __Tags:__ -[roster](/developer/ejabberd-api/admin-tags/#roster) +[roster](../../developer/ejabberd-api/admin-tags.md#roster) __Module:__ -[mod_admin_extra](/archive/22_05/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -4013,10 +4012,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[roster](/developer/ejabberd-api/admin-tags/#roster) +[roster](../../developer/ejabberd-api/admin-tags.md#roster) __Module:__ -[mod_admin_extra](/archive/22_05/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -4058,10 +4057,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[roster](/developer/ejabberd-api/admin-tags/#roster) +[roster](../../developer/ejabberd-api/admin-tags.md#roster) __Module:__ -[mod_admin_extra](/archive/22_05/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -4100,10 +4099,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[roster](/developer/ejabberd-api/admin-tags/#roster) +[roster](../../developer/ejabberd-api/admin-tags.md#roster) __Module:__ -[mod_admin_extra](/archive/22_05/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -4137,7 +4136,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) __Examples:__ @@ -4171,7 +4170,7 @@ __Result:__ - *users* :: [username::string] : List of registered accounts usernames __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) __Examples:__ @@ -4205,7 +4204,7 @@ __Result:__ - *vhosts* :: [vhost::string] : List of available vhosts __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](../../developer/ejabberd-api/admin-tags.md#server) __Examples:__ @@ -4239,7 +4238,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[config](/developer/ejabberd-api/admin-tags/#config) +[config](../../developer/ejabberd-api/admin-tags.md#config) __Examples:__ @@ -4272,10 +4271,10 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mam](/developer/ejabberd-api/admin-tags/#mam) +[mam](../../developer/ejabberd-api/admin-tags.md#mam) __Module:__ -[mod_mam](/archive/22_05/modules/#mod-mam) +[mod_mam](modules.md#mod_mam) __Examples:__ @@ -4310,10 +4309,10 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mam](/developer/ejabberd-api/admin-tags/#mam) +[mam](../../developer/ejabberd-api/admin-tags.md#mam) __Module:__ -[mod_mam](/archive/22_05/modules/#mod-mam) +[mod_mam](modules.md#mod_mam) __Examples:__ @@ -4339,7 +4338,7 @@ __Examples:__ Reopen the log files after being renamed -This can be useful when an external tool is used for log rotation. See https://docs.ejabberd.im/admin/guide/troubleshooting/#log-files +This can be useful when an external tool is used for log rotation. See https://docs.ejabberd.im/admin/guide/troubleshooting/#log_files __Arguments:__ @@ -4349,7 +4348,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[logs](/developer/ejabberd-api/admin-tags/#logs) +[logs](../../developer/ejabberd-api/admin-tags.md#logs) __Examples:__ @@ -4381,7 +4380,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[acme](/developer/ejabberd-api/admin-tags/#acme) +[acme](../../developer/ejabberd-api/admin-tags.md#acme) __Examples:__ @@ -4415,10 +4414,10 @@ __Result:__ - *resource* :: string : Name of user resource __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/22_05/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -4451,7 +4450,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](../../developer/ejabberd-api/admin-tags.md#server) __Examples:__ @@ -4487,10 +4486,10 @@ __Result:__ - 2: code not reloaded, but module restarted __Tags:__ -[erlang](/developer/ejabberd-api/admin-tags/#erlang) +[erlang](../../developer/ejabberd-api/admin-tags.md#erlang) __Module:__ -[mod_admin_extra](/archive/22_05/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -4526,7 +4525,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -4558,7 +4557,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[acme](/developer/ejabberd-api/admin-tags/#acme) +[acme](../../developer/ejabberd-api/admin-tags.md#acme) __Examples:__ @@ -4593,10 +4592,10 @@ __Result:__ - *rooms* :: [room::string] : List of empty rooms that have been destroyed __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/22_05/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -4634,10 +4633,10 @@ __Result:__ - *rooms* :: [room::string] : List of empty rooms __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/22_05/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -4676,10 +4675,10 @@ __Result:__ - *rooms* :: [room::string] : List of unused rooms that has been destroyed __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/22_05/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -4719,10 +4718,10 @@ __Result:__ - *rooms* :: [room::string] : List of unused rooms __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/22_05/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -4757,7 +4756,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[logs](/developer/ejabberd-api/admin-tags/#logs) +[logs](../../developer/ejabberd-api/admin-tags.md#logs) __Examples:__ @@ -4781,7 +4780,7 @@ __Examples:__ Send a direct invitation to several destinations -Since ejabberd 20.12, this command is asynchronous: the API call may return before the server has send all the invitations. +Since ejabberd 20.12, this command is asynchronous: the API call may return before the server has send all the invitations. Password and Message can also be: none. Users JIDs are separated with : @@ -4798,10 +4797,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/22_05/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -4844,10 +4843,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[stanza](/developer/ejabberd-api/admin-tags/#stanza) +[stanza](../../developer/ejabberd-api/admin-tags.md#stanza) __Module:__ -[mod_admin_extra](/archive/22_05/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -4885,10 +4884,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[stanza](/developer/ejabberd-api/admin-tags/#stanza) +[stanza](../../developer/ejabberd-api/admin-tags.md#stanza) __Module:__ -[mod_admin_extra](/archive/22_05/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -4928,10 +4927,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[stanza](/developer/ejabberd-api/admin-tags/#stanza) +[stanza](../../developer/ejabberd-api/admin-tags.md#stanza) __Module:__ -[mod_admin_extra](/archive/22_05/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -4972,10 +4971,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[last](/developer/ejabberd-api/admin-tags/#last) +[last](../../developer/ejabberd-api/admin-tags.md#last) __Module:__ -[mod_admin_extra](/archive/22_05/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5010,7 +5009,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[logs](/developer/ejabberd-api/admin-tags/#logs) +[logs](../../developer/ejabberd-api/admin-tags.md#logs) __Examples:__ @@ -5045,7 +5044,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[cluster](/developer/ejabberd-api/admin-tags/#cluster) +[cluster](../../developer/ejabberd-api/admin-tags.md#cluster) __Examples:__ @@ -5079,10 +5078,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[vcard](/developer/ejabberd-api/admin-tags/#vcard) +[vcard](../../developer/ejabberd-api/admin-tags.md#vcard) __Module:__ -[mod_admin_extra](/archive/22_05/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5122,10 +5121,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/22_05/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5166,10 +5165,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/22_05/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -5218,10 +5217,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[vcard](/developer/ejabberd-api/admin-tags/#vcard) +[vcard](../../developer/ejabberd-api/admin-tags.md#vcard) __Module:__ -[mod_admin_extra](/archive/22_05/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5278,10 +5277,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[vcard](/developer/ejabberd-api/admin-tags/#vcard) +[vcard](../../developer/ejabberd-api/admin-tags.md#vcard) __Module:__ -[mod_admin_extra](/archive/22_05/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5339,10 +5338,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[vcard](/developer/ejabberd-api/admin-tags/#vcard) +[vcard](../../developer/ejabberd-api/admin-tags.md#vcard) __Module:__ -[mod_admin_extra](/archive/22_05/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5365,7 +5364,7 @@ __Examples:__ ~~~ -
changed in 21.07
+
changed in 21.07
## srg_create @@ -5392,10 +5391,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[shared_roster_group](/developer/ejabberd-api/admin-tags/#shared-roster-group) +[shared_roster_group](../../developer/ejabberd-api/admin-tags.md#shared_roster_group) __Module:__ -[mod_admin_extra](/archive/22_05/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5432,10 +5431,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[shared_roster_group](/developer/ejabberd-api/admin-tags/#shared-roster-group) +[shared_roster_group](../../developer/ejabberd-api/admin-tags.md#shared_roster_group) __Module:__ -[mod_admin_extra](/archive/22_05/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5469,10 +5468,10 @@ __Result:__ - *informations* :: [{key::string, value::string}] : List of group information, as key and value __Tags:__ -[shared_roster_group](/developer/ejabberd-api/admin-tags/#shared-roster-group) +[shared_roster_group](../../developer/ejabberd-api/admin-tags.md#shared_roster_group) __Module:__ -[mod_admin_extra](/archive/22_05/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5515,10 +5514,10 @@ __Result:__ - *members* :: [member::string] : List of group identifiers __Tags:__ -[shared_roster_group](/developer/ejabberd-api/admin-tags/#shared-roster-group) +[shared_roster_group](../../developer/ejabberd-api/admin-tags.md#shared_roster_group) __Module:__ -[mod_admin_extra](/archive/22_05/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5554,10 +5553,10 @@ __Result:__ - *groups* :: [id::string] : List of group identifiers __Tags:__ -[shared_roster_group](/developer/ejabberd-api/admin-tags/#shared-roster-group) +[shared_roster_group](../../developer/ejabberd-api/admin-tags.md#shared_roster_group) __Module:__ -[mod_admin_extra](/archive/22_05/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5595,10 +5594,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[shared_roster_group](/developer/ejabberd-api/admin-tags/#shared-roster-group) +[shared_roster_group](../../developer/ejabberd-api/admin-tags.md#shared_roster_group) __Module:__ -[mod_admin_extra](/archive/22_05/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5636,10 +5635,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[shared_roster_group](/developer/ejabberd-api/admin-tags/#shared-roster-group) +[shared_roster_group](../../developer/ejabberd-api/admin-tags.md#shared_roster_group) __Module:__ -[mod_admin_extra](/archive/22_05/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5674,10 +5673,10 @@ __Result:__ - *stat* :: integer : Integer statistic value __Tags:__ -[statistics](/developer/ejabberd-api/admin-tags/#statistics) +[statistics](../../developer/ejabberd-api/admin-tags.md#statistics) __Module:__ -[mod_admin_extra](/archive/22_05/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5710,10 +5709,10 @@ __Result:__ - *stat* :: integer : Integer statistic value __Tags:__ -[statistics](/developer/ejabberd-api/admin-tags/#statistics) +[statistics](../../developer/ejabberd-api/admin-tags.md#statistics) __Module:__ -[mod_admin_extra](/archive/22_05/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5745,7 +5744,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](../../developer/ejabberd-api/admin-tags.md#server) __Examples:__ @@ -5777,10 +5776,10 @@ __Result:__ - *users* :: [{user::string, host::string, resource::string, priority::integer, status::string}] __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/22_05/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5821,10 +5820,10 @@ __Result:__ - *users* :: [{user::string, host::string, resource::string, priority::integer, status::string}] __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/22_05/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5865,10 +5864,10 @@ __Result:__ - *users* :: integer : Number of connected sessions with given status type __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) [statistics](/developer/ejabberd-api/admin-tags/#statistics) +[session](../../developer/ejabberd-api/admin-tags.md#session) [statistics](../../developer/ejabberd-api/admin-tags.md#statistics) __Module:__ -[mod_admin_extra](/archive/22_05/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5901,10 +5900,10 @@ __Result:__ - *users* :: integer : Number of connected sessions with given status type __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) [statistics](/developer/ejabberd-api/admin-tags/#statistics) +[session](../../developer/ejabberd-api/admin-tags.md#session) [statistics](../../developer/ejabberd-api/admin-tags.md#statistics) __Module:__ -[mod_admin_extra](/archive/22_05/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5936,7 +5935,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](../../developer/ejabberd-api/admin-tags.md#server) __Examples:__ @@ -5973,7 +5972,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](../../developer/ejabberd-api/admin-tags.md#server) __Examples:__ @@ -6005,7 +6004,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[s2s](/developer/ejabberd-api/admin-tags/#s2s) +[s2s](../../developer/ejabberd-api/admin-tags.md#s2s) __Examples:__ @@ -6040,10 +6039,10 @@ __Result:__ - *nodes* :: [node::string] : The list of nodes that has subscribed __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/22_05/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -6065,7 +6064,7 @@ __Examples:__ ~~~ -
added in 22.05
+
added in 22.05
## subscribe_room_many @@ -6086,10 +6085,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/22_05/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -6135,10 +6134,10 @@ __Result:__ - *unbanned* :: integer : Amount of unbanned entries, or negative in case of error. __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) __Module:__ -[mod_fail2ban](/archive/22_05/modules/#mod-fail2ban) +[mod_fail2ban](modules.md#mod_fail2ban) __Examples:__ @@ -6174,7 +6173,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) __Examples:__ @@ -6208,10 +6207,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/22_05/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -6244,7 +6243,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](../../developer/ejabberd-api/admin-tags.md#server) __Examples:__ @@ -6275,7 +6274,7 @@ __Result:__ - *modules* :: [module::string] __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](../../developer/ejabberd-api/admin-tags.md#server) __Examples:__ @@ -6309,10 +6308,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[sql](/developer/ejabberd-api/admin-tags/#sql) +[sql](../../developer/ejabberd-api/admin-tags.md#sql) __Module:__ -[mod_admin_update_sql](/archive/22_05/modules/#mod-admin-update-sql) +[mod_admin_update_sql](modules.md#mod_admin_update_sql) __Examples:__ @@ -6345,7 +6344,7 @@ __Result:__ - *resources* :: [resource::string] __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Examples:__ @@ -6383,10 +6382,10 @@ __Result:__ - *sessions_info* :: [{connection::string, ip::string, port::integer, priority::integer, node::string, uptime::integer, status::string, resource::string, statustext::string}] __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/22_05/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ diff --git a/content/archive/23_01/index.md b/content/archive/23.01/index.md similarity index 60% rename from content/archive/23_01/index.md rename to content/archive/23.01/index.md index 8f7ecd11..2f8fb655 100644 --- a/content/archive/23_01/index.md +++ b/content/archive/23.01/index.md @@ -1,15 +1,11 @@ ---- -title: Archived Documentation for 23.01 -menu: 23.01 -order: 7698 ---- +# Archived Documentation for 23.01 This section contains some archived sections for ejabberd 23.01. If you are upgrading ejabberd from a previous release, you can check: -* [Specific version upgrade notes](/admin/upgrade/#specific-version-upgrade-notes) +* [Specific version upgrade notes](upgrade.md) * [ejabberd 23.01 release announcement](https://www.process-one.net/blog/ejabberd-23-01/) -* [Docs Github Compare from 22.10](https://github.com/processone/docs.ejabberd.im/compare/22.10...23.01) -* [ejabberd Github Compare from 22.10](https://github.com/processone/ejabberd/compare/22.10...23.01) +* [Docs Github Compare from 22.10](https://github.com/processone/docs.ejabberd.im/compare/22.10..23.01) +* [ejabberd Github Compare from 22.10](https://github.com/processone/ejabberd/compare/22.10..23.01) diff --git a/content/archive/23.01/listen-options.md b/content/archive/23.01/listen-options.md new file mode 100644 index 00000000..f85c63bf --- /dev/null +++ b/content/archive/23.01/listen-options.md @@ -0,0 +1,399 @@ +--- +search: + exclude: true +--- + +# Listen Options + +This is a detailed description of each option allowed by the listening +modules: + +## access + +*AccessName* + +This option defines access to the port. The default value is `all`. + +## backlog + +*Value* + +The backlog value defines the maximum length that the queue of + pending connections may grow to. This should be increased if the + server is going to handle lots of new incoming connections as they + may be dropped if there is no space in the queue (and ejabberd was + not able to accept them immediately). Default value is 5. + +## cafile + +*Path* + +Path to a file of CA root certificates. +The default is to use system defined file if possible. + +This option is useful to define the file for a specific port listener. +To set a file for all client listeners or for specific vhosts, you can use the +[`c2s_cafile`](toplevel.md#c2s-cafile) top-level option. +To set a file for all server connections, you can use the +[`s2s_cafile`](toplevel.md#s2s-cafile) top-level option +or the +[`ca_file`](toplevel.md#ca_file) top-level option. + +Please note: if this option is set in +[`ejabberd_c2s`](listen.md#ejabberd_c2s) +or [`ejabberd_s2s_in`](listen.md#ejabberd_s2s-in) +and the corresponding top-level option is also set +([`c2s_cafile`](toplevel.md#c2s-cafile), +[`s2s_cafile`](toplevel.md#s2s-cafile)), +then the top-level option is used, not this one. + +## certfile + +*Path* + +Path to the certificate file. +Only makes sense when the [`tls`](#tls) +options is set. +If this option is not set, you should set the +[`certfiles`](toplevel.md#certfiles) top-level option +or configure [ACME](../../admin/configuration/basic.md#acme). + +## check_from + +*true | false* + +This option can be used with +[`ejabberd_service`](listen.md#ejabberd_service) only. + [`XEP-0114`](https://xmpp.org/extensions/xep-0114.html) requires that + the domain must match the hostname of the component. If this option + is set to `false`, `ejabberd` will allow the component to send + stanzas with any arbitrary domain in the ’from’ attribute. Only use + this option if you are completely sure about it. The default value + is `true`, to be compliant with + [`XEP-0114`](https://xmpp.org/extensions/xep-0114.html). + +## ciphers + +*Ciphers* + +OpenSSL ciphers list in the same format accepted by + ‘`openssl ciphers`’ command. + +Please note: if this option is set in +[`ejabberd_c2s`](listen.md#ejabberd_c2s) +or [`ejabberd_s2s_in`](listen.md#ejabberd_s2s-in) +and the corresponding top-level option is also set +([`c2s_ciphers`](toplevel.md#c2s-ciphers), +[`s2s_ciphers`](toplevel.md#s2s-ciphers)), +then the top-level option is used, not this one. + +## custom_headers + +*{Name: Value}* + +Specify additional HTTP headers to be included in all HTTP responses. +Default value is: `[]` + +## default_host + +*undefined | HostName* + +If the HTTP request received by ejabberd contains the HTTP header + `Host` with an ambiguous virtual host that doesn’t match any one + defined in ejabberd (see + [Host Names](../../admin/configuration/basic.md#host_names)), + then this configured HostName + is set as the request Host. The default value of this option is: + `undefined`. + +## dhfile + +*Path* + +Full path to a file containing custom parameters for Diffie-Hellman key + exchange. Such a file could be created with the command + `openssl dhparam -out dh.pem 2048`. If this option is not specified, + default parameters will be used, which might not provide the same level + of security as using custom parameters. + +Please note: if this option is set in +[`ejabberd_c2s`](listen.md#ejabberd_c2s) +or [`ejabberd_s2s_in`](listen.md#ejabberd_s2s-in) +and the corresponding top-level option is also set +([`c2s_dhfile`](toplevel.md#c2s-dhfile), +[`s2s_dhfile`](toplevel.md#s2s-dhfile)), +then the top-level option is used, not this one. + +## global_routes + +*true | false* + +This option emulates legacy behaviour which registers all routes +defined in [`hosts`](toplevel.md#hosts) +on a component connected. This behaviour +is considered harmful in the case when it's desired to multiplex +different components on the same port, so, to disable it, +set `global_routes` to `false`. + +The default value is `true`, +e.g. legacy behaviour is emulated: the only reason for this is +to maintain backward compatibility with existing deployments. + +## hosts + +*{Hostname: [HostOption, ...]}* + +The external Jabber component that connects to this +[`ejabberd_service`](listen.md#ejabberd_service) +can serve one or more hostnames. As `HostOption` + you can define options for the component; currently the only allowed + option is the password required to the component when attempt to + connect to ejabberd: `password: Secret`. Note that you + cannot define in a single `ejabberd_service` components of different + services: add an `ejabberd_service` for each service, as seen in an + example below. This option may not be necessary if the component + already provides the host in its packets; in that case, you can simply + provide the password option that will be used for all the hosts + (see port 5236 definition in the example below). + +## max_fsm_queue + +*Size* + +This option specifies the maximum number of elements in the queue of + the FSM (Finite State Machine). Roughly speaking, each message in + such queues represents one XML stanza queued to be sent into its + relevant outgoing stream. If queue size reaches the limit (because, + for example, the receiver of stanzas is too slow), the FSM and the + corresponding connection (if any) will be terminated and error + message will be logged. The reasonable value for this option depends + on your hardware configuration. This option can be specified for + [`ejabberd_service`](listen.md#ejabberd_service) + and [`ejabberd_c2s`](listen.md#ejabberd_c2s) + listeners, or also globally for + [`ejabberd_s2s_out`](listen.md#ejabberd_s2s-out). + If the option is not specified for + `ejabberd_service` or `ejabberd_c2s` listeners, the globally + configured value is used. The allowed values are integers and + ’undefined’. Default value: ’10000’. + +## max_payload_size + +*Size* + +Specify the maximum payload size in bytes. +It can be either an integer or the word `infinity`. +The default value is `infinity`. + +## max_stanza_size + +*Size* + +This option specifies an approximate maximum size in bytes of XML + stanzas. Approximate, because it is calculated with the precision of + one block of read data. For example `{max_stanza_size, 65536}`. The + default value is `infinity`. Recommended values are 65536 for c2s + connections and 131072 for s2s connections. s2s max stanza size must + always much higher than c2s limit. Change this value with extreme + care as it can cause unwanted disconnect if set too low. + +## password + +*Secret* + +Specify the password to verify an external component that connects to the port. + +
improved in 20.07
+ +## port + +*Port number, or unix domain socket path* + +Declares at which port/unix domain socket should be listening. + +Can be set to number between `1` and `65535` to listen on TCP or UDP socket, +or can be set to string in form `"unix:/path/to/socket"` to create and listen +on unix domain socket `/path/to/socket`. + +## protocol_options + +*ProtocolOpts* + +List of general options relating to SSL/TLS. These map to + [`OpenSSL’s set_options()`](https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_options.html). + The default entry is: `"no_sslv3|cipher_server_preference|no_compression"` + +Please note: if this option is set in +[`ejabberd_c2s`](listen.md#ejabberd_c2s) +or [`ejabberd_s2s_in`](listen.md#ejabberd_s2s-in) +and the corresponding top-level option is also set +([`c2s_protocol_options`](toplevel.md#c2s-protocol-options), +[`s2s_protocol_options`](toplevel.md#s2s-protocol-options)), +then the top-level option is used, not this one. + +## request_handlers + +*{Path: Module}* + +To define one or several handlers that will serve HTTP requests in +[`ejabberd_http`](listen.md#ejabberd_http). The + Path is a string; so the URIs that start with that Path will be + served by Module. For example, if you want `mod_foo` to serve the + URIs that start with `/a/b/`, and you also want `mod_bosh` to + serve the URIs `/bosh/`, use this option: + + request_handlers: + /a/b: mod_foo + /bosh: mod_bosh + /mqtt: mod_mqtt + +
new in 21.07
+ +## send_timeout + +*Integer | infinity* + +Sets the longest time that data can wait to be accepted to sent by OS socket. Triggering this timeout will cause the server to close it. By default it's set to 15 seconds, expressed in milliseconds: 15000 + +## shaper + +*none | ShaperName* + +This option defines a shaper for the port (see section  +[Shapers](../../admin/configuration/basic.md#shapers)). + The default value is `none`. + +## shaper_rule + +*none | ShaperRule* + +This option defines a shaper rule for +[`ejabberd_service`](listen.md#ejabberd_service) (see +section [Shapers](../../admin/configuration/basic.md#shapers)). +The recommended value is `fast`. + +## starttls + +*true | false* + +This option specifies that STARTTLS encryption is available on +connections to the port. You should also set the +[`certfiles`](toplevel.md#certfiles) top-level option +or configure [ACME](../../admin/configuration/basic.md#acme). + +This option gets implicitly enabled when enabling +[`starttls_required`](#starttls_required) or [`tls_verify`](#tls_verify). + +## starttls_required + +*true | false* + +This option specifies that STARTTLS encryption is required on +connections to the port. No unencrypted connections will be allowed. +You should also set the +[`certfiles`](toplevel.md#certfiles) top-level option +or configure [ACME](../../admin/configuration/basic.md#acme). + +Enabling this option implicitly enables also the [`starttls`](#starttls) option. + +## tag + +*String* + +Allow specifying a tag in a `listen` section +and later use it to have a special +[`api_permissions`](toplevel.md#api_permissions) +just for it. + +For example: + + listen: + - + port: 4000 + module: ejabberd_http + tag: "magic_listener" + + api_permissions: + "magic_access": + from: + - tag: "magic_listener" + who: all + what: "*" + +The default value is the empty string: `""`. + +## timeout + +*Integer* + +Timeout of the connections, expressed in milliseconds. Default: 5000 + +## tls + +*true | false* + +This option specifies that traffic on the port will be encrypted + using SSL immediately after connecting. This was the traditional + encryption method in the early Jabber software, commonly on port + 5223 for client-to-server communications. But this method is + nowadays deprecated and not recommended. The preferable encryption + method is STARTTLS on port 5222, as defined + [`RFC 6120: XMPP Core`](https://xmpp.org/rfcs/rfc6120.html#tls), + which can be enabled in `ejabberd` with the option + [`starttls`](#starttls). + +If this option is set, you should also set the + [`certfiles`](toplevel.md#certfiles) top-level + option or configure [ACME](../../admin/configuration/basic.md#acme). + +The option `tls` can also be used in + [`ejabberd_http`](listen.md#ejabberd_http) + to support HTTPS. + +Enabling this option implicitly disables the [`starttls`](#starttls) option. + +## tls_compression + +*true | false* + +Whether to enable or disable TLS compression. The default value is + `false`. + +Please note: if this option is set in +[`ejabberd_c2s`](listen.md#ejabberd_c2s) +or [`ejabberd_s2s_in`](listen.md#ejabberd_s2s-in) +and the corresponding top-level option is also set +([`c2s_tls_compression`](toplevel.md#c2s-tls-compression), +[`s2s_tls_compression`](toplevel.md#s2s-tls-compression)), +then the top-level option is used, not this one. + +## tls_verify + +*false | true* + +This option specifies whether to verify the certificate or not when TLS is enabled. + +The default value is `false`, which means no checks are performed. + +The certificate will be checked against trusted CA roots, either defined at the operation system level or defined in the + listener [`cafile`](#cafile). If trusted, it will accept the jid that is embedded in the certificate in the + `subjectAltName` field of that certificate. + +Enabling this option implicitly enables also the [`starttls`](#starttls) option. + +## use_proxy_protocol + +*true | false* + +Is this listener accessed by proxy service that is using + proxy protocol for supplying real IP addresses to ejabberd server. You can read about this protocol + in [Proxy protocol specification](https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt). + The default value of this option is`false`. + +## zlib + +*true | false* + +This option specifies that Zlib stream compression (as defined in + [`XEP-0138`](https://xmpp.org/extensions/xep-0138.html)) is available + on connections to the port. diff --git a/content/archive/23_04/listen.md b/content/archive/23.01/listen.md similarity index 78% rename from content/archive/23_04/listen.md rename to content/archive/23.01/listen.md index d4fee349..78e02ebe 100644 --- a/content/archive/23_04/listen.md +++ b/content/archive/23.01/listen.md @@ -1,11 +1,8 @@ --- -title: Listen Modules -toc: true -menu: Listen Modules -order: 50 +search: + exclude: true --- - # Listen Option The **listen option** defines for which ports, addresses and network @@ -73,37 +70,37 @@ are: Handles c2s connections. Options: -[access](/archive/23_04/listen-options/#access), -[cafile](/archive/23_04/listen-options/#cafile), -[ciphers](/archive/23_04/listen-options/#ciphers), -[dhfile](/archive/23_04/listen-options/#dhfile), -[max_fsm_queue](/archive/23_04/listen-options/#max-fsm-queue), -[max_stanza_size](/archive/23_04/listen-options/#max-stanza-size), -[protocol_options](/archive/23_04/listen-options/#protocol-options), -[send_timeout](/archive/23_04/listen-options/#send-timeout), -[shaper](/archive/23_04/listen-options/#shaper), -[starttls](/archive/23_04/listen-options/#starttls), -[starttls_required](/archive/23_04/listen-options/#starttls-required), -[tls](/archive/23_04/listen-options/#tls), -[tls_compression](/archive/23_04/listen-options/#tls-compression), -[tls_verify](/archive/23_04/listen-options/#tls-verify), -[zlib](/archive/23_04/listen-options/#zlib). +[access](listen-options.md#access), +[cafile](listen-options.md#cafile), +[ciphers](listen-options.md#ciphers), +[dhfile](listen-options.md#dhfile), +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_stanza_size](listen-options.md#max_stanza_size), +[protocol_options](listen-options.md#protocol_options), +[send_timeout](listen-options.md#send_timeout), +[shaper](listen-options.md#shaper), +[starttls](listen-options.md#starttls), +[starttls_required](listen-options.md#starttls_required), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls_compression), +[tls_verify](listen-options.md#tls_verify), +[zlib](listen-options.md#zlib). ## ejabberd_s2s_in Handles incoming s2s connections. Options: -[cafile](/archive/23_04/listen-options/#cafile), -[ciphers](/archive/23_04/listen-options/#ciphers), -[dhfile](/archive/23_04/listen-options/#dhfile), -[max_fsm_queue](/archive/23_04/listen-options/#max-fsm-queue), -[max_stanza_size](/archive/23_04/listen-options/#max-stanza-size), -[protocol_options](/archive/23_04/listen-options/#protocol-options), -[send_timeout](/archive/23_04/listen-options/#send-timeout), -[shaper](/archive/23_04/listen-options/#shaper), -[tls](/archive/23_04/listen-options/#tls), -[tls_compression](/archive/23_04/listen-options/#tls-compression). +[cafile](listen-options.md#cafile), +[ciphers](listen-options.md#ciphers), +[dhfile](listen-options.md#dhfile), +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_stanza_size](listen-options.md#max_stanza_size), +[protocol_options](listen-options.md#protocol_options), +[send_timeout](listen-options.md#send_timeout), +[shaper](listen-options.md#shaper), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls_compression). ## ejabberd_service @@ -113,23 +110,23 @@ Interacts with an ([`XEP-0114`](https://xmpp.org/extensions/xep-0114.html)). Options: -[access](/archive/23_04/listen-options/#access), -[cafile](/archive/23_04/listen-options/#cafile), -[certfile](/archive/23_04/listen-options/#certfile), -[check_from](/archive/23_04/listen-options/#check-from), -[ciphers](/archive/23_04/listen-options/#ciphers), -[dhfile](/archive/23_04/listen-options/#dhfile), -[global_routes](/archive/23_04/listen-options/#global-routes), -[hosts](/archive/23_04/listen-options/#hosts), -[max_fsm_queue](/archive/23_04/listen-options/#max-fsm-queue), -[max_stanza_size](/archive/23_04/listen-options/#max-stanza-size), -[password](/archive/23_04/listen-options/#password), -[protocol_options](/archive/23_04/listen-options/#protocol-options), -[send_timeout](/archive/23_04/listen-options/#send-timeout), -[shaper](/archive/23_04/listen-options/#shaper), -[shaper_rule](/archive/23_04/listen-options/#shaper-rule), -[tls](/archive/23_04/listen-options/#tls), -[tls_compression](/archive/23_04/listen-options/#tls-compression). +[access](listen-options.md#access), +[cafile](listen-options.md#cafile), +[certfile](listen-options.md#certfile), +[check_from](listen-options.md#check_from), +[ciphers](listen-options.md#ciphers), +[dhfile](listen-options.md#dhfile), +[global_routes](listen-options.md#global_routes), +[hosts](listen-options.md#hosts), +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_stanza_size](listen-options.md#max_stanza_size), +[password](listen-options.md#password), +[protocol_options](listen-options.md#protocol_options), +[send_timeout](listen-options.md#send_timeout), +[shaper](listen-options.md#shaper), +[shaper_rule](listen-options.md#shaper_rule), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls_compression). ## ejabberd_sip @@ -137,13 +134,13 @@ Handles SIP requests as defined in [`RFC 3261`](https://tools.ietf.org/html/rfc3261). For details please check the -[ejabberd_sip](/archive/23_04/listen/#ejabberd-sip-1) -and [mod_sip](/archive/23_04/modules/#mod-sip) sections. +[ejabberd_sip](listen.md#ejabberd_sip_1) +and [mod_sip](modules.md#mod_sip) sections. General listener options: -[certfile](/archive/23_04/listen-options/#certfile), -[send_timeout](/archive/23_04/listen-options/#send-timeout), -[tls](/archive/23_04/listen-options/#tls). +[certfile](listen-options.md#certfile), +[send_timeout](listen-options.md#send_timeout), +[tls](listen-options.md#tls). ## ejabberd_stun @@ -152,7 +149,7 @@ Handles STUN/TURN requests as defined in [`RFC 5766`](https://tools.ietf.org/html/rfc5766). For the specific module options, please check the -[ejabberd_stun](/archive/23_04/listen/#ejabberd-stun-1) section: +[ejabberd_stun](listen.md#ejabberd_stun_1) section: `auth_realm`, `auth_type`, `server_name`, @@ -166,57 +163,57 @@ For the specific module options, please check the `use_turn`. General listener options: -[certfile](/archive/23_04/listen-options/#certfile), -[send_timeout](/archive/23_04/listen-options/#send-timeout), -[shaper](/archive/23_04/listen-options/#shaper), -[tls](/archive/23_04/listen-options/#tls), +[certfile](listen-options.md#certfile), +[send_timeout](listen-options.md#send_timeout), +[shaper](listen-options.md#shaper), +[tls](listen-options.md#tls), ## ejabberd_http Handles incoming HTTP connections. With the proper request handlers configured, this serves HTTP services like -[ACME](/admin/configuration/basic/#acme), -[API](/archive/23_04/modules/#mod-http-api), -[BOSH](/archive/23_04/modules/#mod-bosh), -[CAPTCHA](/admin/configuration/basic/#captcha), -[Fileserver](/archive/23_04/modules/#mod-http-fileserver), -[OAuth](/developer/ejabberd-api/oauth/), -[RegisterWeb](/archive/23_04/modules/#mod-register-web), -[Upload](/archive/23_04/modules/#mod-http-upload), -[WebAdmin](/admin/guide/managing/#web-admin), -[WebSocket](/archive/23_04/listen/#ejabberd-http-ws), -[XMP-RPC](/archive/23_04/listen/#ejabberd-xmlrpc). +[ACME](../../admin/configuration/basic.md#acme), +[API](modules.md#mod_http_api), +[BOSH](modules.md#mod_bosh), +[CAPTCHA](../../admin/configuration/basic.md#captcha), +[Fileserver](modules.md#mod_http_fileserver), +[OAuth](../../developer/ejabberd-api/oauth.md), +[RegisterWeb](modules.md#mod_register_web), +[Upload](modules.md#mod_http_upload), +[WebAdmin](../../admin/guide/managing.md#web_admin), +[WebSocket](listen.md#ejabberd_http_ws), +[XMP-RPC](listen.md#ejabberd_xmlrpc). Options: -[cafile](/archive/23_04/listen-options/#cafile), -[ciphers](/archive/23_04/listen-options/#ciphers), -[custom_headers](/archive/23_04/listen-options/#custom-headers), -[default_host](/archive/23_04/listen-options/#default-host), -[dhfile](/archive/23_04/listen-options/#dhfile), -[protocol_options](/archive/23_04/listen-options/#protocol-options), -[request_handlers](/archive/23_04/listen-options/#request-handlers), -[send_timeout](/archive/23_04/listen-options/#send-timeout), -[tag](/archive/23_04/listen-options/#tag), -[tls](/archive/23_04/listen-options/#tls), -[tls_compression](/archive/23_04/listen-options/#tls-compression), -and the [trusted_proxies](/archive/23_04/toplevel/#trusted-proxies) top-level option. +[cafile](listen-options.md#cafile), +[ciphers](listen-options.md#ciphers), +[custom_headers](listen-options.md#custom_headers), +[default_host](listen-options.md#default_host), +[dhfile](listen-options.md#dhfile), +[protocol_options](listen-options.md#protocol_options), +[request_handlers](listen-options.md#request_handlers), +[send_timeout](listen-options.md#send_timeout), +[tag](listen-options.md#tag), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls_compression), +and the [trusted_proxies](toplevel.md#trusted_proxies) top-level option. ## mod_mqtt Support for MQTT requires configuring `mod_mqtt` both in the -[listen](/archive/23_04/toplevel/#listen) and the -[modules](/archive/23_04/toplevel/#modules) sections. -Check the [mod_mqtt module](/archive/23_04/modules/#mod-mqtt) options, -and the [MQTT Support](/admin/guide/mqtt/) section. +[listen](toplevel.md#listen) and the +[modules](toplevel.md#modules) sections. +Check the [mod_mqtt module](modules.md#mod_mqtt) options, +and the [MQTT Support](../../admin/guide/mqtt/index.md) section. Listen options: -[backlog](/archive/23_04/listen-options/#backlog), -[max_fsm_queue](/archive/23_04/listen-options/#max-fsm-queue), -[max_payload_size](/archive/23_04/listen-options/#max-payload-size), -[send_timeout](/archive/23_04/listen-options/#send-timeout), -[tls](/archive/23_04/listen-options/#tls), -[tls_verify](/archive/23_04/listen-options/#tls-verify). +[backlog](listen-options.md#backlog), +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_payload_size](listen-options.md#max_payload_size), +[send_timeout](listen-options.md#send_timeout), +[tls](listen-options.md#tls), +[tls_verify](listen-options.md#tls_verify). @@ -339,14 +336,14 @@ And you should also add these in the case if TURN is enabled: ## SIP Configuration `ejabberd` has built-in SIP support. To activate this feature, -add the [`ejabberd_sip`](#ejabberd-sip) listen module, enable -[`mod_sip`](/archive/23_04/modules/#mod-sip) module +add the [`ejabberd_sip`](#ejabberd_sip) listen module, enable +[`mod_sip`](modules.md#mod_sip) module for the desired virtual host, and configure DNS properly. To add a listener you should configure `ejabberd_sip` listening module as described in [Listen](#listen-option) section. -If option [`tls`](/archive/23_04/listen-options/#tls) is specified, -option [`certfile`](/archive/23_04/listen-options/#certfile) +If option [`tls`](listen-options.md#tls) is specified, +option [`certfile`](listen-options.md#certfile) must be specified as well, otherwise incoming TLS connections would fail. @@ -426,9 +423,9 @@ section of an `ejabberd_http` listener: This module can be configured using those top-level options: -- [websocket\_origin](/archive/23_04/toplevel/#websocket-origin) -- [websocket\_ping\_interval](/archive/23_04/toplevel/#websocket-ping-interval) -- [websocket\_timeout](/archive/23_04/toplevel/#websocket-timeout) +- [websocket\_origin](toplevel.md#websocket_origin) +- [websocket\_ping\_interval](toplevel.md#websocket_ping_interval) +- [websocket\_timeout](toplevel.md#websocket_timeout) ## WebSocket Discovery @@ -439,7 +436,7 @@ You may want to provide a `host-meta` file so clients can easily discover WebSocket service for your XMPP domain (see [XEP-0156](https://xmpp.org/extensions/xep-0156.html#http)). One easy way to provide that file is using -[`mod_host_meta`](/archive/23_04/modules/#mod-host-meta). +[`mod_host_meta`](modules.md#mod_host_meta). ## Testing WebSocket @@ -453,13 +450,13 @@ There is an example configuration for WebSocket and Converse.js in the # ejabberd_xmlrpc Handles XML-RPC requests to execute -[ejabberd commands](/admin/guide/managing/#ejabberd-commands). +[ejabberd commands](../../admin/guide/managing.md#ejabberd_commands). It is configured as a request handler in -[ejabberd_http](/archive/23_04/listen/#ejabberd-http). +[ejabberd_http](listen.md#ejabberd_http). By default there is no restriction to who can execute what commands, so it is strongly recommended that you configure restrictions using -[API Permissions](/developer/ejabberd-api/permissions/). +[API Permissions](../../developer/ejabberd-api/permissions.md). This is the minimum configuration required to enable the feature: @@ -514,11 +511,11 @@ With that configuration, it is possible to execute two specific commands using print calling('registered_users', {'host':'localhost'}) It's possible to use OAuth for authentication instead of plain password, see -[OAuth Support](/developer/ejabberd-api/oauth/). +[OAuth Support](../../developer/ejabberd-api/oauth.md). In ejabberd 20.03 and older, it was possible to configure `ejabberd_xmlrpc` as a listener, see the old document for reference and example configuration: -[Listening Module](/admin/configuration/old/#listening-module). +[Listening Module](../old.md#listening_module). Just for reference, there's also the old [`ejabberd_xmlrpc documentation`](https://ejabberd.im/ejabberd_xmlrpc). @@ -545,7 +542,7 @@ For example, the following simple configuration defines: service. - Port 5281 listens for HTTP requests, using HTTPS to serve HTTP-Bind - (BOSH) and the Web Admin as explained in [Managing: Web Admin](/admin/guide/managing/#web-admin). The + (BOSH) and the Web Admin as explained in [Managing: Web Admin](../../admin/guide/managing.md#web_admin). The socket only listens connections to the IP address 127.0.0.1. @@ -619,7 +616,7 @@ In this example, the following configuration defines that: - Port 5280 is serving the Web Admin and the HTTP-Bind (BOSH) service in all the IPv4 addresses. Note that it is also possible to serve them - on different ports. The second example in section [Managing: Web Admin](/admin/guide/managing/#web-admin) shows + on different ports. The second example in section [Managing: Web Admin](../../admin/guide/managing.md#web_admin) shows how exactly this can be done. A request handler to serve MQTT over WebSocket is also defined. - All users except for the administrators have a traffic of limit diff --git a/content/archive/23_01/modules.md b/content/archive/23.01/modules.md similarity index 87% rename from content/archive/23_01/modules.md rename to content/archive/23.01/modules.md index 7d514474..5a5327c4 100644 --- a/content/archive/23_01/modules.md +++ b/content/archive/23.01/modules.md @@ -1,10 +1,9 @@ --- -title: Modules Options -toc: true -menu: Modules Opts -order: 95 +search: + exclude: true --- +# Modules Options mod\_adhoc ---------- @@ -83,9 +82,9 @@ mod\_admin\_update\_sql This module can be used to update existing SQL database from the default to the new schema. Check the section [Default and New -Schemas](/admin/configuration/database/#default-and-new-schemas) for details. +Schemas](../../admin/configuration/database.md#default_and_new_schemas) for details. Please note that only PostgreSQL is supported. When the module is loaded -use [update_sql](/archive/23_01/admin-api/#update-sql) API. +use [update_sql](admin-api.md#update_sql) API. The module has no options. @@ -102,7 +101,7 @@ it may broadcast a lot of messages. This module should be disabled for instances of ejabberd with hundreds of thousands users. The Ad-hoc Commands are listed in the Server Discovery. For this feature -to work, [mod_adhoc](/archive/23_01/modules/#mod-adhoc) must be enabled. +to work, [mod_adhoc](modules.md#mod_adhoc) must be enabled. The specific JIDs where messages can be sent are listed below. The first JID in each entry will apply only to the specified virtual host @@ -114,7 +113,7 @@ hosts in ejabberd: connected to several resources, only the resource with the highest priority will receive the message. If the registered user is not connected, the message will be stored offline in assumption that - offline storage (see [mod_offline](/archive/23_01/modules/#mod-offline)) is enabled. + offline storage (see [mod_offline](modules.md#mod_offline)) is enabled. - example.org/announce/online (example.org/announce/all-hosts/online):: The message is sent to all @@ -143,23 +142,23 @@ the message of the day. The default value is *none* (i.e. nobody is able to send such messages). - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/23_01/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/23_01/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/23_01/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/23_01/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/23_01/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_avatar ----------- @@ -172,8 +171,8 @@ Conversion](https://xmpp.org/extensions/xep-0398.html). Also, the module supports conversion between avatar image formats on the fly. -The module depends on [mod_vcard](/archive/23_01/modules/#mod-vcard), [mod_vcard_xupdate](/archive/23_01/modules/#mod-vcard-xupdate) and -[mod_pubsub](/archive/23_01/modules/#mod-pubsub). +The module depends on [mod_vcard](modules.md#mod_vcard), [mod_vcard_xupdate](modules.md#mod_vcard_xupdate) and +[mod_pubsub](modules.md#mod_pubsub). __Available options:__ @@ -261,15 +260,15 @@ while having to get through an HTTP proxy. __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/23_01/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/23_01/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/23_01/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **json**: *true | false* @@ -293,15 +292,15 @@ authentication. Basically, it creates a new session with anonymous authentication. The default value is *false*. - **queue\_type**: *ram | file* -Same as top-level [queue_type](/archive/23_01/toplevel/#queue-type) option, but applied to this module +Same as top-level [queue_type](toplevel.md#queue_type) option, but applied to this module only. - **ram\_db\_type**: *mnesia | sql | redis* -Same as top-level [default_ram_db](/archive/23_01/toplevel/#default-ram-db) option, but applied to this module +Same as top-level [default_ram_db](toplevel.md#default_ram_db) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/23_01/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. __**Example**:__ @@ -324,28 +323,28 @@ mod\_caps This module implements [XEP-0115: Entity Capabilities](https://xmpp.org/extensions/xep-0115.html). The main purpose of the module is to provide PEP functionality (see -[mod_pubsub](/archive/23_01/modules/#mod-pubsub)). +[mod_pubsub](modules.md#mod_pubsub)). __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/23_01/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/23_01/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/23_01/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/23_01/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/23_01/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_carboncopy --------------- @@ -392,7 +391,7 @@ mod\_configure The module provides server configuration functionality via [XEP-0050: Ad-Hoc Commands](https://xmpp.org/extensions/xep-0050.html). This module -requires [mod_adhoc](/archive/23_01/modules/#mod-adhoc) to be loaded. +requires [mod_adhoc](modules.md#mod_adhoc) to be loaded. The module has no options. @@ -402,15 +401,15 @@ mod\_conversejs This module serves a simple page for the [Converse](https://conversejs.org/) XMPP web browser client. -This module is available since ejabberd 21.12. Several options were -improved in ejabberd 22.05. +This module is available since ejabberd 21.12. Several options were +improved in ejabberd 22.05. To use this module, in addition to adding it to the *modules* section, you must also enable it in *listen* → *ejabberd\_http* → -[request\_handlers](/archive/23_01/listen-options/#request-handlers). +[request\_handlers](listen-options.md#request_handlers). Make sure either *mod\_bosh* or *ejabberd\_http\_ws* -[request\_handlers](/archive/23_01/listen-options/#request-handlers) are +[request\_handlers](listen-options.md#request_handlers) are enabled. When *conversejs\_css* and *conversejs\_script* are *auto*, by default @@ -428,7 +427,7 @@ value is *auto*. Converse CSS URL. The keyword *@HOST@* is replaced with the hostname. The default value is *auto*. -
added in 22.05
+
added in 22.05
- **conversejs\_options**: *{Name: Value}* Specify additional options to be passed to Converse. See [Converse @@ -436,7 +435,7 @@ configuration](https://conversejs.org/docs/html/configuration.html). Only boolean, integer and string values are supported; lists are not supported. -
added in 22.05
+
added in 22.05
- **conversejs\_resources**: *Path* Local path to the Converse files. If not set, the public Converse client @@ -520,7 +519,7 @@ external PEP service. > **Note** > -> This module is complementary to [mod_privilege](/archive/23_01/modules/#mod-privilege) but can also be used +> This module is complementary to [mod_privilege](modules.md#mod_privilege) but can also be used > separately. __Available options:__ @@ -670,11 +669,11 @@ This module serves small *host-meta* files as described in [XEP-0156: Discovering Alternative XMPP Connection Methods](https://xmpp.org/extensions/xep-0156.html). -This module is available since ejabberd 22.05. +This module is available since ejabberd 22.05. To use this module, in addition to adding it to the *modules* section, you must also enable it in *listen* → *ejabberd\_http* → -[request\_handlers](/archive/23_01/listen-options/#request-handlers). +[request\_handlers](listen-options.md#request_handlers). Notice it only works if ejabberd\_http has tls enabled. @@ -718,7 +717,7 @@ JSON data. To use this module, in addition to adding it to the *modules* section, you must also enable it in *listen* → *ejabberd\_http* → -[request\_handlers](/archive/23_01/listen-options/#request-handlers). +[request\_handlers](listen-options.md#request_handlers). To use a specific API version N, when defining the URL path in the request\_handlers, add a *vN*. For example: */api/v2: mod\_http\_api* @@ -840,7 +839,7 @@ URL from which that file can later be downloaded. In order to use this module, it must be enabled in *listen* → *ejabberd\_http* → -[request\_handlers](/archive/23_01/listen-options/#request-handlers). +[request\_handlers](listen-options.md#request_handlers). __Available options:__ @@ -886,7 +885,7 @@ option is *undefined*, this option is set to the same value as *put\_url*. The keyword @HOST@ is replaced with the virtual host name. NOTE: if GET requests are handled by *mod\_http\_upload*, the *get\_url* must match the *put\_url*. Setting it to a different value only makes -sense if an external web server or [mod_http_fileserver](/archive/23_01/modules/#mod-http-fileserver) is used to +sense if an external web server or [mod_http_fileserver](modules.md#mod_http_fileserver) is used to serve the uploaded files. - **host** @@ -1063,23 +1062,23 @@ of the ejabberd server. __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/23_01/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/23_01/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/23_01/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/23_01/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/23_01/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_legacy\_auth ----------------- @@ -1109,7 +1108,7 @@ The default value is *all*. - **assume\_mam\_usage**: *true | false* This option determines how ejabberd’s stream management code (see -[mod_stream_mgmt](/archive/23_01/modules/#mod-stream-mgmt)) handles unacknowledged messages when the connection +[mod_stream_mgmt](modules.md#mod_stream_mgmt)) handles unacknowledged messages when the connection is lost. Usually, such messages are either bounced or resent. However, neither is done for messages that were stored in the user’s MAM archive if this option is set to *true*. In this case, ejabberd assumes those @@ -1117,19 +1116,19 @@ messages will be retrieved from the archive. The default value is *false*. - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/23_01/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/23_01/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/23_01/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **clear\_archive\_on\_room\_destroy**: *true | false* -Whether to destroy message archive of a room (see [mod_muc](/archive/23_01/modules/#mod-muc)) when it +Whether to destroy message archive of a room (see [mod_muc](modules.md#mod_muc)) when it gets destroyed. The default value is *true*. - **compress\_xml**: *true | false* @@ -1138,7 +1137,7 @@ custom compression algorithm. This feature works only with SQL backends. The default value is *false*. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/23_01/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **default**: *always | never | roster* @@ -1155,7 +1154,7 @@ option. Once the server received a request, that user’s messages are archived as usual. The default value is *false*. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/23_01/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. - **user\_mucsub\_from\_muc\_archive**: *true | false* When this option is disabled, for each individual subscriber a separa @@ -1206,16 +1205,16 @@ mod\_mix This module is an experimental implementation of [XEP-0369: Mediated Information eXchange (MIX)](https://xmpp.org/extensions/xep-0369.html). -MIX support was added in ejabberd 16.03 as an experimental feature, -updated in 19.02, and is not yet ready to use in production. It’s +MIX support was added in ejabberd 16.03 as an experimental feature, +updated in 19.02, and is not yet ready to use in production. It’s asserted that the MIX protocol is going to replace the MUC protocol in -the future (see [mod_muc](/archive/23_01/modules/#mod-muc)). +the future (see [mod_muc](modules.md#mod_muc)). To learn more about how to use that feature, you can refer to our tutorial: [Getting started with XEP-0369: Mediated Information eXchange (MIX) v0.1](https://docs.ejabberd.im/tutorials/mix-010/). -The module depends on [mod_mam](/archive/23_01/modules/#mod-mam). +The module depends on [mod_mam](modules.md#mod_mam). __Available options:__ @@ -1224,7 +1223,7 @@ An access rule to control MIX channels creations. The default value is *all*. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/23_01/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **host** @@ -1258,23 +1257,23 @@ channels (either on your server or on any remote servers). __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/23_01/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/23_01/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/23_01/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/23_01/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/23_01/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_mqtt --------- @@ -1295,19 +1294,19 @@ Access rules to restrict access to topics for subscribers. By default there are no restrictions. - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/23_01/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/23_01/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/23_01/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/23_01/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **match\_retained\_limit**: *pos\_integer() | infinity* @@ -1326,11 +1325,11 @@ The maximum topic depth, i.e. the number of slashes (*/*) in the topic. The default value is *8*. - **queue\_type**: *ram | file* -Same as top-level [queue_type](/archive/23_01/toplevel/#queue-type) option, but applied to this module +Same as top-level [queue_type](toplevel.md#queue_type) option, but applied to this module only. - **ram\_db\_type**: *mnesia* -Same as top-level [default_ram_db](/archive/23_01/toplevel/#default-ram-db) option, but applied to this module +Same as top-level [default_ram_db](toplevel.md#default_ram_db) option, but applied to this module only. - **session\_expiry**: *timeout()* @@ -1339,7 +1338,7 @@ When *0* is set, the session gets destroyed when the underlying client connection is closed. The default value is *5* minutes. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/23_01/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_mqtt\_bridge ----------------- @@ -1348,7 +1347,7 @@ This module adds ability to synchronize local MQTT topics with data on remote servers It can update topics on remote servers when local user updates local topic, or can subscribe for changes on remote server, and update local copy when remote data is updated. It is available since -ejabberd 23.01. +ejabberd 23.01. __Available options:__ @@ -1435,17 +1434,17 @@ Multi-User Chat service. The default is *all* for backward compatibility, which means that any user is allowed to register any free nick. -
added in 22.05
+
added in 22.05
- **cleanup\_affiliations\_on\_start**: *true | false* Remove affiliations for non-existing local users on startup. The default value is *false*. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/23_01/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. -
improved in 22.05
+
improved in 22.05
- **default\_room\_options**: *Options* This option allows to define the desired default room options. Note that @@ -1522,7 +1521,7 @@ using an XMPP client with MUC capability. The *Options* are: - **logging**: *true | false* The public messages are logged using - [mod_muc_log](/archive/23_01/modules/#mod-muc-log). The default value is *false*. + [mod_muc_log](modules.md#mod_muc_log). The default value is *false*. - **mam**: *true | false* Enable message archiving. Implies mod\_mam @@ -1619,14 +1618,14 @@ is not specified, the only Jabber ID will be the hostname of the virtual host with the prefix "conference.". The keyword *@HOST@* is replaced with the real virtual host name. -
added in 21.01
+
added in 21.01
- **max\_captcha\_whitelist**: *Number* This option defines the maximum number of characters that Captcha Whitelist can have when configuring the room. The default value is *infinity*. -
added in 21.01
+
added in 21.01
- **max\_password**: *Number* This option defines the maximum number of characters that Password can @@ -1709,11 +1708,11 @@ rooms is high: this will improve server startup time and memory consumption. - **queue\_type**: *ram | file* -Same as top-level [queue_type](/archive/23_01/toplevel/#queue-type) option, but applied to this module +Same as top-level [queue_type](toplevel.md#queue_type) option, but applied to this module only. - **ram\_db\_type**: *mnesia | sql* -Same as top-level [default_ram_db](/archive/23_01/toplevel/#default-ram-db) option, but applied to this module +Same as top-level [default_ram_db](toplevel.md#default_ram_db) option, but applied to this module only. - **regexp\_room\_id**: *string()* @@ -1764,11 +1763,11 @@ This module provides commands to administer local MUC services and their MUC rooms. It also provides simple WebAdmin pages to view the existing rooms. -This module depends on [mod_muc](/archive/23_01/modules/#mod-muc). +This module depends on [mod_muc](modules.md#mod_muc). __Available options:__ -
added in 22.05
+
added in 22.05
- **subscribe\_room\_many\_max\_users**: *Number* How many users can be subscribed to a room at once using the @@ -1810,7 +1809,7 @@ Features: - A custom link can be added on top of each page. -The module depends on [mod_muc](/archive/23_01/modules/#mod-muc). +The module depends on [mod_muc](modules.md#mod_muc). __Available options:__ @@ -2006,15 +2005,15 @@ on large MucSub services. The default value is *false*, meaning the optimisation is enabled. - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/23_01/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/23_01/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/23_01/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **store\_empty\_body**: *true | false | unless\_chat\_state* @@ -2029,7 +2028,7 @@ Whether or not to store groupchat messages. The default value is *false*. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/23_01/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. - **use\_mam\_for\_storage**: *true | false* This is an experimental option. Enabling this option, *mod\_offline* @@ -2100,7 +2099,7 @@ or checking availability. The default value is *false*. What to do when a client does not answer to a server ping request in less than period defined in *ping\_ack\_timeout* option: *kill* means destroying the underlying connection, *none* means to do nothing. NOTE: -when [mod_stream_mgmt](/archive/23_01/modules/#mod-stream-mgmt) is loaded and stream management is enabled by a +when [mod_stream_mgmt](modules.md#mod_stream_mgmt) is loaded and stream management is enabled by a client, killing the client connection doesn’t mean killing the client session - the session will be kept alive in order to give the client a chance to resume it. The default value is *none*. @@ -2154,28 +2153,28 @@ Lists](https://xmpp.org/extensions/xep-0016.html). > Nowadays modern XMPP clients rely on [XEP-0191: Blocking > Command](https://xmpp.org/extensions/xep-0191.html) which is > implemented by *mod\_blocking* module. However, you still need -> *mod\_privacy* loaded in order for [mod_blocking](/archive/23_01/modules/#mod-blocking) to work. +> *mod\_privacy* loaded in order for [mod_blocking](modules.md#mod_blocking) to work. __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/23_01/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/23_01/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/23_01/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/23_01/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/23_01/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_private ------------ @@ -2193,23 +2192,23 @@ Bookmarks](https://xmpp.org/extensions/xep-0048.html)). __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/23_01/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/23_01/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/23_01/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/23_01/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/23_01/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_privilege -------------- @@ -2239,7 +2238,7 @@ Check the section about listening ports for more information. > **Note** > -> This module is complementary to [mod_delegation](/archive/23_01/modules/#mod-delegation), but can also be +> This module is complementary to [mod_delegation](modules.md#mod_delegation), but can also be > used separately. __Available options:__ @@ -2352,7 +2351,7 @@ A port number to listen for incoming connections. The default value is *7777*. - **ram\_db\_type**: *mnesia | redis | sql* -Same as top-level [default_ram_db](/archive/23_01/toplevel/#default-ram-db) option, but applied to this module +Same as top-level [default_ram_db](toplevel.md#default_ram_db) option, but applied to this module only. - **recbuf**: *Size* @@ -2437,7 +2436,7 @@ Publish-Subscribe](https://xmpp.org/extensions/xep-0060.html). The functionality in *mod\_pubsub* can be extended using plugins. The plugin that implements PEP ([XEP-0163: Personal Eventing via Pubsub](https://xmpp.org/extensions/xep-0163.html)) is enabled in the -default ejabberd configuration file, and it requires [mod_caps](/archive/23_01/modules/#mod-caps). +default ejabberd configuration file, and it requires [mod_caps](modules.md#mod_caps). __Available options:__ @@ -2447,7 +2446,7 @@ using *acl* and *access*. By default any account in the local ejabberd server is allowed to create pubsub nodes. The default value is: *all*. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/23_01/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **default\_node\_config**: *List of Key:Value* @@ -2488,7 +2487,7 @@ systems with not so many nodes, caching last items speeds up pubsub and allows to raise user connection rate. The cost is memory usage, as every item is stored in memory. -
added in 21.12
+
added in 21.12
- **max\_item\_expire\_node**: *timeout() | infinity* Specify the maximum item epiry time. Default value is: *infinity*. @@ -2632,19 +2631,19 @@ platform-dependant backend services such as FCM or APNS. __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/23_01/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/23_01/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/23_01/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/23_01/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **include\_body**: *true | false | Text* @@ -2662,19 +2661,19 @@ notifications generated for incoming messages with a body. The default value is *false*. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/23_01/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_push\_keepalive -------------------- This module tries to keep the stream management session (see -[mod_stream_mgmt](/archive/23_01/modules/#mod-stream-mgmt)) of a disconnected mobile client alive if the client +[mod_stream_mgmt](modules.md#mod_stream_mgmt)) of a disconnected mobile client alive if the client enabled push notifications for that session. However, the normal session resumption timeout is restored once a push notification is issued, so the session will be closed if the client doesn’t respond to push notifications. -The module depends on [mod_push](/archive/23_01/modules/#mod-push). +The module depends on [mod_push](modules.md#mod_push). __Available options:__ @@ -2682,7 +2681,7 @@ __Available options:__ This option specifies the period of time until the session of a disconnected push client times out. This timeout is only in effect as long as no push notification is issued. Once that happened, the -resumption timeout configured for [mod_stream_mgmt](/archive/23_01/modules/#mod-stream-mgmt) is restored. The +resumption timeout configured for [mod_stream_mgmt](modules.md#mod_stream_mgmt) is restored. The default value is *72* hours. - **wake\_on\_start**: *true | false* @@ -2710,7 +2709,7 @@ enables end users to use an XMPP client to: - Delete an existing account on the server. -This module reads also the top-level [registration_timeout](/archive/23_01/toplevel/#registration-timeout) option +This module reads also the top-level [registration_timeout](toplevel.md#registration_timeout) option defined globally for the server, so please check that option documentation too. @@ -2731,7 +2730,7 @@ uncontrolled massive accounts creation by rogue users. Specify rules to restrict access for user unregistration. By default any user is able to unregister their account. -
added in 21.12
+
added in 21.12
- **allow\_modules**: *all | \[Module, ...\]* List of modules that can register accounts, or *all*. The default value @@ -2739,7 +2738,7 @@ is *all*, which is equivalent to something like *\[mod\_register, mod\_register\_web\]*. - **captcha\_protected**: *true | false* -Protect registrations with [CAPTCHA](/admin/configuration/basic/#captcha). The +Protect registrations with [CAPTCHA](../../admin/configuration/basic.md#captcha). The default is *false*. - **ip\_access**: *AccessName* @@ -2778,9 +2777,9 @@ This module provides a web page where users can: - Unregister an existing account on the server. -This module supports [CAPTCHA](/admin/configuration/basic/#captcha) to register a +This module supports [CAPTCHA](../../admin/configuration/basic.md#captcha) to register a new account. To enable this feature, configure the top-level -[captcha_cmd](/archive/23_01/toplevel/#captcha-cmd) and top-level [captcha_url](/archive/23_01/toplevel/#captcha-url) options. +[captcha_cmd](toplevel.md#captcha_cmd) and top-level [captcha_url](toplevel.md#captcha_url) options. As an example usage, the users of the host *localhost* can visit the page: *https://localhost:5280/register/* It is important to include the @@ -2788,8 +2787,8 @@ last / character in the URL, otherwise the subpages URL will be incorrect. This module is enabled in *listen* → *ejabberd\_http* → -[request\_handlers](/archive/23_01/listen-options/#request-handlers), no need -to enable in *modules*. The module depends on [mod_register](/archive/23_01/modules/#mod-register) where all +[request\_handlers](listen-options.md#request_handlers), no need +to enable in *modules*. The module depends on [mod_register](modules.md#mod_register) where all the configuration is performed. The module has no options. @@ -2824,19 +2823,19 @@ add/remove/modify contacts or send presence subscriptions. The default value is *all*, i.e. no restrictions. - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/23_01/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/23_01/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/23_01/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/23_01/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **store\_current\_id**: *true | false* @@ -2846,11 +2845,11 @@ calculated on the fly each time. Enabling this option reduces the load for both ejabberd and the database. This option does not affect the client in any way. This option is only useful if option *versioning* is set to *true*. The default value is *false*. IMPORTANT: if you use -[mod_shared_roster](/archive/23_01/modules/#mod-shared-roster) or [mod_shared_roster_ldap](/archive/23_01/modules/#mod-shared-roster-ldap), you must set the +[mod_shared_roster](modules.md#mod_shared_roster) or [mod_shared_roster_ldap](modules.md#mod_shared_roster_ldap), you must set the value of the option to *false*. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/23_01/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. - **versioning**: *true | false* Enables/disables Roster Versioning. The default value is *false*. @@ -2960,29 +2959,29 @@ parameters: group’s members. A group of other vhost can be identified with *groupid@vhost*. -This module depends on [mod_roster](/archive/23_01/modules/#mod-roster). If not enabled, roster queries +This module depends on [mod_roster](modules.md#mod_roster). If not enabled, roster queries will return 503 errors. __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/23_01/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/23_01/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/23_01/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/23_01/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/23_01/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. __Examples:__ @@ -3061,25 +3060,25 @@ password in multiple places. - Connection parameters: The module also accepts the connection parameters, all of which default to the top-level parameter of the same name, if unspecified. See [LDAP - Connection](/admin/configuration/ldap/#ldap-connection) section for more + Connection](../../admin/configuration/ldap.md#ldap_connection) section for more information about them. -Check also the [Configuration examples](/admin/configuration/ldap/#ldap-examples) +Check also the [Configuration examples](../../admin/configuration/ldap.md#ldap_examples) section to get details about retrieving the roster, and configuration examples including Flat DIT and Deep DIT. __Available options:__ - **cache\_life\_time** -Same as top-level [cache_life_time](/archive/23_01/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed** -Same as top-level [cache_missed](/archive/23_01/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size** -Same as top-level [cache_size](/archive/23_01/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **ldap\_auth\_check**: *true | false* @@ -3088,24 +3087,24 @@ subsystem) for existence of each user in the shared LDAP roster. Set to *false* if you want to disable the check. Default value is *true*. - **ldap\_backups** -Same as top-level [ldap_backups](/archive/23_01/toplevel/#ldap-backups) option, but applied to this module +Same as top-level [ldap_backups](toplevel.md#ldap_backups) option, but applied to this module only. - **ldap\_base** -Same as top-level [ldap_base](/archive/23_01/toplevel/#ldap-base) option, but applied to this module only. +Same as top-level [ldap_base](toplevel.md#ldap_base) option, but applied to this module only. - **ldap\_deref\_aliases** -Same as top-level [ldap_deref_aliases](/archive/23_01/toplevel/#ldap-deref-aliases) option, but applied to this +Same as top-level [ldap_deref_aliases](toplevel.md#ldap_deref_aliases) option, but applied to this module only. - **ldap\_encrypt** -Same as top-level [ldap_encrypt](/archive/23_01/toplevel/#ldap-encrypt) option, but applied to this module +Same as top-level [ldap_encrypt](toplevel.md#ldap_encrypt) option, but applied to this module only. - **ldap\_filter** Additional filter which is AND-ed together with "User Filter" and "Group Filter". For more information check the LDAP -[Filters](/admin/configuration/ldap/#filters) section. +[Filters](../../admin/configuration/ldap.md#filters) section. - **ldap\_gfilter** "Group Filter", used when retrieving human-readable name (a.k.a. @@ -3142,14 +3141,14 @@ section Filters. - **ldap\_memberattr\_format\_re** A regex for extracting user ID from the value of the attribute named by *ldap\_memberattr*. Check the LDAP [Control -Parameters](/admin/configuration/ldap/#control-parameters) section. +Parameters](../../admin/configuration/ldap.md#control_parameters) section. - **ldap\_password** -Same as top-level [ldap_password](/archive/23_01/toplevel/#ldap-password) option, but applied to this module +Same as top-level [ldap_password](toplevel.md#ldap_password) option, but applied to this module only. - **ldap\_port** -Same as top-level [ldap_port](/archive/23_01/toplevel/#ldap-port) option, but applied to this module only. +Same as top-level [ldap_port](toplevel.md#ldap_port) option, but applied to this module only. - **ldap\_rfilter** So called "Roster Filter". Used to find names of all "shared roster" @@ -3158,37 +3157,37 @@ defaults to the top-level parameter of the same name. You must specify it in some place in the configuration, there is no default. - **ldap\_rootdn** -Same as top-level [ldap_rootdn](/archive/23_01/toplevel/#ldap-rootdn) option, but applied to this module +Same as top-level [ldap_rootdn](toplevel.md#ldap_rootdn) option, but applied to this module only. - **ldap\_servers** -Same as top-level [ldap_servers](/archive/23_01/toplevel/#ldap-servers) option, but applied to this module +Same as top-level [ldap_servers](toplevel.md#ldap_servers) option, but applied to this module only. - **ldap\_tls\_cacertfile** -Same as top-level [ldap_tls_cacertfile](/archive/23_01/toplevel/#ldap-tls-cacertfile) option, but applied to this +Same as top-level [ldap_tls_cacertfile](toplevel.md#ldap_tls_cacertfile) option, but applied to this module only. - **ldap\_tls\_certfile** -Same as top-level [ldap_tls_certfile](/archive/23_01/toplevel/#ldap-tls-certfile) option, but applied to this +Same as top-level [ldap_tls_certfile](toplevel.md#ldap_tls_certfile) option, but applied to this module only. - **ldap\_tls\_depth** -Same as top-level [ldap_tls_depth](/archive/23_01/toplevel/#ldap-tls-depth) option, but applied to this module +Same as top-level [ldap_tls_depth](toplevel.md#ldap_tls_depth) option, but applied to this module only. - **ldap\_tls\_verify** -Same as top-level [ldap_tls_verify](/archive/23_01/toplevel/#ldap-tls-verify) option, but applied to this module +Same as top-level [ldap_tls_verify](toplevel.md#ldap_tls_verify) option, but applied to this module only. - **ldap\_ufilter** "User Filter", used for retrieving the human-readable name of roster entries (usually full names of people in the roster). See also the parameters *ldap\_userdesc* and *ldap\_useruid*. For more information -check the LDAP [Filters](/admin/configuration/ldap/#filters) section. +check the LDAP [Filters](../../admin/configuration/ldap.md#filters) section. - **ldap\_uids** -Same as top-level [ldap_uids](/archive/23_01/toplevel/#ldap-uids) option, but applied to this module only. +Same as top-level [ldap_uids](toplevel.md#ldap_uids) option, but applied to this module only. - **ldap\_userdesc** The name of the attribute which holds the human-readable user name. @@ -3206,7 +3205,7 @@ retrieved from the *ldap\_memberattr* attribute of a group object. Retrieved from results of the "User Filter". Defaults to *cn*. - **use\_cache** -Same as top-level [use_cache](/archive/23_01/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_sic -------- @@ -3233,7 +3232,7 @@ virtual host. > > It is not enough to just load this module. You should also configure > listeners and DNS records properly. For details see the section about -> the [ejabberd\_sip](/archive/23_01/listen/#ejabberd-sip) listen module in +> the [ejabberd\_sip](listen.md#ejabberd_sip) listen module in > the ejabberd Documentation. __Available options:__ @@ -3335,11 +3334,11 @@ A time to wait for stanza acknowledgements. Setting it to *infinity* effectively disables the timeout. The default value is *1* minute. - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/23_01/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. The default value is *48 hours*. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/23_01/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **max\_ack\_queue**: *Size* @@ -3362,7 +3361,7 @@ default *resume\_timeout*. By default, it is set to the same value as the *resume\_timeout* option. - **queue\_type**: *ram | file* -Same as top-level [queue_type](/archive/23_01/toplevel/#queue-type) option, but applied to this module +Same as top-level [queue_type](toplevel.md#queue_type) option, but applied to this module only. - **resend\_on\_timeout**: *true | false | if\_offline* @@ -3391,7 +3390,7 @@ mod\_stun\_disco This module allows XMPP clients to discover STUN/TURN services and to obtain temporary credentials for using them as per [XEP-0215: External Service Discovery](https://xmpp.org/extensions/xep-0215.html). This -module is included in ejabberd since version 20.04. +module is included in ejabberd since version 20.04. __Available options:__ @@ -3528,19 +3527,19 @@ fields should return all users who added some information to their vCard. The default value is *false*. - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/23_01/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/23_01/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/23_01/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql | ldap* -Same as top-level [default_db](/archive/23_01/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **host** @@ -3570,7 +3569,7 @@ ignored and the Jabber User Directory service will not appear in the Service Discovery item list. The default value is *false*. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/23_01/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. - **vcard**: *vCard* A custom vCard of the server that will be displayed by some XMPP clients @@ -3600,33 +3599,33 @@ will be translated to: __Available options for *ldap* backend:__ - **ldap\_backups** -Same as top-level [ldap_backups](/archive/23_01/toplevel/#ldap-backups) option, but applied to this module +Same as top-level [ldap_backups](toplevel.md#ldap_backups) option, but applied to this module only. - **ldap\_base** -Same as top-level [ldap_base](/archive/23_01/toplevel/#ldap-base) option, but applied to this module only. +Same as top-level [ldap_base](toplevel.md#ldap_base) option, but applied to this module only. - **ldap\_deref\_aliases** -Same as top-level [ldap_deref_aliases](/archive/23_01/toplevel/#ldap-deref-aliases) option, but applied to this +Same as top-level [ldap_deref_aliases](toplevel.md#ldap_deref_aliases) option, but applied to this module only. - **ldap\_encrypt** -Same as top-level [ldap_encrypt](/archive/23_01/toplevel/#ldap-encrypt) option, but applied to this module +Same as top-level [ldap_encrypt](toplevel.md#ldap_encrypt) option, but applied to this module only. - **ldap\_filter** -Same as top-level [ldap_filter](/archive/23_01/toplevel/#ldap-filter) option, but applied to this module +Same as top-level [ldap_filter](toplevel.md#ldap_filter) option, but applied to this module only. - **ldap\_password** -Same as top-level [ldap_password](/archive/23_01/toplevel/#ldap-password) option, but applied to this module +Same as top-level [ldap_password](toplevel.md#ldap_password) option, but applied to this module only. - **ldap\_port** -Same as top-level [ldap_port](/archive/23_01/toplevel/#ldap-port) option, but applied to this module only. +Same as top-level [ldap_port](toplevel.md#ldap_port) option, but applied to this module only. - **ldap\_rootdn** -Same as top-level [ldap_rootdn](/archive/23_01/toplevel/#ldap-rootdn) option, but applied to this module +Same as top-level [ldap_rootdn](toplevel.md#ldap_rootdn) option, but applied to this module only. - **ldap\_search\_fields**: *{Name: Attribute, ...}* @@ -3673,27 +3672,27 @@ The default is: "Organization Unit": ORGUNIT - **ldap\_servers** -Same as top-level [ldap_servers](/archive/23_01/toplevel/#ldap-servers) option, but applied to this module +Same as top-level [ldap_servers](toplevel.md#ldap_servers) option, but applied to this module only. - **ldap\_tls\_cacertfile** -Same as top-level [ldap_tls_cacertfile](/archive/23_01/toplevel/#ldap-tls-cacertfile) option, but applied to this +Same as top-level [ldap_tls_cacertfile](toplevel.md#ldap_tls_cacertfile) option, but applied to this module only. - **ldap\_tls\_certfile** -Same as top-level [ldap_tls_certfile](/archive/23_01/toplevel/#ldap-tls-certfile) option, but applied to this +Same as top-level [ldap_tls_certfile](toplevel.md#ldap_tls_certfile) option, but applied to this module only. - **ldap\_tls\_depth** -Same as top-level [ldap_tls_depth](/archive/23_01/toplevel/#ldap-tls-depth) option, but applied to this module +Same as top-level [ldap_tls_depth](toplevel.md#ldap_tls_depth) option, but applied to this module only. - **ldap\_tls\_verify** -Same as top-level [ldap_tls_verify](/archive/23_01/toplevel/#ldap-tls-verify) option, but applied to this module +Same as top-level [ldap_tls_verify](toplevel.md#ldap_tls_verify) option, but applied to this module only. - **ldap\_uids** -Same as top-level [ldap_uids](/archive/23_01/toplevel/#ldap-uids) option, but applied to this module only. +Same as top-level [ldap_uids](toplevel.md#ldap_uids) option, but applied to this module only. - **ldap\_vcard\_map**: *{Name: {Pattern, LDAPattributes}, ...}* With this option you can set the table that maps LDAP attributes to @@ -3759,31 +3758,31 @@ that change frequently their presence. However, the overhead is significantly reduced by the use of caching, so you probably don’t want to set *use\_cache* to *false*. -The module depends on [mod_vcard](/archive/23_01/modules/#mod-vcard). +The module depends on [mod_vcard](modules.md#mod_vcard). > **Note** > > Nowadays [XEP-0153](https://xmpp.org/extensions/xep-0153.html) is used > mostly as "read-only", i.e. modern clients don’t publish their avatars > inside vCards. Thus in the majority of cases the module is only used -> along with [mod_avatar](/archive/23_01/modules/#mod-avatar) for providing backward compatibility. +> along with [mod_avatar](modules.md#mod_avatar) for providing backward compatibility. __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/23_01/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/23_01/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/23_01/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/23_01/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_version ------------ diff --git a/content/archive/23_01/toplevel.md b/content/archive/23.01/toplevel.md similarity index 82% rename from content/archive/23_01/toplevel.md rename to content/archive/23.01/toplevel.md index 804f97d7..2f0469ee 100644 --- a/content/archive/23_01/toplevel.md +++ b/content/archive/23.01/toplevel.md @@ -1,21 +1,20 @@ --- -title: Top-Level Options -toc: true -menu: Top-Level Opts -order: 80 +search: + exclude: true --- +# Top-Level Options ## access\_rules *{AccessName: {allow|deny: ACLRules|ACLName}}* -This option defines [Access Rules](/admin/configuration/basic/#access-rules). Each +This option defines [Access Rules](../../admin/configuration/basic.md#access_rules). Each access rule is assigned a name that can be referenced from other parts of the configuration file (mostly from *access* options of ejabberd modules). Each rule definition may contain arbitrary number of *allow* or *deny* sections, and each section may contain any number of ACL rules -(see [acl](/archive/23_01/toplevel/#acl) option). There are no access rules defined by default. +(see [acl](toplevel.md#acl) option). There are no access rules defined by default. **Example**: @@ -52,7 +51,7 @@ address). Every set of rules has name *ACLName*: it can be any string except *all* or *none* (those are predefined names for the rules that match all or nothing respectively). The name *ACLName* can be referenced from other parts of the configuration file, for example in -[access_rules](/archive/23_01/toplevel/#access-rules) option. The rules of *ACLName* are represented by +[access_rules](toplevel.md#access_rules) option. The rules of *ACLName* are represented by mapping *{ACLType: ACLValue}*. These can be one of the following: - **ip**: *Network* @@ -120,7 +119,7 @@ mapping *{ACLType: ACLValue}*. These can be one of the following: *Options* -[ACME](/admin/configuration/basic/#acme) configuration, to automatically obtain SSL +[ACME](../../admin/configuration/basic.md#acme) configuration, to automatically obtain SSL certificates for the domains served by ejabberd, which means that certificate requests and renewals are performed to some CA server (aka "ACME server") in a fully automated mode. The *Options* are: @@ -214,22 +213,22 @@ specific modules to certain virtual hosts. To accomplish that, *timeout()* -Same as [cache_life_time](/archive/23_01/toplevel/#cache-life-time), but applied to authentication cache only. -If not set, the value from [cache_life_time](/archive/23_01/toplevel/#cache-life-time) will be used. +Same as [cache_life_time](toplevel.md#cache_life_time), but applied to authentication cache only. +If not set, the value from [cache_life_time](toplevel.md#cache_life_time) will be used. ## auth\_cache\_missed *true | false* -Same as [cache_missed](/archive/23_01/toplevel/#cache-missed), but applied to authentication cache only. If -not set, the value from [cache_missed](/archive/23_01/toplevel/#cache-missed) will be used. +Same as [cache_missed](toplevel.md#cache_missed), but applied to authentication cache only. If +not set, the value from [cache_missed](toplevel.md#cache_missed) will be used. ## auth\_cache\_size *pos\_integer() | infinity* -Same as [cache_size](/archive/23_01/toplevel/#cache-size), but applied to authentication cache only. If not -set, the value from [cache_size](/archive/23_01/toplevel/#cache-size) will be used. +Same as [cache_size](toplevel.md#cache_size), but applied to authentication cache only. If not +set, the value from [cache_size](toplevel.md#cache_size) will be used. ## auth\_method @@ -248,7 +247,7 @@ be installed from the [ejabberd-contrib](https://github.com/processone/ejabberd-contrib) Git repository. Please refer to that module’s README file for details. -
improved in 20.01
+
improved in 20.01
## auth\_password\_format @@ -282,8 +281,8 @@ authenticate. The default value is *sha*. *true | false* -Same as [use_cache](/archive/23_01/toplevel/#use-cache), but applied to authentication cache only. If not -set, the value from [use_cache](/archive/23_01/toplevel/#use-cache) will be used. +Same as [use_cache](toplevel.md#use_cache), but applied to authentication cache only. If not +set, the value from [use_cache](toplevel.md#use_cache) will be used. ## c2s\_cafile @@ -294,11 +293,11 @@ format. All client certificates should be signed by one of these root CA certificates and should contain the corresponding JID(s) in *subjectAltName* field. There is no default value. -You can use [host\_config](/archive/23_01/toplevel/#host-config) to specify +You can use [host\_config](toplevel.md#host_config) to specify this option per-vhost. To set a specific file per listener, use the listener’s -[cafile](/archive/23_01/listen-options/#cafile) option. Please notice that +[cafile](listen-options.md#cafile) option. Please notice that *c2s\_cafile* overrides the listener’s *cafile* option. ## c2s\_ciphers @@ -357,7 +356,7 @@ Path to a file of CA root certificates. The default is to use system defined file if possible. For server connections, this *ca\_file* option is overridden by the -[s2s\_cafile](/archive/23_01/toplevel/#s2s-cafile) option. +[s2s\_cafile](toplevel.md#s2s-cafile) option. ## cache\_life\_time @@ -366,9 +365,9 @@ For server connections, this *ca\_file* option is overridden by the The time of a cached item to keep in cache. Once it’s expired, the corresponding item is erased from cache. The default value is *1 hour*. Several modules have a similar option; and some core ejabberd parts -support similar options too, see [auth_cache_life_time](/archive/23_01/toplevel/#auth-cache-life-time), -[oauth_cache_life_time](/archive/23_01/toplevel/#oauth-cache-life-time), [router_cache_life_time](/archive/23_01/toplevel/#router-cache-life-time), and -[sm_cache_life_time](/archive/23_01/toplevel/#sm-cache-life-time). +support similar options too, see [auth_cache_life_time](toplevel.md#auth_cache_life_time), +[oauth_cache_life_time](toplevel.md#oauth_cache_life_time), [router_cache_life_time](toplevel.md#router_cache_life_time), and +[sm_cache_life_time](toplevel.md#sm_cache_life_time). ## cache\_missed @@ -377,11 +376,11 @@ support similar options too, see [auth_cache_life_time](/archive/23_01/toplevel/ Whether or not to cache missed lookups. When there is an attempt to lookup for a value in a database and this value is not found and the option is set to *true*, this attempt will be cached and no attempts -will be performed until the cache expires (see [cache_life_time](/archive/23_01/toplevel/#cache-life-time)). +will be performed until the cache expires (see [cache_life_time](toplevel.md#cache_life_time)). Usually you don’t want to change it. Default is *true*. Several modules have a similar option; and some core ejabberd parts support similar -options too, see [auth_cache_missed](/archive/23_01/toplevel/#auth-cache-missed), [oauth_cache_missed](/archive/23_01/toplevel/#oauth-cache-missed), -[router_cache_missed](/archive/23_01/toplevel/#router-cache-missed), and [sm_cache_missed](/archive/23_01/toplevel/#sm-cache-missed). +options too, see [auth_cache_missed](toplevel.md#auth_cache_missed), [oauth_cache_missed](toplevel.md#oauth_cache_missed), +[router_cache_missed](toplevel.md#router_cache_missed), and [sm_cache_missed](toplevel.md#sm_cache_missed). ## cache\_size @@ -395,16 +394,16 @@ items are deleted, and the corresponding warning is logged. You should avoid frequent cache clearance, because this degrades performance. The default value is *1000*. Several modules have a similar option; and some core ejabberd parts support similar options too, see -[auth_cache_size](/archive/23_01/toplevel/#auth-cache-size), [oauth_cache_size](/archive/23_01/toplevel/#oauth-cache-size), [router_cache_size](/archive/23_01/toplevel/#router-cache-size), and -[sm_cache_size](/archive/23_01/toplevel/#sm-cache-size). +[auth_cache_size](toplevel.md#auth_cache_size), [oauth_cache_size](toplevel.md#oauth_cache_size), [router_cache_size](toplevel.md#router_cache_size), and +[sm_cache_size](toplevel.md#sm_cache_size). -
improved in 23.01
+
improved in 23.01
## captcha\_cmd *Path | ModuleName* -Full path to a script that generates [CAPTCHA](/admin/configuration/basic/#captcha) +Full path to a script that generates [CAPTCHA](../../admin/configuration/basic.md#captcha) images. @VERSION@ is replaced with ejabberd version number in XX.YY format. @SEMVER@ is replaced with ejabberd version number in semver format when compiled with Elixir’s mix, or XX.YY format otherwise. @@ -421,13 +420,13 @@ captcha scripts can be used like this: *String* -Deprecated. Use [captcha_url](/archive/23_01/toplevel/#captcha-url) instead. +Deprecated. Use [captcha_url](toplevel.md#captcha_url) instead. ## captcha\_limit *pos\_integer() | infinity* -Maximum number of [CAPTCHA](/admin/configuration/basic/#captcha) generated images +Maximum number of [CAPTCHA](../../admin/configuration/basic.md#captcha) generated images per minute for any given JID. The option is intended to protect the server from CAPTCHA DoS. The default value is *infinity*. @@ -435,7 +434,7 @@ server from CAPTCHA DoS. The default value is *infinity*. *URL* -An URL where [CAPTCHA](/admin/configuration/basic/#captcha) requests should be +An URL where [CAPTCHA](../../admin/configuration/basic.md#captcha) requests should be sent. NOTE: you need to configure *request\_handlers* for *ejabberd\_http* listener as well. There is no default value. @@ -710,7 +709,7 @@ attribute, the specified language is used. The default value is *"en"*. *\[Host, ...\]* A list of IP addresses or DNS names of LDAP backup servers. When no -servers listed in [ldap_servers](/archive/23_01/toplevel/#ldap-servers) option are reachable, ejabberd will +servers listed in [ldap_servers](toplevel.md#ldap_servers) option are reachable, ejabberd will try to connect to these backup servers. The default is an empty list, i.e. no backup servers specified. WARNING: ejabberd doesn’t try to reconnect back to the main servers when they become operational again, @@ -745,7 +744,7 @@ variables are consecutively replaced by values from the attributes in *FilterAttrs* and "%D" is replaced by Distinguished Name from the result set. There is no default value, which means the result is not filtered. WARNING: Since this filter makes additional LDAP lookups, use it only as -the last resort: try to define all filter rules in [ldap_filter](/archive/23_01/toplevel/#ldap-filter) +the last resort: try to define all filter rules in [ldap_filter](toplevel.md#ldap_filter) option if possible. **Example**: @@ -852,9 +851,9 @@ JID. For example, "%.org". If the value is in the form of *\[Options, ...\]* The option for listeners configuration. See the [Listen -Modules](/archive/23_01/listen/) section for details. +Modules](./listen.md/) section for details. -
added in 22.10
+
added in 22.10
## log\_burst\_limit\_count @@ -863,7 +862,7 @@ Modules](/archive/23_01/listen/) section for details. The number of messages to accept in `log_burst_limit_window_time` period before starting to drop them. Default 500 -
added in 22.10
+
added in 22.10
## log\_burst\_limit\_window\_time @@ -871,7 +870,7 @@ before starting to drop them. Default 500 The time period to rate-limit log messages by. Defaults to 1 second. -
added in 23.01
+
added in 23.01
## log\_modules\_fully @@ -922,7 +921,7 @@ value is *10000*. *{Module: Options}* -The option for modules configuration. See [Modules](/archive/23_01/modules/) +The option for modules configuration. See [Modules](./modules.md/) section for details. ## negotiation\_timeout @@ -971,17 +970,17 @@ can create OAuth tokens, you can refer to an ejabberd access rule in the *timeout()* -Same as [cache_life_time](/archive/23_01/toplevel/#cache-life-time), but applied to OAuth cache only. If not -set, the value from [cache_life_time](/archive/23_01/toplevel/#cache-life-time) will be used. +Same as [cache_life_time](toplevel.md#cache_life_time), but applied to OAuth cache only. If not +set, the value from [cache_life_time](toplevel.md#cache_life_time) will be used. ## oauth\_cache\_missed *true | false* -Same as [cache_missed](/archive/23_01/toplevel/#cache-missed), but applied to OAuth cache only. If not set, -the value from [cache_missed](/archive/23_01/toplevel/#cache-missed) will be used. +Same as [cache_missed](toplevel.md#cache_missed), but applied to OAuth cache only. If not set, +the value from [cache_missed](toplevel.md#cache_missed) will be used. -
added in 21.01
+
added in 21.01
## oauth\_cache\_rest\_failure\_life\_time @@ -994,8 +993,8 @@ The time that a failure in OAuth ReST is cached. The default value is *pos\_integer() | infinity* -Same as [cache_size](/archive/23_01/toplevel/#cache-size), but applied to OAuth cache only. If not set, the -value from [cache_size](/archive/23_01/toplevel/#cache-size) will be used. +Same as [cache_size](toplevel.md#cache_size), but applied to OAuth cache only. If not set, the +value from [cache_size](toplevel.md#cache_size) will be used. ## oauth\_client\_id\_check @@ -1010,7 +1009,7 @@ value is *allow*. *mnesia | sql* Database backend to use for OAuth authentication. The default value is -picked from [default_db](/archive/23_01/toplevel/#default-db) option, or if it’s not set, *mnesia* will be +picked from [default_db](toplevel.md#default_db) option, or if it’s not set, *mnesia* will be used. ## oauth\_expire @@ -1025,15 +1024,15 @@ used and is removed from the database. The default is *4294967* seconds. *true | false* -Same as [use_cache](/archive/23_01/toplevel/#use-cache), but applied to OAuth cache only. If not set, the -value from [use_cache](/archive/23_01/toplevel/#use-cache) will be used. +Same as [use_cache](toplevel.md#use_cache), but applied to OAuth cache only. If not set, the +value from [use_cache](toplevel.md#use_cache) will be used. ## oom\_killer *true | false* Enable or disable OOM (out-of-memory) killer. When system memory raises -above the limit defined in [oom_watermark](/archive/23_01/toplevel/#oom-watermark) option, ejabberd triggers +above the limit defined in [oom_watermark](toplevel.md#oom_watermark) option, ejabberd triggers OOM killer to terminate most memory consuming Erlang processes. Note that in order to maintain functionality, ejabberd only attempts to kill transient processes, such as those managing client sessions, s2s or @@ -1045,7 +1044,7 @@ database connections. The default value is *true*. Trigger OOM killer when some of the running Erlang processes have messages queue above this *Size*. Note that such processes won’t be -killed if [oom_killer](/archive/23_01/toplevel/#oom-killer) option is set to *false* or if *oom\_watermark* +killed if [oom_killer](toplevel.md#oom_killer) option is set to *false* or if *oom\_watermark* is not reached yet. ## oom\_watermark @@ -1054,10 +1053,10 @@ is not reached yet. A percent of total system memory consumed at which OOM killer should be activated with some of the processes possibly be killed (see -[oom_killer](/archive/23_01/toplevel/#oom-killer) option). Later, when memory drops below this *Percent*, +[oom_killer](toplevel.md#oom_killer) option). Later, when memory drops below this *Percent*, OOM killer is deactivated. The default value is *80* percents. -
changed in 23.01
+
changed in 23.01
## outgoing\_s2s\_families @@ -1066,9 +1065,9 @@ OOM killer is deactivated. The default value is *80* percents. Specify which address families to try, in what order. The default is *\[ipv6, ipv4\]* which means it first tries connecting with IPv6, if that fails it tries using IPv4. This option is obsolete and irrelevant -when using ejabberd 23.01 and Erlang/OTP 22, or newer versions of them. +when using ejabberd 23.01 and Erlang/OTP 22, or newer versions of them. -
added in 20.12
+
added in 20.12
## outgoing\_s2s\_ipv4\_address @@ -1078,7 +1077,7 @@ Specify the IPv4 address that will be used when establishing an outgoing S2S IPv4 connection, for example "127.0.0.1". The default value is *undefined*. -
added in 20.12
+
added in 20.12
## outgoing\_s2s\_ipv6\_address @@ -1129,7 +1128,7 @@ default value is *false*. *Directory* -If [queue_type](/archive/23_01/toplevel/#queue-type) option is set to *file*, use this *Directory* to store +If [queue_type](toplevel.md#queue_type) option is set to *file*, use this *Directory* to store file queues. The default is to keep queues inside Mnesia directory. ## queue\_type @@ -1138,7 +1137,7 @@ file queues. The default is to keep queues inside Mnesia directory. Default type of queues in ejabberd. Modules may have its own value of the option. The value of *ram* means that queues will be kept in memory. -If value *file* is set, you may also specify directory in [queue_dir](/archive/23_01/toplevel/#queue-dir) +If value *file* is set, you may also specify directory in [queue_dir](toplevel.md#queue_dir) option where file queues will be placed. The default value is *ram*. ## redis\_connect\_timeout @@ -1180,8 +1179,8 @@ The port where the Redis server is accepting connections. The default is *ram | file* The type of request queue for the Redis server. See description of -[queue_type](/archive/23_01/toplevel/#queue-type) option for the explanation. The default value is the -value defined in [queue_type](/archive/23_01/toplevel/#queue-type) or *ram* if the latter is not set. +[queue_type](toplevel.md#queue_type) option for the explanation. The default value is the +value defined in [queue_type](toplevel.md#queue_type) or *ram* if the latter is not set. ## redis\_server @@ -1194,7 +1193,7 @@ A hostname or an IP address of the Redis server. The default is *timeout()* -This is a global option for module [mod_register](/archive/23_01/modules/#mod-register). It limits the +This is a global option for module [mod_register](modules.md#mod_register). It limits the frequency of registrations from a given IP or username. So, a user that tries to register a new account from the same IP address or JID during this time after their previous registration will receive an error with @@ -1217,37 +1216,37 @@ action performed is *closeold*. *timeout()* -Same as [cache_life_time](/archive/23_01/toplevel/#cache-life-time), but applied to routing table cache only. If -not set, the value from [cache_life_time](/archive/23_01/toplevel/#cache-life-time) will be used. +Same as [cache_life_time](toplevel.md#cache_life_time), but applied to routing table cache only. If +not set, the value from [cache_life_time](toplevel.md#cache_life_time) will be used. ## router\_cache\_missed *true | false* -Same as [cache_missed](/archive/23_01/toplevel/#cache-missed), but applied to routing table cache only. If -not set, the value from [cache_missed](/archive/23_01/toplevel/#cache-missed) will be used. +Same as [cache_missed](toplevel.md#cache_missed), but applied to routing table cache only. If +not set, the value from [cache_missed](toplevel.md#cache_missed) will be used. ## router\_cache\_size *pos\_integer() | infinity* -Same as [cache_size](/archive/23_01/toplevel/#cache-size), but applied to routing table cache only. If not -set, the value from [cache_size](/archive/23_01/toplevel/#cache-size) will be used. +Same as [cache_size](toplevel.md#cache_size), but applied to routing table cache only. If not +set, the value from [cache_size](toplevel.md#cache_size) will be used. ## router\_db\_type *mnesia | redis | sql* Database backend to use for routing information. The default value is -picked from [default_ram_db](/archive/23_01/toplevel/#default-ram-db) option, or if it’s not set, *mnesia* will +picked from [default_ram_db](toplevel.md#default_ram_db) option, or if it’s not set, *mnesia* will be used. ## router\_use\_cache *true | false* -Same as [use_cache](/archive/23_01/toplevel/#use-cache), but applied to routing table cache only. If not -set, the value from [use_cache](/archive/23_01/toplevel/#use-cache) will be used. +Same as [use_cache](toplevel.md#use_cache), but applied to routing table cache only. If not +set, the value from [use_cache](toplevel.md#use_cache) will be used. ## rpc\_timeout @@ -1261,7 +1260,7 @@ are used for internal needs only. The default value is *5* seconds. *Access* -This [Access Rule](/admin/configuration/basic/#access-rules) defines to what remote +This [Access Rule](../../admin/configuration/basic.md#access_rules) defines to what remote servers can s2s connections be established. The default value is *all*; no restrictions are applied, it is allowed to connect s2s to/from all remote servers. @@ -1272,9 +1271,9 @@ remote servers. A path to a file with CA root certificates that will be used to authenticate s2s connections. If not set, the value of -[ca\_file](/archive/23_01/toplevel/#ca-file) will be used. +[ca\_file](toplevel.md#ca_file) will be used. -You can use [host\_config](/archive/23_01/toplevel/#host-config) to specify +You can use [host\_config](toplevel.md#host_config) to specify this option per-vhost. ## s2s\_ciphers @@ -1342,9 +1341,9 @@ below: *ram | file* -The type of a queue for s2s packets. See description of [queue_type](/archive/23_01/toplevel/#queue-type) +The type of a queue for s2s packets. See description of [queue_type](toplevel.md#queue_type) option for the explanation. The default value is the value defined in -[queue_type](/archive/23_01/toplevel/#queue-type) or *ram* if the latter is not set. +[queue_type](toplevel.md#queue_type) or *ram* if the latter is not set. ## s2s\_timeout @@ -1385,7 +1384,7 @@ considered insecure. The option defines a set of shapers. Every shaper is assigned a name *ShaperName* that can be used in other parts of the configuration file, -such as [shaper_rules](/archive/23_01/toplevel/#shaper-rules) option. The shaper itself is defined by its +such as [shaper_rules](toplevel.md#shaper_rules) option. The shaper itself is defined by its *Rate*, where *Rate* stands for the maximum allowed incoming rate in **bytes** per second. When a connection exceeds this limit, ejabberd stops reading from the socket until the average rate is again below the @@ -1404,9 +1403,9 @@ speed to 1,000 bytes/sec and shaper *fast* limits the traffic speed to *{ShaperRuleName: {Number|ShaperName: ACLRule|ACLName}}* An entry allowing to declaring shaper to use for matching user/hosts. -Semantics is similar to [access_rules](/archive/23_01/toplevel/#access-rules) option, the only difference is +Semantics is similar to [access_rules](toplevel.md#access_rules) option, the only difference is that instead using *allow* or *deny*, a name of a shaper (defined in -[shaper](/archive/23_01/toplevel/#shaper) option) or a positive number should be used. +[shaper](toplevel.md#shaper) option) or a positive number should be used. **Example**: @@ -1426,37 +1425,37 @@ that instead using *allow* or *deny*, a name of a shaper (defined in *timeout()* -Same as [cache_life_time](/archive/23_01/toplevel/#cache-life-time), but applied to client sessions table cache -only. If not set, the value from [cache_life_time](/archive/23_01/toplevel/#cache-life-time) will be used. +Same as [cache_life_time](toplevel.md#cache_life_time), but applied to client sessions table cache +only. If not set, the value from [cache_life_time](toplevel.md#cache_life_time) will be used. ## sm\_cache\_missed *true | false* -Same as [cache_missed](/archive/23_01/toplevel/#cache-missed), but applied to client sessions table cache -only. If not set, the value from [cache_missed](/archive/23_01/toplevel/#cache-missed) will be used. +Same as [cache_missed](toplevel.md#cache_missed), but applied to client sessions table cache +only. If not set, the value from [cache_missed](toplevel.md#cache_missed) will be used. ## sm\_cache\_size *pos\_integer() | infinity* -Same as [cache_size](/archive/23_01/toplevel/#cache-size), but applied to client sessions table cache only. -If not set, the value from [cache_size](/archive/23_01/toplevel/#cache-size) will be used. +Same as [cache_size](toplevel.md#cache_size), but applied to client sessions table cache only. +If not set, the value from [cache_size](toplevel.md#cache_size) will be used. ## sm\_db\_type *mnesia | redis | sql* Database backend to use for client sessions information. The default -value is picked from [default_ram_db](/archive/23_01/toplevel/#default-ram-db) option, or if it’s not set, +value is picked from [default_ram_db](toplevel.md#default_ram_db) option, or if it’s not set, *mnesia* will be used. ## sm\_use\_cache *true | false* -Same as [use_cache](/archive/23_01/toplevel/#use-cache), but applied to client sessions table cache only. -If not set, the value from [use_cache](/archive/23_01/toplevel/#use-cache) will be used. +Same as [use_cache](toplevel.md#use_cache), but applied to client sessions table cache only. +If not set, the value from [use_cache](toplevel.md#use_cache) will be used. ## sql\_connect\_timeout @@ -1480,14 +1479,14 @@ An interval to make a dummy SQL request to keep alive the connections to the database. There is no default value, so no keepalive requests are made. -
added in 20.12
+
added in 20.12
## sql\_odbc\_driver *Path* Path to the ODBC driver to use to connect to a Microsoft SQL Server -database. This option is only valid if the [sql_type](/archive/23_01/toplevel/#sql-type) option is set to +database. This option is only valid if the [sql_type](toplevel.md#sql_type) option is set to *mssql*. The default value is: *libtdsodbc.so* ## sql\_password @@ -1513,7 +1512,7 @@ The port where the SQL server is accepting connections. The default is *3306* for MySQL, *5432* for PostgreSQL and *1433* for MS SQL. The option has no effect for SQLite. -
added in 20.01
+
added in 20.01
## sql\_prepared\_statements @@ -1534,8 +1533,8 @@ seconds. *ram | file* The type of a request queue for the SQL server. See description of -[queue_type](/archive/23_01/toplevel/#queue-type) option for the explanation. The default value is the -value defined in [queue_type](/archive/23_01/toplevel/#queue-type) or *ram* if the latter is not set. +[queue_type](toplevel.md#queue_type) option for the explanation. The default value is the +value defined in [queue_type](toplevel.md#queue_type) or *ram* if the latter is not set. ## sql\_server @@ -1544,7 +1543,7 @@ value defined in [queue_type](/archive/23_01/toplevel/#queue-type) or *ram* if t A hostname or an IP address of the SQL server. The default value is *localhost*. -
improved in 20.03
+
improved in 20.03
## sql\_ssl @@ -1559,7 +1558,7 @@ is only available for MySQL and PostgreSQL. The default value is *Path* A path to a file with CA root certificates that will be used to verify -SQL connections. Implies [sql_ssl](/archive/23_01/toplevel/#sql-ssl) and [sql_ssl_verify](/archive/23_01/toplevel/#sql-ssl-verify) options are +SQL connections. Implies [sql_ssl](toplevel.md#sql_ssl) and [sql_ssl_verify](toplevel.md#sql_ssl_verify) options are set to *true*. There is no default which means certificate verification is disabled. @@ -1568,7 +1567,7 @@ is disabled. *Path* A path to a certificate file that will be used for SSL connections to -the SQL server. Implies [sql_ssl](/archive/23_01/toplevel/#sql-ssl) option is set to *true*. There is no +the SQL server. Implies [sql_ssl](toplevel.md#sql_ssl) option is set to *true*. There is no default which means ejabberd won’t provide a client certificate to the SQL server. @@ -1577,7 +1576,7 @@ SQL server. *true | false* Whether to verify SSL connection to the SQL server against CA root -certificates defined in [sql_ssl_cafile](/archive/23_01/toplevel/#sql-ssl-cafile) option. Implies [sql_ssl](/archive/23_01/toplevel/#sql-ssl) +certificates defined in [sql_ssl_cafile](toplevel.md#sql_ssl_cafile) option. Implies [sql_ssl](toplevel.md#sql_ssl) option is set to *true*. The default value is *false*. ## sql\_start\_interval @@ -1619,8 +1618,8 @@ trusted for security rules in ejabberd. Enable or disable cache. The default is *true*. Several modules have a similar option; and some core ejabberd parts support similar options -too, see [auth_use_cache](/archive/23_01/toplevel/#auth-use-cache), [oauth_use_cache](/archive/23_01/toplevel/#oauth-use-cache), [router_use_cache](/archive/23_01/toplevel/#router-use-cache), -and [sm_use_cache](/archive/23_01/toplevel/#sm-use-cache). +too, see [auth_use_cache](toplevel.md#auth_use_cache), [oauth_use_cache](toplevel.md#oauth_use_cache), [router_use_cache](toplevel.md#router_use_cache), +and [sm_use_cache](toplevel.md#sm_use_cache). ## validate\_stream @@ -1638,7 +1637,7 @@ value is *false*. *string()* The option can be used to set custom ejabberd version, that will be used -by different parts of ejabberd, for example by [mod_version](/archive/23_01/modules/#mod-version) module. +by different parts of ejabberd, for example by [mod_version](modules.md#mod_version) module. The default value is obtained at compile time from the underlying version control system. diff --git a/content/admin/upgrade/from_22.10_to_23.01.md b/content/archive/23.01/upgrade.md similarity index 83% rename from content/admin/upgrade/from_22.10_to_23.01.md rename to content/archive/23.01/upgrade.md index b6ead8fc..c65b07f8 100644 --- a/content/admin/upgrade/from_22.10_to_23.01.md +++ b/content/archive/23.01/upgrade.md @@ -1,12 +1,9 @@ ---- -title: Upgrade to ejabberd 23.01 -toc: true ---- +# Upgrade to ejabberd 23.01 There is a new module, new hooks, new options, and some option accepts additional values, but there are no breaking changes in SQL schemas, configuration, or commands API. -Please check the ejabberd [23.01](/archive/23_01/) release announcement for details +Please check the ejabberd [23.01](../../archive/23.01/index.md) release announcement for details about the improvements. ## Changes in option `outgoing_s2s_families` diff --git a/content/archive/23_04/admin-api.md b/content/archive/23.04/admin-api.md similarity index 83% rename from content/archive/23_04/admin-api.md rename to content/archive/23.04/admin-api.md index fe7e2a52..9bbb69ab 100644 --- a/content/archive/23_04/admin-api.md +++ b/content/archive/23.04/admin-api.md @@ -1,12 +1,11 @@ --- -title: Administration API reference -toc: true -menu: API Reference -order: 1 -// Autogenerated with 'ejabberdctl gen_markdown_doc_for_commands' +search: + exclude: true --- -
added in 22.05
+# API Reference + +
added in 22.05
## abort_delete_old_mam_messages @@ -22,10 +21,10 @@ __Result:__ - *status* :: string : Status text __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](../../developer/ejabberd-api/admin-tags.md#purge) __Module:__ -[mod_mam](/archive/23_04/modules/#mod-mam) +[mod_mam](modules.md#mod_mam) __Examples:__ @@ -41,7 +40,7 @@ __Examples:__ ~~~ -
added in 22.05
+
added in 22.05
## abort_delete_old_messages @@ -57,7 +56,7 @@ __Result:__ - *status* :: string : Status text __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](../../developer/ejabberd-api/admin-tags.md#purge) __Examples:__ @@ -98,10 +97,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[roster](/developer/ejabberd-api/admin-tags/#roster) +[roster](../../developer/ejabberd-api/admin-tags.md#roster) __Module:__ -[mod_admin_extra](/archive/23_04/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -139,7 +138,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -173,10 +172,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) __Module:__ -[mod_admin_extra](/archive/23_04/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -211,10 +210,10 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[private](/developer/ejabberd-api/admin-tags/#private) +[private](../../developer/ejabberd-api/admin-tags.md#private) __Module:__ -[mod_private](/archive/23_04/modules/#mod-private) +[mod_private](modules.md#mod_private) __Examples:__ @@ -249,10 +248,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) __Module:__ -[mod_admin_extra](/archive/23_04/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -289,10 +288,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/23_04/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -328,10 +327,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) __Module:__ -[mod_admin_extra](/archive/23_04/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -366,10 +365,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) __Module:__ -[mod_admin_extra](/archive/23_04/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -409,10 +408,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) __Module:__ -[mod_admin_extra](/archive/23_04/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -446,7 +445,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](../../developer/ejabberd-api/admin-tags.md#server) __Examples:__ @@ -478,10 +477,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[erlang](/developer/ejabberd-api/admin-tags/#erlang) +[erlang](../../developer/ejabberd-api/admin-tags.md#erlang) __Module:__ -[mod_admin_extra](/archive/23_04/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -512,7 +511,7 @@ __Result:__ - *connected_users* :: [sessions::string] : List of users sessions __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Examples:__ @@ -546,10 +545,10 @@ __Result:__ - *connected_users_info* :: [{jid::string, connection::string, ip::string, port::integer, priority::integer, node::string, uptime::integer, status::string, resource::string, statustext::string}] __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/23_04/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -593,7 +592,7 @@ __Result:__ - *num_sessions* :: integer __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) [statistics](/developer/ejabberd-api/admin-tags/#statistics) +[session](../../developer/ejabberd-api/admin-tags.md#session) [statistics](../../developer/ejabberd-api/admin-tags.md#statistics) __Examples:__ @@ -625,10 +624,10 @@ __Result:__ - *connected_users_vhost* :: [sessions::string] __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/23_04/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -663,7 +662,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[sql](/developer/ejabberd-api/admin-tags/#sql) +[sql](../../developer/ejabberd-api/admin-tags.md#sql) __Examples:__ @@ -696,7 +695,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[config](/developer/ejabberd-api/admin-tags/#config) +[config](../../developer/ejabberd-api/admin-tags.md#config) __Examples:__ @@ -731,10 +730,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/23_04/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -774,10 +773,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/23_04/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -824,10 +823,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/23_04/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -858,7 +857,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](../../developer/ejabberd-api/admin-tags.md#purge) __Examples:__ @@ -874,7 +873,7 @@ __Examples:__ ~~~ -
added in 21.12
+
added in 21.12
## delete_expired_pubsub_items @@ -889,10 +888,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](../../developer/ejabberd-api/admin-tags.md#purge) __Module:__ -[mod_pubsub](/archive/23_04/modules/#mod-pubsub) +[mod_pubsub](modules.md#mod_pubsub) __Examples:__ @@ -924,7 +923,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -960,10 +959,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](../../developer/ejabberd-api/admin-tags.md#purge) __Module:__ -[mod_mam](/archive/23_04/modules/#mod-mam) +[mod_mam](modules.md#mod_mam) __Examples:__ @@ -980,7 +979,7 @@ __Examples:__ ~~~ -
added in 22.05
+
added in 22.05
## delete_old_mam_messages_batch @@ -1003,10 +1002,10 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](../../developer/ejabberd-api/admin-tags.md#purge) __Module:__ -[mod_mam](/archive/23_04/modules/#mod-mam) +[mod_mam](modules.md#mod_mam) __Examples:__ @@ -1026,7 +1025,7 @@ __Examples:__ ~~~ -
added in 22.05
+
added in 22.05
## delete_old_mam_messages_status @@ -1042,10 +1041,10 @@ __Result:__ - *status* :: string : Status test __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](../../developer/ejabberd-api/admin-tags.md#purge) __Module:__ -[mod_mam](/archive/23_04/modules/#mod-mam) +[mod_mam](modules.md#mod_mam) __Examples:__ @@ -1077,7 +1076,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](../../developer/ejabberd-api/admin-tags.md#purge) __Examples:__ @@ -1093,7 +1092,7 @@ __Examples:__ ~~~ -
added in 22.05
+
added in 22.05
## delete_old_messages_batch @@ -1112,7 +1111,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](../../developer/ejabberd-api/admin-tags.md#purge) __Examples:__ @@ -1131,7 +1130,7 @@ __Examples:__ ~~~ -
added in 22.05
+
added in 22.05
## delete_old_messages_status @@ -1147,7 +1146,7 @@ __Result:__ - *status* :: string : Status test __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](../../developer/ejabberd-api/admin-tags.md#purge) __Examples:__ @@ -1163,7 +1162,7 @@ __Examples:__ ~~~ -
added in 21.12
+
added in 21.12
## delete_old_pubsub_items @@ -1179,10 +1178,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](../../developer/ejabberd-api/admin-tags.md#purge) __Module:__ -[mod_pubsub](/archive/23_04/modules/#mod-pubsub) +[mod_pubsub](modules.md#mod_pubsub) __Examples:__ @@ -1214,10 +1213,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](../../developer/ejabberd-api/admin-tags.md#purge) __Module:__ -[mod_push](/archive/23_04/modules/#mod-push) +[mod_push](modules.md#mod_push) __Examples:__ @@ -1257,10 +1256,10 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) [purge](/developer/ejabberd-api/admin-tags/#purge) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) [purge](../../developer/ejabberd-api/admin-tags.md#purge) __Module:__ -[mod_admin_extra](/archive/23_04/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -1301,10 +1300,10 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) [purge](/developer/ejabberd-api/admin-tags/#purge) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) [purge](../../developer/ejabberd-api/admin-tags.md#purge) __Module:__ -[mod_admin_extra](/archive/23_04/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -1340,10 +1339,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[roster](/developer/ejabberd-api/admin-tags/#roster) +[roster](../../developer/ejabberd-api/admin-tags.md#roster) __Module:__ -[mod_admin_extra](/archive/23_04/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -1379,10 +1378,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/23_04/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -1418,10 +1417,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/23_04/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -1453,7 +1452,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -1485,7 +1484,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[config](/developer/ejabberd-api/admin-tags/#config) +[config](../../developer/ejabberd-api/admin-tags.md#config) __Examples:__ @@ -1518,7 +1517,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -1543,7 +1542,7 @@ __Examples:__ Export virtual host information from Mnesia tables to SQL file -Configure the modules to use SQL, then call this command. After correctly exported the database of a vhost, you may want to delete from mnesia with the [delete_mnesia](/archive/23_04/admin-api/#delete-mnesia) command. +Configure the modules to use SQL, then call this command. After correctly exported the database of a vhost, you may want to delete from mnesia with the [delete_mnesia](admin-api.md#delete_mnesia) command. __Arguments:__ @@ -1555,7 +1554,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -1588,7 +1587,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -1621,7 +1620,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -1638,7 +1637,7 @@ __Examples:__ ~~~ -
added in 20.01
+
added in 20.01
## gc @@ -1653,7 +1652,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](../../developer/ejabberd-api/admin-tags.md#server) __Examples:__ @@ -1687,7 +1686,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[documentation](/developer/ejabberd-api/admin-tags/#documentation) +[documentation](../../developer/ejabberd-api/admin-tags.md#documentation) __Examples:__ @@ -1723,7 +1722,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[documentation](/developer/ejabberd-api/admin-tags/#documentation) +[documentation](../../developer/ejabberd-api/admin-tags.md#documentation) __Examples:__ @@ -1741,7 +1740,7 @@ __Examples:__ ~~~ -
added in 21.12
+
added in 21.12
## gen_markdown_doc_for_tags @@ -1757,7 +1756,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[documentation](/developer/ejabberd-api/admin-tags/#documentation) +[documentation](../../developer/ejabberd-api/admin-tags.md#documentation) __Examples:__ @@ -1788,10 +1787,10 @@ __Result:__ - *cookie* :: string : Erlang cookie used for authentication by ejabberd __Tags:__ -[erlang](/developer/ejabberd-api/admin-tags/#erlang) +[erlang](../../developer/ejabberd-api/admin-tags.md#erlang) __Module:__ -[mod_admin_extra](/archive/23_04/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -1827,10 +1826,10 @@ __Result:__ - *last_activity* :: {timestamp::string, status::string} : Last activity timestamp and status __Tags:__ -[last](/developer/ejabberd-api/admin-tags/#last) +[last](../../developer/ejabberd-api/admin-tags.md#last) __Module:__ -[mod_admin_extra](/archive/23_04/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -1865,7 +1864,7 @@ __Result:__ - *levelatom* :: string : Tuple with the log level number, its keyword and description __Tags:__ -[logs](/developer/ejabberd-api/admin-tags/#logs) +[logs](../../developer/ejabberd-api/admin-tags.md#logs) __Examples:__ @@ -1898,10 +1897,10 @@ __Result:__ - *value* :: integer : Number __Tags:__ -[offline](/developer/ejabberd-api/admin-tags/#offline) +[offline](../../developer/ejabberd-api/admin-tags.md#offline) __Module:__ -[mod_admin_extra](/archive/23_04/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -1947,10 +1946,10 @@ __Result:__ - *presence* :: {jid::string, show::string, status::string} __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/23_04/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -1989,10 +1988,10 @@ __Result:__ - *affiliation* :: string : Affiliation of the user __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/23_04/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -2027,10 +2026,10 @@ __Result:__ - *affiliations* :: [{username::string, domain::string, affiliation::string, reason::string}] : The list of affiliations with username, domain, affiliation and reason __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/23_04/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -2054,7 +2053,7 @@ __Examples:__ ~~~ -
added in 23.04
+
added in 23.04
## get_room_history @@ -2071,10 +2070,10 @@ __Result:__ - *history* :: [{timestamp::string, message::string}] __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/23_04/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -2117,10 +2116,10 @@ __Result:__ - *occupants* :: [{jid::string, nick::string, role::string}] : The list of occupants with JID, nick and affiliation __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/23_04/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -2160,10 +2159,10 @@ __Result:__ - *occupants* :: integer : Number of room occupants __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/23_04/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -2197,10 +2196,10 @@ __Result:__ - *options* :: [{name::string, value::string}] : List of room options tuples with name and value __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/23_04/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -2239,10 +2238,10 @@ __Result:__ - *contacts* :: [{jid::string, nick::string, subscription::string, ask::string, group::string}] __Tags:__ -[roster](/developer/ejabberd-api/admin-tags/#roster) +[roster](../../developer/ejabberd-api/admin-tags.md#roster) __Module:__ -[mod_admin_extra](/archive/23_04/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -2291,10 +2290,10 @@ __Result:__ - *subscribers* :: [jid::string] : The list of users that are subscribed to that room __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/23_04/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -2331,10 +2330,10 @@ __Result:__ - *rooms* :: [room::string] __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/23_04/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -2354,7 +2353,7 @@ __Examples:__ ~~~ -
added in 21.04
+
added in 21.04
## get_user_subscriptions @@ -2371,10 +2370,10 @@ __Result:__ - *rooms* :: [{roomjid::string, usernick::string, nodes::[node::string]}] __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/23_04/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -2428,10 +2427,10 @@ __Result:__ - *content* :: string : Field content __Tags:__ -[vcard](/developer/ejabberd-api/admin-tags/#vcard) +[vcard](../../developer/ejabberd-api/admin-tags.md#vcard) __Module:__ -[mod_admin_extra](/archive/23_04/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -2486,10 +2485,10 @@ __Result:__ - *content* :: string : Field content __Tags:__ -[vcard](/developer/ejabberd-api/admin-tags/#vcard) +[vcard](../../developer/ejabberd-api/admin-tags.md#vcard) __Module:__ -[mod_admin_extra](/archive/23_04/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -2545,10 +2544,10 @@ __Result:__ - *contents* :: [value::string] __Tags:__ -[vcard](/developer/ejabberd-api/admin-tags/#vcard) +[vcard](../../developer/ejabberd-api/admin-tags.md#vcard) __Module:__ -[mod_admin_extra](/archive/23_04/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -2586,7 +2585,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -2618,7 +2617,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -2650,7 +2649,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -2685,7 +2684,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) [sql](/developer/ejabberd-api/admin-tags/#sql) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) [sql](../../developer/ejabberd-api/admin-tags.md#sql) __Examples:__ @@ -2716,7 +2715,7 @@ __Result:__ - *s2s_incoming* :: integer __Tags:__ -[statistics](/developer/ejabberd-api/admin-tags/#statistics) [s2s](/developer/ejabberd-api/admin-tags/#s2s) +[statistics](../../developer/ejabberd-api/admin-tags.md#statistics) [s2s](../../developer/ejabberd-api/admin-tags.md#s2s) __Examples:__ @@ -2752,7 +2751,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -2787,7 +2786,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[cluster](/developer/ejabberd-api/admin-tags/#cluster) +[cluster](../../developer/ejabberd-api/admin-tags.md#cluster) __Examples:__ @@ -2822,10 +2821,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/23_04/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -2861,7 +2860,7 @@ __Result:__ - *num_resources* :: integer : Number of resources that were kicked __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Examples:__ @@ -2897,7 +2896,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[cluster](/developer/ejabberd-api/admin-tags/#cluster) +[cluster](../../developer/ejabberd-api/admin-tags.md#cluster) __Examples:__ @@ -2928,7 +2927,7 @@ __Result:__ - *certificates* :: [{domain::string, file::string, used::string}] __Tags:__ -[acme](/developer/ejabberd-api/admin-tags/#acme) +[acme](../../developer/ejabberd-api/admin-tags.md#acme) __Examples:__ @@ -2970,7 +2969,7 @@ __Result:__ - *nodes* :: [node::string] __Tags:__ -[cluster](/developer/ejabberd-api/admin-tags/#cluster) +[cluster](../../developer/ejabberd-api/admin-tags.md#cluster) __Examples:__ @@ -3008,7 +3007,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -3024,7 +3023,7 @@ __Examples:__ ~~~ -
added in 20.01
+
added in 20.01
## man @@ -3039,7 +3038,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[documentation](/developer/ejabberd-api/admin-tags/#documentation) +[documentation](../../developer/ejabberd-api/admin-tags.md#documentation) __Examples:__ @@ -3074,7 +3073,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -3108,7 +3107,7 @@ __Result:__ - *res* :: string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -3140,7 +3139,7 @@ __Result:__ - *res* :: string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -3172,7 +3171,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[modules](/developer/ejabberd-api/admin-tags/#modules) +[modules](../../developer/ejabberd-api/admin-tags.md#modules) __Examples:__ @@ -3204,7 +3203,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[modules](/developer/ejabberd-api/admin-tags/#modules) +[modules](../../developer/ejabberd-api/admin-tags.md#modules) __Examples:__ @@ -3236,7 +3235,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[modules](/developer/ejabberd-api/admin-tags/#modules) +[modules](../../developer/ejabberd-api/admin-tags.md#modules) __Examples:__ @@ -3271,7 +3270,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[modules](/developer/ejabberd-api/admin-tags/#modules) +[modules](../../developer/ejabberd-api/admin-tags.md#modules) __Examples:__ @@ -3302,7 +3301,7 @@ __Result:__ - *modules* :: [{name::string, summary::string}] : List of tuples with module name and description __Tags:__ -[modules](/developer/ejabberd-api/admin-tags/#modules) +[modules](../../developer/ejabberd-api/admin-tags.md#modules) __Examples:__ @@ -3336,7 +3335,7 @@ __Result:__ - *modules* :: [{name::string, summary::string}] : List of tuples with module name and description __Tags:__ -[modules](/developer/ejabberd-api/admin-tags/#modules) +[modules](../../developer/ejabberd-api/admin-tags.md#modules) __Examples:__ @@ -3373,7 +3372,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[modules](/developer/ejabberd-api/admin-tags/#modules) +[modules](../../developer/ejabberd-api/admin-tags.md#modules) __Examples:__ @@ -3405,10 +3404,10 @@ __Result:__ - *rooms* :: [room::string] : List of rooms __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/23_04/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -3444,10 +3443,10 @@ __Result:__ - *rooms* :: [{jid::string, public::string, participants::integer}] : List of rooms with summary __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/23_04/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -3493,10 +3492,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/23_04/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -3531,10 +3530,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/23_04/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -3568,10 +3567,10 @@ __Result:__ - *resources* :: integer : Number of active resources for a user __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/23_04/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -3606,7 +3605,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[oauth](/developer/ejabberd-api/admin-tags/#oauth) +[oauth](../../developer/ejabberd-api/admin-tags.md#oauth) __Examples:__ @@ -3642,7 +3641,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[oauth](/developer/ejabberd-api/admin-tags/#oauth) +[oauth](../../developer/ejabberd-api/admin-tags.md#oauth) __Examples:__ @@ -3678,7 +3677,7 @@ __Result:__ - *result* :: {token::string, scopes::string, expires_in::string} __Tags:__ -[oauth](/developer/ejabberd-api/admin-tags/#oauth) +[oauth](../../developer/ejabberd-api/admin-tags.md#oauth) __Examples:__ @@ -3718,7 +3717,7 @@ __Result:__ - *tokens* :: [{token::string, user::string, scope::string, expires_in::string}] __Tags:__ -[oauth](/developer/ejabberd-api/admin-tags/#oauth) +[oauth](../../developer/ejabberd-api/admin-tags.md#oauth) __Examples:__ @@ -3763,7 +3762,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[oauth](/developer/ejabberd-api/admin-tags/#oauth) +[oauth](../../developer/ejabberd-api/admin-tags.md#oauth) __Examples:__ @@ -3779,7 +3778,7 @@ __Examples:__ ~~~ -
changed in 22.05
+
changed in 22.05
## oauth_revoke_token @@ -3795,7 +3794,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[oauth](/developer/ejabberd-api/admin-tags/#oauth) +[oauth](../../developer/ejabberd-api/admin-tags.md#oauth) __Examples:__ @@ -3826,7 +3825,7 @@ __Result:__ - *s2s_outgoing* :: integer __Tags:__ -[statistics](/developer/ejabberd-api/admin-tags/#statistics) [s2s](/developer/ejabberd-api/admin-tags/#s2s) +[statistics](../../developer/ejabberd-api/admin-tags.md#statistics) [s2s](../../developer/ejabberd-api/admin-tags.md#s2s) __Examples:__ @@ -3860,10 +3859,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[stanza](/developer/ejabberd-api/admin-tags/#stanza) +[stanza](../../developer/ejabberd-api/admin-tags.md#stanza) __Module:__ -[mod_admin_extra](/archive/23_04/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -3900,10 +3899,10 @@ __Result:__ - *res* :: string __Tags:__ -[private](/developer/ejabberd-api/admin-tags/#private) +[private](../../developer/ejabberd-api/admin-tags.md#private) __Module:__ -[mod_admin_extra](/archive/23_04/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -3940,10 +3939,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[private](/developer/ejabberd-api/admin-tags/#private) +[private](../../developer/ejabberd-api/admin-tags.md#private) __Module:__ -[mod_admin_extra](/archive/23_04/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -4017,10 +4016,10 @@ __Result:__ - *response* :: [{user::string, contact::string}] __Tags:__ -[roster](/developer/ejabberd-api/admin-tags/#roster) +[roster](../../developer/ejabberd-api/admin-tags.md#roster) __Module:__ -[mod_admin_extra](/archive/23_04/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -4066,10 +4065,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[roster](/developer/ejabberd-api/admin-tags/#roster) +[roster](../../developer/ejabberd-api/admin-tags.md#roster) __Module:__ -[mod_admin_extra](/archive/23_04/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -4111,10 +4110,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[roster](/developer/ejabberd-api/admin-tags/#roster) +[roster](../../developer/ejabberd-api/admin-tags.md#roster) __Module:__ -[mod_admin_extra](/archive/23_04/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -4153,10 +4152,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[roster](/developer/ejabberd-api/admin-tags/#roster) +[roster](../../developer/ejabberd-api/admin-tags.md#roster) __Module:__ -[mod_admin_extra](/archive/23_04/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -4190,7 +4189,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) __Examples:__ @@ -4224,7 +4223,7 @@ __Result:__ - *users* :: [username::string] : List of registered accounts usernames __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) __Examples:__ @@ -4258,7 +4257,7 @@ __Result:__ - *vhosts* :: [vhost::string] : List of available vhosts __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](../../developer/ejabberd-api/admin-tags.md#server) __Examples:__ @@ -4292,7 +4291,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[config](/developer/ejabberd-api/admin-tags/#config) +[config](../../developer/ejabberd-api/admin-tags.md#config) __Examples:__ @@ -4325,10 +4324,10 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mam](/developer/ejabberd-api/admin-tags/#mam) +[mam](../../developer/ejabberd-api/admin-tags.md#mam) __Module:__ -[mod_mam](/archive/23_04/modules/#mod-mam) +[mod_mam](modules.md#mod_mam) __Examples:__ @@ -4363,10 +4362,10 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mam](/developer/ejabberd-api/admin-tags/#mam) +[mam](../../developer/ejabberd-api/admin-tags.md#mam) __Module:__ -[mod_mam](/archive/23_04/modules/#mod-mam) +[mod_mam](modules.md#mod_mam) __Examples:__ @@ -4392,7 +4391,7 @@ __Examples:__ Reopen the log files after being renamed -This can be useful when an external tool is used for log rotation. See https://docs.ejabberd.im/admin/guide/troubleshooting/#log-files +This can be useful when an external tool is used for log rotation. See https://docs.ejabberd.im/admin/guide/troubleshooting/#log_files __Arguments:__ @@ -4402,7 +4401,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[logs](/developer/ejabberd-api/admin-tags/#logs) +[logs](../../developer/ejabberd-api/admin-tags.md#logs) __Examples:__ @@ -4434,7 +4433,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[acme](/developer/ejabberd-api/admin-tags/#acme) +[acme](../../developer/ejabberd-api/admin-tags.md#acme) __Examples:__ @@ -4468,10 +4467,10 @@ __Result:__ - *resource* :: string : Name of user resource __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/23_04/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -4504,7 +4503,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](../../developer/ejabberd-api/admin-tags.md#server) __Examples:__ @@ -4540,10 +4539,10 @@ __Result:__ - 2: code not reloaded, but module restarted __Tags:__ -[erlang](/developer/ejabberd-api/admin-tags/#erlang) +[erlang](../../developer/ejabberd-api/admin-tags.md#erlang) __Module:__ -[mod_admin_extra](/archive/23_04/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -4579,7 +4578,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](../../developer/ejabberd-api/admin-tags.md#mnesia) __Examples:__ @@ -4611,7 +4610,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[acme](/developer/ejabberd-api/admin-tags/#acme) +[acme](../../developer/ejabberd-api/admin-tags.md#acme) __Examples:__ @@ -4646,10 +4645,10 @@ __Result:__ - *rooms* :: [room::string] : List of empty rooms that have been destroyed __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/23_04/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -4687,10 +4686,10 @@ __Result:__ - *rooms* :: [room::string] : List of empty rooms __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/23_04/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -4729,10 +4728,10 @@ __Result:__ - *rooms* :: [room::string] : List of unused rooms that has been destroyed __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/23_04/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -4772,10 +4771,10 @@ __Result:__ - *rooms* :: [room::string] : List of unused rooms __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](../../developer/ejabberd-api/admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/23_04/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -4810,7 +4809,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[logs](/developer/ejabberd-api/admin-tags/#logs) +[logs](../../developer/ejabberd-api/admin-tags.md#logs) __Examples:__ @@ -4834,7 +4833,7 @@ __Examples:__ Send a direct invitation to several destinations -Since ejabberd 20.12, this command is asynchronous: the API call may return before the server has send all the invitations. +Since ejabberd 20.12, this command is asynchronous: the API call may return before the server has send all the invitations. Password and Message can also be: none. Users JIDs are separated with : @@ -4851,10 +4850,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/23_04/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -4897,10 +4896,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[stanza](/developer/ejabberd-api/admin-tags/#stanza) +[stanza](../../developer/ejabberd-api/admin-tags.md#stanza) __Module:__ -[mod_admin_extra](/archive/23_04/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -4938,10 +4937,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[stanza](/developer/ejabberd-api/admin-tags/#stanza) +[stanza](../../developer/ejabberd-api/admin-tags.md#stanza) __Module:__ -[mod_admin_extra](/archive/23_04/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -4981,10 +4980,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[stanza](/developer/ejabberd-api/admin-tags/#stanza) +[stanza](../../developer/ejabberd-api/admin-tags.md#stanza) __Module:__ -[mod_admin_extra](/archive/23_04/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5025,10 +5024,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[last](/developer/ejabberd-api/admin-tags/#last) +[last](../../developer/ejabberd-api/admin-tags.md#last) __Module:__ -[mod_admin_extra](/archive/23_04/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5063,7 +5062,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[logs](/developer/ejabberd-api/admin-tags/#logs) +[logs](../../developer/ejabberd-api/admin-tags.md#logs) __Examples:__ @@ -5098,7 +5097,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[cluster](/developer/ejabberd-api/admin-tags/#cluster) +[cluster](../../developer/ejabberd-api/admin-tags.md#cluster) __Examples:__ @@ -5132,10 +5131,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[vcard](/developer/ejabberd-api/admin-tags/#vcard) +[vcard](../../developer/ejabberd-api/admin-tags.md#vcard) __Module:__ -[mod_admin_extra](/archive/23_04/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5175,10 +5174,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/23_04/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5219,10 +5218,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/23_04/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -5271,10 +5270,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[vcard](/developer/ejabberd-api/admin-tags/#vcard) +[vcard](../../developer/ejabberd-api/admin-tags.md#vcard) __Module:__ -[mod_admin_extra](/archive/23_04/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5331,10 +5330,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[vcard](/developer/ejabberd-api/admin-tags/#vcard) +[vcard](../../developer/ejabberd-api/admin-tags.md#vcard) __Module:__ -[mod_admin_extra](/archive/23_04/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5392,10 +5391,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[vcard](/developer/ejabberd-api/admin-tags/#vcard) +[vcard](../../developer/ejabberd-api/admin-tags.md#vcard) __Module:__ -[mod_admin_extra](/archive/23_04/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5418,7 +5417,7 @@ __Examples:__ ~~~ -
changed in 21.07
+
changed in 21.07
## srg_create @@ -5445,10 +5444,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[shared_roster_group](/developer/ejabberd-api/admin-tags/#shared-roster-group) +[shared_roster_group](../../developer/ejabberd-api/admin-tags.md#shared_roster_group) __Module:__ -[mod_admin_extra](/archive/23_04/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5485,10 +5484,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[shared_roster_group](/developer/ejabberd-api/admin-tags/#shared-roster-group) +[shared_roster_group](../../developer/ejabberd-api/admin-tags.md#shared_roster_group) __Module:__ -[mod_admin_extra](/archive/23_04/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5522,10 +5521,10 @@ __Result:__ - *informations* :: [{key::string, value::string}] : List of group information, as key and value __Tags:__ -[shared_roster_group](/developer/ejabberd-api/admin-tags/#shared-roster-group) +[shared_roster_group](../../developer/ejabberd-api/admin-tags.md#shared_roster_group) __Module:__ -[mod_admin_extra](/archive/23_04/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5568,10 +5567,10 @@ __Result:__ - *members* :: [member::string] : List of group identifiers __Tags:__ -[shared_roster_group](/developer/ejabberd-api/admin-tags/#shared-roster-group) +[shared_roster_group](../../developer/ejabberd-api/admin-tags.md#shared_roster_group) __Module:__ -[mod_admin_extra](/archive/23_04/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5607,10 +5606,10 @@ __Result:__ - *groups* :: [id::string] : List of group identifiers __Tags:__ -[shared_roster_group](/developer/ejabberd-api/admin-tags/#shared-roster-group) +[shared_roster_group](../../developer/ejabberd-api/admin-tags.md#shared_roster_group) __Module:__ -[mod_admin_extra](/archive/23_04/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5648,10 +5647,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[shared_roster_group](/developer/ejabberd-api/admin-tags/#shared-roster-group) +[shared_roster_group](../../developer/ejabberd-api/admin-tags.md#shared_roster_group) __Module:__ -[mod_admin_extra](/archive/23_04/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5689,10 +5688,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[shared_roster_group](/developer/ejabberd-api/admin-tags/#shared-roster-group) +[shared_roster_group](../../developer/ejabberd-api/admin-tags.md#shared_roster_group) __Module:__ -[mod_admin_extra](/archive/23_04/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5727,10 +5726,10 @@ __Result:__ - *stat* :: integer : Integer statistic value __Tags:__ -[statistics](/developer/ejabberd-api/admin-tags/#statistics) +[statistics](../../developer/ejabberd-api/admin-tags.md#statistics) __Module:__ -[mod_admin_extra](/archive/23_04/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5763,10 +5762,10 @@ __Result:__ - *stat* :: integer : Integer statistic value __Tags:__ -[statistics](/developer/ejabberd-api/admin-tags/#statistics) +[statistics](../../developer/ejabberd-api/admin-tags.md#statistics) __Module:__ -[mod_admin_extra](/archive/23_04/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5798,7 +5797,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](../../developer/ejabberd-api/admin-tags.md#server) __Examples:__ @@ -5830,10 +5829,10 @@ __Result:__ - *users* :: [{user::string, host::string, resource::string, priority::integer, status::string}] __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/23_04/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5874,10 +5873,10 @@ __Result:__ - *users* :: [{user::string, host::string, resource::string, priority::integer, status::string}] __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/23_04/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5918,10 +5917,10 @@ __Result:__ - *users* :: integer : Number of connected sessions with given status type __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) [statistics](/developer/ejabberd-api/admin-tags/#statistics) +[session](../../developer/ejabberd-api/admin-tags.md#session) [statistics](../../developer/ejabberd-api/admin-tags.md#statistics) __Module:__ -[mod_admin_extra](/archive/23_04/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5954,10 +5953,10 @@ __Result:__ - *users* :: integer : Number of connected sessions with given status type __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) [statistics](/developer/ejabberd-api/admin-tags/#statistics) +[session](../../developer/ejabberd-api/admin-tags.md#session) [statistics](../../developer/ejabberd-api/admin-tags.md#statistics) __Module:__ -[mod_admin_extra](/archive/23_04/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5989,7 +5988,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](../../developer/ejabberd-api/admin-tags.md#server) __Examples:__ @@ -6026,7 +6025,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](../../developer/ejabberd-api/admin-tags.md#server) __Examples:__ @@ -6058,7 +6057,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[s2s](/developer/ejabberd-api/admin-tags/#s2s) +[s2s](../../developer/ejabberd-api/admin-tags.md#s2s) __Examples:__ @@ -6093,10 +6092,10 @@ __Result:__ - *nodes* :: [node::string] : The list of nodes that has subscribed __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/23_04/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -6118,7 +6117,7 @@ __Examples:__ ~~~ -
added in 22.05
+
added in 22.05
## subscribe_room_many @@ -6139,10 +6138,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/23_04/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -6188,10 +6187,10 @@ __Result:__ - *unbanned* :: integer : Amount of unbanned entries, or negative in case of error. __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) __Module:__ -[mod_fail2ban](/archive/23_04/modules/#mod-fail2ban) +[mod_fail2ban](modules.md#mod_fail2ban) __Examples:__ @@ -6227,7 +6226,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) +[accounts](../../developer/ejabberd-api/admin-tags.md#accounts) __Examples:__ @@ -6261,10 +6260,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](../../developer/ejabberd-api/admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/23_04/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -6297,7 +6296,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](../../developer/ejabberd-api/admin-tags.md#server) __Examples:__ @@ -6328,7 +6327,7 @@ __Result:__ - *modules* :: [module::string] __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](../../developer/ejabberd-api/admin-tags.md#server) __Examples:__ @@ -6347,7 +6346,7 @@ __Examples:__ ~~~ -
improved in 23.04
+
improved in 23.04
## update_sql @@ -6362,10 +6361,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[sql](/developer/ejabberd-api/admin-tags/#sql) +[sql](../../developer/ejabberd-api/admin-tags.md#sql) __Module:__ -[mod_admin_update_sql](/archive/23_04/modules/#mod-admin-update-sql) +[mod_admin_update_sql](modules.md#mod_admin_update_sql) __Examples:__ @@ -6398,7 +6397,7 @@ __Result:__ - *resources* :: [resource::string] __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Examples:__ @@ -6436,10 +6435,10 @@ __Result:__ - *sessions_info* :: [{connection::string, ip::string, port::integer, priority::integer, node::string, uptime::integer, status::string, resource::string, statustext::string}] __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](../../developer/ejabberd-api/admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/23_04/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ diff --git a/content/archive/23_04/index.md b/content/archive/23.04/index.md similarity index 60% rename from content/archive/23_04/index.md rename to content/archive/23.04/index.md index 4bd1ac4b..421777b6 100644 --- a/content/archive/23_04/index.md +++ b/content/archive/23.04/index.md @@ -1,15 +1,11 @@ ---- -title: Archived Documentation for 23.04 -menu: 23.04 -order: 7695 ---- +# Archived Documentation for 23.04 This section contains some archived sections for ejabberd 23.04. If you are upgrading ejabberd from a previous release, you can check: -* [Specific version upgrade notes](/admin/upgrade/#specific-version-upgrade-notes) +* [Specific version upgrade notes](upgrade.md) * [ejabberd 23.04 release announcement](https://www.process-one.net/blog/ejabberd-23-04/) -* [Docs Github Compare from 23.01](https://github.com/processone/docs.ejabberd.im/compare/23.01...23.04) -* [ejabberd Github Compare from 23.01](https://github.com/processone/ejabberd/compare/23.01...23.04) +* [Docs Github Compare from 23.01](https://github.com/processone/docs.ejabberd.im/compare/23.01..23.04) +* [ejabberd Github Compare from 23.01](https://github.com/processone/ejabberd/compare/23.01..23.04) diff --git a/content/archive/23.04/listen-options.md b/content/archive/23.04/listen-options.md new file mode 100644 index 00000000..f85c63bf --- /dev/null +++ b/content/archive/23.04/listen-options.md @@ -0,0 +1,399 @@ +--- +search: + exclude: true +--- + +# Listen Options + +This is a detailed description of each option allowed by the listening +modules: + +## access + +*AccessName* + +This option defines access to the port. The default value is `all`. + +## backlog + +*Value* + +The backlog value defines the maximum length that the queue of + pending connections may grow to. This should be increased if the + server is going to handle lots of new incoming connections as they + may be dropped if there is no space in the queue (and ejabberd was + not able to accept them immediately). Default value is 5. + +## cafile + +*Path* + +Path to a file of CA root certificates. +The default is to use system defined file if possible. + +This option is useful to define the file for a specific port listener. +To set a file for all client listeners or for specific vhosts, you can use the +[`c2s_cafile`](toplevel.md#c2s-cafile) top-level option. +To set a file for all server connections, you can use the +[`s2s_cafile`](toplevel.md#s2s-cafile) top-level option +or the +[`ca_file`](toplevel.md#ca_file) top-level option. + +Please note: if this option is set in +[`ejabberd_c2s`](listen.md#ejabberd_c2s) +or [`ejabberd_s2s_in`](listen.md#ejabberd_s2s-in) +and the corresponding top-level option is also set +([`c2s_cafile`](toplevel.md#c2s-cafile), +[`s2s_cafile`](toplevel.md#s2s-cafile)), +then the top-level option is used, not this one. + +## certfile + +*Path* + +Path to the certificate file. +Only makes sense when the [`tls`](#tls) +options is set. +If this option is not set, you should set the +[`certfiles`](toplevel.md#certfiles) top-level option +or configure [ACME](../../admin/configuration/basic.md#acme). + +## check_from + +*true | false* + +This option can be used with +[`ejabberd_service`](listen.md#ejabberd_service) only. + [`XEP-0114`](https://xmpp.org/extensions/xep-0114.html) requires that + the domain must match the hostname of the component. If this option + is set to `false`, `ejabberd` will allow the component to send + stanzas with any arbitrary domain in the ’from’ attribute. Only use + this option if you are completely sure about it. The default value + is `true`, to be compliant with + [`XEP-0114`](https://xmpp.org/extensions/xep-0114.html). + +## ciphers + +*Ciphers* + +OpenSSL ciphers list in the same format accepted by + ‘`openssl ciphers`’ command. + +Please note: if this option is set in +[`ejabberd_c2s`](listen.md#ejabberd_c2s) +or [`ejabberd_s2s_in`](listen.md#ejabberd_s2s-in) +and the corresponding top-level option is also set +([`c2s_ciphers`](toplevel.md#c2s-ciphers), +[`s2s_ciphers`](toplevel.md#s2s-ciphers)), +then the top-level option is used, not this one. + +## custom_headers + +*{Name: Value}* + +Specify additional HTTP headers to be included in all HTTP responses. +Default value is: `[]` + +## default_host + +*undefined | HostName* + +If the HTTP request received by ejabberd contains the HTTP header + `Host` with an ambiguous virtual host that doesn’t match any one + defined in ejabberd (see + [Host Names](../../admin/configuration/basic.md#host_names)), + then this configured HostName + is set as the request Host. The default value of this option is: + `undefined`. + +## dhfile + +*Path* + +Full path to a file containing custom parameters for Diffie-Hellman key + exchange. Such a file could be created with the command + `openssl dhparam -out dh.pem 2048`. If this option is not specified, + default parameters will be used, which might not provide the same level + of security as using custom parameters. + +Please note: if this option is set in +[`ejabberd_c2s`](listen.md#ejabberd_c2s) +or [`ejabberd_s2s_in`](listen.md#ejabberd_s2s-in) +and the corresponding top-level option is also set +([`c2s_dhfile`](toplevel.md#c2s-dhfile), +[`s2s_dhfile`](toplevel.md#s2s-dhfile)), +then the top-level option is used, not this one. + +## global_routes + +*true | false* + +This option emulates legacy behaviour which registers all routes +defined in [`hosts`](toplevel.md#hosts) +on a component connected. This behaviour +is considered harmful in the case when it's desired to multiplex +different components on the same port, so, to disable it, +set `global_routes` to `false`. + +The default value is `true`, +e.g. legacy behaviour is emulated: the only reason for this is +to maintain backward compatibility with existing deployments. + +## hosts + +*{Hostname: [HostOption, ...]}* + +The external Jabber component that connects to this +[`ejabberd_service`](listen.md#ejabberd_service) +can serve one or more hostnames. As `HostOption` + you can define options for the component; currently the only allowed + option is the password required to the component when attempt to + connect to ejabberd: `password: Secret`. Note that you + cannot define in a single `ejabberd_service` components of different + services: add an `ejabberd_service` for each service, as seen in an + example below. This option may not be necessary if the component + already provides the host in its packets; in that case, you can simply + provide the password option that will be used for all the hosts + (see port 5236 definition in the example below). + +## max_fsm_queue + +*Size* + +This option specifies the maximum number of elements in the queue of + the FSM (Finite State Machine). Roughly speaking, each message in + such queues represents one XML stanza queued to be sent into its + relevant outgoing stream. If queue size reaches the limit (because, + for example, the receiver of stanzas is too slow), the FSM and the + corresponding connection (if any) will be terminated and error + message will be logged. The reasonable value for this option depends + on your hardware configuration. This option can be specified for + [`ejabberd_service`](listen.md#ejabberd_service) + and [`ejabberd_c2s`](listen.md#ejabberd_c2s) + listeners, or also globally for + [`ejabberd_s2s_out`](listen.md#ejabberd_s2s-out). + If the option is not specified for + `ejabberd_service` or `ejabberd_c2s` listeners, the globally + configured value is used. The allowed values are integers and + ’undefined’. Default value: ’10000’. + +## max_payload_size + +*Size* + +Specify the maximum payload size in bytes. +It can be either an integer or the word `infinity`. +The default value is `infinity`. + +## max_stanza_size + +*Size* + +This option specifies an approximate maximum size in bytes of XML + stanzas. Approximate, because it is calculated with the precision of + one block of read data. For example `{max_stanza_size, 65536}`. The + default value is `infinity`. Recommended values are 65536 for c2s + connections and 131072 for s2s connections. s2s max stanza size must + always much higher than c2s limit. Change this value with extreme + care as it can cause unwanted disconnect if set too low. + +## password + +*Secret* + +Specify the password to verify an external component that connects to the port. + +
improved in 20.07
+ +## port + +*Port number, or unix domain socket path* + +Declares at which port/unix domain socket should be listening. + +Can be set to number between `1` and `65535` to listen on TCP or UDP socket, +or can be set to string in form `"unix:/path/to/socket"` to create and listen +on unix domain socket `/path/to/socket`. + +## protocol_options + +*ProtocolOpts* + +List of general options relating to SSL/TLS. These map to + [`OpenSSL’s set_options()`](https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_options.html). + The default entry is: `"no_sslv3|cipher_server_preference|no_compression"` + +Please note: if this option is set in +[`ejabberd_c2s`](listen.md#ejabberd_c2s) +or [`ejabberd_s2s_in`](listen.md#ejabberd_s2s-in) +and the corresponding top-level option is also set +([`c2s_protocol_options`](toplevel.md#c2s-protocol-options), +[`s2s_protocol_options`](toplevel.md#s2s-protocol-options)), +then the top-level option is used, not this one. + +## request_handlers + +*{Path: Module}* + +To define one or several handlers that will serve HTTP requests in +[`ejabberd_http`](listen.md#ejabberd_http). The + Path is a string; so the URIs that start with that Path will be + served by Module. For example, if you want `mod_foo` to serve the + URIs that start with `/a/b/`, and you also want `mod_bosh` to + serve the URIs `/bosh/`, use this option: + + request_handlers: + /a/b: mod_foo + /bosh: mod_bosh + /mqtt: mod_mqtt + +
new in 21.07
+ +## send_timeout + +*Integer | infinity* + +Sets the longest time that data can wait to be accepted to sent by OS socket. Triggering this timeout will cause the server to close it. By default it's set to 15 seconds, expressed in milliseconds: 15000 + +## shaper + +*none | ShaperName* + +This option defines a shaper for the port (see section  +[Shapers](../../admin/configuration/basic.md#shapers)). + The default value is `none`. + +## shaper_rule + +*none | ShaperRule* + +This option defines a shaper rule for +[`ejabberd_service`](listen.md#ejabberd_service) (see +section [Shapers](../../admin/configuration/basic.md#shapers)). +The recommended value is `fast`. + +## starttls + +*true | false* + +This option specifies that STARTTLS encryption is available on +connections to the port. You should also set the +[`certfiles`](toplevel.md#certfiles) top-level option +or configure [ACME](../../admin/configuration/basic.md#acme). + +This option gets implicitly enabled when enabling +[`starttls_required`](#starttls_required) or [`tls_verify`](#tls_verify). + +## starttls_required + +*true | false* + +This option specifies that STARTTLS encryption is required on +connections to the port. No unencrypted connections will be allowed. +You should also set the +[`certfiles`](toplevel.md#certfiles) top-level option +or configure [ACME](../../admin/configuration/basic.md#acme). + +Enabling this option implicitly enables also the [`starttls`](#starttls) option. + +## tag + +*String* + +Allow specifying a tag in a `listen` section +and later use it to have a special +[`api_permissions`](toplevel.md#api_permissions) +just for it. + +For example: + + listen: + - + port: 4000 + module: ejabberd_http + tag: "magic_listener" + + api_permissions: + "magic_access": + from: + - tag: "magic_listener" + who: all + what: "*" + +The default value is the empty string: `""`. + +## timeout + +*Integer* + +Timeout of the connections, expressed in milliseconds. Default: 5000 + +## tls + +*true | false* + +This option specifies that traffic on the port will be encrypted + using SSL immediately after connecting. This was the traditional + encryption method in the early Jabber software, commonly on port + 5223 for client-to-server communications. But this method is + nowadays deprecated and not recommended. The preferable encryption + method is STARTTLS on port 5222, as defined + [`RFC 6120: XMPP Core`](https://xmpp.org/rfcs/rfc6120.html#tls), + which can be enabled in `ejabberd` with the option + [`starttls`](#starttls). + +If this option is set, you should also set the + [`certfiles`](toplevel.md#certfiles) top-level + option or configure [ACME](../../admin/configuration/basic.md#acme). + +The option `tls` can also be used in + [`ejabberd_http`](listen.md#ejabberd_http) + to support HTTPS. + +Enabling this option implicitly disables the [`starttls`](#starttls) option. + +## tls_compression + +*true | false* + +Whether to enable or disable TLS compression. The default value is + `false`. + +Please note: if this option is set in +[`ejabberd_c2s`](listen.md#ejabberd_c2s) +or [`ejabberd_s2s_in`](listen.md#ejabberd_s2s-in) +and the corresponding top-level option is also set +([`c2s_tls_compression`](toplevel.md#c2s-tls-compression), +[`s2s_tls_compression`](toplevel.md#s2s-tls-compression)), +then the top-level option is used, not this one. + +## tls_verify + +*false | true* + +This option specifies whether to verify the certificate or not when TLS is enabled. + +The default value is `false`, which means no checks are performed. + +The certificate will be checked against trusted CA roots, either defined at the operation system level or defined in the + listener [`cafile`](#cafile). If trusted, it will accept the jid that is embedded in the certificate in the + `subjectAltName` field of that certificate. + +Enabling this option implicitly enables also the [`starttls`](#starttls) option. + +## use_proxy_protocol + +*true | false* + +Is this listener accessed by proxy service that is using + proxy protocol for supplying real IP addresses to ejabberd server. You can read about this protocol + in [Proxy protocol specification](https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt). + The default value of this option is`false`. + +## zlib + +*true | false* + +This option specifies that Zlib stream compression (as defined in + [`XEP-0138`](https://xmpp.org/extensions/xep-0138.html)) is available + on connections to the port. diff --git a/content/archive/22_10/listen.md b/content/archive/23.04/listen.md similarity index 78% rename from content/archive/22_10/listen.md rename to content/archive/23.04/listen.md index ca0c730c..78e02ebe 100644 --- a/content/archive/22_10/listen.md +++ b/content/archive/23.04/listen.md @@ -1,11 +1,8 @@ --- -title: Listen Modules -toc: true -menu: Listen Modules -order: 50 +search: + exclude: true --- - # Listen Option The **listen option** defines for which ports, addresses and network @@ -73,37 +70,37 @@ are: Handles c2s connections. Options: -[access](/archive/22_10/listen-options/#access), -[cafile](/archive/22_10/listen-options/#cafile), -[ciphers](/archive/22_10/listen-options/#ciphers), -[dhfile](/archive/22_10/listen-options/#dhfile), -[max_fsm_queue](/archive/22_10/listen-options/#max-fsm-queue), -[max_stanza_size](/archive/22_10/listen-options/#max-stanza-size), -[protocol_options](/archive/22_10/listen-options/#protocol-options), -[send_timeout](/archive/22_10/listen-options/#send-timeout), -[shaper](/archive/22_10/listen-options/#shaper), -[starttls](/archive/22_10/listen-options/#starttls), -[starttls_required](/archive/22_10/listen-options/#starttls-required), -[tls](/archive/22_10/listen-options/#tls), -[tls_compression](/archive/22_10/listen-options/#tls-compression), -[tls_verify](/archive/22_10/listen-options/#tls-verify), -[zlib](/archive/22_10/listen-options/#zlib). +[access](listen-options.md#access), +[cafile](listen-options.md#cafile), +[ciphers](listen-options.md#ciphers), +[dhfile](listen-options.md#dhfile), +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_stanza_size](listen-options.md#max_stanza_size), +[protocol_options](listen-options.md#protocol_options), +[send_timeout](listen-options.md#send_timeout), +[shaper](listen-options.md#shaper), +[starttls](listen-options.md#starttls), +[starttls_required](listen-options.md#starttls_required), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls_compression), +[tls_verify](listen-options.md#tls_verify), +[zlib](listen-options.md#zlib). ## ejabberd_s2s_in Handles incoming s2s connections. Options: -[cafile](/archive/22_10/listen-options/#cafile), -[ciphers](/archive/22_10/listen-options/#ciphers), -[dhfile](/archive/22_10/listen-options/#dhfile), -[max_fsm_queue](/archive/22_10/listen-options/#max-fsm-queue), -[max_stanza_size](/archive/22_10/listen-options/#max-stanza-size), -[protocol_options](/archive/22_10/listen-options/#protocol-options), -[send_timeout](/archive/22_10/listen-options/#send-timeout), -[shaper](/archive/22_10/listen-options/#shaper), -[tls](/archive/22_10/listen-options/#tls), -[tls_compression](/archive/22_10/listen-options/#tls-compression). +[cafile](listen-options.md#cafile), +[ciphers](listen-options.md#ciphers), +[dhfile](listen-options.md#dhfile), +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_stanza_size](listen-options.md#max_stanza_size), +[protocol_options](listen-options.md#protocol_options), +[send_timeout](listen-options.md#send_timeout), +[shaper](listen-options.md#shaper), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls_compression). ## ejabberd_service @@ -113,23 +110,23 @@ Interacts with an ([`XEP-0114`](https://xmpp.org/extensions/xep-0114.html)). Options: -[access](/archive/22_10/listen-options/#access), -[cafile](/archive/22_10/listen-options/#cafile), -[certfile](/archive/22_10/listen-options/#certfile), -[check_from](/archive/22_10/listen-options/#check-from), -[ciphers](/archive/22_10/listen-options/#ciphers), -[dhfile](/archive/22_10/listen-options/#dhfile), -[global_routes](/archive/22_10/listen-options/#global-routes), -[hosts](/archive/22_10/listen-options/#hosts), -[max_fsm_queue](/archive/22_10/listen-options/#max-fsm-queue), -[max_stanza_size](/archive/22_10/listen-options/#max-stanza-size), -[password](/archive/22_10/listen-options/#password), -[protocol_options](/archive/22_10/listen-options/#protocol-options), -[send_timeout](/archive/22_10/listen-options/#send-timeout), -[shaper](/archive/22_10/listen-options/#shaper), -[shaper_rule](/archive/22_10/listen-options/#shaper-rule), -[tls](/archive/22_10/listen-options/#tls), -[tls_compression](/archive/22_10/listen-options/#tls-compression). +[access](listen-options.md#access), +[cafile](listen-options.md#cafile), +[certfile](listen-options.md#certfile), +[check_from](listen-options.md#check_from), +[ciphers](listen-options.md#ciphers), +[dhfile](listen-options.md#dhfile), +[global_routes](listen-options.md#global_routes), +[hosts](listen-options.md#hosts), +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_stanza_size](listen-options.md#max_stanza_size), +[password](listen-options.md#password), +[protocol_options](listen-options.md#protocol_options), +[send_timeout](listen-options.md#send_timeout), +[shaper](listen-options.md#shaper), +[shaper_rule](listen-options.md#shaper_rule), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls_compression). ## ejabberd_sip @@ -137,13 +134,13 @@ Handles SIP requests as defined in [`RFC 3261`](https://tools.ietf.org/html/rfc3261). For details please check the -[ejabberd_sip](/archive/22_10/listen/#ejabberd-sip-1) -and [mod_sip](/archive/22_10/modules/#mod-sip) sections. +[ejabberd_sip](listen.md#ejabberd_sip_1) +and [mod_sip](modules.md#mod_sip) sections. General listener options: -[certfile](/archive/22_10/listen-options/#certfile), -[send_timeout](/archive/22_10/listen-options/#send-timeout), -[tls](/archive/22_10/listen-options/#tls). +[certfile](listen-options.md#certfile), +[send_timeout](listen-options.md#send_timeout), +[tls](listen-options.md#tls). ## ejabberd_stun @@ -152,7 +149,7 @@ Handles STUN/TURN requests as defined in [`RFC 5766`](https://tools.ietf.org/html/rfc5766). For the specific module options, please check the -[ejabberd_stun](/archive/22_10/listen/#ejabberd-stun-1) section: +[ejabberd_stun](listen.md#ejabberd_stun_1) section: `auth_realm`, `auth_type`, `server_name`, @@ -166,57 +163,57 @@ For the specific module options, please check the `use_turn`. General listener options: -[certfile](/archive/22_10/listen-options/#certfile), -[send_timeout](/archive/22_10/listen-options/#send-timeout), -[shaper](/archive/22_10/listen-options/#shaper), -[tls](/archive/22_10/listen-options/#tls), +[certfile](listen-options.md#certfile), +[send_timeout](listen-options.md#send_timeout), +[shaper](listen-options.md#shaper), +[tls](listen-options.md#tls), ## ejabberd_http Handles incoming HTTP connections. With the proper request handlers configured, this serves HTTP services like -[ACME](/admin/configuration/basic/#acme), -[API](/archive/22_10/modules/#mod-http-api), -[BOSH](/archive/22_10/modules/#mod-bosh), -[CAPTCHA](/admin/configuration/basic/#captcha), -[Fileserver](/archive/22_10/modules/#mod-http-fileserver), -[OAuth](/developer/ejabberd-api/oauth/), -[RegisterWeb](/archive/22_10/modules/#mod-register-web), -[Upload](/archive/22_10/modules/#mod-http-upload), -[WebAdmin](/admin/guide/managing/#web-admin), -[WebSocket](/archive/22_10/listen/#ejabberd-http-ws), -[XMP-RPC](/archive/22_10/listen/#ejabberd-xmlrpc). +[ACME](../../admin/configuration/basic.md#acme), +[API](modules.md#mod_http_api), +[BOSH](modules.md#mod_bosh), +[CAPTCHA](../../admin/configuration/basic.md#captcha), +[Fileserver](modules.md#mod_http_fileserver), +[OAuth](../../developer/ejabberd-api/oauth.md), +[RegisterWeb](modules.md#mod_register_web), +[Upload](modules.md#mod_http_upload), +[WebAdmin](../../admin/guide/managing.md#web_admin), +[WebSocket](listen.md#ejabberd_http_ws), +[XMP-RPC](listen.md#ejabberd_xmlrpc). Options: -[cafile](/archive/22_10/listen-options/#cafile), -[ciphers](/archive/22_10/listen-options/#ciphers), -[custom_headers](/archive/22_10/listen-options/#custom-headers), -[default_host](/archive/22_10/listen-options/#default-host), -[dhfile](/archive/22_10/listen-options/#dhfile), -[protocol_options](/archive/22_10/listen-options/#protocol-options), -[request_handlers](/archive/22_10/listen-options/#request-handlers), -[send_timeout](/archive/22_10/listen-options/#send-timeout), -[tag](/archive/22_10/listen-options/#tag), -[tls](/archive/22_10/listen-options/#tls), -[tls_compression](/archive/22_10/listen-options/#tls-compression), -and the [trusted_proxies](/archive/22_10/toplevel/#trusted-proxies) top-level option. +[cafile](listen-options.md#cafile), +[ciphers](listen-options.md#ciphers), +[custom_headers](listen-options.md#custom_headers), +[default_host](listen-options.md#default_host), +[dhfile](listen-options.md#dhfile), +[protocol_options](listen-options.md#protocol_options), +[request_handlers](listen-options.md#request_handlers), +[send_timeout](listen-options.md#send_timeout), +[tag](listen-options.md#tag), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls_compression), +and the [trusted_proxies](toplevel.md#trusted_proxies) top-level option. ## mod_mqtt Support for MQTT requires configuring `mod_mqtt` both in the -[listen](/archive/22_10/toplevel/#listen) and the -[modules](/archive/22_10/toplevel/#modules) sections. -Check the [mod_mqtt module](/archive/22_10/modules/#mod-mqtt) options, -and the [MQTT Support](/admin/guide/mqtt/) section. +[listen](toplevel.md#listen) and the +[modules](toplevel.md#modules) sections. +Check the [mod_mqtt module](modules.md#mod_mqtt) options, +and the [MQTT Support](../../admin/guide/mqtt/index.md) section. Listen options: -[backlog](/archive/22_10/listen-options/#backlog), -[max_fsm_queue](/archive/22_10/listen-options/#max-fsm-queue), -[max_payload_size](/archive/22_10/listen-options/#max-payload-size), -[send_timeout](/archive/22_10/listen-options/#send-timeout), -[tls](/archive/22_10/listen-options/#tls), -[tls_verify](/archive/22_10/listen-options/#tls-verify). +[backlog](listen-options.md#backlog), +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_payload_size](listen-options.md#max_payload_size), +[send_timeout](listen-options.md#send_timeout), +[tls](listen-options.md#tls), +[tls_verify](listen-options.md#tls_verify). @@ -339,14 +336,14 @@ And you should also add these in the case if TURN is enabled: ## SIP Configuration `ejabberd` has built-in SIP support. To activate this feature, -add the [`ejabberd_sip`](#ejabberd-sip) listen module, enable -[`mod_sip`](/archive/22_10/modules/#mod-sip) module +add the [`ejabberd_sip`](#ejabberd_sip) listen module, enable +[`mod_sip`](modules.md#mod_sip) module for the desired virtual host, and configure DNS properly. To add a listener you should configure `ejabberd_sip` listening module as described in [Listen](#listen-option) section. -If option [`tls`](/archive/22_10/listen-options/#tls) is specified, -option [`certfile`](/archive/22_10/listen-options/#certfile) +If option [`tls`](listen-options.md#tls) is specified, +option [`certfile`](listen-options.md#certfile) must be specified as well, otherwise incoming TLS connections would fail. @@ -426,9 +423,9 @@ section of an `ejabberd_http` listener: This module can be configured using those top-level options: -- [websocket\_origin](/archive/22_10/toplevel/#websocket-origin) -- [websocket\_ping\_interval](/archive/22_10/toplevel/#websocket-ping-interval) -- [websocket\_timeout](/archive/22_10/toplevel/#websocket-timeout) +- [websocket\_origin](toplevel.md#websocket_origin) +- [websocket\_ping\_interval](toplevel.md#websocket_ping_interval) +- [websocket\_timeout](toplevel.md#websocket_timeout) ## WebSocket Discovery @@ -439,7 +436,7 @@ You may want to provide a `host-meta` file so clients can easily discover WebSocket service for your XMPP domain (see [XEP-0156](https://xmpp.org/extensions/xep-0156.html#http)). One easy way to provide that file is using -[`mod_host_meta`](/archive/22_10/modules/#mod-host-meta). +[`mod_host_meta`](modules.md#mod_host_meta). ## Testing WebSocket @@ -453,13 +450,13 @@ There is an example configuration for WebSocket and Converse.js in the # ejabberd_xmlrpc Handles XML-RPC requests to execute -[ejabberd commands](/admin/guide/managing/#ejabberd-commands). +[ejabberd commands](../../admin/guide/managing.md#ejabberd_commands). It is configured as a request handler in -[ejabberd_http](/archive/22_10/listen/#ejabberd-http). +[ejabberd_http](listen.md#ejabberd_http). By default there is no restriction to who can execute what commands, so it is strongly recommended that you configure restrictions using -[API Permissions](/developer/ejabberd-api/permissions/). +[API Permissions](../../developer/ejabberd-api/permissions.md). This is the minimum configuration required to enable the feature: @@ -514,11 +511,11 @@ With that configuration, it is possible to execute two specific commands using print calling('registered_users', {'host':'localhost'}) It's possible to use OAuth for authentication instead of plain password, see -[OAuth Support](/developer/ejabberd-api/oauth/). +[OAuth Support](../../developer/ejabberd-api/oauth.md). In ejabberd 20.03 and older, it was possible to configure `ejabberd_xmlrpc` as a listener, see the old document for reference and example configuration: -[Listening Module](/admin/configuration/old/#listening-module). +[Listening Module](../old.md#listening_module). Just for reference, there's also the old [`ejabberd_xmlrpc documentation`](https://ejabberd.im/ejabberd_xmlrpc). @@ -545,7 +542,7 @@ For example, the following simple configuration defines: service. - Port 5281 listens for HTTP requests, using HTTPS to serve HTTP-Bind - (BOSH) and the Web Admin as explained in [Managing: Web Admin](/admin/guide/managing/#web-admin). The + (BOSH) and the Web Admin as explained in [Managing: Web Admin](../../admin/guide/managing.md#web_admin). The socket only listens connections to the IP address 127.0.0.1. @@ -619,7 +616,7 @@ In this example, the following configuration defines that: - Port 5280 is serving the Web Admin and the HTTP-Bind (BOSH) service in all the IPv4 addresses. Note that it is also possible to serve them - on different ports. The second example in section [Managing: Web Admin](/admin/guide/managing/#web-admin) shows + on different ports. The second example in section [Managing: Web Admin](../../admin/guide/managing.md#web_admin) shows how exactly this can be done. A request handler to serve MQTT over WebSocket is also defined. - All users except for the administrators have a traffic of limit diff --git a/content/archive/23_04/modules.md b/content/archive/23.04/modules.md similarity index 87% rename from content/archive/23_04/modules.md rename to content/archive/23.04/modules.md index 83ecd175..6d7fda55 100644 --- a/content/archive/23_04/modules.md +++ b/content/archive/23.04/modules.md @@ -1,10 +1,9 @@ --- -title: Modules Options -toc: true -menu: Modules Opts -order: 95 +search: + exclude: true --- +# Modules Options mod\_adhoc ---------- @@ -83,9 +82,9 @@ mod\_admin\_update\_sql This module can be used to update existing SQL database from the default to the new schema. Check the section [Default and New -Schemas](/admin/configuration/database/#default-and-new-schemas) for details. +Schemas](../../admin/configuration/database.md#default_and_new_schemas) for details. Please note that only MS SQL, MySQL, and PostgreSQL are supported. When -the module is loaded use [update_sql](/archive/23_04/admin-api/#update-sql) API. +the module is loaded use [update_sql](admin-api.md#update_sql) API. The module has no options. @@ -102,7 +101,7 @@ it may broadcast a lot of messages. This module should be disabled for instances of ejabberd with hundreds of thousands users. The Ad-hoc Commands are listed in the Server Discovery. For this feature -to work, [mod_adhoc](/archive/23_04/modules/#mod-adhoc) must be enabled. +to work, [mod_adhoc](modules.md#mod_adhoc) must be enabled. The specific JIDs where messages can be sent are listed below. The first JID in each entry will apply only to the specified virtual host @@ -114,7 +113,7 @@ hosts in ejabberd: connected to several resources, only the resource with the highest priority will receive the message. If the registered user is not connected, the message will be stored offline in assumption that - offline storage (see [mod_offline](/archive/23_04/modules/#mod-offline)) is enabled. + offline storage (see [mod_offline](modules.md#mod_offline)) is enabled. - example.org/announce/online (example.org/announce/all-hosts/online):: The message is sent to all @@ -143,23 +142,23 @@ the message of the day. The default value is *none* (i.e. nobody is able to send such messages). - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/23_04/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/23_04/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/23_04/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/23_04/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/23_04/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_avatar ----------- @@ -172,8 +171,8 @@ Conversion](https://xmpp.org/extensions/xep-0398.html). Also, the module supports conversion between avatar image formats on the fly. -The module depends on [mod_vcard](/archive/23_04/modules/#mod-vcard), [mod_vcard_xupdate](/archive/23_04/modules/#mod-vcard-xupdate) and -[mod_pubsub](/archive/23_04/modules/#mod-pubsub). +The module depends on [mod_vcard](modules.md#mod_vcard), [mod_vcard_xupdate](modules.md#mod_vcard_xupdate) and +[mod_pubsub](modules.md#mod_pubsub). __Available options:__ @@ -261,15 +260,15 @@ while having to get through an HTTP proxy. __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/23_04/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/23_04/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/23_04/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **json**: *true | false* @@ -293,15 +292,15 @@ authentication. Basically, it creates a new session with anonymous authentication. The default value is *false*. - **queue\_type**: *ram | file* -Same as top-level [queue_type](/archive/23_04/toplevel/#queue-type) option, but applied to this module +Same as top-level [queue_type](toplevel.md#queue_type) option, but applied to this module only. - **ram\_db\_type**: *mnesia | sql | redis* -Same as top-level [default_ram_db](/archive/23_04/toplevel/#default-ram-db) option, but applied to this module +Same as top-level [default_ram_db](toplevel.md#default_ram_db) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/23_04/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. __**Example**:__ @@ -324,28 +323,28 @@ mod\_caps This module implements [XEP-0115: Entity Capabilities](https://xmpp.org/extensions/xep-0115.html). The main purpose of the module is to provide PEP functionality (see -[mod_pubsub](/archive/23_04/modules/#mod-pubsub)). +[mod_pubsub](modules.md#mod_pubsub)). __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/23_04/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/23_04/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/23_04/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/23_04/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/23_04/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_carboncopy --------------- @@ -392,7 +391,7 @@ mod\_configure The module provides server configuration functionality via [XEP-0050: Ad-Hoc Commands](https://xmpp.org/extensions/xep-0050.html). This module -requires [mod_adhoc](/archive/23_04/modules/#mod-adhoc) to be loaded. +requires [mod_adhoc](modules.md#mod_adhoc) to be loaded. The module has no options. @@ -402,15 +401,15 @@ mod\_conversejs This module serves a simple page for the [Converse](https://conversejs.org/) XMPP web browser client. -This module is available since ejabberd 21.12. Several options were -improved in ejabberd 22.05. +This module is available since ejabberd 21.12. Several options were +improved in ejabberd 22.05. To use this module, in addition to adding it to the *modules* section, you must also enable it in *listen* → *ejabberd\_http* → -[request\_handlers](/archive/23_04/listen-options/#request-handlers). +[request\_handlers](listen-options.md#request_handlers). Make sure either *mod\_bosh* or *ejabberd\_http\_ws* -[request\_handlers](/archive/23_04/listen-options/#request-handlers) are +[request\_handlers](listen-options.md#request_handlers) are enabled. When *conversejs\_css* and *conversejs\_script* are *auto*, by default @@ -428,7 +427,7 @@ value is *auto*. Converse CSS URL. The keyword *@HOST@* is replaced with the hostname. The default value is *auto*. -
added in 22.05
+
added in 22.05
- **conversejs\_options**: *{Name: Value}* Specify additional options to be passed to Converse. See [Converse @@ -436,7 +435,7 @@ configuration](https://conversejs.org/docs/html/configuration.html). Only boolean, integer and string values are supported; lists are not supported. -
added in 22.05
+
added in 22.05
- **conversejs\_resources**: *Path* Local path to the Converse files. If not set, the public Converse client @@ -520,7 +519,7 @@ external PEP service. > **Note** > -> This module is complementary to [mod_privilege](/archive/23_04/modules/#mod-privilege) but can also be used +> This module is complementary to [mod_privilege](modules.md#mod_privilege) but can also be used > separately. __Available options:__ @@ -670,11 +669,11 @@ This module serves small *host-meta* files as described in [XEP-0156: Discovering Alternative XMPP Connection Methods](https://xmpp.org/extensions/xep-0156.html). -This module is available since ejabberd 22.05. +This module is available since ejabberd 22.05. To use this module, in addition to adding it to the *modules* section, you must also enable it in *listen* → *ejabberd\_http* → -[request\_handlers](/archive/23_04/listen-options/#request-handlers). +[request\_handlers](listen-options.md#request_handlers). Notice it only works if ejabberd\_http has tls enabled. @@ -718,7 +717,7 @@ JSON data. To use this module, in addition to adding it to the *modules* section, you must also enable it in *listen* → *ejabberd\_http* → -[request\_handlers](/archive/23_04/listen-options/#request-handlers). +[request\_handlers](listen-options.md#request_handlers). To use a specific API version N, when defining the URL path in the request\_handlers, add a *vN*. For example: */api/v2: mod\_http\_api* @@ -840,7 +839,7 @@ URL from which that file can later be downloaded. In order to use this module, it must be enabled in *listen* → *ejabberd\_http* → -[request\_handlers](/archive/23_04/listen-options/#request-handlers). +[request\_handlers](listen-options.md#request_handlers). __Available options:__ @@ -886,7 +885,7 @@ option is *undefined*, this option is set to the same value as *put\_url*. The keyword @HOST@ is replaced with the virtual host name. NOTE: if GET requests are handled by *mod\_http\_upload*, the *get\_url* must match the *put\_url*. Setting it to a different value only makes -sense if an external web server or [mod_http_fileserver](/archive/23_04/modules/#mod-http-fileserver) is used to +sense if an external web server or [mod_http_fileserver](modules.md#mod_http_fileserver) is used to serve the uploaded files. - **host** @@ -1063,23 +1062,23 @@ of the ejabberd server. __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/23_04/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/23_04/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/23_04/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/23_04/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/23_04/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_legacy\_auth ----------------- @@ -1109,7 +1108,7 @@ The default value is *all*. - **assume\_mam\_usage**: *true | false* This option determines how ejabberd’s stream management code (see -[mod_stream_mgmt](/archive/23_04/modules/#mod-stream-mgmt)) handles unacknowledged messages when the connection +[mod_stream_mgmt](modules.md#mod_stream_mgmt)) handles unacknowledged messages when the connection is lost. Usually, such messages are either bounced or resent. However, neither is done for messages that were stored in the user’s MAM archive if this option is set to *true*. In this case, ejabberd assumes those @@ -1117,19 +1116,19 @@ messages will be retrieved from the archive. The default value is *false*. - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/23_04/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/23_04/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/23_04/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **clear\_archive\_on\_room\_destroy**: *true | false* -Whether to destroy message archive of a room (see [mod_muc](/archive/23_04/modules/#mod-muc)) when it +Whether to destroy message archive of a room (see [mod_muc](modules.md#mod_muc)) when it gets destroyed. The default value is *true*. - **compress\_xml**: *true | false* @@ -1138,7 +1137,7 @@ custom compression algorithm. This feature works only with SQL backends. The default value is *false*. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/23_04/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **default**: *always | never | roster* @@ -1155,7 +1154,7 @@ option. Once the server received a request, that user’s messages are archived as usual. The default value is *false*. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/23_04/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. - **user\_mucsub\_from\_muc\_archive**: *true | false* When this option is disabled, for each individual subscriber a separa @@ -1206,16 +1205,16 @@ mod\_mix This module is an experimental implementation of [XEP-0369: Mediated Information eXchange (MIX)](https://xmpp.org/extensions/xep-0369.html). -MIX support was added in ejabberd 16.03 as an experimental feature, -updated in 19.02, and is not yet ready to use in production. It’s +MIX support was added in ejabberd 16.03 as an experimental feature, +updated in 19.02, and is not yet ready to use in production. It’s asserted that the MIX protocol is going to replace the MUC protocol in -the future (see [mod_muc](/archive/23_04/modules/#mod-muc)). +the future (see [mod_muc](modules.md#mod_muc)). To learn more about how to use that feature, you can refer to our tutorial: [Getting started with XEP-0369: Mediated Information eXchange (MIX) v0.1](https://docs.ejabberd.im/tutorials/mix-010/). -The module depends on [mod_mam](/archive/23_04/modules/#mod-mam). +The module depends on [mod_mam](modules.md#mod_mam). __Available options:__ @@ -1224,7 +1223,7 @@ An access rule to control MIX channels creations. The default value is *all*. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/23_04/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **host** @@ -1258,23 +1257,23 @@ channels (either on your server or on any remote servers). __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/23_04/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/23_04/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/23_04/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/23_04/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/23_04/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_mqtt --------- @@ -1295,19 +1294,19 @@ Access rules to restrict access to topics for subscribers. By default there are no restrictions. - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/23_04/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/23_04/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/23_04/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/23_04/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **match\_retained\_limit**: *pos\_integer() | infinity* @@ -1326,11 +1325,11 @@ The maximum topic depth, i.e. the number of slashes (*/*) in the topic. The default value is *8*. - **queue\_type**: *ram | file* -Same as top-level [queue_type](/archive/23_04/toplevel/#queue-type) option, but applied to this module +Same as top-level [queue_type](toplevel.md#queue_type) option, but applied to this module only. - **ram\_db\_type**: *mnesia* -Same as top-level [default_ram_db](/archive/23_04/toplevel/#default-ram-db) option, but applied to this module +Same as top-level [default_ram_db](toplevel.md#default_ram_db) option, but applied to this module only. - **session\_expiry**: *timeout()* @@ -1339,7 +1338,7 @@ When *0* is set, the session gets destroyed when the underlying client connection is closed. The default value is *5* minutes. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/23_04/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_mqtt\_bridge ----------------- @@ -1348,7 +1347,7 @@ This module adds ability to synchronize local MQTT topics with data on remote servers It can update topics on remote servers when local user updates local topic, or can subscribe for changes on remote server, and update local copy when remote data is updated. It is available since -ejabberd 23.01. +ejabberd 23.01. __Available options:__ @@ -1435,17 +1434,17 @@ Multi-User Chat service. The default is *all* for backward compatibility, which means that any user is allowed to register any free nick. -
added in 22.05
+
added in 22.05
- **cleanup\_affiliations\_on\_start**: *true | false* Remove affiliations for non-existing local users on startup. The default value is *false*. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/23_04/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. -
improved in 22.05
+
improved in 22.05
- **default\_room\_options**: *Options* This option allows to define the desired default room options. Note that @@ -1522,7 +1521,7 @@ using an XMPP client with MUC capability. The *Options* are: - **logging**: *true | false* The public messages are logged using - [mod_muc_log](/archive/23_04/modules/#mod-muc-log). The default value is *false*. + [mod_muc_log](modules.md#mod_muc_log). The default value is *false*. - **mam**: *true | false* Enable message archiving. Implies mod\_mam @@ -1619,14 +1618,14 @@ is not specified, the only Jabber ID will be the hostname of the virtual host with the prefix "conference.". The keyword *@HOST@* is replaced with the real virtual host name. -
added in 21.01
+
added in 21.01
- **max\_captcha\_whitelist**: *Number* This option defines the maximum number of characters that Captcha Whitelist can have when configuring the room. The default value is *infinity*. -
added in 21.01
+
added in 21.01
- **max\_password**: *Number* This option defines the maximum number of characters that Password can @@ -1709,11 +1708,11 @@ rooms is high: this will improve server startup time and memory consumption. - **queue\_type**: *ram | file* -Same as top-level [queue_type](/archive/23_04/toplevel/#queue-type) option, but applied to this module +Same as top-level [queue_type](toplevel.md#queue_type) option, but applied to this module only. - **ram\_db\_type**: *mnesia | sql* -Same as top-level [default_ram_db](/archive/23_04/toplevel/#default-ram-db) option, but applied to this module +Same as top-level [default_ram_db](toplevel.md#default_ram_db) option, but applied to this module only. - **regexp\_room\_id**: *string()* @@ -1764,11 +1763,11 @@ This module provides commands to administer local MUC services and their MUC rooms. It also provides simple WebAdmin pages to view the existing rooms. -This module depends on [mod_muc](/archive/23_04/modules/#mod-muc). +This module depends on [mod_muc](modules.md#mod_muc). __Available options:__ -
added in 22.05
+
added in 22.05
- **subscribe\_room\_many\_max\_users**: *Number* How many users can be subscribed to a room at once using the @@ -1810,7 +1809,7 @@ Features: - A custom link can be added on top of each page. -The module depends on [mod_muc](/archive/23_04/modules/#mod-muc). +The module depends on [mod_muc](modules.md#mod_muc). __Available options:__ @@ -1892,7 +1891,7 @@ This module implement Real-time blocklists for MUC rooms. It works by observing remote pubsub node conforming with specification described in . -This module is available since ejabberd 23.04. +This module is available since ejabberd 23.04. __Available options:__ @@ -2026,15 +2025,15 @@ on large MucSub services. The default value is *false*, meaning the optimisation is enabled. - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/23_04/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/23_04/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/23_04/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **store\_empty\_body**: *true | false | unless\_chat\_state* @@ -2049,7 +2048,7 @@ Whether or not to store groupchat messages. The default value is *false*. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/23_04/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. - **use\_mam\_for\_storage**: *true | false* This is an experimental option. Enabling this option, *mod\_offline* @@ -2120,7 +2119,7 @@ or checking availability. The default value is *false*. What to do when a client does not answer to a server ping request in less than period defined in *ping\_ack\_timeout* option: *kill* means destroying the underlying connection, *none* means to do nothing. NOTE: -when [mod_stream_mgmt](/archive/23_04/modules/#mod-stream-mgmt) is loaded and stream management is enabled by a +when [mod_stream_mgmt](modules.md#mod_stream_mgmt) is loaded and stream management is enabled by a client, killing the client connection doesn’t mean killing the client session - the session will be kept alive in order to give the client a chance to resume it. The default value is *none*. @@ -2174,28 +2173,28 @@ Lists](https://xmpp.org/extensions/xep-0016.html). > Nowadays modern XMPP clients rely on [XEP-0191: Blocking > Command](https://xmpp.org/extensions/xep-0191.html) which is > implemented by *mod\_blocking* module. However, you still need -> *mod\_privacy* loaded in order for [mod_blocking](/archive/23_04/modules/#mod-blocking) to work. +> *mod\_privacy* loaded in order for [mod_blocking](modules.md#mod_blocking) to work. __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/23_04/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/23_04/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/23_04/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/23_04/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/23_04/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_private ------------ @@ -2213,23 +2212,23 @@ Bookmarks](https://xmpp.org/extensions/xep-0048.html)). __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/23_04/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/23_04/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/23_04/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/23_04/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/23_04/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_privilege -------------- @@ -2259,7 +2258,7 @@ Check the section about listening ports for more information. > **Note** > -> This module is complementary to [mod_delegation](/archive/23_04/modules/#mod-delegation), but can also be +> This module is complementary to [mod_delegation](modules.md#mod_delegation), but can also be > used separately. __Available options:__ @@ -2372,7 +2371,7 @@ A port number to listen for incoming connections. The default value is *7777*. - **ram\_db\_type**: *mnesia | redis | sql* -Same as top-level [default_ram_db](/archive/23_04/toplevel/#default-ram-db) option, but applied to this module +Same as top-level [default_ram_db](toplevel.md#default_ram_db) option, but applied to this module only. - **recbuf**: *Size* @@ -2457,7 +2456,7 @@ Publish-Subscribe](https://xmpp.org/extensions/xep-0060.html). The functionality in *mod\_pubsub* can be extended using plugins. The plugin that implements PEP ([XEP-0163: Personal Eventing via Pubsub](https://xmpp.org/extensions/xep-0163.html)) is enabled in the -default ejabberd configuration file, and it requires [mod_caps](/archive/23_04/modules/#mod-caps). +default ejabberd configuration file, and it requires [mod_caps](modules.md#mod_caps). __Available options:__ @@ -2467,7 +2466,7 @@ using *acl* and *access*. By default any account in the local ejabberd server is allowed to create pubsub nodes. The default value is: *all*. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/23_04/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **default\_node\_config**: *List of Key:Value* @@ -2508,7 +2507,7 @@ systems with not so many nodes, caching last items speeds up pubsub and allows to raise user connection rate. The cost is memory usage, as every item is stored in memory. -
added in 21.12
+
added in 21.12
- **max\_item\_expire\_node**: *timeout() | infinity* Specify the maximum item epiry time. Default value is: *infinity*. @@ -2652,19 +2651,19 @@ platform-dependant backend services such as FCM or APNS. __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/23_04/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/23_04/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/23_04/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/23_04/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **include\_body**: *true | false | Text* @@ -2682,19 +2681,19 @@ notifications generated for incoming messages with a body. The default value is *false*. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/23_04/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_push\_keepalive -------------------- This module tries to keep the stream management session (see -[mod_stream_mgmt](/archive/23_04/modules/#mod-stream-mgmt)) of a disconnected mobile client alive if the client +[mod_stream_mgmt](modules.md#mod_stream_mgmt)) of a disconnected mobile client alive if the client enabled push notifications for that session. However, the normal session resumption timeout is restored once a push notification is issued, so the session will be closed if the client doesn’t respond to push notifications. -The module depends on [mod_push](/archive/23_04/modules/#mod-push). +The module depends on [mod_push](modules.md#mod_push). __Available options:__ @@ -2702,7 +2701,7 @@ __Available options:__ This option specifies the period of time until the session of a disconnected push client times out. This timeout is only in effect as long as no push notification is issued. Once that happened, the -resumption timeout configured for [mod_stream_mgmt](/archive/23_04/modules/#mod-stream-mgmt) is restored. The +resumption timeout configured for [mod_stream_mgmt](modules.md#mod_stream_mgmt) is restored. The default value is *72* hours. - **wake\_on\_start**: *true | false* @@ -2730,7 +2729,7 @@ enables end users to use an XMPP client to: - Delete an existing account on the server. -This module reads also the top-level [registration_timeout](/archive/23_04/toplevel/#registration-timeout) option +This module reads also the top-level [registration_timeout](toplevel.md#registration_timeout) option defined globally for the server, so please check that option documentation too. @@ -2751,7 +2750,7 @@ uncontrolled massive accounts creation by rogue users. Specify rules to restrict access for user unregistration. By default any user is able to unregister their account. -
added in 21.12
+
added in 21.12
- **allow\_modules**: *all | \[Module, ...\]* List of modules that can register accounts, or *all*. The default value @@ -2759,7 +2758,7 @@ is *all*, which is equivalent to something like *\[mod\_register, mod\_register\_web\]*. - **captcha\_protected**: *true | false* -Protect registrations with [CAPTCHA](/admin/configuration/basic/#captcha). The +Protect registrations with [CAPTCHA](../../admin/configuration/basic.md#captcha). The default is *false*. - **ip\_access**: *AccessName* @@ -2798,9 +2797,9 @@ This module provides a web page where users can: - Unregister an existing account on the server. -This module supports [CAPTCHA](/admin/configuration/basic/#captcha) to register a +This module supports [CAPTCHA](../../admin/configuration/basic.md#captcha) to register a new account. To enable this feature, configure the top-level -[captcha_cmd](/archive/23_04/toplevel/#captcha-cmd) and top-level [captcha_url](/archive/23_04/toplevel/#captcha-url) options. +[captcha_cmd](toplevel.md#captcha_cmd) and top-level [captcha_url](toplevel.md#captcha_url) options. As an example usage, the users of the host *localhost* can visit the page: *https://localhost:5280/register/* It is important to include the @@ -2808,8 +2807,8 @@ last / character in the URL, otherwise the subpages URL will be incorrect. This module is enabled in *listen* → *ejabberd\_http* → -[request\_handlers](/archive/23_04/listen-options/#request-handlers), no need -to enable in *modules*. The module depends on [mod_register](/archive/23_04/modules/#mod-register) where all +[request\_handlers](listen-options.md#request_handlers), no need +to enable in *modules*. The module depends on [mod_register](modules.md#mod_register) where all the configuration is performed. The module has no options. @@ -2844,19 +2843,19 @@ add/remove/modify contacts or send presence subscriptions. The default value is *all*, i.e. no restrictions. - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/23_04/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/23_04/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/23_04/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/23_04/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **store\_current\_id**: *true | false* @@ -2866,11 +2865,11 @@ calculated on the fly each time. Enabling this option reduces the load for both ejabberd and the database. This option does not affect the client in any way. This option is only useful if option *versioning* is set to *true*. The default value is *false*. IMPORTANT: if you use -[mod_shared_roster](/archive/23_04/modules/#mod-shared-roster) or [mod_shared_roster_ldap](/archive/23_04/modules/#mod-shared-roster-ldap), you must set the +[mod_shared_roster](modules.md#mod_shared_roster) or [mod_shared_roster_ldap](modules.md#mod_shared_roster_ldap), you must set the value of the option to *false*. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/23_04/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. - **versioning**: *true | false* Enables/disables Roster Versioning. The default value is *false*. @@ -2980,29 +2979,29 @@ parameters: group’s members. A group of other vhost can be identified with *groupid@vhost*. -This module depends on [mod_roster](/archive/23_04/modules/#mod-roster). If not enabled, roster queries +This module depends on [mod_roster](modules.md#mod_roster). If not enabled, roster queries will return 503 errors. __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/23_04/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/23_04/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/23_04/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/23_04/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/23_04/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. __Examples:__ @@ -3081,25 +3080,25 @@ password in multiple places. - Connection parameters: The module also accepts the connection parameters, all of which default to the top-level parameter of the same name, if unspecified. See [LDAP - Connection](/admin/configuration/ldap/#ldap-connection) section for more + Connection](../../admin/configuration/ldap.md#ldap_connection) section for more information about them. -Check also the [Configuration examples](/admin/configuration/ldap/#ldap-examples) +Check also the [Configuration examples](../../admin/configuration/ldap.md#ldap_examples) section to get details about retrieving the roster, and configuration examples including Flat DIT and Deep DIT. __Available options:__ - **cache\_life\_time** -Same as top-level [cache_life_time](/archive/23_04/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed** -Same as top-level [cache_missed](/archive/23_04/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size** -Same as top-level [cache_size](/archive/23_04/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **ldap\_auth\_check**: *true | false* @@ -3108,24 +3107,24 @@ subsystem) for existence of each user in the shared LDAP roster. Set to *false* if you want to disable the check. Default value is *true*. - **ldap\_backups** -Same as top-level [ldap_backups](/archive/23_04/toplevel/#ldap-backups) option, but applied to this module +Same as top-level [ldap_backups](toplevel.md#ldap_backups) option, but applied to this module only. - **ldap\_base** -Same as top-level [ldap_base](/archive/23_04/toplevel/#ldap-base) option, but applied to this module only. +Same as top-level [ldap_base](toplevel.md#ldap_base) option, but applied to this module only. - **ldap\_deref\_aliases** -Same as top-level [ldap_deref_aliases](/archive/23_04/toplevel/#ldap-deref-aliases) option, but applied to this +Same as top-level [ldap_deref_aliases](toplevel.md#ldap_deref_aliases) option, but applied to this module only. - **ldap\_encrypt** -Same as top-level [ldap_encrypt](/archive/23_04/toplevel/#ldap-encrypt) option, but applied to this module +Same as top-level [ldap_encrypt](toplevel.md#ldap_encrypt) option, but applied to this module only. - **ldap\_filter** Additional filter which is AND-ed together with "User Filter" and "Group Filter". For more information check the LDAP -[Filters](/admin/configuration/ldap/#filters) section. +[Filters](../../admin/configuration/ldap.md#filters) section. - **ldap\_gfilter** "Group Filter", used when retrieving human-readable name (a.k.a. @@ -3162,14 +3161,14 @@ section Filters. - **ldap\_memberattr\_format\_re** A regex for extracting user ID from the value of the attribute named by *ldap\_memberattr*. Check the LDAP [Control -Parameters](/admin/configuration/ldap/#control-parameters) section. +Parameters](../../admin/configuration/ldap.md#control_parameters) section. - **ldap\_password** -Same as top-level [ldap_password](/archive/23_04/toplevel/#ldap-password) option, but applied to this module +Same as top-level [ldap_password](toplevel.md#ldap_password) option, but applied to this module only. - **ldap\_port** -Same as top-level [ldap_port](/archive/23_04/toplevel/#ldap-port) option, but applied to this module only. +Same as top-level [ldap_port](toplevel.md#ldap_port) option, but applied to this module only. - **ldap\_rfilter** So called "Roster Filter". Used to find names of all "shared roster" @@ -3178,37 +3177,37 @@ defaults to the top-level parameter of the same name. You must specify it in some place in the configuration, there is no default. - **ldap\_rootdn** -Same as top-level [ldap_rootdn](/archive/23_04/toplevel/#ldap-rootdn) option, but applied to this module +Same as top-level [ldap_rootdn](toplevel.md#ldap_rootdn) option, but applied to this module only. - **ldap\_servers** -Same as top-level [ldap_servers](/archive/23_04/toplevel/#ldap-servers) option, but applied to this module +Same as top-level [ldap_servers](toplevel.md#ldap_servers) option, but applied to this module only. - **ldap\_tls\_cacertfile** -Same as top-level [ldap_tls_cacertfile](/archive/23_04/toplevel/#ldap-tls-cacertfile) option, but applied to this +Same as top-level [ldap_tls_cacertfile](toplevel.md#ldap_tls_cacertfile) option, but applied to this module only. - **ldap\_tls\_certfile** -Same as top-level [ldap_tls_certfile](/archive/23_04/toplevel/#ldap-tls-certfile) option, but applied to this +Same as top-level [ldap_tls_certfile](toplevel.md#ldap_tls_certfile) option, but applied to this module only. - **ldap\_tls\_depth** -Same as top-level [ldap_tls_depth](/archive/23_04/toplevel/#ldap-tls-depth) option, but applied to this module +Same as top-level [ldap_tls_depth](toplevel.md#ldap_tls_depth) option, but applied to this module only. - **ldap\_tls\_verify** -Same as top-level [ldap_tls_verify](/archive/23_04/toplevel/#ldap-tls-verify) option, but applied to this module +Same as top-level [ldap_tls_verify](toplevel.md#ldap_tls_verify) option, but applied to this module only. - **ldap\_ufilter** "User Filter", used for retrieving the human-readable name of roster entries (usually full names of people in the roster). See also the parameters *ldap\_userdesc* and *ldap\_useruid*. For more information -check the LDAP [Filters](/admin/configuration/ldap/#filters) section. +check the LDAP [Filters](../../admin/configuration/ldap.md#filters) section. - **ldap\_uids** -Same as top-level [ldap_uids](/archive/23_04/toplevel/#ldap-uids) option, but applied to this module only. +Same as top-level [ldap_uids](toplevel.md#ldap_uids) option, but applied to this module only. - **ldap\_userdesc** The name of the attribute which holds the human-readable user name. @@ -3226,7 +3225,7 @@ retrieved from the *ldap\_memberattr* attribute of a group object. Retrieved from results of the "User Filter". Defaults to *cn*. - **use\_cache** -Same as top-level [use_cache](/archive/23_04/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_sic -------- @@ -3253,7 +3252,7 @@ virtual host. > > It is not enough to just load this module. You should also configure > listeners and DNS records properly. For details see the section about -> the [ejabberd\_sip](/archive/23_04/listen/#ejabberd-sip) listen module in +> the [ejabberd\_sip](listen.md#ejabberd_sip) listen module in > the ejabberd Documentation. __Available options:__ @@ -3355,11 +3354,11 @@ A time to wait for stanza acknowledgements. Setting it to *infinity* effectively disables the timeout. The default value is *1* minute. - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/23_04/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. The default value is *48 hours*. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/23_04/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **max\_ack\_queue**: *Size* @@ -3382,7 +3381,7 @@ default *resume\_timeout*. By default, it is set to the same value as the *resume\_timeout* option. - **queue\_type**: *ram | file* -Same as top-level [queue_type](/archive/23_04/toplevel/#queue-type) option, but applied to this module +Same as top-level [queue_type](toplevel.md#queue_type) option, but applied to this module only. - **resend\_on\_timeout**: *true | false | if\_offline* @@ -3411,7 +3410,7 @@ mod\_stun\_disco This module allows XMPP clients to discover STUN/TURN services and to obtain temporary credentials for using them as per [XEP-0215: External Service Discovery](https://xmpp.org/extensions/xep-0215.html). This -module is included in ejabberd since version 20.04. +module is included in ejabberd since version 20.04. __Available options:__ @@ -3548,19 +3547,19 @@ fields should return all users who added some information to their vCard. The default value is *false*. - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/23_04/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/23_04/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/23_04/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql | ldap* -Same as top-level [default_db](/archive/23_04/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **host** @@ -3590,7 +3589,7 @@ ignored and the Jabber User Directory service will not appear in the Service Discovery item list. The default value is *false*. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/23_04/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. - **vcard**: *vCard* A custom vCard of the server that will be displayed by some XMPP clients @@ -3620,33 +3619,33 @@ will be translated to: __Available options for *ldap* backend:__ - **ldap\_backups** -Same as top-level [ldap_backups](/archive/23_04/toplevel/#ldap-backups) option, but applied to this module +Same as top-level [ldap_backups](toplevel.md#ldap_backups) option, but applied to this module only. - **ldap\_base** -Same as top-level [ldap_base](/archive/23_04/toplevel/#ldap-base) option, but applied to this module only. +Same as top-level [ldap_base](toplevel.md#ldap_base) option, but applied to this module only. - **ldap\_deref\_aliases** -Same as top-level [ldap_deref_aliases](/archive/23_04/toplevel/#ldap-deref-aliases) option, but applied to this +Same as top-level [ldap_deref_aliases](toplevel.md#ldap_deref_aliases) option, but applied to this module only. - **ldap\_encrypt** -Same as top-level [ldap_encrypt](/archive/23_04/toplevel/#ldap-encrypt) option, but applied to this module +Same as top-level [ldap_encrypt](toplevel.md#ldap_encrypt) option, but applied to this module only. - **ldap\_filter** -Same as top-level [ldap_filter](/archive/23_04/toplevel/#ldap-filter) option, but applied to this module +Same as top-level [ldap_filter](toplevel.md#ldap_filter) option, but applied to this module only. - **ldap\_password** -Same as top-level [ldap_password](/archive/23_04/toplevel/#ldap-password) option, but applied to this module +Same as top-level [ldap_password](toplevel.md#ldap_password) option, but applied to this module only. - **ldap\_port** -Same as top-level [ldap_port](/archive/23_04/toplevel/#ldap-port) option, but applied to this module only. +Same as top-level [ldap_port](toplevel.md#ldap_port) option, but applied to this module only. - **ldap\_rootdn** -Same as top-level [ldap_rootdn](/archive/23_04/toplevel/#ldap-rootdn) option, but applied to this module +Same as top-level [ldap_rootdn](toplevel.md#ldap_rootdn) option, but applied to this module only. - **ldap\_search\_fields**: *{Name: Attribute, ...}* @@ -3693,27 +3692,27 @@ The default is: "Organization Unit": ORGUNIT - **ldap\_servers** -Same as top-level [ldap_servers](/archive/23_04/toplevel/#ldap-servers) option, but applied to this module +Same as top-level [ldap_servers](toplevel.md#ldap_servers) option, but applied to this module only. - **ldap\_tls\_cacertfile** -Same as top-level [ldap_tls_cacertfile](/archive/23_04/toplevel/#ldap-tls-cacertfile) option, but applied to this +Same as top-level [ldap_tls_cacertfile](toplevel.md#ldap_tls_cacertfile) option, but applied to this module only. - **ldap\_tls\_certfile** -Same as top-level [ldap_tls_certfile](/archive/23_04/toplevel/#ldap-tls-certfile) option, but applied to this +Same as top-level [ldap_tls_certfile](toplevel.md#ldap_tls_certfile) option, but applied to this module only. - **ldap\_tls\_depth** -Same as top-level [ldap_tls_depth](/archive/23_04/toplevel/#ldap-tls-depth) option, but applied to this module +Same as top-level [ldap_tls_depth](toplevel.md#ldap_tls_depth) option, but applied to this module only. - **ldap\_tls\_verify** -Same as top-level [ldap_tls_verify](/archive/23_04/toplevel/#ldap-tls-verify) option, but applied to this module +Same as top-level [ldap_tls_verify](toplevel.md#ldap_tls_verify) option, but applied to this module only. - **ldap\_uids** -Same as top-level [ldap_uids](/archive/23_04/toplevel/#ldap-uids) option, but applied to this module only. +Same as top-level [ldap_uids](toplevel.md#ldap_uids) option, but applied to this module only. - **ldap\_vcard\_map**: *{Name: {Pattern, LDAPattributes}, ...}* With this option you can set the table that maps LDAP attributes to @@ -3779,31 +3778,31 @@ that change frequently their presence. However, the overhead is significantly reduced by the use of caching, so you probably don’t want to set *use\_cache* to *false*. -The module depends on [mod_vcard](/archive/23_04/modules/#mod-vcard). +The module depends on [mod_vcard](modules.md#mod_vcard). > **Note** > > Nowadays [XEP-0153](https://xmpp.org/extensions/xep-0153.html) is used > mostly as "read-only", i.e. modern clients don’t publish their avatars > inside vCards. Thus in the majority of cases the module is only used -> along with [mod_avatar](/archive/23_04/modules/#mod-avatar) for providing backward compatibility. +> along with [mod_avatar](modules.md#mod_avatar) for providing backward compatibility. __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/23_04/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/23_04/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/23_04/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/23_04/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_version ------------ diff --git a/content/archive/23_04/toplevel.md b/content/archive/23.04/toplevel.md similarity index 82% rename from content/archive/23_04/toplevel.md rename to content/archive/23.04/toplevel.md index 6e558bfa..954625fb 100644 --- a/content/archive/23_04/toplevel.md +++ b/content/archive/23.04/toplevel.md @@ -1,21 +1,20 @@ --- -title: Top-Level Options -toc: true -menu: Top-Level Opts -order: 80 +search: + exclude: true --- +# Top-Level Options ## access\_rules *{AccessName: {allow|deny: ACLRules|ACLName}}* -This option defines [Access Rules](/admin/configuration/basic/#access-rules). Each +This option defines [Access Rules](../../admin/configuration/basic.md#access_rules). Each access rule is assigned a name that can be referenced from other parts of the configuration file (mostly from *access* options of ejabberd modules). Each rule definition may contain arbitrary number of *allow* or *deny* sections, and each section may contain any number of ACL rules -(see [acl](/archive/23_04/toplevel/#acl) option). There are no access rules defined by default. +(see [acl](toplevel.md#acl) option). There are no access rules defined by default. **Example**: @@ -52,7 +51,7 @@ address). Every set of rules has name *ACLName*: it can be any string except *all* or *none* (those are predefined names for the rules that match all or nothing respectively). The name *ACLName* can be referenced from other parts of the configuration file, for example in -[access_rules](/archive/23_04/toplevel/#access-rules) option. The rules of *ACLName* are represented by +[access_rules](toplevel.md#access_rules) option. The rules of *ACLName* are represented by mapping *{ACLType: ACLValue}*. These can be one of the following: - **ip**: *Network* @@ -120,7 +119,7 @@ mapping *{ACLType: ACLValue}*. These can be one of the following: *Options* -[ACME](/admin/configuration/basic/#acme) configuration, to automatically obtain SSL +[ACME](../../admin/configuration/basic.md#acme) configuration, to automatically obtain SSL certificates for the domains served by ejabberd, which means that certificate requests and renewals are performed to some CA server (aka "ACME server") in a fully automated mode. The *Options* are: @@ -214,22 +213,22 @@ specific modules to certain virtual hosts. To accomplish that, *timeout()* -Same as [cache_life_time](/archive/23_04/toplevel/#cache-life-time), but applied to authentication cache only. -If not set, the value from [cache_life_time](/archive/23_04/toplevel/#cache-life-time) will be used. +Same as [cache_life_time](toplevel.md#cache_life_time), but applied to authentication cache only. +If not set, the value from [cache_life_time](toplevel.md#cache_life_time) will be used. ## auth\_cache\_missed *true | false* -Same as [cache_missed](/archive/23_04/toplevel/#cache-missed), but applied to authentication cache only. If -not set, the value from [cache_missed](/archive/23_04/toplevel/#cache-missed) will be used. +Same as [cache_missed](toplevel.md#cache_missed), but applied to authentication cache only. If +not set, the value from [cache_missed](toplevel.md#cache_missed) will be used. ## auth\_cache\_size *pos\_integer() | infinity* -Same as [cache_size](/archive/23_04/toplevel/#cache-size), but applied to authentication cache only. If not -set, the value from [cache_size](/archive/23_04/toplevel/#cache-size) will be used. +Same as [cache_size](toplevel.md#cache_size), but applied to authentication cache only. If not +set, the value from [cache_size](toplevel.md#cache_size) will be used. ## auth\_method @@ -248,7 +247,7 @@ be installed from the [ejabberd-contrib](https://github.com/processone/ejabberd-contrib) Git repository. Please refer to that module’s README file for details. -
improved in 20.01
+
improved in 20.01
## auth\_password\_format @@ -282,8 +281,8 @@ authenticate. The default value is *sha*. *true | false* -Same as [use_cache](/archive/23_04/toplevel/#use-cache), but applied to authentication cache only. If not -set, the value from [use_cache](/archive/23_04/toplevel/#use-cache) will be used. +Same as [use_cache](toplevel.md#use_cache), but applied to authentication cache only. If not +set, the value from [use_cache](toplevel.md#use_cache) will be used. ## c2s\_cafile @@ -294,11 +293,11 @@ format. All client certificates should be signed by one of these root CA certificates and should contain the corresponding JID(s) in *subjectAltName* field. There is no default value. -You can use [host\_config](/archive/23_04/toplevel/#host-config) to specify +You can use [host\_config](toplevel.md#host_config) to specify this option per-vhost. To set a specific file per listener, use the listener’s -[cafile](/archive/23_04/listen-options/#cafile) option. Please notice that +[cafile](listen-options.md#cafile) option. Please notice that *c2s\_cafile* overrides the listener’s *cafile* option. ## c2s\_ciphers @@ -357,7 +356,7 @@ Path to a file of CA root certificates. The default is to use system defined file if possible. For server connections, this *ca\_file* option is overridden by the -[s2s\_cafile](/archive/23_04/toplevel/#s2s-cafile) option. +[s2s\_cafile](toplevel.md#s2s-cafile) option. ## cache\_life\_time @@ -366,9 +365,9 @@ For server connections, this *ca\_file* option is overridden by the The time of a cached item to keep in cache. Once it’s expired, the corresponding item is erased from cache. The default value is *1 hour*. Several modules have a similar option; and some core ejabberd parts -support similar options too, see [auth_cache_life_time](/archive/23_04/toplevel/#auth-cache-life-time), -[oauth_cache_life_time](/archive/23_04/toplevel/#oauth-cache-life-time), [router_cache_life_time](/archive/23_04/toplevel/#router-cache-life-time), and -[sm_cache_life_time](/archive/23_04/toplevel/#sm-cache-life-time). +support similar options too, see [auth_cache_life_time](toplevel.md#auth_cache_life_time), +[oauth_cache_life_time](toplevel.md#oauth_cache_life_time), [router_cache_life_time](toplevel.md#router_cache_life_time), and +[sm_cache_life_time](toplevel.md#sm_cache_life_time). ## cache\_missed @@ -377,11 +376,11 @@ support similar options too, see [auth_cache_life_time](/archive/23_04/toplevel/ Whether or not to cache missed lookups. When there is an attempt to lookup for a value in a database and this value is not found and the option is set to *true*, this attempt will be cached and no attempts -will be performed until the cache expires (see [cache_life_time](/archive/23_04/toplevel/#cache-life-time)). +will be performed until the cache expires (see [cache_life_time](toplevel.md#cache_life_time)). Usually you don’t want to change it. Default is *true*. Several modules have a similar option; and some core ejabberd parts support similar -options too, see [auth_cache_missed](/archive/23_04/toplevel/#auth-cache-missed), [oauth_cache_missed](/archive/23_04/toplevel/#oauth-cache-missed), -[router_cache_missed](/archive/23_04/toplevel/#router-cache-missed), and [sm_cache_missed](/archive/23_04/toplevel/#sm-cache-missed). +options too, see [auth_cache_missed](toplevel.md#auth_cache_missed), [oauth_cache_missed](toplevel.md#oauth_cache_missed), +[router_cache_missed](toplevel.md#router_cache_missed), and [sm_cache_missed](toplevel.md#sm_cache_missed). ## cache\_size @@ -395,16 +394,16 @@ items are deleted, and the corresponding warning is logged. You should avoid frequent cache clearance, because this degrades performance. The default value is *1000*. Several modules have a similar option; and some core ejabberd parts support similar options too, see -[auth_cache_size](/archive/23_04/toplevel/#auth-cache-size), [oauth_cache_size](/archive/23_04/toplevel/#oauth-cache-size), [router_cache_size](/archive/23_04/toplevel/#router-cache-size), and -[sm_cache_size](/archive/23_04/toplevel/#sm-cache-size). +[auth_cache_size](toplevel.md#auth_cache_size), [oauth_cache_size](toplevel.md#oauth_cache_size), [router_cache_size](toplevel.md#router_cache_size), and +[sm_cache_size](toplevel.md#sm_cache_size). -
improved in 23.01
+
improved in 23.01
## captcha\_cmd *Path | ModuleName* -Full path to a script that generates [CAPTCHA](/admin/configuration/basic/#captcha) +Full path to a script that generates [CAPTCHA](../../admin/configuration/basic.md#captcha) images. *@VERSION@* is replaced with ejabberd version number in *XX.YY* format. *@SEMVER@* is replaced with ejabberd version number in semver format when compiled with Elixir’s mix, or XX.YY format otherwise. @@ -421,28 +420,28 @@ captcha scripts can be used like this: *String* -Deprecated. Use [captcha_url](/archive/23_04/toplevel/#captcha-url) instead. +Deprecated. Use [captcha_url](toplevel.md#captcha_url) instead. ## captcha\_limit *pos\_integer() | infinity* -Maximum number of [CAPTCHA](/admin/configuration/basic/#captcha) generated images +Maximum number of [CAPTCHA](../../admin/configuration/basic.md#captcha) generated images per minute for any given JID. The option is intended to protect the server from CAPTCHA DoS. The default value is *infinity*. -
improved in 23.04
+
improved in 23.04
## captcha\_url *URL | auto | undefined* -An URL where [CAPTCHA](/admin/configuration/basic/#captcha) requests should be +An URL where [CAPTCHA](../../admin/configuration/basic.md#captcha) requests should be sent. NOTE: you need to configure *request\_handlers* for *ejabberd\_http* listener as well. If set to *auto*, it builds the URL using a *request\_handler* already enabled, with encryption if available. If set to *undefined*, it builds the URL using the deprecated -[captcha_host](/archive/23_04/toplevel/#captcha-host) + /captcha. The default value is *auto*. +[captcha_host](toplevel.md#captcha_host) + /captcha. The default value is *auto*. ## certfiles @@ -715,7 +714,7 @@ attribute, the specified language is used. The default value is *"en"*. *\[Host, ...\]* A list of IP addresses or DNS names of LDAP backup servers. When no -servers listed in [ldap_servers](/archive/23_04/toplevel/#ldap-servers) option are reachable, ejabberd will +servers listed in [ldap_servers](toplevel.md#ldap_servers) option are reachable, ejabberd will try to connect to these backup servers. The default is an empty list, i.e. no backup servers specified. WARNING: ejabberd doesn’t try to reconnect back to the main servers when they become operational again, @@ -750,7 +749,7 @@ variables are consecutively replaced by values from the attributes in *FilterAttrs* and "%D" is replaced by Distinguished Name from the result set. There is no default value, which means the result is not filtered. WARNING: Since this filter makes additional LDAP lookups, use it only as -the last resort: try to define all filter rules in [ldap_filter](/archive/23_04/toplevel/#ldap-filter) +the last resort: try to define all filter rules in [ldap_filter](toplevel.md#ldap_filter) option if possible. **Example**: @@ -857,9 +856,9 @@ JID. For example, "%.org". If the value is in the form of *\[Options, ...\]* The option for listeners configuration. See the [Listen -Modules](/archive/23_04/listen/) section for details. +Modules](./listen.md/) section for details. -
added in 22.10
+
added in 22.10
## log\_burst\_limit\_count @@ -868,7 +867,7 @@ Modules](/archive/23_04/listen/) section for details. The number of messages to accept in `log_burst_limit_window_time` period before starting to drop them. Default 500 -
added in 22.10
+
added in 22.10
## log\_burst\_limit\_window\_time @@ -876,7 +875,7 @@ before starting to drop them. Default 500 The time period to rate-limit log messages by. Defaults to 1 second. -
added in 23.01
+
added in 23.01
## log\_modules\_fully @@ -927,7 +926,7 @@ value is *10000*. *{Module: Options}* -The option for modules configuration. See [Modules](/archive/23_04/modules/) +The option for modules configuration. See [Modules](./modules.md/) section for details. ## negotiation\_timeout @@ -976,17 +975,17 @@ can create OAuth tokens, you can refer to an ejabberd access rule in the *timeout()* -Same as [cache_life_time](/archive/23_04/toplevel/#cache-life-time), but applied to OAuth cache only. If not -set, the value from [cache_life_time](/archive/23_04/toplevel/#cache-life-time) will be used. +Same as [cache_life_time](toplevel.md#cache_life_time), but applied to OAuth cache only. If not +set, the value from [cache_life_time](toplevel.md#cache_life_time) will be used. ## oauth\_cache\_missed *true | false* -Same as [cache_missed](/archive/23_04/toplevel/#cache-missed), but applied to OAuth cache only. If not set, -the value from [cache_missed](/archive/23_04/toplevel/#cache-missed) will be used. +Same as [cache_missed](toplevel.md#cache_missed), but applied to OAuth cache only. If not set, +the value from [cache_missed](toplevel.md#cache_missed) will be used. -
added in 21.01
+
added in 21.01
## oauth\_cache\_rest\_failure\_life\_time @@ -999,8 +998,8 @@ The time that a failure in OAuth ReST is cached. The default value is *pos\_integer() | infinity* -Same as [cache_size](/archive/23_04/toplevel/#cache-size), but applied to OAuth cache only. If not set, the -value from [cache_size](/archive/23_04/toplevel/#cache-size) will be used. +Same as [cache_size](toplevel.md#cache_size), but applied to OAuth cache only. If not set, the +value from [cache_size](toplevel.md#cache_size) will be used. ## oauth\_client\_id\_check @@ -1015,7 +1014,7 @@ value is *allow*. *mnesia | sql* Database backend to use for OAuth authentication. The default value is -picked from [default_db](/archive/23_04/toplevel/#default-db) option, or if it’s not set, *mnesia* will be +picked from [default_db](toplevel.md#default_db) option, or if it’s not set, *mnesia* will be used. ## oauth\_expire @@ -1030,15 +1029,15 @@ used and is removed from the database. The default is *4294967* seconds. *true | false* -Same as [use_cache](/archive/23_04/toplevel/#use-cache), but applied to OAuth cache only. If not set, the -value from [use_cache](/archive/23_04/toplevel/#use-cache) will be used. +Same as [use_cache](toplevel.md#use_cache), but applied to OAuth cache only. If not set, the +value from [use_cache](toplevel.md#use_cache) will be used. ## oom\_killer *true | false* Enable or disable OOM (out-of-memory) killer. When system memory raises -above the limit defined in [oom_watermark](/archive/23_04/toplevel/#oom-watermark) option, ejabberd triggers +above the limit defined in [oom_watermark](toplevel.md#oom_watermark) option, ejabberd triggers OOM killer to terminate most memory consuming Erlang processes. Note that in order to maintain functionality, ejabberd only attempts to kill transient processes, such as those managing client sessions, s2s or @@ -1050,7 +1049,7 @@ database connections. The default value is *true*. Trigger OOM killer when some of the running Erlang processes have messages queue above this *Size*. Note that such processes won’t be -killed if [oom_killer](/archive/23_04/toplevel/#oom-killer) option is set to *false* or if *oom\_watermark* +killed if [oom_killer](toplevel.md#oom_killer) option is set to *false* or if *oom\_watermark* is not reached yet. ## oom\_watermark @@ -1059,10 +1058,10 @@ is not reached yet. A percent of total system memory consumed at which OOM killer should be activated with some of the processes possibly be killed (see -[oom_killer](/archive/23_04/toplevel/#oom-killer) option). Later, when memory drops below this *Percent*, +[oom_killer](toplevel.md#oom_killer) option). Later, when memory drops below this *Percent*, OOM killer is deactivated. The default value is *80* percents. -
changed in 23.01
+
changed in 23.01
## outgoing\_s2s\_families @@ -1071,9 +1070,9 @@ OOM killer is deactivated. The default value is *80* percents. Specify which address families to try, in what order. The default is *\[ipv6, ipv4\]* which means it first tries connecting with IPv6, if that fails it tries using IPv4. This option is obsolete and irrelevant -when using ejabberd 23.01 and Erlang/OTP 22, or newer versions of them. +when using ejabberd 23.01 and Erlang/OTP 22, or newer versions of them. -
added in 20.12
+
added in 20.12
## outgoing\_s2s\_ipv4\_address @@ -1083,7 +1082,7 @@ Specify the IPv4 address that will be used when establishing an outgoing S2S IPv4 connection, for example "127.0.0.1". The default value is *undefined*. -
added in 20.12
+
added in 20.12
## outgoing\_s2s\_ipv6\_address @@ -1134,7 +1133,7 @@ default value is *false*. *Directory* -If [queue_type](/archive/23_04/toplevel/#queue-type) option is set to *file*, use this *Directory* to store +If [queue_type](toplevel.md#queue_type) option is set to *file*, use this *Directory* to store file queues. The default is to keep queues inside Mnesia directory. ## queue\_type @@ -1143,7 +1142,7 @@ file queues. The default is to keep queues inside Mnesia directory. Default type of queues in ejabberd. Modules may have its own value of the option. The value of *ram* means that queues will be kept in memory. -If value *file* is set, you may also specify directory in [queue_dir](/archive/23_04/toplevel/#queue-dir) +If value *file* is set, you may also specify directory in [queue_dir](toplevel.md#queue_dir) option where file queues will be placed. The default value is *ram*. ## redis\_connect\_timeout @@ -1185,8 +1184,8 @@ The port where the Redis server is accepting connections. The default is *ram | file* The type of request queue for the Redis server. See description of -[queue_type](/archive/23_04/toplevel/#queue-type) option for the explanation. The default value is the -value defined in [queue_type](/archive/23_04/toplevel/#queue-type) or *ram* if the latter is not set. +[queue_type](toplevel.md#queue_type) option for the explanation. The default value is the +value defined in [queue_type](toplevel.md#queue_type) or *ram* if the latter is not set. ## redis\_server @@ -1199,7 +1198,7 @@ A hostname or an IP address of the Redis server. The default is *timeout()* -This is a global option for module [mod_register](/archive/23_04/modules/#mod-register). It limits the +This is a global option for module [mod_register](modules.md#mod_register). It limits the frequency of registrations from a given IP or username. So, a user that tries to register a new account from the same IP address or JID during this time after their previous registration will receive an error with @@ -1222,37 +1221,37 @@ action performed is *closeold*. *timeout()* -Same as [cache_life_time](/archive/23_04/toplevel/#cache-life-time), but applied to routing table cache only. If -not set, the value from [cache_life_time](/archive/23_04/toplevel/#cache-life-time) will be used. +Same as [cache_life_time](toplevel.md#cache_life_time), but applied to routing table cache only. If +not set, the value from [cache_life_time](toplevel.md#cache_life_time) will be used. ## router\_cache\_missed *true | false* -Same as [cache_missed](/archive/23_04/toplevel/#cache-missed), but applied to routing table cache only. If -not set, the value from [cache_missed](/archive/23_04/toplevel/#cache-missed) will be used. +Same as [cache_missed](toplevel.md#cache_missed), but applied to routing table cache only. If +not set, the value from [cache_missed](toplevel.md#cache_missed) will be used. ## router\_cache\_size *pos\_integer() | infinity* -Same as [cache_size](/archive/23_04/toplevel/#cache-size), but applied to routing table cache only. If not -set, the value from [cache_size](/archive/23_04/toplevel/#cache-size) will be used. +Same as [cache_size](toplevel.md#cache_size), but applied to routing table cache only. If not +set, the value from [cache_size](toplevel.md#cache_size) will be used. ## router\_db\_type *mnesia | redis | sql* Database backend to use for routing information. The default value is -picked from [default_ram_db](/archive/23_04/toplevel/#default-ram-db) option, or if it’s not set, *mnesia* will +picked from [default_ram_db](toplevel.md#default_ram_db) option, or if it’s not set, *mnesia* will be used. ## router\_use\_cache *true | false* -Same as [use_cache](/archive/23_04/toplevel/#use-cache), but applied to routing table cache only. If not -set, the value from [use_cache](/archive/23_04/toplevel/#use-cache) will be used. +Same as [use_cache](toplevel.md#use_cache), but applied to routing table cache only. If not +set, the value from [use_cache](toplevel.md#use_cache) will be used. ## rpc\_timeout @@ -1266,7 +1265,7 @@ are used for internal needs only. The default value is *5* seconds. *Access* -This [Access Rule](/admin/configuration/basic/#access-rules) defines to what remote +This [Access Rule](../../admin/configuration/basic.md#access_rules) defines to what remote servers can s2s connections be established. The default value is *all*; no restrictions are applied, it is allowed to connect s2s to/from all remote servers. @@ -1277,9 +1276,9 @@ remote servers. A path to a file with CA root certificates that will be used to authenticate s2s connections. If not set, the value of -[ca\_file](/archive/23_04/toplevel/#ca-file) will be used. +[ca\_file](toplevel.md#ca_file) will be used. -You can use [host\_config](/archive/23_04/toplevel/#host-config) to specify +You can use [host\_config](toplevel.md#host_config) to specify this option per-vhost. ## s2s\_ciphers @@ -1347,9 +1346,9 @@ below: *ram | file* -The type of a queue for s2s packets. See description of [queue_type](/archive/23_04/toplevel/#queue-type) +The type of a queue for s2s packets. See description of [queue_type](toplevel.md#queue_type) option for the explanation. The default value is the value defined in -[queue_type](/archive/23_04/toplevel/#queue-type) or *ram* if the latter is not set. +[queue_type](toplevel.md#queue_type) or *ram* if the latter is not set. ## s2s\_timeout @@ -1390,7 +1389,7 @@ considered insecure. The option defines a set of shapers. Every shaper is assigned a name *ShaperName* that can be used in other parts of the configuration file, -such as [shaper_rules](/archive/23_04/toplevel/#shaper-rules) option. The shaper itself is defined by its +such as [shaper_rules](toplevel.md#shaper_rules) option. The shaper itself is defined by its *Rate*, where *Rate* stands for the maximum allowed incoming rate in **bytes** per second. When a connection exceeds this limit, ejabberd stops reading from the socket until the average rate is again below the @@ -1409,9 +1408,9 @@ speed to 1,000 bytes/sec and shaper *fast* limits the traffic speed to *{ShaperRuleName: {Number|ShaperName: ACLRule|ACLName}}* An entry allowing to declaring shaper to use for matching user/hosts. -Semantics is similar to [access_rules](/archive/23_04/toplevel/#access-rules) option, the only difference is +Semantics is similar to [access_rules](toplevel.md#access_rules) option, the only difference is that instead using *allow* or *deny*, a name of a shaper (defined in -[shaper](/archive/23_04/toplevel/#shaper) option) or a positive number should be used. +[shaper](toplevel.md#shaper) option) or a positive number should be used. **Example**: @@ -1431,37 +1430,37 @@ that instead using *allow* or *deny*, a name of a shaper (defined in *timeout()* -Same as [cache_life_time](/archive/23_04/toplevel/#cache-life-time), but applied to client sessions table cache -only. If not set, the value from [cache_life_time](/archive/23_04/toplevel/#cache-life-time) will be used. +Same as [cache_life_time](toplevel.md#cache_life_time), but applied to client sessions table cache +only. If not set, the value from [cache_life_time](toplevel.md#cache_life_time) will be used. ## sm\_cache\_missed *true | false* -Same as [cache_missed](/archive/23_04/toplevel/#cache-missed), but applied to client sessions table cache -only. If not set, the value from [cache_missed](/archive/23_04/toplevel/#cache-missed) will be used. +Same as [cache_missed](toplevel.md#cache_missed), but applied to client sessions table cache +only. If not set, the value from [cache_missed](toplevel.md#cache_missed) will be used. ## sm\_cache\_size *pos\_integer() | infinity* -Same as [cache_size](/archive/23_04/toplevel/#cache-size), but applied to client sessions table cache only. -If not set, the value from [cache_size](/archive/23_04/toplevel/#cache-size) will be used. +Same as [cache_size](toplevel.md#cache_size), but applied to client sessions table cache only. +If not set, the value from [cache_size](toplevel.md#cache_size) will be used. ## sm\_db\_type *mnesia | redis | sql* Database backend to use for client sessions information. The default -value is picked from [default_ram_db](/archive/23_04/toplevel/#default-ram-db) option, or if it’s not set, +value is picked from [default_ram_db](toplevel.md#default_ram_db) option, or if it’s not set, *mnesia* will be used. ## sm\_use\_cache *true | false* -Same as [use_cache](/archive/23_04/toplevel/#use-cache), but applied to client sessions table cache only. -If not set, the value from [use_cache](/archive/23_04/toplevel/#use-cache) will be used. +Same as [use_cache](toplevel.md#use_cache), but applied to client sessions table cache only. +If not set, the value from [use_cache](toplevel.md#use_cache) will be used. ## sql\_connect\_timeout @@ -1485,15 +1484,15 @@ An interval to make a dummy SQL request to keep alive the connections to the database. There is no default value, so no keepalive requests are made. -
added in 20.12
+
added in 20.12
## sql\_odbc\_driver *Path* Path to the ODBC driver to use to connect to a Microsoft SQL Server -database. This option only applies if the [sql_type](/archive/23_04/toplevel/#sql-type) option is set to -*mssql* and [sql_server](/archive/23_04/toplevel/#sql-server) is not an ODBC connection string. The default +database. This option only applies if the [sql_type](toplevel.md#sql_type) option is set to +*mssql* and [sql_server](toplevel.md#sql_server) is not an ODBC connection string. The default value is: *libtdsodbc.so* ## sql\_password @@ -1519,7 +1518,7 @@ The port where the SQL server is accepting connections. The default is *3306* for MySQL, *5432* for PostgreSQL and *1433* for MS SQL. The option has no effect for SQLite. -
added in 20.01
+
added in 20.01
## sql\_prepared\_statements @@ -1540,18 +1539,18 @@ seconds. *ram | file* The type of a request queue for the SQL server. See description of -[queue_type](/archive/23_04/toplevel/#queue-type) option for the explanation. The default value is the -value defined in [queue_type](/archive/23_04/toplevel/#queue-type) or *ram* if the latter is not set. +[queue_type](toplevel.md#queue_type) option for the explanation. The default value is the +value defined in [queue_type](toplevel.md#queue_type) or *ram* if the latter is not set. ## sql\_server *Host* -The hostname or IP address of the SQL server. For [sql_type](/archive/23_04/toplevel/#sql-type) *mssql* +The hostname or IP address of the SQL server. For [sql_type](toplevel.md#sql_type) *mssql* or *odbc* this can also be an ODBC connection string. The default value is *localhost*. -
improved in 20.03
+
improved in 20.03
## sql\_ssl @@ -1566,7 +1565,7 @@ is only available for MySQL, MS SQL and PostgreSQL. The default value is *Path* A path to a file with CA root certificates that will be used to verify -SQL connections. Implies [sql_ssl](/archive/23_04/toplevel/#sql-ssl) and [sql_ssl_verify](/archive/23_04/toplevel/#sql-ssl-verify) options are +SQL connections. Implies [sql_ssl](toplevel.md#sql_ssl) and [sql_ssl_verify](toplevel.md#sql_ssl_verify) options are set to *true*. There is no default which means certificate verification is disabled. This option has no effect for MS SQL. @@ -1575,7 +1574,7 @@ is disabled. This option has no effect for MS SQL. *Path* A path to a certificate file that will be used for SSL connections to -the SQL server. Implies [sql_ssl](/archive/23_04/toplevel/#sql-ssl) option is set to *true*. There is no +the SQL server. Implies [sql_ssl](toplevel.md#sql_ssl) option is set to *true*. There is no default which means ejabberd won’t provide a client certificate to the SQL server. This option has no effect for MS SQL. @@ -1584,7 +1583,7 @@ SQL server. This option has no effect for MS SQL. *true | false* Whether to verify SSL connection to the SQL server against CA root -certificates defined in [sql_ssl_cafile](/archive/23_04/toplevel/#sql-ssl-cafile) option. Implies [sql_ssl](/archive/23_04/toplevel/#sql-ssl) +certificates defined in [sql_ssl_cafile](toplevel.md#sql_ssl_cafile) option. Implies [sql_ssl](toplevel.md#sql_ssl) option is set to *true*. This option has no effect for MS SQL. The default value is *false*. @@ -1627,8 +1626,8 @@ trusted for security rules in ejabberd. Enable or disable cache. The default is *true*. Several modules have a similar option; and some core ejabberd parts support similar options -too, see [auth_use_cache](/archive/23_04/toplevel/#auth-use-cache), [oauth_use_cache](/archive/23_04/toplevel/#oauth-use-cache), [router_use_cache](/archive/23_04/toplevel/#router-use-cache), -and [sm_use_cache](/archive/23_04/toplevel/#sm-use-cache). +too, see [auth_use_cache](toplevel.md#auth_use_cache), [oauth_use_cache](toplevel.md#oauth_use_cache), [router_use_cache](toplevel.md#router_use_cache), +and [sm_use_cache](toplevel.md#sm_use_cache). ## validate\_stream @@ -1646,7 +1645,7 @@ value is *false*. *string()* The option can be used to set custom ejabberd version, that will be used -by different parts of ejabberd, for example by [mod_version](/archive/23_04/modules/#mod-version) module. +by different parts of ejabberd, for example by [mod_version](modules.md#mod_version) module. The default value is obtained at compile time from the underlying version control system. diff --git a/content/admin/upgrade/from_23.01_to_23.04.md b/content/archive/23.04/upgrade.md similarity index 96% rename from content/admin/upgrade/from_23.01_to_23.04.md rename to content/archive/23.04/upgrade.md index 26d208a0..5277e6e9 100644 --- a/content/admin/upgrade/from_23.01_to_23.04.md +++ b/content/archive/23.04/upgrade.md @@ -1,19 +1,16 @@ ---- -title: Upgrade to ejabberd 23.04 -toc: true ---- +# Upgrade to ejabberd 23.04 There is a new module, new hooks, new options, and some option accepts additional values, and more importantly, there are many improvements in the SQL schemas, and a change in the `ecs` container image. -Please check the ejabberd [23.04](/archive/23_04/) release announcement for details +Please check the ejabberd [23.04](../../archive/23.04/index.md) release announcement for details about the improvements. ## Many improvements in SQL databases There are many improvements in the SQL databases field (see [#3980](https://github.com/processone/ejabberd/pull/3980) and [#3982](https://github.com/processone/ejabberd/pull/3982)): -- Added support to migrate MySQL and MS SQL to [new schema](https://docs.ejabberd.im/admin/configuration/database/#default-and-new-schemas), fixed a long standing bug, and many other improvements. +- Added support to migrate MySQL and MS SQL to [new schema](https://docs.ejabberd.im/admin/configuration/database/#default_and_new_schemas), fixed a long standing bug, and many other improvements. - Regarding MS SQL, there are schema fixes, added support to `new` schema, and the corresponding schema migration, along other minor improvements and bugfixes. - The automated ejabberd testing now also runs tests on upgraded schema databases, and supports for running tests on MS SQL - And also fixed other minor SQL schema inconsistencies, removed unnecessary indexes and changed PostgreSQL SERIAL to BIGSERIAL columns. @@ -26,7 +23,7 @@ Please upgrade your existing SQL database, check the notes later in this documen The `ecs` container image is built using the files from [docker-ejabberd/ecs](https://github.com/processone/docker-ejabberd/tree/master/ecs), and published in [docker.io/ejabberd/ecs](https://hub.docker.com/r/ejabberd/ecs/). This image in general gets only minimal fixes, no major or breaking changes, but in this release it got a change that will require the administrator intervention. The Erlang node name is now by default fixed to `ejabberd@localhost`, instead of being variably set by the container host name. If you previously allowed ejabberd to decide its node name (which was random), then it will now create a new mnesia database instead of using the previous one: -```bash +``` bash $ docker exec -it ejabberd ls /home/ejabberd/database/ ejabberd@1ca968a0301a ejabberd@localhost @@ -34,11 +31,11 @@ ejabberd@localhost ``` A simple solution is to create the container providing `ERLANG_NODE_ARG` with the old erlang node name, for example: -```bash +``` bash docker run ... -e ERLANG_NODE_ARG=ejabberd@1ca968a0301a ``` or in docker-compose.yml -```yaml +``` yaml version: '3.7' services: main: @@ -52,12 +49,12 @@ Another solution is to [change the mnesia node name](https://github.com/processo ## SQL databases update -Those notes allow to apply the improvements in the SQL database schemas from this ejabberd release to your existing SQL database. Please take into account what database you use, and whether it is the [default or the new schema](https://docs.ejabberd.im/admin/configuration/database/#default-and-new-schemas). +Those notes allow to apply the improvements in the SQL database schemas from this ejabberd release to your existing SQL database. Please take into account what database you use, and whether it is the [default or the new schema](https://docs.ejabberd.im/admin/configuration/database/#default_and_new_schemas). ### PostgreSQL new schema Fix a long standing bug in new schema on PostgreSQL. The fix for any existing impacted installations is the same: -```sql +``` sql ALTER TABLE vcard_search DROP CONSTRAINT vcard_search_pkey; ALTER TABLE vcard_search ADD PRIMARY KEY (server_host, lusername); ``` @@ -66,7 +63,7 @@ ALTER TABLE vcard_search ADD PRIMARY KEY (server_host, lusername); To convert columns to allow up to 2 billion rows in these tables. This conversion will require full table rebuilds, and will take a long time if tables already have lots of rows. Optional: this is not necessary if the tables are never likely to grow large. -```sql +``` sql ALTER TABLE archive ALTER COLUMN id TYPE BIGINT; ALTER TABLE privacy_list ALTER COLUMN id TYPE BIGINT; ALTER TABLE pubsub_node ALTER COLUMN nodeid TYPE BIGINT; @@ -76,7 +73,7 @@ ALTER TABLE spool ALTER COLUMN seq TYPE BIGINT; ### PostgreSQL/SQLite default schema -```sql +``` sql DROP INDEX i_rosteru_username; DROP INDEX i_sr_user_jid; DROP INDEX i_privacy_list_username; @@ -91,7 +88,7 @@ DROP INDEX i_mix_pam_us; ### PostgreSQL/SQLite new schema -```sql +``` sql DROP INDEX i_rosteru_sh_username; DROP INDEX i_sr_user_sh_jid; DROP INDEX i_privacy_list_sh_username; @@ -107,18 +104,18 @@ DROP INDEX i_mix_pam_us; And now add index that might be missing In PostgreSQL: -```sql +``` sql CREATE INDEX i_push_session_sh_username_timestamp ON push_session USING btree (server_host, username, timestamp); ``` In SQLite: -```sql +``` sql CREATE INDEX i_push_session_sh_username_timestamp ON push_session (server_host, username, timestamp); ``` ### MySQL default schema -```sql +``` sql ALTER TABLE rosterusers DROP INDEX i_rosteru_username; ALTER TABLE sr_user DROP INDEX i_sr_user_jid; ALTER TABLE privacy_list DROP INDEX i_privacy_list_username; @@ -133,7 +130,7 @@ ALTER TABLE mix_pam DROP INDEX i_mix_pam_u; ### MySQL new schema -```sql +``` sql ALTER TABLE rosterusers DROP INDEX i_rosteru_sh_username; ALTER TABLE sr_user DROP INDEX i_sr_user_sh_jid; ALTER TABLE privacy_list DROP INDEX i_privacy_list_sh_username; @@ -146,13 +143,13 @@ ALTER TABLE mix_subscription DROP INDEX i_mix_subscription_chan_serv; ALTER TABLE mix_pam DROP INDEX i_mix_pam_us; ``` Add index that might be missing: -```sql +``` sql CREATE INDEX i_push_session_sh_username_timestamp ON push_session (server_host, username(191), timestamp); ``` ### MS SQL -```sql +``` sql DROP INDEX [rosterusers_username] ON [rosterusers]; DROP INDEX [sr_user_jid] ON [sr_user]; DROP INDEX [privacy_list_username] ON [privacy_list]; @@ -164,7 +161,7 @@ go MS SQL schema was missing some tables added in earlier versions of ejabberd: -```sql +``` sql CREATE TABLE [dbo].[mix_channel] ( [channel] [varchar] (250) NOT NULL, [service] [varchar] (250) NOT NULL, @@ -236,7 +233,7 @@ go MS SQL also had some incompatible column types: -```sql +``` sql ALTER TABLE [dbo].[muc_online_room] ALTER COLUMN [node] VARCHAR (250); ALTER TABLE [dbo].[muc_online_room] ALTER COLUMN [pid] VARCHAR (100); ALTER TABLE [dbo].[muc_online_users] ALTER COLUMN [node] VARCHAR (250); @@ -248,7 +245,7 @@ go ... and `mqtt_pub` table was incorrectly defined in old schema: -```sql +``` sql ALTER TABLE [dbo].[mqtt_pub] DROP CONSTRAINT [i_mqtt_topic_server]; ALTER TABLE [dbo].[mqtt_pub] DROP COLUMN [server_host]; ALTER TABLE [dbo].[mqtt_pub] ALTER COLUMN [resource] VARCHAR (250); @@ -261,7 +258,7 @@ go ... and `sr_group` index/PK was inconsistent with other DBs: -```sql +``` sql ALTER TABLE [dbo].[sr_group] DROP CONSTRAINT [sr_group_PRIMARY]; CREATE UNIQUE CLUSTERED INDEX [sr_group_name] ON [sr_group] ([name]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON); diff --git a/content/archive/23_10/admin-api.md b/content/archive/23.10/admin-api.md similarity index 84% rename from content/archive/23_10/admin-api.md rename to content/archive/23.10/admin-api.md index 94da09f2..0f5937b2 100644 --- a/content/archive/23_10/admin-api.md +++ b/content/archive/23.10/admin-api.md @@ -1,12 +1,11 @@ --- -title: Administration API reference -toc: true -menu: API Reference -order: 1 -// Autogenerated with 'ejabberdctl gen_markdown_doc_for_commands' +search: + exclude: true --- -
added in 22.05
+# API Reference + +
added in 22.05
## abort_delete_old_mam_messages @@ -22,10 +21,10 @@ __Result:__ - *status* :: string : Status text __Tags:__ -[purge](/archive/23_10/admin-tags/#purge) +[purge](admin-tags.md#purge) __Module:__ -[mod_mam](/archive/23_10/modules/#mod-mam) +[mod_mam](modules.md#mod_mam) __Examples:__ @@ -41,7 +40,7 @@ __Examples:__ ~~~ -
added in 22.05
+
added in 22.05
## abort_delete_old_messages @@ -57,7 +56,7 @@ __Result:__ - *status* :: string : Status text __Tags:__ -[purge](/archive/23_10/admin-tags/#purge) +[purge](admin-tags.md#purge) __Examples:__ @@ -98,10 +97,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[roster](/archive/23_10/admin-tags/#roster) +[roster](admin-tags.md#roster) __Module:__ -[mod_admin_extra](/archive/23_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -139,7 +138,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/archive/23_10/admin-tags/#mnesia) +[mnesia](admin-tags.md#mnesia) __Examples:__ @@ -173,10 +172,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[accounts](/archive/23_10/admin-tags/#accounts) +[accounts](admin-tags.md#accounts) __Module:__ -[mod_admin_extra](/archive/23_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -211,10 +210,10 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[private](/archive/23_10/admin-tags/#private) +[private](admin-tags.md#private) __Module:__ -[mod_private](/archive/23_10/modules/#mod-private) +[mod_private](modules.md#mod_private) __Examples:__ @@ -249,10 +248,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[accounts](/archive/23_10/admin-tags/#accounts) +[accounts](admin-tags.md#accounts) __Module:__ -[mod_admin_extra](/archive/23_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -289,10 +288,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc_room](/archive/23_10/admin-tags/#muc-room) +[muc_room](admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/23_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -328,10 +327,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[accounts](/archive/23_10/admin-tags/#accounts) +[accounts](admin-tags.md#accounts) __Module:__ -[mod_admin_extra](/archive/23_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -366,10 +365,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[accounts](/archive/23_10/admin-tags/#accounts) +[accounts](admin-tags.md#accounts) __Module:__ -[mod_admin_extra](/archive/23_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -409,10 +408,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[accounts](/archive/23_10/admin-tags/#accounts) +[accounts](admin-tags.md#accounts) __Module:__ -[mod_admin_extra](/archive/23_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -446,7 +445,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[server](/archive/23_10/admin-tags/#server) +[server](admin-tags.md#server) __Examples:__ @@ -478,10 +477,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[erlang](/archive/23_10/admin-tags/#erlang) +[erlang](admin-tags.md#erlang) __Module:__ -[mod_admin_extra](/archive/23_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -512,7 +511,7 @@ __Result:__ - *connected_users* :: [sessions::string] : List of users sessions __Tags:__ -[session](/archive/23_10/admin-tags/#session) +[session](admin-tags.md#session) __Examples:__ @@ -546,10 +545,10 @@ __Result:__ - *connected_users_info* :: [{jid::string, connection::string, ip::string, port::integer, priority::integer, node::string, uptime::integer, status::string, resource::string, statustext::string}] __Tags:__ -[session](/archive/23_10/admin-tags/#session) +[session](admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/23_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -593,7 +592,7 @@ __Result:__ - *num_sessions* :: integer __Tags:__ -[session](/archive/23_10/admin-tags/#session) [statistics](/archive/23_10/admin-tags/#statistics) +[session](admin-tags.md#session) [statistics](admin-tags.md#statistics) __Examples:__ @@ -625,10 +624,10 @@ __Result:__ - *connected_users_vhost* :: [sessions::string] __Tags:__ -[session](/archive/23_10/admin-tags/#session) +[session](admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/23_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -663,7 +662,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[sql](/archive/23_10/admin-tags/#sql) +[sql](admin-tags.md#sql) __Examples:__ @@ -696,7 +695,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[config](/archive/23_10/admin-tags/#config) +[config](admin-tags.md#config) __Examples:__ @@ -731,10 +730,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc_room](/archive/23_10/admin-tags/#muc-room) +[muc_room](admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/23_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -774,10 +773,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc_room](/archive/23_10/admin-tags/#muc-room) +[muc_room](admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/23_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -828,10 +827,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc](/archive/23_10/admin-tags/#muc) +[muc](admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/23_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -862,7 +861,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[purge](/archive/23_10/admin-tags/#purge) +[purge](admin-tags.md#purge) __Examples:__ @@ -878,7 +877,7 @@ __Examples:__ ~~~ -
added in 21.12
+
added in 21.12
## delete_expired_pubsub_items @@ -893,10 +892,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[purge](/archive/23_10/admin-tags/#purge) +[purge](admin-tags.md#purge) __Module:__ -[mod_pubsub](/archive/23_10/modules/#mod-pubsub) +[mod_pubsub](modules.md#mod_pubsub) __Examples:__ @@ -928,7 +927,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[mnesia](/archive/23_10/admin-tags/#mnesia) +[mnesia](admin-tags.md#mnesia) __Examples:__ @@ -964,10 +963,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[purge](/archive/23_10/admin-tags/#purge) +[purge](admin-tags.md#purge) __Module:__ -[mod_mam](/archive/23_10/modules/#mod-mam) +[mod_mam](modules.md#mod_mam) __Examples:__ @@ -984,7 +983,7 @@ __Examples:__ ~~~ -
added in 22.05
+
added in 22.05
## delete_old_mam_messages_batch @@ -1007,10 +1006,10 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[purge](/archive/23_10/admin-tags/#purge) +[purge](admin-tags.md#purge) __Module:__ -[mod_mam](/archive/23_10/modules/#mod-mam) +[mod_mam](modules.md#mod_mam) __Examples:__ @@ -1030,7 +1029,7 @@ __Examples:__ ~~~ -
added in 22.05
+
added in 22.05
## delete_old_mam_messages_status @@ -1046,10 +1045,10 @@ __Result:__ - *status* :: string : Status test __Tags:__ -[purge](/archive/23_10/admin-tags/#purge) +[purge](admin-tags.md#purge) __Module:__ -[mod_mam](/archive/23_10/modules/#mod-mam) +[mod_mam](modules.md#mod_mam) __Examples:__ @@ -1081,7 +1080,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[purge](/archive/23_10/admin-tags/#purge) +[purge](admin-tags.md#purge) __Examples:__ @@ -1097,7 +1096,7 @@ __Examples:__ ~~~ -
added in 22.05
+
added in 22.05
## delete_old_messages_batch @@ -1116,7 +1115,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[purge](/archive/23_10/admin-tags/#purge) +[purge](admin-tags.md#purge) __Examples:__ @@ -1135,7 +1134,7 @@ __Examples:__ ~~~ -
added in 22.05
+
added in 22.05
## delete_old_messages_status @@ -1151,7 +1150,7 @@ __Result:__ - *status* :: string : Status test __Tags:__ -[purge](/archive/23_10/admin-tags/#purge) +[purge](admin-tags.md#purge) __Examples:__ @@ -1167,7 +1166,7 @@ __Examples:__ ~~~ -
added in 21.12
+
added in 21.12
## delete_old_pubsub_items @@ -1183,10 +1182,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[purge](/archive/23_10/admin-tags/#purge) +[purge](admin-tags.md#purge) __Module:__ -[mod_pubsub](/archive/23_10/modules/#mod-pubsub) +[mod_pubsub](modules.md#mod_pubsub) __Examples:__ @@ -1218,10 +1217,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[purge](/archive/23_10/admin-tags/#purge) +[purge](admin-tags.md#purge) __Module:__ -[mod_push](/archive/23_10/modules/#mod-push) +[mod_push](modules.md#mod_push) __Examples:__ @@ -1246,7 +1245,7 @@ Delete users that didn't log in last days, or that never logged To protect admin accounts, configure this for example: -``` +``` yaml access_rules: protect_old_users: - allow: admin @@ -1263,10 +1262,10 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[accounts](/archive/23_10/admin-tags/#accounts) [purge](/archive/23_10/admin-tags/#purge) +[accounts](admin-tags.md#accounts) [purge](admin-tags.md#purge) __Module:__ -[mod_admin_extra](/archive/23_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -1291,7 +1290,7 @@ Delete users that didn't log in last days in vhost, or that never logged To protect admin accounts, configure this for example: -``` +``` yaml access_rules: delete_old_users: - deny: admin @@ -1309,10 +1308,10 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[accounts](/archive/23_10/admin-tags/#accounts) [purge](/archive/23_10/admin-tags/#purge) +[accounts](admin-tags.md#accounts) [purge](admin-tags.md#purge) __Module:__ -[mod_admin_extra](/archive/23_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -1348,10 +1347,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[roster](/archive/23_10/admin-tags/#roster) +[roster](admin-tags.md#roster) __Module:__ -[mod_admin_extra](/archive/23_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -1387,10 +1386,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc_room](/archive/23_10/admin-tags/#muc-room) +[muc_room](admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/23_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -1426,10 +1425,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc](/archive/23_10/admin-tags/#muc) +[muc](admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/23_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -1461,7 +1460,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/archive/23_10/admin-tags/#mnesia) +[mnesia](admin-tags.md#mnesia) __Examples:__ @@ -1493,7 +1492,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[config](/archive/23_10/admin-tags/#config) +[config](admin-tags.md#config) __Examples:__ @@ -1526,7 +1525,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/archive/23_10/admin-tags/#mnesia) +[mnesia](admin-tags.md#mnesia) __Examples:__ @@ -1551,7 +1550,7 @@ __Examples:__ Export virtual host information from Mnesia tables to SQL file -Configure the modules to use SQL, then call this command. After correctly exported the database of a vhost, you may want to delete from mnesia with the [delete_mnesia](/archive/23_10/admin-api/#delete-mnesia) command. +Configure the modules to use SQL, then call this command. After correctly exported the database of a vhost, you may want to delete from mnesia with the [delete_mnesia](admin-api.md#delete_mnesia) command. __Arguments:__ @@ -1563,7 +1562,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[mnesia](/archive/23_10/admin-tags/#mnesia) +[mnesia](admin-tags.md#mnesia) __Examples:__ @@ -1596,7 +1595,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[mnesia](/archive/23_10/admin-tags/#mnesia) +[mnesia](admin-tags.md#mnesia) __Examples:__ @@ -1629,7 +1628,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[mnesia](/archive/23_10/admin-tags/#mnesia) +[mnesia](admin-tags.md#mnesia) __Examples:__ @@ -1646,7 +1645,7 @@ __Examples:__ ~~~ -
added in 20.01
+
added in 20.01
## gc @@ -1661,7 +1660,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[server](/archive/23_10/admin-tags/#server) +[server](admin-tags.md#server) __Examples:__ @@ -1695,7 +1694,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[documentation](/archive/23_10/admin-tags/#documentation) +[documentation](admin-tags.md#documentation) __Examples:__ @@ -1731,7 +1730,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[documentation](/archive/23_10/admin-tags/#documentation) +[documentation](admin-tags.md#documentation) __Examples:__ @@ -1749,7 +1748,7 @@ __Examples:__ ~~~ -
added in 21.12
+
added in 21.12
## gen_markdown_doc_for_tags @@ -1765,7 +1764,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[documentation](/archive/23_10/admin-tags/#documentation) +[documentation](admin-tags.md#documentation) __Examples:__ @@ -1796,10 +1795,10 @@ __Result:__ - *cookie* :: string : Erlang cookie used for authentication by ejabberd __Tags:__ -[erlang](/archive/23_10/admin-tags/#erlang) +[erlang](admin-tags.md#erlang) __Module:__ -[mod_admin_extra](/archive/23_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -1835,10 +1834,10 @@ __Result:__ - *last_activity* :: {timestamp::string, status::string} : Last activity timestamp and status __Tags:__ -[last](/archive/23_10/admin-tags/#last) +[last](admin-tags.md#last) __Module:__ -[mod_admin_extra](/archive/23_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -1873,7 +1872,7 @@ __Result:__ - *levelatom* :: string : Tuple with the log level number, its keyword and description __Tags:__ -[logs](/archive/23_10/admin-tags/#logs) +[logs](admin-tags.md#logs) __Examples:__ @@ -1906,10 +1905,10 @@ __Result:__ - *value* :: integer : Number __Tags:__ -[offline](/archive/23_10/admin-tags/#offline) +[offline](admin-tags.md#offline) __Module:__ -[mod_admin_extra](/archive/23_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -1957,10 +1956,10 @@ __Result:__ - *presence* :: {jid::string, show::string, status::string} __Tags:__ -[session](/archive/23_10/admin-tags/#session) +[session](admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/23_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -1999,10 +1998,10 @@ __Result:__ - *affiliation* :: string : Affiliation of the user __Tags:__ -[muc_room](/archive/23_10/admin-tags/#muc-room) +[muc_room](admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/23_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -2037,10 +2036,10 @@ __Result:__ - *affiliations* :: [{username::string, domain::string, affiliation::string, reason::string}] : The list of affiliations with username, domain, affiliation and reason __Tags:__ -[muc_room](/archive/23_10/admin-tags/#muc-room) +[muc_room](admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/23_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -2064,7 +2063,7 @@ __Examples:__ ~~~ -
added in 23.04
+
added in 23.04
## get_room_history @@ -2081,10 +2080,10 @@ __Result:__ - *history* :: [{timestamp::string, message::string}] __Tags:__ -[muc_room](/archive/23_10/admin-tags/#muc-room) +[muc_room](admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/23_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -2127,10 +2126,10 @@ __Result:__ - *occupants* :: [{jid::string, nick::string, role::string}] : The list of occupants with JID, nick and affiliation __Tags:__ -[muc_room](/archive/23_10/admin-tags/#muc-room) +[muc_room](admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/23_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -2170,10 +2169,10 @@ __Result:__ - *occupants* :: integer : Number of room occupants __Tags:__ -[muc_room](/archive/23_10/admin-tags/#muc-room) +[muc_room](admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/23_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -2207,10 +2206,10 @@ __Result:__ - *options* :: [{name::string, value::string}] : List of room options tuples with name and value __Tags:__ -[muc_room](/archive/23_10/admin-tags/#muc-room) +[muc_room](admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/23_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -2232,7 +2231,7 @@ __Examples:__ ~~~ -
improved in 23.10
+
improved in 23.10
## get_roster @@ -2252,10 +2251,10 @@ __Result:__ - *contacts* :: [{jid::string, nick::string, subscription::string, pending::string, groups::[group::string]}] __Tags:__ -[roster](/archive/23_10/admin-tags/#roster) +[roster](admin-tags.md#roster) __Module:__ -[mod_admin_extra](/archive/23_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -2310,10 +2309,10 @@ __Result:__ - *subscribers* :: [jid::string] : The list of users that are subscribed to that room __Tags:__ -[muc_room](/archive/23_10/admin-tags/#muc-room) +[muc_room](admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/23_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -2350,10 +2349,10 @@ __Result:__ - *rooms* :: [room::string] __Tags:__ -[muc](/archive/23_10/admin-tags/#muc) +[muc](admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/23_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -2373,7 +2372,7 @@ __Examples:__ ~~~ -
added in 21.04
+
added in 21.04
## get_user_subscriptions @@ -2390,10 +2389,10 @@ __Result:__ - *rooms* :: [{roomjid::string, usernick::string, nodes::[node::string]}] __Tags:__ -[muc](/archive/23_10/admin-tags/#muc) +[muc](admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/23_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -2447,10 +2446,10 @@ __Result:__ - *content* :: string : Field content __Tags:__ -[vcard](/archive/23_10/admin-tags/#vcard) +[vcard](admin-tags.md#vcard) __Module:__ -[mod_admin_extra](/archive/23_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -2505,10 +2504,10 @@ __Result:__ - *content* :: string : Field content __Tags:__ -[vcard](/archive/23_10/admin-tags/#vcard) +[vcard](admin-tags.md#vcard) __Module:__ -[mod_admin_extra](/archive/23_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -2564,10 +2563,10 @@ __Result:__ - *contents* :: [value::string] __Tags:__ -[vcard](/archive/23_10/admin-tags/#vcard) +[vcard](admin-tags.md#vcard) __Module:__ -[mod_admin_extra](/archive/23_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -2589,7 +2588,7 @@ __Examples:__ ~~~ -
added in 23.10
+
added in 23.10
## halt @@ -2604,7 +2603,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[server](/archive/23_10/admin-tags/#server) +[server](admin-tags.md#server) __Examples:__ @@ -2636,7 +2635,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/archive/23_10/admin-tags/#mnesia) +[mnesia](admin-tags.md#mnesia) __Examples:__ @@ -2668,7 +2667,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/archive/23_10/admin-tags/#mnesia) +[mnesia](admin-tags.md#mnesia) __Examples:__ @@ -2700,7 +2699,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[mnesia](/archive/23_10/admin-tags/#mnesia) +[mnesia](admin-tags.md#mnesia) __Examples:__ @@ -2724,7 +2723,7 @@ __Examples:__ Import data from Prosody -Note: this requires ejabberd to be [compiled with `--enable-lua`](http://localhost:8098/admin/installation/#configure) (which installs the `luerl` library). +Note: this requires ejabberd to be compiled with `./configure --enable-lua` (which installs the `luerl` library). __Arguments:__ @@ -2735,7 +2734,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[mnesia](/archive/23_10/admin-tags/#mnesia) [sql](/archive/23_10/admin-tags/#sql) +[mnesia](admin-tags.md#mnesia) [sql](admin-tags.md#sql) __Examples:__ @@ -2766,7 +2765,7 @@ __Result:__ - *s2s_incoming* :: integer __Tags:__ -[statistics](/archive/23_10/admin-tags/#statistics) [s2s](/archive/23_10/admin-tags/#s2s) +[statistics](admin-tags.md#statistics) [s2s](admin-tags.md#s2s) __Examples:__ @@ -2790,7 +2789,7 @@ __Examples:__ Install Mnesia database from a binary backup file -The binary backup file is installed as fallback: it will be used to restore the database at the next ejabberd start. This means that, after running this command, you have to restart ejabberd. This command requires less memory than [restore](/archive/23_10/admin-api/#restore). +The binary backup file is installed as fallback: it will be used to restore the database at the next ejabberd start. This means that, after running this command, you have to restart ejabberd. This command requires less memory than [restore](admin-api.md#restore). __Arguments:__ @@ -2801,7 +2800,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/archive/23_10/admin-tags/#mnesia) +[mnesia](admin-tags.md#mnesia) __Examples:__ @@ -2836,7 +2835,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[cluster](/archive/23_10/admin-tags/#cluster) +[cluster](admin-tags.md#cluster) __Examples:__ @@ -2871,10 +2870,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[session](/archive/23_10/admin-tags/#session) +[session](admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/23_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -2910,7 +2909,7 @@ __Result:__ - *num_resources* :: integer : Number of resources that were kicked __Tags:__ -[session](/archive/23_10/admin-tags/#session) +[session](admin-tags.md#session) __Examples:__ @@ -2946,7 +2945,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[cluster](/archive/23_10/admin-tags/#cluster) +[cluster](admin-tags.md#cluster) __Examples:__ @@ -2977,7 +2976,7 @@ __Result:__ - *certificates* :: [{domain::string, file::string, used::string}] __Tags:__ -[acme](/archive/23_10/admin-tags/#acme) +[acme](admin-tags.md#acme) __Examples:__ @@ -3019,7 +3018,7 @@ __Result:__ - *nodes* :: [node::string] __Tags:__ -[cluster](/archive/23_10/admin-tags/#cluster) +[cluster](admin-tags.md#cluster) __Examples:__ @@ -3046,7 +3045,7 @@ __Examples:__ Restore Mnesia database from a text dump file -Restore immediately. This is not recommended for big databases, as it will consume much time, memory and processor. In that case it's preferable to use [install_fallback](/archive/23_10/admin-api/#backup[backup] and http://./#install-fallback). +Restore immediately. This is not recommended for big databases, as it will consume much time, memory and processor. In that case it's preferable to use [install_fallback](admin-api.md#backup[backup] and http://./#install_fallback). __Arguments:__ @@ -3057,7 +3056,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/archive/23_10/admin-tags/#mnesia) +[mnesia](admin-tags.md#mnesia) __Examples:__ @@ -3073,7 +3072,7 @@ __Examples:__ ~~~ -
added in 20.01
+
added in 20.01
## man @@ -3088,7 +3087,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[documentation](/archive/23_10/admin-tags/#documentation) +[documentation](admin-tags.md#documentation) __Examples:__ @@ -3123,7 +3122,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/archive/23_10/admin-tags/#mnesia) +[mnesia](admin-tags.md#mnesia) __Examples:__ @@ -3157,7 +3156,7 @@ __Result:__ - *res* :: string __Tags:__ -[mnesia](/archive/23_10/admin-tags/#mnesia) +[mnesia](admin-tags.md#mnesia) __Examples:__ @@ -3189,7 +3188,7 @@ __Result:__ - *res* :: string __Tags:__ -[mnesia](/archive/23_10/admin-tags/#mnesia) +[mnesia](admin-tags.md#mnesia) __Examples:__ @@ -3221,7 +3220,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[modules](/archive/23_10/admin-tags/#modules) +[modules](admin-tags.md#modules) __Examples:__ @@ -3253,7 +3252,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[modules](/archive/23_10/admin-tags/#modules) +[modules](admin-tags.md#modules) __Examples:__ @@ -3285,7 +3284,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[modules](/archive/23_10/admin-tags/#modules) +[modules](admin-tags.md#modules) __Examples:__ @@ -3320,7 +3319,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[modules](/archive/23_10/admin-tags/#modules) +[modules](admin-tags.md#modules) __Examples:__ @@ -3351,7 +3350,7 @@ __Result:__ - *modules* :: [{name::string, summary::string}] : List of tuples with module name and description __Tags:__ -[modules](/archive/23_10/admin-tags/#modules) +[modules](admin-tags.md#modules) __Examples:__ @@ -3385,7 +3384,7 @@ __Result:__ - *modules* :: [{name::string, summary::string}] : List of tuples with module name and description __Tags:__ -[modules](/archive/23_10/admin-tags/#modules) +[modules](admin-tags.md#modules) __Examples:__ @@ -3422,7 +3421,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[modules](/archive/23_10/admin-tags/#modules) +[modules](admin-tags.md#modules) __Examples:__ @@ -3454,10 +3453,10 @@ __Result:__ - *rooms* :: [room::string] : List of rooms __Tags:__ -[muc](/archive/23_10/admin-tags/#muc) +[muc](admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/23_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -3493,10 +3492,10 @@ __Result:__ - *rooms* :: [{jid::string, public::string, participants::integer}] : List of rooms with summary __Tags:__ -[muc](/archive/23_10/admin-tags/#muc) +[muc](admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/23_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -3542,10 +3541,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc](/archive/23_10/admin-tags/#muc) +[muc](admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/23_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -3580,10 +3579,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc](/archive/23_10/admin-tags/#muc) +[muc](admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/23_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -3617,10 +3616,10 @@ __Result:__ - *resources* :: integer : Number of active resources for a user __Tags:__ -[session](/archive/23_10/admin-tags/#session) +[session](admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/23_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -3655,7 +3654,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[oauth](/archive/23_10/admin-tags/#oauth) +[oauth](admin-tags.md#oauth) __Examples:__ @@ -3691,7 +3690,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[oauth](/archive/23_10/admin-tags/#oauth) +[oauth](admin-tags.md#oauth) __Examples:__ @@ -3727,7 +3726,7 @@ __Result:__ - *result* :: {token::string, scopes::string, expires_in::string} __Tags:__ -[oauth](/archive/23_10/admin-tags/#oauth) +[oauth](admin-tags.md#oauth) __Examples:__ @@ -3767,7 +3766,7 @@ __Result:__ - *tokens* :: [{token::string, user::string, scope::string, expires_in::string}] __Tags:__ -[oauth](/archive/23_10/admin-tags/#oauth) +[oauth](admin-tags.md#oauth) __Examples:__ @@ -3812,7 +3811,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[oauth](/archive/23_10/admin-tags/#oauth) +[oauth](admin-tags.md#oauth) __Examples:__ @@ -3828,7 +3827,7 @@ __Examples:__ ~~~ -
changed in 22.05
+
changed in 22.05
## oauth_revoke_token @@ -3844,7 +3843,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[oauth](/archive/23_10/admin-tags/#oauth) +[oauth](admin-tags.md#oauth) __Examples:__ @@ -3875,7 +3874,7 @@ __Result:__ - *s2s_outgoing* :: integer __Tags:__ -[statistics](/archive/23_10/admin-tags/#statistics) [s2s](/archive/23_10/admin-tags/#s2s) +[statistics](admin-tags.md#statistics) [s2s](admin-tags.md#s2s) __Examples:__ @@ -3909,10 +3908,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[stanza](/archive/23_10/admin-tags/#stanza) +[stanza](admin-tags.md#stanza) __Module:__ -[mod_admin_extra](/archive/23_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -3949,10 +3948,10 @@ __Result:__ - *res* :: string __Tags:__ -[private](/archive/23_10/admin-tags/#private) +[private](admin-tags.md#private) __Module:__ -[mod_admin_extra](/archive/23_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -3989,10 +3988,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[private](/archive/23_10/admin-tags/#private) +[private](admin-tags.md#private) __Module:__ -[mod_admin_extra](/archive/23_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -4066,10 +4065,10 @@ __Result:__ - *response* :: [{user::string, contact::string}] __Tags:__ -[roster](/archive/23_10/admin-tags/#roster) +[roster](admin-tags.md#roster) __Module:__ -[mod_admin_extra](/archive/23_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -4115,10 +4114,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[roster](/archive/23_10/admin-tags/#roster) +[roster](admin-tags.md#roster) __Module:__ -[mod_admin_extra](/archive/23_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -4160,10 +4159,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[roster](/archive/23_10/admin-tags/#roster) +[roster](admin-tags.md#roster) __Module:__ -[mod_admin_extra](/archive/23_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -4202,10 +4201,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[roster](/archive/23_10/admin-tags/#roster) +[roster](admin-tags.md#roster) __Module:__ -[mod_admin_extra](/archive/23_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -4239,7 +4238,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[accounts](/archive/23_10/admin-tags/#accounts) +[accounts](admin-tags.md#accounts) __Examples:__ @@ -4273,7 +4272,7 @@ __Result:__ - *users* :: [username::string] : List of registered accounts usernames __Tags:__ -[accounts](/archive/23_10/admin-tags/#accounts) +[accounts](admin-tags.md#accounts) __Examples:__ @@ -4307,7 +4306,7 @@ __Result:__ - *vhosts* :: [vhost::string] : List of available vhosts __Tags:__ -[server](/archive/23_10/admin-tags/#server) +[server](admin-tags.md#server) __Examples:__ @@ -4341,7 +4340,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[config](/archive/23_10/admin-tags/#config) +[config](admin-tags.md#config) __Examples:__ @@ -4374,10 +4373,10 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mam](/archive/23_10/admin-tags/#mam) +[mam](admin-tags.md#mam) __Module:__ -[mod_mam](/archive/23_10/modules/#mod-mam) +[mod_mam](modules.md#mod_mam) __Examples:__ @@ -4412,10 +4411,10 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mam](/archive/23_10/admin-tags/#mam) +[mam](admin-tags.md#mam) __Module:__ -[mod_mam](/archive/23_10/modules/#mod-mam) +[mod_mam](modules.md#mod_mam) __Examples:__ @@ -4441,7 +4440,7 @@ __Examples:__ Reopen the log files after being renamed -This can be useful when an external tool is used for log rotation. See https://docs.ejabberd.im/admin/guide/troubleshooting/#log-files +This can be useful when an external tool is used for log rotation. See https://docs.ejabberd.im/admin/guide/troubleshooting/#log_files __Arguments:__ @@ -4451,7 +4450,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[logs](/archive/23_10/admin-tags/#logs) +[logs](admin-tags.md#logs) __Examples:__ @@ -4483,7 +4482,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[acme](/archive/23_10/admin-tags/#acme) +[acme](admin-tags.md#acme) __Examples:__ @@ -4517,10 +4516,10 @@ __Result:__ - *resource* :: string : Name of user resource __Tags:__ -[session](/archive/23_10/admin-tags/#session) +[session](admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/23_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -4553,7 +4552,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[server](/archive/23_10/admin-tags/#server) +[server](admin-tags.md#server) __Examples:__ @@ -4589,10 +4588,10 @@ __Result:__ - 2: code not reloaded, but module restarted __Tags:__ -[erlang](/archive/23_10/admin-tags/#erlang) +[erlang](admin-tags.md#erlang) __Module:__ -[mod_admin_extra](/archive/23_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -4617,7 +4616,7 @@ __Examples:__ Restore the Mnesia database from a binary backup file -This restores immediately from a binary backup file the internal Mnesia database. This will consume a lot of memory if you have a large database, you may prefer [install_fallback](/archive/23_10/admin-api/#install-fallback). +This restores immediately from a binary backup file the internal Mnesia database. This will consume a lot of memory if you have a large database, you may prefer [install_fallback](admin-api.md#install_fallback). __Arguments:__ @@ -4628,7 +4627,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/archive/23_10/admin-tags/#mnesia) +[mnesia](admin-tags.md#mnesia) __Examples:__ @@ -4660,7 +4659,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[acme](/archive/23_10/admin-tags/#acme) +[acme](admin-tags.md#acme) __Examples:__ @@ -4695,10 +4694,10 @@ __Result:__ - *rooms* :: [room::string] : List of empty rooms that have been destroyed __Tags:__ -[muc](/archive/23_10/admin-tags/#muc) +[muc](admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/23_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -4736,10 +4735,10 @@ __Result:__ - *rooms* :: [room::string] : List of empty rooms __Tags:__ -[muc](/archive/23_10/admin-tags/#muc) +[muc](admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/23_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -4778,10 +4777,10 @@ __Result:__ - *rooms* :: [room::string] : List of unused rooms that has been destroyed __Tags:__ -[muc](/archive/23_10/admin-tags/#muc) +[muc](admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/23_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -4821,10 +4820,10 @@ __Result:__ - *rooms* :: [room::string] : List of unused rooms __Tags:__ -[muc](/archive/23_10/admin-tags/#muc) +[muc](admin-tags.md#muc) __Module:__ -[mod_muc_admin](/archive/23_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -4859,7 +4858,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[logs](/archive/23_10/admin-tags/#logs) +[logs](admin-tags.md#logs) __Examples:__ @@ -4883,7 +4882,7 @@ __Examples:__ Send a direct invitation to several destinations -Since ejabberd 20.12, this command is asynchronous: the API call may return before the server has send all the invitations. +Since ejabberd 20.12, this command is asynchronous: the API call may return before the server has send all the invitations. Password and Message can also be: `none`. Users JIDs are separated with `:`. @@ -4900,10 +4899,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc_room](/archive/23_10/admin-tags/#muc-room) +[muc_room](admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/23_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -4946,10 +4945,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[stanza](/archive/23_10/admin-tags/#stanza) +[stanza](admin-tags.md#stanza) __Module:__ -[mod_admin_extra](/archive/23_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -4987,10 +4986,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[stanza](/archive/23_10/admin-tags/#stanza) +[stanza](admin-tags.md#stanza) __Module:__ -[mod_admin_extra](/archive/23_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5016,7 +5015,7 @@ __Examples:__ Send a stanza from an existing C2S session -`user`@`host`/`resource` must be an existing C2S session. As an alternative, use [send_stanza](/archive/23_10/admin-api/#send-stanza) instead. +`user`@`host`/`resource` must be an existing C2S session. As an alternative, use [send_stanza](admin-api.md#send_stanza) instead. __Arguments:__ @@ -5030,10 +5029,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[stanza](/archive/23_10/admin-tags/#stanza) +[stanza](admin-tags.md#stanza) __Module:__ -[mod_admin_extra](/archive/23_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5074,10 +5073,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[last](/archive/23_10/admin-tags/#last) +[last](admin-tags.md#last) __Module:__ -[mod_admin_extra](/archive/23_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5112,7 +5111,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[logs](/archive/23_10/admin-tags/#logs) +[logs](admin-tags.md#logs) __Examples:__ @@ -5147,7 +5146,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[cluster](/archive/23_10/admin-tags/#cluster) +[cluster](admin-tags.md#cluster) __Examples:__ @@ -5181,10 +5180,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[vcard](/archive/23_10/admin-tags/#vcard) +[vcard](admin-tags.md#vcard) __Module:__ -[mod_admin_extra](/archive/23_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5224,10 +5223,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[session](/archive/23_10/admin-tags/#session) +[session](admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/23_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5268,10 +5267,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc_room](/archive/23_10/admin-tags/#muc-room) +[muc_room](admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/23_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -5320,10 +5319,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[vcard](/archive/23_10/admin-tags/#vcard) +[vcard](admin-tags.md#vcard) __Module:__ -[mod_admin_extra](/archive/23_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5380,10 +5379,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[vcard](/archive/23_10/admin-tags/#vcard) +[vcard](admin-tags.md#vcard) __Module:__ -[mod_admin_extra](/archive/23_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5441,10 +5440,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[vcard](/archive/23_10/admin-tags/#vcard) +[vcard](admin-tags.md#vcard) __Module:__ -[mod_admin_extra](/archive/23_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5467,7 +5466,7 @@ __Examples:__ ~~~ -
changed in 21.07
+
changed in 21.07
## srg_create @@ -5494,10 +5493,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[shared_roster_group](/archive/23_10/admin-tags/#shared-roster-group) +[shared_roster_group](admin-tags.md#shared_roster_group) __Module:__ -[mod_admin_extra](/archive/23_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5534,10 +5533,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[shared_roster_group](/archive/23_10/admin-tags/#shared-roster-group) +[shared_roster_group](admin-tags.md#shared_roster_group) __Module:__ -[mod_admin_extra](/archive/23_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5571,10 +5570,10 @@ __Result:__ - *informations* :: [{key::string, value::string}] : List of group information, as key and value __Tags:__ -[shared_roster_group](/archive/23_10/admin-tags/#shared-roster-group) +[shared_roster_group](admin-tags.md#shared_roster_group) __Module:__ -[mod_admin_extra](/archive/23_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5617,10 +5616,10 @@ __Result:__ - *members* :: [member::string] : List of group identifiers __Tags:__ -[shared_roster_group](/archive/23_10/admin-tags/#shared-roster-group) +[shared_roster_group](admin-tags.md#shared_roster_group) __Module:__ -[mod_admin_extra](/archive/23_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5656,10 +5655,10 @@ __Result:__ - *groups* :: [id::string] : List of group identifiers __Tags:__ -[shared_roster_group](/archive/23_10/admin-tags/#shared-roster-group) +[shared_roster_group](admin-tags.md#shared_roster_group) __Module:__ -[mod_admin_extra](/archive/23_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5697,10 +5696,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[shared_roster_group](/archive/23_10/admin-tags/#shared-roster-group) +[shared_roster_group](admin-tags.md#shared_roster_group) __Module:__ -[mod_admin_extra](/archive/23_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5738,10 +5737,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[shared_roster_group](/archive/23_10/admin-tags/#shared-roster-group) +[shared_roster_group](admin-tags.md#shared_roster_group) __Module:__ -[mod_admin_extra](/archive/23_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5776,10 +5775,10 @@ __Result:__ - *stat* :: integer : Integer statistic value __Tags:__ -[statistics](/archive/23_10/admin-tags/#statistics) +[statistics](admin-tags.md#statistics) __Module:__ -[mod_admin_extra](/archive/23_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5812,10 +5811,10 @@ __Result:__ - *stat* :: integer : Integer statistic value __Tags:__ -[statistics](/archive/23_10/admin-tags/#statistics) +[statistics](admin-tags.md#statistics) __Module:__ -[mod_admin_extra](/archive/23_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5847,7 +5846,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[server](/archive/23_10/admin-tags/#server) +[server](admin-tags.md#server) __Examples:__ @@ -5879,10 +5878,10 @@ __Result:__ - *users* :: [{user::string, host::string, resource::string, priority::integer, status::string}] __Tags:__ -[session](/archive/23_10/admin-tags/#session) +[session](admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/23_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5923,10 +5922,10 @@ __Result:__ - *users* :: [{user::string, host::string, resource::string, priority::integer, status::string}] __Tags:__ -[session](/archive/23_10/admin-tags/#session) +[session](admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/23_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -5967,10 +5966,10 @@ __Result:__ - *users* :: integer : Number of connected sessions with given status type __Tags:__ -[session](/archive/23_10/admin-tags/#session) [statistics](/archive/23_10/admin-tags/#statistics) +[session](admin-tags.md#session) [statistics](admin-tags.md#statistics) __Module:__ -[mod_admin_extra](/archive/23_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -6003,10 +6002,10 @@ __Result:__ - *users* :: integer : Number of connected sessions with given status type __Tags:__ -[session](/archive/23_10/admin-tags/#session) [statistics](/archive/23_10/admin-tags/#statistics) +[session](admin-tags.md#session) [statistics](admin-tags.md#statistics) __Module:__ -[mod_admin_extra](/archive/23_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ @@ -6038,7 +6037,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[server](/archive/23_10/admin-tags/#server) +[server](admin-tags.md#server) __Examples:__ @@ -6075,7 +6074,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[server](/archive/23_10/admin-tags/#server) +[server](admin-tags.md#server) __Examples:__ @@ -6107,7 +6106,7 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[s2s](/archive/23_10/admin-tags/#s2s) +[s2s](admin-tags.md#s2s) __Examples:__ @@ -6142,10 +6141,10 @@ __Result:__ - *nodes* :: [node::string] : The list of nodes that has subscribed __Tags:__ -[muc_room](/archive/23_10/admin-tags/#muc-room) +[muc_room](admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/23_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -6167,7 +6166,7 @@ __Examples:__ ~~~ -
added in 22.05
+
added in 22.05
## subscribe_room_many @@ -6175,7 +6174,7 @@ __Examples:__ Subscribe several users to a MUC conference -This command accepts up to 50 users at once (this is configurable with the [mod_muc_admin](/archive/23_10/modules/#mod-muc-admin) option `subscribe_room_many_max_users`) +This command accepts up to 50 users at once (this is configurable with the [mod_muc_admin](modules.md#mod_muc_admin) option `subscribe_room_many_max_users`) __Arguments:__ @@ -6188,10 +6187,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc_room](/archive/23_10/admin-tags/#muc-room) +[muc_room](admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/23_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -6237,10 +6236,10 @@ __Result:__ - *unbanned* :: integer : Amount of unbanned entries, or negative in case of error. __Tags:__ -[accounts](/archive/23_10/admin-tags/#accounts) +[accounts](admin-tags.md#accounts) __Module:__ -[mod_fail2ban](/archive/23_10/modules/#mod-fail2ban) +[mod_fail2ban](modules.md#mod_fail2ban) __Examples:__ @@ -6276,7 +6275,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[accounts](/archive/23_10/admin-tags/#accounts) +[accounts](admin-tags.md#accounts) __Examples:__ @@ -6310,10 +6309,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[muc_room](/archive/23_10/admin-tags/#muc-room) +[muc_room](admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/archive/23_10/modules/#mod-muc-admin) +[mod_muc_admin](modules.md#mod_muc_admin) __Examples:__ @@ -6346,7 +6345,7 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[server](/archive/23_10/admin-tags/#server) +[server](admin-tags.md#server) __Examples:__ @@ -6377,7 +6376,7 @@ __Result:__ - *modules* :: [module::string] __Tags:__ -[server](/archive/23_10/admin-tags/#server) +[server](admin-tags.md#server) __Examples:__ @@ -6396,7 +6395,7 @@ __Examples:__ ~~~ -
improved in 23.04
+
improved in 23.04
## update_sql @@ -6411,10 +6410,10 @@ __Result:__ - *res* :: integer : Status code (0 on success, 1 otherwise) __Tags:__ -[sql](/archive/23_10/admin-tags/#sql) +[sql](admin-tags.md#sql) __Module:__ -[mod_admin_update_sql](/archive/23_10/modules/#mod-admin-update-sql) +[mod_admin_update_sql](modules.md#mod_admin_update_sql) __Examples:__ @@ -6447,7 +6446,7 @@ __Result:__ - *resources* :: [resource::string] __Tags:__ -[session](/archive/23_10/admin-tags/#session) +[session](admin-tags.md#session) __Examples:__ @@ -6485,10 +6484,10 @@ __Result:__ - *sessions_info* :: [{connection::string, ip::string, port::integer, priority::integer, node::string, uptime::integer, status::string, resource::string, statustext::string}] __Tags:__ -[session](/archive/23_10/admin-tags/#session) +[session](admin-tags.md#session) __Module:__ -[mod_admin_extra](/archive/23_10/modules/#mod-admin-extra) +[mod_admin_extra](modules.md#mod_admin_extra) __Examples:__ diff --git a/content/archive/23.10/admin-tags.md b/content/archive/23.10/admin-tags.md new file mode 100644 index 00000000..b6bfa38e --- /dev/null +++ b/content/archive/23.10/admin-tags.md @@ -0,0 +1,611 @@ +--- +search: + exclude: true +--- + +# API Tags + +This section enumerates the tags and their associated API. + + +## accounts + + +* [ban_account](admin-api.md#ban_account) + + +* [change_password](admin-api.md#change_password) + + +* [check_account](admin-api.md#check_account) + + +* [check_password](admin-api.md#check_password) + + +* [check_password_hash](admin-api.md#check_password_hash) + + +* [delete_old_users](admin-api.md#delete_old_users) + + +* [delete_old_users_vhost](admin-api.md#delete_old_users_vhost) + + +* [register](admin-api.md#register) + + +* [registered_users](admin-api.md#registered_users) + + +* [unban_ip](admin-api.md#unban_ip) + + +* [unregister](admin-api.md#unregister) + + +## acme + + +* [list_certificates](admin-api.md#list_certificates) + + +* [request_certificate](admin-api.md#request_certificate) + + +* [revoke_certificate](admin-api.md#revoke_certificate) + + +## cluster + + +* [join_cluster](admin-api.md#join_cluster) + + +* [leave_cluster](admin-api.md#leave_cluster) + + +* [list_cluster](admin-api.md#list_cluster) + + +* [set_master](admin-api.md#set_master) + + +## config + + +* [convert_to_yaml](admin-api.md#convert_to_yaml) + + +* [dump_config](admin-api.md#dump_config) + + +* [reload_config](admin-api.md#reload_config) + + +## documentation + + +* [gen_html_doc_for_commands](admin-api.md#gen_html_doc_for_commands) + + +* [gen_markdown_doc_for_commands](admin-api.md#gen_markdown_doc_for_commands) + + +* [gen_markdown_doc_for_tags](admin-api.md#gen_markdown_doc_for_tags) + + +* [man](admin-api.md#man) + + +## erlang + + +* [compile](admin-api.md#compile) + + +* [get_cookie](admin-api.md#get_cookie) + + +* [restart_module](admin-api.md#restart_module) + + +## last + + +* [get_last](admin-api.md#get_last) + + +* [set_last](admin-api.md#set_last) + + +## logs + + +* [get_loglevel](admin-api.md#get_loglevel) + + +* [reopen_log](admin-api.md#reopen_log) + + +* [rotate_log](admin-api.md#rotate_log) + + +* [set_loglevel](admin-api.md#set_loglevel) + + +## mam + + +* [remove_mam_for_user](admin-api.md#remove_mam_for_user) + + +* [remove_mam_for_user_with_peer](admin-api.md#remove_mam_for_user_with_peer) + + +## mnesia + + +* [backup](admin-api.md#backup) + + +* [delete_mnesia](admin-api.md#delete_mnesia) + + +* [dump](admin-api.md#dump) + + +* [dump_table](admin-api.md#dump_table) + + +* [export2sql](admin-api.md#export2sql) + + +* [export_piefxis](admin-api.md#export_piefxis) + + +* [export_piefxis_host](admin-api.md#export_piefxis_host) + + +* [import_dir](admin-api.md#import_dir) + + +* [import_file](admin-api.md#import_file) + + +* [import_piefxis](admin-api.md#import_piefxis) + + +* [import_prosody](admin-api.md#import_prosody) + + +* [install_fallback](admin-api.md#install_fallback) + + +* [load](admin-api.md#load) + + +* [mnesia_change_nodename](admin-api.md#mnesia_change_nodename) + + +* [mnesia_info](admin-api.md#mnesia_info) + + +* [mnesia_table_info](admin-api.md#mnesia_table_info) + + +* [restore](admin-api.md#restore) + + +## modules + + +* [module_check](admin-api.md#module_check) + + +* [module_install](admin-api.md#module_install) + + +* [module_uninstall](admin-api.md#module_uninstall) + + +* [module_upgrade](admin-api.md#module_upgrade) + + +* [modules_available](admin-api.md#modules_available) + + +* [modules_installed](admin-api.md#modules_installed) + + +* [modules_update_specs](admin-api.md#modules_update_specs) + + +## muc + + +* [create_rooms_file](admin-api.md#create_rooms_file) + + +* [destroy_rooms_file](admin-api.md#destroy_rooms_file) + + +* [get_user_rooms](admin-api.md#get_user_rooms) + + +* [get_user_subscriptions](admin-api.md#get_user_subscriptions) + + +* [muc_online_rooms](admin-api.md#muc_online_rooms) + + +* [muc_online_rooms_by_regex](admin-api.md#muc_online_rooms_by_regex) + + +* [muc_register_nick](admin-api.md#muc_register_nick) + + +* [muc_unregister_nick](admin-api.md#muc_unregister_nick) + + +* [rooms_empty_destroy](admin-api.md#rooms_empty_destroy) + + +* [rooms_empty_list](admin-api.md#rooms_empty_list) + + +* [rooms_unused_destroy](admin-api.md#rooms_unused_destroy) + + +* [rooms_unused_list](admin-api.md#rooms_unused_list) + + +## muc_room + + +* [change_room_option](admin-api.md#change_room_option) + + +* [create_room](admin-api.md#create_room) + + +* [create_room_with_opts](admin-api.md#create_room_with_opts) + + +* [destroy_room](admin-api.md#destroy_room) + + +* [get_room_affiliation](admin-api.md#get_room_affiliation) + + +* [get_room_affiliations](admin-api.md#get_room_affiliations) + + +* [get_room_history](admin-api.md#get_room_history) + + +* [get_room_occupants](admin-api.md#get_room_occupants) + + +* [get_room_occupants_number](admin-api.md#get_room_occupants_number) + + +* [get_room_options](admin-api.md#get_room_options) + + +* [get_subscribers](admin-api.md#get_subscribers) + + +* [send_direct_invitation](admin-api.md#send_direct_invitation) + + +* [set_room_affiliation](admin-api.md#set_room_affiliation) + + +* [subscribe_room](admin-api.md#subscribe_room) + + +* [subscribe_room_many](admin-api.md#subscribe_room_many) + + +* [unsubscribe_room](admin-api.md#unsubscribe_room) + + +## oauth + + +* [oauth_add_client_implicit](admin-api.md#oauth_add_client_implicit) + + +* [oauth_add_client_password](admin-api.md#oauth_add_client_password) + + +* [oauth_issue_token](admin-api.md#oauth_issue_token) + + +* [oauth_list_tokens](admin-api.md#oauth_list_tokens) + + +* [oauth_remove_client](admin-api.md#oauth_remove_client) + + +* [oauth_revoke_token](admin-api.md#oauth_revoke_token) + + +## offline + + +* [get_offline_count](admin-api.md#get_offline_count) + + +## private + + +* [bookmarks_to_pep](admin-api.md#bookmarks_to_pep) + + +* [private_get](admin-api.md#private_get) + + +* [private_set](admin-api.md#private_set) + + +## purge + + +* [abort_delete_old_mam_messages](admin-api.md#abort_delete_old_mam_messages) + + +* [abort_delete_old_messages](admin-api.md#abort_delete_old_messages) + + +* [delete_expired_messages](admin-api.md#delete_expired_messages) + + +* [delete_expired_pubsub_items](admin-api.md#delete_expired_pubsub_items) + + +* [delete_old_mam_messages](admin-api.md#delete_old_mam_messages) + + +* [delete_old_mam_messages_batch](admin-api.md#delete_old_mam_messages_batch) + + +* [delete_old_mam_messages_status](admin-api.md#delete_old_mam_messages_status) + + +* [delete_old_messages](admin-api.md#delete_old_messages) + + +* [delete_old_messages_batch](admin-api.md#delete_old_messages_batch) + + +* [delete_old_messages_status](admin-api.md#delete_old_messages_status) + + +* [delete_old_pubsub_items](admin-api.md#delete_old_pubsub_items) + + +* [delete_old_push_sessions](admin-api.md#delete_old_push_sessions) + + +* [delete_old_users](admin-api.md#delete_old_users) + + +* [delete_old_users_vhost](admin-api.md#delete_old_users_vhost) + + +## roster + + +* [add_rosteritem](admin-api.md#add_rosteritem) + + +* [delete_rosteritem](admin-api.md#delete_rosteritem) + + +* [get_roster](admin-api.md#get_roster) + + +* [process_rosteritems](admin-api.md#process_rosteritems) + + +* [push_alltoall](admin-api.md#push_alltoall) + + +* [push_roster](admin-api.md#push_roster) + + +* [push_roster_all](admin-api.md#push_roster_all) + + +## s2s + + +* [incoming_s2s_number](admin-api.md#incoming_s2s-number) + + +* [outgoing_s2s_number](admin-api.md#outgoing_s2s-number) + + +* [stop_s2s_connections](admin-api.md#stop_s2s-connections) + + +## server + + +* [clear_cache](admin-api.md#clear_cache) + + +* [gc](admin-api.md#gc) + + +* [halt](admin-api.md#halt) + + +* [registered_vhosts](admin-api.md#registered_vhosts) + + +* [restart](admin-api.md#restart) + + +* [status](admin-api.md#status) + + +* [stop](admin-api.md#stop) + + +* [stop_kindly](admin-api.md#stop_kindly) + + +* [update](admin-api.md#update) + + +* [update_list](admin-api.md#update_list) + + +## session + + +* [connected_users](admin-api.md#connected_users) + + +* [connected_users_info](admin-api.md#connected_users_info) + + +* [connected_users_number](admin-api.md#connected_users_number) + + +* [connected_users_vhost](admin-api.md#connected_users_vhost) + + +* [get_presence](admin-api.md#get_presence) + + +* [kick_session](admin-api.md#kick_session) + + +* [kick_user](admin-api.md#kick_user) + + +* [num_resources](admin-api.md#num_resources) + + +* [resource_num](admin-api.md#resource_num) + + +* [set_presence](admin-api.md#set_presence) + + +* [status_list](admin-api.md#status_list) + + +* [status_list_host](admin-api.md#status_list_host) + + +* [status_num](admin-api.md#status_num) + + +* [status_num_host](admin-api.md#status_num_host) + + +* [user_resources](admin-api.md#user_resources) + + +* [user_sessions_info](admin-api.md#user_sessions_info) + + +## shared_roster_group + + +* [srg_create](admin-api.md#srg_create) + + +* [srg_delete](admin-api.md#srg_delete) + + +* [srg_get_info](admin-api.md#srg_get_info) + + +* [srg_get_members](admin-api.md#srg_get_members) + + +* [srg_list](admin-api.md#srg_list) + + +* [srg_user_add](admin-api.md#srg_user_add) + + +* [srg_user_del](admin-api.md#srg_user_del) + + +## sql + + +* [convert_to_scram](admin-api.md#convert_to_scram) + + +* [import_prosody](admin-api.md#import_prosody) + + +## stanza + + +* [privacy_set](admin-api.md#privacy_set) + + +* [send_message](admin-api.md#send_message) + + +* [send_stanza](admin-api.md#send_stanza) + + +* [send_stanza_c2s](admin-api.md#send_stanza_c2s) + + +## statistics + + +* [connected_users_number](admin-api.md#connected_users_number) + + +* [incoming_s2s_number](admin-api.md#incoming_s2s-number) + + +* [outgoing_s2s_number](admin-api.md#outgoing_s2s-number) + + +* [stats](admin-api.md#stats) + + +* [stats_host](admin-api.md#stats_host) + + +* [status_num](admin-api.md#status_num) + + +* [status_num_host](admin-api.md#status_num_host) + + +## vcard + + +* [get_vcard](admin-api.md#get_vcard) + + +* [get_vcard2](admin-api.md#get_vcard2) + + +* [get_vcard2_multi](admin-api.md#get_vcard2-multi) + + +* [set_nickname](admin-api.md#set_nickname) + + +* [set_vcard](admin-api.md#set_vcard) + + +* [set_vcard2](admin-api.md#set_vcard2) + + +* [set_vcard2_multi](admin-api.md#set_vcard2-multi) diff --git a/content/archive/23_10/index.md b/content/archive/23.10/index.md similarity index 60% rename from content/archive/23_10/index.md rename to content/archive/23.10/index.md index 9debd602..fa000d16 100644 --- a/content/archive/23_10/index.md +++ b/content/archive/23.10/index.md @@ -1,15 +1,10 @@ ---- -title: Archived Documentation for 23.10 -menu: 23.10 -order: 7689 ---- +# Archived Documentation for 23.10 This section contains some archived sections for ejabberd 23.10. If you are upgrading ejabberd from a previous release, you can check: -* [Specific version upgrade notes](/admin/upgrade/#specific-version-upgrade-notes) +* [Specific version upgrade notes](upgrade.md) * [ejabberd 23.10 release announcement](https://www.process-one.net/blog/ejabberd-23-10/) -* [Docs Github Compare from 23.04](https://github.com/processone/docs.ejabberd.im/compare/23.04...23.10) -* [ejabberd Github Compare from 23.04](https://github.com/processone/ejabberd/compare/23.04...23.10) - +* [Docs Github Compare from 23.04](https://github.com/processone/docs.ejabberd.im/compare/23.04..23.10) +* [ejabberd Github Compare from 23.04](https://github.com/processone/ejabberd/compare/23.04..23.10) diff --git a/content/archive/23.10/listen-options.md b/content/archive/23.10/listen-options.md new file mode 100644 index 00000000..f85c63bf --- /dev/null +++ b/content/archive/23.10/listen-options.md @@ -0,0 +1,399 @@ +--- +search: + exclude: true +--- + +# Listen Options + +This is a detailed description of each option allowed by the listening +modules: + +## access + +*AccessName* + +This option defines access to the port. The default value is `all`. + +## backlog + +*Value* + +The backlog value defines the maximum length that the queue of + pending connections may grow to. This should be increased if the + server is going to handle lots of new incoming connections as they + may be dropped if there is no space in the queue (and ejabberd was + not able to accept them immediately). Default value is 5. + +## cafile + +*Path* + +Path to a file of CA root certificates. +The default is to use system defined file if possible. + +This option is useful to define the file for a specific port listener. +To set a file for all client listeners or for specific vhosts, you can use the +[`c2s_cafile`](toplevel.md#c2s-cafile) top-level option. +To set a file for all server connections, you can use the +[`s2s_cafile`](toplevel.md#s2s-cafile) top-level option +or the +[`ca_file`](toplevel.md#ca_file) top-level option. + +Please note: if this option is set in +[`ejabberd_c2s`](listen.md#ejabberd_c2s) +or [`ejabberd_s2s_in`](listen.md#ejabberd_s2s-in) +and the corresponding top-level option is also set +([`c2s_cafile`](toplevel.md#c2s-cafile), +[`s2s_cafile`](toplevel.md#s2s-cafile)), +then the top-level option is used, not this one. + +## certfile + +*Path* + +Path to the certificate file. +Only makes sense when the [`tls`](#tls) +options is set. +If this option is not set, you should set the +[`certfiles`](toplevel.md#certfiles) top-level option +or configure [ACME](../../admin/configuration/basic.md#acme). + +## check_from + +*true | false* + +This option can be used with +[`ejabberd_service`](listen.md#ejabberd_service) only. + [`XEP-0114`](https://xmpp.org/extensions/xep-0114.html) requires that + the domain must match the hostname of the component. If this option + is set to `false`, `ejabberd` will allow the component to send + stanzas with any arbitrary domain in the ’from’ attribute. Only use + this option if you are completely sure about it. The default value + is `true`, to be compliant with + [`XEP-0114`](https://xmpp.org/extensions/xep-0114.html). + +## ciphers + +*Ciphers* + +OpenSSL ciphers list in the same format accepted by + ‘`openssl ciphers`’ command. + +Please note: if this option is set in +[`ejabberd_c2s`](listen.md#ejabberd_c2s) +or [`ejabberd_s2s_in`](listen.md#ejabberd_s2s-in) +and the corresponding top-level option is also set +([`c2s_ciphers`](toplevel.md#c2s-ciphers), +[`s2s_ciphers`](toplevel.md#s2s-ciphers)), +then the top-level option is used, not this one. + +## custom_headers + +*{Name: Value}* + +Specify additional HTTP headers to be included in all HTTP responses. +Default value is: `[]` + +## default_host + +*undefined | HostName* + +If the HTTP request received by ejabberd contains the HTTP header + `Host` with an ambiguous virtual host that doesn’t match any one + defined in ejabberd (see + [Host Names](../../admin/configuration/basic.md#host_names)), + then this configured HostName + is set as the request Host. The default value of this option is: + `undefined`. + +## dhfile + +*Path* + +Full path to a file containing custom parameters for Diffie-Hellman key + exchange. Such a file could be created with the command + `openssl dhparam -out dh.pem 2048`. If this option is not specified, + default parameters will be used, which might not provide the same level + of security as using custom parameters. + +Please note: if this option is set in +[`ejabberd_c2s`](listen.md#ejabberd_c2s) +or [`ejabberd_s2s_in`](listen.md#ejabberd_s2s-in) +and the corresponding top-level option is also set +([`c2s_dhfile`](toplevel.md#c2s-dhfile), +[`s2s_dhfile`](toplevel.md#s2s-dhfile)), +then the top-level option is used, not this one. + +## global_routes + +*true | false* + +This option emulates legacy behaviour which registers all routes +defined in [`hosts`](toplevel.md#hosts) +on a component connected. This behaviour +is considered harmful in the case when it's desired to multiplex +different components on the same port, so, to disable it, +set `global_routes` to `false`. + +The default value is `true`, +e.g. legacy behaviour is emulated: the only reason for this is +to maintain backward compatibility with existing deployments. + +## hosts + +*{Hostname: [HostOption, ...]}* + +The external Jabber component that connects to this +[`ejabberd_service`](listen.md#ejabberd_service) +can serve one or more hostnames. As `HostOption` + you can define options for the component; currently the only allowed + option is the password required to the component when attempt to + connect to ejabberd: `password: Secret`. Note that you + cannot define in a single `ejabberd_service` components of different + services: add an `ejabberd_service` for each service, as seen in an + example below. This option may not be necessary if the component + already provides the host in its packets; in that case, you can simply + provide the password option that will be used for all the hosts + (see port 5236 definition in the example below). + +## max_fsm_queue + +*Size* + +This option specifies the maximum number of elements in the queue of + the FSM (Finite State Machine). Roughly speaking, each message in + such queues represents one XML stanza queued to be sent into its + relevant outgoing stream. If queue size reaches the limit (because, + for example, the receiver of stanzas is too slow), the FSM and the + corresponding connection (if any) will be terminated and error + message will be logged. The reasonable value for this option depends + on your hardware configuration. This option can be specified for + [`ejabberd_service`](listen.md#ejabberd_service) + and [`ejabberd_c2s`](listen.md#ejabberd_c2s) + listeners, or also globally for + [`ejabberd_s2s_out`](listen.md#ejabberd_s2s-out). + If the option is not specified for + `ejabberd_service` or `ejabberd_c2s` listeners, the globally + configured value is used. The allowed values are integers and + ’undefined’. Default value: ’10000’. + +## max_payload_size + +*Size* + +Specify the maximum payload size in bytes. +It can be either an integer or the word `infinity`. +The default value is `infinity`. + +## max_stanza_size + +*Size* + +This option specifies an approximate maximum size in bytes of XML + stanzas. Approximate, because it is calculated with the precision of + one block of read data. For example `{max_stanza_size, 65536}`. The + default value is `infinity`. Recommended values are 65536 for c2s + connections and 131072 for s2s connections. s2s max stanza size must + always much higher than c2s limit. Change this value with extreme + care as it can cause unwanted disconnect if set too low. + +## password + +*Secret* + +Specify the password to verify an external component that connects to the port. + +
improved in 20.07
+ +## port + +*Port number, or unix domain socket path* + +Declares at which port/unix domain socket should be listening. + +Can be set to number between `1` and `65535` to listen on TCP or UDP socket, +or can be set to string in form `"unix:/path/to/socket"` to create and listen +on unix domain socket `/path/to/socket`. + +## protocol_options + +*ProtocolOpts* + +List of general options relating to SSL/TLS. These map to + [`OpenSSL’s set_options()`](https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_options.html). + The default entry is: `"no_sslv3|cipher_server_preference|no_compression"` + +Please note: if this option is set in +[`ejabberd_c2s`](listen.md#ejabberd_c2s) +or [`ejabberd_s2s_in`](listen.md#ejabberd_s2s-in) +and the corresponding top-level option is also set +([`c2s_protocol_options`](toplevel.md#c2s-protocol-options), +[`s2s_protocol_options`](toplevel.md#s2s-protocol-options)), +then the top-level option is used, not this one. + +## request_handlers + +*{Path: Module}* + +To define one or several handlers that will serve HTTP requests in +[`ejabberd_http`](listen.md#ejabberd_http). The + Path is a string; so the URIs that start with that Path will be + served by Module. For example, if you want `mod_foo` to serve the + URIs that start with `/a/b/`, and you also want `mod_bosh` to + serve the URIs `/bosh/`, use this option: + + request_handlers: + /a/b: mod_foo + /bosh: mod_bosh + /mqtt: mod_mqtt + +
new in 21.07
+ +## send_timeout + +*Integer | infinity* + +Sets the longest time that data can wait to be accepted to sent by OS socket. Triggering this timeout will cause the server to close it. By default it's set to 15 seconds, expressed in milliseconds: 15000 + +## shaper + +*none | ShaperName* + +This option defines a shaper for the port (see section  +[Shapers](../../admin/configuration/basic.md#shapers)). + The default value is `none`. + +## shaper_rule + +*none | ShaperRule* + +This option defines a shaper rule for +[`ejabberd_service`](listen.md#ejabberd_service) (see +section [Shapers](../../admin/configuration/basic.md#shapers)). +The recommended value is `fast`. + +## starttls + +*true | false* + +This option specifies that STARTTLS encryption is available on +connections to the port. You should also set the +[`certfiles`](toplevel.md#certfiles) top-level option +or configure [ACME](../../admin/configuration/basic.md#acme). + +This option gets implicitly enabled when enabling +[`starttls_required`](#starttls_required) or [`tls_verify`](#tls_verify). + +## starttls_required + +*true | false* + +This option specifies that STARTTLS encryption is required on +connections to the port. No unencrypted connections will be allowed. +You should also set the +[`certfiles`](toplevel.md#certfiles) top-level option +or configure [ACME](../../admin/configuration/basic.md#acme). + +Enabling this option implicitly enables also the [`starttls`](#starttls) option. + +## tag + +*String* + +Allow specifying a tag in a `listen` section +and later use it to have a special +[`api_permissions`](toplevel.md#api_permissions) +just for it. + +For example: + + listen: + - + port: 4000 + module: ejabberd_http + tag: "magic_listener" + + api_permissions: + "magic_access": + from: + - tag: "magic_listener" + who: all + what: "*" + +The default value is the empty string: `""`. + +## timeout + +*Integer* + +Timeout of the connections, expressed in milliseconds. Default: 5000 + +## tls + +*true | false* + +This option specifies that traffic on the port will be encrypted + using SSL immediately after connecting. This was the traditional + encryption method in the early Jabber software, commonly on port + 5223 for client-to-server communications. But this method is + nowadays deprecated and not recommended. The preferable encryption + method is STARTTLS on port 5222, as defined + [`RFC 6120: XMPP Core`](https://xmpp.org/rfcs/rfc6120.html#tls), + which can be enabled in `ejabberd` with the option + [`starttls`](#starttls). + +If this option is set, you should also set the + [`certfiles`](toplevel.md#certfiles) top-level + option or configure [ACME](../../admin/configuration/basic.md#acme). + +The option `tls` can also be used in + [`ejabberd_http`](listen.md#ejabberd_http) + to support HTTPS. + +Enabling this option implicitly disables the [`starttls`](#starttls) option. + +## tls_compression + +*true | false* + +Whether to enable or disable TLS compression. The default value is + `false`. + +Please note: if this option is set in +[`ejabberd_c2s`](listen.md#ejabberd_c2s) +or [`ejabberd_s2s_in`](listen.md#ejabberd_s2s-in) +and the corresponding top-level option is also set +([`c2s_tls_compression`](toplevel.md#c2s-tls-compression), +[`s2s_tls_compression`](toplevel.md#s2s-tls-compression)), +then the top-level option is used, not this one. + +## tls_verify + +*false | true* + +This option specifies whether to verify the certificate or not when TLS is enabled. + +The default value is `false`, which means no checks are performed. + +The certificate will be checked against trusted CA roots, either defined at the operation system level or defined in the + listener [`cafile`](#cafile). If trusted, it will accept the jid that is embedded in the certificate in the + `subjectAltName` field of that certificate. + +Enabling this option implicitly enables also the [`starttls`](#starttls) option. + +## use_proxy_protocol + +*true | false* + +Is this listener accessed by proxy service that is using + proxy protocol for supplying real IP addresses to ejabberd server. You can read about this protocol + in [Proxy protocol specification](https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt). + The default value of this option is`false`. + +## zlib + +*true | false* + +This option specifies that Zlib stream compression (as defined in + [`XEP-0138`](https://xmpp.org/extensions/xep-0138.html)) is available + on connections to the port. diff --git a/content/archive/23_10/listen.md b/content/archive/23.10/listen.md similarity index 78% rename from content/archive/23_10/listen.md rename to content/archive/23.10/listen.md index 8d313f6e..c6bc0853 100644 --- a/content/archive/23_10/listen.md +++ b/content/archive/23.10/listen.md @@ -1,11 +1,8 @@ --- -title: Listen Modules -toc: true -menu: Listen Modules -order: 50 +search: + exclude: true --- - # Listen Option The **listen option** defines for which ports, addresses and network @@ -73,37 +70,37 @@ are: Handles c2s connections. Options: -[access](/archive/23_10/listen-options/#access), -[cafile](/archive/23_10/listen-options/#cafile), -[ciphers](/archive/23_10/listen-options/#ciphers), -[dhfile](/archive/23_10/listen-options/#dhfile), -[max_fsm_queue](/archive/23_10/listen-options/#max-fsm-queue), -[max_stanza_size](/archive/23_10/listen-options/#max-stanza-size), -[protocol_options](/archive/23_10/listen-options/#protocol-options), -[send_timeout](/archive/23_10/listen-options/#send-timeout), -[shaper](/archive/23_10/listen-options/#shaper), -[starttls](/archive/23_10/listen-options/#starttls), -[starttls_required](/archive/23_10/listen-options/#starttls-required), -[tls](/archive/23_10/listen-options/#tls), -[tls_compression](/archive/23_10/listen-options/#tls-compression), -[tls_verify](/archive/23_10/listen-options/#tls-verify), -[zlib](/archive/23_10/listen-options/#zlib). +[access](listen-options.md#access), +[cafile](listen-options.md#cafile), +[ciphers](listen-options.md#ciphers), +[dhfile](listen-options.md#dhfile), +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_stanza_size](listen-options.md#max_stanza_size), +[protocol_options](listen-options.md#protocol_options), +[send_timeout](listen-options.md#send_timeout), +[shaper](listen-options.md#shaper), +[starttls](listen-options.md#starttls), +[starttls_required](listen-options.md#starttls_required), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls_compression), +[tls_verify](listen-options.md#tls_verify), +[zlib](listen-options.md#zlib). ## ejabberd_s2s_in Handles incoming s2s connections. Options: -[cafile](/archive/23_10/listen-options/#cafile), -[ciphers](/archive/23_10/listen-options/#ciphers), -[dhfile](/archive/23_10/listen-options/#dhfile), -[max_fsm_queue](/archive/23_10/listen-options/#max-fsm-queue), -[max_stanza_size](/archive/23_10/listen-options/#max-stanza-size), -[protocol_options](/archive/23_10/listen-options/#protocol-options), -[send_timeout](/archive/23_10/listen-options/#send-timeout), -[shaper](/archive/23_10/listen-options/#shaper), -[tls](/archive/23_10/listen-options/#tls), -[tls_compression](/archive/23_10/listen-options/#tls-compression). +[cafile](listen-options.md#cafile), +[ciphers](listen-options.md#ciphers), +[dhfile](listen-options.md#dhfile), +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_stanza_size](listen-options.md#max_stanza_size), +[protocol_options](listen-options.md#protocol_options), +[send_timeout](listen-options.md#send_timeout), +[shaper](listen-options.md#shaper), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls_compression). ## ejabberd_service @@ -113,23 +110,23 @@ Interacts with an ([`XEP-0114`](https://xmpp.org/extensions/xep-0114.html)). Options: -[access](/archive/23_10/listen-options/#access), -[cafile](/archive/23_10/listen-options/#cafile), -[certfile](/archive/23_10/listen-options/#certfile), -[check_from](/archive/23_10/listen-options/#check-from), -[ciphers](/archive/23_10/listen-options/#ciphers), -[dhfile](/archive/23_10/listen-options/#dhfile), -[global_routes](/archive/23_10/listen-options/#global-routes), -[hosts](/archive/23_10/listen-options/#hosts), -[max_fsm_queue](/archive/23_10/listen-options/#max-fsm-queue), -[max_stanza_size](/archive/23_10/listen-options/#max-stanza-size), -[password](/archive/23_10/listen-options/#password), -[protocol_options](/archive/23_10/listen-options/#protocol-options), -[send_timeout](/archive/23_10/listen-options/#send-timeout), -[shaper](/archive/23_10/listen-options/#shaper), -[shaper_rule](/archive/23_10/listen-options/#shaper-rule), -[tls](/archive/23_10/listen-options/#tls), -[tls_compression](/archive/23_10/listen-options/#tls-compression). +[access](listen-options.md#access), +[cafile](listen-options.md#cafile), +[certfile](listen-options.md#certfile), +[check_from](listen-options.md#check_from), +[ciphers](listen-options.md#ciphers), +[dhfile](listen-options.md#dhfile), +[global_routes](listen-options.md#global_routes), +[hosts](listen-options.md#hosts), +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_stanza_size](listen-options.md#max_stanza_size), +[password](listen-options.md#password), +[protocol_options](listen-options.md#protocol_options), +[send_timeout](listen-options.md#send_timeout), +[shaper](listen-options.md#shaper), +[shaper_rule](listen-options.md#shaper_rule), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls_compression). ## ejabberd_sip @@ -137,13 +134,13 @@ Handles SIP requests as defined in [`RFC 3261`](https://tools.ietf.org/html/rfc3261). For details please check the -[ejabberd_sip](/archive/23_10/listen/#ejabberd-sip-1) -and [mod_sip](/archive/23_10/modules/#mod-sip) sections. +[ejabberd_sip](listen.md#ejabberd_sip_1) +and [mod_sip](modules.md#mod_sip) sections. General listener options: -[certfile](/archive/23_10/listen-options/#certfile), -[send_timeout](/archive/23_10/listen-options/#send-timeout), -[tls](/archive/23_10/listen-options/#tls). +[certfile](listen-options.md#certfile), +[send_timeout](listen-options.md#send_timeout), +[tls](listen-options.md#tls). ## ejabberd_stun @@ -152,7 +149,7 @@ Handles STUN/TURN requests as defined in [`RFC 5766`](https://tools.ietf.org/html/rfc5766). For the specific module options, please check the -[ejabberd_stun](/archive/23_10/listen/#ejabberd-stun-1) section: +[ejabberd_stun](listen.md#ejabberd_stun_1) section: `auth_realm`, `auth_type`, `server_name`, @@ -166,57 +163,57 @@ For the specific module options, please check the `use_turn`. General listener options: -[certfile](/archive/23_10/listen-options/#certfile), -[send_timeout](/archive/23_10/listen-options/#send-timeout), -[shaper](/archive/23_10/listen-options/#shaper), -[tls](/archive/23_10/listen-options/#tls), +[certfile](listen-options.md#certfile), +[send_timeout](listen-options.md#send_timeout), +[shaper](listen-options.md#shaper), +[tls](listen-options.md#tls), ## ejabberd_http Handles incoming HTTP connections. With the proper request handlers configured, this serves HTTP services like -[ACME](/admin/configuration/basic/#acme), -[API](/archive/23_10/modules/#mod-http-api), -[BOSH](/archive/23_10/modules/#mod-bosh), -[CAPTCHA](/admin/configuration/basic/#captcha), -[Fileserver](/archive/23_10/modules/#mod-http-fileserver), -[OAuth](/developer/ejabberd-api/oauth/), -[RegisterWeb](/archive/23_10/modules/#mod-register-web), -[Upload](/archive/23_10/modules/#mod-http-upload), -[WebAdmin](/admin/guide/managing/#web-admin), -[WebSocket](/archive/23_10/listen/#ejabberd-http-ws), -[XML-RPC](/archive/23_10/listen/#ejabberd-xmlrpc). +[ACME](../../admin/configuration/basic.md#acme), +[API](modules.md#mod_http_api), +[BOSH](modules.md#mod_bosh), +[CAPTCHA](../../admin/configuration/basic.md#captcha), +[Fileserver](modules.md#mod_http_fileserver), +[OAuth](../../developer/ejabberd-api/oauth.md), +[RegisterWeb](modules.md#mod_register_web), +[Upload](modules.md#mod_http_upload), +[WebAdmin](../../admin/guide/managing.md#web_admin), +[WebSocket](listen.md#ejabberd_http_ws), +[XML-RPC](listen.md#ejabberd_xmlrpc). Options: -[cafile](/archive/23_10/listen-options/#cafile), -[ciphers](/archive/23_10/listen-options/#ciphers), -[custom_headers](/archive/23_10/listen-options/#custom-headers), -[default_host](/archive/23_10/listen-options/#default-host), -[dhfile](/archive/23_10/listen-options/#dhfile), -[protocol_options](/archive/23_10/listen-options/#protocol-options), -[request_handlers](/archive/23_10/listen-options/#request-handlers), -[send_timeout](/archive/23_10/listen-options/#send-timeout), -[tag](/archive/23_10/listen-options/#tag), -[tls](/archive/23_10/listen-options/#tls), -[tls_compression](/archive/23_10/listen-options/#tls-compression), -and the [trusted_proxies](/archive/23_10/toplevel/#trusted-proxies) top-level option. +[cafile](listen-options.md#cafile), +[ciphers](listen-options.md#ciphers), +[custom_headers](listen-options.md#custom_headers), +[default_host](listen-options.md#default_host), +[dhfile](listen-options.md#dhfile), +[protocol_options](listen-options.md#protocol_options), +[request_handlers](listen-options.md#request_handlers), +[send_timeout](listen-options.md#send_timeout), +[tag](listen-options.md#tag), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls_compression), +and the [trusted_proxies](toplevel.md#trusted_proxies) top-level option. ## mod_mqtt Support for MQTT requires configuring `mod_mqtt` both in the -[listen](/archive/23_10/toplevel/#listen) and the -[modules](/archive/23_10/toplevel/#modules) sections. -Check the [mod_mqtt module](/archive/23_10/modules/#mod-mqtt) options, -and the [MQTT Support](/admin/guide/mqtt/) section. +[listen](toplevel.md#listen) and the +[modules](toplevel.md#modules) sections. +Check the [mod_mqtt module](modules.md#mod_mqtt) options, +and the [MQTT Support](../../admin/guide/mqtt/index.md) section. Listen options: -[backlog](/archive/23_10/listen-options/#backlog), -[max_fsm_queue](/archive/23_10/listen-options/#max-fsm-queue), -[max_payload_size](/archive/23_10/listen-options/#max-payload-size), -[send_timeout](/archive/23_10/listen-options/#send-timeout), -[tls](/archive/23_10/listen-options/#tls), -[tls_verify](/archive/23_10/listen-options/#tls-verify). +[backlog](listen-options.md#backlog), +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_payload_size](listen-options.md#max_payload_size), +[send_timeout](listen-options.md#send_timeout), +[tls](listen-options.md#tls), +[tls_verify](listen-options.md#tls_verify). @@ -339,14 +336,14 @@ And you should also add these in the case if TURN is enabled: ## SIP Configuration `ejabberd` has built-in SIP support. To activate this feature, -add the [`ejabberd_sip`](#ejabberd-sip) listen module, enable -[`mod_sip`](/archive/23_10/modules/#mod-sip) module +add the [`ejabberd_sip`](#ejabberd_sip) listen module, enable +[`mod_sip`](modules.md#mod_sip) module for the desired virtual host, and configure DNS properly. To add a listener you should configure `ejabberd_sip` listening module as described in [Listen](#listen-option) section. -If option [`tls`](/archive/23_10/listen-options/#tls) is specified, -option [`certfile`](/archive/23_10/listen-options/#certfile) +If option [`tls`](listen-options.md#tls) is specified, +option [`certfile`](listen-options.md#certfile) must be specified as well, otherwise incoming TLS connections would fail. @@ -426,9 +423,9 @@ section of an `ejabberd_http` listener: This module can be configured using those top-level options: -- [websocket\_origin](/archive/23_10/toplevel/#websocket-origin) -- [websocket\_ping\_interval](/archive/23_10/toplevel/#websocket-ping-interval) -- [websocket\_timeout](/archive/23_10/toplevel/#websocket-timeout) +- [websocket\_origin](toplevel.md#websocket_origin) +- [websocket\_ping\_interval](toplevel.md#websocket_ping_interval) +- [websocket\_timeout](toplevel.md#websocket_timeout) ## WebSocket Discovery @@ -439,7 +436,7 @@ You may want to provide a `host-meta` file so clients can easily discover WebSocket service for your XMPP domain (see [XEP-0156](https://xmpp.org/extensions/xep-0156.html#http)). One easy way to provide that file is using -[`mod_host_meta`](/archive/23_10/modules/#mod-host-meta). +[`mod_host_meta`](modules.md#mod_host_meta). ## Testing WebSocket @@ -453,13 +450,13 @@ There is an example configuration for WebSocket and Converse.js in the # ejabberd_xmlrpc Handles XML-RPC requests to execute -[ejabberd commands](/admin/guide/managing/#ejabberd-commands). +[ejabberd commands](../../admin/guide/managing.md#ejabberd_commands). It is configured as a request handler in -[ejabberd_http](/archive/23_10/listen/#ejabberd-http). +[ejabberd_http](listen.md#ejabberd_http). This is the minimum configuration required to enable the feature: -```yaml +``` yaml listen: - port: 5280 @@ -477,7 +474,7 @@ api_permissions: Example Python3 script: -```python +``` python import xmlrpc.client server = xmlrpc.client.ServerProxy("http://127.0.0.1:5280/xmlrpc/"); print(server.connected_users_number()) @@ -485,11 +482,11 @@ print(server.connected_users_number()) By default there is no restriction to who can execute what commands, so it is strongly recommended that you configure restrictions using -[API Permissions](/developer/ejabberd-api/permissions/). +[API Permissions](../../developer/ejabberd-api/permissions.md). This example configuration adds some restrictions (only requests from localhost are accepted, the XML-RPC query must include authentication credentials of a specific account registered in ejabberd, and only two commands are accepted): -```yaml +``` yaml listen: - port: 5280 @@ -511,7 +508,7 @@ api_permissions: Example Python3 script for that restricted configuration: -```python +``` python import xmlrpc.client server = xmlrpc.client.ServerProxy("http://127.0.0.1:5280/xmlrpc/"); @@ -532,17 +529,17 @@ print(calling('registered_users', params)) Please notice, when using the old Python2, replace the two first lines with: -```python +``` python import xmlrpclib server = xmlrpclib.Server("http://127.0.0.1:5280/xmlrpc/"); ``` It's possible to use OAuth for authentication instead of plain password, see -[OAuth Support](/developer/ejabberd-api/oauth/). +[OAuth Support](../../developer/ejabberd-api/oauth.md). In ejabberd 20.03 and older, it was possible to configure `ejabberd_xmlrpc` as a listener, see the old document for reference and example configuration: -[Listening Module](/admin/configuration/old/#listening-module). +[Listening Module](../old.md#listening_module). Just for reference, there's also the old [`ejabberd_xmlrpc documentation`](https://ejabberd.im/ejabberd_xmlrpc) @@ -570,7 +567,7 @@ For example, the following simple configuration defines: service. - Port 5281 listens for HTTP requests, using HTTPS to serve HTTP-Bind - (BOSH) and the Web Admin as explained in [Managing: Web Admin](/admin/guide/managing/#web-admin). The + (BOSH) and the Web Admin as explained in [Managing: Web Admin](../../admin/guide/managing.md#web_admin). The socket only listens connections to the IP address 127.0.0.1. @@ -644,7 +641,7 @@ In this example, the following configuration defines that: - Port 5280 is serving the Web Admin and the HTTP-Bind (BOSH) service in all the IPv4 addresses. Note that it is also possible to serve them - on different ports. The second example in section [Managing: Web Admin](/admin/guide/managing/#web-admin) shows + on different ports. The second example in section [Managing: Web Admin](../../admin/guide/managing.md#web_admin) shows how exactly this can be done. A request handler to serve MQTT over WebSocket is also defined. - All users except for the administrators have a traffic of limit diff --git a/content/archive/23_10/modules.md b/content/archive/23.10/modules.md similarity index 87% rename from content/archive/23_10/modules.md rename to content/archive/23.10/modules.md index 61408b5a..42b20dde 100644 --- a/content/archive/23_10/modules.md +++ b/content/archive/23.10/modules.md @@ -1,10 +1,9 @@ --- -title: Modules Options -toc: true -menu: Modules Opts -order: 95 +search: + exclude: true --- +# Modules Options mod\_adhoc ---------- @@ -83,9 +82,9 @@ mod\_admin\_update\_sql This module can be used to update existing SQL database from the default to the new schema. Check the section [Default and New -Schemas](/admin/configuration/database/#default-and-new-schemas) for details. +Schemas](../../admin/configuration/database.md#default_and_new_schemas) for details. Please note that only MS SQL, MySQL, and PostgreSQL are supported. When -the module is loaded use [update_sql](/archive/23_10/admin-api/#update-sql) API. +the module is loaded use [update_sql](admin-api.md#update_sql) API. The module has no options. @@ -102,7 +101,7 @@ it may broadcast a lot of messages. This module should be disabled for instances of ejabberd with hundreds of thousands users. The Ad-hoc Commands are listed in the Server Discovery. For this feature -to work, [mod_adhoc](/archive/23_10/modules/#mod-adhoc) must be enabled. +to work, [mod_adhoc](modules.md#mod_adhoc) must be enabled. The specific JIDs where messages can be sent are listed below. The first JID in each entry will apply only to the specified virtual host @@ -114,7 +113,7 @@ hosts in ejabberd: connected to several resources, only the resource with the highest priority will receive the message. If the registered user is not connected, the message will be stored offline in assumption that - offline storage (see [mod_offline](/archive/23_10/modules/#mod-offline)) is enabled. + offline storage (see [mod_offline](modules.md#mod_offline)) is enabled. - example.org/announce/online (example.org/announce/all-hosts/online):: The message is sent to all @@ -143,23 +142,23 @@ the message of the day. The default value is *none* (i.e. nobody is able to send such messages). - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/23_10/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/23_10/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/23_10/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/23_10/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/23_10/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_avatar ----------- @@ -172,8 +171,8 @@ Conversion](https://xmpp.org/extensions/xep-0398.html). Also, the module supports conversion between avatar image formats on the fly. -The module depends on [mod_vcard](/archive/23_10/modules/#mod-vcard), [mod_vcard_xupdate](/archive/23_10/modules/#mod-vcard-xupdate) and -[mod_pubsub](/archive/23_10/modules/#mod-pubsub). +The module depends on [mod_vcard](modules.md#mod_vcard), [mod_vcard_xupdate](modules.md#mod_vcard_xupdate) and +[mod_pubsub](modules.md#mod_pubsub). __Available options:__ @@ -261,15 +260,15 @@ while having to get through an HTTP proxy. __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/23_10/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/23_10/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/23_10/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **json**: *true | false* @@ -293,15 +292,15 @@ authentication. Basically, it creates a new session with anonymous authentication. The default value is *false*. - **queue\_type**: *ram | file* -Same as top-level [queue_type](/archive/23_10/toplevel/#queue-type) option, but applied to this module +Same as top-level [queue_type](toplevel.md#queue_type) option, but applied to this module only. - **ram\_db\_type**: *mnesia | sql | redis* -Same as top-level [default_ram_db](/archive/23_10/toplevel/#default-ram-db) option, but applied to this module +Same as top-level [default_ram_db](toplevel.md#default_ram_db) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/23_10/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. __**Example**:__ @@ -324,28 +323,28 @@ mod\_caps This module implements [XEP-0115: Entity Capabilities](https://xmpp.org/extensions/xep-0115.html). The main purpose of the module is to provide PEP functionality (see -[mod_pubsub](/archive/23_10/modules/#mod-pubsub)). +[mod_pubsub](modules.md#mod_pubsub)). __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/23_10/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/23_10/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/23_10/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/23_10/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/23_10/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_carboncopy --------------- @@ -392,7 +391,7 @@ mod\_configure The module provides server configuration functionality via [XEP-0050: Ad-Hoc Commands](https://xmpp.org/extensions/xep-0050.html). This module -requires [mod_adhoc](/archive/23_10/modules/#mod-adhoc) to be loaded. +requires [mod_adhoc](modules.md#mod_adhoc) to be loaded. The module has no options. @@ -402,15 +401,15 @@ mod\_conversejs This module serves a simple page for the [Converse](https://conversejs.org/) XMPP web browser client. -This module is available since ejabberd 21.12. Several options were -improved in ejabberd 22.05. +This module is available since ejabberd 21.12. Several options were +improved in ejabberd 22.05. To use this module, in addition to adding it to the *modules* section, you must also enable it in *listen* → *ejabberd\_http* → -[request\_handlers](/archive/23_10/listen-options/#request-handlers). +[request\_handlers](listen-options.md#request_handlers). Make sure either *mod\_bosh* or *ejabberd\_http\_ws* -[request\_handlers](/archive/23_10/listen-options/#request-handlers) are +[request\_handlers](listen-options.md#request_handlers) are enabled. When *conversejs\_css* and *conversejs\_script* are *auto*, by default @@ -428,7 +427,7 @@ value is *auto*. Converse CSS URL. The keyword *@HOST@* is replaced with the hostname. The default value is *auto*. -
added in 22.05
+
added in 22.05
- **conversejs\_options**: *{Name: Value}* Specify additional options to be passed to Converse. See [Converse @@ -436,7 +435,7 @@ configuration](https://conversejs.org/docs/html/configuration.html). Only boolean, integer and string values are supported; lists are not supported. -
added in 22.05
+
added in 22.05
- **conversejs\_resources**: *Path* Local path to the Converse files. If not set, the public Converse client @@ -520,7 +519,7 @@ external PEP service. > **Note** > -> This module is complementary to [mod_privilege](/archive/23_10/modules/#mod-privilege) but can also be used +> This module is complementary to [mod_privilege](modules.md#mod_privilege) but can also be used > separately. __Available options:__ @@ -670,11 +669,11 @@ This module serves small *host-meta* files as described in [XEP-0156: Discovering Alternative XMPP Connection Methods](https://xmpp.org/extensions/xep-0156.html). -This module is available since ejabberd 22.05. +This module is available since ejabberd 22.05. To use this module, in addition to adding it to the *modules* section, you must also enable it in *listen* → *ejabberd\_http* → -[request\_handlers](/archive/23_10/listen-options/#request-handlers). +[request\_handlers](listen-options.md#request_handlers). Notice it only works if ejabberd\_http has tls enabled. @@ -718,7 +717,7 @@ JSON data. To use this module, in addition to adding it to the *modules* section, you must also enable it in *listen* → *ejabberd\_http* → -[request\_handlers](/archive/23_10/listen-options/#request-handlers). +[request\_handlers](listen-options.md#request_handlers). To use a specific API version N, when defining the URL path in the request\_handlers, add a *vN*. For example: */api/v2: mod\_http\_api* @@ -840,7 +839,7 @@ URL from which that file can later be downloaded. In order to use this module, it must be enabled in *listen* → *ejabberd\_http* → -[request\_handlers](/archive/23_10/listen-options/#request-handlers). +[request\_handlers](listen-options.md#request_handlers). __Available options:__ @@ -886,7 +885,7 @@ option is *undefined*, this option is set to the same value as *put\_url*. The keyword @HOST@ is replaced with the virtual host name. NOTE: if GET requests are handled by *mod\_http\_upload*, the *get\_url* must match the *put\_url*. Setting it to a different value only makes -sense if an external web server or [mod_http_fileserver](/archive/23_10/modules/#mod-http-fileserver) is used to +sense if an external web server or [mod_http_fileserver](modules.md#mod_http_fileserver) is used to serve the uploaded files. - **host** @@ -1063,23 +1062,23 @@ of the ejabberd server. __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/23_10/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/23_10/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/23_10/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/23_10/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/23_10/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_legacy\_auth ----------------- @@ -1109,7 +1108,7 @@ The default value is *all*. - **assume\_mam\_usage**: *true | false* This option determines how ejabberd’s stream management code (see -[mod_stream_mgmt](/archive/23_10/modules/#mod-stream-mgmt)) handles unacknowledged messages when the connection +[mod_stream_mgmt](modules.md#mod_stream_mgmt)) handles unacknowledged messages when the connection is lost. Usually, such messages are either bounced or resent. However, neither is done for messages that were stored in the user’s MAM archive if this option is set to *true*. In this case, ejabberd assumes those @@ -1117,19 +1116,19 @@ messages will be retrieved from the archive. The default value is *false*. - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/23_10/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/23_10/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/23_10/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **clear\_archive\_on\_room\_destroy**: *true | false* -Whether to destroy message archive of a room (see [mod_muc](/archive/23_10/modules/#mod-muc)) when it +Whether to destroy message archive of a room (see [mod_muc](modules.md#mod_muc)) when it gets destroyed. The default value is *true*. - **compress\_xml**: *true | false* @@ -1138,7 +1137,7 @@ custom compression algorithm. This feature works only with SQL backends. The default value is *false*. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/23_10/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **default**: *always | never | roster* @@ -1155,7 +1154,7 @@ option. Once the server received a request, that user’s messages are archived as usual. The default value is *false*. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/23_10/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. - **user\_mucsub\_from\_muc\_archive**: *true | false* When this option is disabled, for each individual subscriber a separa @@ -1206,16 +1205,16 @@ mod\_mix This module is an experimental implementation of [XEP-0369: Mediated Information eXchange (MIX)](https://xmpp.org/extensions/xep-0369.html). -MIX support was added in ejabberd 16.03 as an experimental feature, -updated in 19.02, and is not yet ready to use in production. It’s +MIX support was added in ejabberd 16.03 as an experimental feature, +updated in 19.02, and is not yet ready to use in production. It’s asserted that the MIX protocol is going to replace the MUC protocol in -the future (see [mod_muc](/archive/23_10/modules/#mod-muc)). +the future (see [mod_muc](modules.md#mod_muc)). To learn more about how to use that feature, you can refer to our tutorial: [Getting started with XEP-0369: Mediated Information eXchange (MIX) v0.1](https://docs.ejabberd.im/tutorials/mix-010/). -The module depends on [mod_mam](/archive/23_10/modules/#mod-mam). +The module depends on [mod_mam](modules.md#mod_mam). __Available options:__ @@ -1224,7 +1223,7 @@ An access rule to control MIX channels creations. The default value is *all*. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/23_10/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **host** @@ -1258,23 +1257,23 @@ channels (either on your server or on any remote servers). __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/23_10/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/23_10/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/23_10/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/23_10/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/23_10/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_mqtt --------- @@ -1295,19 +1294,19 @@ Access rules to restrict access to topics for subscribers. By default there are no restrictions. - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/23_10/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/23_10/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/23_10/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/23_10/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **match\_retained\_limit**: *pos\_integer() | infinity* @@ -1326,11 +1325,11 @@ The maximum topic depth, i.e. the number of slashes (*/*) in the topic. The default value is *8*. - **queue\_type**: *ram | file* -Same as top-level [queue_type](/archive/23_10/toplevel/#queue-type) option, but applied to this module +Same as top-level [queue_type](toplevel.md#queue_type) option, but applied to this module only. - **ram\_db\_type**: *mnesia* -Same as top-level [default_ram_db](/archive/23_10/toplevel/#default-ram-db) option, but applied to this module +Same as top-level [default_ram_db](toplevel.md#default_ram_db) option, but applied to this module only. - **session\_expiry**: *timeout()* @@ -1339,7 +1338,7 @@ When *0* is set, the session gets destroyed when the underlying client connection is closed. The default value is *5* minutes. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/23_10/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_mqtt\_bridge ----------------- @@ -1348,7 +1347,7 @@ This module adds ability to synchronize local MQTT topics with data on remote servers It can update topics on remote servers when local user updates local topic, or can subscribe for changes on remote server, and update local copy when remote data is updated. It is available since -ejabberd 23.01. +ejabberd 23.01. __Available options:__ @@ -1435,7 +1434,7 @@ To configure who is allowed to modify the *persistent* room option. The default value is *all*, which means everyone is allowed to modify that option. -
improved in 23.10
+
improved in 23.10
- **access\_register**: *AccessName* This option specifies who is allowed to register nickname within the @@ -1443,17 +1442,17 @@ Multi-User Chat service and rooms. The default is *all* for backward compatibility, which means that any user is allowed to register any free nick in the MUC service and in the rooms. -
added in 22.05
+
added in 22.05
- **cleanup\_affiliations\_on\_start**: *true | false* Remove affiliations for non-existing local users on startup. The default value is *false*. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/23_10/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. -
improved in 22.05
+
improved in 22.05
- **default\_room\_options**: *Options* This option allows to define the desired default room options. Note that @@ -1530,7 +1529,7 @@ using an XMPP client with MUC capability. The *Options* are: - **logging**: *true | false* The public messages are logged using - [mod_muc_log](/archive/23_10/modules/#mod-muc-log). The default value is *false*. + [mod_muc_log](modules.md#mod_muc_log). The default value is *false*. - **mam**: *true | false* Enable message archiving. Implies mod\_mam @@ -1627,14 +1626,14 @@ is not specified, the only Jabber ID will be the hostname of the virtual host with the prefix "conference.". The keyword *@HOST@* is replaced with the real virtual host name. -
added in 21.01
+
added in 21.01
- **max\_captcha\_whitelist**: *Number* This option defines the maximum number of characters that Captcha Whitelist can have when configuring the room. The default value is *infinity*. -
added in 21.01
+
added in 21.01
- **max\_password**: *Number* This option defines the maximum number of characters that Password can @@ -1717,11 +1716,11 @@ rooms is high: this will improve server startup time and memory consumption. - **queue\_type**: *ram | file* -Same as top-level [queue_type](/archive/23_10/toplevel/#queue-type) option, but applied to this module +Same as top-level [queue_type](toplevel.md#queue_type) option, but applied to this module only. - **ram\_db\_type**: *mnesia | sql* -Same as top-level [default_ram_db](/archive/23_10/toplevel/#default-ram-db) option, but applied to this module +Same as top-level [default_ram_db](toplevel.md#default_ram_db) option, but applied to this module only. - **regexp\_room\_id**: *string()* @@ -1772,11 +1771,11 @@ This module provides commands to administer local MUC services and their MUC rooms. It also provides simple WebAdmin pages to view the existing rooms. -This module depends on [mod_muc](/archive/23_10/modules/#mod-muc). +This module depends on [mod_muc](modules.md#mod_muc). __Available options:__ -
added in 22.05
+
added in 22.05
- **subscribe\_room\_many\_max\_users**: *Number* How many users can be subscribed to a room at once using the @@ -1818,7 +1817,7 @@ Features: - A custom link can be added on top of each page. -The module depends on [mod_muc](/archive/23_10/modules/#mod-muc). +The module depends on [mod_muc](modules.md#mod_muc). __Available options:__ @@ -1901,7 +1900,7 @@ for MUCs](https://xmpp.org/extensions/xep-0421.html). When the module is enabled, the feature is enabled in all semi-anonymous rooms. -This module is available since ejabberd 23.10. +This module is available since ejabberd 23.10. The module has no options. @@ -1913,7 +1912,7 @@ This module implement Real-time blocklists for MUC rooms. It works by observing remote pubsub node conforming with specification described in . -This module is available since ejabberd 23.04. +This module is available since ejabberd 23.04. __Available options:__ @@ -2047,15 +2046,15 @@ on large MucSub services. The default value is *false*, meaning the optimisation is enabled. - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/23_10/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/23_10/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/23_10/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **store\_empty\_body**: *true | false | unless\_chat\_state* @@ -2070,7 +2069,7 @@ Whether or not to store groupchat messages. The default value is *false*. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/23_10/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. - **use\_mam\_for\_storage**: *true | false* This is an experimental option. Enabling this option, *mod\_offline* @@ -2141,7 +2140,7 @@ or checking availability. The default value is *false*. What to do when a client does not answer to a server ping request in less than period defined in *ping\_ack\_timeout* option: *kill* means destroying the underlying connection, *none* means to do nothing. NOTE: -when [mod_stream_mgmt](/archive/23_10/modules/#mod-stream-mgmt) is loaded and stream management is enabled by a +when [mod_stream_mgmt](modules.md#mod_stream_mgmt) is loaded and stream management is enabled by a client, killing the client connection doesn’t mean killing the client session - the session will be kept alive in order to give the client a chance to resume it. The default value is *none*. @@ -2195,28 +2194,28 @@ Lists](https://xmpp.org/extensions/xep-0016.html). > Nowadays modern XMPP clients rely on [XEP-0191: Blocking > Command](https://xmpp.org/extensions/xep-0191.html) which is > implemented by *mod\_blocking* module. However, you still need -> *mod\_privacy* loaded in order for [mod_blocking](/archive/23_10/modules/#mod-blocking) to work. +> *mod\_privacy* loaded in order for [mod_blocking](modules.md#mod_blocking) to work. __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/23_10/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/23_10/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/23_10/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/23_10/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/23_10/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_private ------------ @@ -2234,28 +2233,28 @@ Bookmarks](https://xmpp.org/extensions/xep-0048.html)). It also implements the bookmark conversion described in [XEP-0402: PEP Native Bookmarks](https://xmpp.org/extensions/xep-0402.html), see the command -[bookmarks\_to\_pep](https://docs.ejabberd.im/archive/23_10/admin-api/#bookmarks-to-pep). +[bookmarks\_to\_pep](admin-api.md#bookmarks_to_pep). __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/23_10/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/23_10/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/23_10/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/23_10/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/23_10/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_privilege -------------- @@ -2285,7 +2284,7 @@ Check the section about listening ports for more information. > **Note** > -> This module is complementary to [mod_delegation](/archive/23_10/modules/#mod-delegation), but can also be +> This module is complementary to [mod_delegation](modules.md#mod_delegation), but can also be > used separately. __Available options:__ @@ -2398,7 +2397,7 @@ A port number to listen for incoming connections. The default value is *7777*. - **ram\_db\_type**: *mnesia | redis | sql* -Same as top-level [default_ram_db](/archive/23_10/toplevel/#default-ram-db) option, but applied to this module +Same as top-level [default_ram_db](toplevel.md#default_ram_db) option, but applied to this module only. - **recbuf**: *Size* @@ -2483,7 +2482,7 @@ Publish-Subscribe](https://xmpp.org/extensions/xep-0060.html). The functionality in *mod\_pubsub* can be extended using plugins. The plugin that implements PEP ([XEP-0163: Personal Eventing via Pubsub](https://xmpp.org/extensions/xep-0163.html)) is enabled in the -default ejabberd configuration file, and it requires [mod_caps](/archive/23_10/modules/#mod-caps). +default ejabberd configuration file, and it requires [mod_caps](modules.md#mod_caps). __Available options:__ @@ -2493,7 +2492,7 @@ using *acl* and *access*. By default any account in the local ejabberd server is allowed to create pubsub nodes. The default value is: *all*. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/23_10/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **default\_node\_config**: *List of Key:Value* @@ -2534,7 +2533,7 @@ systems with not so many nodes, caching last items speeds up pubsub and allows to raise user connection rate. The cost is memory usage, as every item is stored in memory. -
added in 21.12
+
added in 21.12
- **max\_item\_expire\_node**: *timeout() | infinity* Specify the maximum item epiry time. Default value is: *infinity*. @@ -2678,19 +2677,19 @@ platform-dependant backend services such as FCM or APNS. __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/23_10/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/23_10/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/23_10/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/23_10/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **include\_body**: *true | false | Text* @@ -2707,7 +2706,7 @@ If this option is set to *true*, the sender’s JID is included with push notifications generated for incoming messages with a body. The default value is *false*. -
added in 23.10
+
added in 23.10
- **notify\_on**: *messages | all* If this option is set to *messages*, notifications are generated only @@ -2717,19 +2716,19 @@ notification. If unsure, it’s strongly recommended to stick to *all*, which is the default value. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/23_10/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_push\_keepalive -------------------- This module tries to keep the stream management session (see -[mod_stream_mgmt](/archive/23_10/modules/#mod-stream-mgmt)) of a disconnected mobile client alive if the client +[mod_stream_mgmt](modules.md#mod_stream_mgmt)) of a disconnected mobile client alive if the client enabled push notifications for that session. However, the normal session resumption timeout is restored once a push notification is issued, so the session will be closed if the client doesn’t respond to push notifications. -The module depends on [mod_push](/archive/23_10/modules/#mod-push). +The module depends on [mod_push](modules.md#mod_push). __Available options:__ @@ -2737,7 +2736,7 @@ __Available options:__ This option specifies the period of time until the session of a disconnected push client times out. This timeout is only in effect as long as no push notification is issued. Once that happened, the -resumption timeout configured for [mod_stream_mgmt](/archive/23_10/modules/#mod-stream-mgmt) is restored. The +resumption timeout configured for [mod_stream_mgmt](modules.md#mod_stream_mgmt) is restored. The default value is *72* hours. - **wake\_on\_start**: *true | false* @@ -2765,7 +2764,7 @@ enables end users to use an XMPP client to: - Delete an existing account on the server. -This module reads also the top-level [registration_timeout](/archive/23_10/toplevel/#registration-timeout) option +This module reads also the top-level [registration_timeout](toplevel.md#registration_timeout) option defined globally for the server, so please check that option documentation too. @@ -2786,7 +2785,7 @@ uncontrolled massive accounts creation by rogue users. Specify rules to restrict access for user unregistration. By default any user is able to unregister their account. -
added in 21.12
+
added in 21.12
- **allow\_modules**: *all | \[Module, ...\]* List of modules that can register accounts, or *all*. The default value @@ -2794,7 +2793,7 @@ is *all*, which is equivalent to something like *\[mod\_register, mod\_register\_web\]*. - **captcha\_protected**: *true | false* -Protect registrations with [CAPTCHA](/admin/configuration/basic/#captcha). The +Protect registrations with [CAPTCHA](../../admin/configuration/basic.md#captcha). The default is *false*. - **ip\_access**: *AccessName* @@ -2833,9 +2832,9 @@ This module provides a web page where users can: - Unregister an existing account on the server. -This module supports [CAPTCHA](/admin/configuration/basic/#captcha) to register a +This module supports [CAPTCHA](../../admin/configuration/basic.md#captcha) to register a new account. To enable this feature, configure the top-level -[captcha_cmd](/archive/23_10/toplevel/#captcha-cmd) and top-level [captcha_url](/archive/23_10/toplevel/#captcha-url) options. +[captcha_cmd](toplevel.md#captcha_cmd) and top-level [captcha_url](toplevel.md#captcha_url) options. As an example usage, the users of the host *localhost* can visit the page: *https://localhost:5280/register/* It is important to include the @@ -2843,8 +2842,8 @@ last / character in the URL, otherwise the subpages URL will be incorrect. This module is enabled in *listen* → *ejabberd\_http* → -[request\_handlers](/archive/23_10/listen-options/#request-handlers), no need -to enable in *modules*. The module depends on [mod_register](/archive/23_10/modules/#mod-register) where all +[request\_handlers](listen-options.md#request_handlers), no need +to enable in *modules*. The module depends on [mod_register](modules.md#mod_register) where all the configuration is performed. The module has no options. @@ -2879,19 +2878,19 @@ add/remove/modify contacts or send presence subscriptions. The default value is *all*, i.e. no restrictions. - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/23_10/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/23_10/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/23_10/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/23_10/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **store\_current\_id**: *true | false* @@ -2901,11 +2900,11 @@ calculated on the fly each time. Enabling this option reduces the load for both ejabberd and the database. This option does not affect the client in any way. This option is only useful if option *versioning* is set to *true*. The default value is *false*. IMPORTANT: if you use -[mod_shared_roster](/archive/23_10/modules/#mod-shared-roster) or [mod_shared_roster_ldap](/archive/23_10/modules/#mod-shared-roster-ldap), you must set the +[mod_shared_roster](modules.md#mod_shared_roster) or [mod_shared_roster_ldap](modules.md#mod_shared_roster_ldap), you must set the value of the option to *false*. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/23_10/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. - **versioning**: *true | false* Enables/disables Roster Versioning. The default value is *false*. @@ -3015,29 +3014,29 @@ parameters: group’s members. A group of other vhost can be identified with *groupid@vhost*. -This module depends on [mod_roster](/archive/23_10/modules/#mod-roster). If not enabled, roster queries +This module depends on [mod_roster](modules.md#mod_roster). If not enabled, roster queries will return 503 errors. __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/23_10/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/23_10/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/23_10/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql* -Same as top-level [default_db](/archive/23_10/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/23_10/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. __Examples:__ @@ -3116,25 +3115,25 @@ password in multiple places. - Connection parameters: The module also accepts the connection parameters, all of which default to the top-level parameter of the same name, if unspecified. See [LDAP - Connection](/admin/configuration/ldap/#ldap-connection) section for more + Connection](../../admin/configuration/ldap.md#ldap_connection) section for more information about them. -Check also the [Configuration examples](/admin/configuration/ldap/#ldap-examples) +Check also the [Configuration examples](../../admin/configuration/ldap.md#ldap_examples) section to get details about retrieving the roster, and configuration examples including Flat DIT and Deep DIT. __Available options:__ - **cache\_life\_time** -Same as top-level [cache_life_time](/archive/23_10/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed** -Same as top-level [cache_missed](/archive/23_10/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size** -Same as top-level [cache_size](/archive/23_10/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **ldap\_auth\_check**: *true | false* @@ -3143,24 +3142,24 @@ subsystem) for existence of each user in the shared LDAP roster. Set to *false* if you want to disable the check. Default value is *true*. - **ldap\_backups** -Same as top-level [ldap_backups](/archive/23_10/toplevel/#ldap-backups) option, but applied to this module +Same as top-level [ldap_backups](toplevel.md#ldap_backups) option, but applied to this module only. - **ldap\_base** -Same as top-level [ldap_base](/archive/23_10/toplevel/#ldap-base) option, but applied to this module only. +Same as top-level [ldap_base](toplevel.md#ldap_base) option, but applied to this module only. - **ldap\_deref\_aliases** -Same as top-level [ldap_deref_aliases](/archive/23_10/toplevel/#ldap-deref-aliases) option, but applied to this +Same as top-level [ldap_deref_aliases](toplevel.md#ldap_deref_aliases) option, but applied to this module only. - **ldap\_encrypt** -Same as top-level [ldap_encrypt](/archive/23_10/toplevel/#ldap-encrypt) option, but applied to this module +Same as top-level [ldap_encrypt](toplevel.md#ldap_encrypt) option, but applied to this module only. - **ldap\_filter** Additional filter which is AND-ed together with "User Filter" and "Group Filter". For more information check the LDAP -[Filters](/admin/configuration/ldap/#filters) section. +[Filters](../../admin/configuration/ldap.md#filters) section. - **ldap\_gfilter** "Group Filter", used when retrieving human-readable name (a.k.a. @@ -3197,14 +3196,14 @@ section Filters. - **ldap\_memberattr\_format\_re** A regex for extracting user ID from the value of the attribute named by *ldap\_memberattr*. Check the LDAP [Control -Parameters](/admin/configuration/ldap/#control-parameters) section. +Parameters](../../admin/configuration/ldap.md#control_parameters) section. - **ldap\_password** -Same as top-level [ldap_password](/archive/23_10/toplevel/#ldap-password) option, but applied to this module +Same as top-level [ldap_password](toplevel.md#ldap_password) option, but applied to this module only. - **ldap\_port** -Same as top-level [ldap_port](/archive/23_10/toplevel/#ldap-port) option, but applied to this module only. +Same as top-level [ldap_port](toplevel.md#ldap_port) option, but applied to this module only. - **ldap\_rfilter** So called "Roster Filter". Used to find names of all "shared roster" @@ -3213,37 +3212,37 @@ defaults to the top-level parameter of the same name. You must specify it in some place in the configuration, there is no default. - **ldap\_rootdn** -Same as top-level [ldap_rootdn](/archive/23_10/toplevel/#ldap-rootdn) option, but applied to this module +Same as top-level [ldap_rootdn](toplevel.md#ldap_rootdn) option, but applied to this module only. - **ldap\_servers** -Same as top-level [ldap_servers](/archive/23_10/toplevel/#ldap-servers) option, but applied to this module +Same as top-level [ldap_servers](toplevel.md#ldap_servers) option, but applied to this module only. - **ldap\_tls\_cacertfile** -Same as top-level [ldap_tls_cacertfile](/archive/23_10/toplevel/#ldap-tls-cacertfile) option, but applied to this +Same as top-level [ldap_tls_cacertfile](toplevel.md#ldap_tls_cacertfile) option, but applied to this module only. - **ldap\_tls\_certfile** -Same as top-level [ldap_tls_certfile](/archive/23_10/toplevel/#ldap-tls-certfile) option, but applied to this +Same as top-level [ldap_tls_certfile](toplevel.md#ldap_tls_certfile) option, but applied to this module only. - **ldap\_tls\_depth** -Same as top-level [ldap_tls_depth](/archive/23_10/toplevel/#ldap-tls-depth) option, but applied to this module +Same as top-level [ldap_tls_depth](toplevel.md#ldap_tls_depth) option, but applied to this module only. - **ldap\_tls\_verify** -Same as top-level [ldap_tls_verify](/archive/23_10/toplevel/#ldap-tls-verify) option, but applied to this module +Same as top-level [ldap_tls_verify](toplevel.md#ldap_tls_verify) option, but applied to this module only. - **ldap\_ufilter** "User Filter", used for retrieving the human-readable name of roster entries (usually full names of people in the roster). See also the parameters *ldap\_userdesc* and *ldap\_useruid*. For more information -check the LDAP [Filters](/admin/configuration/ldap/#filters) section. +check the LDAP [Filters](../../admin/configuration/ldap.md#filters) section. - **ldap\_uids** -Same as top-level [ldap_uids](/archive/23_10/toplevel/#ldap-uids) option, but applied to this module only. +Same as top-level [ldap_uids](toplevel.md#ldap_uids) option, but applied to this module only. - **ldap\_userdesc** The name of the attribute which holds the human-readable user name. @@ -3261,7 +3260,7 @@ retrieved from the *ldap\_memberattr* attribute of a group object. Retrieved from results of the "User Filter". Defaults to *cn*. - **use\_cache** -Same as top-level [use_cache](/archive/23_10/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_sic -------- @@ -3288,7 +3287,7 @@ virtual host. > > It is not enough to just load this module. You should also configure > listeners and DNS records properly. For details see the section about -> the [ejabberd\_sip](/archive/23_10/listen/#ejabberd-sip) listen module in +> the [ejabberd\_sip](listen.md#ejabberd_sip) listen module in > the ejabberd Documentation. __Available options:__ @@ -3390,11 +3389,11 @@ A time to wait for stanza acknowledgements. Setting it to *infinity* effectively disables the timeout. The default value is *1* minute. - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/23_10/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. The default value is *48 hours*. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/23_10/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **max\_ack\_queue**: *Size* @@ -3417,7 +3416,7 @@ default *resume\_timeout*. By default, it is set to the same value as the *resume\_timeout* option. - **queue\_type**: *ram | file* -Same as top-level [queue_type](/archive/23_10/toplevel/#queue-type) option, but applied to this module +Same as top-level [queue_type](toplevel.md#queue_type) option, but applied to this module only. - **resend\_on\_timeout**: *true | false | if\_offline* @@ -3446,7 +3445,7 @@ mod\_stun\_disco This module allows XMPP clients to discover STUN/TURN services and to obtain temporary credentials for using them as per [XEP-0215: External Service Discovery](https://xmpp.org/extensions/xep-0215.html). This -module is included in ejabberd since version 20.04. +module is included in ejabberd since version 20.04. __Available options:__ @@ -3583,19 +3582,19 @@ fields should return all users who added some information to their vCard. The default value is *false*. - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/23_10/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/23_10/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/23_10/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **db\_type**: *mnesia | sql | ldap* -Same as top-level [default_db](/archive/23_10/toplevel/#default-db) option, but applied to this module +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module only. - **host** @@ -3625,7 +3624,7 @@ ignored and the Jabber User Directory service will not appear in the Service Discovery item list. The default value is *false*. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/23_10/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. - **vcard**: *vCard* A custom vCard of the server that will be displayed by some XMPP clients @@ -3655,33 +3654,33 @@ will be translated to: __Available options for *ldap* backend:__ - **ldap\_backups** -Same as top-level [ldap_backups](/archive/23_10/toplevel/#ldap-backups) option, but applied to this module +Same as top-level [ldap_backups](toplevel.md#ldap_backups) option, but applied to this module only. - **ldap\_base** -Same as top-level [ldap_base](/archive/23_10/toplevel/#ldap-base) option, but applied to this module only. +Same as top-level [ldap_base](toplevel.md#ldap_base) option, but applied to this module only. - **ldap\_deref\_aliases** -Same as top-level [ldap_deref_aliases](/archive/23_10/toplevel/#ldap-deref-aliases) option, but applied to this +Same as top-level [ldap_deref_aliases](toplevel.md#ldap_deref_aliases) option, but applied to this module only. - **ldap\_encrypt** -Same as top-level [ldap_encrypt](/archive/23_10/toplevel/#ldap-encrypt) option, but applied to this module +Same as top-level [ldap_encrypt](toplevel.md#ldap_encrypt) option, but applied to this module only. - **ldap\_filter** -Same as top-level [ldap_filter](/archive/23_10/toplevel/#ldap-filter) option, but applied to this module +Same as top-level [ldap_filter](toplevel.md#ldap_filter) option, but applied to this module only. - **ldap\_password** -Same as top-level [ldap_password](/archive/23_10/toplevel/#ldap-password) option, but applied to this module +Same as top-level [ldap_password](toplevel.md#ldap_password) option, but applied to this module only. - **ldap\_port** -Same as top-level [ldap_port](/archive/23_10/toplevel/#ldap-port) option, but applied to this module only. +Same as top-level [ldap_port](toplevel.md#ldap_port) option, but applied to this module only. - **ldap\_rootdn** -Same as top-level [ldap_rootdn](/archive/23_10/toplevel/#ldap-rootdn) option, but applied to this module +Same as top-level [ldap_rootdn](toplevel.md#ldap_rootdn) option, but applied to this module only. - **ldap\_search\_fields**: *{Name: Attribute, ...}* @@ -3728,27 +3727,27 @@ The default is: "Organization Unit": ORGUNIT - **ldap\_servers** -Same as top-level [ldap_servers](/archive/23_10/toplevel/#ldap-servers) option, but applied to this module +Same as top-level [ldap_servers](toplevel.md#ldap_servers) option, but applied to this module only. - **ldap\_tls\_cacertfile** -Same as top-level [ldap_tls_cacertfile](/archive/23_10/toplevel/#ldap-tls-cacertfile) option, but applied to this +Same as top-level [ldap_tls_cacertfile](toplevel.md#ldap_tls_cacertfile) option, but applied to this module only. - **ldap\_tls\_certfile** -Same as top-level [ldap_tls_certfile](/archive/23_10/toplevel/#ldap-tls-certfile) option, but applied to this +Same as top-level [ldap_tls_certfile](toplevel.md#ldap_tls_certfile) option, but applied to this module only. - **ldap\_tls\_depth** -Same as top-level [ldap_tls_depth](/archive/23_10/toplevel/#ldap-tls-depth) option, but applied to this module +Same as top-level [ldap_tls_depth](toplevel.md#ldap_tls_depth) option, but applied to this module only. - **ldap\_tls\_verify** -Same as top-level [ldap_tls_verify](/archive/23_10/toplevel/#ldap-tls-verify) option, but applied to this module +Same as top-level [ldap_tls_verify](toplevel.md#ldap_tls_verify) option, but applied to this module only. - **ldap\_uids** -Same as top-level [ldap_uids](/archive/23_10/toplevel/#ldap-uids) option, but applied to this module only. +Same as top-level [ldap_uids](toplevel.md#ldap_uids) option, but applied to this module only. - **ldap\_vcard\_map**: *{Name: {Pattern, LDAPattributes}, ...}* With this option you can set the table that maps LDAP attributes to @@ -3814,31 +3813,31 @@ that change frequently their presence. However, the overhead is significantly reduced by the use of caching, so you probably don’t want to set *use\_cache* to *false*. -The module depends on [mod_vcard](/archive/23_10/modules/#mod-vcard). +The module depends on [mod_vcard](modules.md#mod_vcard). > **Note** > > Nowadays [XEP-0153](https://xmpp.org/extensions/xep-0153.html) is used > mostly as "read-only", i.e. modern clients don’t publish their avatars > inside vCards. Thus in the majority of cases the module is only used -> along with [mod_avatar](/archive/23_10/modules/#mod-avatar) for providing backward compatibility. +> along with [mod_avatar](modules.md#mod_avatar) for providing backward compatibility. __Available options:__ - **cache\_life\_time**: *timeout()* -Same as top-level [cache_life_time](/archive/23_10/toplevel/#cache-life-time) option, but applied to this module +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module only. - **cache\_missed**: *true | false* -Same as top-level [cache_missed](/archive/23_10/toplevel/#cache-missed) option, but applied to this module +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module only. - **cache\_size**: *pos\_integer() | infinity* -Same as top-level [cache_size](/archive/23_10/toplevel/#cache-size) option, but applied to this module +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module only. - **use\_cache**: *true | false* -Same as top-level [use_cache](/archive/23_10/toplevel/#use-cache) option, but applied to this module only. +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. mod\_version ------------ diff --git a/content/archive/23_10/toplevel.md b/content/archive/23.10/toplevel.md similarity index 81% rename from content/archive/23_10/toplevel.md rename to content/archive/23.10/toplevel.md index f5a71553..a8e5f26e 100644 --- a/content/archive/23_10/toplevel.md +++ b/content/archive/23.10/toplevel.md @@ -1,21 +1,20 @@ --- -title: Top-Level Options -toc: true -menu: Top-Level Opts -order: 80 +search: + exclude: true --- +# Top-Level Options ## access\_rules *{AccessName: {allow|deny: ACLRules|ACLName}}* -This option defines [Access Rules](/admin/configuration/basic/#access-rules). Each +This option defines [Access Rules](../../admin/configuration/basic.md#access_rules). Each access rule is assigned a name that can be referenced from other parts of the configuration file (mostly from *access* options of ejabberd modules). Each rule definition may contain arbitrary number of *allow* or *deny* sections, and each section may contain any number of ACL rules -(see [acl](/archive/23_10/toplevel/#acl) option). There are no access rules defined by default. +(see [acl](toplevel.md#acl) option). There are no access rules defined by default. **Example**: @@ -52,7 +51,7 @@ address). Every set of rules has name *ACLName*: it can be any string except *all* or *none* (those are predefined names for the rules that match all or nothing respectively). The name *ACLName* can be referenced from other parts of the configuration file, for example in -[access_rules](/archive/23_10/toplevel/#access-rules) option. The rules of *ACLName* are represented by +[access_rules](toplevel.md#access_rules) option. The rules of *ACLName* are represented by mapping *{ACLType: ACLValue}*. These can be one of the following: - **ip**: *Network* @@ -120,7 +119,7 @@ mapping *{ACLType: ACLValue}*. These can be one of the following: *Options* -[ACME](/admin/configuration/basic/#acme) configuration, to automatically obtain SSL +[ACME](../../admin/configuration/basic.md#acme) configuration, to automatically obtain SSL certificates for the domains served by ejabberd, which means that certificate requests and renewals are performed to some CA server (aka "ACME server") in a fully automated mode. The *Options* are: @@ -166,7 +165,7 @@ certificate requests and renewals are performed to some CA server (aka *true | false* Whether to allow installation of third-party modules or not. See -[ejabberd-contrib](https://docs.ejabberd.im/developer/extending-ejabberd/modules/#ejabberd-contrib) +[ejabberd-contrib](https://docs.ejabberd.im/developer/extending-ejabberd/modules/#ejabberd_contrib) documentation section. The default value is *true*. ## allow\_multiple\_connections @@ -215,24 +214,24 @@ specific modules to certain virtual hosts. To accomplish that, *timeout()* -Same as [cache_life_time](/archive/23_10/toplevel/#cache-life-time), but applied to authentication cache only. -If not set, the value from [cache_life_time](/archive/23_10/toplevel/#cache-life-time) will be used. +Same as [cache_life_time](toplevel.md#cache_life_time), but applied to authentication cache only. +If not set, the value from [cache_life_time](toplevel.md#cache_life_time) will be used. ## auth\_cache\_missed *true | false* -Same as [cache_missed](/archive/23_10/toplevel/#cache-missed), but applied to authentication cache only. If -not set, the value from [cache_missed](/archive/23_10/toplevel/#cache-missed) will be used. +Same as [cache_missed](toplevel.md#cache_missed), but applied to authentication cache only. If +not set, the value from [cache_missed](toplevel.md#cache_missed) will be used. ## auth\_cache\_size *pos\_integer() | infinity* -Same as [cache_size](/archive/23_10/toplevel/#cache-size), but applied to authentication cache only. If not -set, the value from [cache_size](/archive/23_10/toplevel/#cache-size) will be used. +Same as [cache_size](toplevel.md#cache_size), but applied to authentication cache only. If not +set, the value from [cache_size](toplevel.md#cache_size) will be used. -
added in 23.10
+
added in 23.10
## auth\_external\_user\_exists\_check @@ -261,7 +260,7 @@ be installed from the [ejabberd-contrib](https://github.com/processone/ejabberd-contrib) Git repository. Please refer to that module’s README file for details. -
improved in 20.01
+
improved in 20.01
## auth\_password\_format @@ -295,8 +294,8 @@ authenticate. The default value is *sha*. *true | false* -Same as [use_cache](/archive/23_10/toplevel/#use-cache), but applied to authentication cache only. If not -set, the value from [use_cache](/archive/23_10/toplevel/#use-cache) will be used. +Same as [use_cache](toplevel.md#use_cache), but applied to authentication cache only. If not +set, the value from [use_cache](toplevel.md#use_cache) will be used. ## c2s\_cafile @@ -307,11 +306,11 @@ format. All client certificates should be signed by one of these root CA certificates and should contain the corresponding JID(s) in *subjectAltName* field. There is no default value. -You can use [host\_config](/archive/23_10/toplevel/#host-config) to specify +You can use [host\_config](toplevel.md#host_config) to specify this option per-vhost. To set a specific file per listener, use the listener’s -[cafile](/archive/23_10/listen-options/#cafile) option. Please notice that +[cafile](listen-options.md#cafile) option. Please notice that *c2s\_cafile* overrides the listener’s *cafile* option. ## c2s\_ciphers @@ -370,7 +369,7 @@ Path to a file of CA root certificates. The default is to use system defined file if possible. For server connections, this *ca\_file* option is overridden by the -[s2s\_cafile](/archive/23_10/toplevel/#s2s-cafile) option. +[s2s\_cafile](toplevel.md#s2s-cafile) option. ## cache\_life\_time @@ -379,9 +378,9 @@ For server connections, this *ca\_file* option is overridden by the The time of a cached item to keep in cache. Once it’s expired, the corresponding item is erased from cache. The default value is *1 hour*. Several modules have a similar option; and some core ejabberd parts -support similar options too, see [auth_cache_life_time](/archive/23_10/toplevel/#auth-cache-life-time), -[oauth_cache_life_time](/archive/23_10/toplevel/#oauth-cache-life-time), [router_cache_life_time](/archive/23_10/toplevel/#router-cache-life-time), and -[sm_cache_life_time](/archive/23_10/toplevel/#sm-cache-life-time). +support similar options too, see [auth_cache_life_time](toplevel.md#auth_cache_life_time), +[oauth_cache_life_time](toplevel.md#oauth_cache_life_time), [router_cache_life_time](toplevel.md#router_cache_life_time), and +[sm_cache_life_time](toplevel.md#sm_cache_life_time). ## cache\_missed @@ -390,11 +389,11 @@ support similar options too, see [auth_cache_life_time](/archive/23_10/toplevel/ Whether or not to cache missed lookups. When there is an attempt to lookup for a value in a database and this value is not found and the option is set to *true*, this attempt will be cached and no attempts -will be performed until the cache expires (see [cache_life_time](/archive/23_10/toplevel/#cache-life-time)). +will be performed until the cache expires (see [cache_life_time](toplevel.md#cache_life_time)). Usually you don’t want to change it. Default is *true*. Several modules have a similar option; and some core ejabberd parts support similar -options too, see [auth_cache_missed](/archive/23_10/toplevel/#auth-cache-missed), [oauth_cache_missed](/archive/23_10/toplevel/#oauth-cache-missed), -[router_cache_missed](/archive/23_10/toplevel/#router-cache-missed), and [sm_cache_missed](/archive/23_10/toplevel/#sm-cache-missed). +options too, see [auth_cache_missed](toplevel.md#auth_cache_missed), [oauth_cache_missed](toplevel.md#oauth_cache_missed), +[router_cache_missed](toplevel.md#router_cache_missed), and [sm_cache_missed](toplevel.md#sm_cache_missed). ## cache\_size @@ -408,16 +407,16 @@ items are deleted, and the corresponding warning is logged. You should avoid frequent cache clearance, because this degrades performance. The default value is *1000*. Several modules have a similar option; and some core ejabberd parts support similar options too, see -[auth_cache_size](/archive/23_10/toplevel/#auth-cache-size), [oauth_cache_size](/archive/23_10/toplevel/#oauth-cache-size), [router_cache_size](/archive/23_10/toplevel/#router-cache-size), and -[sm_cache_size](/archive/23_10/toplevel/#sm-cache-size). +[auth_cache_size](toplevel.md#auth_cache_size), [oauth_cache_size](toplevel.md#oauth_cache_size), [router_cache_size](toplevel.md#router_cache_size), and +[sm_cache_size](toplevel.md#sm_cache_size). -
improved in 23.01
+
improved in 23.01
## captcha\_cmd *Path | ModuleName* -Full path to a script that generates [CAPTCHA](/admin/configuration/basic/#captcha) +Full path to a script that generates [CAPTCHA](../../admin/configuration/basic.md#captcha) images. *@VERSION@* is replaced with ejabberd version number in *XX.YY* format. *@SEMVER@* is replaced with ejabberd version number in semver format when compiled with Elixir’s mix, or XX.YY format otherwise. @@ -434,28 +433,28 @@ captcha scripts can be used like this: *String* -Deprecated. Use [captcha_url](/archive/23_10/toplevel/#captcha-url) instead. +Deprecated. Use [captcha_url](toplevel.md#captcha_url) instead. ## captcha\_limit *pos\_integer() | infinity* -Maximum number of [CAPTCHA](/admin/configuration/basic/#captcha) generated images +Maximum number of [CAPTCHA](../../admin/configuration/basic.md#captcha) generated images per minute for any given JID. The option is intended to protect the server from CAPTCHA DoS. The default value is *infinity*. -
improved in 23.04
+
improved in 23.04
## captcha\_url *URL | auto | undefined* -An URL where [CAPTCHA](/admin/configuration/basic/#captcha) requests should be +An URL where [CAPTCHA](../../admin/configuration/basic.md#captcha) requests should be sent. NOTE: you need to configure *request\_handlers* for *ejabberd\_http* listener as well. If set to *auto*, it builds the URL using a *request\_handler* already enabled, with encryption if available. If set to *undefined*, it builds the URL using the deprecated -[captcha_host](/archive/23_10/toplevel/#captcha-host) + /captcha. The default value is *auto*. +[captcha_host](toplevel.md#captcha_host) + /captcha. The default value is *auto*. ## certfiles @@ -691,14 +690,14 @@ following: options in the included file *Filename*. The options that match this criteria are not accepted. The default value is an empty list. -
added in 23.10
+
added in 23.10
## install\_contrib\_modules *\[Module, ...\]* Modules to install from -[ejabberd-contrib](https://docs.ejabberd.im/developer/extending-ejabberd/modules/#ejabberd-contrib) +[ejabberd-contrib](https://docs.ejabberd.im/developer/extending-ejabberd/modules/#ejabberd_contrib) at start time. The default value is an empty list of modules: *\[\]*. ## jwt\_auth\_only\_rule @@ -738,7 +737,7 @@ attribute, the specified language is used. The default value is *"en"*. *\[Host, ...\]* A list of IP addresses or DNS names of LDAP backup servers. When no -servers listed in [ldap_servers](/archive/23_10/toplevel/#ldap-servers) option are reachable, ejabberd will +servers listed in [ldap_servers](toplevel.md#ldap_servers) option are reachable, ejabberd will try to connect to these backup servers. The default is an empty list, i.e. no backup servers specified. WARNING: ejabberd doesn’t try to reconnect back to the main servers when they become operational again, @@ -773,7 +772,7 @@ variables are consecutively replaced by values from the attributes in *FilterAttrs* and "%D" is replaced by Distinguished Name from the result set. There is no default value, which means the result is not filtered. WARNING: Since this filter makes additional LDAP lookups, use it only as -the last resort: try to define all filter rules in [ldap_filter](/archive/23_10/toplevel/#ldap-filter) +the last resort: try to define all filter rules in [ldap_filter](toplevel.md#ldap_filter) option if possible. **Example**: @@ -880,9 +879,9 @@ JID. For example, "%.org". If the value is in the form of *\[Options, ...\]* The option for listeners configuration. See the [Listen -Modules](/archive/23_10/listen/) section for details. +Modules](./listen.md/) section for details. -
added in 22.10
+
added in 22.10
## log\_burst\_limit\_count @@ -891,7 +890,7 @@ Modules](/archive/23_10/listen/) section for details. The number of messages to accept in `log_burst_limit_window_time` period before starting to drop them. Default 500 -
added in 22.10
+
added in 22.10
## log\_burst\_limit\_window\_time @@ -899,7 +898,7 @@ before starting to drop them. Default 500 The time period to rate-limit log messages by. Defaults to 1 second. -
added in 23.01
+
added in 23.01
## log\_modules\_fully @@ -950,7 +949,7 @@ value is *10000*. *{Module: Options}* -The option for modules configuration. See [Modules](/archive/23_10/modules/) +The option for modules configuration. See [Modules](./modules.md/) section for details. ## negotiation\_timeout @@ -999,17 +998,17 @@ can create OAuth tokens, you can refer to an ejabberd access rule in the *timeout()* -Same as [cache_life_time](/archive/23_10/toplevel/#cache-life-time), but applied to OAuth cache only. If not -set, the value from [cache_life_time](/archive/23_10/toplevel/#cache-life-time) will be used. +Same as [cache_life_time](toplevel.md#cache_life_time), but applied to OAuth cache only. If not +set, the value from [cache_life_time](toplevel.md#cache_life_time) will be used. ## oauth\_cache\_missed *true | false* -Same as [cache_missed](/archive/23_10/toplevel/#cache-missed), but applied to OAuth cache only. If not set, -the value from [cache_missed](/archive/23_10/toplevel/#cache-missed) will be used. +Same as [cache_missed](toplevel.md#cache_missed), but applied to OAuth cache only. If not set, +the value from [cache_missed](toplevel.md#cache_missed) will be used. -
added in 21.01
+
added in 21.01
## oauth\_cache\_rest\_failure\_life\_time @@ -1022,8 +1021,8 @@ The time that a failure in OAuth ReST is cached. The default value is *pos\_integer() | infinity* -Same as [cache_size](/archive/23_10/toplevel/#cache-size), but applied to OAuth cache only. If not set, the -value from [cache_size](/archive/23_10/toplevel/#cache-size) will be used. +Same as [cache_size](toplevel.md#cache_size), but applied to OAuth cache only. If not set, the +value from [cache_size](toplevel.md#cache_size) will be used. ## oauth\_client\_id\_check @@ -1038,7 +1037,7 @@ value is *allow*. *mnesia | sql* Database backend to use for OAuth authentication. The default value is -picked from [default_db](/archive/23_10/toplevel/#default-db) option, or if it’s not set, *mnesia* will be +picked from [default_db](toplevel.md#default_db) option, or if it’s not set, *mnesia* will be used. ## oauth\_expire @@ -1053,15 +1052,15 @@ used and is removed from the database. The default is *4294967* seconds. *true | false* -Same as [use_cache](/archive/23_10/toplevel/#use-cache), but applied to OAuth cache only. If not set, the -value from [use_cache](/archive/23_10/toplevel/#use-cache) will be used. +Same as [use_cache](toplevel.md#use_cache), but applied to OAuth cache only. If not set, the +value from [use_cache](toplevel.md#use_cache) will be used. ## oom\_killer *true | false* Enable or disable OOM (out-of-memory) killer. When system memory raises -above the limit defined in [oom_watermark](/archive/23_10/toplevel/#oom-watermark) option, ejabberd triggers +above the limit defined in [oom_watermark](toplevel.md#oom_watermark) option, ejabberd triggers OOM killer to terminate most memory consuming Erlang processes. Note that in order to maintain functionality, ejabberd only attempts to kill transient processes, such as those managing client sessions, s2s or @@ -1073,7 +1072,7 @@ database connections. The default value is *true*. Trigger OOM killer when some of the running Erlang processes have messages queue above this *Size*. Note that such processes won’t be -killed if [oom_killer](/archive/23_10/toplevel/#oom-killer) option is set to *false* or if *oom\_watermark* +killed if [oom_killer](toplevel.md#oom_killer) option is set to *false* or if *oom\_watermark* is not reached yet. ## oom\_watermark @@ -1082,10 +1081,10 @@ is not reached yet. A percent of total system memory consumed at which OOM killer should be activated with some of the processes possibly be killed (see -[oom_killer](/archive/23_10/toplevel/#oom-killer) option). Later, when memory drops below this *Percent*, +[oom_killer](toplevel.md#oom_killer) option). Later, when memory drops below this *Percent*, OOM killer is deactivated. The default value is *80* percents. -
changed in 23.01
+
changed in 23.01
## outgoing\_s2s\_families @@ -1094,9 +1093,9 @@ OOM killer is deactivated. The default value is *80* percents. Specify which address families to try, in what order. The default is *\[ipv6, ipv4\]* which means it first tries connecting with IPv6, if that fails it tries using IPv4. This option is obsolete and irrelevant -when using ejabberd 23.01 and Erlang/OTP 22, or newer versions of them. +when using ejabberd 23.01 and Erlang/OTP 22, or newer versions of them. -
added in 20.12
+
added in 20.12
## outgoing\_s2s\_ipv4\_address @@ -1106,7 +1105,7 @@ Specify the IPv4 address that will be used when establishing an outgoing S2S IPv4 connection, for example "127.0.0.1". The default value is *undefined*. -
added in 20.12
+
added in 20.12
## outgoing\_s2s\_ipv6\_address @@ -1157,7 +1156,7 @@ default value is *false*. *Directory* -If [queue_type](/archive/23_10/toplevel/#queue-type) option is set to *file*, use this *Directory* to store +If [queue_type](toplevel.md#queue_type) option is set to *file*, use this *Directory* to store file queues. The default is to keep queues inside Mnesia directory. ## queue\_type @@ -1166,7 +1165,7 @@ file queues. The default is to keep queues inside Mnesia directory. Default type of queues in ejabberd. Modules may have its own value of the option. The value of *ram* means that queues will be kept in memory. -If value *file* is set, you may also specify directory in [queue_dir](/archive/23_10/toplevel/#queue-dir) +If value *file* is set, you may also specify directory in [queue_dir](toplevel.md#queue_dir) option where file queues will be placed. The default value is *ram*. ## redis\_connect\_timeout @@ -1208,8 +1207,8 @@ The port where the Redis server is accepting connections. The default is *ram | file* The type of request queue for the Redis server. See description of -[queue_type](/archive/23_10/toplevel/#queue-type) option for the explanation. The default value is the -value defined in [queue_type](/archive/23_10/toplevel/#queue-type) or *ram* if the latter is not set. +[queue_type](toplevel.md#queue_type) option for the explanation. The default value is the +value defined in [queue_type](toplevel.md#queue_type) or *ram* if the latter is not set. ## redis\_server @@ -1222,7 +1221,7 @@ A hostname or an IP address of the Redis server. The default is *timeout()* -This is a global option for module [mod_register](/archive/23_10/modules/#mod-register). It limits the +This is a global option for module [mod_register](modules.md#mod_register). It limits the frequency of registrations from a given IP or username. So, a user that tries to register a new account from the same IP address or JID during this time after their previous registration will receive an error with @@ -1245,37 +1244,37 @@ action performed is *closeold*. *timeout()* -Same as [cache_life_time](/archive/23_10/toplevel/#cache-life-time), but applied to routing table cache only. If -not set, the value from [cache_life_time](/archive/23_10/toplevel/#cache-life-time) will be used. +Same as [cache_life_time](toplevel.md#cache_life_time), but applied to routing table cache only. If +not set, the value from [cache_life_time](toplevel.md#cache_life_time) will be used. ## router\_cache\_missed *true | false* -Same as [cache_missed](/archive/23_10/toplevel/#cache-missed), but applied to routing table cache only. If -not set, the value from [cache_missed](/archive/23_10/toplevel/#cache-missed) will be used. +Same as [cache_missed](toplevel.md#cache_missed), but applied to routing table cache only. If +not set, the value from [cache_missed](toplevel.md#cache_missed) will be used. ## router\_cache\_size *pos\_integer() | infinity* -Same as [cache_size](/archive/23_10/toplevel/#cache-size), but applied to routing table cache only. If not -set, the value from [cache_size](/archive/23_10/toplevel/#cache-size) will be used. +Same as [cache_size](toplevel.md#cache_size), but applied to routing table cache only. If not +set, the value from [cache_size](toplevel.md#cache_size) will be used. ## router\_db\_type *mnesia | redis | sql* Database backend to use for routing information. The default value is -picked from [default_ram_db](/archive/23_10/toplevel/#default-ram-db) option, or if it’s not set, *mnesia* will +picked from [default_ram_db](toplevel.md#default_ram_db) option, or if it’s not set, *mnesia* will be used. ## router\_use\_cache *true | false* -Same as [use_cache](/archive/23_10/toplevel/#use-cache), but applied to routing table cache only. If not -set, the value from [use_cache](/archive/23_10/toplevel/#use-cache) will be used. +Same as [use_cache](toplevel.md#use_cache), but applied to routing table cache only. If not +set, the value from [use_cache](toplevel.md#use_cache) will be used. ## rpc\_timeout @@ -1289,7 +1288,7 @@ are used for internal needs only. The default value is *5* seconds. *Access* -This [Access Rule](/admin/configuration/basic/#access-rules) defines to what remote +This [Access Rule](../../admin/configuration/basic.md#access_rules) defines to what remote servers can s2s connections be established. The default value is *all*; no restrictions are applied, it is allowed to connect s2s to/from all remote servers. @@ -1300,9 +1299,9 @@ remote servers. A path to a file with CA root certificates that will be used to authenticate s2s connections. If not set, the value of -[ca\_file](/archive/23_10/toplevel/#ca-file) will be used. +[ca\_file](toplevel.md#ca_file) will be used. -You can use [host\_config](/archive/23_10/toplevel/#host-config) to specify +You can use [host\_config](toplevel.md#host_config) to specify this option per-vhost. ## s2s\_ciphers @@ -1370,9 +1369,9 @@ below: *ram | file* -The type of a queue for s2s packets. See description of [queue_type](/archive/23_10/toplevel/#queue-type) +The type of a queue for s2s packets. See description of [queue_type](toplevel.md#queue_type) option for the explanation. The default value is the value defined in -[queue_type](/archive/23_10/toplevel/#queue-type) or *ram* if the latter is not set. +[queue_type](toplevel.md#queue_type) or *ram* if the latter is not set. ## s2s\_timeout @@ -1413,7 +1412,7 @@ considered insecure. The option defines a set of shapers. Every shaper is assigned a name *ShaperName* that can be used in other parts of the configuration file, -such as [shaper_rules](/archive/23_10/toplevel/#shaper-rules) option. The shaper itself is defined by its +such as [shaper_rules](toplevel.md#shaper_rules) option. The shaper itself is defined by its *Rate*, where *Rate* stands for the maximum allowed incoming rate in **bytes** per second. When a connection exceeds this limit, ejabberd stops reading from the socket until the average rate is again below the @@ -1432,9 +1431,9 @@ speed to 1,000 bytes/sec and shaper *fast* limits the traffic speed to *{ShaperRuleName: {Number|ShaperName: ACLRule|ACLName}}* An entry allowing to declaring shaper to use for matching user/hosts. -Semantics is similar to [access_rules](/archive/23_10/toplevel/#access-rules) option, the only difference is +Semantics is similar to [access_rules](toplevel.md#access_rules) option, the only difference is that instead using *allow* or *deny*, a name of a shaper (defined in -[shaper](/archive/23_10/toplevel/#shaper) option) or a positive number should be used. +[shaper](toplevel.md#shaper) option) or a positive number should be used. **Example**: @@ -1454,37 +1453,37 @@ that instead using *allow* or *deny*, a name of a shaper (defined in *timeout()* -Same as [cache_life_time](/archive/23_10/toplevel/#cache-life-time), but applied to client sessions table cache -only. If not set, the value from [cache_life_time](/archive/23_10/toplevel/#cache-life-time) will be used. +Same as [cache_life_time](toplevel.md#cache_life_time), but applied to client sessions table cache +only. If not set, the value from [cache_life_time](toplevel.md#cache_life_time) will be used. ## sm\_cache\_missed *true | false* -Same as [cache_missed](/archive/23_10/toplevel/#cache-missed), but applied to client sessions table cache -only. If not set, the value from [cache_missed](/archive/23_10/toplevel/#cache-missed) will be used. +Same as [cache_missed](toplevel.md#cache_missed), but applied to client sessions table cache +only. If not set, the value from [cache_missed](toplevel.md#cache_missed) will be used. ## sm\_cache\_size *pos\_integer() | infinity* -Same as [cache_size](/archive/23_10/toplevel/#cache-size), but applied to client sessions table cache only. -If not set, the value from [cache_size](/archive/23_10/toplevel/#cache-size) will be used. +Same as [cache_size](toplevel.md#cache_size), but applied to client sessions table cache only. +If not set, the value from [cache_size](toplevel.md#cache_size) will be used. ## sm\_db\_type *mnesia | redis | sql* Database backend to use for client sessions information. The default -value is picked from [default_ram_db](/archive/23_10/toplevel/#default-ram-db) option, or if it’s not set, +value is picked from [default_ram_db](toplevel.md#default_ram_db) option, or if it’s not set, *mnesia* will be used. ## sm\_use\_cache *true | false* -Same as [use_cache](/archive/23_10/toplevel/#use-cache), but applied to client sessions table cache only. -If not set, the value from [use_cache](/archive/23_10/toplevel/#use-cache) will be used. +Same as [use_cache](toplevel.md#use_cache), but applied to client sessions table cache only. +If not set, the value from [use_cache](toplevel.md#use_cache) will be used. ## sql\_connect\_timeout @@ -1508,15 +1507,15 @@ An interval to make a dummy SQL request to keep alive the connections to the database. There is no default value, so no keepalive requests are made. -
added in 20.12
+
added in 20.12
## sql\_odbc\_driver *Path* Path to the ODBC driver to use to connect to a Microsoft SQL Server -database. This option only applies if the [sql_type](/archive/23_10/toplevel/#sql-type) option is set to -*mssql* and [sql_server](/archive/23_10/toplevel/#sql-server) is not an ODBC connection string. The default +database. This option only applies if the [sql_type](toplevel.md#sql_type) option is set to +*mssql* and [sql_server](toplevel.md#sql_server) is not an ODBC connection string. The default value is: *libtdsodbc.so* ## sql\_password @@ -1542,7 +1541,7 @@ The port where the SQL server is accepting connections. The default is *3306* for MySQL, *5432* for PostgreSQL and *1433* for MS SQL. The option has no effect for SQLite. -
added in 20.01
+
added in 20.01
## sql\_prepared\_statements @@ -1563,18 +1562,18 @@ seconds. *ram | file* The type of a request queue for the SQL server. See description of -[queue_type](/archive/23_10/toplevel/#queue-type) option for the explanation. The default value is the -value defined in [queue_type](/archive/23_10/toplevel/#queue-type) or *ram* if the latter is not set. +[queue_type](toplevel.md#queue_type) option for the explanation. The default value is the +value defined in [queue_type](toplevel.md#queue_type) or *ram* if the latter is not set. ## sql\_server *Host* -The hostname or IP address of the SQL server. For [sql_type](/archive/23_10/toplevel/#sql-type) *mssql* +The hostname or IP address of the SQL server. For [sql_type](toplevel.md#sql_type) *mssql* or *odbc* this can also be an ODBC connection string. The default value is *localhost*. -
improved in 20.03
+
improved in 20.03
## sql\_ssl @@ -1589,7 +1588,7 @@ is only available for MySQL, MS SQL and PostgreSQL. The default value is *Path* A path to a file with CA root certificates that will be used to verify -SQL connections. Implies [sql_ssl](/archive/23_10/toplevel/#sql-ssl) and [sql_ssl_verify](/archive/23_10/toplevel/#sql-ssl-verify) options are +SQL connections. Implies [sql_ssl](toplevel.md#sql_ssl) and [sql_ssl_verify](toplevel.md#sql_ssl_verify) options are set to *true*. There is no default which means certificate verification is disabled. This option has no effect for MS SQL. @@ -1598,7 +1597,7 @@ is disabled. This option has no effect for MS SQL. *Path* A path to a certificate file that will be used for SSL connections to -the SQL server. Implies [sql_ssl](/archive/23_10/toplevel/#sql-ssl) option is set to *true*. There is no +the SQL server. Implies [sql_ssl](toplevel.md#sql_ssl) option is set to *true*. There is no default which means ejabberd won’t provide a client certificate to the SQL server. This option has no effect for MS SQL. @@ -1607,7 +1606,7 @@ SQL server. This option has no effect for MS SQL. *true | false* Whether to verify SSL connection to the SQL server against CA root -certificates defined in [sql_ssl_cafile](/archive/23_10/toplevel/#sql-ssl-cafile) option. Implies [sql_ssl](/archive/23_10/toplevel/#sql-ssl) +certificates defined in [sql_ssl_cafile](toplevel.md#sql_ssl_cafile) option. Implies [sql_ssl](toplevel.md#sql_ssl) option is set to *true*. This option has no effect for MS SQL. The default value is *false*. @@ -1650,8 +1649,8 @@ trusted for security rules in ejabberd. Enable or disable cache. The default is *true*. Several modules have a similar option; and some core ejabberd parts support similar options -too, see [auth_use_cache](/archive/23_10/toplevel/#auth-use-cache), [oauth_use_cache](/archive/23_10/toplevel/#oauth-use-cache), [router_use_cache](/archive/23_10/toplevel/#router-use-cache), -and [sm_use_cache](/archive/23_10/toplevel/#sm-use-cache). +too, see [auth_use_cache](toplevel.md#auth_use_cache), [oauth_use_cache](toplevel.md#oauth_use_cache), [router_use_cache](toplevel.md#router_use_cache), +and [sm_use_cache](toplevel.md#sm_use_cache). ## validate\_stream @@ -1669,7 +1668,7 @@ value is *false*. *string()* The option can be used to set custom ejabberd version, that will be used -by different parts of ejabberd, for example by [mod_version](/archive/23_10/modules/#mod-version) module. +by different parts of ejabberd, for example by [mod_version](modules.md#mod_version) module. The default value is obtained at compile time from the underlying version control system. diff --git a/content/admin/upgrade/from_23.04_to_23.10.md b/content/archive/23.10/upgrade.md similarity index 83% rename from content/admin/upgrade/from_23.04_to_23.10.md rename to content/archive/23.10/upgrade.md index fcc90e18..42e92d9b 100644 --- a/content/admin/upgrade/from_23.04_to_23.10.md +++ b/content/archive/23.10/upgrade.md @@ -1,7 +1,4 @@ ---- -title: Upgrade to ejabberd 23.10 -toc: true ---- +# Upgrade to ejabberd 23.10 There is a new module, several new options, an API command has changed, but there are no breaking changes in the configuration, SQL schema. @@ -14,5 +11,5 @@ The MUC room option `allow_private_messages` is converted to `allowpm`. This con In summary, you can update from previous ejabberd version to this one without performing any upgrade tasks. -Please check the ejabberd [23.10](/archive/23_10/) release announcement for details about the improvements. +Please check the ejabberd [23.10](../../archive/23.10/index.md) release announcement for details about the improvements. diff --git a/content/archive/23_01/sql-schema.md b/content/archive/23_01/sql-schema.md deleted file mode 100644 index a33ffa66..00000000 --- a/content/archive/23_01/sql-schema.md +++ /dev/null @@ -1,311 +0,0 @@ ---- -title: ejabberd SQL Database Schema -toc: true -menu: SQL Schema -order: 190 ---- - - -We present the tables that might be in use, depending on your server configuration, together with a short explanation of the fields involved and their intended use. Tables are presented roughly grouped by related functionality. - -Consider this document a work in progress, not all tables are documented yet. - -Latest version of database schema are available in [ejabberd Github repository](https://github.com/processone/ejabberd): - -* [MySQL schema](https://github.com/processone/ejabberd/blob/master/sql/mysql.sql) -* [Postgres schema](https://github.com/processone/ejabberd/blob/master/sql/pg.sql) -* [SQLite schema](https://github.com/processone/ejabberd/blob/master/sql/lite.sql) -* [MS SQL Server schema](https://github.com/processone/ejabberd/blob/master/sql/mssql.sql). This - schema need testing / feedback and possibly improvement from SQL - Server users. - -# Authentication - -## Table `users` - -Contains the information required to authenticate users. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| password | string | User password, can be hashed | -| created_at | timestamp | When the user account was created | - - -The password are hashed if you use SCRAM authentication. In that case the next fields are also defined - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| serverkey | string | support for salted passwords | -| salt | string | support for salted passwords | -| iterationcount | integer | support for salted passwords | - - -# Rosters - -## Table `rosterusers` - -This is a quite complex table, used as a store for a quite complex protocol that is the one defined to manage -rosters and subscriptions on [rfc6121](https://tools.ietf.org/html/rfc6121). - -In the common case of two users adding each other as contacts, entries in the roster table follows a series of steps - as they moves from a subscription request to the final approval and bi-directional subscription being established. -This process can be initiated either by the user, or by the (possible remote) peer. Also need to account for the case -where the user, or the contact, might not be online at the moment of the subscription request is made. - -Steps are further complicated by the fact that entries in the roster aren't required to have corresponding subscriptions. -For details of the meaning of the different fields, refer to [the protocol itself](https://tools.ietf.org/html/rfc6121#section-2), as these are mostly a direct mapping of it. - -Note: -If you manage users contacts from outside the roster workflow of XMPP (for example your site backends perform the linking between -users), it is likely that you only need to care about the username, jid and nick fields, and set the subscription field to be always -'B' for a mutual link between users. - - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| jid | string | Contact jid | -| nick | string | Contact nickname | -| subscription | char | 'B'=both | 'T'=To | 'F'=From | 'N'=none | -| ask | char | 'S'=subscribe | 'U'=unsubscribe | B='both' | 'O'=out | 'I'=in | 'N'=none | -| askmessage | string | Message to be displayed on the subscription request | -| server | char | 'N' for normal users contacts | -| subscribe | string | | -| type | string | "item" | -| created_at | timestamp | Creation date of this roster entry | - - - - -## Table `rostergroups` - -## Table `sr_group` - -## Table `sr_user` - - - -# Messages - -## Table `spool` -Messages sent to users that are offline are stored in this table. -Do not confuse this with general message archiving: messages are only temporarily stored in this table, removed as soon as the target user -is back online and the pending messages delivered to it. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| xml | blob | Raw packet | -| seq | integer | Unique, autoincrement sequence number. | -| created_at | timestamp | When the message was stored | - -The seq field is used for sorting, and to easily identify a particular user message. - - -## Table `privacy_list_data` - -The table is used to store privacy rules. - -The table is a direct translation of the XMPP packet used to set -privacy lists. For more details, please read -[XEP-0016: Privacy Lists, Syntax and Semantics](https://xmpp.org/extensions/xep-0016.html#protocol-syntax). Here -is an example packet coming from privacy list specification: - - - - [] - [] - [] - [] - - -The table fields are defined as follow: - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| id | int | Privacy list rule id. | -| t | char | Privacy rule type: 'j' for jid, 'g' for group and 's' for subscription. | -| value | string | Privacy list value for match, whose content depends on privacy list rule type. | -| action | char | Privacy list action: 'd' for deny and 'a' for allow. | -| ord | int | Order for applying the privacy list rule. | -| match\_all | boolean (0 or 1) | If true (1), means any packet types will be matched. Other matches should be false (0). | -| match\_iq | boolean (0 or 1) | If true (1), means iq packets will be matched by rule. | -| match\_message | boolean (0 or 1) | If true (1), means message packets type will be matched by rule. | -| match\_presence\_in | boolean (0 or 1) | If true (1), means inbound presence packets type will be matched by rule. | -| match\_presence\_out | boolean (0 or 1) | If true (1), means outbound packets type will be matched by rule. | - - - -# Multiuser Chat Rooms - -## Table `muc_room` -It is used to store *persistent* rooms, that is, rooms that must be automatically started with the server. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| name | string | Room name | -| host | string | Hostname of the conference component | -| opts | string | Room options, encoded as erlang terms | -| created_at | timestamp | Creation date | - -The opts field is legible, but not mean to be modified directly. It contents depends on the implementation of mod_muc. -It contains the room configuration and affiliations. - - -## Table `muc_registered` -Contains a map of user to nicknames. When a user register a nickname with the conference module, that nick is reserved and can't be used by -anyone else, in any room from that conference host. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| jid | string | User jid | -| host | string | Hostname of the conference component | -| nick | string | Room options, encoded as erlang terms | -| created_at | timestamp | Creation date | - - -## Table `room_history` -In ejabberd Business Edition, -this table is used if persistent room history is enabled. If so, recent room history is saved to the DB before ejabberd is stopped, -allowing the recent history to survive server restarts. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| room | string | Room jid | -| nick | string | Nickname that sent the message | -| packet | string | XML stanza with the message | -| have_subject | boolean | True if the message stanza had subject | -| created_at | timestamp | Creation date | -| size | integer | Size in bytes of the xml packet | - -## Table `muc_online_room` -This table is used to store rooms that actually exists in the memory of the server. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| name | string | Room name | -| host | string | Hostname of the conference component | -| node | string | Erlang node where the room is | -| pid | string | Pid of the thread running the room | - -## Table `muc_online_users` -This table is used to store MucSub subscriptions. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User -| server | string | Hostname of the user | -| resource | string | User resource | -| name | string | Name of the room | -| host | string | Hostname of the conference component | -| node | string | Erlang node | - -## Table `muc_room_subscribers` -This table is used to store MucSub subscriptions. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| room | string | Room name | -| host | string | Hostname of the conference component | -| jid | string | User jid | -| nick | string | User nick | -| nodes | string | MucSub nodes | -| created_at | timestamp | Creation date | - - -# VCard - -## Table `vcard` - -The table is used to store raw vCard content for delivery of the vCard -"as is". - -The table fields are defined as follow: - -| Field | Type | Usage | -| -------------------- | ---------------- | -------------------- | -| username | string | Owner of the Vcard | -| vcard | text | Raw Vcard | -| created_at | timestamp | Record creation date | - -## Table `vcard_search` - -The table is used to store vCard index on a few of the Vcard field -used for vCard search in users directory. - -You can learn more about the vCard specification on Wikipedia -[vCard](https://en.wikipedia.org/wiki/VCard) page. - -The table fields are defined as follow: - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------- | -| username | string | Raw username for display | -| lusername | string | Lowercase username for search | -| fn | string | Raw fullname for display | -| lfn | string | Lowercase fullname for search | -| family | string | Raw family name for display | -| lfamilly | string | Lowercase family name for search | -| given | string | Raw given name for display | -| lgiven | string | Lowercase given name for search | -| middle | string | Raw middle name for display | -| lmiddle | string | Lowercase middle name for search | -| nickname | string | Raw nickname for display | -| lnickname | string | Lowercase nickname for search | -| bday | string | Raw birthday for display | -| lbday | string | Lowercase and processed birthday for search | -| ctry | string | Raw country for display | -| lctry | string | Lowercase country for search | -| locality | string | Raw city for display | -| llocality | string | Lowercase city for search | -| email | string | Raw email for display | -| lemail | string | Lowercase email for search | -| orgname | string | Raw organisation name for display | -| lorgname | string | Lowercase organisation name for search | -| orgunit | string | Raw organisation department name for display | -| lorgunit | string | Lowercase organisation department for search | - -# Others - -## Table `last` -This table is used to store the last time the user was seen online. -It is defined as follow: - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| seconds | string | Timestamp for the last time the user was seen online | -| state | string | Why user got disconnected. Usually is empty | - -Note that the table is *not* updated while the user has the session open. - - - -## Table `caps_features` -Ejabberd uses this table to keep a list of the entity capabilities discovered. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| node | string | Node | -| subnode | string | Subnode | -| feature | string | Entity feature | -| created_at | timestamp | Creation date | - -The subnode field correspond to the 'ver' ("verification string") of XEP-0115. -There is one entry in this table for each feature advertised by the given (node,subnode) pair. - -## Table `private_storage` -Used for user private data storage. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| namespace | string | XEP-0049 namespace of the stored data | -| data | string | Raw xml | -| created_at | timestamp | Creation date | - diff --git a/content/archive/23_04/listen-options.md b/content/archive/23_04/listen-options.md deleted file mode 100644 index 75cfd942..00000000 --- a/content/archive/23_04/listen-options.md +++ /dev/null @@ -1,400 +0,0 @@ ---- -title: Listen Options -toc: true -menu: Listen Opts -order: 51 ---- - - -This is a detailed description of each option allowed by the listening -modules: - -## access - -*AccessName* - -This option defines access to the port. The default value is `all`. - -## backlog - -*Value* - -The backlog value defines the maximum length that the queue of - pending connections may grow to. This should be increased if the - server is going to handle lots of new incoming connections as they - may be dropped if there is no space in the queue (and ejabberd was - not able to accept them immediately). Default value is 5. - -## cafile - -*Path* - -Path to a file of CA root certificates. -The default is to use system defined file if possible. - -This option is useful to define the file for a specific port listener. -To set a file for all client listeners or for specific vhosts, you can use the -[`c2s_cafile`](/archive/23_04/toplevel/#c2s-cafile) top-level option. -To set a file for all server connections, you can use the -[`s2s_cafile`](/archive/23_04/toplevel/#s2s-cafile) top-level option -or the -[`ca_file`](/archive/23_04/toplevel/#ca-file) top-level option. - -Please note: if this option is set in -[`ejabberd_c2s`](/archive/23_04/listen/#ejabberd-c2s) -or [`ejabberd_s2s_in`](/archive/23_04/listen/#ejabberd-s2s-in) -and the corresponding top-level option is also set -([`c2s_cafile`](/archive/23_04/toplevel/#c2s-cafile), -[`s2s_cafile`](/archive/23_04/toplevel/#s2s-cafile)), -then the top-level option is used, not this one. - -## certfile - -*Path* - -Path to the certificate file. -Only makes sense when the [`tls`](#tls) -options is set. -If this option is not set, you should set the -[`certfiles`](/archive/23_04/toplevel/#certfiles) top-level option -or configure [ACME](/admin/configuration/basic/#acme). - -## check_from - -*true | false* - -This option can be used with -[`ejabberd_service`](/archive/23_04/listen/#ejabberd-service) only. - [`XEP-0114`](https://xmpp.org/extensions/xep-0114.html) requires that - the domain must match the hostname of the component. If this option - is set to `false`, `ejabberd` will allow the component to send - stanzas with any arbitrary domain in the ’from’ attribute. Only use - this option if you are completely sure about it. The default value - is `true`, to be compliant with - [`XEP-0114`](https://xmpp.org/extensions/xep-0114.html). - -## ciphers - -*Ciphers* - -OpenSSL ciphers list in the same format accepted by - ‘`openssl ciphers`’ command. - -Please note: if this option is set in -[`ejabberd_c2s`](/archive/23_04/listen/#ejabberd-c2s) -or [`ejabberd_s2s_in`](/archive/23_04/listen/#ejabberd-s2s-in) -and the corresponding top-level option is also set -([`c2s_ciphers`](/archive/23_04/toplevel/#c2s-ciphers), -[`s2s_ciphers`](/archive/23_04/toplevel/#s2s-ciphers)), -then the top-level option is used, not this one. - -## custom_headers - -*{Name: Value}* - -Specify additional HTTP headers to be included in all HTTP responses. -Default value is: `[]` - -## default_host - -*undefined | HostName* - -If the HTTP request received by ejabberd contains the HTTP header - `Host` with an ambiguous virtual host that doesn’t match any one - defined in ejabberd (see - [Host Names](/admin/configuration/basic/#host-names)), - then this configured HostName - is set as the request Host. The default value of this option is: - `undefined`. - -## dhfile - -*Path* - -Full path to a file containing custom parameters for Diffie-Hellman key - exchange. Such a file could be created with the command - `openssl dhparam -out dh.pem 2048`. If this option is not specified, - default parameters will be used, which might not provide the same level - of security as using custom parameters. - -Please note: if this option is set in -[`ejabberd_c2s`](/archive/23_04/listen/#ejabberd-c2s) -or [`ejabberd_s2s_in`](/archive/23_04/listen/#ejabberd-s2s-in) -and the corresponding top-level option is also set -([`c2s_dhfile`](/archive/23_04/toplevel/#c2s-dhfile), -[`s2s_dhfile`](/archive/23_04/toplevel/#s2s-dhfile)), -then the top-level option is used, not this one. - -## global_routes - -*true | false* - -This option emulates legacy behaviour which registers all routes -defined in [`hosts`](/archive/23_04/toplevel/#hosts) -on a component connected. This behaviour -is considered harmful in the case when it's desired to multiplex -different components on the same port, so, to disable it, -set `global_routes` to `false`. - -The default value is `true`, -e.g. legacy behaviour is emulated: the only reason for this is -to maintain backward compatibility with existing deployments. - -## hosts - -*{Hostname: [HostOption, ...]}* - -The external Jabber component that connects to this -[`ejabberd_service`](/archive/23_04/listen/#ejabberd-service) -can serve one or more hostnames. As `HostOption` - you can define options for the component; currently the only allowed - option is the password required to the component when attempt to - connect to ejabberd: `password: Secret`. Note that you - cannot define in a single `ejabberd_service` components of different - services: add an `ejabberd_service` for each service, as seen in an - example below. This option may not be necessary if the component - already provides the host in its packets; in that case, you can simply - provide the password option that will be used for all the hosts - (see port 5236 definition in the example below). - -## max_fsm_queue - -*Size* - -This option specifies the maximum number of elements in the queue of - the FSM (Finite State Machine). Roughly speaking, each message in - such queues represents one XML stanza queued to be sent into its - relevant outgoing stream. If queue size reaches the limit (because, - for example, the receiver of stanzas is too slow), the FSM and the - corresponding connection (if any) will be terminated and error - message will be logged. The reasonable value for this option depends - on your hardware configuration. This option can be specified for - [`ejabberd_service`](/archive/23_04/listen/#ejabberd-service) - and [`ejabberd_c2s`](/archive/23_04/listen/#ejabberd-c2s) - listeners, or also globally for - [`ejabberd_s2s_out`](/archive/23_04/listen/#ejabberd-s2s-out). - If the option is not specified for - `ejabberd_service` or `ejabberd_c2s` listeners, the globally - configured value is used. The allowed values are integers and - ’undefined’. Default value: ’10000’. - -## max_payload_size - -*Size* - -Specify the maximum payload size in bytes. -It can be either an integer or the word `infinity`. -The default value is `infinity`. - -## max_stanza_size - -*Size* - -This option specifies an approximate maximum size in bytes of XML - stanzas. Approximate, because it is calculated with the precision of - one block of read data. For example `{max_stanza_size, 65536}`. The - default value is `infinity`. Recommended values are 65536 for c2s - connections and 131072 for s2s connections. s2s max stanza size must - always much higher than c2s limit. Change this value with extreme - care as it can cause unwanted disconnect if set too low. - -## password - -*Secret* - -Specify the password to verify an external component that connects to the port. - -
improved in 20.07
- -## port - -*Port number, or unix domain socket path* - -Declares at which port/unix domain socket should be listening. - -Can be set to number between `1` and `65535` to listen on TCP or UDP socket, -or can be set to string in form `"unix:/path/to/socket"` to create and listen -on unix domain socket `/path/to/socket`. - -## protocol_options - -*ProtocolOpts* - -List of general options relating to SSL/TLS. These map to - [`OpenSSL’s set_options()`](https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_options.html). - The default entry is: `"no_sslv3|cipher_server_preference|no_compression"` - -Please note: if this option is set in -[`ejabberd_c2s`](/archive/23_04/listen/#ejabberd-c2s) -or [`ejabberd_s2s_in`](/archive/23_04/listen/#ejabberd-s2s-in) -and the corresponding top-level option is also set -([`c2s_protocol_options`](/archive/23_04/toplevel/#c2s-protocol-options), -[`s2s_protocol_options`](/archive/23_04/toplevel/#s2s-protocol-options)), -then the top-level option is used, not this one. - -## request_handlers - -*{Path: Module}* - -To define one or several handlers that will serve HTTP requests in -[`ejabberd_http`](/archive/23_04/listen/#ejabberd-http). The - Path is a string; so the URIs that start with that Path will be - served by Module. For example, if you want `mod_foo` to serve the - URIs that start with `/a/b/`, and you also want `mod_bosh` to - serve the URIs `/bosh/`, use this option: - - request_handlers: - /a/b: mod_foo - /bosh: mod_bosh - /mqtt: mod_mqtt - -
new in 21.07
- -## send_timeout - -*Integer | infinity* - -Sets the longest time that data can wait to be accepted to sent by OS socket. Triggering this timeout will cause the server to close it. By default it's set to 15 seconds, expressed in milliseconds: 15000 - -## shaper - -*none | ShaperName* - -This option defines a shaper for the port (see section  -[Shapers](/admin/configuration/basic/#shapers)). - The default value is `none`. - -## shaper_rule - -*none | ShaperRule* - -This option defines a shaper rule for -[`ejabberd_service`](/archive/23_04/listen/#ejabberd-service) (see -section [Shapers](/admin/configuration/basic/#shapers)). -The recommended value is `fast`. - -## starttls - -*true | false* - -This option specifies that STARTTLS encryption is available on -connections to the port. You should also set the -[`certfiles`](/archive/23_04/toplevel/#certfiles) top-level option -or configure [ACME](/admin/configuration/basic/#acme). - -This option gets implicitly enabled when enabling -[`starttls_required`](#starttls-required) or [`tls_verify`](#tls-verify). - -## starttls_required - -*true | false* - -This option specifies that STARTTLS encryption is required on -connections to the port. No unencrypted connections will be allowed. -You should also set the -[`certfiles`](/archive/23_04/toplevel/#certfiles) top-level option -or configure [ACME](/admin/configuration/basic/#acme). - -Enabling this option implicitly enables also the [`starttls`](#starttls) option. - -## tag - -*String* - -Allow specifying a tag in a `listen` section -and later use it to have a special -[`api_permissions`](/archive/23_04/toplevel/#api-permissions) -just for it. - -For example: - - listen: - - - port: 4000 - module: ejabberd_http - tag: "magic_listener" - - api_permissions: - "magic_access": - from: - - tag: "magic_listener" - who: all - what: "*" - -The default value is the empty string: `""`. - -## timeout - -*Integer* - -Timeout of the connections, expressed in milliseconds. Default: 5000 - -## tls - -*true | false* - -This option specifies that traffic on the port will be encrypted - using SSL immediately after connecting. This was the traditional - encryption method in the early Jabber software, commonly on port - 5223 for client-to-server communications. But this method is - nowadays deprecated and not recommended. The preferable encryption - method is STARTTLS on port 5222, as defined - [`RFC 6120: XMPP Core`](https://xmpp.org/rfcs/rfc6120.html#tls), - which can be enabled in `ejabberd` with the option - [`starttls`](#starttls). - -If this option is set, you should also set the - [`certfiles`](/archive/23_04/toplevel/#certfiles) top-level - option or configure [ACME](/admin/configuration/basic/#acme). - -The option `tls` can also be used in - [`ejabberd_http`](/archive/23_04/listen/#ejabberd-http) - to support HTTPS. - -Enabling this option implicitly disables the [`starttls`](#starttls) option. - -## tls_compression - -*true | false* - -Whether to enable or disable TLS compression. The default value is - `false`. - -Please note: if this option is set in -[`ejabberd_c2s`](/archive/23_04/listen/#ejabberd-c2s) -or [`ejabberd_s2s_in`](/archive/23_04/listen/#ejabberd-s2s-in) -and the corresponding top-level option is also set -([`c2s_tls_compression`](/archive/23_04/toplevel/#c2s-tls-compression), -[`s2s_tls_compression`](/archive/23_04/toplevel/#s2s-tls-compression)), -then the top-level option is used, not this one. - -## tls_verify - -*false | true* - -This option specifies whether to verify the certificate or not when TLS is enabled. - -The default value is `false`, which means no checks are performed. - -The certificate will be checked against trusted CA roots, either defined at the operation system level or defined in the - listener [`cafile`](#cafile). If trusted, it will accept the jid that is embedded in the certificate in the - `subjectAltName` field of that certificate. - -Enabling this option implicitly enables also the [`starttls`](#starttls) option. - -## use_proxy_protocol - -*true | false* - -Is this listener accessed by proxy service that is using - proxy protocol for supplying real IP addresses to ejabberd server. You can read about this protocol - in [Proxy protocol specification](https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt). - The default value of this option is`false`. - -## zlib - -*true | false* - -This option specifies that Zlib stream compression (as defined in - [`XEP-0138`](https://xmpp.org/extensions/xep-0138.html)) is available - on connections to the port. diff --git a/content/archive/23_04/sql-schema.md b/content/archive/23_04/sql-schema.md deleted file mode 100644 index a33ffa66..00000000 --- a/content/archive/23_04/sql-schema.md +++ /dev/null @@ -1,311 +0,0 @@ ---- -title: ejabberd SQL Database Schema -toc: true -menu: SQL Schema -order: 190 ---- - - -We present the tables that might be in use, depending on your server configuration, together with a short explanation of the fields involved and their intended use. Tables are presented roughly grouped by related functionality. - -Consider this document a work in progress, not all tables are documented yet. - -Latest version of database schema are available in [ejabberd Github repository](https://github.com/processone/ejabberd): - -* [MySQL schema](https://github.com/processone/ejabberd/blob/master/sql/mysql.sql) -* [Postgres schema](https://github.com/processone/ejabberd/blob/master/sql/pg.sql) -* [SQLite schema](https://github.com/processone/ejabberd/blob/master/sql/lite.sql) -* [MS SQL Server schema](https://github.com/processone/ejabberd/blob/master/sql/mssql.sql). This - schema need testing / feedback and possibly improvement from SQL - Server users. - -# Authentication - -## Table `users` - -Contains the information required to authenticate users. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| password | string | User password, can be hashed | -| created_at | timestamp | When the user account was created | - - -The password are hashed if you use SCRAM authentication. In that case the next fields are also defined - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| serverkey | string | support for salted passwords | -| salt | string | support for salted passwords | -| iterationcount | integer | support for salted passwords | - - -# Rosters - -## Table `rosterusers` - -This is a quite complex table, used as a store for a quite complex protocol that is the one defined to manage -rosters and subscriptions on [rfc6121](https://tools.ietf.org/html/rfc6121). - -In the common case of two users adding each other as contacts, entries in the roster table follows a series of steps - as they moves from a subscription request to the final approval and bi-directional subscription being established. -This process can be initiated either by the user, or by the (possible remote) peer. Also need to account for the case -where the user, or the contact, might not be online at the moment of the subscription request is made. - -Steps are further complicated by the fact that entries in the roster aren't required to have corresponding subscriptions. -For details of the meaning of the different fields, refer to [the protocol itself](https://tools.ietf.org/html/rfc6121#section-2), as these are mostly a direct mapping of it. - -Note: -If you manage users contacts from outside the roster workflow of XMPP (for example your site backends perform the linking between -users), it is likely that you only need to care about the username, jid and nick fields, and set the subscription field to be always -'B' for a mutual link between users. - - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| jid | string | Contact jid | -| nick | string | Contact nickname | -| subscription | char | 'B'=both | 'T'=To | 'F'=From | 'N'=none | -| ask | char | 'S'=subscribe | 'U'=unsubscribe | B='both' | 'O'=out | 'I'=in | 'N'=none | -| askmessage | string | Message to be displayed on the subscription request | -| server | char | 'N' for normal users contacts | -| subscribe | string | | -| type | string | "item" | -| created_at | timestamp | Creation date of this roster entry | - - - - -## Table `rostergroups` - -## Table `sr_group` - -## Table `sr_user` - - - -# Messages - -## Table `spool` -Messages sent to users that are offline are stored in this table. -Do not confuse this with general message archiving: messages are only temporarily stored in this table, removed as soon as the target user -is back online and the pending messages delivered to it. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| xml | blob | Raw packet | -| seq | integer | Unique, autoincrement sequence number. | -| created_at | timestamp | When the message was stored | - -The seq field is used for sorting, and to easily identify a particular user message. - - -## Table `privacy_list_data` - -The table is used to store privacy rules. - -The table is a direct translation of the XMPP packet used to set -privacy lists. For more details, please read -[XEP-0016: Privacy Lists, Syntax and Semantics](https://xmpp.org/extensions/xep-0016.html#protocol-syntax). Here -is an example packet coming from privacy list specification: - - - - [] - [] - [] - [] - - -The table fields are defined as follow: - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| id | int | Privacy list rule id. | -| t | char | Privacy rule type: 'j' for jid, 'g' for group and 's' for subscription. | -| value | string | Privacy list value for match, whose content depends on privacy list rule type. | -| action | char | Privacy list action: 'd' for deny and 'a' for allow. | -| ord | int | Order for applying the privacy list rule. | -| match\_all | boolean (0 or 1) | If true (1), means any packet types will be matched. Other matches should be false (0). | -| match\_iq | boolean (0 or 1) | If true (1), means iq packets will be matched by rule. | -| match\_message | boolean (0 or 1) | If true (1), means message packets type will be matched by rule. | -| match\_presence\_in | boolean (0 or 1) | If true (1), means inbound presence packets type will be matched by rule. | -| match\_presence\_out | boolean (0 or 1) | If true (1), means outbound packets type will be matched by rule. | - - - -# Multiuser Chat Rooms - -## Table `muc_room` -It is used to store *persistent* rooms, that is, rooms that must be automatically started with the server. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| name | string | Room name | -| host | string | Hostname of the conference component | -| opts | string | Room options, encoded as erlang terms | -| created_at | timestamp | Creation date | - -The opts field is legible, but not mean to be modified directly. It contents depends on the implementation of mod_muc. -It contains the room configuration and affiliations. - - -## Table `muc_registered` -Contains a map of user to nicknames. When a user register a nickname with the conference module, that nick is reserved and can't be used by -anyone else, in any room from that conference host. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| jid | string | User jid | -| host | string | Hostname of the conference component | -| nick | string | Room options, encoded as erlang terms | -| created_at | timestamp | Creation date | - - -## Table `room_history` -In ejabberd Business Edition, -this table is used if persistent room history is enabled. If so, recent room history is saved to the DB before ejabberd is stopped, -allowing the recent history to survive server restarts. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| room | string | Room jid | -| nick | string | Nickname that sent the message | -| packet | string | XML stanza with the message | -| have_subject | boolean | True if the message stanza had subject | -| created_at | timestamp | Creation date | -| size | integer | Size in bytes of the xml packet | - -## Table `muc_online_room` -This table is used to store rooms that actually exists in the memory of the server. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| name | string | Room name | -| host | string | Hostname of the conference component | -| node | string | Erlang node where the room is | -| pid | string | Pid of the thread running the room | - -## Table `muc_online_users` -This table is used to store MucSub subscriptions. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User -| server | string | Hostname of the user | -| resource | string | User resource | -| name | string | Name of the room | -| host | string | Hostname of the conference component | -| node | string | Erlang node | - -## Table `muc_room_subscribers` -This table is used to store MucSub subscriptions. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| room | string | Room name | -| host | string | Hostname of the conference component | -| jid | string | User jid | -| nick | string | User nick | -| nodes | string | MucSub nodes | -| created_at | timestamp | Creation date | - - -# VCard - -## Table `vcard` - -The table is used to store raw vCard content for delivery of the vCard -"as is". - -The table fields are defined as follow: - -| Field | Type | Usage | -| -------------------- | ---------------- | -------------------- | -| username | string | Owner of the Vcard | -| vcard | text | Raw Vcard | -| created_at | timestamp | Record creation date | - -## Table `vcard_search` - -The table is used to store vCard index on a few of the Vcard field -used for vCard search in users directory. - -You can learn more about the vCard specification on Wikipedia -[vCard](https://en.wikipedia.org/wiki/VCard) page. - -The table fields are defined as follow: - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------- | -| username | string | Raw username for display | -| lusername | string | Lowercase username for search | -| fn | string | Raw fullname for display | -| lfn | string | Lowercase fullname for search | -| family | string | Raw family name for display | -| lfamilly | string | Lowercase family name for search | -| given | string | Raw given name for display | -| lgiven | string | Lowercase given name for search | -| middle | string | Raw middle name for display | -| lmiddle | string | Lowercase middle name for search | -| nickname | string | Raw nickname for display | -| lnickname | string | Lowercase nickname for search | -| bday | string | Raw birthday for display | -| lbday | string | Lowercase and processed birthday for search | -| ctry | string | Raw country for display | -| lctry | string | Lowercase country for search | -| locality | string | Raw city for display | -| llocality | string | Lowercase city for search | -| email | string | Raw email for display | -| lemail | string | Lowercase email for search | -| orgname | string | Raw organisation name for display | -| lorgname | string | Lowercase organisation name for search | -| orgunit | string | Raw organisation department name for display | -| lorgunit | string | Lowercase organisation department for search | - -# Others - -## Table `last` -This table is used to store the last time the user was seen online. -It is defined as follow: - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| seconds | string | Timestamp for the last time the user was seen online | -| state | string | Why user got disconnected. Usually is empty | - -Note that the table is *not* updated while the user has the session open. - - - -## Table `caps_features` -Ejabberd uses this table to keep a list of the entity capabilities discovered. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| node | string | Node | -| subnode | string | Subnode | -| feature | string | Entity feature | -| created_at | timestamp | Creation date | - -The subnode field correspond to the 'ver' ("verification string") of XEP-0115. -There is one entry in this table for each feature advertised by the given (node,subnode) pair. - -## Table `private_storage` -Used for user private data storage. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| namespace | string | XEP-0049 namespace of the stored data | -| data | string | Raw xml | -| created_at | timestamp | Creation date | - diff --git a/content/archive/23_10/admin-tags.md b/content/archive/23_10/admin-tags.md deleted file mode 100644 index 05f3b0c9..00000000 --- a/content/archive/23_10/admin-tags.md +++ /dev/null @@ -1,612 +0,0 @@ ---- -title: API Tags -toc: true -menu: API Tags -order: 2 -// Autogenerated with 'ejabberdctl gen_markdown_doc_for_tags' ---- - -This section enumerates the tags and their associated API. - - -## accounts - - -* [ban_account](/archive/23_10/admin-api/#ban-account) - - -* [change_password](/archive/23_10/admin-api/#change-password) - - -* [check_account](/archive/23_10/admin-api/#check-account) - - -* [check_password](/archive/23_10/admin-api/#check-password) - - -* [check_password_hash](/archive/23_10/admin-api/#check-password-hash) - - -* [delete_old_users](/archive/23_10/admin-api/#delete-old-users) - - -* [delete_old_users_vhost](/archive/23_10/admin-api/#delete-old-users-vhost) - - -* [register](/archive/23_10/admin-api/#register) - - -* [registered_users](/archive/23_10/admin-api/#registered-users) - - -* [unban_ip](/archive/23_10/admin-api/#unban-ip) - - -* [unregister](/archive/23_10/admin-api/#unregister) - - -## acme - - -* [list_certificates](/archive/23_10/admin-api/#list-certificates) - - -* [request_certificate](/archive/23_10/admin-api/#request-certificate) - - -* [revoke_certificate](/archive/23_10/admin-api/#revoke-certificate) - - -## cluster - - -* [join_cluster](/archive/23_10/admin-api/#join-cluster) - - -* [leave_cluster](/archive/23_10/admin-api/#leave-cluster) - - -* [list_cluster](/archive/23_10/admin-api/#list-cluster) - - -* [set_master](/archive/23_10/admin-api/#set-master) - - -## config - - -* [convert_to_yaml](/archive/23_10/admin-api/#convert-to-yaml) - - -* [dump_config](/archive/23_10/admin-api/#dump-config) - - -* [reload_config](/archive/23_10/admin-api/#reload-config) - - -## documentation - - -* [gen_html_doc_for_commands](/archive/23_10/admin-api/#gen-html-doc-for-commands) - - -* [gen_markdown_doc_for_commands](/archive/23_10/admin-api/#gen-markdown-doc-for-commands) - - -* [gen_markdown_doc_for_tags](/archive/23_10/admin-api/#gen-markdown-doc-for-tags) - - -* [man](/archive/23_10/admin-api/#man) - - -## erlang - - -* [compile](/archive/23_10/admin-api/#compile) - - -* [get_cookie](/archive/23_10/admin-api/#get-cookie) - - -* [restart_module](/archive/23_10/admin-api/#restart-module) - - -## last - - -* [get_last](/archive/23_10/admin-api/#get-last) - - -* [set_last](/archive/23_10/admin-api/#set-last) - - -## logs - - -* [get_loglevel](/archive/23_10/admin-api/#get-loglevel) - - -* [reopen_log](/archive/23_10/admin-api/#reopen-log) - - -* [rotate_log](/archive/23_10/admin-api/#rotate-log) - - -* [set_loglevel](/archive/23_10/admin-api/#set-loglevel) - - -## mam - - -* [remove_mam_for_user](/archive/23_10/admin-api/#remove-mam-for-user) - - -* [remove_mam_for_user_with_peer](/archive/23_10/admin-api/#remove-mam-for-user-with-peer) - - -## mnesia - - -* [backup](/archive/23_10/admin-api/#backup) - - -* [delete_mnesia](/archive/23_10/admin-api/#delete-mnesia) - - -* [dump](/archive/23_10/admin-api/#dump) - - -* [dump_table](/archive/23_10/admin-api/#dump-table) - - -* [export2sql](/archive/23_10/admin-api/#export2sql) - - -* [export_piefxis](/archive/23_10/admin-api/#export-piefxis) - - -* [export_piefxis_host](/archive/23_10/admin-api/#export-piefxis-host) - - -* [import_dir](/archive/23_10/admin-api/#import-dir) - - -* [import_file](/archive/23_10/admin-api/#import-file) - - -* [import_piefxis](/archive/23_10/admin-api/#import-piefxis) - - -* [import_prosody](/archive/23_10/admin-api/#import-prosody) - - -* [install_fallback](/archive/23_10/admin-api/#install-fallback) - - -* [load](/archive/23_10/admin-api/#load) - - -* [mnesia_change_nodename](/archive/23_10/admin-api/#mnesia-change-nodename) - - -* [mnesia_info](/archive/23_10/admin-api/#mnesia-info) - - -* [mnesia_table_info](/archive/23_10/admin-api/#mnesia-table-info) - - -* [restore](/archive/23_10/admin-api/#restore) - - -## modules - - -* [module_check](/archive/23_10/admin-api/#module-check) - - -* [module_install](/archive/23_10/admin-api/#module-install) - - -* [module_uninstall](/archive/23_10/admin-api/#module-uninstall) - - -* [module_upgrade](/archive/23_10/admin-api/#module-upgrade) - - -* [modules_available](/archive/23_10/admin-api/#modules-available) - - -* [modules_installed](/archive/23_10/admin-api/#modules-installed) - - -* [modules_update_specs](/archive/23_10/admin-api/#modules-update-specs) - - -## muc - - -* [create_rooms_file](/archive/23_10/admin-api/#create-rooms-file) - - -* [destroy_rooms_file](/archive/23_10/admin-api/#destroy-rooms-file) - - -* [get_user_rooms](/archive/23_10/admin-api/#get-user-rooms) - - -* [get_user_subscriptions](/archive/23_10/admin-api/#get-user-subscriptions) - - -* [muc_online_rooms](/archive/23_10/admin-api/#muc-online-rooms) - - -* [muc_online_rooms_by_regex](/archive/23_10/admin-api/#muc-online-rooms-by-regex) - - -* [muc_register_nick](/archive/23_10/admin-api/#muc-register-nick) - - -* [muc_unregister_nick](/archive/23_10/admin-api/#muc-unregister-nick) - - -* [rooms_empty_destroy](/archive/23_10/admin-api/#rooms-empty-destroy) - - -* [rooms_empty_list](/archive/23_10/admin-api/#rooms-empty-list) - - -* [rooms_unused_destroy](/archive/23_10/admin-api/#rooms-unused-destroy) - - -* [rooms_unused_list](/archive/23_10/admin-api/#rooms-unused-list) - - -## muc_room - - -* [change_room_option](/archive/23_10/admin-api/#change-room-option) - - -* [create_room](/archive/23_10/admin-api/#create-room) - - -* [create_room_with_opts](/archive/23_10/admin-api/#create-room-with-opts) - - -* [destroy_room](/archive/23_10/admin-api/#destroy-room) - - -* [get_room_affiliation](/archive/23_10/admin-api/#get-room-affiliation) - - -* [get_room_affiliations](/archive/23_10/admin-api/#get-room-affiliations) - - -* [get_room_history](/archive/23_10/admin-api/#get-room-history) - - -* [get_room_occupants](/archive/23_10/admin-api/#get-room-occupants) - - -* [get_room_occupants_number](/archive/23_10/admin-api/#get-room-occupants-number) - - -* [get_room_options](/archive/23_10/admin-api/#get-room-options) - - -* [get_subscribers](/archive/23_10/admin-api/#get-subscribers) - - -* [send_direct_invitation](/archive/23_10/admin-api/#send-direct-invitation) - - -* [set_room_affiliation](/archive/23_10/admin-api/#set-room-affiliation) - - -* [subscribe_room](/archive/23_10/admin-api/#subscribe-room) - - -* [subscribe_room_many](/archive/23_10/admin-api/#subscribe-room-many) - - -* [unsubscribe_room](/archive/23_10/admin-api/#unsubscribe-room) - - -## oauth - - -* [oauth_add_client_implicit](/archive/23_10/admin-api/#oauth-add-client-implicit) - - -* [oauth_add_client_password](/archive/23_10/admin-api/#oauth-add-client-password) - - -* [oauth_issue_token](/archive/23_10/admin-api/#oauth-issue-token) - - -* [oauth_list_tokens](/archive/23_10/admin-api/#oauth-list-tokens) - - -* [oauth_remove_client](/archive/23_10/admin-api/#oauth-remove-client) - - -* [oauth_revoke_token](/archive/23_10/admin-api/#oauth-revoke-token) - - -## offline - - -* [get_offline_count](/archive/23_10/admin-api/#get-offline-count) - - -## private - - -* [bookmarks_to_pep](/archive/23_10/admin-api/#bookmarks-to-pep) - - -* [private_get](/archive/23_10/admin-api/#private-get) - - -* [private_set](/archive/23_10/admin-api/#private-set) - - -## purge - - -* [abort_delete_old_mam_messages](/archive/23_10/admin-api/#abort-delete-old-mam-messages) - - -* [abort_delete_old_messages](/archive/23_10/admin-api/#abort-delete-old-messages) - - -* [delete_expired_messages](/archive/23_10/admin-api/#delete-expired-messages) - - -* [delete_expired_pubsub_items](/archive/23_10/admin-api/#delete-expired-pubsub-items) - - -* [delete_old_mam_messages](/archive/23_10/admin-api/#delete-old-mam-messages) - - -* [delete_old_mam_messages_batch](/archive/23_10/admin-api/#delete-old-mam-messages-batch) - - -* [delete_old_mam_messages_status](/archive/23_10/admin-api/#delete-old-mam-messages-status) - - -* [delete_old_messages](/archive/23_10/admin-api/#delete-old-messages) - - -* [delete_old_messages_batch](/archive/23_10/admin-api/#delete-old-messages-batch) - - -* [delete_old_messages_status](/archive/23_10/admin-api/#delete-old-messages-status) - - -* [delete_old_pubsub_items](/archive/23_10/admin-api/#delete-old-pubsub-items) - - -* [delete_old_push_sessions](/archive/23_10/admin-api/#delete-old-push-sessions) - - -* [delete_old_users](/archive/23_10/admin-api/#delete-old-users) - - -* [delete_old_users_vhost](/archive/23_10/admin-api/#delete-old-users-vhost) - - -## roster - - -* [add_rosteritem](/archive/23_10/admin-api/#add-rosteritem) - - -* [delete_rosteritem](/archive/23_10/admin-api/#delete-rosteritem) - - -* [get_roster](/archive/23_10/admin-api/#get-roster) - - -* [process_rosteritems](/archive/23_10/admin-api/#process-rosteritems) - - -* [push_alltoall](/archive/23_10/admin-api/#push-alltoall) - - -* [push_roster](/archive/23_10/admin-api/#push-roster) - - -* [push_roster_all](/archive/23_10/admin-api/#push-roster-all) - - -## s2s - - -* [incoming_s2s_number](/archive/23_10/admin-api/#incoming-s2s-number) - - -* [outgoing_s2s_number](/archive/23_10/admin-api/#outgoing-s2s-number) - - -* [stop_s2s_connections](/archive/23_10/admin-api/#stop-s2s-connections) - - -## server - - -* [clear_cache](/archive/23_10/admin-api/#clear-cache) - - -* [gc](/archive/23_10/admin-api/#gc) - - -* [halt](/archive/23_10/admin-api/#halt) - - -* [registered_vhosts](/archive/23_10/admin-api/#registered-vhosts) - - -* [restart](/archive/23_10/admin-api/#restart) - - -* [status](/archive/23_10/admin-api/#status) - - -* [stop](/archive/23_10/admin-api/#stop) - - -* [stop_kindly](/archive/23_10/admin-api/#stop-kindly) - - -* [update](/archive/23_10/admin-api/#update) - - -* [update_list](/archive/23_10/admin-api/#update-list) - - -## session - - -* [connected_users](/archive/23_10/admin-api/#connected-users) - - -* [connected_users_info](/archive/23_10/admin-api/#connected-users-info) - - -* [connected_users_number](/archive/23_10/admin-api/#connected-users-number) - - -* [connected_users_vhost](/archive/23_10/admin-api/#connected-users-vhost) - - -* [get_presence](/archive/23_10/admin-api/#get-presence) - - -* [kick_session](/archive/23_10/admin-api/#kick-session) - - -* [kick_user](/archive/23_10/admin-api/#kick-user) - - -* [num_resources](/archive/23_10/admin-api/#num-resources) - - -* [resource_num](/archive/23_10/admin-api/#resource-num) - - -* [set_presence](/archive/23_10/admin-api/#set-presence) - - -* [status_list](/archive/23_10/admin-api/#status-list) - - -* [status_list_host](/archive/23_10/admin-api/#status-list-host) - - -* [status_num](/archive/23_10/admin-api/#status-num) - - -* [status_num_host](/archive/23_10/admin-api/#status-num-host) - - -* [user_resources](/archive/23_10/admin-api/#user-resources) - - -* [user_sessions_info](/archive/23_10/admin-api/#user-sessions-info) - - -## shared_roster_group - - -* [srg_create](/archive/23_10/admin-api/#srg-create) - - -* [srg_delete](/archive/23_10/admin-api/#srg-delete) - - -* [srg_get_info](/archive/23_10/admin-api/#srg-get-info) - - -* [srg_get_members](/archive/23_10/admin-api/#srg-get-members) - - -* [srg_list](/archive/23_10/admin-api/#srg-list) - - -* [srg_user_add](/archive/23_10/admin-api/#srg-user-add) - - -* [srg_user_del](/archive/23_10/admin-api/#srg-user-del) - - -## sql - - -* [convert_to_scram](/archive/23_10/admin-api/#convert-to-scram) - - -* [import_prosody](/archive/23_10/admin-api/#import-prosody) - - -## stanza - - -* [privacy_set](/archive/23_10/admin-api/#privacy-set) - - -* [send_message](/archive/23_10/admin-api/#send-message) - - -* [send_stanza](/archive/23_10/admin-api/#send-stanza) - - -* [send_stanza_c2s](/archive/23_10/admin-api/#send-stanza-c2s) - - -## statistics - - -* [connected_users_number](/archive/23_10/admin-api/#connected-users-number) - - -* [incoming_s2s_number](/archive/23_10/admin-api/#incoming-s2s-number) - - -* [outgoing_s2s_number](/archive/23_10/admin-api/#outgoing-s2s-number) - - -* [stats](/archive/23_10/admin-api/#stats) - - -* [stats_host](/archive/23_10/admin-api/#stats-host) - - -* [status_num](/archive/23_10/admin-api/#status-num) - - -* [status_num_host](/archive/23_10/admin-api/#status-num-host) - - -## vcard - - -* [get_vcard](/archive/23_10/admin-api/#get-vcard) - - -* [get_vcard2](/archive/23_10/admin-api/#get-vcard2) - - -* [get_vcard2_multi](/archive/23_10/admin-api/#get-vcard2-multi) - - -* [set_nickname](/archive/23_10/admin-api/#set-nickname) - - -* [set_vcard](/archive/23_10/admin-api/#set-vcard) - - -* [set_vcard2](/archive/23_10/admin-api/#set-vcard2) - - -* [set_vcard2_multi](/archive/23_10/admin-api/#set-vcard2-multi) diff --git a/content/archive/23_10/listen-options.md b/content/archive/23_10/listen-options.md deleted file mode 100644 index 75011d51..00000000 --- a/content/archive/23_10/listen-options.md +++ /dev/null @@ -1,400 +0,0 @@ ---- -title: Listen Options -toc: true -menu: Listen Opts -order: 51 ---- - - -This is a detailed description of each option allowed by the listening -modules: - -## access - -*AccessName* - -This option defines access to the port. The default value is `all`. - -## backlog - -*Value* - -The backlog value defines the maximum length that the queue of - pending connections may grow to. This should be increased if the - server is going to handle lots of new incoming connections as they - may be dropped if there is no space in the queue (and ejabberd was - not able to accept them immediately). Default value is 5. - -## cafile - -*Path* - -Path to a file of CA root certificates. -The default is to use system defined file if possible. - -This option is useful to define the file for a specific port listener. -To set a file for all client listeners or for specific vhosts, you can use the -[`c2s_cafile`](/archive/23_10/toplevel/#c2s-cafile) top-level option. -To set a file for all server connections, you can use the -[`s2s_cafile`](/archive/23_10/toplevel/#s2s-cafile) top-level option -or the -[`ca_file`](/archive/23_10/toplevel/#ca-file) top-level option. - -Please note: if this option is set in -[`ejabberd_c2s`](/archive/23_10/listen/#ejabberd-c2s) -or [`ejabberd_s2s_in`](/archive/23_10/listen/#ejabberd-s2s-in) -and the corresponding top-level option is also set -([`c2s_cafile`](/archive/23_10/toplevel/#c2s-cafile), -[`s2s_cafile`](/archive/23_10/toplevel/#s2s-cafile)), -then the top-level option is used, not this one. - -## certfile - -*Path* - -Path to the certificate file. -Only makes sense when the [`tls`](#tls) -options is set. -If this option is not set, you should set the -[`certfiles`](/archive/23_10/toplevel/#certfiles) top-level option -or configure [ACME](/admin/configuration/basic/#acme). - -## check_from - -*true | false* - -This option can be used with -[`ejabberd_service`](/archive/23_10/listen/#ejabberd-service) only. - [`XEP-0114`](https://xmpp.org/extensions/xep-0114.html) requires that - the domain must match the hostname of the component. If this option - is set to `false`, `ejabberd` will allow the component to send - stanzas with any arbitrary domain in the ’from’ attribute. Only use - this option if you are completely sure about it. The default value - is `true`, to be compliant with - [`XEP-0114`](https://xmpp.org/extensions/xep-0114.html). - -## ciphers - -*Ciphers* - -OpenSSL ciphers list in the same format accepted by - ‘`openssl ciphers`’ command. - -Please note: if this option is set in -[`ejabberd_c2s`](/archive/23_10/listen/#ejabberd-c2s) -or [`ejabberd_s2s_in`](/archive/23_10/listen/#ejabberd-s2s-in) -and the corresponding top-level option is also set -([`c2s_ciphers`](/archive/23_10/toplevel/#c2s-ciphers), -[`s2s_ciphers`](/archive/23_10/toplevel/#s2s-ciphers)), -then the top-level option is used, not this one. - -## custom_headers - -*{Name: Value}* - -Specify additional HTTP headers to be included in all HTTP responses. -Default value is: `[]` - -## default_host - -*undefined | HostName* - -If the HTTP request received by ejabberd contains the HTTP header - `Host` with an ambiguous virtual host that doesn’t match any one - defined in ejabberd (see - [Host Names](/admin/configuration/basic/#host-names)), - then this configured HostName - is set as the request Host. The default value of this option is: - `undefined`. - -## dhfile - -*Path* - -Full path to a file containing custom parameters for Diffie-Hellman key - exchange. Such a file could be created with the command - `openssl dhparam -out dh.pem 2048`. If this option is not specified, - default parameters will be used, which might not provide the same level - of security as using custom parameters. - -Please note: if this option is set in -[`ejabberd_c2s`](/archive/23_10/listen/#ejabberd-c2s) -or [`ejabberd_s2s_in`](/archive/23_10/listen/#ejabberd-s2s-in) -and the corresponding top-level option is also set -([`c2s_dhfile`](/archive/23_10/toplevel/#c2s-dhfile), -[`s2s_dhfile`](/archive/23_10/toplevel/#s2s-dhfile)), -then the top-level option is used, not this one. - -## global_routes - -*true | false* - -This option emulates legacy behaviour which registers all routes -defined in [`hosts`](/archive/23_10/toplevel/#hosts) -on a component connected. This behaviour -is considered harmful in the case when it's desired to multiplex -different components on the same port, so, to disable it, -set `global_routes` to `false`. - -The default value is `true`, -e.g. legacy behaviour is emulated: the only reason for this is -to maintain backward compatibility with existing deployments. - -## hosts - -*{Hostname: [HostOption, ...]}* - -The external Jabber component that connects to this -[`ejabberd_service`](/archive/23_10/listen/#ejabberd-service) -can serve one or more hostnames. As `HostOption` - you can define options for the component; currently the only allowed - option is the password required to the component when attempt to - connect to ejabberd: `password: Secret`. Note that you - cannot define in a single `ejabberd_service` components of different - services: add an `ejabberd_service` for each service, as seen in an - example below. This option may not be necessary if the component - already provides the host in its packets; in that case, you can simply - provide the password option that will be used for all the hosts - (see port 5236 definition in the example below). - -## max_fsm_queue - -*Size* - -This option specifies the maximum number of elements in the queue of - the FSM (Finite State Machine). Roughly speaking, each message in - such queues represents one XML stanza queued to be sent into its - relevant outgoing stream. If queue size reaches the limit (because, - for example, the receiver of stanzas is too slow), the FSM and the - corresponding connection (if any) will be terminated and error - message will be logged. The reasonable value for this option depends - on your hardware configuration. This option can be specified for - [`ejabberd_service`](/archive/23_10/listen/#ejabberd-service) - and [`ejabberd_c2s`](/archive/23_10/listen/#ejabberd-c2s) - listeners, or also globally for - [`ejabberd_s2s_out`](/archive/23_10/listen/#ejabberd-s2s-out). - If the option is not specified for - `ejabberd_service` or `ejabberd_c2s` listeners, the globally - configured value is used. The allowed values are integers and - ’undefined’. Default value: ’10000’. - -## max_payload_size - -*Size* - -Specify the maximum payload size in bytes. -It can be either an integer or the word `infinity`. -The default value is `infinity`. - -## max_stanza_size - -*Size* - -This option specifies an approximate maximum size in bytes of XML - stanzas. Approximate, because it is calculated with the precision of - one block of read data. For example `{max_stanza_size, 65536}`. The - default value is `infinity`. Recommended values are 65536 for c2s - connections and 131072 for s2s connections. s2s max stanza size must - always much higher than c2s limit. Change this value with extreme - care as it can cause unwanted disconnect if set too low. - -## password - -*Secret* - -Specify the password to verify an external component that connects to the port. - -
improved in 20.07
- -## port - -*Port number, or unix domain socket path* - -Declares at which port/unix domain socket should be listening. - -Can be set to number between `1` and `65535` to listen on TCP or UDP socket, -or can be set to string in form `"unix:/path/to/socket"` to create and listen -on unix domain socket `/path/to/socket`. - -## protocol_options - -*ProtocolOpts* - -List of general options relating to SSL/TLS. These map to - [`OpenSSL’s set_options()`](https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_options.html). - The default entry is: `"no_sslv3|cipher_server_preference|no_compression"` - -Please note: if this option is set in -[`ejabberd_c2s`](/archive/23_10/listen/#ejabberd-c2s) -or [`ejabberd_s2s_in`](/archive/23_10/listen/#ejabberd-s2s-in) -and the corresponding top-level option is also set -([`c2s_protocol_options`](/archive/23_10/toplevel/#c2s-protocol-options), -[`s2s_protocol_options`](/archive/23_10/toplevel/#s2s-protocol-options)), -then the top-level option is used, not this one. - -## request_handlers - -*{Path: Module}* - -To define one or several handlers that will serve HTTP requests in -[`ejabberd_http`](/archive/23_10/listen/#ejabberd-http). The - Path is a string; so the URIs that start with that Path will be - served by Module. For example, if you want `mod_foo` to serve the - URIs that start with `/a/b/`, and you also want `mod_bosh` to - serve the URIs `/bosh/`, use this option: - - request_handlers: - /a/b: mod_foo - /bosh: mod_bosh - /mqtt: mod_mqtt - -
new in 21.07
- -## send_timeout - -*Integer | infinity* - -Sets the longest time that data can wait to be accepted to sent by OS socket. Triggering this timeout will cause the server to close it. By default it's set to 15 seconds, expressed in milliseconds: 15000 - -## shaper - -*none | ShaperName* - -This option defines a shaper for the port (see section  -[Shapers](/admin/configuration/basic/#shapers)). - The default value is `none`. - -## shaper_rule - -*none | ShaperRule* - -This option defines a shaper rule for -[`ejabberd_service`](/archive/23_10/listen/#ejabberd-service) (see -section [Shapers](/admin/configuration/basic/#shapers)). -The recommended value is `fast`. - -## starttls - -*true | false* - -This option specifies that STARTTLS encryption is available on -connections to the port. You should also set the -[`certfiles`](/archive/23_10/toplevel/#certfiles) top-level option -or configure [ACME](/admin/configuration/basic/#acme). - -This option gets implicitly enabled when enabling -[`starttls_required`](#starttls-required) or [`tls_verify`](#tls-verify). - -## starttls_required - -*true | false* - -This option specifies that STARTTLS encryption is required on -connections to the port. No unencrypted connections will be allowed. -You should also set the -[`certfiles`](/archive/23_10/toplevel/#certfiles) top-level option -or configure [ACME](/admin/configuration/basic/#acme). - -Enabling this option implicitly enables also the [`starttls`](#starttls) option. - -## tag - -*String* - -Allow specifying a tag in a `listen` section -and later use it to have a special -[`api_permissions`](/archive/23_10/toplevel/#api-permissions) -just for it. - -For example: - - listen: - - - port: 4000 - module: ejabberd_http - tag: "magic_listener" - - api_permissions: - "magic_access": - from: - - tag: "magic_listener" - who: all - what: "*" - -The default value is the empty string: `""`. - -## timeout - -*Integer* - -Timeout of the connections, expressed in milliseconds. Default: 5000 - -## tls - -*true | false* - -This option specifies that traffic on the port will be encrypted - using SSL immediately after connecting. This was the traditional - encryption method in the early Jabber software, commonly on port - 5223 for client-to-server communications. But this method is - nowadays deprecated and not recommended. The preferable encryption - method is STARTTLS on port 5222, as defined - [`RFC 6120: XMPP Core`](https://xmpp.org/rfcs/rfc6120.html#tls), - which can be enabled in `ejabberd` with the option - [`starttls`](#starttls). - -If this option is set, you should also set the - [`certfiles`](/archive/23_10/toplevel/#certfiles) top-level - option or configure [ACME](/admin/configuration/basic/#acme). - -The option `tls` can also be used in - [`ejabberd_http`](/archive/23_10/listen/#ejabberd-http) - to support HTTPS. - -Enabling this option implicitly disables the [`starttls`](#starttls) option. - -## tls_compression - -*true | false* - -Whether to enable or disable TLS compression. The default value is - `false`. - -Please note: if this option is set in -[`ejabberd_c2s`](/archive/23_10/listen/#ejabberd-c2s) -or [`ejabberd_s2s_in`](/archive/23_10/listen/#ejabberd-s2s-in) -and the corresponding top-level option is also set -([`c2s_tls_compression`](/archive/23_10/toplevel/#c2s-tls-compression), -[`s2s_tls_compression`](/archive/23_10/toplevel/#s2s-tls-compression)), -then the top-level option is used, not this one. - -## tls_verify - -*false | true* - -This option specifies whether to verify the certificate or not when TLS is enabled. - -The default value is `false`, which means no checks are performed. - -The certificate will be checked against trusted CA roots, either defined at the operation system level or defined in the - listener [`cafile`](#cafile). If trusted, it will accept the jid that is embedded in the certificate in the - `subjectAltName` field of that certificate. - -Enabling this option implicitly enables also the [`starttls`](#starttls) option. - -## use_proxy_protocol - -*true | false* - -Is this listener accessed by proxy service that is using - proxy protocol for supplying real IP addresses to ejabberd server. You can read about this protocol - in [Proxy protocol specification](https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt). - The default value of this option is`false`. - -## zlib - -*true | false* - -This option specifies that Zlib stream compression (as defined in - [`XEP-0138`](https://xmpp.org/extensions/xep-0138.html)) is available - on connections to the port. diff --git a/content/archive/23_10/sql-schema.md b/content/archive/23_10/sql-schema.md deleted file mode 100755 index a33ffa66..00000000 --- a/content/archive/23_10/sql-schema.md +++ /dev/null @@ -1,311 +0,0 @@ ---- -title: ejabberd SQL Database Schema -toc: true -menu: SQL Schema -order: 190 ---- - - -We present the tables that might be in use, depending on your server configuration, together with a short explanation of the fields involved and their intended use. Tables are presented roughly grouped by related functionality. - -Consider this document a work in progress, not all tables are documented yet. - -Latest version of database schema are available in [ejabberd Github repository](https://github.com/processone/ejabberd): - -* [MySQL schema](https://github.com/processone/ejabberd/blob/master/sql/mysql.sql) -* [Postgres schema](https://github.com/processone/ejabberd/blob/master/sql/pg.sql) -* [SQLite schema](https://github.com/processone/ejabberd/blob/master/sql/lite.sql) -* [MS SQL Server schema](https://github.com/processone/ejabberd/blob/master/sql/mssql.sql). This - schema need testing / feedback and possibly improvement from SQL - Server users. - -# Authentication - -## Table `users` - -Contains the information required to authenticate users. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| password | string | User password, can be hashed | -| created_at | timestamp | When the user account was created | - - -The password are hashed if you use SCRAM authentication. In that case the next fields are also defined - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| serverkey | string | support for salted passwords | -| salt | string | support for salted passwords | -| iterationcount | integer | support for salted passwords | - - -# Rosters - -## Table `rosterusers` - -This is a quite complex table, used as a store for a quite complex protocol that is the one defined to manage -rosters and subscriptions on [rfc6121](https://tools.ietf.org/html/rfc6121). - -In the common case of two users adding each other as contacts, entries in the roster table follows a series of steps - as they moves from a subscription request to the final approval and bi-directional subscription being established. -This process can be initiated either by the user, or by the (possible remote) peer. Also need to account for the case -where the user, or the contact, might not be online at the moment of the subscription request is made. - -Steps are further complicated by the fact that entries in the roster aren't required to have corresponding subscriptions. -For details of the meaning of the different fields, refer to [the protocol itself](https://tools.ietf.org/html/rfc6121#section-2), as these are mostly a direct mapping of it. - -Note: -If you manage users contacts from outside the roster workflow of XMPP (for example your site backends perform the linking between -users), it is likely that you only need to care about the username, jid and nick fields, and set the subscription field to be always -'B' for a mutual link between users. - - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| jid | string | Contact jid | -| nick | string | Contact nickname | -| subscription | char | 'B'=both | 'T'=To | 'F'=From | 'N'=none | -| ask | char | 'S'=subscribe | 'U'=unsubscribe | B='both' | 'O'=out | 'I'=in | 'N'=none | -| askmessage | string | Message to be displayed on the subscription request | -| server | char | 'N' for normal users contacts | -| subscribe | string | | -| type | string | "item" | -| created_at | timestamp | Creation date of this roster entry | - - - - -## Table `rostergroups` - -## Table `sr_group` - -## Table `sr_user` - - - -# Messages - -## Table `spool` -Messages sent to users that are offline are stored in this table. -Do not confuse this with general message archiving: messages are only temporarily stored in this table, removed as soon as the target user -is back online and the pending messages delivered to it. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| xml | blob | Raw packet | -| seq | integer | Unique, autoincrement sequence number. | -| created_at | timestamp | When the message was stored | - -The seq field is used for sorting, and to easily identify a particular user message. - - -## Table `privacy_list_data` - -The table is used to store privacy rules. - -The table is a direct translation of the XMPP packet used to set -privacy lists. For more details, please read -[XEP-0016: Privacy Lists, Syntax and Semantics](https://xmpp.org/extensions/xep-0016.html#protocol-syntax). Here -is an example packet coming from privacy list specification: - - - - [] - [] - [] - [] - - -The table fields are defined as follow: - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| id | int | Privacy list rule id. | -| t | char | Privacy rule type: 'j' for jid, 'g' for group and 's' for subscription. | -| value | string | Privacy list value for match, whose content depends on privacy list rule type. | -| action | char | Privacy list action: 'd' for deny and 'a' for allow. | -| ord | int | Order for applying the privacy list rule. | -| match\_all | boolean (0 or 1) | If true (1), means any packet types will be matched. Other matches should be false (0). | -| match\_iq | boolean (0 or 1) | If true (1), means iq packets will be matched by rule. | -| match\_message | boolean (0 or 1) | If true (1), means message packets type will be matched by rule. | -| match\_presence\_in | boolean (0 or 1) | If true (1), means inbound presence packets type will be matched by rule. | -| match\_presence\_out | boolean (0 or 1) | If true (1), means outbound packets type will be matched by rule. | - - - -# Multiuser Chat Rooms - -## Table `muc_room` -It is used to store *persistent* rooms, that is, rooms that must be automatically started with the server. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| name | string | Room name | -| host | string | Hostname of the conference component | -| opts | string | Room options, encoded as erlang terms | -| created_at | timestamp | Creation date | - -The opts field is legible, but not mean to be modified directly. It contents depends on the implementation of mod_muc. -It contains the room configuration and affiliations. - - -## Table `muc_registered` -Contains a map of user to nicknames. When a user register a nickname with the conference module, that nick is reserved and can't be used by -anyone else, in any room from that conference host. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| jid | string | User jid | -| host | string | Hostname of the conference component | -| nick | string | Room options, encoded as erlang terms | -| created_at | timestamp | Creation date | - - -## Table `room_history` -In ejabberd Business Edition, -this table is used if persistent room history is enabled. If so, recent room history is saved to the DB before ejabberd is stopped, -allowing the recent history to survive server restarts. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| room | string | Room jid | -| nick | string | Nickname that sent the message | -| packet | string | XML stanza with the message | -| have_subject | boolean | True if the message stanza had subject | -| created_at | timestamp | Creation date | -| size | integer | Size in bytes of the xml packet | - -## Table `muc_online_room` -This table is used to store rooms that actually exists in the memory of the server. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| name | string | Room name | -| host | string | Hostname of the conference component | -| node | string | Erlang node where the room is | -| pid | string | Pid of the thread running the room | - -## Table `muc_online_users` -This table is used to store MucSub subscriptions. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User -| server | string | Hostname of the user | -| resource | string | User resource | -| name | string | Name of the room | -| host | string | Hostname of the conference component | -| node | string | Erlang node | - -## Table `muc_room_subscribers` -This table is used to store MucSub subscriptions. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| room | string | Room name | -| host | string | Hostname of the conference component | -| jid | string | User jid | -| nick | string | User nick | -| nodes | string | MucSub nodes | -| created_at | timestamp | Creation date | - - -# VCard - -## Table `vcard` - -The table is used to store raw vCard content for delivery of the vCard -"as is". - -The table fields are defined as follow: - -| Field | Type | Usage | -| -------------------- | ---------------- | -------------------- | -| username | string | Owner of the Vcard | -| vcard | text | Raw Vcard | -| created_at | timestamp | Record creation date | - -## Table `vcard_search` - -The table is used to store vCard index on a few of the Vcard field -used for vCard search in users directory. - -You can learn more about the vCard specification on Wikipedia -[vCard](https://en.wikipedia.org/wiki/VCard) page. - -The table fields are defined as follow: - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------- | -| username | string | Raw username for display | -| lusername | string | Lowercase username for search | -| fn | string | Raw fullname for display | -| lfn | string | Lowercase fullname for search | -| family | string | Raw family name for display | -| lfamilly | string | Lowercase family name for search | -| given | string | Raw given name for display | -| lgiven | string | Lowercase given name for search | -| middle | string | Raw middle name for display | -| lmiddle | string | Lowercase middle name for search | -| nickname | string | Raw nickname for display | -| lnickname | string | Lowercase nickname for search | -| bday | string | Raw birthday for display | -| lbday | string | Lowercase and processed birthday for search | -| ctry | string | Raw country for display | -| lctry | string | Lowercase country for search | -| locality | string | Raw city for display | -| llocality | string | Lowercase city for search | -| email | string | Raw email for display | -| lemail | string | Lowercase email for search | -| orgname | string | Raw organisation name for display | -| lorgname | string | Lowercase organisation name for search | -| orgunit | string | Raw organisation department name for display | -| lorgunit | string | Lowercase organisation department for search | - -# Others - -## Table `last` -This table is used to store the last time the user was seen online. -It is defined as follow: - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| seconds | string | Timestamp for the last time the user was seen online | -| state | string | Why user got disconnected. Usually is empty | - -Note that the table is *not* updated while the user has the session open. - - - -## Table `caps_features` -Ejabberd uses this table to keep a list of the entity capabilities discovered. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| node | string | Node | -| subnode | string | Subnode | -| feature | string | Entity feature | -| created_at | timestamp | Creation date | - -The subnode field correspond to the 'ver' ("verification string") of XEP-0115. -There is one entry in this table for each feature advertised by the given (node,subnode) pair. - -## Table `private_storage` -Used for user private data storage. - -| Field | Type | Usage | -| -------------------- | ---------------- | --------------------------------------------------------------------------------------- | -| username | string | User | -| namespace | string | XEP-0049 namespace of the stored data | -| data | string | Raw xml | -| created_at | timestamp | Creation date | - diff --git a/content/archive/24.02/admin-api.md b/content/archive/24.02/admin-api.md new file mode 100644 index 00000000..9388a479 --- /dev/null +++ b/content/archive/24.02/admin-api.md @@ -0,0 +1,6669 @@ +--- +search: + exclude: true +--- + +# API Reference + +> This section describes API commands of ejabberd [24.02](../../archive/24.02/index.md). If you are using an old ejabberd release, please refer to the corresponding archived version of this page in the [Archive](../../archive/index.md). The commands that changed in this version are marked with%Ï. + + + +## abort_delete_old_mam_messages + + + +Abort currently running delete old MAM messages operation + +__Arguments:__ + +- *host* :: string : Name of host where operation should be aborted + +__Result:__ + +- *status* :: string : Status text + +__Tags:__ +[purge](admin-tags.md#purge) + +__Module:__ +[mod_mam](modules.md#mod_mam) + +__Examples:__ + + +~~~ json +POST /api/abort_delete_old_mam_messages +{ + "host": "localhost" +} + +HTTP/1.1 200 OK +{"status": "Operation aborted"} +~~~ + + + + +## abort_delete_old_messages + + + +Abort currently running delete old offline messages operation + +__Arguments:__ + +- *host* :: string : Name of host where operation should be aborted + +__Result:__ + +- *status* :: string : Status text + +__Tags:__ +[purge](admin-tags.md#purge) + +__Examples:__ + + +~~~ json +POST /api/abort_delete_old_messages +{ + "host": "localhost" +} + +HTTP/1.1 200 OK +{"status": "Operation aborted"} +~~~ + + + + +## add_rosteritem ● + + + +Add an item to a user's roster (supports ODBC) + +__Arguments:__ + +- *localuser* :: string : User name +- *localhost* :: string : Server name +- *user* :: string : Contact user name +- *host* :: string : Contact server name +- *nick* :: string : Nickname +- *groups* :: [group::string] : Groups +- *subs* :: string : Subscription + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[roster](admin-tags.md#roster), [v1](admin-tags.md#v1) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/add_rosteritem +{ + "localuser": "user1", + "localhost": "myserver.com", + "user": "user2", + "host": "myserver.com", + "nick": "User 2", + "groups": [ + "Friends", + "Team 1" + ], + "subs": "both" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## backup + + +Backup the Mnesia database to a binary file + +__Arguments:__ + +- *file* :: string : Full path for the destination backup file + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[mnesia](admin-tags.md#mnesia) + +__Examples:__ + + +~~~ json +POST /api/backup +{ + "file": "/var/lib/ejabberd/database.backup" +} + +HTTP/1.1 200 OK +"Success" +~~~ + + + + +## ban_account + + +Ban an account: kick sessions and set random password + +__Arguments:__ + +- *user* :: string : User name to ban +- *host* :: string : Server name +- *reason* :: string : Reason for banning user + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[accounts](admin-tags.md#accounts) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/ban_account +{ + "user": "attacker", + "host": "myserver.com", + "reason": "Spaming other users" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## bookmarks_to_pep + + +Export private XML storage bookmarks to PEP + +__Arguments:__ + +- *user* :: string : Username +- *host* :: string : Server + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[private](admin-tags.md#private) + +__Module:__ +[mod_private](modules.md#mod_private) + +__Examples:__ + + +~~~ json +POST /api/bookmarks_to_pep +{ + "user": "bob", + "host": "example.com" +} + +HTTP/1.1 200 OK +"Bookmarks exported" +~~~ + + + + +## change_password + + +Change the password of an account + +__Arguments:__ + +- *user* :: string : User name +- *host* :: string : Server name +- *newpass* :: string : New password for user + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[accounts](admin-tags.md#accounts) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/change_password +{ + "user": "peter", + "host": "myserver.com", + "newpass": "blank" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## change_room_option + + +Change an option in a MUC room + +__Arguments:__ + +- *name* :: string : Room name +- *service* :: string : MUC service +- *option* :: string : Option name +- *value* :: string : Value to assign + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[muc_room](admin-tags.md#muc_room) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/change_room_option +{ + "name": "room1", + "service": "muc.example.com", + "option": "members_only", + "value": "true" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## check_account + + +Check if an account exists or not + +__Arguments:__ + +- *user* :: string : User name to check +- *host* :: string : Server to check + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[accounts](admin-tags.md#accounts) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/check_account +{ + "user": "peter", + "host": "myserver.com" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## check_password + + +Check if a password is correct + +__Arguments:__ + +- *user* :: string : User name to check +- *host* :: string : Server to check +- *password* :: string : Password to check + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[accounts](admin-tags.md#accounts) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/check_password +{ + "user": "peter", + "host": "myserver.com", + "password": "secret" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## check_password_hash + + +Check if the password hash is correct + + +Allows hash methods from the Erlang/OTP [crypto](https://www.erlang.org/doc/man/crypto) application. + +__Arguments:__ + +- *user* :: string : User name to check +- *host* :: string : Server to check +- *passwordhash* :: string : Password's hash value +- *hashmethod* :: string : Name of hash method + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[accounts](admin-tags.md#accounts) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/check_password_hash +{ + "user": "peter", + "host": "myserver.com", + "passwordhash": "5ebe2294ecd0e0f08eab7690d2a6ee69", + "hashmethod": "md5" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## clear_cache + + +Clear database cache on all nodes + +__Arguments:__ + + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[server](admin-tags.md#server) + +__Examples:__ + + +~~~ json +POST /api/clear_cache +{ + +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## compile + + +Recompile and reload Erlang source code file + +__Arguments:__ + +- *file* :: string : Filename of erlang source file to compile + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[erlang](admin-tags.md#erlang) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/compile +{ + "file": "/home/me/srcs/ejabberd/mod_example.erl" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## connected_users + + +List all established sessions + +__Arguments:__ + + +__Result:__ + +- *connected_users* :: [sessions::string] : List of users sessions + +__Tags:__ +[session](admin-tags.md#session) + +__Examples:__ + + +~~~ json +POST /api/connected_users +{ + +} + +HTTP/1.1 200 OK +[ + "user1@example.com", + "user2@example.com" +] +~~~ + + + + +## connected_users_info + + +List all established sessions and their information + +__Arguments:__ + + +__Result:__ + +- *connected_users_info* :: [{jid::string, connection::string, ip::string, port::integer, priority::integer, node::string, uptime::integer, status::string, resource::string, statustext::string}] + +__Tags:__ +[session](admin-tags.md#session) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/connected_users_info +{ + +} + +HTTP/1.1 200 OK +[ + { + "jid": "user1@myserver.com/tka", + "connection": "c2s", + "ip": "127.0.0.1", + "port": 42656, + "priority": 8, + "node": "ejabberd@localhost", + "uptime": 231, + "status": "dnd", + "resource": "tka", + "statustext": "" + } +] +~~~ + + + + +## connected_users_number + + +Get the number of established sessions + +__Arguments:__ + + +__Result:__ + +- *num_sessions* :: integer + +__Tags:__ +[session](admin-tags.md#session), [statistics](admin-tags.md#statistics) + +__Examples:__ + + +~~~ json +POST /api/connected_users_number +{ + +} + +HTTP/1.1 200 OK +{"num_sessions": 2} +~~~ + + + + +## connected_users_vhost + + +Get the list of established sessions in a vhost + +__Arguments:__ + +- *host* :: string : Server name + +__Result:__ + +- *connected_users_vhost* :: [sessions::string] + +__Tags:__ +[session](admin-tags.md#session) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/connected_users_vhost +{ + "host": "myexample.com" +} + +HTTP/1.1 200 OK +[ + "user1@myserver.com/tka", + "user2@localhost/tka" +] +~~~ + + + + +## convert_to_scram + + +Convert the passwords of users to SCRAM + +__Arguments:__ + +- *host* :: string : Vhost which users' passwords will be scrammed + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[sql](admin-tags.md#sql) + +__Examples:__ + + +~~~ json +POST /api/convert_to_scram +{ + "host": "example.com" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## convert_to_yaml + + +Convert the input file from Erlang to YAML format + +__Arguments:__ + +- *in* :: string : Full path to the original configuration file +- *out* :: string : And full path to final file + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[config](admin-tags.md#config) + +__Examples:__ + + +~~~ json +POST /api/convert_to_yaml +{ + "in": "/etc/ejabberd/ejabberd.cfg", + "out": "/etc/ejabberd/ejabberd.yml" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## create_room + + +Create a MUC room name@service in host + +__Arguments:__ + +- *name* :: string : Room name +- *service* :: string : MUC service +- *host* :: string : Server host + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[muc_room](admin-tags.md#muc_room) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/create_room +{ + "name": "room1", + "service": "muc.example.com", + "host": "example.com" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## create_room_with_opts + + +Create a MUC room name@service in host with given options + + +The syntax of `affiliations` is: `Type:JID,Type:JID`. The syntax of `subscribers` is: `JID:Nick:Node:Node2:Node3,JID:Nick:Node`. + +__Arguments:__ + +- *name* :: string : Room name +- *service* :: string : MUC service +- *host* :: string : Server host +- *options* :: [{name::string, value::string}] : List of options + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[muc_room](admin-tags.md#muc_room), [muc_sub](admin-tags.md#muc_sub) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/create_room_with_opts +{ + "name": "room1", + "service": "muc.example.com", + "host": "localhost", + "options": [ + { + "name": "members_only", + "value": "true" + }, + { + "name": "affiliations", + "value": "owner:bob@example.com,member:peter@example.com" + }, + { + "name": "subscribers", + "value": "bob@example.com:Bob:messages:subject,anne@example.com:Anne:messages" + } + ] +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## create_rooms_file + + +Create the rooms indicated in file + + +Provide one room JID per line. Rooms will be created after restart. + +__Arguments:__ + +- *file* :: string : Path to the text file with one room JID per line + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[muc](admin-tags.md#muc) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/create_rooms_file +{ + "file": "/home/ejabberd/rooms.txt" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## delete_expired_messages + + +Delete expired offline messages from database + +__Arguments:__ + + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[purge](admin-tags.md#purge) + +__Examples:__ + + +~~~ json +POST /api/delete_expired_messages +{ + +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## delete_expired_pubsub_items + + + +Delete expired PubSub items + +__Arguments:__ + + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[purge](admin-tags.md#purge) + +__Module:__ +[mod_pubsub](modules.md#mod_pubsub) + +__Examples:__ + + +~~~ json +POST /api/delete_expired_pubsub_items +{ + +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## delete_mnesia + + +Delete elements in Mnesia database for a given vhost + +__Arguments:__ + +- *host* :: string : Vhost which content will be deleted in Mnesia database + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[mnesia](admin-tags.md#mnesia) + +__Examples:__ + + +~~~ json +POST /api/delete_mnesia +{ + "host": "example.com" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## delete_old_mam_messages + + +Delete MAM messages older than DAYS + + +Valid message TYPEs: `chat`, `groupchat`, `all`. + +__Arguments:__ + +- *type* :: string : Type of messages to delete (`chat`, `groupchat`, `all`) +- *days* :: integer : Days to keep messages + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[purge](admin-tags.md#purge) + +__Module:__ +[mod_mam](modules.md#mod_mam) + +__Examples:__ + + +~~~ json +POST /api/delete_old_mam_messages +{ + "type": "all", + "days": 31 +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## delete_old_mam_messages_batch + + + +Delete MAM messages older than DAYS + + +Valid message TYPEs: `chat`, `groupchat`, `all`. + +__Arguments:__ + +- *host* :: string : Name of host where messages should be deleted +- *type* :: string : Type of messages to delete (`chat`, `groupchat`, `all`) +- *days* :: integer : Days to keep messages +- *batch_size* :: integer : Number of messages to delete per batch +- *rate* :: integer : Desired rate of messages to delete per minute + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[purge](admin-tags.md#purge) + +__Module:__ +[mod_mam](modules.md#mod_mam) + +__Examples:__ + + +~~~ json +POST /api/delete_old_mam_messages_batch +{ + "host": "localhost", + "type": "all", + "days": 31, + "batch_size": 1000, + "rate": 10000 +} + +HTTP/1.1 200 OK +"Removal of 5000 messages in progress" +~~~ + + + + +## delete_old_mam_messages_status + + + +Status of delete old MAM messages operation + +__Arguments:__ + +- *host* :: string : Name of host where messages should be deleted + +__Result:__ + +- *status* :: string : Status test + +__Tags:__ +[purge](admin-tags.md#purge) + +__Module:__ +[mod_mam](modules.md#mod_mam) + +__Examples:__ + + +~~~ json +POST /api/delete_old_mam_messages_status +{ + "host": "localhost" +} + +HTTP/1.1 200 OK +{"status": "Operation in progress, delete 5000 messages"} +~~~ + + + + +## delete_old_messages + + +Delete offline messages older than DAYS + +__Arguments:__ + +- *days* :: integer : Number of days + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[purge](admin-tags.md#purge) + +__Examples:__ + + +~~~ json +POST /api/delete_old_messages +{ + "days": 31 +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## delete_old_messages_batch + + + +Delete offline messages older than DAYS + +__Arguments:__ + +- *host* :: string : Name of host where messages should be deleted +- *days* :: integer : Days to keep messages +- *batch_size* :: integer : Number of messages to delete per batch +- *rate* :: integer : Desired rate of messages to delete per minute + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[purge](admin-tags.md#purge) + +__Examples:__ + + +~~~ json +POST /api/delete_old_messages_batch +{ + "host": "localhost", + "days": 31, + "batch_size": 1000, + "rate": 10000 +} + +HTTP/1.1 200 OK +"Removal of 5000 messages in progress" +~~~ + + + + +## delete_old_messages_status + + + +Status of delete old offline messages operation + +__Arguments:__ + +- *host* :: string : Name of host where messages should be deleted + +__Result:__ + +- *status* :: string : Status test + +__Tags:__ +[purge](admin-tags.md#purge) + +__Examples:__ + + +~~~ json +POST /api/delete_old_messages_status +{ + "host": "localhost" +} + +HTTP/1.1 200 OK +{"status": "Operation in progress, delete 5000 messages"} +~~~ + + + + +## delete_old_pubsub_items + + + +Keep only NUMBER of PubSub items per node + +__Arguments:__ + +- *number* :: integer : Number of items to keep per node + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[purge](admin-tags.md#purge) + +__Module:__ +[mod_pubsub](modules.md#mod_pubsub) + +__Examples:__ + + +~~~ json +POST /api/delete_old_pubsub_items +{ + "number": 1000 +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## delete_old_push_sessions + + +Remove push sessions older than DAYS + +__Arguments:__ + +- *days* :: integer + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[purge](admin-tags.md#purge) + +__Module:__ +[mod_push](modules.md#mod_push) + +__Examples:__ + + +~~~ json +POST /api/delete_old_push_sessions +{ + "days": 1 +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## delete_old_users + + +Delete users that didn't log in last days, or that never logged + + +To protect admin accounts, configure this for example: +``` yaml +access_rules: + protect_old_users: + - allow: admin + - deny: all +``` + + +__Arguments:__ + +- *days* :: integer : Last login age in days of accounts that should be removed + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[accounts](admin-tags.md#accounts), [purge](admin-tags.md#purge) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/delete_old_users +{ + "days": 30 +} + +HTTP/1.1 200 OK +"Deleted 2 users: ["oldman@myserver.com", "test@myserver.com"]" +~~~ + + + + +## delete_old_users_vhost + + +Delete users that didn't log in last days in vhost, or that never logged + + +To protect admin accounts, configure this for example: +``` yaml +access_rules: + delete_old_users: + - deny: admin + - allow: all +``` + + +__Arguments:__ + +- *host* :: string : Server name +- *days* :: integer : Last login age in days of accounts that should be removed + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[accounts](admin-tags.md#accounts), [purge](admin-tags.md#purge) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/delete_old_users_vhost +{ + "host": "myserver.com", + "days": 30 +} + +HTTP/1.1 200 OK +"Deleted 2 users: ["oldman@myserver.com", "test@myserver.com"]" +~~~ + + + + +## delete_rosteritem + + +Delete an item from a user's roster (supports ODBC) + +__Arguments:__ + +- *localuser* :: string : User name +- *localhost* :: string : Server name +- *user* :: string : Contact user name +- *host* :: string : Contact server name + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[roster](admin-tags.md#roster) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/delete_rosteritem +{ + "localuser": "user1", + "localhost": "myserver.com", + "user": "user2", + "host": "myserver.com" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## destroy_room + + +Destroy a MUC room + +__Arguments:__ + +- *name* :: string : Room name +- *service* :: string : MUC service + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[muc_room](admin-tags.md#muc_room) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/destroy_room +{ + "name": "room1", + "service": "muc.example.com" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## destroy_rooms_file + + +Destroy the rooms indicated in file + + +Provide one room JID per line. + +__Arguments:__ + +- *file* :: string : Path to the text file with one room JID per line + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[muc](admin-tags.md#muc) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/destroy_rooms_file +{ + "file": "/home/ejabberd/rooms.txt" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## dump + + +Dump the Mnesia database to a text file + +__Arguments:__ + +- *file* :: string : Full path for the text file + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[mnesia](admin-tags.md#mnesia) + +__Examples:__ + + +~~~ json +POST /api/dump +{ + "file": "/var/lib/ejabberd/database.txt" +} + +HTTP/1.1 200 OK +"Success" +~~~ + + + + +## dump_config + + +Dump configuration in YAML format as seen by ejabberd + +__Arguments:__ + +- *out* :: string : Full path to output file + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[config](admin-tags.md#config) + +__Examples:__ + + +~~~ json +POST /api/dump_config +{ + "out": "/tmp/ejabberd.yml" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## dump_table + + +Dump a Mnesia table to a text file + +__Arguments:__ + +- *file* :: string : Full path for the text file +- *table* :: string : Table name + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[mnesia](admin-tags.md#mnesia) + +__Examples:__ + + +~~~ json +POST /api/dump_table +{ + "file": "/var/lib/ejabberd/table-muc-registered.txt", + "table": "muc_registered" +} + +HTTP/1.1 200 OK +"Success" +~~~ + + + + +## export2sql + + +Export virtual host information from Mnesia tables to SQL file + + +Configure the modules to use SQL, then call this command. After correctly exported the database of a vhost, you may want to delete from mnesia with the [delete_mnesia](#delete_mnesia) API. + +__Arguments:__ + +- *host* :: string : Vhost +- *file* :: string : Full path to the destination SQL file + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[mnesia](admin-tags.md#mnesia) + +__Examples:__ + + +~~~ json +POST /api/export2sql +{ + "host": "example.com", + "file": "/var/lib/ejabberd/example.com.sql" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## export_piefxis + + +Export data of all users in the server to PIEFXIS files (XEP-0227) + +__Arguments:__ + +- *dir* :: string : Full path to a directory + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[mnesia](admin-tags.md#mnesia) + +__Examples:__ + + +~~~ json +POST /api/export_piefxis +{ + "dir": "/var/lib/ejabberd/" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## export_piefxis_host + + +Export data of users in a host to PIEFXIS files (XEP-0227) + +__Arguments:__ + +- *dir* :: string : Full path to a directory +- *host* :: string : Vhost to export + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[mnesia](admin-tags.md#mnesia) + +__Examples:__ + + +~~~ json +POST /api/export_piefxis_host +{ + "dir": "/var/lib/ejabberd/", + "host": "example.com" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## gc + + + +Force full garbage collection + +__Arguments:__ + + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[server](admin-tags.md#server) + +__Examples:__ + + +~~~ json +POST /api/gc +{ + +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## gen_html_doc_for_commands + + +Generates html documentation for ejabberd_commands + +__Arguments:__ + +- *file* :: string : Path to file where generated documentation should be stored +- *regexp* :: string : Regexp matching names of commands or modules that will be included inside generated document +- *examples* :: string : Comma separated list of languages (chosen from `java`, `perl`, `xmlrpc`, `json`) that will have example invocation include in markdown document + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[documentation](admin-tags.md#documentation) + +__Examples:__ + + +~~~ json +POST /api/gen_html_doc_for_commands +{ + "file": "/home/me/docs/api.html", + "regexp": "mod_admin", + "examples": "java,json" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## gen_markdown_doc_for_commands + + +Generates markdown documentation for ejabberd_commands + +__Arguments:__ + +- *file* :: string : Path to file where generated documentation should be stored +- *regexp* :: string : Regexp matching names of commands or modules that will be included inside generated document, or `runtime` to get commands registered at runtime +- *examples* :: string : Comma separated list of languages (chosen from `java`, `perl`, `xmlrpc`, `json`) that will have example invocation include in markdown document + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[documentation](admin-tags.md#documentation) + +__Examples:__ + + +~~~ json +POST /api/gen_markdown_doc_for_commands +{ + "file": "/home/me/docs/api.html", + "regexp": "mod_admin", + "examples": "java,json" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## gen_markdown_doc_for_tags + + + +Generates markdown documentation for ejabberd_commands + +__Arguments:__ + +- *file* :: string : Path to file where generated documentation should be stored + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[documentation](admin-tags.md#documentation) + +__Examples:__ + + +~~~ json +POST /api/gen_markdown_doc_for_tags +{ + "file": "/home/me/docs/tags.md" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## get_cookie + + +Get the Erlang cookie of this node + +__Arguments:__ + + +__Result:__ + +- *cookie* :: string : Erlang cookie used for authentication by ejabberd + +__Tags:__ +[erlang](admin-tags.md#erlang) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/get_cookie +{ + +} + +HTTP/1.1 200 OK +{"cookie": "MWTAVMODFELNLSMYXPPD"} +~~~ + + + + +## get_last + + +Get last activity information + + +Timestamp is UTC and [XEP-0082](https://xmpp.org/extensions/xep-0082.html) format, for example: `2017-02-23T22:25:28.063062Z ONLINE` + +__Arguments:__ + +- *user* :: string : User name +- *host* :: string : Server name + +__Result:__ + +- *last_activity* :: {timestamp::string, status::string} : Last activity timestamp and status + +__Tags:__ +[last](admin-tags.md#last) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/get_last +{ + "user": "user1", + "host": "myserver.com" +} + +HTTP/1.1 200 OK +{ + "timestamp": "2017-06-30T14:32:16.060684Z", + "status": "ONLINE" +} +~~~ + + + + +## get_loglevel + + +Get the current loglevel + +__Arguments:__ + + +__Result:__ + +- *levelatom* :: string : Tuple with the log level number, its keyword and description + +__Tags:__ +[logs](admin-tags.md#logs) + +__Examples:__ + + +~~~ json +POST /api/get_loglevel +{ + +} + +HTTP/1.1 200 OK +{"levelatom": "warning"} +~~~ + + + + +## get_offline_count + + +Get the number of unread offline messages + +__Arguments:__ + +- *user* :: string +- *host* :: string + +__Result:__ + +- *value* :: integer : Number + +__Tags:__ +[offline](admin-tags.md#offline) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/get_offline_count +{ + "user": "aaaaa", + "host": "bbbbb" +} + +HTTP/1.1 200 OK +{"value": 5} +~~~ + + + + +## get_presence + + +Retrieve the resource with highest priority, and its presence (show and status message) for a given user. + + +The `jid` value contains the user JID with resource. + +The `show` value contains the user presence flag. It can take limited values: + + - `available` + - `chat` (Free for chat) + - `away` + - `dnd` (Do not disturb) + - `xa` (Not available, extended away) + - `unavailable` (Not connected) + +`status` is a free text defined by the user client. + +__Arguments:__ + +- *user* :: string : User name +- *host* :: string : Server name + +__Result:__ + +- *presence* :: {jid::string, show::string, status::string} + +__Tags:__ +[session](admin-tags.md#session) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/get_presence +{ + "user": "peter", + "host": "myexample.com" +} + +HTTP/1.1 200 OK +{ + "jid": "user1@myserver.com/tka", + "show": "dnd", + "status": "Busy" +} +~~~ + + + + +## get_room_affiliation + + +Get affiliation of a user in MUC room + +__Arguments:__ + +- *name* :: string : Room name +- *service* :: string : MUC service +- *jid* :: string : User JID + +__Result:__ + +- *affiliation* :: string : Affiliation of the user + +__Tags:__ +[muc_room](admin-tags.md#muc_room) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/get_room_affiliation +{ + "name": "room1", + "service": "muc.example.com", + "jid": "user1@example.com" +} + +HTTP/1.1 200 OK +{"affiliation": "member"} +~~~ + + + + +## get_room_affiliations + + +Get the list of affiliations of a MUC room + +__Arguments:__ + +- *name* :: string : Room name +- *service* :: string : MUC service + +__Result:__ + +- *affiliations* :: [{username::string, domain::string, affiliation::string, reason::string}] : The list of affiliations with username, domain, affiliation and reason + +__Tags:__ +[muc_room](admin-tags.md#muc_room) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/get_room_affiliations +{ + "name": "room1", + "service": "muc.example.com" +} + +HTTP/1.1 200 OK +[ + { + "username": "user1", + "domain": "example.com", + "affiliation": "member", + "reason": "member" + } +] +~~~ + + + + +## get_room_history + + + +Get history of messages stored inside MUC room state + +__Arguments:__ + +- *name* :: string : Room name +- *service* :: string : MUC service + +__Result:__ + +- *history* :: [{timestamp::string, message::string}] + +__Tags:__ +[muc_room](admin-tags.md#muc_room) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/get_room_history +{ + "name": "room1", + "service": "muc.example.com" +} + +HTTP/1.1 200 OK +[ + { + "timestamp": "aaaaa", + "message": "bbbbb" + }, + { + "timestamp": "ccccc", + "message": "ddddd" + } +] +~~~ + + + + +## get_room_occupants + + +Get the list of occupants of a MUC room + +__Arguments:__ + +- *name* :: string : Room name +- *service* :: string : MUC service + +__Result:__ + +- *occupants* :: [{jid::string, nick::string, role::string}] : The list of occupants with JID, nick and affiliation + +__Tags:__ +[muc_room](admin-tags.md#muc_room) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/get_room_occupants +{ + "name": "room1", + "service": "muc.example.com" +} + +HTTP/1.1 200 OK +[ + { + "jid": "user1@example.com/psi", + "nick": "User 1", + "role": "owner" + } +] +~~~ + + + + +## get_room_occupants_number + + +Get the number of occupants of a MUC room + +__Arguments:__ + +- *name* :: string : Room name +- *service* :: string : MUC service + +__Result:__ + +- *occupants* :: integer : Number of room occupants + +__Tags:__ +[muc_room](admin-tags.md#muc_room) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/get_room_occupants_number +{ + "name": "room1", + "service": "muc.example.com" +} + +HTTP/1.1 200 OK +{"occupants": 7} +~~~ + + + + +## get_room_options + + +Get options from a MUC room + +__Arguments:__ + +- *name* :: string : Room name +- *service* :: string : MUC service + +__Result:__ + +- *options* :: [{name::string, value::string}] : List of room options tuples with name and value + +__Tags:__ +[muc_room](admin-tags.md#muc_room) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/get_room_options +{ + "name": "room1", + "service": "muc.example.com" +} + +HTTP/1.1 200 OK +[ + { + "name": "members_only", + "value": "true" + } +] +~~~ + + + + +## get_roster + + + +Get list of contacts in a local user roster + + +`subscription` can be: `none`, `from`, `to`, `both`. + +`pending` can be: `in`, `out`, `none`. + +__Arguments:__ + +- *user* :: string +- *host* :: string + +__Result:__ + +- *contacts* :: [{jid::string, nick::string, subscription::string, pending::string, groups::[group::string]}] + +__Tags:__ +[roster](admin-tags.md#roster) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/get_roster +{ + "user": "aaaaa", + "host": "bbbbb" +} + +HTTP/1.1 200 OK +[ + { + "jid": "aaaaa", + "nick": "bbbbb", + "subscription": "ccccc", + "pending": "ddddd", + "groups": [ + "eeeee", + "fffff" + ] + }, + { + "jid": "ggggg", + "nick": "hhhhh", + "subscription": "iiiii", + "pending": "jjjjj", + "groups": [ + "kkkkk", + "lllll" + ] + } +] +~~~ + + + + +## get_subscribers + + +List subscribers of a MUC conference + +__Arguments:__ + +- *name* :: string : Room name +- *service* :: string : MUC service + +__Result:__ + +- *subscribers* :: [jid::string] : The list of users that are subscribed to that room + +__Tags:__ +[muc_room](admin-tags.md#muc_room), [muc_sub](admin-tags.md#muc_sub) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/get_subscribers +{ + "name": "room1", + "service": "muc.example.com" +} + +HTTP/1.1 200 OK +[ + "user2@example.com", + "user3@example.com" +] +~~~ + + + + +## get_user_rooms + + +Get the list of rooms where this user is occupant + +__Arguments:__ + +- *user* :: string : Username +- *host* :: string : Server host + +__Result:__ + +- *rooms* :: [room::string] + +__Tags:__ +[muc](admin-tags.md#muc) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/get_user_rooms +{ + "user": "tom", + "host": "example.com" +} + +HTTP/1.1 200 OK +[ + "room1@muc.example.com", + "room2@muc.example.com" +] +~~~ + + + + +## get_user_subscriptions + + + +Get the list of rooms where this user is subscribed + +__Arguments:__ + +- *user* :: string : Username +- *host* :: string : Server host + +__Result:__ + +- *rooms* :: [{roomjid::string, usernick::string, nodes::[node::string]}] + +__Tags:__ +[muc](admin-tags.md#muc), [muc_sub](admin-tags.md#muc_sub) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/get_user_subscriptions +{ + "user": "tom", + "host": "example.com" +} + +HTTP/1.1 200 OK +[ + { + "roomjid": "room1@muc.example.com", + "usernick": "Tommy", + "nodes": [ + "mucsub:config" + ] + } +] +~~~ + + + + +## get_vcard + + +Get content from a vCard field + + +Some vcard field names in `get`/`set_vcard` are: + +* FN - Full Name +* NICKNAME - Nickname +* BDAY - Birthday +* TITLE - Work: Position +* ROLE - Work: Role + +For a full list of vCard fields check [XEP-0054: vcard-temp](https://xmpp.org/extensions/xep-0054.html) + +__Arguments:__ + +- *user* :: string : User name +- *host* :: string : Server name +- *name* :: string : Field name + +__Result:__ + +- *content* :: string : Field content + +__Tags:__ +[vcard](admin-tags.md#vcard) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/get_vcard +{ + "user": "user1", + "host": "myserver.com", + "name": "NICKNAME" +} + +HTTP/1.1 200 OK +{"content": "User 1"} +~~~ + + + + +## get_vcard2 + + +Get content from a vCard subfield + + +Some vcard field names and subnames in `get`/`set_vcard2` are: + +* N FAMILY - Family name +* N GIVEN - Given name +* N MIDDLE - Middle name +* ADR CTRY - Address: Country +* ADR LOCALITY - Address: City +* TEL HOME - Telephone: Home +* TEL CELL - Telephone: Cellphone +* TEL WORK - Telephone: Work +* TEL VOICE - Telephone: Voice +* EMAIL USERID - E-Mail Address +* ORG ORGNAME - Work: Company +* ORG ORGUNIT - Work: Department + +For a full list of vCard fields check [XEP-0054: vcard-temp](https://xmpp.org/extensions/xep-0054.html) + +__Arguments:__ + +- *user* :: string : User name +- *host* :: string : Server name +- *name* :: string : Field name +- *subname* :: string : Subfield name + +__Result:__ + +- *content* :: string : Field content + +__Tags:__ +[vcard](admin-tags.md#vcard) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/get_vcard2 +{ + "user": "user1", + "host": "myserver.com", + "name": "N", + "subname": "FAMILY" +} + +HTTP/1.1 200 OK +{"content": "Schubert"} +~~~ + + + + +## get_vcard2_multi + + +Get multiple contents from a vCard field + + +Some vcard field names and subnames in `get`/`set_vcard2` are: + +* N FAMILY - Family name +* N GIVEN - Given name +* N MIDDLE - Middle name +* ADR CTRY - Address: Country +* ADR LOCALITY - Address: City +* TEL HOME - Telephone: Home +* TEL CELL - Telephone: Cellphone +* TEL WORK - Telephone: Work +* TEL VOICE - Telephone: Voice +* EMAIL USERID - E-Mail Address +* ORG ORGNAME - Work: Company +* ORG ORGUNIT - Work: Department + +For a full list of vCard fields check [XEP-0054: vcard-temp](https://xmpp.org/extensions/xep-0054.html) + +__Arguments:__ + +- *user* :: string +- *host* :: string +- *name* :: string +- *subname* :: string + +__Result:__ + +- *contents* :: [value::string] + +__Tags:__ +[vcard](admin-tags.md#vcard) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/get_vcard2_multi +{ + "user": "aaaaa", + "host": "bbbbb", + "name": "ccccc", + "subname": "ddddd" +} + +HTTP/1.1 200 OK +[ + "aaaaa", + "bbbbb" +] +~~~ + + + + +## halt + + + +Halt ejabberd abruptly with status code 1 + +__Arguments:__ + + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[server](admin-tags.md#server) + +__Examples:__ + + +~~~ json +POST /api/halt +{ + +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## help + + +Get list of commands, or help of a command (only ejabberdctl) + + +This command is exclusive for the ejabberdctl command-line script, don't attempt to execute it using any other API frontend. + +__Arguments:__ + + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[ejabberdctl](admin-tags.md#ejabberdctl) + +__Examples:__ + + +~~~ json +POST /api/help +{ + +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## import_dir + + +Import users data from jabberd14 spool dir + +__Arguments:__ + +- *file* :: string : Full path to the jabberd14 spool directory + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[mnesia](admin-tags.md#mnesia) + +__Examples:__ + + +~~~ json +POST /api/import_dir +{ + "file": "/var/lib/ejabberd/jabberd14/" +} + +HTTP/1.1 200 OK +"Success" +~~~ + + + + +## import_file + + +Import user data from jabberd14 spool file + +__Arguments:__ + +- *file* :: string : Full path to the jabberd14 spool file + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[mnesia](admin-tags.md#mnesia) + +__Examples:__ + + +~~~ json +POST /api/import_file +{ + "file": "/var/lib/ejabberd/jabberd14.spool" +} + +HTTP/1.1 200 OK +"Success" +~~~ + + + + +## import_piefxis + + +Import users data from a PIEFXIS file (XEP-0227) + +__Arguments:__ + +- *file* :: string : Full path to the PIEFXIS file + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[mnesia](admin-tags.md#mnesia) + +__Examples:__ + + +~~~ json +POST /api/import_piefxis +{ + "file": "/var/lib/ejabberd/example.com.xml" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## import_prosody + + +Import data from Prosody + + +Note: this requires ejabberd to be compiled with `./configure --enable-lua` (which installs the `luerl` library). + +__Arguments:__ + +- *dir* :: string : Full path to the Prosody data directory + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[mnesia](admin-tags.md#mnesia), [sql](admin-tags.md#sql) + +__Examples:__ + + +~~~ json +POST /api/import_prosody +{ + "dir": "/var/lib/prosody/datadump/" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## incoming_s2s_number + + +Number of incoming s2s connections on the node + +__Arguments:__ + + +__Result:__ + +- *s2s_incoming* :: integer + +__Tags:__ +[statistics](admin-tags.md#statistics), [s2s](admin-tags.md#s2s) + +__Examples:__ + + +~~~ json +POST /api/incoming_s2s_number +{ + +} + +HTTP/1.1 200 OK +{"s2s_incoming": 1} +~~~ + + + + +## install_fallback + + +Install Mnesia database from a binary backup file + + +The binary backup file is installed as fallback: it will be used to restore the database at the next ejabberd start. This means that, after running this command, you have to restart ejabberd. This command requires less memory than [restore](#restore) API. + +__Arguments:__ + +- *file* :: string : Full path to the fallback file + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[mnesia](admin-tags.md#mnesia) + +__Examples:__ + + +~~~ json +POST /api/install_fallback +{ + "file": "/var/lib/ejabberd/database.fallback" +} + +HTTP/1.1 200 OK +"Success" +~~~ + + + + +## join_cluster + + +Join this node into the cluster handled by Node + + +This command works only with ejabberdctl, not mod_http_api or other code that runs inside the same ejabberd node that will be joined. + +__Arguments:__ + +- *node* :: string : Nodename of the node to join + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[cluster](admin-tags.md#cluster) + +__Examples:__ + + +~~~ json +POST /api/join_cluster +{ + "node": "ejabberd1@machine7" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## kick_session + + +Kick a user session + +__Arguments:__ + +- *user* :: string : User name +- *host* :: string : Server name +- *resource* :: string : User's resource +- *reason* :: string : Reason for closing session + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[session](admin-tags.md#session) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/kick_session +{ + "user": "peter", + "host": "myserver.com", + "resource": "Psi", + "reason": "Stuck connection" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## kick_user + + +Disconnect user's active sessions + +__Arguments:__ + +- *user* :: string : User name +- *host* :: string : Server name + +__Result:__ + +- *num_resources* :: integer : Number of resources that were kicked + +__Tags:__ +[session](admin-tags.md#session) + +__Examples:__ + + +~~~ json +POST /api/kick_user +{ + "user": "user1", + "host": "example.com" +} + +HTTP/1.1 200 OK +{"num_resources": 3} +~~~ + + + + +## leave_cluster + + +Remove and shutdown Node from the running cluster + + +This command can be run from any running node of the cluster, even the node to be removed. In the removed node, this command works only when using ejabberdctl, not mod_http_api or other code that runs inside the same ejabberd node that will leave. + +__Arguments:__ + +- *node* :: string : Nodename of the node to kick from the cluster + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[cluster](admin-tags.md#cluster) + +__Examples:__ + + +~~~ json +POST /api/leave_cluster +{ + "node": "ejabberd1@machine8" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## list_certificates + + +Lists all ACME certificates + +__Arguments:__ + + +__Result:__ + +- *certificates* :: [{domain::string, file::string, used::string}] + +__Tags:__ +[acme](admin-tags.md#acme) + +__Examples:__ + + +~~~ json +POST /api/list_certificates +{ + +} + +HTTP/1.1 200 OK +[ + { + "domain": "aaaaa", + "file": "bbbbb", + "used": "ccccc" + }, + { + "domain": "ddddd", + "file": "eeeee", + "used": "fffff" + } +] +~~~ + + + + +## list_cluster + + +List nodes that are part of the cluster handled by Node + +__Arguments:__ + + +__Result:__ + +- *nodes* :: [node::string] + +__Tags:__ +[cluster](admin-tags.md#cluster) + +__Examples:__ + + +~~~ json +POST /api/list_cluster +{ + +} + +HTTP/1.1 200 OK +[ + "ejabberd1@machine7", + "ejabberd1@machine8" +] +~~~ + + + + +## load + + +Restore Mnesia database from a text dump file + + +Restore immediately. This is not recommended for big databases, as it will consume much time, memory and processor. In that case it's preferable to use [backup](#backup) API and [install_fallback](#install_fallback) API. + +__Arguments:__ + +- *file* :: string : Full path to the text file + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[mnesia](admin-tags.md#mnesia) + +__Examples:__ + + +~~~ json +POST /api/load +{ + "file": "/var/lib/ejabberd/database.txt" +} + +HTTP/1.1 200 OK +"Success" +~~~ + + + + +## man + + + +Generate Unix manpage for current ejabberd version + +__Arguments:__ + + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[documentation](admin-tags.md#documentation) + +__Examples:__ + + +~~~ json +POST /api/man +{ + +} + +HTTP/1.1 200 OK +"Success" +~~~ + + + + +## mnesia_change_nodename + + +Change the erlang node name in a backup file + +__Arguments:__ + +- *oldnodename* :: string : Name of the old erlang node +- *newnodename* :: string : Name of the new node +- *oldbackup* :: string : Path to old backup file +- *newbackup* :: string : Path to the new backup file + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[mnesia](admin-tags.md#mnesia) + +__Examples:__ + + +~~~ json +POST /api/mnesia_change_nodename +{ + "oldnodename": "ejabberd@machine1", + "newnodename": "ejabberd@machine2", + "oldbackup": "/var/lib/ejabberd/old.backup", + "newbackup": "/var/lib/ejabberd/new.backup" +} + +HTTP/1.1 200 OK +"Success" +~~~ + + + + +## mnesia_info + + +Dump info on global Mnesia state + +__Arguments:__ + + +__Result:__ + +- *res* :: string + +__Tags:__ +[mnesia](admin-tags.md#mnesia) + +__Examples:__ + + +~~~ json +POST /api/mnesia_info +{ + +} + +HTTP/1.1 200 OK +{"res": "aaaaa"} +~~~ + + + + +## mnesia_info_ctl ● + + + +Show information of Mnesia system (only ejabberdctl) + + +This command is exclusive for the ejabberdctl command-line script, don't attempt to execute it using any other API frontend. + +__Arguments:__ + + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[ejabberdctl](admin-tags.md#ejabberdctl), [mnesia](admin-tags.md#mnesia) + +__Examples:__ + + +~~~ json +POST /api/mnesia_info_ctl +{ + +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## mnesia_table_info + + +Dump info on Mnesia table state + +__Arguments:__ + +- *table* :: string : Mnesia table name + +__Result:__ + +- *res* :: string + +__Tags:__ +[mnesia](admin-tags.md#mnesia) + +__Examples:__ + + +~~~ json +POST /api/mnesia_table_info +{ + "table": "roster" +} + +HTTP/1.1 200 OK +{"res": "aaaaa"} +~~~ + + + + +## module_check + + +Check the contributed module repository compliance + +__Arguments:__ + +- *module* :: string : Module name + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[modules](admin-tags.md#modules) + +__Examples:__ + + +~~~ json +POST /api/module_check +{ + "module": "mod_rest" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## module_install + + +Compile, install and start an available contributed module + +__Arguments:__ + +- *module* :: string : Module name + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[modules](admin-tags.md#modules) + +__Examples:__ + + +~~~ json +POST /api/module_install +{ + "module": "mod_rest" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## module_uninstall + + +Uninstall a contributed module + +__Arguments:__ + +- *module* :: string : Module name + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[modules](admin-tags.md#modules) + +__Examples:__ + + +~~~ json +POST /api/module_uninstall +{ + "module": "mod_rest" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## module_upgrade + + +Upgrade the running code of an installed module + + +In practice, this uninstalls and installs the module + +__Arguments:__ + +- *module* :: string : Module name + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[modules](admin-tags.md#modules) + +__Examples:__ + + +~~~ json +POST /api/module_upgrade +{ + "module": "mod_rest" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## modules_available + + +List the contributed modules available to install + +__Arguments:__ + + +__Result:__ + +- *modules* :: [{name::string, summary::string}] : List of tuples with module name and description + +__Tags:__ +[modules](admin-tags.md#modules) + +__Examples:__ + + +~~~ json +POST /api/modules_available +{ + +} + +HTTP/1.1 200 OK +{ + "mod_cron": "Execute scheduled commands", + "mod_rest": "ReST frontend" +} +~~~ + + + + +## modules_installed + + +List the contributed modules already installed + +__Arguments:__ + + +__Result:__ + +- *modules* :: [{name::string, summary::string}] : List of tuples with module name and description + +__Tags:__ +[modules](admin-tags.md#modules) + +__Examples:__ + + +~~~ json +POST /api/modules_installed +{ + +} + +HTTP/1.1 200 OK +{ + "mod_cron": "Execute scheduled commands", + "mod_rest": "ReST frontend" +} +~~~ + + + + +## modules_update_specs + + +Update the module source code from Git + + +A connection to Internet is required + +__Arguments:__ + + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[modules](admin-tags.md#modules) + +__Examples:__ + + +~~~ json +POST /api/modules_update_specs +{ + +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## muc_online_rooms + + +List existing rooms + + +Ask for a specific host, or `global` to use all vhosts. + +__Arguments:__ + +- *service* :: string : MUC service, or `global` for all + +__Result:__ + +- *rooms* :: [room::string] : List of rooms + +__Tags:__ +[muc](admin-tags.md#muc) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/muc_online_rooms +{ + "service": "muc.example.com" +} + +HTTP/1.1 200 OK +[ + "room1@muc.example.com", + "room2@muc.example.com" +] +~~~ + + + + +## muc_online_rooms_by_regex + + +List existing rooms filtered by regexp + + +Ask for a specific host, or `global` to use all vhosts. + +__Arguments:__ + +- *service* :: string : MUC service, or `global` for all +- *regex* :: string : Regex pattern for room name + +__Result:__ + +- *rooms* :: [{jid::string, public::string, participants::integer}] : List of rooms with summary + +__Tags:__ +[muc](admin-tags.md#muc) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/muc_online_rooms_by_regex +{ + "service": "muc.example.com", + "regex": "^prefix" +} + +HTTP/1.1 200 OK +[ + { + "jid": "room1@muc.example.com", + "public": "true", + "participants": 10 + }, + { + "jid": "room2@muc.example.com", + "public": "false", + "participants": 10 + } +] +~~~ + + + + +## muc_register_nick + + +Register a nick to a User JID in a MUC service + +__Arguments:__ + +- *nick* :: string : Nick +- *jid* :: string : User JID +- *service* :: string : Service + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[muc](admin-tags.md#muc) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/muc_register_nick +{ + "nick": "Tim", + "jid": "tim@example.org", + "service": "muc.example.org" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## muc_unregister_nick + + +Unregister the nick registered by that account in the MUC service + +__Arguments:__ + +- *jid* :: string : User JID +- *service* :: string : MUC service + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[muc](admin-tags.md#muc) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/muc_unregister_nick +{ + "jid": "tim@example.org", + "service": "muc.example.org" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## num_resources + + +Get the number of resources of a user + +__Arguments:__ + +- *user* :: string : User name +- *host* :: string : Server name + +__Result:__ + +- *resources* :: integer : Number of active resources for a user + +__Tags:__ +[session](admin-tags.md#session) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/num_resources +{ + "user": "peter", + "host": "myserver.com" +} + +HTTP/1.1 200 OK +{"resources": 5} +~~~ + + + + +## oauth_add_client_implicit + + +Add [OAuth](../../developer/ejabberd-api/oauth.md) client_id with implicit grant type + +__Arguments:__ + +- *client_id* :: string +- *client_name* :: string +- *redirect_uri* :: string + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[oauth](admin-tags.md#oauth) + +__Examples:__ + + +~~~ json +POST /api/oauth_add_client_implicit +{ + "client_id": "aaaaa", + "client_name": "bbbbb", + "redirect_uri": "ccccc" +} + +HTTP/1.1 200 OK +"Success" +~~~ + + + + +## oauth_add_client_password + + +Add [OAuth](../../developer/ejabberd-api/oauth.md) client_id with password grant type + +__Arguments:__ + +- *client_id* :: string +- *client_name* :: string +- *secret* :: string + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[oauth](admin-tags.md#oauth) + +__Examples:__ + + +~~~ json +POST /api/oauth_add_client_password +{ + "client_id": "aaaaa", + "client_name": "bbbbb", + "secret": "ccccc" +} + +HTTP/1.1 200 OK +"Success" +~~~ + + + + +## oauth_issue_token ● + + + +Issue an [OAuth](../../developer/ejabberd-api/oauth.md) optionredir token for the given jid + +__Arguments:__ + +- *jid* :: string : Jid for which issue token +- *ttl* :: integer : Time to live of generated token in seconds +- *scopes* :: [scope::string] : List of scopes to allow + +__Result:__ + +- *result* :: {token::string, scopes::[scope::string], expires_in::string} + +__Tags:__ +[oauth](admin-tags.md#oauth), [v1](admin-tags.md#v1) + +__Examples:__ + + +~~~ json +POST /api/oauth_issue_token +{ + "jid": "user@server.com", + "ttl": 3600, + "scopes": [ + "connected_users_number", + "muc_online_rooms" + ] +} + +HTTP/1.1 200 OK +{ + "token": "aaaaa", + "scopes": [ + "bbbbb", + "ccccc" + ], + "expires_in": "ddddd" +} +~~~ + + + + +## oauth_list_tokens + + +List [OAuth](../../developer/ejabberd-api/oauth.md) tokens, user, scope, and seconds to expire (only Mnesia) + + +List OAuth tokens, their user and scope, and how many seconds remain until expirity + +__Arguments:__ + + +__Result:__ + +- *tokens* :: [{token::string, user::string, scope::string, expires_in::string}] + +__Tags:__ +[oauth](admin-tags.md#oauth) + +__Examples:__ + + +~~~ json +POST /api/oauth_list_tokens +{ + +} + +HTTP/1.1 200 OK +[ + { + "token": "aaaaa", + "user": "bbbbb", + "scope": "ccccc", + "expires_in": "ddddd" + }, + { + "token": "eeeee", + "user": "fffff", + "scope": "ggggg", + "expires_in": "hhhhh" + } +] +~~~ + + + + +## oauth_remove_client + + +Remove [OAuth](../../developer/ejabberd-api/oauth.md) client_id + +__Arguments:__ + +- *client_id* :: string + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[oauth](admin-tags.md#oauth) + +__Examples:__ + + +~~~ json +POST /api/oauth_remove_client +{ + "client_id": "aaaaa" +} + +HTTP/1.1 200 OK +"Success" +~~~ + + + + +## oauth_revoke_token + + + +Revoke authorization for an [OAuth](../../developer/ejabberd-api/oauth.md) token + +__Arguments:__ + +- *token* :: string + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[oauth](admin-tags.md#oauth) + +__Examples:__ + + +~~~ json +POST /api/oauth_revoke_token +{ + "token": "aaaaa" +} + +HTTP/1.1 200 OK +"Success" +~~~ + + + + +## outgoing_s2s_number + + +Number of outgoing s2s connections on the node + +__Arguments:__ + + +__Result:__ + +- *s2s_outgoing* :: integer + +__Tags:__ +[statistics](admin-tags.md#statistics), [s2s](admin-tags.md#s2s) + +__Examples:__ + + +~~~ json +POST /api/outgoing_s2s_number +{ + +} + +HTTP/1.1 200 OK +{"s2s_outgoing": 1} +~~~ + + + + +## print_sql_schema ● + + + +Print SQL schema for the given RDBMS (only ejabberdctl) + + +This command is exclusive for the ejabberdctl command-line script, don't attempt to execute it using any other API frontend. + +__Arguments:__ + +- *db_type* :: string : Database type: pgsql | mysql | sqlite +- *db_version* :: string : Your database version: 16.1, 8.2.0... +- *new_schema* :: string : Use new schema: 0, false, 1 or true + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[ejabberdctl](admin-tags.md#ejabberdctl), [sql](admin-tags.md#sql) + +__Examples:__ + + +~~~ json +POST /api/print_sql_schema +{ + "db_type": "pgsql", + "db_version": "16.1", + "new_schema": "true" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## privacy_set + + +Send a IQ set privacy stanza for a local account + +__Arguments:__ + +- *user* :: string : Username +- *host* :: string : Server name +- *xmlquery* :: string : Query XML element + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[stanza](admin-tags.md#stanza) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/privacy_set +{ + "user": "user1", + "host": "myserver.com", + "xmlquery": "..." +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## private_get + + +Get some information from a user private storage + +__Arguments:__ + +- *user* :: string : User name +- *host* :: string : Server name +- *element* :: string : Element name +- *ns* :: string : Namespace + +__Result:__ + +- *res* :: string + +__Tags:__ +[private](admin-tags.md#private) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/private_get +{ + "user": "user1", + "host": "myserver.com", + "element": "storage", + "ns": "storage:rosternotes" +} + +HTTP/1.1 200 OK +{"res": "aaaaa"} +~~~ + + + + +## private_set + + +Set to the user private storage + +__Arguments:__ + +- *user* :: string : User name +- *host* :: string : Server name +- *element* :: string : XML storage element + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[private](admin-tags.md#private) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/private_set +{ + "user": "user1", + "host": "myserver.com", + "element": "" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## process_rosteritems + + +List/delete rosteritems that match filter + + +Explanation of each argument: + +* `action`: what to do with each rosteritem that matches all the filtering options +* `subs`: subscription type +* `asks`: pending subscription +* `users`: the JIDs of the local user +* `contacts`: the JIDs of the contact in the roster + +**Mnesia backend:** + +Allowed values in the arguments: + +* `action` = `list` | `delete` +* `subs` = `any` | SUB[:SUB]* +* `asks` = `any` | ASK[:ASK]* +* `users` = `any` | JID[:JID]* +* `contacts` = `any` | JID[:JID]* + +where + +* SUB = `none` | `from `| `to` | `both` +* ASK = `none` | `out` | `in` +* JID = characters valid in a JID, and can use the globs: `*`, `?`, `!` and `[...]` + +This example will list roster items with subscription `none`, `from` or `to` that have any ask property, of local users which JID is in the virtual host `example.org` and that the contact JID is either a bare server name (without user part) or that has a user part and the server part contains the word `icq`: + `list none:from:to any *@example.org *:*@*icq*` + +**SQL backend:** + +Allowed values in the arguments: + +* `action` = `list` | `delete` +* `subs` = `any` | SUB +* `asks` = `any` | ASK +* `users` = JID +* `contacts` = JID + +where + +* SUB = `none` | `from` | `to` | `both` +* ASK = `none` | `out` | `in` +* JID = characters valid in a JID, and can use the globs: `_` and `%` + +This example will list roster items with subscription `to` that have any ask property, of local users which JID is in the virtual host `example.org` and that the contact JID's server part contains the word `icq`: + `list to any %@example.org %@%icq%` + +__Arguments:__ + +- *action* :: string +- *subs* :: string +- *asks* :: string +- *users* :: string +- *contacts* :: string + +__Result:__ + +- *response* :: [{user::string, contact::string}] + +__Tags:__ +[roster](admin-tags.md#roster) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/process_rosteritems +{ + "action": "aaaaa", + "subs": "bbbbb", + "asks": "ccccc", + "users": "ddddd", + "contacts": "eeeee" +} + +HTTP/1.1 200 OK +[ + { + "user": "aaaaa", + "contact": "bbbbb" + }, + { + "user": "ccccc", + "contact": "ddddd" + } +] +~~~ + + + + +## push_alltoall + + +Add all the users to all the users of Host in Group + +__Arguments:__ + +- *host* :: string : Server name +- *group* :: string : Group name + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[roster](admin-tags.md#roster) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/push_alltoall +{ + "host": "myserver.com", + "group": "Everybody" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## push_roster + + +Push template roster from file to a user + + +The text file must contain an erlang term: a list of tuples with username, servername, group and nick. For example: +`[{"user1", "localhost", "Workers", "User 1"}, + {"user2", "localhost", "Workers", "User 2"}].` + +If there are problems parsing UTF8 character encoding, provide the corresponding string with the `<<"STRING"/utf8>>` syntax, for example: +`[{"user2", "localhost", "Workers", <<"User 2"/utf8>>}]`. + +__Arguments:__ + +- *file* :: string : File path +- *user* :: string : User name +- *host* :: string : Server name + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[roster](admin-tags.md#roster) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/push_roster +{ + "file": "/home/ejabberd/roster.txt", + "user": "user1", + "host": "localhost" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## push_roster_all + + +Push template roster from file to all those users + + +The text file must contain an erlang term: a list of tuples with username, servername, group and nick. Example: +`[{"user1", "localhost", "Workers", "User 1"}, + {"user2", "localhost", "Workers", "User 2"}].` + +__Arguments:__ + +- *file* :: string : File path + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[roster](admin-tags.md#roster) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/push_roster_all +{ + "file": "/home/ejabberd/roster.txt" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## register + + +Register a user + +__Arguments:__ + +- *user* :: string : Username +- *host* :: string : Local vhost served by ejabberd +- *password* :: string : Password + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[accounts](admin-tags.md#accounts) + +__Examples:__ + + +~~~ json +POST /api/register +{ + "user": "bob", + "host": "example.com", + "password": "SomEPass44" +} + +HTTP/1.1 200 OK +"Success" +~~~ + + + + +## registered_users + + +List all registered users in HOST + +__Arguments:__ + +- *host* :: string : Local vhost + +__Result:__ + +- *users* :: [username::string] : List of registered accounts usernames + +__Tags:__ +[accounts](admin-tags.md#accounts) + +__Examples:__ + + +~~~ json +POST /api/registered_users +{ + "host": "example.com" +} + +HTTP/1.1 200 OK +[ + "user1", + "user2" +] +~~~ + + + + +## registered_vhosts + + +List all registered vhosts in SERVER + +__Arguments:__ + + +__Result:__ + +- *vhosts* :: [vhost::string] : List of available vhosts + +__Tags:__ +[server](admin-tags.md#server) + +__Examples:__ + + +~~~ json +POST /api/registered_vhosts +{ + +} + +HTTP/1.1 200 OK +[ + "example.com", + "anon.example.com" +] +~~~ + + + + +## reload_config + + +Reload config file in memory + +__Arguments:__ + + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[config](admin-tags.md#config) + +__Examples:__ + + +~~~ json +POST /api/reload_config +{ + +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## remove_mam_for_user + + +Remove mam archive for user + +__Arguments:__ + +- *user* :: string : Username +- *host* :: string : Server + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[mam](admin-tags.md#mam) + +__Module:__ +[mod_mam](modules.md#mod_mam) + +__Examples:__ + + +~~~ json +POST /api/remove_mam_for_user +{ + "user": "bob", + "host": "example.com" +} + +HTTP/1.1 200 OK +"MAM archive removed" +~~~ + + + + +## remove_mam_for_user_with_peer + + +Remove mam archive for user with peer + +__Arguments:__ + +- *user* :: string : Username +- *host* :: string : Server +- *with* :: string : Peer + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[mam](admin-tags.md#mam) + +__Module:__ +[mod_mam](modules.md#mod_mam) + +__Examples:__ + + +~~~ json +POST /api/remove_mam_for_user_with_peer +{ + "user": "bob", + "host": "example.com", + "with": "anne@example.com" +} + +HTTP/1.1 200 OK +"MAM archive removed" +~~~ + + + + +## reopen_log + + +Reopen maybe the log files after being renamed + + +Has no effect on ejabberd main log files, only on log files generated by some modules. +This can be useful when an external tool is used for log rotation. See [Log Files](../../admin/guide/troubleshooting.md#log-files). + +__Arguments:__ + + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[logs](admin-tags.md#logs) + +__Examples:__ + + +~~~ json +POST /api/reopen_log +{ + +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## request_certificate + + +Requests certificates for all or some domains + + +Domains can be `all`, or a list of domains separared with comma characters + +__Arguments:__ + +- *domains* :: string : Domains for which to acquire a certificate + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[acme](admin-tags.md#acme) + +__Examples:__ + + +~~~ json +POST /api/request_certificate +{ + "domains": "example.com,domain.tld,conference.domain.tld" +} + +HTTP/1.1 200 OK +"Success" +~~~ + + + + +## resource_num + + +Resource string of a session number + +__Arguments:__ + +- *user* :: string : User name +- *host* :: string : Server name +- *num* :: integer : ID of resource to return + +__Result:__ + +- *resource* :: string : Name of user resource + +__Tags:__ +[session](admin-tags.md#session) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/resource_num +{ + "user": "peter", + "host": "myserver.com", + "num": 2 +} + +HTTP/1.1 200 OK +{"resource": "Psi"} +~~~ + + + + +## restart + + +Restart ejabberd gracefully + +__Arguments:__ + + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[server](admin-tags.md#server) + +__Examples:__ + + +~~~ json +POST /api/restart +{ + +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## restart_module + + +Stop an ejabberd module, reload code and start + +__Arguments:__ + +- *host* :: string : Server name +- *module* :: string : Module to restart + +__Result:__ + +- *res* :: integer : Returns integer code: + - `0`: code reloaded, module restarted + - `1`: error: module not loaded + - `2`: code not reloaded, but module restarted + +__Tags:__ +[erlang](admin-tags.md#erlang) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/restart_module +{ + "host": "myserver.com", + "module": "mod_admin_extra" +} + +HTTP/1.1 200 OK +{"res": 0} +~~~ + + + + +## restore + + +Restore the Mnesia database from a binary backup file + + +This restores immediately from a binary backup file the internal Mnesia database. This will consume a lot of memory if you have a large database, you may prefer [install_fallback](#install_fallback) API. + +__Arguments:__ + +- *file* :: string : Full path to the backup file + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[mnesia](admin-tags.md#mnesia) + +__Examples:__ + + +~~~ json +POST /api/restore +{ + "file": "/var/lib/ejabberd/database.backup" +} + +HTTP/1.1 200 OK +"Success" +~~~ + + + + +## revoke_certificate + + +Revokes the selected ACME certificate + +__Arguments:__ + +- *file* :: string : Filename of the certificate + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[acme](admin-tags.md#acme) + +__Examples:__ + + +~~~ json +POST /api/revoke_certificate +{ + "file": "aaaaa" +} + +HTTP/1.1 200 OK +"Success" +~~~ + + + + +## rooms_empty_destroy + + +Destroy the rooms that have no messages in archive + + +The MUC service argument can be `global` to get all hosts. + +__Arguments:__ + +- *service* :: string : MUC service, or `global` for all + +__Result:__ + +- *rooms* :: [room::string] : List of empty rooms that have been destroyed + +__Tags:__ +[muc](admin-tags.md#muc) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/rooms_empty_destroy +{ + "service": "muc.example.com" +} + +HTTP/1.1 200 OK +[ + "room1@muc.example.com", + "room2@muc.example.com" +] +~~~ + + + + +## rooms_empty_list + + +List the rooms that have no messages in archive + + +The MUC service argument can be `global` to get all hosts. + +__Arguments:__ + +- *service* :: string : MUC service, or `global` for all + +__Result:__ + +- *rooms* :: [room::string] : List of empty rooms + +__Tags:__ +[muc](admin-tags.md#muc) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/rooms_empty_list +{ + "service": "muc.example.com" +} + +HTTP/1.1 200 OK +[ + "room1@muc.example.com", + "room2@muc.example.com" +] +~~~ + + + + +## rooms_unused_destroy + + +Destroy the rooms that are unused for many days in the service + + +The room recent history is used, so it's recommended to wait a few days after service start before running this. The MUC service argument can be `global` to get all hosts. + +__Arguments:__ + +- *service* :: string : MUC service, or `global` for all +- *days* :: integer : Number of days + +__Result:__ + +- *rooms* :: [room::string] : List of unused rooms that has been destroyed + +__Tags:__ +[muc](admin-tags.md#muc) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/rooms_unused_destroy +{ + "service": "muc.example.com", + "days": 31 +} + +HTTP/1.1 200 OK +[ + "room1@muc.example.com", + "room2@muc.example.com" +] +~~~ + + + + +## rooms_unused_list + + +List the rooms that are unused for many days in the service + + +The room recent history is used, so it's recommended to wait a few days after service start before running this. The MUC service argument can be `global` to get all hosts. + +__Arguments:__ + +- *service* :: string : MUC service, or `global` for all +- *days* :: integer : Number of days + +__Result:__ + +- *rooms* :: [room::string] : List of unused rooms + +__Tags:__ +[muc](admin-tags.md#muc) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/rooms_unused_list +{ + "service": "muc.example.com", + "days": 31 +} + +HTTP/1.1 200 OK +[ + "room1@muc.example.com", + "room2@muc.example.com" +] +~~~ + + + + +## rotate_log + + +Rotate maybe log file of some module + + +Has no effect on ejabberd main log files, only on log files generated by some modules. + +__Arguments:__ + + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[logs](admin-tags.md#logs) + +__Examples:__ + + +~~~ json +POST /api/rotate_log +{ + +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## send_direct_invitation ● + + + +Send a direct invitation to several destinations + + +Since ejabberd [20.12](../../archive/20.12/index.md), this command is asynchronous: the API call may return before the server has send all the invitations. + +`password` and `message` can be set to `none`. + +__Arguments:__ + +- *name* :: string : Room name +- *service* :: string : MUC service +- *password* :: string : Password, or `none` +- *reason* :: string : Reason text, or `none` +- *users* :: [jid::string] : List of users JIDs + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[muc_room](admin-tags.md#muc_room), [v1](admin-tags.md#v1) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/send_direct_invitation +{ + "name": "room1", + "service": "muc.example.com", + "password": "", + "reason": "Check this out!", + "users": [ + "user2@localhost", + "user3@example.com" + ] +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## send_message + + +Send a message to a local or remote bare of full JID + + +When sending a groupchat message to a MUC room, `from` must be the full JID of a room occupant, or the bare JID of a MUC service admin, or the bare JID of a MUC/Sub subscribed user. + +__Arguments:__ + +- *type* :: string : Message type: `normal`, `chat`, `headline`, `groupchat` +- *from* :: string : Sender JID +- *to* :: string : Receiver JID +- *subject* :: string : Subject, or empty string +- *body* :: string : Body + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[stanza](admin-tags.md#stanza) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/send_message +{ + "type": "headline", + "from": "admin@localhost", + "to": "user1@localhost", + "subject": "Restart", + "body": "In 5 minutes" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## send_stanza + + +Send a stanza; provide From JID and valid To JID + +__Arguments:__ + +- *from* :: string : Sender JID +- *to* :: string : Destination JID +- *stanza* :: string : Stanza + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[stanza](admin-tags.md#stanza) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/send_stanza +{ + "from": "admin@localhost", + "to": "user1@localhost", + "stanza": "" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## send_stanza_c2s + + +Send a stanza from an existing C2S session + + +`user`@`host`/`resource` must be an existing C2S session. As an alternative, use [send_stanza](#send_stanza) API instead. + +__Arguments:__ + +- *user* :: string : Username +- *host* :: string : Server name +- *resource* :: string : Resource +- *stanza* :: string : Stanza + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[stanza](admin-tags.md#stanza) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/send_stanza_c2s +{ + "user": "admin", + "host": "myserver.com", + "resource": "bot", + "stanza": "" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## set_last + + +Set last activity information + + +Timestamp is the seconds since `1970-01-01 00:00:00 UTC`. For example value see `date +%s` + +__Arguments:__ + +- *user* :: string : User name +- *host* :: string : Server name +- *timestamp* :: integer : Number of seconds since epoch +- *status* :: string : Status message + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[last](admin-tags.md#last) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/set_last +{ + "user": "user1", + "host": "myserver.com", + "timestamp": 1500045311, + "status": "GoSleeping" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## set_loglevel + + +Set the loglevel + + +Possible loglevels: `none`, `emergency`, `alert`, `critical`, + `error`, `warning`, `notice`, `info`, `debug`. + +__Arguments:__ + +- *loglevel* :: string : Desired logging level + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[logs](admin-tags.md#logs) + +__Examples:__ + + +~~~ json +POST /api/set_loglevel +{ + "loglevel": "debug" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## set_master + + +Set master node of the clustered Mnesia tables + + +If `nodename` is set to `self`, then this node will be set as its own master. + +__Arguments:__ + +- *nodename* :: string : Name of the erlang node that will be considered master of this node + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[cluster](admin-tags.md#cluster) + +__Examples:__ + + +~~~ json +POST /api/set_master +{ + "nodename": "ejabberd@machine7" +} + +HTTP/1.1 200 OK +"Success" +~~~ + + + + +## set_nickname + + +Set nickname in a user's vCard + +__Arguments:__ + +- *user* :: string : User name +- *host* :: string : Server name +- *nickname* :: string : Nickname + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[vcard](admin-tags.md#vcard) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/set_nickname +{ + "user": "user1", + "host": "myserver.com", + "nickname": "User 1" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## set_presence ● + + + +Set presence of a session + +__Arguments:__ + +- *user* :: string : User name +- *host* :: string : Server name +- *resource* :: string : Resource +- *type* :: string : Type: `available`, `error`, `probe`... +- *show* :: string : Show: `away`, `chat`, `dnd`, `xa`. +- *status* :: string : Status text +- *priority* :: integer : Priority, provide this value as an integer + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[session](admin-tags.md#session), [v1](admin-tags.md#v1) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/set_presence +{ + "user": "user1", + "host": "myserver.com", + "resource": "tka1", + "type": "available", + "show": "away", + "status": "BB", + "priority": 7 +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## set_room_affiliation + + +Change an affiliation in a MUC room + +__Arguments:__ + +- *name* :: string : Room name +- *service* :: string : MUC service +- *jid* :: string : User JID +- *affiliation* :: string : Affiliation to set + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[muc_room](admin-tags.md#muc_room) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/set_room_affiliation +{ + "name": "room1", + "service": "muc.example.com", + "jid": "user2@example.com", + "affiliation": "member" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## set_vcard + + +Set content in a vCard field + + +Some vcard field names in `get`/`set_vcard` are: + +* FN - Full Name +* NICKNAME - Nickname +* BDAY - Birthday +* TITLE - Work: Position +* ROLE - Work: Role + +For a full list of vCard fields check [XEP-0054: vcard-temp](https://xmpp.org/extensions/xep-0054.html) + +__Arguments:__ + +- *user* :: string : User name +- *host* :: string : Server name +- *name* :: string : Field name +- *content* :: string : Value + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[vcard](admin-tags.md#vcard) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/set_vcard +{ + "user": "user1", + "host": "myserver.com", + "name": "URL", + "content": "www.example.com" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## set_vcard2 + + +Set content in a vCard subfield + + +Some vcard field names and subnames in `get`/`set_vcard2` are: + +* N FAMILY - Family name +* N GIVEN - Given name +* N MIDDLE - Middle name +* ADR CTRY - Address: Country +* ADR LOCALITY - Address: City +* TEL HOME - Telephone: Home +* TEL CELL - Telephone: Cellphone +* TEL WORK - Telephone: Work +* TEL VOICE - Telephone: Voice +* EMAIL USERID - E-Mail Address +* ORG ORGNAME - Work: Company +* ORG ORGUNIT - Work: Department + +For a full list of vCard fields check [XEP-0054: vcard-temp](https://xmpp.org/extensions/xep-0054.html) + +__Arguments:__ + +- *user* :: string : User name +- *host* :: string : Server name +- *name* :: string : Field name +- *subname* :: string : Subfield name +- *content* :: string : Value + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[vcard](admin-tags.md#vcard) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/set_vcard2 +{ + "user": "user1", + "host": "myserver.com", + "name": "TEL", + "subname": "NUMBER", + "content": "123456" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## set_vcard2_multi + + +Set multiple contents in a vCard subfield + + +Some vcard field names and subnames in `get`/`set_vcard2` are: + +* N FAMILY - Family name +* N GIVEN - Given name +* N MIDDLE - Middle name +* ADR CTRY - Address: Country +* ADR LOCALITY - Address: City +* TEL HOME - Telephone: Home +* TEL CELL - Telephone: Cellphone +* TEL WORK - Telephone: Work +* TEL VOICE - Telephone: Voice +* EMAIL USERID - E-Mail Address +* ORG ORGNAME - Work: Company +* ORG ORGUNIT - Work: Department + +For a full list of vCard fields check [XEP-0054: vcard-temp](https://xmpp.org/extensions/xep-0054.html) + +__Arguments:__ + +- *user* :: string +- *host* :: string +- *name* :: string +- *subname* :: string +- *contents* :: [value::string] + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[vcard](admin-tags.md#vcard) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/set_vcard2_multi +{ + "user": "aaaaa", + "host": "bbbbb", + "name": "ccccc", + "subname": "ddddd", + "contents": [ + "eeeee", + "fffff" + ] +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## srg_create ● + + + +Create a Shared Roster Group + +__Arguments:__ + +- *group* :: string : Group identifier +- *host* :: string : Group server name +- *label* :: string : Group name +- *description* :: string : Group description +- *display* :: [group::string] : List of groups to display + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[shared_roster_group](admin-tags.md#shared_roster_group), [v1](admin-tags.md#v1) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/srg_create +{ + "group": "group3", + "host": "myserver.com", + "label": "Group3", + "description": "Third group", + "display": [ + "group1", + "group2" + ] +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## srg_delete + + +Delete a Shared Roster Group + +__Arguments:__ + +- *group* :: string : Group identifier +- *host* :: string : Group server name + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[shared_roster_group](admin-tags.md#shared_roster_group) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/srg_delete +{ + "group": "group3", + "host": "myserver.com" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## srg_get_info + + +Get info of a Shared Roster Group + +__Arguments:__ + +- *group* :: string : Group identifier +- *host* :: string : Group server name + +__Result:__ + +- *informations* :: [{key::string, value::string}] : List of group information, as key and value + +__Tags:__ +[shared_roster_group](admin-tags.md#shared_roster_group) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/srg_get_info +{ + "group": "group3", + "host": "myserver.com" +} + +HTTP/1.1 200 OK +[ + { + "key": "name", + "value": "Group 3" + }, + { + "key": "displayed_groups", + "value": "group1" + } +] +~~~ + + + + +## srg_get_members + + +Get members of a Shared Roster Group + +__Arguments:__ + +- *group* :: string : Group identifier +- *host* :: string : Group server name + +__Result:__ + +- *members* :: [member::string] : List of group identifiers + +__Tags:__ +[shared_roster_group](admin-tags.md#shared_roster_group) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/srg_get_members +{ + "group": "group3", + "host": "myserver.com" +} + +HTTP/1.1 200 OK +[ + "user1@localhost", + "user2@localhost" +] +~~~ + + + + +## srg_list + + +List the Shared Roster Groups in Host + +__Arguments:__ + +- *host* :: string : Server name + +__Result:__ + +- *groups* :: [id::string] : List of group identifiers + +__Tags:__ +[shared_roster_group](admin-tags.md#shared_roster_group) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/srg_list +{ + "host": "myserver.com" +} + +HTTP/1.1 200 OK +[ + "group1", + "group2" +] +~~~ + + + + +## srg_user_add + + +Add the JID user@host to the Shared Roster Group + +__Arguments:__ + +- *user* :: string : Username +- *host* :: string : User server name +- *group* :: string : Group identifier +- *grouphost* :: string : Group server name + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[shared_roster_group](admin-tags.md#shared_roster_group) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/srg_user_add +{ + "user": "user1", + "host": "myserver.com", + "group": "group3", + "grouphost": "myserver.com" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## srg_user_del + + +Delete this JID user@host from the Shared Roster Group + +__Arguments:__ + +- *user* :: string : Username +- *host* :: string : User server name +- *group* :: string : Group identifier +- *grouphost* :: string : Group server name + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[shared_roster_group](admin-tags.md#shared_roster_group) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/srg_user_del +{ + "user": "user1", + "host": "myserver.com", + "group": "group3", + "grouphost": "myserver.com" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## stats + + +Get some statistical value for the whole ejabberd server + + +Allowed statistics `name` are: `registeredusers`, `onlineusers`, `onlineusersnode`, `uptimeseconds`, `processes`. + +__Arguments:__ + +- *name* :: string : Statistic name + +__Result:__ + +- *stat* :: integer : Integer statistic value + +__Tags:__ +[statistics](admin-tags.md#statistics) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/stats +{ + "name": "registeredusers" +} + +HTTP/1.1 200 OK +{"stat": 6} +~~~ + + + + +## stats_host + + +Get some statistical value for this host + + +Allowed statistics `name` are: `registeredusers`, `onlineusers`. + +__Arguments:__ + +- *name* :: string : Statistic name +- *host* :: string : Server JID + +__Result:__ + +- *stat* :: integer : Integer statistic value + +__Tags:__ +[statistics](admin-tags.md#statistics) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/stats_host +{ + "name": "registeredusers", + "host": "example.com" +} + +HTTP/1.1 200 OK +{"stat": 6} +~~~ + + + + +## status + + +Get status of the ejabberd server + +__Arguments:__ + + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[server](admin-tags.md#server) + +__Examples:__ + + +~~~ json +POST /api/status +{ + +} + +HTTP/1.1 200 OK +"The node ejabberd@localhost is started with status: startedejabberd X.X is running in that node" +~~~ + + + + +## status_list + + +List of logged users with this status + +__Arguments:__ + +- *status* :: string : Status type to check + +__Result:__ + +- *users* :: [{user::string, host::string, resource::string, priority::integer, status::string}] + +__Tags:__ +[session](admin-tags.md#session) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/status_list +{ + "status": "dnd" +} + +HTTP/1.1 200 OK +[ + { + "user": "peter", + "host": "myserver.com", + "resource": "tka", + "priority": 6, + "status": "Busy" + } +] +~~~ + + + + +## status_list_host + + +List of users logged in host with their statuses + +__Arguments:__ + +- *host* :: string : Server name +- *status* :: string : Status type to check + +__Result:__ + +- *users* :: [{user::string, host::string, resource::string, priority::integer, status::string}] + +__Tags:__ +[session](admin-tags.md#session) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/status_list_host +{ + "host": "myserver.com", + "status": "dnd" +} + +HTTP/1.1 200 OK +[ + { + "user": "peter", + "host": "myserver.com", + "resource": "tka", + "priority": 6, + "status": "Busy" + } +] +~~~ + + + + +## status_num + + +Number of logged users with this status + +__Arguments:__ + +- *status* :: string : Status type to check + +__Result:__ + +- *users* :: integer : Number of connected sessions with given status type + +__Tags:__ +[session](admin-tags.md#session), [statistics](admin-tags.md#statistics) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/status_num +{ + "status": "dnd" +} + +HTTP/1.1 200 OK +{"users": 23} +~~~ + + + + +## status_num_host + + +Number of logged users with this status in host + +__Arguments:__ + +- *host* :: string : Server name +- *status* :: string : Status type to check + +__Result:__ + +- *users* :: integer : Number of connected sessions with given status type + +__Tags:__ +[session](admin-tags.md#session), [statistics](admin-tags.md#statistics) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/status_num_host +{ + "host": "myserver.com", + "status": "dnd" +} + +HTTP/1.1 200 OK +{"users": 23} +~~~ + + + + +## stop + + +Stop ejabberd gracefully + +__Arguments:__ + + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[server](admin-tags.md#server) + +__Examples:__ + + +~~~ json +POST /api/stop +{ + +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## stop_kindly + + +Inform users and rooms, wait, and stop the server + + +Provide the delay in seconds, and the announcement quoted, for example: +`ejabberdctl stop_kindly 60 \"The server will stop in one minute.\"` + +__Arguments:__ + +- *delay* :: integer : Seconds to wait +- *announcement* :: string : Announcement to send, with quotes + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[server](admin-tags.md#server) + +__Examples:__ + + +~~~ json +POST /api/stop_kindly +{ + "delay": 60, + "announcement": "Server will stop now." +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## stop_s2s_connections + + +Stop all s2s outgoing and incoming connections + +__Arguments:__ + + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[s2s](admin-tags.md#s2s) + +__Examples:__ + + +~~~ json +POST /api/stop_s2s_connections +{ + +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## subscribe_room ● + + + +Subscribe to a MUC conference + +__Arguments:__ + +- *user* :: string : User JID +- *nick* :: string : a user's nick +- *room* :: string : the room to subscribe +- *nodes* :: [node::string] : list of nodes + +__Result:__ + +- *nodes* :: [node::string] : The list of nodes that has subscribed + +__Tags:__ +[muc_room](admin-tags.md#muc_room), [muc_sub](admin-tags.md#muc_sub), [v1](admin-tags.md#v1) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/subscribe_room +{ + "user": "tom@localhost", + "nick": "Tom", + "room": "room1@conference.localhost", + "nodes": [ + "urn:xmpp:mucsub:nodes:messages", + "urn:xmpp:mucsub:nodes:affiliations" + ] +} + +HTTP/1.1 200 OK +[ + "urn:xmpp:mucsub:nodes:messages", + "urn:xmpp:mucsub:nodes:affiliations" +] +~~~ + + + + +## subscribe_room_many ● + + + +Subscribe several users to a MUC conference + + +This command accepts up to 50 users at once (this is configurable with the [mod_muc_admin](modules.md#mod_muc_admin) option `subscribe_room_many_max_users`) + +__Arguments:__ + +- *users* :: [{jid::string, nick::string}] : Users JIDs and nicks +- *room* :: string : the room to subscribe +- *nodes* :: [node::string] : nodes separated by commas: `,` + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[muc_room](admin-tags.md#muc_room), [muc_sub](admin-tags.md#muc_sub), [v1](admin-tags.md#v1) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/subscribe_room_many +{ + "users": [ + { + "jid": "tom@localhost", + "nick": "Tom" + }, + { + "jid": "jerry@localhost", + "nick": "Jerry" + } + ], + "room": "room1@conference.localhost", + "nodes": [ + "urn:xmpp:mucsub:nodes:messages", + "urn:xmpp:mucsub:nodes:affiliations" + ] +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## unban_ip + + +Remove banned IP addresses from the fail2ban table + + +Accepts an IP address with a network mask. Returns the number of unbanned addresses, or a negative integer if there were any error. + +__Arguments:__ + +- *address* :: string : IP address, optionally with network mask. + +__Result:__ + +- *unbanned* :: integer : Amount of unbanned entries, or negative in case of error. + +__Tags:__ +[accounts](admin-tags.md#accounts) + +__Module:__ +[mod_fail2ban](modules.md#mod_fail2ban) + +__Examples:__ + + +~~~ json +POST /api/unban_ip +{ + "address": "::FFFF:127.0.0.1/128" +} + +HTTP/1.1 200 OK +{"unbanned": 3} +~~~ + + + + +## unregister + + +Unregister a user + + +This deletes the authentication and all the data associated to the account (roster, vcard...). + +__Arguments:__ + +- *user* :: string : Username +- *host* :: string : Local vhost served by ejabberd + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[accounts](admin-tags.md#accounts) + +__Examples:__ + + +~~~ json +POST /api/unregister +{ + "user": "bob", + "host": "example.com" +} + +HTTP/1.1 200 OK +"Success" +~~~ + + + + +## unsubscribe_room + + +Unsubscribe from a MUC conference + +__Arguments:__ + +- *user* :: string : User JID +- *room* :: string : the room to subscribe + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[muc_room](admin-tags.md#muc_room), [muc_sub](admin-tags.md#muc_sub) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/unsubscribe_room +{ + "user": "tom@localhost", + "room": "room1@conference.localhost" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## update + + +Update the given module + + +To update all the possible modules, use `all`. + +__Arguments:__ + +- *module* :: string + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[server](admin-tags.md#server) + +__Examples:__ + + +~~~ json +POST /api/update +{ + "module": "mod_vcard" +} + +HTTP/1.1 200 OK +"Success" +~~~ + + + + +## update_list + + +List modified modules that can be updated + +__Arguments:__ + + +__Result:__ + +- *modules* :: [module::string] + +__Tags:__ +[server](admin-tags.md#server) + +__Examples:__ + + +~~~ json +POST /api/update_list +{ + +} + +HTTP/1.1 200 OK +[ + "mod_configure", + "mod_vcard" +] +~~~ + + + + +## user_resources + + +List user's connected resources + +__Arguments:__ + +- *user* :: string : User name +- *host* :: string : Server name + +__Result:__ + +- *resources* :: [resource::string] + +__Tags:__ +[session](admin-tags.md#session) + +__Examples:__ + + +~~~ json +POST /api/user_resources +{ + "user": "user1", + "host": "example.com" +} + +HTTP/1.1 200 OK +[ + "tka1", + "Gajim", + "mobile-app" +] +~~~ + + + + +## user_sessions_info + + +Get information about all sessions of a user + +__Arguments:__ + +- *user* :: string : User name +- *host* :: string : Server name + +__Result:__ + +- *sessions_info* :: [{connection::string, ip::string, port::integer, priority::integer, node::string, uptime::integer, status::string, resource::string, statustext::string}] + +__Tags:__ +[session](admin-tags.md#session) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/user_sessions_info +{ + "user": "peter", + "host": "myserver.com" +} + +HTTP/1.1 200 OK +[ + { + "connection": "c2s", + "ip": "127.0.0.1", + "port": 42656, + "priority": 8, + "node": "ejabberd@localhost", + "uptime": 231, + "status": "dnd", + "resource": "tka", + "statustext": "" + } +] +~~~ + + diff --git a/content/archive/24.02/admin-tags.md b/content/archive/24.02/admin-tags.md new file mode 100644 index 00000000..d5d7e78a --- /dev/null +++ b/content/archive/24.02/admin-tags.md @@ -0,0 +1,675 @@ +--- +search: + exclude: true +--- + +# API Tags + +> This section enumerates the API tags of ejabberd 24.02. If you are using an old ejabberd release, please refer to the corresponding archived version of this page in the [Archive](../../archive/index.md). + + + +## accounts + + +* [ban_account](admin-api.md#ban_account) + + +* [change_password](admin-api.md#change_password) + + +* [check_account](admin-api.md#check_account) + + +* [check_password](admin-api.md#check_password) + + +* [check_password_hash](admin-api.md#check_password_hash) + + +* [delete_old_users](admin-api.md#delete_old_users) + + +* [delete_old_users_vhost](admin-api.md#delete_old_users_vhost) + + +* [register](admin-api.md#register) + + +* [registered_users](admin-api.md#registered_users) + + +* [unban_ip](admin-api.md#unban_ip) + + +* [unregister](admin-api.md#unregister) + + +## acme + + +* [list_certificates](admin-api.md#list_certificates) + + +* [request_certificate](admin-api.md#request_certificate) + + +* [revoke_certificate](admin-api.md#revoke_certificate) + + +## cluster + + +* [join_cluster](admin-api.md#join_cluster) + + +* [leave_cluster](admin-api.md#leave_cluster) + + +* [list_cluster](admin-api.md#list_cluster) + + +* [set_master](admin-api.md#set_master) + + +## config + + +* [convert_to_yaml](admin-api.md#convert_to_yaml) + + +* [dump_config](admin-api.md#dump_config) + + +* [reload_config](admin-api.md#reload_config) + + +## documentation + + +* [gen_html_doc_for_commands](admin-api.md#gen_html_doc_for_commands) + + +* [gen_markdown_doc_for_commands](admin-api.md#gen_markdown_doc_for_commands) + + +* [gen_markdown_doc_for_tags](admin-api.md#gen_markdown_doc_for_tags) + + +* [man](admin-api.md#man) + + +## ejabberdctl + + +* [help](admin-api.md#help) + + +* [mnesia_info_ctl](admin-api.md#mnesia_info_ctl) + + +* [print_sql_schema](admin-api.md#print_sql_schema) + + +## erlang + + +* [compile](admin-api.md#compile) + + +* [get_cookie](admin-api.md#get_cookie) + + +* [restart_module](admin-api.md#restart_module) + + +## last + + +* [get_last](admin-api.md#get_last) + + +* [set_last](admin-api.md#set_last) + + +## logs + + +* [get_loglevel](admin-api.md#get_loglevel) + + +* [reopen_log](admin-api.md#reopen_log) + + +* [rotate_log](admin-api.md#rotate_log) + + +* [set_loglevel](admin-api.md#set_loglevel) + + +## mam + + +* [remove_mam_for_user](admin-api.md#remove_mam_for_user) + + +* [remove_mam_for_user_with_peer](admin-api.md#remove_mam_for_user_with_peer) + + +## mnesia + + +* [backup](admin-api.md#backup) + + +* [delete_mnesia](admin-api.md#delete_mnesia) + + +* [dump](admin-api.md#dump) + + +* [dump_table](admin-api.md#dump_table) + + +* [export2sql](admin-api.md#export2sql) + + +* [export_piefxis](admin-api.md#export_piefxis) + + +* [export_piefxis_host](admin-api.md#export_piefxis_host) + + +* [import_dir](admin-api.md#import_dir) + + +* [import_file](admin-api.md#import_file) + + +* [import_piefxis](admin-api.md#import_piefxis) + + +* [import_prosody](admin-api.md#import_prosody) + + +* [install_fallback](admin-api.md#install_fallback) + + +* [load](admin-api.md#load) + + +* [mnesia_change_nodename](admin-api.md#mnesia_change_nodename) + + +* [mnesia_info](admin-api.md#mnesia_info) + + +* [mnesia_info_ctl](admin-api.md#mnesia_info_ctl) + + +* [mnesia_table_info](admin-api.md#mnesia_table_info) + + +* [restore](admin-api.md#restore) + + +## modules + + +* [module_check](admin-api.md#module_check) + + +* [module_install](admin-api.md#module_install) + + +* [module_uninstall](admin-api.md#module_uninstall) + + +* [module_upgrade](admin-api.md#module_upgrade) + + +* [modules_available](admin-api.md#modules_available) + + +* [modules_installed](admin-api.md#modules_installed) + + +* [modules_update_specs](admin-api.md#modules_update_specs) + + +## muc + + +* [create_rooms_file](admin-api.md#create_rooms_file) + + +* [destroy_rooms_file](admin-api.md#destroy_rooms_file) + + +* [get_user_rooms](admin-api.md#get_user_rooms) + + +* [get_user_subscriptions](admin-api.md#get_user_subscriptions) + + +* [muc_online_rooms](admin-api.md#muc_online_rooms) + + +* [muc_online_rooms_by_regex](admin-api.md#muc_online_rooms_by_regex) + + +* [muc_register_nick](admin-api.md#muc_register_nick) + + +* [muc_unregister_nick](admin-api.md#muc_unregister_nick) + + +* [rooms_empty_destroy](admin-api.md#rooms_empty_destroy) + + +* [rooms_empty_list](admin-api.md#rooms_empty_list) + + +* [rooms_unused_destroy](admin-api.md#rooms_unused_destroy) + + +* [rooms_unused_list](admin-api.md#rooms_unused_list) + + +## muc_room + + +* [change_room_option](admin-api.md#change_room_option) + + +* [create_room](admin-api.md#create_room) + + +* [create_room_with_opts](admin-api.md#create_room_with_opts) + + +* [destroy_room](admin-api.md#destroy_room) + + +* [get_room_affiliation](admin-api.md#get_room_affiliation) + + +* [get_room_affiliations](admin-api.md#get_room_affiliations) + + +* [get_room_history](admin-api.md#get_room_history) + + +* [get_room_occupants](admin-api.md#get_room_occupants) + + +* [get_room_occupants_number](admin-api.md#get_room_occupants_number) + + +* [get_room_options](admin-api.md#get_room_options) + + +* [get_subscribers](admin-api.md#get_subscribers) + + +* [send_direct_invitation](admin-api.md#send_direct_invitation) + + +* [set_room_affiliation](admin-api.md#set_room_affiliation) + + +* [subscribe_room](admin-api.md#subscribe_room) + + +* [subscribe_room_many](admin-api.md#subscribe_room_many) + + +* [unsubscribe_room](admin-api.md#unsubscribe_room) + + +## muc_sub + + +* [create_room_with_opts](admin-api.md#create_room_with_opts) + + +* [get_subscribers](admin-api.md#get_subscribers) + + +* [get_user_subscriptions](admin-api.md#get_user_subscriptions) + + +* [subscribe_room](admin-api.md#subscribe_room) + + +* [subscribe_room_many](admin-api.md#subscribe_room_many) + + +* [unsubscribe_room](admin-api.md#unsubscribe_room) + + +## oauth + + +* [oauth_add_client_implicit](admin-api.md#oauth_add_client_implicit) + + +* [oauth_add_client_password](admin-api.md#oauth_add_client_password) + + +* [oauth_issue_token](admin-api.md#oauth_issue_token) + + +* [oauth_list_tokens](admin-api.md#oauth_list_tokens) + + +* [oauth_remove_client](admin-api.md#oauth_remove_client) + + +* [oauth_revoke_token](admin-api.md#oauth_revoke_token) + + +## offline + + +* [get_offline_count](admin-api.md#get_offline_count) + + +## private + + +* [bookmarks_to_pep](admin-api.md#bookmarks_to_pep) + + +* [private_get](admin-api.md#private_get) + + +* [private_set](admin-api.md#private_set) + + +## purge + + +* [abort_delete_old_mam_messages](admin-api.md#abort_delete_old_mam_messages) + + +* [abort_delete_old_messages](admin-api.md#abort_delete_old_messages) + + +* [delete_expired_messages](admin-api.md#delete_expired_messages) + + +* [delete_expired_pubsub_items](admin-api.md#delete_expired_pubsub_items) + + +* [delete_old_mam_messages](admin-api.md#delete_old_mam_messages) + + +* [delete_old_mam_messages_batch](admin-api.md#delete_old_mam_messages_batch) + + +* [delete_old_mam_messages_status](admin-api.md#delete_old_mam_messages_status) + + +* [delete_old_messages](admin-api.md#delete_old_messages) + + +* [delete_old_messages_batch](admin-api.md#delete_old_messages_batch) + + +* [delete_old_messages_status](admin-api.md#delete_old_messages_status) + + +* [delete_old_pubsub_items](admin-api.md#delete_old_pubsub_items) + + +* [delete_old_push_sessions](admin-api.md#delete_old_push_sessions) + + +* [delete_old_users](admin-api.md#delete_old_users) + + +* [delete_old_users_vhost](admin-api.md#delete_old_users_vhost) + + +## roster + + +* [add_rosteritem](admin-api.md#add_rosteritem) + + +* [delete_rosteritem](admin-api.md#delete_rosteritem) + + +* [get_roster](admin-api.md#get_roster) + + +* [process_rosteritems](admin-api.md#process_rosteritems) + + +* [push_alltoall](admin-api.md#push_alltoall) + + +* [push_roster](admin-api.md#push_roster) + + +* [push_roster_all](admin-api.md#push_roster_all) + + +## s2s + + +* [incoming_s2s_number](admin-api.md#incoming_s2s_number) + + +* [outgoing_s2s_number](admin-api.md#outgoing_s2s_number) + + +* [stop_s2s_connections](admin-api.md#stop_s2s_connections) + + +## server + + +* [clear_cache](admin-api.md#clear_cache) + + +* [gc](admin-api.md#gc) + + +* [halt](admin-api.md#halt) + + +* [registered_vhosts](admin-api.md#registered_vhosts) + + +* [restart](admin-api.md#restart) + + +* [status](admin-api.md#status) + + +* [stop](admin-api.md#stop) + + +* [stop_kindly](admin-api.md#stop_kindly) + + +* [update](admin-api.md#update) + + +* [update_list](admin-api.md#update_list) + + +## session + + +* [connected_users](admin-api.md#connected_users) + + +* [connected_users_info](admin-api.md#connected_users_info) + + +* [connected_users_number](admin-api.md#connected_users_number) + + +* [connected_users_vhost](admin-api.md#connected_users_vhost) + + +* [get_presence](admin-api.md#get_presence) + + +* [kick_session](admin-api.md#kick_session) + + +* [kick_user](admin-api.md#kick_user) + + +* [num_resources](admin-api.md#num_resources) + + +* [resource_num](admin-api.md#resource_num) + + +* [set_presence](admin-api.md#set_presence) + + +* [status_list](admin-api.md#status_list) + + +* [status_list_host](admin-api.md#status_list_host) + + +* [status_num](admin-api.md#status_num) + + +* [status_num_host](admin-api.md#status_num_host) + + +* [user_resources](admin-api.md#user_resources) + + +* [user_sessions_info](admin-api.md#user_sessions_info) + + +## shared_roster_group + + +* [srg_create](admin-api.md#srg_create) + + +* [srg_delete](admin-api.md#srg_delete) + + +* [srg_get_info](admin-api.md#srg_get_info) + + +* [srg_get_members](admin-api.md#srg_get_members) + + +* [srg_list](admin-api.md#srg_list) + + +* [srg_user_add](admin-api.md#srg_user_add) + + +* [srg_user_del](admin-api.md#srg_user_del) + + +## sql + + +* [convert_to_scram](admin-api.md#convert_to_scram) + + +* [import_prosody](admin-api.md#import_prosody) + + +* [print_sql_schema](admin-api.md#print_sql_schema) + + +## stanza + + +* [privacy_set](admin-api.md#privacy_set) + + +* [send_message](admin-api.md#send_message) + + +* [send_stanza](admin-api.md#send_stanza) + + +* [send_stanza_c2s](admin-api.md#send_stanza_c2s) + + +## statistics + + +* [connected_users_number](admin-api.md#connected_users_number) + + +* [incoming_s2s_number](admin-api.md#incoming_s2s_number) + + +* [outgoing_s2s_number](admin-api.md#outgoing_s2s_number) + + +* [stats](admin-api.md#stats) + + +* [stats_host](admin-api.md#stats_host) + + +* [status_num](admin-api.md#status_num) + + +* [status_num_host](admin-api.md#status_num_host) + + +## v1 + + +* [add_rosteritem](admin-api.md#add_rosteritem) + + +* [oauth_issue_token](admin-api.md#oauth_issue_token) + + +* [send_direct_invitation](admin-api.md#send_direct_invitation) + + +* [set_presence](admin-api.md#set_presence) + + +* [srg_create](admin-api.md#srg_create) + + +* [subscribe_room](admin-api.md#subscribe_room) + + +* [subscribe_room_many](admin-api.md#subscribe_room_many) + + +## vcard + + +* [get_vcard](admin-api.md#get_vcard) + + +* [get_vcard2](admin-api.md#get_vcard2) + + +* [get_vcard2_multi](admin-api.md#get_vcard2_multi) + + +* [set_nickname](admin-api.md#set_nickname) + + +* [set_vcard](admin-api.md#set_vcard) + + +* [set_vcard2](admin-api.md#set_vcard2) + + +* [set_vcard2_multi](admin-api.md#set_vcard2_multi) diff --git a/content/archive/24.02/index.md b/content/archive/24.02/index.md new file mode 100644 index 00000000..1b86e7ca --- /dev/null +++ b/content/archive/24.02/index.md @@ -0,0 +1,11 @@ +# Archived Documentation for 24.02 + +This section contains some archived sections for ejabberd 24.02. + +If you are upgrading ejabberd from a previous release, you can check: + +* [Specific version upgrade notes](upgrade.md) +* [ejabberd 24.02 release announcement](https://www.process-one.net/blog/ejabberd-24-02/) +* [Docs Github Compare from 24.02](https://github.com/processone/docs.ejabberd.im/compare/24.02..24.02) +* [ejabberd Github Compare from 24.02](https://github.com/processone/ejabberd/compare/24.02..24.02) + diff --git a/content/archive/24.02/listen-options.md b/content/archive/24.02/listen-options.md new file mode 100644 index 00000000..ab590b37 --- /dev/null +++ b/content/archive/24.02/listen-options.md @@ -0,0 +1,399 @@ +--- +search: + exclude: true +--- + +# Listen Options + +> This section describes the most recent ejabberd version. If you are using an old ejabberd release, please refer to the corresponding archived version of this page in the [Archive](../../archive/index.md). + +This is a detailed description of each option allowed by the listening +modules: + +## access + +*AccessName* + +This option defines access to the port. The default value is `all`. + +## backlog + +*Value* + +The backlog value defines the maximum length that the queue of + pending connections may grow to. This should be increased if the + server is going to handle lots of new incoming connections as they + may be dropped if there is no space in the queue (and ejabberd was + not able to accept them immediately). Default value is 5. + +## cafile + +*Path* + +Path to a file of CA root certificates. +The default is to use system defined file if possible. + +This option is useful to define the file for a specific port listener. +To set a file for all client listeners or for specific vhosts, you can use the +[`c2s_cafile`](toplevel.md#c2s_cafile) top-level option. +To set a file for all server connections, you can use the +[`s2s_cafile`](toplevel.md#s2s_cafile) top-level option +or the +[`ca_file`](toplevel.md#ca_file) top-level option. + +Please note: if this option is set in +[`ejabberd_c2s`](listen.md#ejabberd_c2s) +or [`ejabberd_s2s_in`](listen.md#ejabberd_s2s_in) +and the corresponding top-level option is also set +([`c2s_cafile`](toplevel.md#c2s_cafile), +[`s2s_cafile`](toplevel.md#s2s_cafile)), +then the top-level option is used, not this one. + +## certfile + +*Path* + +Path to the certificate file. +Only makes sense when the [`tls`](#tls) +options is set. +If this option is not set, you should set the +[`certfiles`](toplevel.md#certfiles) top-level option +or configure [ACME](../../admin/configuration/basic.md#acme). + +## check_from + +*true | false* + +This option can be used with +[`ejabberd_service`](listen.md#ejabberd_service) only. + [`XEP-0114`](https://xmpp.org/extensions/xep-0114.html) requires that + the domain must match the hostname of the component. If this option + is set to `false`, `ejabberd` will allow the component to send + stanzas with any arbitrary domain in the ’from’ attribute. Only use + this option if you are completely sure about it. The default value + is `true`, to be compliant with + [`XEP-0114`](https://xmpp.org/extensions/xep-0114.html). + +## ciphers + +*Ciphers* + +OpenSSL ciphers list in the same format accepted by + ‘`openssl ciphers`’ command. + +Please note: if this option is set in +[`ejabberd_c2s`](listen.md#ejabberd_c2s) +or [`ejabberd_s2s_in`](listen.md#ejabberd_s2s_in) +and the corresponding top-level option is also set +([`c2s_ciphers`](toplevel.md#c2s_ciphers), +[`s2s_ciphers`](toplevel.md#s2s_ciphers)), +then the top-level option is used, not this one. + +## custom_headers + +*{Name: Value}* + +Specify additional HTTP headers to be included in all HTTP responses. +Default value is: `[]` + +## default_host + +*undefined | HostName* + +If the HTTP request received by ejabberd contains the HTTP header + `Host` with an ambiguous virtual host that doesn’t match any one + defined in ejabberd (see + [Host Names](../../admin/configuration/basic.md#host_names)), + then this configured HostName + is set as the request Host. The default value of this option is: + `undefined`. + +## dhfile + +*Path* + +Full path to a file containing custom parameters for Diffie-Hellman key + exchange. Such a file could be created with the command + `openssl dhparam -out dh.pem 2048`. If this option is not specified, + default parameters will be used, which might not provide the same level + of security as using custom parameters. + +Please note: if this option is set in +[`ejabberd_c2s`](listen.md#ejabberd_c2s) +or [`ejabberd_s2s_in`](listen.md#ejabberd_s2s_in) +and the corresponding top-level option is also set +([`c2s_dhfile`](toplevel.md#c2s_dhfile), +[`s2s_dhfile`](toplevel.md#s2s_dhfile)), +then the top-level option is used, not this one. + +## global_routes + +*true | false* + +This option emulates legacy behaviour which registers all routes +defined in [`hosts`](toplevel.md#hosts) +on a component connected. This behaviour +is considered harmful in the case when it's desired to multiplex +different components on the same port, so, to disable it, +set `global_routes` to `false`. + +The default value is `true`, +e.g. legacy behaviour is emulated: the only reason for this is +to maintain backward compatibility with existing deployments. + +## hosts + +*{Hostname: [HostOption, ...]}* + +The external Jabber component that connects to this +[`ejabberd_service`](listen.md#ejabberd_service) +can serve one or more hostnames. As `HostOption` + you can define options for the component; currently the only allowed + option is the password required to the component when attempt to + connect to ejabberd: `password: Secret`. Note that you + cannot define in a single `ejabberd_service` components of different + services: add an `ejabberd_service` for each service, as seen in an + example below. This option may not be necessary if the component + already provides the host in its packets; in that case, you can simply + provide the password option that will be used for all the hosts + (see port 5236 definition in the example below). + +## max_fsm_queue + +*Size* + +This option specifies the maximum number of elements in the queue of + the FSM (Finite State Machine). Roughly speaking, each message in + such queues represents one XML stanza queued to be sent into its + relevant outgoing stream. If queue size reaches the limit (because, + for example, the receiver of stanzas is too slow), the FSM and the + corresponding connection (if any) will be terminated and error + message will be logged. The reasonable value for this option depends + on your hardware configuration. This option can be specified for + [`ejabberd_service`](listen.md#ejabberd_service) + and [`ejabberd_c2s`](listen.md#ejabberd_c2s) + listeners, or also globally for + [`ejabberd_s2s_out`](listen.md#ejabberd_s2s_out). + If the option is not specified for + `ejabberd_service` or `ejabberd_c2s` listeners, the globally + configured value is used. The allowed values are integers and + ’undefined’. Default value: ’10000’. + +## max_payload_size + +*Size* + +Specify the maximum payload size in bytes. +It can be either an integer or the word `infinity`. +The default value is `infinity`. + +## max_stanza_size + +*Size* + +This option specifies an approximate maximum size in bytes of XML + stanzas. Approximate, because it is calculated with the precision of + one block of read data. For example `{max_stanza_size, 65536}`. The + default value is `infinity`. Recommended values are 65536 for c2s + connections and 131072 for s2s connections. s2s max stanza size must + always much higher than c2s limit. Change this value with extreme + care as it can cause unwanted disconnect if set too low. + +## password + +*Secret* + +Specify the password to verify an external component that connects to the port. + +## port + +*Port number, or unix domain socket path* + + + +Declares at which port/unix domain socket should be listening. + +Can be set to number between `1` and `65535` to listen on TCP or UDP socket, +or can be set to string in form `"unix:/path/to/socket"` to create and listen +on unix domain socket `/path/to/socket`. + +## protocol_options + +*ProtocolOpts* + +List of general options relating to SSL/TLS. These map to + [`OpenSSL’s set_options()`](https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_options.html). + The default entry is: `"no_sslv3|cipher_server_preference|no_compression"` + +Please note: if this option is set in +[`ejabberd_c2s`](listen.md#ejabberd_c2s) +or [`ejabberd_s2s_in`](listen.md#ejabberd_s2s_in) +and the corresponding top-level option is also set +([`c2s_protocol_options`](toplevel.md#c2s_protocol_options), +[`s2s_protocol_options`](toplevel.md#s2s_protocol_options)), +then the top-level option is used, not this one. + +## request_handlers + +*{Path: Module}* + +To define one or several handlers that will serve HTTP requests in +[`ejabberd_http`](listen.md#ejabberd_http). The + Path is a string; so the URIs that start with that Path will be + served by Module. For example, if you want `mod_foo` to serve the + URIs that start with `/a/b/`, and you also want `mod_bosh` to + serve the URIs `/bosh/`, use this option: + +``` yaml +request_handlers: + /a/b: mod_foo + /bosh: mod_bosh + /mqtt: mod_mqtt +``` + +## send_timeout + +*Integer | infinity* + + + +Sets the longest time that data can wait to be accepted to sent by OS socket. Triggering this timeout will cause the server to close it. By default it's set to 15 seconds, expressed in milliseconds: 15000 + +## shaper + +*none | ShaperName* + +This option defines a shaper for the port (see section +[Shapers](../../admin/configuration/basic.md#shapers)). + The default value is `none`. + +## shaper_rule + +*none | ShaperRule* + +This option defines a shaper rule for +[`ejabberd_service`](listen.md#ejabberd_service) (see +section [Shapers](../../admin/configuration/basic.md#shapers)). +The recommended value is `fast`. + +## starttls + +*true | false* + +This option specifies that STARTTLS encryption is available on +connections to the port. You should also set the +[`certfiles`](toplevel.md#certfiles) top-level option +or configure [ACME](../../admin/configuration/basic.md#acme). + +This option gets implicitly enabled when enabling +[`starttls_required`](#starttls_required) or [`tls_verify`](#tls_verify). + +## starttls_required + +*true | false* + +This option specifies that STARTTLS encryption is required on connections to the port. No unencrypted connections will be allowed. +You should also set the [`certfiles`](toplevel.md#certfiles) top-level option or configure [ACME](../../admin/configuration/basic.md#acme). + +Enabling this option implicitly enables also the [`starttls`](#starttls) option. + +## tag + +*String* + +Allow specifying a tag in a `listen` section and later use it to have a special [`api_permissions`](toplevel.md#api_permissions) just for it. + +For example: + +``` yaml +listen: + - + port: 4000 + module: ejabberd_http + tag: "magic_listener" + +api_permissions: + "magic_access": + from: + - tag: "magic_listener" + who: all + what: "*" +``` + +The default value is the empty string: `""`. + +## timeout + +*Integer* + +Timeout of the connections, expressed in milliseconds. Default: 5000 + +## tls + +*true | false* + +This option specifies that traffic on the port will be encrypted + using SSL immediately after connecting. This was the traditional + encryption method in the early Jabber software, commonly on port + 5223 for client-to-server communications. But this method is + nowadays deprecated and not recommended. The preferable encryption + method is STARTTLS on port 5222, as defined + [`RFC 6120: XMPP Core`](https://xmpp.org/rfcs/rfc6120.html#tls), + which can be enabled in `ejabberd` with the option + [`starttls`](#starttls). + +If this option is set, you should also set the + [`certfiles`](toplevel.md#certfiles) top-level + option or configure [ACME](../../admin/configuration/basic.md#acme). + +The option `tls` can also be used in + [`ejabberd_http`](listen.md#ejabberd_http) + to support HTTPS. + +Enabling this option implicitly disables the [`starttls`](#starttls) option. + +## tls_compression + +*true | false* + +Whether to enable or disable TLS compression. The default value is + `false`. + +Please note: if this option is set in +[`ejabberd_c2s`](listen.md#ejabberd_c2s) +or [`ejabberd_s2s_in`](listen.md#ejabberd_s2s_in) +and the corresponding top-level option is also set +([`c2s_tls_compression`](toplevel.md#c2s_tls_compression), +[`s2s_tls_compression`](toplevel.md#s2s_tls_compression)), +then the top-level option is used, not this one. + +## tls_verify + +*false | true* + +This option specifies whether to verify the certificate or not when TLS is enabled. + +The default value is `false`, which means no checks are performed. + +The certificate will be checked against trusted CA roots, either defined at the operation system level or defined in the + listener [`cafile`](#cafile). If trusted, it will accept the jid that is embedded in the certificate in the + `subjectAltName` field of that certificate. + +Enabling this option implicitly enables also the [`starttls`](#starttls) option. + +## use_proxy_protocol + +*true | false* + +Is this listener accessed by proxy service that is using + proxy protocol for supplying real IP addresses to ejabberd server. You can read about this protocol + in [Proxy protocol specification](https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt). + The default value of this option is`false`. + +## zlib + +*true | false* + +This option specifies that Zlib stream compression (as defined in + [`XEP-0138`](https://xmpp.org/extensions/xep-0138.html)) is available + on connections to the port. diff --git a/content/archive/24.02/listen.md b/content/archive/24.02/listen.md new file mode 100644 index 00000000..b816585e --- /dev/null +++ b/content/archive/24.02/listen.md @@ -0,0 +1,821 @@ +--- +search: + exclude: true +--- + +# Listen Modules + +> This section describes the most recent ejabberd version. If you are using an old ejabberd release, please refer to the corresponding archived version of this page in the [Archive](../../archive/index.md). + +## Listen Option + +The **listen option** defines for which ports, addresses and network +protocols `ejabberd` will listen and what services will be run on them. +Each element of the list is an associative array with the following +elements: + +- Port, optionally also the IP address and/or a transport + protocol. + +- Listening module that serves this port. + +- Options for the TCP socket and for the listening module. + +For example: + +``` yaml +listen: + - + port: 5222 + module: ejabberd_c2s + ip: 127.0.0.1 + starttls: true + - + port: 5269 + module: ejabberd_s2s_in + transport: tcp +``` + +The **port** defines which port number to listen for incoming connections: +it can be a Jabber/XMPP standard port or any other valid port number. +Alternatively, set the option to a string in form `"unix:/path/to/socket"` +to create and listen on a unix domain socket `/path/to/socket`. + +The **IP address** can be represented as a string. The socket will listen +only in that network interface. It is possible to specify a generic +address ("0.0.0.0" for IPv4 or "::" for IPv6), so `ejabberd` will listen +in all addresses. Depending on the type of the IP address, IPv4 or IPv6 +will be used. When the IP address is not specified, it will listen on +all IPv4 network addresses. + +Note that on some operating systems and/or OS configurations, listening +on "::" will mean listening for IPv4 traffic as well as IPv6 traffic. + +Some example values for IP address: + +- `"0.0.0.0"` to listen in all IPv4 network interfaces. This is the + default value when no IP is specified. + +- `"::"` to listen in all IPv6 network interfaces + +- `"10.11.12.13"` is the IPv4 address `10.11.12.13` + +- `"::FFFF:127.0.0.1"` is the IPv6 address `::FFFF:127.0.0.1/128` + +The **transport protocol** can be `tcp` or `udp`. Default is `tcp`. + +## Summary of Listen Modules + +The available modules, their purpose and the options allowed by each one +are: + +### ejabberd_c2s + +Handles c2s connections. + +Options: +[access](listen-options.md#access), +[cafile](listen-options.md#cafile), +[ciphers](listen-options.md#ciphers), +[dhfile](listen-options.md#dhfile), +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_stanza_size](listen-options.md#max_stanza_size), +[protocol_options](listen-options.md#protocol_options), +[send_timeout](listen-options.md#send_timeout), +[shaper](listen-options.md#shaper), +[starttls](listen-options.md#starttls), +[starttls_required](listen-options.md#starttls_required), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls-compression), +[tls_verify](listen-options.md#tls_verify), +[zlib](listen-options.md#zlib). + +### ejabberd_s2s_in + +Handles incoming s2s connections. + +Options: +[cafile](listen-options.md#cafile), +[ciphers](listen-options.md#ciphers), +[dhfile](listen-options.md#dhfile), +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_stanza_size](listen-options.md#max_stanza_size), +[protocol_options](listen-options.md#protocol_options), +[send_timeout](listen-options.md#send_timeout), +[shaper](listen-options.md#shaper), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls-compression). + +### ejabberd_service + +Interacts with an + [`external component`](https://ejabberd.im/tutorials-transports) + (as defined in the Jabber Component Protocol + ([`XEP-0114`](https://xmpp.org/extensions/xep-0114.html)). + +Options: +[access](listen-options.md#access), +[cafile](listen-options.md#cafile), +[certfile](listen-options.md#certfile), +[check_from](listen-options.md#check_from), +[ciphers](listen-options.md#ciphers), +[dhfile](listen-options.md#dhfile), +[global_routes](listen-options.md#global_routes), +[hosts](listen-options.md#hosts), +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_stanza_size](listen-options.md#max_stanza_size), +[password](listen-options.md#password), +[protocol_options](listen-options.md#protocol_options), +[send_timeout](listen-options.md#send_timeout), +[shaper](listen-options.md#shaper), +[shaper_rule](listen-options.md#shaper-rule), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls-compression). + +### ejabberd_sip + +Handles SIP requests as defined in [`RFC 3261`](https://tools.ietf.org/html/rfc3261). + +For details please check the [ejabberd_sip](#ejabberd_sip_1) and [mod_sip](modules.md#mod_sip) sections. + +General listener options: +[certfile](listen-options.md#certfile), +[send_timeout](listen-options.md#send_timeout), +[tls](listen-options.md#tls). + +### ejabberd_stun + +Handles STUN/TURN requests as defined in + [`RFC 5389`](https://tools.ietf.org/html/rfc5389) and + [`RFC 5766`](https://tools.ietf.org/html/rfc5766). + +For the specific module options, please check the +[ejabberd_stun](#ejabberd_stun_1) section: +`auth_realm`, +`auth_type`, +`server_name`, +`turn_blacklist`, +`turn_ipv4_address`, +`turn_ipv6_address`, +`turn_max_allocations`, +`turn_max_permissions`, +`turn_max_port`, +`turn_min_port`, +`use_turn`. + +General listener options: +[certfile](listen-options.md#certfile), +[send_timeout](listen-options.md#send_timeout), +[shaper](listen-options.md#shaper), +[tls](listen-options.md#tls), + +### ejabberd_http + +Handles incoming HTTP connections. + +With the proper request handlers configured, this serves HTTP services like +[ACME](../../admin/configuration/basic.md#acme), +[API](modules.md#mod_http_api), +[BOSH](modules.md#mod_bosh), +[CAPTCHA](../../admin/configuration/basic.md#captcha), +[Fileserver](modules.md#mod_http_fileserver), +[OAuth](../../developer/ejabberd-api/../../developer/ejabberd-api/oauth.md), +[RegisterWeb](modules.md#mod_register_web), +[Upload](modules.md#mod_http_upload), +[WebAdmin](../../admin/guide/managing.md#web_admin), +[WebSocket](#ejabberd_http_ws), +[XML-RPC](#ejabberd_xmlrpc). + +Options: +[cafile](listen-options.md#cafile), +[ciphers](listen-options.md#ciphers), +[custom_headers](listen-options.md#custom_headers), +[default_host](listen-options.md#default_host), +[dhfile](listen-options.md#dhfile), +[protocol_options](listen-options.md#protocol_options), +[request_handlers](listen-options.md#request_handlers), +[send_timeout](listen-options.md#send_timeout), +[tag](listen-options.md#tag), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls-compression), +and the [trusted_proxies](toplevel.md#trusted_proxies) top-level option. + +### mod_mqtt + +Support for MQTT requires configuring `mod_mqtt` both in the +[listen](toplevel.md#listen) and the +[modules](toplevel.md#modules) sections. +Check the [mod_mqtt module](modules.md#mod_mqtt) options, +and the [MQTT Support](../../admin/guide/mqtt/index.md) section. + +Listen options: +[backlog](listen-options.md#backlog), +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_payload_size](listen-options.md#max_payload_size), +[send_timeout](listen-options.md#send_timeout), +[tls](listen-options.md#tls), +[tls_verify](listen-options.md#tls_verify). + + + +## ejabberd_stun + +`ejabberd` is able to act as a stand-alone STUN/TURN server +([`RFC 5389`](https://tools.ietf.org/html/rfc5389)/[`RFC 5766`](https://tools.ietf.org/html/rfc5766). +In that role `ejabberd` helps clients with ICE +([`RFC 5245`](https://tools.ietf.org/html/rfc5245) or Jingle ICE +([`XEP-0176`](https://xmpp.org/extensions/xep-0176.html) support to +discover their external addresses and ports and to relay media traffic +when it is impossible to establish direct peer-to-peer connection. + +The specific configurable options are: + +**`tls: true|false`**: If enabled, `certfile` option must be set, otherwise `ejabberd` will + not be able to accept TLS connections. Obviously, this option makes + sense for `tcp` transport only. The default is `false`. + +**`certfile: Path`**: Path to the certificate file. Only makes sense when `tls` is set. + +**`use_turn: true|false`**: Enables/disables TURN (media relay) functionality. The default is + `false`. + +**`turn_blacklist: String | [String,...]`**: Specify one or more IP addresses and/or subnet + addresses/masks. The TURN server will refuse to relay traffic from/to + blacklisted IP addresses. By default, loopback addresses (`127.0.0.0/8` + and `::1/128`) are blacklisted. + +**`turn_ipv4_address: String`**: The IPv4 address advertised by your TURN server. + The address should not be NAT’ed or firewalled. There is not default, + so you should set this option explicitly. Implies `use_turn`. + +**`turn_ipv6_address: String`**: The IPv6 address advertised by your TURN server. + The address should not be NAT’ed or firewalled. There is not default, + so you should set this option explicitly. Implies `use_turn`. + +**`turn_min_port: Integer`**: Together with `turn_max_port` forms port range to allocate from. The + default is 49152. Implies `use_turn`. + +**`turn_max_port: Integer`**: Together with `turn_min_port` forms port range to allocate from. The + default is 65535. Implies `use_turn`. + +**`turn_max_allocations: Integer|infinity`**: Maximum number of TURN allocations available from the particular IP + address. The default value is 10. Implies `use_turn`. + +**`turn_max_permissions: Integer|infinity`**: Maximum number of TURN permissions available from the particular IP + address. The default value is 10. Implies `use_turn`. + +**`auth_type: user|anonymous`**: Which authentication type to use for TURN allocation requests. When + type `user` is set, ejabberd authentication backend is used. For + `anonymous` type no authentication is performed (not recommended for + public services). The default is `user`. Implies `use_turn`. + +**`auth_realm: String`**: When `auth_type` is set to `user` and you have several virtual hosts + configured you should set this option explicitly to the virtual host + you want to serve on this particular listening port. Implies + `use_turn`. + +**`shaper: Atom`**: For `tcp` transports defines shaper to use. The default is `none`. + +**`server_name: String`**: Defines software version to return with every response. The default + is the STUN library version. + +Example configuration with disabled TURN functionality (STUN only): + +``` yaml +listen: + - + port: 3478 + transport: udp + module: ejabberd_stun + - + port: 3478 + module: ejabberd_stun + - + port: 5349 + module: ejabberd_stun + certfile: /etc/ejabberd/server.pem +``` + +Example configuration with TURN functionality. Note that STUN is always +enabled if TURN is enabled. Here, only UDP section is shown: + +``` yaml +listen: + - + port: 3478 + transport: udp + use_turn: true + turn_ipv4_address: 10.20.30.1 + module: ejabberd_stun +``` + +You also need to configure DNS SRV records properly so clients can +easily discover a STUN/TURN server serving your XMPP domain. Refer to +section +[`DNS Discovery of a Server`](https://tools.ietf.org/html/rfc5389#section-9) +of [`RFC 5389`](https://tools.ietf.org/html/rfc5389) and section +[`Creating an Allocation`](https://tools.ietf.org/html/rfc5766#section-6) +of [`RFC 5766`](https://tools.ietf.org/html/rfc5766) for details. + +Example DNS SRV configuration for STUN only: + +``` sh +_stun._udp IN SRV 0 0 3478 stun.example.com. +_stun._tcp IN SRV 0 0 3478 stun.example.com. +_stuns._tcp IN SRV 0 0 5349 stun.example.com. +``` + +And you should also add these in the case if TURN is enabled: + +``` sh +_turn._udp IN SRV 0 0 3478 turn.example.com. +_turn._tcp IN SRV 0 0 3478 turn.example.com. +_turns._tcp IN SRV 0 0 5349 turn.example.com. +``` + +## ejabberd_sip + +### SIP Configuration + +`ejabberd` has built-in SIP support. To activate this feature, +add the [`ejabberd_sip`](#ejabberd_sip) listen module, enable +[`mod_sip`](modules.md#mod_sip) module +for the desired virtual host, and configure DNS properly. + +To add a listener you should configure `ejabberd_sip` listening module +as described in [Listen](#listen-option) section. +If option [`tls`](listen-options.md#tls) is specified, +option [`certfile`](listen-options.md#certfile) +must be specified as well, otherwise incoming TLS connections +would fail. + +Example configuration with standard ports (as per +[`RFC 3261`](https://tools.ietf.org/html/rfc3261)): + +``` yaml +listen: + - + port: 5060 + transport: udp + module: ejabberd_sip + - + port: 5060 + module: ejabberd_sip + - + port: 5061 + module: ejabberd_sip + tls: true + certfile: /etc/ejabberd/server.pem +``` + +Note that there is no StartTLS support in SIP and +[`SNI`](https://en.wikipedia.org/wiki/Server_Name_Indication) support is +somewhat tricky, so for TLS you have to configure different virtual +hosts on different ports if you have different certificate files for +them. + +Next you need to configure DNS SIP records for your virtual domains. +Refer to [`RFC 3263`](https://tools.ietf.org/html/rfc3263) for the +detailed explanation. Simply put, you should add NAPTR and SRV records +for your domains. Skip NAPTR configuration if your DNS provider doesn't +support this type of records. It’s not fatal, however, highly +recommended. + +Example configuration of NAPTR records: + +``` sh +example.com IN NAPTR 10 0 "s" "SIPS+D2T" "" _sips._tcp.example.com. +example.com IN NAPTR 20 0 "s" "SIP+D2T" "" _sip._tcp.example.com. +example.com IN NAPTR 30 0 "s" "SIP+D2U" "" _sip._udp.example.com. +``` + +Example configuration of SRV records with standard ports (as per +[`RFC 3261`](https://tools.ietf.org/html/rfc3261): + +``` sh +_sip._udp IN SRV 0 0 5060 sip.example.com. +_sip._tcp IN SRV 0 0 5060 sip.example.com. +_sips._tcp IN SRV 0 0 5061 sip.example.com. +``` + +### Note on SIP usage + +SIP authentication does not support SCRAM. As such, it is not possible +to use `mod_sip` to authenticate when ejabberd has been set to encrypt +password with SCRAM. + +## ejabberd_http_ws + +This module enables XMPP communication over WebSocket connection as +described in [`RFC 7395`](https://tools.ietf.org/html/rfc7395). + +### WebSocket Config + +To enable WebSocket, simply add a handler to the `request_handlers` +section of an `ejabberd_http` listener: + +``` yaml +listen: + - + port: 5280 + module: ejabberd_http + request_handlers: + /xmpp: ejabberd_http_ws +``` + +This module can be configured using those top-level options: + +- [websocket\_origin](toplevel.md#websocket_origin) +- [websocket\_ping\_interval](toplevel.md#websocket_ping_interval) +- [websocket\_timeout](toplevel.md#websocket_timeout) + +### WebSocket Discovery + +With the example configuration previously mentioned, +the WebSocket URL would be: `ws://localhost:5280/xmpp` + +You may want to provide a `host-meta` file so clients can +easily discover WebSocket service for your XMPP domain +(see [XEP-0156](https://xmpp.org/extensions/xep-0156.html#http)). +One easy way to provide that file is using +[`mod_host_meta`](modules.md#mod_host_meta). + +### Testing WebSocket + +A test client can be found on Github: [WebSocket test client](https://github.com/processone/xmpp-websocket-client) + +There is an example configuration for WebSocket and Converse.js in the +[ejabberd 21.12 release notes](https://www.process-one.net/blog/ejabberd-21-12/). + + + +## ejabberd_xmlrpc + +Handles XML-RPC requests to execute +[ejabberd commands](../../admin/guide/managing.md#ejabberd_commands). +It is configured as a request handler in +[ejabberd_http](#ejabberd_http). + +This is the minimum configuration required to enable the feature: + +``` yaml +listen: + - + port: 5280 + module: ejabberd_http + request_handlers: + /xmlrpc: ejabberd_xmlrpc + +api_permissions: + "public commands": + who: + ip: 127.0.0.1/8 + what: + - connected_users_number +``` + +Example Python3 script: + +``` python +import xmlrpc.client +server = xmlrpc.client.ServerProxy("http://127.0.0.1:5280/xmlrpc/"); +print(server.connected_users_number()) +``` + +By default there is no restriction to who can execute what commands, +so it is strongly recommended that you configure restrictions using +[API Permissions](../../developer/ejabberd-api/permissions.md). + +This example configuration adds some restrictions (only requests from localhost are accepted, the XML-RPC query must include authentication credentials of a specific account registered in ejabberd, and only two commands are accepted): + +``` yaml +listen: + - + port: 5280 + ip: "::" + module: ejabberd_http + request_handlers: + /xmlrpc: ejabberd_xmlrpc + +api_permissions: + "some XMLRPC commands": + from: ejabberd_xmlrpc + who: + - ip: 127.0.0.1 + - user: user1@localhost + what: + - registered_users + - connected_users_number +``` + +Example Python3 script for that restricted configuration: + +``` python +import xmlrpc.client +server = xmlrpc.client.ServerProxy("http://127.0.0.1:5280/xmlrpc/"); + +params = {} +params['host'] = 'localhost' + +auth = {'user': 'user1', + 'server': 'localhost', + 'password': 'mypass11', + 'admin': True} + +def calling(command, data): + fn = getattr(server, command) + return fn(auth, data) + +print(calling('registered_users', params)) +``` + +Please notice, when using the old Python2, replace the two first lines with: + +``` python +import xmlrpclib +server = xmlrpclib.Server("http://127.0.0.1:5280/xmlrpc/"); +``` + +It's possible to use OAuth for authentication instead of plain password, see +[OAuth Support](../../developer/ejabberd-api/../../developer/ejabberd-api/oauth.md). + +In ejabberd 20.03 and older, it was possible to configure `ejabberd_xmlrpc` as a +listener, see the old document for reference and example configuration: +[Listening Module](../old.md#listening_module). + +Just for reference, there's also the old +[`ejabberd_xmlrpc documentation`](https://ejabberd.im/ejabberd_xmlrpc) +with example clients in other languages. + +## Examples + +For example, the following simple configuration defines: + +- There are three domains. The default certificate file is `server.pem`. However, the c2s and s2s connections to the domain `example.com` use the file `example_com.pem`. + +- Port 5222 listens for c2s connections with STARTTLS, and also allows plain connections for old clients. + +- Port 5223 listens for c2s connections with the old SSL. + +- Port 5269 listens for s2s connections with STARTTLS. The socket is set for IPv6 instead of IPv4. + +- Port 3478 listens for STUN requests over UDP. + +- Port 5280 listens for HTTP requests, and serves the HTTP-Bind (BOSH) service. + +- Port 5281 listens for HTTP requests, using HTTPS to serve HTTP-Bind (BOSH) and the Web Admin as explained in [Managing: Web Admin](../../admin/guide/managing.md#web_admin). The socket only listens connections to the IP address 127.0.0.1. + +``` yaml +hosts: + - example.com + - example.org + - example.net + +certfiles: + - /etc/ejabberd/server.pem + - /etc/ejabberd/example_com.pem + +listen: + - + port: 5222 + module: ejabberd_c2s + access: c2s + shaper: c2s_shaper + starttls: true + max_stanza_size: 65536 + - + port: 5223 + module: ejabberd_c2s + access: c2s + shaper: c2s_shaper + tls: true + max_stanza_size: 65536 + - + port: 5269 + ip: "::" + module: ejabberd_s2s_in + shaper: s2s_shaper + max_stanza_size: 131072 + - + port: 3478 + transport: udp + module: ejabberd_stun + - + port: 5280 + module: ejabberd_http + request_handlers: + /bosh: mod_bosh + - + port: 5281 + ip: 127.0.0.1 + module: ejabberd_http + tls: true + request_handlers: + /admin: ejabberd_web_admin + /bosh: mod_bosh + +s2s_use_starttls: optional +outgoing_s2s_families: + - ipv4 + - ipv6 +outgoing_s2s_timeout: 10000 +trusted_proxies: [127.0.0.1, 192.168.1.11] +``` + +In this example, the following configuration defines that: + +- c2s connections are listened for on port 5222 (all IPv4 addresses) + and on port 5223 (SSL, IP 192.168.0.1 and fdca:8ab6:a243:75ef::1) + and denied for the user called ‘`bad`’. + +- s2s connections are listened for on port 5269 (all IPv4 addresses) + with STARTTLS for secured traffic strictly required, and the + certificates are verified. Incoming and outgoing connections of + remote XMPP servers are denied, only two servers can connect: + “jabber.example.org” and “example.com”. + +- Port 5280 is serving the Web Admin and the HTTP-Bind (BOSH) service in + all the IPv4 addresses. Note that it is also possible to serve them + on different ports. The second example in section [Managing: Web Admin](../../admin/guide/managing.md#web_admin) shows + how exactly this can be done. A request handler to serve MQTT over WebSocket is also defined. + +- All users except for the administrators have a traffic of limit + 1,000Bytes/second + +- The [`AIM transport`](https://ejabberd.im/pyaimt) + `aim.example.org` is connected to port 5233 on localhost IP + addresses (127.0.0.1 and ::1) with password ‘`aimsecret`’. + +- The ICQ transport JIT (`icq.example.org` and `sms.example.org`) is + connected to port 5234 with password ‘`jitsecret`’. + +- The [`MSN transport`](https://ejabberd.im/pymsnt) + `msn.example.org` is connected to port 5235 with password + ‘`msnsecret`’. + +- The [`Yahoo! transport`](https://ejabberd.im/yahoo-transport-2) + `yahoo.example.org` is connected to port 5236 with password + ‘`yahoosecret`’. + +- The + [`Gadu-Gadu transport`](https://ejabberd.im/jabber-gg-transport) + `gg.example.org` is connected to port 5237 with password + ‘`ggsecret`’. + +- The [`Jabber Mail Component`](https://ejabberd.im/jmc) + `jmc.example.org` is connected to port 5238 with password + ‘`jmcsecret`’. + +- The service custom has enabled the special option to avoiding + checking the `from` attribute in the packets send by this component. + The component can send packets in behalf of any users from the + server, or even on behalf of any server. + +``` yaml +acl: + blocked: + user: bad + trusted_servers: + server: + - example.com + - jabber.example.org + xmlrpc_bot: + user: + - xmlrpc-robot@example.org +shaper: + normal: 1000 +shaper_rules: + c2s_shaper: + - none: admin + - normal +access_rules: + c2s: + - deny: blocked + - allow + xmlrpc_access: + - allow: xmlrpc_bot + s2s: + - allow: trusted_servers +certfiles: + - /path/to/ssl.pem +s2s_access: s2s +s2s_use_starttls: required_trusted +listen: + - + port: 5222 + module: ejabberd_c2s + shaper: c2s_shaper + access: c2s + - + ip: 192.168.0.1 + port: 5223 + module: ejabberd_c2s + tls: true + access: c2s + - + ip: "FDCA:8AB6:A243:75EF::1" + port: 5223 + module: ejabberd_c2s + tls: true + access: c2s + - + port: 5269 + module: ejabberd_s2s_in + - + port: 5280 + module: ejabberd_http + request_handlers: + /admin: ejabberd_web_admin + /bosh: mod_bosh + /mqtt: mod_mqtt + - + port: 4560 + module: ejabberd_xmlrpc + access_commands: {} + - + ip: 127.0.0.1 + port: 5233 + module: ejabberd_service + hosts: + aim.example.org: + password: aimsecret + - + ip: "::1" + port: 5233 + module: ejabberd_service + hosts: + aim.example.org: + password: aimsecret + - + port: 5234 + module: ejabberd_service + hosts: + icq.example.org: + password: jitsecret + sms.example.org: + password: jitsecret + - + port: 5235 + module: ejabberd_service + hosts: + msn.example.org: + password: msnsecret + - + port: 5236 + module: ejabberd_service + password: yahoosecret + - + port: 5237 + module: ejabberd_service + hosts: + gg.example.org: + password: ggsecret + - + port: 5238 + module: ejabberd_service + hosts: + jmc.example.org: + password: jmcsecret + - + port: 5239 + module: ejabberd_service + check_from: false + hosts: + custom.example.org: + password: customsecret +``` + +Note, that for services based in jabberd14 or WPJabber you have to make +the transports log and do XDB by themselves: + +``` xml + + + + + + %d: [%t] (%h): %s + /var/log/jabber/service.log + + + + + + + + + /usr/lib/jabber/xdb_file.so + + + /var/spool/jabber + + +``` diff --git a/content/archive/24.02/modules.md b/content/archive/24.02/modules.md new file mode 100644 index 00000000..8839ac7f --- /dev/null +++ b/content/archive/24.02/modules.md @@ -0,0 +1,3901 @@ +--- +search: + exclude: true +--- + +# Modules Options + +> This section describes modules options of ejabberd [24.02](../../archive/24.02/index.md). If you are using an old ejabberd release, please refer to the corresponding archived version of this page in the [Archive](../../archive/index.md). The modules +that changed in this version are marked with ●. + +mod\_adhoc +---------- + +This module implements [XEP-0050: Ad-Hoc +Commands](https://xmpp.org/extensions/xep-0050.html). It’s an auxiliary +module and is only needed by some of the other modules. + +__Available options:__ + +- **report\_commands\_node**: *true | false* +Provide the Commands item in the Service Discovery. Default value: +*false*. + +mod\_admin\_extra +----------------- + +This module provides additional administrative commands. + +Details for some commands: + +- *ban-acount*: This command kicks all the connected sessions of the + account from the server. It also changes their password to a + randomly generated one, so they can’t login anymore unless a server + administrator changes their password again. It is possible to define + the reason of the ban. The new password also includes the reason and + the date and time of the ban. See an example below. + +- *pushroster*: (and *pushroster-all*) The roster file must be placed, + if using Windows, on the directory where you installed ejabberd: + `C:/Program Files/ejabberd` or similar. If you use other Operating + System, place the file on the same directory where the .beam files + are installed. See below an example roster file. + +- *srg-create*: If you want to put a group Name with blankspaces, use + the characters "' and '" to define when the Name starts and ends. + See an example below. + +The module has no options. + +__Examples:__ + +With this configuration, vCards can only be modified with +mod\_admin\_extra commands: + + acl: + adminextraresource: + - resource: "modadminextraf8x,31ad" + access_rules: + vcard_set: + - allow: adminextraresource + modules: + mod_admin_extra: {} + mod_vcard: + access_set: vcard_set + +Content of roster file for *pushroster* command: + + [{<<"bob">>, <<"example.org">>, <<"workers">>, <<"Bob">>}, + {<<"mart">>, <<"example.org">>, <<"workers">>, <<"Mart">>}, + {<<"Rich">>, <<"example.org">>, <<"bosses">>, <<"Rich">>}]. + +With this call, the sessions of the local account which JID is + will be kicked, and its password will be set to +something like +*BANNED\_ACCOUNT—20080425T21:45:07—2176635—Spammed\_rooms* + + ejabberdctl vhost example.org ban-account boby "Spammed rooms" + +Call to srg-create using double-quotes and single-quotes: + + ejabberdctl srg-create g1 example.org "'Group number 1'" this_is_g1 g1 + +mod\_admin\_update\_sql +----------------------- + +This module can be used to update existing SQL database from the default +to the new schema. Check the section +[Default and New Schemas](../../admin/configuration/database.md#default-and-new-schemas) for +details. Please note that only MS SQL, MySQL, and PostgreSQL are +supported. When the module is loaded use [update_sql](../../developer/ejabberd-api/admin-api.md#update_sql) API. + +The module has no options. + +mod\_announce +------------- + +This module enables configured users to broadcast announcements and to +set the message of the day (MOTD). Configured users can perform these +actions with an XMPP client either using Ad-hoc Commands or sending +messages to specific JIDs. + +Note that this module can be resource intensive on large deployments as +it may broadcast a lot of messages. This module should be disabled for +instances of ejabberd with hundreds of thousands users. + +The Ad-hoc Commands are listed in the Server Discovery. For this feature +to work, [mod_adhoc](#mod_adhoc) must be enabled. + +The specific JIDs where messages can be sent are listed below. The first +JID in each entry will apply only to the specified virtual host +example.org, while the JID between brackets will apply to all virtual +hosts in ejabberd: + +- example.org/announce/all (example.org/announce/all-hosts/all):: The + message is sent to all registered users. If the user is online and + connected to several resources, only the resource with the highest + priority will receive the message. If the registered user is not + connected, the message will be stored offline in assumption that + offline storage (see [mod_offline](#mod_offline)) is enabled. + +- example.org/announce/online + (example.org/announce/all-hosts/online):: The message is sent to all + connected users. If the user is online and connected to several + resources, all resources will receive the message. + +- example.org/announce/motd (example.org/announce/all-hosts/motd):: + The message is set as the message of the day (MOTD) and is sent to + users when they login. In addition the message is sent to all + connected users (similar to announce/online). + +- example.org/announce/motd/update + (example.org/announce/all-hosts/motd/update):: The message is set as + message of the day (MOTD) and is sent to users when they login. The + message is not sent to any currently connected user. + +- example.org/announce/motd/delete + (example.org/announce/all-hosts/motd/delete):: Any message sent to + this JID removes the existing message of the day (MOTD). + +__Available options:__ + +- **access**: *AccessName* +This option specifies who is allowed to send announcements and to set +the message of the day. The default value is *none* (i.e. nobody is able +to send such messages). + +- **cache\_life\_time**: *timeout()* +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module +only. + +- **cache\_missed**: *true | false* +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module +only. + +- **cache\_size**: *pos\_integer() | infinity* +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module +only. + +- **db\_type**: *mnesia | sql* +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module +only. + +- **use\_cache**: *true | false* +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. + +mod\_avatar +----------- + +The purpose of the module is to cope with legacy and modern XMPP clients +posting avatars. The process is described in [XEP-0398: User Avatar to +vCard-Based Avatars +Conversion](https://xmpp.org/extensions/xep-0398.html). + +Also, the module supports conversion between avatar image formats on the +fly. + +The module depends on [mod_vcard](#mod_vcard), [mod_vcard_xupdate](#mod_vcard_xupdate) and +[mod_pubsub](#mod_pubsub). + +__Available options:__ + +- **convert**: *{From: To}* +Defines image conversion rules: the format in *From* will be converted +to format in *To*. The value of *From* can also be *default*, which is +match-all rule. NOTE: the list of supported formats is detected at +compile time depending on the image libraries installed in the system. + + **Example**: + + convert: + webp: jpg + default: png + +- **rate\_limit**: *Number* +Limit any given JID by the number of avatars it is able to convert per +minute. This is to protect the server from image conversion DoS. The +default value is *10*. + +mod\_block\_strangers +--------------------- + +This module blocks and logs any messages coming from an unknown entity. +If a writing entity is not in your roster, you can let this module drop +and/or log the message. By default you’ll just not receive message from +that entity. Enable this module if you want to drop SPAM messages. + +__Available options:__ + +- **access**: *AccessName* +The option is supposed to be used when *allow\_local\_users* and +*allow\_transports* are not enough. It’s an ACL where *deny* means the +message will be rejected (or a CAPTCHA would be generated for a +presence, if configured), and *allow* means the sender is whitelisted +and the stanza will pass through. The default value is *none*, which +means nothing is whitelisted. + +- **allow\_local\_users**: *true | false* +This option specifies if strangers from the same local host should be +accepted or not. The default value is *true*. + +- **allow\_transports**: *true | false* +If set to *true* and some server’s JID is in user’s roster, then +messages from any user of this server are accepted even if no +subscription present. The default value is *true*. + +- **captcha**: *true | false* +Whether to generate CAPTCHA or not in response to messages from +strangers. See also section [CAPTCHA](../../admin/configuration/basic.md#captcha) of the +Configuration Guide. The default value is *false*. + +- **drop**: *true | false* +This option specifies if strangers messages should be dropped or not. +The default value is *true*. + +- **log**: *true | false* +This option specifies if strangers' messages should be logged (as info +message) in ejabberd.log. The default value is *false*. + +mod\_blocking +------------- + +The module implements [XEP-0191: Blocking +Command](https://xmpp.org/extensions/xep-0191.html). + +This module depends on *mod\_privacy* where all the configuration is +performed. + +The module has no options. + +mod\_bosh +--------- + +This module implements XMPP over BOSH as defined in +[XEP-0124](https://xmpp.org/extensions/xep-0124.html) and +[XEP-0206](https://xmpp.org/extensions/xep-0206.html). BOSH stands for +Bidirectional-streams Over Synchronous HTTP. It makes it possible to +simulate long lived connections required by XMPP over the HTTP protocol. +In practice, this module makes it possible to use XMPP in a browser +without WebSocket support and more generally to have a way to use XMPP +while having to get through an HTTP proxy. + +__Available options:__ + +- **cache\_life\_time**: *timeout()* +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module +only. + +- **cache\_missed**: *true | false* +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module +only. + +- **cache\_size**: *pos\_integer() | infinity* +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module +only. + +- **json**: *true | false* +This option has no effect. + +- **max\_concat**: *pos\_integer() | infinity* +This option limits the number of stanzas that the server will send in a +single bosh request. The default value is *unlimited*. + +- **max\_inactivity**: *timeout()* +The option defines the maximum inactivity period. The default value is +*30* seconds. + +- **max\_pause**: *pos\_integer()* +Indicate the maximum length of a temporary session pause (in seconds) +that a client can request. The default value is *120*. + +- **prebind**: *true | false* +If enabled, the client can create the session without going through +authentication. Basically, it creates a new session with anonymous +authentication. The default value is *false*. + +- **queue\_type**: *ram | file* +Same as top-level [queue_type](toplevel.md#queue_type) option, but applied to this module +only. + +- **ram\_db\_type**: *mnesia | sql | redis* +Same as top-level [default_ram_db](toplevel.md#default_ram_db) option, but applied to this module +only. + +- **use\_cache**: *true | false* +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. + +__**Example**:__ + + listen: + - + port: 5222 + module: ejabberd_c2s + - + port: 5443 + module: ejabberd_http + request_handlers: + /bosh: mod_bosh + + modules: + mod_bosh: {} + +mod\_caps +--------- + +This module implements [XEP-0115: Entity +Capabilities](https://xmpp.org/extensions/xep-0115.html). The main +purpose of the module is to provide PEP functionality (see +[mod_pubsub](#mod_pubsub)). + +__Available options:__ + +- **cache\_life\_time**: *timeout()* +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module +only. + +- **cache\_missed**: *true | false* +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module +only. + +- **cache\_size**: *pos\_integer() | infinity* +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module +only. + +- **db\_type**: *mnesia | sql* +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module +only. + +- **use\_cache**: *true | false* +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. + +mod\_carboncopy +--------------- + +The module implements [XEP-0280: Message +Carbons](https://xmpp.org/extensions/xep-0280.html). The module +broadcasts messages on all connected user resources (devices). + +The module has no options. + +mod\_client\_state +------------------ + +This module allows for queueing certain types of stanzas when a client +indicates that the user is not actively using the client right now (see +[XEP-0352: Client State +Indication](https://xmpp.org/extensions/xep-0352.html)). This can save +bandwidth and resources. + +A stanza is dropped from the queue if it’s effectively obsoleted by a +new one (e.g., a new presence stanza would replace an old one from the +same client). The queue is flushed if a stanza arrives that won’t be +queued, or if the queue size reaches a certain limit (currently 100 +stanzas), or if the client becomes active again. + +__Available options:__ + +- **queue\_chat\_states**: *true | false* +Queue "standalone" chat state notifications (as defined in [XEP-0085: +Chat State Notifications](https://xmpp.org/extensions/xep-0085.html)) +while a client indicates inactivity. The default value is *true*. + +- **queue\_pep**: *true | false* +Queue PEP notifications while a client is inactive. When the queue is +flushed, only the most recent notification of a given PEP node is +delivered. The default value is *true*. + +- **queue\_presence**: *true | false* +While a client is inactive, queue presence stanzas that indicate +(un)availability. The default value is *true*. + +mod\_configure +-------------- + +The module provides server configuration functionality via [XEP-0050: +Ad-Hoc Commands](https://xmpp.org/extensions/xep-0050.html). This module +requires [mod_adhoc](#mod_adhoc) to be loaded. + +The module has no options. + +mod\_conversejs +--------------- + +This module serves a simple page for the +[Converse](https://conversejs.org/) XMPP web browser client. + +This module is available since ejabberd [21.12](../../archive/21.12/index.md). Several options were +improved in ejabberd [22.05](../../archive/22.05/index.md). + +To use this module, in addition to adding it to the *modules* section, +you must also enable it in *listen* → *ejabberd\_http* → +[request_handlers](listen-options.md#request_handlers). + +Make sure either *mod\_bosh* or *ejabberd\_http\_ws* +[request_handlers](listen-options.md#request_handlers) are enabled. + +When *conversejs\_css* and *conversejs\_script* are *auto*, by default +they point to the public Converse client. + +__Available options:__ + +- **bosh\_service\_url**: *auto | BoshURL* +BOSH service URL to which Converse can connect to. The keyword *@HOST@* +is replaced with the real virtual host name. If set to *auto*, it will +build the URL of the first configured BOSH request handler. The default +value is *auto*. + +- **conversejs\_css**: *auto | URL* +Converse CSS URL. The keyword *@HOST@* is replaced with the hostname. +The default value is *auto*. + +- **conversejs\_options**: *{Name: Value}* + +Specify additional options to +be passed to Converse. See [Converse +configuration](https://conversejs.org/docs/html/configuration.html). +Only boolean, integer and string values are supported; lists are not +supported. + +- **conversejs\_resources**: *Path* + +Local path to the Converse +files. If not set, the public Converse client will be used instead. + +- **conversejs\_script**: *auto | URL* +Converse main script URL. The keyword *@HOST@* is replaced with the +hostname. The default value is *auto*. + +- **default\_domain**: *Domain* +Specify a domain to act as the default for user JIDs. The keyword +*@HOST@* is replaced with the hostname. The default value is *@HOST@*. + +- **websocket\_url**: *auto | WebSocketURL* +A WebSocket URL to which Converse can connect to. The keyword *@HOST@* +is replaced with the real virtual host name. If set to *auto*, it will +build the URL of the first configured WebSocket request handler. The +default value is *auto*. + +__Examples:__ + +Manually setup WebSocket url, and use the public Converse client: + + listen: + - + port: 5280 + module: ejabberd_http + request_handlers: + /bosh: mod_bosh + /websocket: ejabberd_http_ws + /conversejs: mod_conversejs + + modules: + mod_bosh: {} + mod_conversejs: + websocket_url: "ws://@HOST@:5280/websocket" + +Host Converse locally and let auto detection of WebSocket and Converse +URLs: + + listen: + - + port: 443 + module: ejabberd_http + tls: true + request_handlers: + /websocket: ejabberd_http_ws + /conversejs: mod_conversejs + + modules: + mod_conversejs: + conversejs_resources: "/home/ejabberd/conversejs-9.0.0/package/dist" + +Configure some additional options for Converse + + modules: + mod_conversejs: + websocket_url: auto + conversejs_options: + auto_away: 30 + clear_cache_on_logout: true + i18n: "pt" + locked_domain: "@HOST@" + message_archiving: always + theme: dracula + +mod\_delegation +--------------- + +This module is an implementation of [XEP-0355: Namespace +Delegation](https://xmpp.org/extensions/xep-0355.html). Only admin mode +has been implemented by now. Namespace delegation allows external +services to handle IQ using specific namespace. This may be applied for +external PEP service. + +> **Warning** +> +> Security issue: Namespace delegation gives components access to +> sensitive data, so permission should be granted carefully, only if you +> trust the component. + +> **Note** +> +> This module is complementary to [mod_privilege](#mod_privilege) but can also be used +> separately. + +__Available options:__ + +- **namespaces**: *{Namespace: Options}* +If you want to delegate namespaces to a component, specify them in this +option, and associate them to an access rule. The *Options* are: + + - **access**: *AccessName* + The option defines which components are + allowed for namespace delegation. The default value is *none*. + + - **filtering**: *Attributes* + The list of attributes. Currently not + used. + +__Examples:__ + +Make sure you do not delegate the same namespace to several services at +the same time. As in the example provided later, to have the +*sat-pubsub.example.org* component perform correctly disable the +*mod\_pubsub* module. + + access_rules: + external_pubsub: + allow: external_component + external_mam: + allow: external_component + + acl: + external_component: + server: sat-pubsub.example.org + + modules: + ... + mod_delegation: + namespaces: + urn:xmpp:mam:1: + access: external_mam + http://jabber.org/protocol/pubsub: + access: external_pubsub + +mod\_disco +---------- + +This module adds support for [XEP-0030: Service +Discovery](https://xmpp.org/extensions/xep-0030.html). With this module +enabled, services on your server can be discovered by XMPP clients. + +__Available options:__ + +- **extra\_domains**: *\[Domain, ...\]* +With this option, you can specify a list of extra domains that are added +to the Service Discovery item list. The default value is an empty list. + +- **name**: *Name* +A name of the server in the Service Discovery. This will only be +displayed by special XMPP clients. The default value is *ejabberd*. + +- **server\_info**: *\[Info, ...\]* +Specify additional information about the server, as described in +[XEP-0157: Contact Addresses for XMPP +Services](https://xmpp.org/extensions/xep-0157.html). Every *Info* +element in the list is constructed from the following options: + + - **modules**: *all | \[Module, ...\]* + The value can be the keyword + *all*, in which case the information is reported in all the + services, or a list of ejabberd modules, in which case the + information is only specified for the services provided by those + modules. + + - **name**: *Name* + The field *var* name that will be defined. See + XEP-0157 for some standardized names. + + - **urls**: *\[URI, ...\]* + A list of contact URIs, such as HTTP URLs, + XMPP URIs and so on. + + **Example**: + + server_info: + - + modules: all + name: abuse-addresses + urls: ["mailto:abuse@shakespeare.lit"] + - + modules: [mod_muc] + name: "Web chatroom logs" + urls: ["http://www.example.org/muc-logs"] + - + modules: [mod_disco] + name: feedback-addresses + urls: + - http://shakespeare.lit/feedback.php + - mailto:feedback@shakespeare.lit + - xmpp:feedback@shakespeare.lit + - + modules: + - mod_disco + - mod_vcard + name: admin-addresses + urls: + - mailto:xmpp@shakespeare.lit + - xmpp:admins@shakespeare.lit + +mod\_fail2ban +------------- + +The module bans IPs that show the malicious signs. Currently only C2S +authentication failures are detected. + +Unlike the standalone program, *mod\_fail2ban* clears the record of +authentication failures after some time since the first failure or on a +successful authentication. It also does not simply block network +traffic, but provides the client with a descriptive error message. + +> **Warning** +> +> You should not use this module behind a proxy or load balancer. +> ejabberd will see the failures as coming from the load balancer and, +> when the threshold of auth failures is reached, will reject all +> connections coming from the load balancer. You can lock all your user +> base out of ejabberd when using this module behind a proxy. + +__Available options:__ + +- **access**: *AccessName* +Specify an access rule for whitelisting IP addresses or networks. If the +rule returns *allow* for a given IP address, that address will never be +banned. The *AccessName* should be of type *ip*. The default value is +*none*. + +- **c2s\_auth\_ban\_lifetime**: *timeout()* +The lifetime of the IP ban caused by too many C2S authentication +failures. The default value is *1* hour. + +- **c2s\_max\_auth\_failures**: *Number* +The number of C2S authentication failures to trigger the IP ban. The +default value is *20*. + +mod\_host\_meta +--------------- + +This module serves small *host-meta* files as described in [XEP-0156: +Discovering Alternative XMPP Connection +Methods](https://xmpp.org/extensions/xep-0156.html). + +This module is available since ejabberd [22.05](../../archive/22.05/index.md). + +To use this module, in addition to adding it to the *modules* section, +you must also enable it in *listen* → *ejabberd\_http* → +[request_handlers](listen-options.md#request_handlers). + +Notice it only works if ejabberd\_http has tls enabled. + +__Available options:__ + +- **bosh\_service\_url**: *undefined | auto | BoshURL* +BOSH service URL to announce. The keyword *@HOST@* is replaced with the +real virtual host name. If set to *auto*, it will build the URL of the +first configured BOSH request handler. The default value is *auto*. + +- **websocket\_url**: *undefined | auto | WebSocketURL* +WebSocket URL to announce. The keyword *@HOST@* is replaced with the +real virtual host name. If set to *auto*, it will build the URL of the +first configured WebSocket request handler. The default value is *auto*. + +__**Example**:__ + + listen: + - + port: 443 + module: ejabberd_http + tls: true + request_handlers: + /bosh: mod_bosh + /ws: ejabberd_http_ws + /.well-known/host-meta: mod_host_meta + /.well-known/host-meta.json: mod_host_meta + + modules: + mod_bosh: {} + mod_host_meta: + bosh_service_url: "https://@HOST@:5443/bosh" + websocket_url: "wss://@HOST@:5443/ws" + +mod\_http\_api +-------------- + +This module provides a ReST interface to call +[ejabberd API](../../developer/ejabberd-api/index.md) commands using +JSON data. + +To use this module, in addition to adding it to the *modules* section, +you must also enable it in *listen* → *ejabberd\_http* → +[request_handlers](listen-options.md#request_handlers). + +To use a specific API version N, when defining the URL path in the +request\_handlers, add a *vN*. For example: */api/v2: mod\_http\_api* + +To run a command, send a POST request to the corresponding URL: +*http://localhost:5280/api/<command\_name>* + +The module has no options. + +__**Example**:__ + + listen: + - + port: 5280 + module: ejabberd_http + request_handlers: + /api: mod_http_api + + modules: + mod_http_api: {} + +mod\_http\_fileserver +--------------------- + +This simple module serves files from the local disk over HTTP. + +__Available options:__ + +- **accesslog**: *Path* +File to log accesses using an Apache-like format. No log will be +recorded if this option is not specified. + +- **content\_types**: *{Extension: Type}* +Specify mappings of extension to content type. There are several content +types already defined. With this option you can add new definitions or +modify existing ones. The default values are: + + **Example**: + + content_types: + .css: text/css + .gif: image/gif + .html: text/html + .jar: application/java-archive + .jpeg: image/jpeg + .jpg: image/jpeg + .js: text/javascript + .png: image/png + .svg: image/svg+xml + .txt: text/plain + .xml: application/xml + .xpi: application/x-xpinstall + .xul: application/vnd.mozilla.xul+xml + +- **custom\_headers**: *{Name: Value}* +Indicate custom HTTP headers to be included in all responses. There are +no custom headers by default. + +- **default\_content\_type**: *Type* +Specify the content type to use for unknown extensions. The default +value is *application/octet-stream*. + +- **directory\_indices**: *\[Index, ...\]* +Indicate one or more directory index files, similarly to Apache’s +*DirectoryIndex* variable. When an HTTP request hits a directory instead +of a regular file, those directory indices are looked in order, and the +first one found is returned. The default value is an empty list. + +- **docroot**: *Path* +Directory to serve the files from. This is a mandatory option. + +- **must\_authenticate\_with**: *\[{Username, Hostname}, ...\]* +List of accounts that are allowed to use this service. Default value: +*\[\]*. + +__Examples:__ + +This example configuration will serve the files from the local directory +*/var/www* in the address *http://example.org:5280/pub/content/*. In +this example a new content type *ogg* is defined, *png* is redefined, +and *jpg* definition is deleted: + + listen: + ... + - + port: 5280 + module: ejabberd_http + request_handlers: + ... + /pub/content: mod_http_fileserver + ... + ... + + modules: + ... + mod_http_fileserver: + docroot: /var/www + accesslog: /var/log/ejabberd/access.log + directory_indices: + - index.html + - main.htm + custom_headers: + X-Powered-By: Erlang/OTP + X-Fry: "It's a widely-believed fact!" + content_types: + .ogg: audio/ogg + .png: image/png + default_content_type: text/html + ... + +mod\_http\_upload +----------------- + +This module allows for requesting permissions to upload a file via HTTP +as described in [XEP-0363: HTTP File +Upload](https://xmpp.org/extensions/xep-0363.html). If the request is +accepted, the client receives a URL for uploading the file and another +URL from which that file can later be downloaded. + +In order to use this module, it must be enabled in *listen* → +*ejabberd\_http* → +[request_handlers](listen-options.md#request_handlers). + +__Available options:__ + +- **access**: *AccessName* +This option defines the access rule to limit who is permitted to use the +HTTP upload service. The default value is *local*. If no access rule of +that name exists, no user will be allowed to use the service. + +- **custom\_headers**: *{Name: Value}* +This option specifies additional header fields to be included in all +HTTP responses. By default no custom headers are included. + +- **dir\_mode**: *Permission* +This option defines the permission bits of the *docroot* directory and +any directories created during file uploads. The bits are specified as +an octal number (see the chmod(1) manual page) within double quotes. For +example: "0755". The default is undefined, which means no explicit +permissions will be set. + +- **docroot**: *Path* +Uploaded files are stored below the directory specified (as an absolute +path) with this option. The keyword @HOME@ is replaced with the home +directory of the user running ejabberd, and the keyword @HOST@ with the +virtual host name. The default value is "@HOME@/upload". + +- **external\_secret**: *Text* +This option makes it possible to offload all HTTP Upload processing to a +separate HTTP server. Both ejabberd and the HTTP server should share +this secret and behave exactly as described at [Prosody’s +mod\_http\_upload\_external](https://modules.prosody.im/mod_http_upload_external.html) +in the *Implementation* section. There is no default value. + +- **file\_mode**: *Permission* +This option defines the permission bits of uploaded files. The bits are +specified as an octal number (see the chmod(1) manual page) within +double quotes. For example: "0644". The default is undefined, which +means no explicit permissions will be set. + +- **get\_url**: *URL* +This option specifies the initial part of the GET URLs used for +downloading the files. The default value is *undefined*. When this +option is *undefined*, this option is set to the same value as +*put\_url*. The keyword @HOST@ is replaced with the virtual host name. +NOTE: if GET requests are handled by *mod\_http\_upload*, the *get\_url* +must match the *put\_url*. Setting it to a different value only makes +sense if an external web server or [mod_http_fileserver](#mod_http_fileserver) is used to +serve the uploaded files. + +- **host** +Deprecated. Use *hosts* instead. + +- **hosts**: *\[Host, ...\]* +This option defines the Jabber IDs of the service. If the *hosts* option +is not specified, the only Jabber ID will be the hostname of the virtual +host with the prefix "upload.". The keyword *@HOST@* is replaced with +the real virtual host name. + +- **jid\_in\_url**: *node | sha1* +When this option is set to *node*, the node identifier of the user’s JID +(i.e., the user name) is included in the GET and PUT URLs generated by +*mod\_http\_upload*. Otherwise, a SHA-1 hash of the user’s bare JID is +included instead. The default value is *sha1*. + +- **max\_size**: *Size* +This option limits the acceptable file size. Either a number of bytes +(larger than zero) or *infinity* must be specified. The default value is +*104857600*. + +- **name**: *Name* +A name of the service in the Service Discovery. This will only be +displayed by special XMPP clients. The default value is "HTTP File +Upload". + +- **put\_url**: *URL* +This option specifies the initial part of the PUT URLs used for file +uploads. The keyword @HOST@ is replaced with the virtual host name. +NOTE: different virtual hosts cannot use the same PUT URL. The default +value is "https://@HOST@:5443/upload". + +- **rm\_on\_unregister**: *true | false* +This option specifies whether files uploaded by a user should be removed +when that user is unregistered. The default value is *true*. + +- **secret\_length**: *Length* +This option defines the length of the random string included in the GET +and PUT URLs generated by *mod\_http\_upload*. The minimum length is 8 +characters, but it is recommended to choose a larger value. The default +value is *40*. + +- **service\_url** +Deprecated. + +- **thumbnail**: *true | false* +This option specifies whether ejabberd should create thumbnails of +uploaded images. If a thumbnail is created, a <thumbnail/> element +that contains the download <uri/> and some metadata is returned +with the PUT response. The default value is *false*. + +- **vcard**: *vCard* +A custom vCard of the service that will be displayed by some XMPP +clients in Service Discovery. The value of *vCard* is a YAML map +constructed from an XML representation of vCard. Since the +representation has no attributes, the mapping is straightforward. + +For example, the following XML representation of vCard: + + + Conferences + + + Elm Street + + + +will be translated to: + + vcard: + fn: Conferences + adr: + - + work: true + street: Elm Street + +__**Example**:__ + + listen: + ... + - + port: 5443 + module: ejabberd_http + tls: true + request_handlers: + ... + /upload: mod_http_upload + ... + ... + + modules: + ... + mod_http_upload: + docroot: /ejabberd/upload + put_url: "https://@HOST@:5443/upload" + ... + +mod\_http\_upload\_quota +------------------------ + +This module adds quota support for mod\_http\_upload. + +This module depends on *mod\_http\_upload*. + +__Available options:__ + +- **access\_hard\_quota**: *AccessName* +This option defines which access rule is used to specify the "hard +quota" for the matching JIDs. That rule must yield a positive number for +any JID that is supposed to have a quota limit. This is the number of +megabytes a corresponding user may upload. When this threshold is +exceeded, ejabberd deletes the oldest files uploaded by that user until +their disk usage equals or falls below the specified soft quota (see +*access\_soft\_quota*). The default value is *hard\_upload\_quota*. + +- **access\_soft\_quota**: *AccessName* +This option defines which access rule is used to specify the "soft +quota" for the matching JIDs. That rule must yield a positive number of +megabytes for any JID that is supposed to have a quota limit. See the +description of the *access\_hard\_quota* option for details. The default +value is *soft\_upload\_quota*. + +- **max\_days**: *Days* +If a number larger than zero is specified, any files (and directories) +older than this number of days are removed from the subdirectories of +the *docroot* directory, once per day. The default value is *infinity*. + +__Examples:__ + +Please note that it’s not necessary to specify the *access\_hard\_quota* +and *access\_soft\_quota* options in order to use the quota feature. You +can stick to the default names and just specify access rules such as +those in this example: + + shaper_rules: + ... + soft_upload_quota: + 1000: all # MiB + hard_upload_quota: + 1100: all # MiB + ... + + modules: + ... + mod_http_upload: {} + mod_http_upload_quota: + max_days: 100 + ... + +mod\_jidprep +------------ + +This module allows XMPP clients to ask the server to normalize a JID as +per the rules specified in [RFC 6122: XMPP Address +Format](https://tools.ietf.org/html/rfc6122). This might be useful for +clients in certain constrained environments, or for testing purposes. + +__Available options:__ + +- **access**: *AccessName* +This option defines which access rule will be used to control who is +allowed to use this service. The default value is *local*. + +mod\_last +--------- + +This module adds support for [XEP-0012: Last +Activity](https://xmpp.org/extensions/xep-0012.html). It can be used to +discover when a disconnected user last accessed the server, to know when +a connected user was last active on the server, or to query the uptime +of the ejabberd server. + +__Available options:__ + +- **cache\_life\_time**: *timeout()* +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module +only. + +- **cache\_missed**: *true | false* +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module +only. + +- **cache\_size**: *pos\_integer() | infinity* +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module +only. + +- **db\_type**: *mnesia | sql* +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module +only. + +- **use\_cache**: *true | false* +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. + +mod\_legacy\_auth +----------------- + +The module implements [XEP-0078: Non-SASL +Authentication](https://xmpp.org/extensions/xep-0078.html). + +> **Note** +> +> This type of authentication was obsoleted in 2008 and you unlikely +> need this module unless you have something like outdated Jabber bots. + +The module has no options. + +mod\_mam +-------- + +This module implements [XEP-0313: Message Archive +Management](https://xmpp.org/extensions/xep-0313.html) and [XEP-0441: +Message Archive Management +Preferences](https://xmpp.org/extensions/xep-0441.html). Compatible XMPP +clients can use it to store their chat history on the server. + +__Available options:__ + +- **access\_preferences**: *AccessName* +This access rule defines who is allowed to modify the MAM preferences. +The default value is *all*. + +- **assume\_mam\_usage**: *true | false* +This option determines how ejabberd’s stream management code (see +[mod_stream_mgmt](#mod_stream_mgmt)) handles unacknowledged messages when the connection +is lost. Usually, such messages are either bounced or resent. However, +neither is done for messages that were stored in the user’s MAM archive +if this option is set to *true*. In this case, ejabberd assumes those +messages will be retrieved from the archive. The default value is +*false*. + +- **cache\_life\_time**: *timeout()* +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module +only. + +- **cache\_missed**: *true | false* +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module +only. + +- **cache\_size**: *pos\_integer() | infinity* +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module +only. + +- **clear\_archive\_on\_room\_destroy**: *true | false* +Whether to destroy message archive of a room (see [mod_muc](#mod_muc)) when it +gets destroyed. The default value is *true*. + +- **compress\_xml**: *true | false* +When enabled, new messages added to archives are compressed using a +custom compression algorithm. This feature works only with SQL backends. +The default value is *false*. + +- **db\_type**: *mnesia | sql* +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module +only. + +- **default**: *always | never | roster* +The option defines default policy for chat history. When *always* is set +every chat message is stored. With *roster* only chat history with +contacts from user’s roster is stored. And *never* fully disables chat +history. Note that a client can change its policy via protocol commands. +The default value is *never*. + +- **request\_activates\_archiving**: *true | false* +If the value is *true*, no messages are stored for a user until their +client issue a MAM request, regardless of the value of the *default* +option. Once the server received a request, that user’s messages are +archived as usual. The default value is *false*. + +- **use\_cache**: *true | false* +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. + +- **user\_mucsub\_from\_muc\_archive**: *true | false* +When this option is disabled, for each individual subscriber a separa +mucsub message is stored. With this option enabled, when a user fetches +archive virtual mucsub, messages are generated from muc archives. The +default value is *false*. + +mod\_matrix\_gw ● +----------------- + +[Matrix](https://matrix.org/) gateway. + +This module is available since ejabberd [24.02](../../archive/24.02/index.md). + +__Available options:__ + +- **host**: *Host* +This option defines the Jabber IDs of the service. If the *host* option +is not specified, the Jabber ID will be the hostname of the virtual host +with the prefix *"matrix."*. The keyword *@HOST@* is replaced with the +real virtual host name. + +- **key**: *string()* +Value of the matrix signing key, in base64. + +- **key\_name**: *string()* +Name of the matrix signing key. + +- **matrix\_domain**: *Domain* +Specify a domain in the Matrix federation. The keyword *@HOST@* is +replaced with the hostname. The default value is *@HOST@*. + +- **matrix\_id\_as\_jid**: *true | false* +If set to *false*, all packets failing to be delivered via an XMPP +server-to-server connection will then be routed to the Matrix gateway by +translating a Jabber ID *user@matrixdomain.tld* to a Matrix user +identifier *@user:matrixdomain.tld*. When set to *true*, messages must +be explicitly sent to the matrix gateway service Jabber ID to be routed +to a remote Matrix server. In this case, to send a message to Matrix +user *@user:matrixdomain.tld*, the client must send a message to the JID +*user%.tld*, where +*matrix.myxmppdomain.tld* is the JID of the gateway service as set by +the *host* option. The default is *false*. + +__**Example**:__ + + listen: + - + port: 8448 + module: ejabberd_http + tls: true + request_handlers: + "/_matrix": mod_matrix_gw + + modules: + mod_matrix_gw: + key_name: "key1" + key: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" + matrix_id_as_jid: true + +mod\_metrics +------------ + +This module sends events to external backend (by now only +[grapherl](https://github.com/processone/grapherl) is supported). +Supported events are: + +- sm\_register\_connection + +- sm\_remove\_connection + +- user\_send\_packet + +- user\_receive\_packet + +- s2s\_send\_packet + +- s2s\_receive\_packet + +- register\_user + +- remove\_user + +- offline\_message + +When enabled, every call to these hooks triggers a counter event to be +sent to the external backend. + +__Available options:__ + +- **ip**: *IPv4Address* +IPv4 address where the backend is located. The default value is +*127.0.0.1*. + +- **port**: *Port* +An internet port number at which the backend is listening for incoming +connections/packets. The default value is *11111*. + +mod\_mix +-------- + +This module is an experimental implementation of [XEP-0369: Mediated +Information eXchange (MIX)](https://xmpp.org/extensions/xep-0369.html). +MIX support was added in ejabberd 16.03 as an experimental feature, +updated in 19.02, and is not yet ready to use in production. It’s +asserted that the MIX protocol is going to replace the MUC protocol in +the future (see [mod_muc](#mod_muc)). + +To learn more about how to use that feature, you can refer to our +tutorial: [Getting started with MIX](../../tutorials/mix-010.md) + +The module depends on [mod_mam](#mod_mam). + +__Available options:__ + +- **access\_create**: *AccessName* +An access rule to control MIX channels creations. The default value is +*all*. + +- **db\_type**: *mnesia | sql* +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module +only. + +- **host** +Deprecated. Use *hosts* instead. + +- **hosts**: *\[Host, ...\]* +This option defines the Jabber IDs of the service. If the *hosts* option +is not specified, the only Jabber ID will be the hostname of the virtual +host with the prefix "mix.". The keyword *@HOST@* is replaced with the +real virtual host name. + +- **name**: *Name* +A name of the service in the Service Discovery. This will only be +displayed by special XMPP clients. The default value is *Channels*. + +mod\_mix\_pam +------------- + +This module implements [XEP-0405: Mediated Information eXchange (MIX): +Participant Server +Requirements](https://xmpp.org/extensions/xep-0405.html). The module is +needed if MIX compatible clients on your server are going to join MIX +channels (either on your server or on any remote servers). + +> **Note** +> +> *mod\_mix* is not required for this module to work, however, without +> *mod\_mix\_pam* the MIX functionality of your local XMPP clients will +> be impaired. + +__Available options:__ + +- **cache\_life\_time**: *timeout()* +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module +only. + +- **cache\_missed**: *true | false* +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module +only. + +- **cache\_size**: *pos\_integer() | infinity* +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module +only. + +- **db\_type**: *mnesia | sql* +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module +only. + +- **use\_cache**: *true | false* +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. + +mod\_mqtt +--------- + +This module adds [support for the MQTT](../../admin/guide/mqtt/index.md) +protocol version *3.1.1* and *5.0*. Remember to configure *mod\_mqtt* in +*modules* and *listen* sections. + +__Available options:__ + +- **access\_publish**: *{TopicFilter: AccessName}* +Access rules to restrict access to topics for publishers. By default +there are no restrictions. + +- **access\_subscribe**: *{TopicFilter: AccessName}* +Access rules to restrict access to topics for subscribers. By default +there are no restrictions. + +- **cache\_life\_time**: *timeout()* +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module +only. + +- **cache\_missed**: *true | false* +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module +only. + +- **cache\_size**: *pos\_integer() | infinity* +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module +only. + +- **db\_type**: *mnesia | sql* +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module +only. + +- **match\_retained\_limit**: *pos\_integer() | infinity* +The option limits the number of retained messages returned to a client +when it subscribes to some topic filter. The default value is *1000*. + +- **max\_queue**: *Size* +Maximum queue size for outgoing packets. The default value is *5000*. + +- **max\_topic\_aliases**: *0..65535* +The maximum number of aliases a client is able to associate with the +topics. The default value is *100*. + +- **max\_topic\_depth**: *Depth* +The maximum topic depth, i.e. the number of slashes (*/*) in the topic. +The default value is *8*. + +- **queue\_type**: *ram | file* +Same as top-level [queue_type](toplevel.md#queue_type) option, but applied to this module +only. + +- **ram\_db\_type**: *mnesia* +Same as top-level [default_ram_db](toplevel.md#default_ram_db) option, but applied to this module +only. + +- **session\_expiry**: *timeout()* +The option specifies how long to wait for an MQTT session resumption. +When *0* is set, the session gets destroyed when the underlying client +connection is closed. The default value is *5* minutes. + +- **use\_cache**: *true | false* +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. + +mod\_mqtt\_bridge +----------------- + +This module adds ability to synchronize local MQTT topics with data on +remote servers It can update topics on remote servers when local user +updates local topic, or can subscribe for changes on remote server, and +update local copy when remote data is updated. It is available since +ejabberd [23.01](../../archive/23.01/index.md). + +__Available options:__ + +- **replication\_user**: *JID* +Identifier of a user that will be assigned as owner of local changes. + +- **servers**: *{ServerUrl: {publish: \[TopicPairs, subscribe: \[TopicPairs\], authentication: \[AuthInfo\]}}\]* +Declaration of data to share, must contain *publish* or *subscribe* or +both, and *authentication* section with username/password field or +certfile pointing to client certificate. Accepted urls can use schema +mqtt, mqtts (mqtt with tls), mqtt5, mqtt5s (both to trigger v5 +protocol), ws, wss, ws5, wss5. Certificate authentication can be only +used with mqtts, mqtt5s, wss, wss5. + +__**Example**:__ + + modules: + ... + mod_mqtt_bridge: + servers: + "mqtt://server.com": + publish: + "localA": "remoteA" # local changes to 'localA' will be replicated on remote server as 'remoteA' + "topicB": "topicB" + subscribe: + "remoteB": "localB" # changes to 'remoteB' on remote server will be stored as 'localB' on local server + authentication: + certfile: "/etc/ejabberd/mqtt_server.pem" + replication_user: "mqtt@xmpp.server.com" + ... + +mod\_muc +-------- + +This module provides support for [XEP-0045: Multi-User +Chat](https://xmpp.org/extensions/xep-0045.html). Users can discover +existing rooms, join or create them. Occupants of a room can chat in +public or have private chats. + +The MUC service allows any Jabber ID to register a nickname, so nobody +else can use that nickname in any room in the MUC service. To register a +nickname, open the Service Discovery in your XMPP client and register in +the MUC service. + +It is also possible to register a nickname in a room, so nobody else can +use that nickname in that room. If a nick is registered in the MUC +service, that nick cannot be registered in any room, and vice versa: a +nick that is registered in a room cannot be registered at the MUC +service. + +This module supports clustering and load balancing. One module can be +started per cluster node. Rooms are distributed at creation time on all +available MUC module instances. The multi-user chat module is clustered +but the rooms themselves are not clustered nor fault-tolerant: if the +node managing a set of rooms goes down, the rooms disappear and they +will be recreated on an available node on first connection attempt. + +__Available options:__ + +- **access**: *AccessName* +You can specify who is allowed to use the Multi-User Chat service. By +default everyone is allowed to use it. + +- **access\_admin**: *AccessName* +This option specifies who is allowed to administrate the Multi-User Chat +service. The default value is *none*, which means that only the room +creator can administer their room. The administrators can send a normal +message to the service JID, and it will be shown in all active rooms as +a service message. The administrators can send a groupchat message to +the JID of an active room, and the message will be shown in the room as +a service message. + +- **access\_create**: *AccessName* +To configure who is allowed to create new rooms at the Multi-User Chat +service, this option can be used. The default value is *all*, which +means everyone is allowed to create rooms. + +- **access\_mam**: *AccessName* +To configure who is allowed to modify the *mam* room option. The default +value is *all*, which means everyone is allowed to modify that option. + +- **access\_persistent**: *AccessName* +To configure who is allowed to modify the *persistent* room option. The +default value is *all*, which means everyone is allowed to modify that +option. + +- **access\_register**: *AccessName* + +This option specifies who +is allowed to register nickname within the Multi-User Chat service and +rooms. The default is *all* for backward compatibility, which means that +any user is allowed to register any free nick in the MUC service and in +the rooms. + +- **cleanup\_affiliations\_on\_start**: *true | false* + +Remove affiliations for +non-existing local users on startup. The default value is *false*. + +- **db\_type**: *mnesia | sql* +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module +only. + +- **default\_room\_options**: *Options* +Define the default room options. Note that the creator of a room can +modify the options of his room at any time using an XMPP client with MUC +capability. The *Options* are: + + - **allow\_change\_subj**: *true | false* + Allow occupants to change + the subject. The default value is *true*. + + - **allow\_private\_messages\_from\_visitors**: *anyone | moderators | + nobody* Visitors can send private messages to other occupants. The + default value is *anyone* which means visitors can send private + messages to any occupant. + + - **allow\_query\_users**: *true | false* + Occupants can send IQ + queries to other occupants. The default value is *true*. + + - **allow\_subscription**: *true | false* + Allow users to subscribe to + room events as described in + [Multi-User Chat Subscriptions](../../developer/xmpp-clients-bots/extensions/muc-sub.md). + The default value is *false*. + + - **allow\_user\_invites**: *true | false* + Allow occupants to send + invitations. The default value is *false*. + + - **allow\_visitor\_nickchange**: *true | false* + Allow visitors to + change nickname. The default value is *true*. + + - **allow\_visitor\_status**: *true | false* + Allow visitors to send + status text in presence updates. If disallowed, the status text is + stripped before broadcasting the presence update to all the room + occupants. The default value is *true*. + + - **allow\_voice\_requests**: *true | false* + Allow visitors in a + moderated room to request voice. The default value is *true*. + + - **allowpm**: *anyone | participants | moderators | none* + Who can + send private messages. The default value is *anyone*. + + - **anonymous**: *true | false* + The room is anonymous: occupants don’t + see the real JIDs of other occupants. Note that the room moderators + can always see the real JIDs of the occupants. The default value is + *true*. + + - **captcha\_protected**: *true | false* + When a user tries to join a + room where they have no affiliation (not owner, admin or member), + the room requires them to fill a CAPTCHA challenge (see section + [CAPTCHA](../../admin/configuration/basic.md#captcha) in order to accept their join in the + room. The default value is *false*. + + - **description**: *Room Description* + Short description of the room. + The default value is an empty string. + + - **enable\_hats**: *true | false* + Allow extended roles as defined in + XEP-0317 Hats. The default value is *false*. + + - **lang**: *Language* + Preferred language for the discussions in the + room. The language format should conform to RFC 5646. There is no + value by default. + + - **logging**: *true | false* + The public messages are logged using + [mod_muc_log](#mod_muc_log). The default value is *false*. + + - **mam**: *true | false* + Enable message archiving. Implies mod\_mam + is enabled. The default value is *false*. + + - **max\_users**: *Number* + Maximum number of occupants in the room. + The default value is *200*. + + - **members\_by\_default**: *true | false* + The occupants that enter + the room are participants by default, so they have "voice". The + default value is *true*. + + - **members\_only**: *true | false* + Only members of the room can + enter. The default value is *false*. + + - **moderated**: *true | false* + Only occupants with "voice" can send + public messages. The default value is *true*. + + - **password**: *Password* + Password of the room. Implies option + *password\_protected* set to *true*. There is no default value. + + - **password\_protected**: *true | false* + The password is required to + enter the room. The default value is *false*. + + - **persistent**: *true | false* + The room persists even if the last + participant leaves. The default value is *false*. + + - **presence\_broadcast**: *\[moderator | participant | visitor, + ...\]* List of roles for which presence is broadcasted. The list can + contain one or several of: *moderator*, *participant*, *visitor*. + The default value is shown in the example below: + + **Example**: + + presence_broadcast: + - moderator + - participant + - visitor + + - **public**: *true | false* + The room is public in the list of the MUC + service, so it can be discovered. MUC admins and room participants + will see private rooms in Service Discovery if their XMPP client + supports this feature. The default value is *true*. + + - **public\_list**: *true | false* + The list of participants is public, + without requiring to enter the room. The default value is *true*. + + - **pubsub**: *PubSub Node* + XMPP URI of associated Publish/Subscribe + node. The default value is an empty string. + + - **title**: *Room Title* + A human-readable title of the room. There is + no default value + + - **vcard**: *vCard* + A custom vCard for the room. See the equivalent + mod\_muc option.The default value is an empty string. + + - **voice\_request\_min\_interval**: *Number* + Minimum interval between + voice requests, in seconds. The default value is *1800*. + +- **hibernation\_timeout**: *infinity | Seconds* +Timeout before hibernating the room process, expressed in seconds. The +default value is *infinity*. + +- **history\_size**: *Size* +A small history of the current discussion is sent to users when they +enter the room. With this option you can define the number of history +messages to keep and send to users joining the room. The value is a +non-negative integer. Setting the value to 0 disables the history +feature and, as a result, nothing is kept in memory. The default value +is 20. This value affects all rooms on the service. NOTE: modern XMPP +clients rely on Message Archives (XEP-0313), so feel free to disable the +history feature if you’re only using modern clients and have *mod\_mam* +module loaded. + +- **host** +Deprecated. Use *hosts* instead. + +- **hosts**: *\[Host, ...\]* +This option defines the Jabber IDs of the service. If the *hosts* option +is not specified, the only Jabber ID will be the hostname of the virtual +host with the prefix "conference.". The keyword *@HOST@* is replaced +with the real virtual host name. + +- **max\_captcha\_whitelist**: *Number* + +This option defines the +maximum number of characters that Captcha Whitelist can have when +configuring the room. The default value is *infinity*. + +- **max\_password**: *Number* + +This option defines the +maximum number of characters that Password can have when configuring the +room. The default value is *infinity*. + +- **max\_room\_desc**: *Number* +This option defines the maximum number of characters that Room +Description can have when configuring the room. The default value is +*infinity*. + +- **max\_room\_id**: *Number* +This option defines the maximum number of characters that Room ID can +have when creating a new room. The default value is *infinity*. + +- **max\_room\_name**: *Number* +This option defines the maximum number of characters that Room Name can +have when configuring the room. The default value is *infinity*. + +- **max\_rooms\_discoitems**: *Number* +When there are more rooms than this *Number*, only the non-empty ones +are returned in a Service Discovery query. The default value is *100*. + +- **max\_user\_conferences**: *Number* +This option defines the maximum number of rooms that any given user can +join. The default value is *100*. This option is used to prevent +possible abuses. Note that this is a soft limit: some users can +sometimes join more conferences in cluster configurations. + +- **max\_users**: *Number* +This option defines at the service level, the maximum number of users +allowed per room. It can be lowered in each room configuration but +cannot be increased in individual room configuration. The default value +is *200*. + +- **max\_users\_admin\_threshold**: *Number* +This option defines the number of service admins or room owners allowed +to enter the room when the maximum number of allowed occupants was +reached. The default limit is *5*. + +- **max\_users\_presence**: *Number* +This option defines after how many users in the room, it is considered +overcrowded. When a MUC room is considered overcrowed, presence +broadcasts are limited to reduce load, traffic and excessive presence +"storm" received by participants. The default value is *1000*. + +- **min\_message\_interval**: *Number* +This option defines the minimum interval between two messages send by an +occupant in seconds. This option is global and valid for all rooms. A +decimal value can be used. When this option is not defined, message rate +is not limited. This feature can be used to protect a MUC service from +occupant abuses and limit number of messages that will be broadcasted by +the service. A good value for this minimum message interval is 0.4 +second. If an occupant tries to send messages faster, an error is send +back explaining that the message has been discarded and describing the +reason why the message is not acceptable. + +- **min\_presence\_interval**: *Number* +This option defines the minimum of time between presence changes coming +from a given occupant in seconds. This option is global and valid for +all rooms. A decimal value can be used. When this option is not defined, +no restriction is applied. This option can be used to protect a MUC +service for occupants abuses. If an occupant tries to change its +presence more often than the specified interval, the presence is cached +by ejabberd and only the last presence is broadcasted to all occupants +in the room after expiration of the interval delay. Intermediate +presence packets are silently discarded. A good value for this option is +4 seconds. + +- **name**: *string()* +The value of the service name. This name is only visible in some clients +that support [XEP-0030: Service +Discovery](https://xmpp.org/extensions/xep-0030.html). The default is +*Chatrooms*. + +- **preload\_rooms**: *true | false* +Whether to load all persistent rooms in memory on startup. If disabled, +the room is only loaded on first participant join. The default is +*true*. It makes sense to disable room preloading when the number of +rooms is high: this will improve server startup time and memory +consumption. + +- **queue\_type**: *ram | file* +Same as top-level [queue_type](toplevel.md#queue_type) option, but applied to this module +only. + +- **ram\_db\_type**: *mnesia | sql* +Same as top-level [default_ram_db](toplevel.md#default_ram_db) option, but applied to this module +only. + +- **regexp\_room\_id**: *string()* +This option defines the regular expression that a Room ID must satisfy +to allow the room creation. The default value is the empty string. + +- **room\_shaper**: *none | ShaperName* +This option defines shaper for the MUC rooms. The default value is +*none*. + +- **user\_message\_shaper**: *none | ShaperName* +This option defines shaper for the users messages. The default value is +*none*. + +- **user\_presence\_shaper**: *none | ShaperName* +This option defines shaper for the users presences. The default value is +*none*. + +- **vcard**: *vCard* +A custom vCard of the service that will be displayed by some XMPP +clients in Service Discovery. The value of *vCard* is a YAML map +constructed from an XML representation of vCard. Since the +representation has no attributes, the mapping is straightforward. + +For example, the following XML representation of vCard: + + + Conferences + + + Elm Street + + + +will be translated to: + + vcard: + fn: Conferences + adr: + - + work: true + street: Elm Street + +mod\_muc\_admin +--------------- + +This module provides commands to administer local MUC services and their +MUC rooms. It also provides simple WebAdmin pages to view the existing +rooms. + +This module depends on [mod_muc](#mod_muc). + +__Available options:__ + +- **subscribe\_room\_many\_max\_users**: *Number* + +How many users can be +subscribed to a room at once using the *subscribe\_room\_many* command. +The default value is *50*. + +mod\_muc\_log +------------- + +This module enables optional logging of Multi-User Chat (MUC) public +conversations to HTML. Once you enable this module, users can join a +room using a MUC capable XMPP client, and if they have enough +privileges, they can request the configuration form in which they can +set the option to enable room logging. + +Features: + +- Room details are added on top of each page: room title, JID, author, + subject and configuration. + +- The room JID in the generated HTML is a link to join the room (using + XMPP URI). + +- Subject and room configuration changes are tracked and displayed. + +- Joins, leaves, nick changes, kicks, bans and */me* are tracked and + displayed, including the reason if available. + +- Generated HTML files are XHTML 1.0 Transitional and CSS compliant. + +- Timestamps are self-referencing links. + +- Links on top for quicker navigation: Previous day, Next day, Up. + +- CSS is used for style definition, and a custom CSS file can be used. + +- URLs on messages and subjects are converted to hyperlinks. + +- Timezone used on timestamps is shown on the log files. + +- A custom link can be added on top of each page. + +The module depends on [mod_muc](#mod_muc). + +__Available options:__ + +- **access\_log**: *AccessName* +This option restricts which occupants are allowed to enable or disable +room logging. The default value is *muc\_admin*. NOTE: for this default +setting you need to have an access rule for *muc\_admin* in order to +take effect. + +- **cssfile**: *Path | URL* +With this option you can set whether the HTML files should have a custom +CSS file or if they need to use the embedded CSS. Allowed values are +either *Path* to local file or an *URL* to a remote file. By default a +predefined CSS will be embedded into the HTML page. + +- **dirname**: *room\_jid | room\_name* +Configure the name of the room directory. If set to *room\_jid*, the +room directory name will be the full room JID. Otherwise, the room +directory name will be only the room name, not including the MUC service +name. The default value is *room\_jid*. + +- **dirtype**: *subdirs | plain* +The type of the created directories can be specified with this option. +If set to *subdirs*, subdirectories are created for each year and month. +Otherwise, the names of the log files contain the full date, and there +are no subdirectories. The default value is *subdirs*. + +- **file\_format**: *html | plaintext* +Define the format of the log files: *html* stores in HTML format, +*plaintext* stores in plain text. The default value is *html*. + +- **file\_permissions**: *{mode: Mode, group: Group}* +Define the permissions that must be used when creating the log files: +the number of the mode, and the numeric id of the group that will own +the files. The default value is shown in the example below: + + **Example**: + + file_permissions: + mode: 644 + group: 33 + +- **outdir**: *Path* +This option sets the full path to the directory in which the HTML files +should be stored. Make sure the ejabberd daemon user has write access on +that directory. The default value is *www/muc*. + +- **spam\_prevention**: *true | false* +If set to *true*, a special attribute is added to links that prevent +their indexation by search engines. The default value is *true*, which +mean that *nofollow* attributes will be added to user submitted links. + +- **timezone**: *local | universal* +The time zone for the logs is configurable with this option. If set to +*local*, the local time, as reported to Erlang emulator by the operating +system, will be used. Otherwise, UTC time will be used. The default +value is *local*. + +- **top\_link**: *{URL: Text}* +With this option you can customize the link on the top right corner of +each log file. The default value is shown in the example below: + + **Example**: + + top_link: + /: Home + +- **url**: *URL* +A top level *URL* where a client can access logs of a particular +conference. The conference name is appended to the URL if *dirname* +option is set to *room\_name* or a conference JID is appended to the +*URL* otherwise. There is no default value. + +mod\_muc\_occupantid +-------------------- + +This module implements [XEP-0421: Anonymous unique occupant identifiers +for MUCs](https://xmpp.org/extensions/xep-0421.html). + +When the module is enabled, the feature is enabled in all semi-anonymous +rooms. + +This module is available since ejabberd [23.10](../../archive/23.10/index.md). + +The module has no options. + +mod\_muc\_rtbl +-------------- + +This module implement Real-time blocklists for MUC rooms. + +It works by observing remote pubsub node conforming with specification +described in . + +This module is available since ejabberd [23.04](../../archive/23.04/index.md). + +__Available options:__ + +- **rtbl\_node**: *PubsubNodeName* +Name of pubsub node that should be used to track blocked users. The +default value is *muc\_bans\_sha256*. + +- **rtbl\_server**: *Domain* +Domain of xmpp server that serves block list. The default value is +*xmppbl.org* + +mod\_multicast +-------------- + +This module implements a service for [XEP-0033: Extended Stanza +Addressing](https://xmpp.org/extensions/xep-0033.html). + +__Available options:__ + +- **access**: *Access* +The access rule to restrict who can send packets to the multicast +service. Default value: *all*. + +- **host** +Deprecated. Use *hosts* instead. + +- **hosts**: *\[Host, ...\]* +This option defines the Jabber IDs of the service. If the *hosts* option +is not specified, the only Jabber ID will be the hostname of the virtual +host with the prefix "multicast.". The keyword *@HOST@* is replaced with +the real virtual host name. The default value is *multicast.@HOST@*. + +- **limits**: *Sender: Stanza: Number* +Specify a list of custom limits which override the default ones defined +in XEP-0033. Limits are defined per sender type and stanza type, where: + + - *sender* can be: *local* or *remote*. + + - *stanza* can be: *message* or *presence*. + + - *number* can be a positive integer or *infinite*. + + **Example**: + + # Default values: + local: + message: 100 + presence: 100 + remote: + message: 20 + presence: 20 + +- **name** +Service name to provide in the Info query to the Service Discovery. +Default is *"Multicast"*. + +- **vcard** +vCard element to return when queried. Default value is *undefined*. + +__**Example**:__ + + # Only admins can send packets to multicast service + access_rules: + multicast: + - allow: admin + + # If you want to allow all your users: + access_rules: + multicast: + - allow + + # This allows both admins and remote users to send packets, + # but does not allow local users + acl: + allservers: + server_glob: "*" + access_rules: + multicast: + - allow: admin + - deny: local + - allow: allservers + + modules: + mod_multicast: + host: multicast.example.org + access: multicast + limits: + local: + message: 40 + presence: infinite + remote: + message: 150 + +mod\_offline +------------ + +This module implements [XEP-0160: Best Practices for Handling Offline +Messages](https://xmpp.org/extensions/xep-0160.html) and [XEP-0013: +Flexible Offline Message +Retrieval](https://xmpp.org/extensions/xep-0013.html). This means that +all messages sent to an offline user will be stored on the server until +that user comes online again. Thus it is very similar to how email +works. A user is considered offline if no session presence priority > +0 are currently open. + +> **Note** +> +> *ejabberdctl* has a command to delete expired messages (see chapter +> [Managing an ejabberd server](../../admin/guide/managing.md) in online +> documentation. + +__Available options:__ + +- **access\_max\_user\_messages**: *AccessName* +This option defines which access rule will be enforced to limit the +maximum number of offline messages that a user can have (quota). When a +user has too many offline messages, any new messages that they receive +are discarded, and a <resource-constraint/> error is returned to +the sender. The default value is *max\_user\_offline\_messages*. + +- **bounce\_groupchat**: *true | false* +This option is use the disable an optimisation that avoids bouncing +error messages when groupchat messages could not be stored as offline. +It will reduce chat room load, without any drawback in standard use +cases. You may change default value only if you have a custom module +which uses offline hook after *mod\_offline*. This option can be useful +for both standard MUC and MucSub, but the bounce is much more likely to +happen in the context of MucSub, so it is even more important to have it +on large MucSub services. The default value is *false*, meaning the +optimisation is enabled. + +- **cache\_life\_time**: *timeout()* +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module +only. + +- **cache\_size**: *pos\_integer() | infinity* +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module +only. + +- **db\_type**: *mnesia | sql* +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module +only. + +- **store\_empty\_body**: *true | false | unless\_chat\_state* +Whether or not to store messages that lack a <body/> element. The +default value is *unless\_chat\_state*, which tells ejabberd to store +messages even if they lack the <body/> element, unless they only +contain a chat state notification (as defined in [XEP-0085: Chat State +Notifications](https://xmpp.org/extensions/xep-0085.html). + +- **store\_groupchat**: *true | false* +Whether or not to store groupchat messages. The default value is +*false*. + +- **use\_cache**: *true | false* +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. + +- **use\_mam\_for\_storage**: *true | false* +This is an experimental option. Enabling this option, *mod\_offline* +uses the *mod\_mam* archive table instead of its own spool table to +retrieve the messages received when the user was offline. This allows +client developers to slowly drop XEP-0160 and rely on XEP-0313 instead. +It also further reduces the storage required when you enable MucSub. +Enabling this option has a known drawback for the moment: most of +flexible message retrieval queries don’t work (those that allow +retrieval/deletion of messages by id), but this specification is not +widely used. The default value is *false* to keep former behaviour as +default. + +__Examples:__ + +This example allows power users to have as much as 5000 offline +messages, administrators up to 2000, and all the other users up to 100: + + acl: + admin: + user: + - admin1@localhost + - admin2@example.org + poweruser: + user: + - bob@example.org + - jane@example.org + + shaper_rules: + max_user_offline_messages: + - 5000: poweruser + - 2000: admin + - 100 + + modules: + ... + mod_offline: + access_max_user_messages: max_user_offline_messages + ... + +mod\_ping +--------- + +This module implements support for [XEP-0199: XMPP +Ping](https://xmpp.org/extensions/xep-0199.html) and periodic +keepalives. When this module is enabled ejabberd responds correctly to +ping requests, as defined by the protocol. + +__Available options:__ + +- **ping\_ack\_timeout**: *timeout()* +How long to wait before deeming that a client has not answered a given +server ping request. NOTE: when [mod_stream_mgmt](#mod_stream_mgmt) is loaded and stream +management is enabled by a client, this value is ignored, and the +`ack_timeout` applies instead. The default value is *undefined*. + +- **ping\_interval**: *timeout()* +How often to send pings to connected clients, if option *send\_pings* is +set to *true*. If a client connection does not send or receive any +stanza within this interval, a ping request is sent to the client. The +default value is *1* minute. + +- **send\_pings**: *true | false* +If this option is set to *true*, the server sends pings to connected +clients that are not active in a given interval defined in +*ping\_interval* option. This is useful to keep client connections alive +or checking availability. The default value is *false*. + +- **timeout\_action**: *none | kill* +What to do when a client does not answer to a server ping request in +less than period defined in *ping\_ack\_timeout* option: *kill* means +destroying the underlying connection, *none* means to do nothing. NOTE: +when [mod_stream_mgmt](#mod_stream_mgmt) is loaded and stream management is enabled by a +client, killing the client connection doesn’t mean killing the client +session - the session will be kept alive in order to give the client a +chance to resume it. The default value is *none*. + +__**Example**:__ + + modules: + ... + mod_ping: + send_pings: true + ping_interval: 4 min + timeout_action: kill + ... + +mod\_pres\_counter +------------------ + +This module detects flood/spam in presence subscriptions traffic. If a +user sends or receives more of those stanzas in a given time interval, +the exceeding stanzas are silently dropped, and a warning is logged. + +__Available options:__ + +- **count**: *Number* +The number of subscription presence stanzas (subscribe, unsubscribe, +subscribed, unsubscribed) allowed for any direction (input or output) +per time defined in *interval* option. Please note that two users +subscribing to each other usually generate 4 stanzas, so the recommended +value is *4* or more. The default value is *5*. + +- **interval**: *timeout()* +The time interval. The default value is *1* minute. + +__**Example**:__ + + modules: + ... + mod_pres_counter: + count: 5 + interval: 30 secs + ... + +mod\_privacy +------------ + +This module implements [XEP-0016: Privacy +Lists](https://xmpp.org/extensions/xep-0016.html). + +> **Note** +> +> Nowadays modern XMPP clients rely on [XEP-0191: Blocking +> Command](https://xmpp.org/extensions/xep-0191.html) which is +> implemented by *mod\_blocking* module. However, you still need +> *mod\_privacy* loaded in order for [mod_blocking](#mod_blocking) to work. + +__Available options:__ + +- **cache\_life\_time**: *timeout()* +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module +only. + +- **cache\_missed**: *true | false* +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module +only. + +- **cache\_size**: *pos\_integer() | infinity* +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module +only. + +- **db\_type**: *mnesia | sql* +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module +only. + +- **use\_cache**: *true | false* +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. + +mod\_private +------------ + +This module adds support for [XEP-0049: Private XML +Storage](https://xmpp.org/extensions/xep-0049.html). + +Using this method, XMPP entities can store private data on the server, +retrieve it whenever necessary and share it between multiple connected +clients of the same user. The data stored might be anything, as long as +it is a valid XML. One typical usage is storing a bookmark of all user’s +conferences ([XEP-0048: +Bookmarks](https://xmpp.org/extensions/xep-0048.html)). + +It also implements the bookmark conversion described in [XEP-0402: PEP +Native Bookmarks](https://xmpp.org/extensions/xep-0402.html), see the +command [bookmarks_to_pep](../../developer/ejabberd-api/admin-api.md#bookmarks_to_pep) API. + +__Available options:__ + +- **cache\_life\_time**: *timeout()* +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module +only. + +- **cache\_missed**: *true | false* +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module +only. + +- **cache\_size**: *pos\_integer() | infinity* +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module +only. + +- **db\_type**: *mnesia | sql* +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module +only. + +- **use\_cache**: *true | false* +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. + +mod\_privilege +-------------- + +This module is an implementation of [XEP-0356: Privileged +Entity](https://xmpp.org/extensions/xep-0356.html). This extension +allows components to have privileged access to other entity data (send +messages on behalf of the server or on behalf of a user, get/set user +roster, access presence information, etc.). This may be used to write +powerful external components, for example implementing an external +[PEP](https://xmpp.org/extensions/xep-0163.html) or +[MAM](https://xmpp.org/extensions/xep-0313.html) service. + +By default a component does not have any privileged access. It is worth +noting that the permissions grant access to the component to a specific +data type for all users of the virtual host on which *mod\_privilege* is +loaded. + +Make sure you have a listener configured to connect your component. +Check the section about listening ports for more information. + +> **Warning** +> +> Security issue: Privileged access gives components access to sensitive +> data, so permission should be granted carefully, only if you trust a +> component. + +> **Note** +> +> This module is complementary to [mod_delegation](#mod_delegation), but can also be +> used separately. + +__Available options:__ + +- **message**: *Options* +This option defines permissions for messages. By default no permissions +are given. The *Options* are: + + - **outgoing**: *AccessName* + The option defines an access rule for + sending outgoing messages by the component. The default value is + *none*. + +- **presence**: *Options* +This option defines permissions for presences. By default no permissions +are given. The *Options* are: + + - **managed\_entity**: *AccessName* + An access rule that gives + permissions to the component to receive server presences. The + default value is *none*. + + - **roster**: *AccessName* + An access rule that gives permissions to + the component to receive the presence of both the users and the + contacts in their roster. The default value is *none*. + +- **roster**: *Options* +This option defines roster permissions. By default no permissions are +given. The *Options* are: + + - **both**: *AccessName* + Sets read/write access to a user’s roster. + The default value is *none*. + + - **get**: *AccessName* + Sets read access to a user’s roster. The + default value is *none*. + + - **set**: *AccessName* + Sets write access to a user’s roster. The + default value is *none*. + +__**Example**:__ + + modules: + ... + mod_privilege: + roster: + get: all + presence: + managed_entity: all + message: + outgoing: all + ... + +mod\_proxy65 +------------ + +This module implements [XEP-0065: SOCKS5 +Bytestreams](https://xmpp.org/extensions/xep-0065.html). It allows +ejabberd to act as a file transfer proxy between two XMPP clients. + +__Available options:__ + +- **access**: *AccessName* +Defines an access rule for file transfer initiators. The default value +is *all*. You may want to restrict access to the users of your server +only, in order to avoid abusing your proxy by the users of remote +servers. + +- **auth\_type**: *anonymous | plain* +SOCKS5 authentication type. The default value is *anonymous*. If set to +*plain*, ejabberd will use authentication backend as it would for SASL +PLAIN. + +- **host** +Deprecated. Use *hosts* instead. + +- **hostname**: *Host* +Defines a hostname offered by the proxy when establishing a session with +clients. This is useful when you run the proxy behind a NAT. The keyword +*@HOST@* is replaced with the virtual host name. The default is to use +the value of *ip* option. Examples: *proxy.mydomain.org*, +*200.150.100.50*. + +- **hosts**: *\[Host, ...\]* +This option defines the Jabber IDs of the service. If the *hosts* option +is not specified, the only Jabber ID will be the hostname of the virtual +host with the prefix "proxy.". The keyword *@HOST@* is replaced with the +real virtual host name. + +- **ip**: *IPAddress* +This option specifies which network interface to listen for. The default +value is an IP address of the service’s DNS name, or, if fails, +*127.0.0.1*. + +- **max\_connections**: *pos\_integer() | infinity* +Maximum number of active connections per file transfer initiator. The +default value is *infinity*. + +- **name**: *Name* +The value of the service name. This name is only visible in some clients +that support [XEP-0030: Service +Discovery](https://xmpp.org/extensions/xep-0030.html). The default is +"SOCKS5 Bytestreams". + +- **port**: *1..65535* +A port number to listen for incoming connections. The default value is +*7777*. + +- **ram\_db\_type**: *mnesia | redis | sql* +Same as top-level [default_ram_db](toplevel.md#default_ram_db) option, but applied to this module +only. + +- **recbuf**: *Size* +A size of the buffer for incoming packets. If you define a shaper, set +the value of this option to the size of the shaper in order to avoid +traffic spikes in file transfers. The default value is *65536* bytes. + +- **shaper**: *Shaper* +This option defines a shaper for the file transfer peers. A shaper with +the maximum bandwidth will be selected. The default is *none*, i.e. no +shaper. + +- **sndbuf**: *Size* +A size of the buffer for outgoing packets. If you define a shaper, set +the value of this option to the size of the shaper in order to avoid +traffic spikes in file transfers. The default value is *65536* bytes. + +- **vcard**: *vCard* +A custom vCard of the service that will be displayed by some XMPP +clients in Service Discovery. The value of *vCard* is a YAML map +constructed from an XML representation of vCard. Since the +representation has no attributes, the mapping is straightforward. + +For example, the following XML representation of vCard: + + + Conferences + + + Elm Street + + + +will be translated to: + + vcard: + fn: Conferences + adr: + - + work: true + street: Elm Street + +__**Example**:__ + + acl: + admin: + user: admin@example.org + proxy_users: + server: example.org + + access_rules: + proxy65_access: + allow: proxy_users + + shaper_rules: + proxy65_shaper: + none: admin + proxyrate: proxy_users + + shaper: + proxyrate: 10240 + + modules: + ... + mod_proxy65: + host: proxy1.example.org + name: "File Transfer Proxy" + ip: 200.150.100.1 + port: 7778 + max_connections: 5 + access: proxy65_access + shaper: proxy65_shaper + recbuf: 10240 + sndbuf: 10240 + ... + +mod\_pubsub +----------- + +This module offers a service for [XEP-0060: +Publish-Subscribe](https://xmpp.org/extensions/xep-0060.html). The +functionality in *mod\_pubsub* can be extended using plugins. The plugin +that implements PEP ([XEP-0163: Personal Eventing via +Pubsub](https://xmpp.org/extensions/xep-0163.html)) is enabled in the +default ejabberd configuration file, and it requires [mod_caps](#mod_caps). + +__Available options:__ + +- **access\_createnode**: *AccessName* +This option restricts which users are allowed to create pubsub nodes +using *acl* and *access*. By default any account in the local ejabberd +server is allowed to create pubsub nodes. The default value is: *all*. + +- **db\_type**: *mnesia | sql* +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module +only. + +- **default\_node\_config**: *List of Key:Value* +To override default node configuration, regardless of node plugin. Value +is a list of key-value definition. Node configuration still uses default +configuration defined by node plugin, and overrides any items by value +defined in this configurable list. + +- **force\_node\_config**: *List of Node and the list of its Key:Value* +Define the configuration for given nodes. The default value is: *\[\]*. + + **Example**: + + force_node_config: + ## Avoid buggy clients to make their bookmarks public + storage:bookmarks: + access_model: whitelist + +- **host** +Deprecated. Use *hosts* instead. + +- **hosts**: *\[Host, ...\]* +This option defines the Jabber IDs of the service. If the *hosts* option +is not specified, the only Jabber ID will be the hostname of the virtual +host with the prefix "pubsub.". The keyword *@HOST@* is replaced with +the real virtual host name. + +- **ignore\_pep\_from\_offline**: *false | true* +To specify whether or not we should get last published PEP items from +users in our roster which are offline when we connect. Value is *true* +or *false*. If not defined, pubsub assumes true so we only get last +items of online contacts. + +- **last\_item\_cache**: *false | true* +To specify whether or not pubsub should cache last items. Value is +*true* or *false*. If not defined, pubsub does not cache last items. On +systems with not so many nodes, caching last items speeds up pubsub and +allows you to raise the user connection rate. The cost is memory usage, +as every item is stored in memory. + +- **max\_item\_expire\_node**: *timeout() | infinity* + +Specify the maximum item epiry +time. Default value is: *infinity*. + +- **max\_items\_node**: *non\_neg\_integer() | infinity* +Define the maximum number of items that can be stored in a node. Default +value is: *1000*. + +- **max\_nodes\_discoitems**: *pos\_integer() | infinity* +The maximum number of nodes to return in a discoitem response. The +default value is: *100*. + +- **max\_subscriptions\_node**: *MaxSubs* +Define the maximum number of subscriptions managed by a node. Default +value is no limitation: *undefined*. + +- **name**: *Name* +The value of the service name. This name is only visible in some clients +that support [XEP-0030: Service +Discovery](https://xmpp.org/extensions/xep-0030.html). The default is +*vCard User Search*. + +- **nodetree**: *Nodetree* +To specify which nodetree to use. If not defined, the default pubsub +nodetree is used: *tree*. Only one nodetree can be used per host, and is +shared by all node plugins. + + - *tree* nodetree store node configuration and relations on the + database. *flat* nodes are stored without any relationship, and + *hometree* nodes can have child nodes. + + - *virtual* nodetree does not store nodes on database. This saves + resources on systems with tons of nodes. If using the *virtual* + nodetree, you can only enable those node plugins: *\[flat, pep\]* or + *\[flat\]*; any other plugins configuration will not work. Also, all + nodes will have the default configuration, and this can not be + changed. Using *virtual* nodetree requires to start from a clean + database, it will not work if you used the default *tree* nodetree + before. + +- **pep\_mapping**: *List of Key:Value* +In this option you can provide a list of key-value to choose defined +node plugins on given PEP namespace. The following example will use +*node\_tune* instead of *node\_pep* for every PEP node with the tune +namespace: + + **Example**: + + modules: + ... + mod_pubsub: + pep_mapping: + http://jabber.org/protocol/tune: tune + ... + +- **plugins**: *\[Plugin, ...\]* +To specify which pubsub node plugins to use. The first one in the list +is used by default. If this option is not defined, the default plugins +list is: *\[flat\]*. PubSub clients can define which plugin to use when +creating a node: add *type='plugin-name*' attribute to the *create* +stanza element. + + - *flat* plugin handles the default behaviour and follows standard + XEP-0060 implementation. + + - *pep* plugin adds extension to handle Personal Eventing Protocol + (XEP-0163) to the PubSub engine. When enabled, PEP is handled + automatically. + +- **vcard**: *vCard* +A custom vCard of the server that will be displayed by some XMPP clients +in Service Discovery. The value of *vCard* is a YAML map constructed +from an XML representation of vCard. Since the representation has no +attributes, the mapping is straightforward. + +The following XML representation of vCard: + + + PubSub Service + + + Elm Street + + + +will be translated to: + + vcard: + fn: PubSub Service + adr: + - + work: true + street: Elm Street + +__Examples:__ + +Example of configuration that uses flat nodes as default, and allows use +of flat, hometree and pep nodes: + + modules: + ... + mod_pubsub: + access_createnode: pubsub_createnode + max_subscriptions_node: 100 + default_node_config: + notification_type: normal + notify_retract: false + max_items: 4 + plugins: + - flat + - pep + ... + +Using relational database requires using mod\_pubsub with db\_type +*sql*. Only flat, hometree and pep plugins supports SQL. The following +example shows previous configuration with SQL usage: + + modules: + ... + mod_pubsub: + db_type: sql + access_createnode: pubsub_createnode + ignore_pep_from_offline: true + last_item_cache: false + plugins: + - flat + - pep + ... + +mod\_push +--------- + +This module implements the XMPP server’s part of the push notification +solution specified in [XEP-0357: Push +Notifications](https://xmpp.org/extensions/xep-0357.html). It does not +generate, for example, APNS or FCM notifications directly. Instead, it’s +designed to work with so-called "app servers" operated by third-party +vendors of mobile apps. Those app servers will usually trigger +notification delivery to the user’s mobile device using +platform-dependant backend services such as FCM or APNS. + +__Available options:__ + +- **cache\_life\_time**: *timeout()* +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module +only. + +- **cache\_missed**: *true | false* +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module +only. + +- **cache\_size**: *pos\_integer() | infinity* +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module +only. + +- **db\_type**: *mnesia | sql* +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module +only. + +- **include\_body**: *true | false | Text* +If this option is set to *true*, the message text is included with push +notifications generated for incoming messages with a body. The option +can instead be set to a static *Text*, in which case the specified text +will be included in place of the actual message body. This can be useful +to signal the app server whether the notification was triggered by a +message with body (as opposed to other types of traffic) without leaking +actual message contents. The default value is "New message". + +- **include\_sender**: *true | false* +If this option is set to *true*, the sender’s JID is included with push +notifications generated for incoming messages with a body. The default +value is *false*. + +- **notify\_on**: *messages | all* + +If this option is set to +*messages*, notifications are generated only for actual chat messages +with a body text (or some encrypted payload). If it’s set to *all*, any +kind of XMPP stanza will trigger a notification. If unsure, it’s +strongly recommended to stick to *all*, which is the default value. + +- **use\_cache**: *true | false* +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. + +mod\_push\_keepalive +-------------------- + +This module tries to keep the stream management session (see +[mod_stream_mgmt](#mod_stream_mgmt)) of a disconnected mobile client alive if the client +enabled push notifications for that session. However, the normal session +resumption timeout is restored once a push notification is issued, so +the session will be closed if the client doesn’t respond to push +notifications. + +The module depends on [mod_push](#mod_push). + +__Available options:__ + +- **resume\_timeout**: *timeout()* +This option specifies the period of time until the session of a +disconnected push client times out. This timeout is only in effect as +long as no push notification is issued. Once that happened, the +resumption timeout configured for [mod_stream_mgmt](#mod_stream_mgmt) is restored. The +default value is *72* hours. + +- **wake\_on\_start**: *true | false* +If this option is set to *true*, notifications are generated for **all** +registered push clients during server startup. This option should not be +enabled on servers with many push clients as it can generate significant +load on the involved push services and the server itself. The default +value is *false*. + +- **wake\_on\_timeout**: *true | false* +If this option is set to *true*, a notification is generated shortly +before the session would time out as per the *resume\_timeout* option. +The default value is *true*. + +mod\_register +------------- + +This module adds support for [XEP-0077: In-Band +Registration](https://xmpp.org/extensions/xep-0077.html). This protocol +enables end users to use an XMPP client to: + +- Register a new account on the server. + +- Change the password from an existing account on the server. + +- Delete an existing account on the server. + +This module reads also the top-level [registration_timeout](toplevel.md#registration_timeout) option +defined globally for the server, so please check that option +documentation too. + +__Available options:__ + +- **access**: *AccessName* +Specify rules to restrict what usernames can be registered. If a rule +returns *deny* on the requested username, registration of that user name +is denied. There are no restrictions by default. + +- **access\_from**: *AccessName* +By default, *ejabberd* doesn’t allow the client to register new accounts +from s2s or existing c2s sessions. You can change it by defining access +rule in this option. Use with care: allowing registration from s2s leads +to uncontrolled massive accounts creation by rogue users. + +- **access\_remove**: *AccessName* +Specify rules to restrict access for user unregistration. By default any +user is able to unregister their account. + +- **allow\_modules**: *all | \[Module, ...\]* + +List of modules that can +register accounts, or *all*. The default value is *all*, which is +equivalent to something like *\[mod\_register, mod\_register\_web\]*. + +- **captcha\_protected**: *true | false* +Protect registrations with [CAPTCHA](../../admin/configuration/basic.md#captcha). The default is +*false*. + +- **ip\_access**: *AccessName* +Define rules to allow or deny account registration depending on the IP +address of the XMPP client. The *AccessName* should be of type *ip*. The +default value is *all*. + +- **password\_strength**: *Entropy* +This option sets the minimum [Shannon +entropy](https://en.wikipedia.org/wiki/Entropy_(information_theory)) for +passwords. The value *Entropy* is a number of bits of entropy. The +recommended minimum is 32 bits. The default is *0*, i.e. no checks are +performed. + +- **redirect\_url**: *URL* +This option enables registration redirection as described in [XEP-0077: +In-Band Registration: +Redirection](https://xmpp.org/extensions/xep-0077.html#redirect). + +- **registration\_watchers**: *\[JID, ...\]* +This option defines a list of JIDs which will be notified each time a +new account is registered. + +- **welcome\_message**: *{subject: Subject, body: Body}* +Set a welcome message that is sent to each newly registered account. The +message will have subject *Subject* and text *Body*. + +mod\_register\_web +------------------ + +This module provides a web page where users can: + +- Register a new account on the server. + +- Change the password from an existing account on the server. + +- Unregister an existing account on the server. + +This module supports [CAPTCHA](../../admin/configuration/basic.md#captcha) to register a new +account. To enable this feature, configure the top-level [captcha_cmd](toplevel.md#captcha_cmd) +and top-level [captcha_url](toplevel.md#captcha_url) options. + +As an example usage, the users of the host *localhost* can visit the +page: *https://localhost:5280/register/* It is important to include the +last / character in the URL, otherwise the subpages URL will be +incorrect. + +This module is enabled in *listen* → *ejabberd\_http* → +[request_handlers](listen-options.md#request_handlers), no need to +enable in *modules*. The module depends on [mod_register](#mod_register) where all +the configuration is performed. + +The module has no options. + +__**Example**:__ + + listen: + - + port: 5280 + module: ejabberd_http + request_handlers: + /register: mod_register_web + + modules: + mod_register: {} + +mod\_roster +----------- + +This module implements roster management as defined in [RFC6121 Section +2](https://tools.ietf.org/html/rfc6121#section-2). The module also adds +support for [XEP-0237: Roster +Versioning](https://xmpp.org/extensions/xep-0237.html). + +__Available options:__ + +- **access**: *AccessName* +This option can be configured to specify rules to restrict roster +management. If the rule returns *deny* on the requested user name, that +user cannot modify their personal roster, i.e. they cannot +add/remove/modify contacts or send presence subscriptions. The default +value is *all*, i.e. no restrictions. + +- **cache\_life\_time**: *timeout()* +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module +only. + +- **cache\_missed**: *true | false* +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module +only. + +- **cache\_size**: *pos\_integer() | infinity* +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module +only. + +- **db\_type**: *mnesia | sql* +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module +only. + +- **store\_current\_id**: *true | false* +If this option is set to *true*, the current roster version number is +stored on the database. If set to *false*, the roster version number is +calculated on the fly each time. Enabling this option reduces the load +for both ejabberd and the database. This option does not affect the +client in any way. This option is only useful if option *versioning* is +set to *true*. The default value is *false*. IMPORTANT: if you use +[mod_shared_roster](#mod_shared_roster) or [mod_shared_roster_ldap](#mod_shared_roster_ldap), you must set the +value of the option to *false*. + +- **use\_cache**: *true | false* +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. + +- **versioning**: *true | false* +Enables/disables Roster Versioning. The default value is *false*. + +__**Example**:__ + + modules: + ... + mod_roster: + versioning: true + store_current_id: false + ... + +mod\_s2s\_dialback +------------------ + +The module adds support for [XEP-0220: Server +Dialback](https://xmpp.org/extensions/xep-0220.html) to provide server +identity verification based on DNS. + +> **Warning** +> +> DNS-based verification is vulnerable to [DNS cache +> poisoning](https://en.wikipedia.org/wiki/DNS_spoofing), so modern +> servers rely on verification based on PKIX certificates. Thus this +> module is only recommended for backward compatibility with servers +> running outdated software or non-TLS servers, or those with invalid +> certificates (as long as you accept the risks, e.g. you assume that +> the remote server has an invalid certificate due to poor +> administration and not because it’s compromised). + +__Available options:__ + +- **access**: *AccessName* +An access rule that can be used to restrict dialback for some servers. +The default value is *all*. + +__**Example**:__ + + modules: + ... + mod_s2s_dialback: + access: + allow: + server: legacy.domain.tld + server: invalid-cert.example.org + deny: all + ... + +mod\_service\_log +----------------- + +This module forwards copies of all stanzas to remote XMPP servers or +components. Every stanza is encapsulated into <forwarded/> element +as described in [XEP-0297: Stanza +Forwarding](https://xmpp.org/extensions/xep-0297.html). + +__Available options:__ + +- **loggers**: *\[Domain, ...\]* +A list of servers or connected components to which stanzas will be +forwarded. + +__**Example**:__ + + modules: + ... + mod_service_log: + loggers: + - xmpp-server.tld + - component.domain.tld + ... + +mod\_shared\_roster +------------------- + +This module enables you to create shared roster groups: groups of +accounts that can see members from (other) groups in their rosters. + +The big advantages of this feature are that end users do not need to +manually add all users to their rosters, and that they cannot +permanently delete users from the shared roster groups. A shared roster +group can have members from any XMPP server, but the presence will only +be available from and to members of the same virtual host where the +group is created. It still allows the users to have / add their own +contacts, as it does not replace the standard roster. Instead, the +shared roster contacts are merged to the relevant users at retrieval +time. The standard user rosters thus stay unmodified. + +Shared roster groups can be edited via the Web Admin, and some API +commands called *srg\_\**. Each group has a unique name and those +parameters: + +- Label: Used in the rosters where this group is displayed. + +- Description: of the group, which has no effect. + +- Members: A list of JIDs of group members, entered one per line in + the Web Admin. The special member directive *@all@* represents all + the registered users in the virtual host; which is only recommended + for a small server with just a few hundred users. The special member + directive *@online@* represents the online users in the virtual + host. With those two directives, the actual list of members in those + shared rosters is generated dynamically at retrieval time. + +- Displayed: A list of groups that will be in the rosters of this + group’s members. A group of other vhost can be identified with + *groupid@vhost*. + +This module depends on [mod_roster](#mod_roster). If not enabled, roster queries +will return 503 errors. + +__Available options:__ + +- **cache\_life\_time**: *timeout()* +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module +only. + +- **cache\_missed**: *true | false* +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module +only. + +- **cache\_size**: *pos\_integer() | infinity* +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module +only. + +- **db\_type**: *mnesia | sql* +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module +only. + +- **use\_cache**: *true | false* +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. + +__Examples:__ + +Take the case of a computer club that wants all its members seeing each +other in their rosters. To achieve this, they need to create a shared +roster group similar to this one: + + Name: club_members + Label: Club Members + Description: Members from the computer club + Members: member1@example.org, member2@example.org, member3@example.org + Displayed Groups: club_members + +In another case we have a company which has three divisions: Management, +Marketing and Sales. All group members should see all other members in +their rosters. Additionally, all managers should have all marketing and +sales people in their roster. Simultaneously, all marketeers and the +whole sales team should see all managers. This scenario can be achieved +by creating shared roster groups as shown in the following lists: + + First list: + Name: management + Label: Management + Description: Management + Members: manager1@example.org, manager2@example.org + Displayed: management, marketing, sales + + Second list: + Name: marketing + Label: Marketing + Description: Marketing + Members: marketeer1@example.org, marketeer2@example.org, marketeer3@example.org + Displayed: management, marketing + + Third list: + Name: sales + Label: Sales + Description: Sales + Members: salesman1@example.org, salesman2@example.org, salesman3@example.org + Displayed: management, sales + +mod\_shared\_roster\_ldap +------------------------- + +This module lets the server administrator automatically populate users' +rosters (contact lists) with entries based on users and groups defined +in an LDAP-based directory. + +> **Note** +> +> *mod\_shared\_roster\_ldap* depends on *mod\_roster* being enabled. +> Roster queries will return *503* errors if *mod\_roster* is not +> enabled. + +The module accepts many configuration options. Some of them, if +unspecified, default to the values specified for the top level of +configuration. This lets you avoid specifying, for example, the bind +password in multiple places. + +- Filters: *ldap\_rfilter*, *ldap\_ufilter*, *ldap\_gfilter*, + *ldap\_filter*. These options specify LDAP filters used to query for + shared roster information. All of them are run against the + ldap\_base. + +- Attributes: *ldap\_groupattr*, *ldap\_groupdesc*, + *ldap\_memberattr*, *ldap\_userdesc*, *ldap\_useruid*. These options + specify the names of the attributes which hold interesting data in + the entries returned by running filters specified with the filter + options. + +- Control parameters: *ldap\_auth\_check*, + *ldap\_group\_cache\_validity*, *ldap\_memberattr\_format*, + *ldap\_memberattr\_format\_re*, *ldap\_user\_cache\_validity*. These + parameters control the behaviour of the module. + +- Connection parameters: The module also accepts the connection + parameters, all of which default to the top-level parameter of the + same name, if unspecified. See + [LDAP Connection](../../admin/configuration/ldap.md#ldap-connection) section for more + information about them. + +Check also the [Configuration examples](../../admin/configuration/ldap.md#ldap-examples) section +to get details about retrieving the roster, and configuration examples +including Flat DIT and Deep DIT. + +__Available options:__ + +- **cache\_life\_time** +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module +only. + +- **cache\_missed** +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module +only. + +- **cache\_size** +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module +only. + +- **ldap\_auth\_check**: *true | false* +Whether the module should check (via the ejabberd authentication +subsystem) for existence of each user in the shared LDAP roster. Set to +*false* if you want to disable the check. Default value is *true*. + +- **ldap\_backups** +Same as top-level [ldap_backups](toplevel.md#ldap_backups) option, but applied to this module +only. + +- **ldap\_base** +Same as top-level [ldap_base](toplevel.md#ldap_base) option, but applied to this module only. + +- **ldap\_deref\_aliases** +Same as top-level [ldap_deref_aliases](toplevel.md#ldap_deref_aliases) option, but applied to this +module only. + +- **ldap\_encrypt** +Same as top-level [ldap_encrypt](toplevel.md#ldap_encrypt) option, but applied to this module +only. + +- **ldap\_filter** +Additional filter which is AND-ed together with "User Filter" and "Group +Filter". For more information check the LDAP [Filters](../../admin/configuration/ldap.md#filters) +section. + +- **ldap\_gfilter** +"Group Filter", used when retrieving human-readable name (a.k.a. +"Display Name") and the members of a group. See also the parameters +*ldap\_groupattr*, *ldap\_groupdesc* and *ldap\_memberattr*. If +unspecified, defaults to the top-level parameter of the same name. If +that one also is unspecified, then the filter is constructed exactly +like "User Filter". + +- **ldap\_groupattr** +The name of the attribute that holds the group name, and that is used to +differentiate between them. Retrieved from results of the "Roster +Filter" and "Group Filter". Defaults to *cn*. + +- **ldap\_groupdesc** +The name of the attribute which holds the human-readable group name in +the objects you use to represent groups. Retrieved from results of the +"Group Filter". Defaults to whatever *ldap\_groupattr* is set. + +- **ldap\_memberattr** +The name of the attribute which holds the IDs of the members of a group. +Retrieved from results of the "Group Filter". Defaults to *memberUid*. +The name of the attribute differs depending on the objectClass you use +for your group objects, for example: *posixGroup* → *memberUid*; +*groupOfNames* → *member*; *groupOfUniqueNames* → *uniqueMember*. + +- **ldap\_memberattr\_format** +A globbing format for extracting user ID from the value of the attribute +named by *ldap\_memberattr*. Defaults to *%u*, which means that the +whole value is the member ID. If you change it to something different, +you may also need to specify the User and Group Filters manually; see +section Filters. + +- **ldap\_memberattr\_format\_re** +A regex for extracting user ID from the value of the attribute named by +*ldap\_memberattr*. Check the LDAP +[Control Parameters](../../admin/configuration/ldap.md#control-parameters) section. + +- **ldap\_password** +Same as top-level [ldap_password](toplevel.md#ldap_password) option, but applied to this module +only. + +- **ldap\_port** +Same as top-level [ldap_port](toplevel.md#ldap_port) option, but applied to this module only. + +- **ldap\_rfilter** +So called "Roster Filter". Used to find names of all "shared roster" +groups. See also the *ldap\_groupattr* parameter. If unspecified, +defaults to the top-level parameter of the same name. You must specify +it in some place in the configuration, there is no default. + +- **ldap\_rootdn** +Same as top-level [ldap_rootdn](toplevel.md#ldap_rootdn) option, but applied to this module +only. + +- **ldap\_servers** +Same as top-level [ldap_servers](toplevel.md#ldap_servers) option, but applied to this module +only. + +- **ldap\_tls\_cacertfile** +Same as top-level [ldap_tls_cacertfile](toplevel.md#ldap_tls_cacertfile) option, but applied to this +module only. + +- **ldap\_tls\_certfile** +Same as top-level [ldap_tls_certfile](toplevel.md#ldap_tls_certfile) option, but applied to this +module only. + +- **ldap\_tls\_depth** +Same as top-level [ldap_tls_depth](toplevel.md#ldap_tls_depth) option, but applied to this module +only. + +- **ldap\_tls\_verify** +Same as top-level [ldap_tls_verify](toplevel.md#ldap_tls_verify) option, but applied to this module +only. + +- **ldap\_ufilter** +"User Filter", used for retrieving the human-readable name of roster +entries (usually full names of people in the roster). See also the +parameters *ldap\_userdesc* and *ldap\_useruid*. For more information +check the LDAP [Filters](../../admin/configuration/ldap.md#filters) section. + +- **ldap\_uids** +Same as top-level [ldap_uids](toplevel.md#ldap_uids) option, but applied to this module only. + +- **ldap\_userdesc** +The name of the attribute which holds the human-readable user name. +Retrieved from results of the "User Filter". Defaults to *cn*. + +- **ldap\_userjidattr** +The name of the attribute which is used to map user id to XMPP jid. If +not specified (and that is default value of this option), user jid will +be created from user id and this module host. + +- **ldap\_useruid** +The name of the attribute which holds the ID of a roster item. Value of +this attribute in the roster item objects needs to match the ID +retrieved from the *ldap\_memberattr* attribute of a group object. +Retrieved from results of the "User Filter". Defaults to *cn*. + +- **use\_cache** +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. + +mod\_sic +-------- + +This module adds support for [XEP-0279: Server IP +Check](https://xmpp.org/extensions/xep-0279.html). This protocol enables +a client to discover its external IP address. + +> **Warning** +> +> The protocol extension is deferred and seems like there are no clients +> supporting it, so using this module is not recommended and, +> furthermore, the module might be removed in the future. + +The module has no options. + +mod\_sip +-------- + +This module adds SIP proxy/registrar support for the corresponding +virtual host. + +> **Note** +> +> It is not enough to just load this module. You should also configure +> listeners and DNS records properly. For details see the section about +> the [ejabberd_sip](listen.md#ejabberd_sip) listen module in the +> ejabberd Documentation. + +__Available options:__ + +- **always\_record\_route**: *true | false* +Always insert "Record-Route" header into SIP messages. With this +approach it is possible to bypass NATs/firewalls a bit more easily. The +default value is *true*. + +- **flow\_timeout\_tcp**: *timeout()* +The option sets a keep-alive timer for [SIP +outbound](https://tools.ietf.org/html/rfc5626) TCP connections. The +default value is *2* minutes. + +- **flow\_timeout\_udp**: *timeout()* +The options sets a keep-alive timer for [SIP +outbound](https://tools.ietf.org/html/rfc5626) UDP connections. The +default value is *29* seconds. + +- **record\_route**: *URI* +When the option *always\_record\_route* is set to *true* or when [SIP +outbound](https://tools.ietf.org/html/rfc5626) is utilized, ejabberd +inserts "Record-Route" header field with this *URI* into a SIP message. +The default is a SIP URI constructed from the virtual host on which the +module is loaded. + +- **routes**: *\[URI, ...\]* +You can set a list of SIP URIs of routes pointing to this SIP proxy +server. The default is a list containing a single SIP URI constructed +from the virtual host on which the module is loaded. + +- **via**: *\[URI, ...\]* +A list to construct "Via" headers for inserting them into outgoing SIP +messages. This is useful if you’re running your SIP proxy in a +non-standard network topology. Every *URI* element in the list must be +in the form of "scheme://host:port", where "transport" must be *tls*, +*tcp*, or *udp*, "host" must be a domain name or an IP address and +"port" must be an internet port number. Note that all parts of the *URI* +are mandatory (e.g. you cannot omit "port" or "scheme"). + +__**Example**:__ + + modules: + ... + mod_sip: + always_record_route: false + record_route: "sip:example.com;lr" + routes: + - "sip:example.com;lr" + - "sip:sip.example.com;lr" + flow_timeout_udp: 30 sec + flow_timeout_tcp: 1 min + via: + - tls://sip-tls.example.com:5061 + - tcp://sip-tcp.example.com:5060 + - udp://sip-udp.example.com:5060 + ... + +mod\_stats +---------- + +This module adds support for [XEP-0039: Statistics +Gathering](https://xmpp.org/extensions/xep-0039.html). This protocol +allows you to retrieve the following statistics from your ejabberd +server: + +- Total number of registered users on the current virtual host + (users/total). + +- Total number of registered users on all virtual hosts + (users/all-hosts/total). + +- Total number of online users on the current virtual host + (users/online). + +- Total number of online users on all virtual hosts + (users/all-hosts/online). + +> **Note** +> +> The protocol extension is deferred and seems like even a few clients +> that were supporting it are now abandoned. So using this module makes +> very little sense. + +The module has no options. + +mod\_stream\_mgmt +----------------- + +This module adds support for [XEP-0198: Stream +Management](https://xmpp.org/extensions/xep-0198.html). This protocol +allows active management of an XML stream between two XMPP entities, +including features for stanza acknowledgements and stream resumption. + +__Available options:__ + +- **ack\_timeout**: *timeout()* +A time to wait for stanza acknowledgements. Setting it to *infinity* +effectively disables the timeout. The default value is *1* minute. + +- **cache\_life\_time**: *timeout()* +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module +only. The default value is *48 hours*. + +- **cache\_size**: *pos\_integer() | infinity* +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module +only. + +- **max\_ack\_queue**: *Size* +This option specifies the maximum number of unacknowledged stanzas +queued for possible retransmission. When the limit is exceeded, the +client session is terminated. The allowed values are positive integers +and *infinity*. You should be careful when setting this value as it +should not be set too low, otherwise, you could kill sessions in a loop, +before they get the chance to finish proper session initiation. It +should definitely be set higher that the size of the offline queue (for +example at least 3 times the value of the max offline queue and never +lower than *1000*). The default value is *5000*. + +- **max\_resume\_timeout**: *timeout()* +A client may specify the period of time until a session times out if the +connection is lost. During this period of time, the client may resume +its session. This option limits the period of time a client is permitted +to request. It must be set to a timeout equal to or larger than the +default *resume\_timeout*. By default, it is set to the same value as +the *resume\_timeout* option. + +- **queue\_type**: *ram | file* +Same as top-level [queue_type](toplevel.md#queue_type) option, but applied to this module +only. + +- **resend\_on\_timeout**: *true | false | if\_offline* +If this option is set to *true*, any message stanzas that weren’t +acknowledged by the client will be resent on session timeout. This +behavior might often be desired, but could have unexpected results under +certain circumstances. For example, a message that was sent to two +resources might get resent to one of them if the other one timed out. +Therefore, the default value for this option is *false*, which tells +ejabberd to generate an error message instead. As an alternative, the +option may be set to *if\_offline*. In this case, unacknowledged +messages are resent only if no other resource is online when the session +times out. Otherwise, error messages are generated. + +- **resume\_timeout**: *timeout()* +This option configures the (default) period of time until a session +times out if the connection is lost. During this period of time, a +client may resume its session. Note that the client may request a +different timeout value, see the *max\_resume\_timeout* option. Setting +it to *0* effectively disables session resumption. The default value is +*5* minutes. + +mod\_stun\_disco +---------------- + +This module allows XMPP clients to discover STUN/TURN services and to +obtain temporary credentials for using them as per [XEP-0215: External +Service Discovery](https://xmpp.org/extensions/xep-0215.html). This +module is included in ejabberd since version [20.04](../../archive/20.04/index.md). + +__Available options:__ + +- **access**: *AccessName* +This option defines which access rule will be used to control who is +allowed to discover STUN/TURN services and to request temporary +credentials. The default value is *local*. + +- **credentials\_lifetime**: *timeout()* +The lifetime of temporary credentials offered to clients. If ejabberd’s +built-in TURN service is used, TURN relays allocated using temporary +credentials will be terminated shortly after the credentials expired. +The default value is *12 hours*. Note that restarting the ejabberd node +invalidates any temporary credentials offered before the restart unless +a *secret* is specified (see below). + +- **offer\_local\_services**: *true | false* +This option specifies whether local STUN/TURN services configured as +ejabberd listeners should be announced automatically. Note that this +will not include TLS-enabled services, which must be configured manually +using the *services* option (see below). For non-anonymous TURN +services, temporary credentials will be offered to the client. The +default value is *true*. + +- **secret**: *Text* +The secret used for generating temporary credentials. If this option +isn’t specified, a secret will be auto-generated. However, a secret must +be specified explicitly if non-anonymous TURN services running on other +ejabberd nodes and/or external TURN *services* are configured. Also note +that auto-generated secrets are lost when the node is restarted, which +invalidates any credentials offered before the restart. Therefore, it’s +recommended to explicitly specify a secret if clients cache retrieved +credentials (for later use) across service restarts. + +- **services**: *\[Service, ...\]* +The list of services offered to clients. This list can include STUN/TURN +services running on any ejabberd node and/or external services. However, +if any listed TURN service not running on the local ejabberd node +requires authentication, a *secret* must be specified explicitly, and +must be shared with that service. This will only work with ejabberd’s +built-in STUN/TURN server and with external servers that support the +same [REST API For Access To TURN +Services](https://tools.ietf.org/html/draft-uberti-behave-turn-rest-00). +Unless the *offer\_local\_services* is set to *false*, the explicitly +listed services will be offered in addition to those announced +automatically. + + - **host**: *Host* + The hostname or IP address the STUN/TURN service is + listening on. For non-TLS services, it’s recommended to specify an + IP address (to avoid additional DNS lookup latency on the client + side). For TLS services, the hostname (or IP address) should match + the certificate. Specifying the *host* option is mandatory. + + - **port**: *1..65535* + The port number the STUN/TURN service is + listening on. The default port number is 3478 for non-TLS services + and 5349 for TLS services. + + - **restricted**: *true | false* + This option determines whether + temporary credentials for accessing the service are offered. The + default is *false* for STUN/STUNS services and *true* for TURN/TURNS + services. + + - **transport**: *tcp | udp* + The transport protocol supported by the + service. The default is *udp* for non-TLS services and *tcp* for TLS + services. + + - **type**: *stun | turn | stuns | turns* + The type of service. Must be + *stun* or *turn* for non-TLS services, *stuns* or *turns* for TLS + services. The default type is *stun*. + + **Example**: + + services: + - + host: 203.0.113.3 + port: 3478 + type: stun + transport: udp + restricted: false + - + host: 203.0.113.3 + port: 3478 + type: turn + transport: udp + restricted: true + - + host: 2001:db8::3 + port: 3478 + type: stun + transport: udp + restricted: false + - + host: 2001:db8::3 + port: 3478 + type: turn + transport: udp + restricted: true + - + host: server.example.com + port: 5349 + type: turns + transport: tcp + restricted: true + +mod\_time +--------- + +This module adds support for [XEP-0202: Entity +Time](https://xmpp.org/extensions/xep-0202.html). In other words, the +module reports server’s system time. + +The module has no options. + +mod\_vcard +---------- + +This module allows end users to store and retrieve their vCard, and to +retrieve other users vCards, as defined in [XEP-0054: +vcard-temp](https://xmpp.org/extensions/xep-0054.html). The module also +implements an uncomplicated Jabber User Directory based on the vCards of +these users. Moreover, it enables the server to send its vCard when +queried. + +__Available options:__ + +- **allow\_return\_all**: *true | false* +This option enables you to specify if search operations with empty input +fields should return all users who added some information to their +vCard. The default value is *false*. + +- **cache\_life\_time**: *timeout()* +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module +only. + +- **cache\_missed**: *true | false* +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module +only. + +- **cache\_size**: *pos\_integer() | infinity* +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module +only. + +- **db\_type**: *mnesia | sql | ldap* +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module +only. + +- **host** +Deprecated. Use *hosts* instead. + +- **hosts**: *\[Host, ...\]* +This option defines the Jabber IDs of the service. If the *hosts* option +is not specified, the only Jabber ID will be the hostname of the virtual +host with the prefix "vjud.". The keyword *@HOST@* is replaced with the +real virtual host name. + +- **matches**: *pos\_integer() | infinity* +With this option, the number of reported search results can be limited. +If the option’s value is set to *infinity*, all search results are +reported. The default value is *30*. + +- **name**: *Name* +The value of the service name. This name is only visible in some clients +that support [XEP-0030: Service +Discovery](https://xmpp.org/extensions/xep-0030.html). The default is +*vCard User Search*. + +- **search**: *true | false* +This option specifies whether the search functionality is enabled or +not. If disabled, the options *hosts*, *name* and *vcard* will be +ignored and the Jabber User Directory service will not appear in the +Service Discovery item list. The default value is *false*. + +- **use\_cache**: *true | false* +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. + +- **vcard**: *vCard* +A custom vCard of the server that will be displayed by some XMPP clients +in Service Discovery. The value of *vCard* is a YAML map constructed +from an XML representation of vCard. Since the representation has no +attributes, the mapping is straightforward. + +For example, the following XML representation of vCard: + + + Conferences + + + Elm Street + + + +will be translated to: + + vcard: + fn: Conferences + adr: + - + work: true + street: Elm Street + +__Available options for *ldap* backend:__ + +- **ldap\_backups** +Same as top-level [ldap_backups](toplevel.md#ldap_backups) option, but applied to this module +only. + +- **ldap\_base** +Same as top-level [ldap_base](toplevel.md#ldap_base) option, but applied to this module only. + +- **ldap\_deref\_aliases** +Same as top-level [ldap_deref_aliases](toplevel.md#ldap_deref_aliases) option, but applied to this +module only. + +- **ldap\_encrypt** +Same as top-level [ldap_encrypt](toplevel.md#ldap_encrypt) option, but applied to this module +only. + +- **ldap\_filter** +Same as top-level [ldap_filter](toplevel.md#ldap_filter) option, but applied to this module +only. + +- **ldap\_password** +Same as top-level [ldap_password](toplevel.md#ldap_password) option, but applied to this module +only. + +- **ldap\_port** +Same as top-level [ldap_port](toplevel.md#ldap_port) option, but applied to this module only. + +- **ldap\_rootdn** +Same as top-level [ldap_rootdn](toplevel.md#ldap_rootdn) option, but applied to this module +only. + +- **ldap\_search\_fields**: *{Name: Attribute, ...}* +This option defines the search form and the LDAP attributes to search +within. *Name* is the name of a search form field which will be +automatically translated by using the translation files (see +*msgs/\*.msg* for available words). *Attribute* is the LDAP attribute or +the pattern *%u*. + +The default is: + + User: "%u" + "Full Name": displayName + "Given Name": givenName + "Middle Name": initials + "Family Name": sn + Nickname: "%u" + Birthday: birthDay + Country: c + City: l + Email: mail + "Organization Name": o + "Organization Unit": ou + +- **ldap\_search\_reported**: *{SearchField: VcardField}, ...}* +This option defines which search fields should be reported. +*SearchField* is the name of a search form field which will be +automatically translated by using the translation files (see +*msgs/\*.msg* for available words). *VcardField* is the vCard field name +defined in the *ldap\_vcard\_map* option. + +The default is: + + "Full Name": FN + "Given Name": FIRST + "Middle Name": MIDDLE + "Family Name": LAST + "Nickname": NICKNAME + "Birthday": BDAY + "Country": CTRY + "City": LOCALITY + "Email": EMAIL + "Organization Name": ORGNAME + "Organization Unit": ORGUNIT + +- **ldap\_servers** +Same as top-level [ldap_servers](toplevel.md#ldap_servers) option, but applied to this module +only. + +- **ldap\_tls\_cacertfile** +Same as top-level [ldap_tls_cacertfile](toplevel.md#ldap_tls_cacertfile) option, but applied to this +module only. + +- **ldap\_tls\_certfile** +Same as top-level [ldap_tls_certfile](toplevel.md#ldap_tls_certfile) option, but applied to this +module only. + +- **ldap\_tls\_depth** +Same as top-level [ldap_tls_depth](toplevel.md#ldap_tls_depth) option, but applied to this module +only. + +- **ldap\_tls\_verify** +Same as top-level [ldap_tls_verify](toplevel.md#ldap_tls_verify) option, but applied to this module +only. + +- **ldap\_uids** +Same as top-level [ldap_uids](toplevel.md#ldap_uids) option, but applied to this module only. + +- **ldap\_vcard\_map**: *{Name: {Pattern, LDAPattributes}, ...}* +With this option you can set the table that maps LDAP attributes to +vCard fields. *Name* is the type name of the vCard as defined in [RFC +2426](https://tools.ietf.org/html/rfc2426). *Pattern* is a string which +contains pattern variables *%u*, *%d* or *%s*. *LDAPattributes* is the +list containing LDAP attributes. The pattern variables *%s* will be +sequentially replaced with the values of LDAP attributes from +*List\_of\_LDAP\_attributes*, *%u* will be replaced with the user part +of a JID, and *%d* will be replaced with the domain part of a JID. + +The default is: + + NICKNAME: {"%u": []} + FN: {"%s": [displayName]} + LAST: {"%s": [sn]} + FIRST: {"%s": [givenName]} + MIDDLE: {"%s": [initials]} + ORGNAME: {"%s": [o]} + ORGUNIT: {"%s": [ou]} + CTRY: {"%s": [c]} + LOCALITY: {"%s": [l]} + STREET: {"%s": [street]} + REGION: {"%s": [st]} + PCODE: {"%s": [postalCode]} + TITLE: {"%s": [title]} + URL: {"%s": [labeleduri]} + DESC: {"%s": [description]} + TEL: {"%s": [telephoneNumber]} + EMAIL: {"%s": [mail]} + BDAY: {"%s": [birthDay]} + ROLE: {"%s": [employeeType]} + PHOTO: {"%s": [jpegPhoto]} + +__Available options for *mnesia* backend:__ + +- **search\_all\_hosts**: *true | false* +Whether to perform search on all virtual hosts or not. The default value +is *true*. + +mod\_vcard\_xupdate +------------------- + +The user’s client can store an avatar in the user vCard. The vCard-Based +Avatars protocol ([XEP-0153](https://xmpp.org/extensions/xep-0153.html)) +provides a method for clients to inform the contacts what is the avatar +hash value. However, simple or small clients may not implement that +protocol. + +If this module is enabled, all the outgoing client presence stanzas get +automatically the avatar hash on behalf of the client. So, the contacts +receive the presence stanzas with the *Update Data* described in +[XEP-0153](https://xmpp.org/extensions/xep-0153.html) as if the client +would had inserted it itself. If the client had already included such +element in the presence stanza, it is replaced with the element +generated by ejabberd. + +By enabling this module, each vCard modification produces a hash +recalculation, and each presence sent by a client produces hash +retrieval and a presence stanza rewrite. For this reason, enabling this +module will introduce a computational overhead in servers with clients +that change frequently their presence. However, the overhead is +significantly reduced by the use of caching, so you probably don’t want +to set *use\_cache* to *false*. + +The module depends on [mod_vcard](#mod_vcard). + +> **Note** +> +> Nowadays [XEP-0153](https://xmpp.org/extensions/xep-0153.html) is used +> mostly as "read-only", i.e. modern clients don’t publish their avatars +> inside vCards. Thus in the majority of cases the module is only used +> along with [mod_avatar](#mod_avatar) for providing backward compatibility. + +__Available options:__ + +- **cache\_life\_time**: *timeout()* +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module +only. + +- **cache\_missed**: *true | false* +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module +only. + +- **cache\_size**: *pos\_integer() | infinity* +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module +only. + +- **use\_cache**: *true | false* +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. + +mod\_version +------------ + +This module implements [XEP-0092: Software +Version](https://xmpp.org/extensions/xep-0092.html). Consequently, it +answers ejabberd’s version when queried. + +__Available options:__ + +- **show\_os**: *true | false* +Should the operating system be revealed or not. The default value is +*true*. + diff --git a/content/archive/24.02/toplevel.md b/content/archive/24.02/toplevel.md new file mode 100644 index 00000000..e9e99721 --- /dev/null +++ b/content/archive/24.02/toplevel.md @@ -0,0 +1,1745 @@ +--- +search: + exclude: true +--- + +# Top-Level Options + +> This section describes top level options of ejabberd [24.02](../../archive/24.02/index.md). If you are using an old ejabberd release, please refer to the corresponding archived version of this page in the [Archive](../../archive/index.md). The +options that changed in this version are marked with ●. + +## access\_rules + +*{AccessName: {allow|deny: ACLRules|ACLName}}* + +This option defines [Access Rules](../../admin/configuration/basic.md#access-rules). Each access +rule is assigned a name that can be referenced from other parts of the +configuration file (mostly from *access* options of ejabberd modules). +Each rule definition may contain arbitrary number of *allow* or *deny* +sections, and each section may contain any number of ACL rules (see +[acl](#acl) option). There are no access rules defined by default. + +**Example**: + + access_rules: + configure: + allow: admin + something: + deny: someone + allow: all + s2s_banned: + deny: problematic_hosts + deny: banned_forever + deny: + ip: 222.111.222.111/32 + deny: + ip: 111.222.111.222/32 + allow: all + xmlrpc_access: + allow: + user: peter@example.com + allow: + user: ivone@example.com + allow: + user: bot@example.com + ip: 10.0.0.0/24 + +## acl + +*{ACLName: {ACLType: ACLValue}}* + +The option defines access control lists: named sets of rules which are +used to match against different targets (such as a JID or an IP +address). Every set of rules has name *ACLName*: it can be any string +except *all* or *none* (those are predefined names for the rules that +match all or nothing respectively). The name *ACLName* can be referenced +from other parts of the configuration file, for example in +[access_rules](#access_rules) option. The rules of *ACLName* are represented by +mapping *{ACLType: ACLValue}*. These can be one of the following: + +- **ip**: *Network* + The rule matches any IP address from the + *Network*. + +- **node\_glob**: *Pattern* + Same as *node\_regexp*, but matching is + performed on a specified *Pattern* according to the rules used by + the Unix shell. + +- **node\_regexp**: *user\_regexp@server\_regexp* + The rule matches any + JID with node part matching regular expression *user\_regexp* and + server part matching regular expression *server\_regexp*. + +- **resource**: *Resource* + The rule matches any JID with a resource + *Resource*. + +- **resource\_glob**: *Pattern* + Same as *resource\_regexp*, but + matching is performed on a specified *Pattern* according to the + rules used by the Unix shell. + +- **resource\_regexp**: *Regexp* + The rule matches any JID with a + resource that matches regular expression *Regexp*. + +- **server**: *Server* + The rule matches any JID from server *Server*. + The value of *Server* must be a valid hostname or an IP address. + +- **server\_glob**: *Pattern* + Same as *server\_regexp*, but matching + is performed on a specified *Pattern* according to the rules used by + the Unix shell. + +- **server\_regexp**: *Regexp* + The rule matches any JID from the + server that matches regular expression *Regexp*. + +- **user**: *Username* + If *Username* is in the form of "user@server", + the rule matches a JID against this value. Otherwise, if *Username* + is in the form of "user", the rule matches any JID that has + *Username* in the node part as long as the server part of this JID + is any virtual host served by ejabberd. + +- **user\_glob**: *Pattern* + Same as *user\_regexp*, but matching is + performed on a specified *Pattern* according to the rules used by + the Unix shell. + +- **user\_regexp**: *Regexp* + If *Regexp* is in the form of + "regexp@server", the rule matches any JID with node part matching + regular expression "regexp" as long as the server part of this JID + is equal to "server". If *Regexp* is in the form of "regexp", the + rule matches any JID with node part matching regular expression + "regexp" as long as the server part of this JID is any virtual host + served by ejabberd. + +## acme + +*Options* + +[ACME](../../admin/configuration/basic.md#acme) configuration, to automatically obtain SSL +certificates for the domains served by ejabberd, which means that +certificate requests and renewals are performed to some CA server (aka +"ACME server") in a fully automated mode. The *Options* are: + +- **auto**: *true | false* + Whether to automatically request + certificates for all configured domains (that yet have no a + certificate) on server start or configuration reload. The default is + *true*. + +- **ca\_url**: *URL* + The ACME directory URL used as an entry point for + the ACME server. The default value is + - the directory URL + of Let’s Encrypt authority. + +- **cert\_type**: *rsa | ec* + A type of a certificate key. Available + values are *ec* and *rsa* for EC and RSA certificates respectively. + It’s better to have RSA certificates for the purpose of backward + compatibility with legacy clients and servers, thus the default is + *rsa*. + +- **contact**: *\[Contact, ...\]* + A list of contact addresses + (typically emails) where an ACME server will send notifications when + problems occur. The value of *Contact* must be in the form of + "scheme:address" (e.g. "mailto:user@domain.tld"). The default is an + empty list which means an ACME server will send no notices. + +**Example**: + + acme: + ca_url: https://acme-v02.api.letsencrypt.org/directory + contact: + - mailto:admin@domain.tld + - mailto:bot@domain.tld + auto: true + cert_type: rsa + +## allow\_contrib\_modules + +*true | false* + +Whether to allow installation of third-party modules or not. See +[ejabberd-contrib](../../developer/extending-ejabberd/modules.md#ejabberd-contrib) +documentation section. The default value is *true*. + +## allow\_multiple\_connections + +*true | false* + +This option is only used when the anonymous mode is enabled. Setting it +to *true* means that the same username can be taken multiple times in +anonymous login mode if different resource are used to connect. This +option is only useful in very special occasions. The default value is +*false*. + +## anonymous\_protocol + +*login\_anon | sasl\_anon | both* + +Define what anonymous protocol will be used: + +- *login\_anon* means that the anonymous login method will be used. + +- *sasl\_anon* means that the SASL Anonymous method will be used. + +- *both* means that SASL Anonymous and login anonymous are both + enabled. + +The default value is *sasl\_anon*. + +## api\_permissions + +*\[Permission, ...\]* + +Define the permissions for API access. Please consult the ejabberd Docs +web → For Developers → ejabberd ReST API → +[API Permissions](../../developer/ejabberd-api/permissions.md). + +## append\_host\_config + +*{Host: Options}* + +To define specific ejabberd modules in a virtual host, you can define +the global *modules* option with the common modules, and later add +specific modules to certain virtual hosts. To accomplish that, +*append\_host\_config* option can be used. + +## auth\_cache\_life\_time + +*timeout()* + +Same as [cache_life_time](#cache_life_time), but applied to authentication cache only. +If not set, the value from [cache_life_time](#cache_life_time) will be used. + +## auth\_cache\_missed + +*true | false* + +Same as [cache_missed](#cache_missed), but applied to authentication cache only. If +not set, the value from [cache_missed](#cache_missed) will be used. + +## auth\_cache\_size + +*pos\_integer() | infinity* + +Same as [cache_size](#cache_size), but applied to authentication cache only. If not +set, the value from [cache_size](#cache_size) will be used. + +## auth\_external\_user\_exists\_check + +*true | false* + + + +Supplement check for user +existence based on *mod\_last* data, for authentication methods that +don’t have a way to reliably tell if a user exists (like is the case for +*jwt* and certificate based authentication). This helps with processing +offline message for those users. The default value is *true*. + +## auth\_method + +*\[mnesia | sql | anonymous | external | jwt | ldap | pam, ...\]* + +A list of authentication methods to use. If several methods are defined, +authentication is considered successful as long as authentication of at +least one of the methods succeeds. The default value is *\[mnesia\]*. + +## auth\_opts + +*\[Option, ...\]* + +This is used by the contributed module *ejabberd\_auth\_http* that can +be installed from the +[ejabberd-contrib](https://github.com/processone/ejabberd-contrib) Git +repository. Please refer to that module’s README file for details. + +## auth\_password\_format + +*plain | scram* + + + +The option defines in what +format the users passwords are stored, plain text or in +[SCRAM](../../admin/configuration/authentication.md#scram) format: + +- *plain*: The password is stored as plain text in the database. This + is risky because the passwords can be read if your database gets + compromised. This is the default value. This format allows clients + to authenticate using: the old Jabber Non-SASL (XEP-0078), SASL + PLAIN, SASL DIGEST-MD5, and SASL SCRAM-SHA-1/256/512(-PLUS). + +- *scram*: The password is not stored, only some information required + to verify the hash provided by the client. It is impossible to + obtain the original plain password from the stored information; for + this reason, when this value is configured it cannot be changed to + plain anymore. This format allows clients to authenticate using: + SASL PLAIN and SASL SCRAM-SHA-1/256/512(-PLUS). The SCRAM variant + depends on the [auth_scram_hash](#auth_scram_hash) option. + +The default value is *plain*. + +## auth\_scram\_hash + +*sha | sha256 | sha512* + +Hash algorithm that should be used to store password in +[SCRAM](../../admin/configuration/authentication.md#scram) format. You shouldn’t change this if +you already have passwords generated with a different algorithm - users +that have such passwords will not be able to authenticate. The default +value is *sha*. + +## auth\_use\_cache + +*true | false* + +Same as [use_cache](#use_cache), but applied to authentication cache only. If not +set, the value from [use_cache](#use_cache) will be used. + +## c2s\_cafile + +*Path* + +Full path to a file containing one or more CA certificates in PEM +format. All client certificates should be signed by one of these root CA +certificates and should contain the corresponding JID(s) in +*subjectAltName* field. There is no default value. + +You can use [host_config](#host_config) to specify this option per-vhost. + +To set a specific file per listener, use the listener’s +[cafile](listen-options.md#cafile) option. Please notice that +*c2s\_cafile* overrides the listener’s *cafile* option. + +## c2s\_ciphers + +*\[Cipher, ...\]* + +A list of OpenSSL ciphers to use for c2s connections. The default value +is shown in the example below: + +**Example**: + + c2s_ciphers: + - HIGH + - "!aNULL" + - "!eNULL" + - "!3DES" + - "@STRENGTH" + +## c2s\_dhfile + +*Path* + +Full path to a file containing custom DH parameters to use for c2s +connections. Such a file could be created with the command "openssl +dhparam -out dh.pem 2048". If this option is not specified, 2048-bit +MODP Group with 256-bit Prime Order Subgroup will be used as defined in +RFC5114 Section 2.3. + +## c2s\_protocol\_options + +*\[Option, ...\]* + +List of general SSL options to use for c2s connections. These map to +OpenSSL’s *set\_options()*. The default value is shown in the example +below: + +**Example**: + + c2s_protocol_options: + - no_sslv3 + - cipher_server_preference + - no_compression + +## c2s\_tls\_compression + +*true | false* + +Whether to enable or disable TLS compression for c2s connections. The +default value is *false*. + +## ca\_file + +*Path* + +Path to a file of CA root certificates. The default is to use system +defined file if possible. + +For server connections, this *ca\_file* option is overridden by the +[s2s_cafile](#s2s_cafile) option. + +## cache\_life\_time + +*timeout()* + +The time of a cached item to keep in cache. Once it’s expired, the +corresponding item is erased from cache. The default value is *1 hour*. +Several modules have a similar option; and some core ejabberd parts +support similar options too, see [auth_cache_life_time](#auth_cache_life_time), +[oauth_cache_life_time](#oauth_cache_life_time), [router_cache_life_time](#router_cache_life_time), and +[sm_cache_life_time](#sm_cache_life_time). + +## cache\_missed + +*true | false* + +Whether or not to cache missed lookups. When there is an attempt to +lookup for a value in a database and this value is not found and the +option is set to *true*, this attempt will be cached and no attempts +will be performed until the cache expires (see [cache_life_time](#cache_life_time)). +Usually you don’t want to change it. Default is *true*. Several modules +have a similar option; and some core ejabberd parts support similar +options too, see [auth_cache_missed](#auth_cache_missed), [oauth_cache_missed](#oauth_cache_missed), +[router_cache_missed](#router_cache_missed), and [sm_cache_missed](#sm_cache_missed). + +## cache\_size + +*pos\_integer() | infinity* + +A maximum number of items (not memory!) in cache. The rule of thumb, for +all tables except rosters, you should set it to the number of maximum +online users you expect. For roster multiply this number by 20 or so. If +the cache size reaches this threshold, it’s fully cleared, i.e. all +items are deleted, and the corresponding warning is logged. You should +avoid frequent cache clearance, because this degrades performance. The +default value is *1000*. Several modules have a similar option; and some +core ejabberd parts support similar options too, see +[auth_cache_size](#auth_cache_size), [oauth_cache_size](#oauth_cache_size), [router_cache_size](#router_cache_size), and +[sm_cache_size](#sm_cache_size). + +## captcha\_cmd + +*Path | ModuleName* + + + +Full path to a script that +generates [CAPTCHA](../../admin/configuration/basic.md#captcha) images. *@VERSION@* is replaced +with ejabberd version number in *XX.YY* format. *@SEMVER@* is replaced +with ejabberd version number in semver format when compiled with +Elixir’s mix, or XX.YY format otherwise. Alternatively, it can be the +name of a module that implements ejabberd CAPTCHA support. There is no +default value: when this option is not set, CAPTCHA functionality is +completely disabled. + +When using the ejabberd installers or container image, the example +captcha scripts can be used like this: + + captcha_cmd: /opt/ejabberd-@VERSION@/lib/ejabberd-@SEMVER@/priv/bin/captcha.sh + +## captcha\_host + +*String* + +Deprecated. Use [captcha_url](#captcha_url) instead. + +## captcha\_limit + +*pos\_integer() | infinity* + +Maximum number of [CAPTCHA](../../admin/configuration/basic.md#captcha) generated images per +minute for any given JID. The option is intended to protect the server +from CAPTCHA DoS. The default value is *infinity*. + +## captcha\_url + +*URL | auto | undefined* + + + +An URL where +[CAPTCHA](../../admin/configuration/basic.md#captcha) requests should be sent. NOTE: you need to +configure *request\_handlers* for *ejabberd\_http* listener as well. If +set to *auto*, it builds the URL using a *request\_handler* already +enabled, with encryption if available. If set to *undefined*, it builds +the URL using the deprecated [captcha_host](#captcha_host) + /captcha. The default +value is *auto*. + +## certfiles + +*\[Path, ...\]* + +The option accepts a list of file paths (optionally with wildcards) +containing either PEM certificates or PEM private keys. At startup or +configuration reload, ejabberd reads all certificates from these files, +sorts them, removes duplicates, finds matching private keys and then +rebuilds full certificate chains for the use in TLS connections. Use +this option when TLS is enabled in either of ejabberd listeners: +*ejabberd\_c2s*, *ejabberd\_http* and so on. NOTE: if you modify the +certificate files or change the value of the option, run *ejabberdctl +reload-config* in order to rebuild and reload the certificate chains. + +If you use [Let’s Encrypt](https://letsencrypt.org) certificates for +your domain "domain.tld", the configuration will look like this: + + certfiles: + - /etc/letsencrypt/live/domain.tld/fullchain.pem + - /etc/letsencrypt/live/domain.tld/privkey.pem + +## cluster\_backend + +*Backend* + +A database backend to use for storing information about cluster. The +only available value so far is *mnesia*. + +## cluster\_nodes + +*\[Node, ...\]* + +A list of Erlang nodes to connect on ejabberd startup. This option is +mostly intended for ejabberd customization and sophisticated setups. The +default value is an empty list. + +## default\_db + +*mnesia | sql* + +Default persistent storage for ejabberd. Modules and other components +(e.g. authentication) may have its own value. The default value is +*mnesia*. + +## default\_ram\_db + +*mnesia | redis | sql* + +Default volatile (in-memory) storage for ejabberd. Modules and other +components (e.g. session management) may have its own value. The default +value is *mnesia*. + +## define\_macro + +*{MacroName: MacroValue}* + +Defines a macro. The value can be any valid arbitrary YAML value. For +convenience, it’s recommended to define a *MacroName* in capital +letters. Duplicated macros are not allowed. Macros are processed after +additional configuration files have been included, so it is possible to +use macros that are defined in configuration files included before the +usage. It is possible to use a *MacroValue* in the definition of another +macro. + +**Example**: + + define_macro: + DEBUG: debug + LOG_LEVEL: DEBUG + USERBOB: + user: bob@localhost + + loglevel: LOG_LEVEL + + acl: + admin: USERBOB + +## disable\_sasl\_mechanisms + +*\[Mechanism, ...\]* + +Specify a list of SASL mechanisms (such as *DIGEST-MD5* or *SCRAM-SHA1*) +that should not be offered to the client. For convenience, the value of +*Mechanism* is case-insensitive. The default value is an empty list, +i.e. no mechanisms are disabled by default. + +## disable\_sasl\_scram\_downgrade\_protection + +*true | false* + +Allows to disable sending data required by *XEP-0474: SASL SCRAM +Downgrade Protection*. There are known buggy clients (like those that +use strophejs 1.6.2) which will not be able to authenticatate when +servers sends data from that specification. This options allows server +to disable it to allow even buggy clients connects, but in exchange +decrease MITM protection. The default value of this option is *false* +which enables this extension. + +## domain\_balancing + +*{Domain: Options}* + +An algorithm to load balance the components that are plugged on an +ejabberd cluster. It means that you can plug one or several instances of +the same component on each ejabberd node and that the traffic will be +automatically distributed. The algorithm to deliver messages to the +component(s) can be specified by this option. For any component +connected as *Domain*, available *Options* are: + +- **component\_number**: *2..1000* + The number of components to + balance. + +- **type**: *random | source | destination | bare\_source | + bare\_destination* How to deliver stanzas to connected components: + *random* - an instance is chosen at random; *destination* - an + instance is chosen by the full JID of the packet’s *to* attribute; + *source* - by the full JID of the packet’s *from* attribute; + *bare\_destination* - by the bare JID (without resource) of the + packet’s *to* attribute; *bare\_source* - by the bare JID (without + resource) of the packet’s *from* attribute is used. The default + value is *random*. + +**Example**: + + domain_balancing: + component.domain.tld: + type: destination + component_number: 5 + transport.example.org: + type: bare_source + +## ext\_api\_headers + +*Headers* + +String of headers (separated with commas *,*) that will be provided by +ejabberd when sending ReST requests. The default value is an empty +string of headers: *""*. + +## ext\_api\_http\_pool\_size + +*pos\_integer()* + +Define the size of the HTTP pool, that is, the maximum number of +sessions that the ejabberd ReST service will handle simultaneously. The +default value is: *100*. + +## ext\_api\_path\_oauth + +*Path* + +Define the base URI path when performing OAUTH ReST requests. The +default value is: *"/oauth"*. + +## ext\_api\_url + +*URL* + +Define the base URI when performing ReST requests. The default value is: +*"http://localhost/api"*. + +## extauth\_pool\_name + +*Name* + +Define the pool name appendix, so the full pool name will be +*extauth\_pool\_Name*. The default value is the hostname. + +## extauth\_pool\_size + +*Size* + +The option defines the number of instances of the same external program +to start for better load balancing. The default is the number of +available CPU cores. + +## extauth\_program + +*Path* + +Indicate in this option the full path to the external authentication +script. The script must be executable by ejabberd. + +## fqdn + +*Domain* + +A fully qualified domain name that will be used in SASL DIGEST-MD5 +authentication. The default is detected automatically. + +## hide\_sensitive\_log\_data + +*true | false* + +A privacy option to not log sensitive data (mostly IP addresses). The +default value is *false* for backward compatibility. + +## host\_config + +*{Host: Options}* + +The option is used to redefine *Options* for virtual host *Host*. In the +example below LDAP authentication method will be used on virtual host +*domain.tld* and SQL method will be used on virtual host *example.org*. + +**Example**: + + hosts: + - domain.tld + - example.org + + auth_method: + - sql + + host_config: + domain.tld: + auth_method: + - ldap + +## hosts + +*\[Domain1, Domain2, ...\]* + +The option defines a list containing one or more domains that *ejabberd* +will serve. This is a **mandatory** option. + +## include\_config\_file + +*\[Filename, ...\] | {Filename: Options}* + +Read additional configuration from *Filename*. If the value is provided +in *{Filename: Options}* format, the *Options* must be one of the +following: + +- **allow\_only**: *\[OptionName, ...\]* + Allows only the usage of + those options in the included file *Filename*. The options that do + not match this criteria are not accepted. The default value is to + include all options. + +- **disallow**: *\[OptionName, ...\]* + Disallows the usage of those + options in the included file *Filename*. The options that match this + criteria are not accepted. The default value is an empty list. + +## install\_contrib\_modules + +*\[Module, ...\]* + + + +Modules to install from +[ejabberd-contrib](../../developer/extending-ejabberd/modules.md#ejabberd-contrib) +at start time. The default value is an empty list of modules: *\[\]*. + +## jwt\_auth\_only\_rule + +*AccessName* + +This ACL rule defines accounts that can use only this auth method, even +if others are also defined in the ejabberd configuration file. In other +words: if there are several auth methods enabled for this host (JWT, +SQL, …), users that match this rule can only use JWT. The default value +is *none*. + +## jwt\_jid\_field + +*FieldName* + +By default, the JID is defined in the *"jid"* JWT field. In this option +you can specify other JWT field name where the JID is defined. + +## jwt\_key + +*FilePath* + +Path to the file that contains the JWK Key. The default value is +*undefined*. + +## language + +*Language* + +The option defines the default language of server strings that can be +seen by XMPP clients. If an XMPP client does not possess *xml:lang* +attribute, the specified language is used. The default value is *"en"*. + +## ldap\_backups + +*\[Host, ...\]* + +A list of IP addresses or DNS names of LDAP backup servers. When no +servers listed in [ldap_servers](#ldap_servers) option are reachable, ejabberd will +try to connect to these backup servers. The default is an empty list, +i.e. no backup servers specified. WARNING: ejabberd doesn’t try to +reconnect back to the main servers when they become operational again, +so the only way to restore these connections is to restart ejabberd. +This limitation might be fixed in future releases. + +## ldap\_base + +*Base* + +LDAP base directory which stores users accounts. There is no default +value: you must set the option in order for LDAP connections to work +properly. + +## ldap\_deref\_aliases + +*never | always | finding | searching* + +Whether to dereference aliases or not. The default value is *never*. + +## ldap\_dn\_filter + +*{Filter: FilterAttrs}* + +This filter is applied on the results returned by the main filter. The +filter performs an additional LDAP lookup to make the complete result. +This is useful when you are unable to define all filter rules in +*ldap\_filter*. You can define "%u", "%d", "%s" and "%D" pattern +variables in *Filter*: "%u" is replaced by a user’s part of the JID, +"%d" is replaced by the corresponding domain (virtual host), all "%s" +variables are consecutively replaced by values from the attributes in +*FilterAttrs* and "%D" is replaced by Distinguished Name from the result +set. There is no default value, which means the result is not filtered. +WARNING: Since this filter makes additional LDAP lookups, use it only as +the last resort: try to define all filter rules in [ldap_filter](#ldap_filter) +option if possible. + +**Example**: + + ldap_dn_filter: + "(&(name=%s)(owner=%D)(user=%u@%d))": [sn] + +## ldap\_encrypt + +*tls | none* + +Whether to encrypt LDAP connection using TLS or not. The default value +is *none*. NOTE: STARTTLS encryption is not supported. + +## ldap\_filter + +*Filter* + +An LDAP filter as defined in +[RFC4515](https://tools.ietf.org/html/rfc4515). There is no default +value. Example: "(&(objectClass=shadowAccount)(memberOf=XMPP Users))". +NOTE: don’t forget to close brackets and don’t use superfluous +whitespaces. Also you must not use "uid" attribute in the filter because +this attribute will be appended to the filter automatically. + +## ldap\_password + +*Password* + +Bind password. The default value is an empty string. + +## ldap\_port + +*1..65535* + +Port to connect to your LDAP server. The default port is *389* if +encryption is disabled and *636* if encryption is enabled. + +## ldap\_rootdn + +*RootDN* + +Bind Distinguished Name. The default value is an empty string, which +means "anonymous connection". + +## ldap\_servers + +*\[Host, ...\]* + +A list of IP addresses or DNS names of your LDAP servers. The default +value is *\[localhost\]*. + +## ldap\_tls\_cacertfile + +*Path* + +A path to a file containing PEM encoded CA certificates. This option is +required when TLS verification is enabled. + +## ldap\_tls\_certfile + +*Path* + +A path to a file containing PEM encoded certificate along with PEM +encoded private key. This certificate will be provided by ejabberd when +TLS enabled for LDAP connections. There is no default value, which means +no client certificate will be sent. + +## ldap\_tls\_depth + +*Number* + +Specifies the maximum verification depth when TLS verification is +enabled, i.e. how far in a chain of certificates the verification +process can proceed before the verification is considered to be failed. +Peer certificate = 0, CA certificate = 1, higher level CA certificate = +2, etc. The value *2* thus means that a chain can at most contain peer +cert, CA cert, next CA cert, and an additional CA cert. The default +value is *1*. + +## ldap\_tls\_verify + +*false | soft | hard* + +This option specifies whether to verify LDAP server certificate or not +when TLS is enabled. When *hard* is set, ejabberd doesn’t proceed if the +certificate is invalid. When *soft* is set, ejabberd proceeds even if +the check has failed. The default is *false*, which means no checks are +performed. + +## ldap\_uids + +*\[Attr\] | {Attr: AttrFormat}* + +LDAP attributes which hold a list of attributes to use as alternatives +for getting the JID, where *Attr* is an LDAP attribute which holds the +user’s part of the JID and *AttrFormat* must contain one and only one +pattern variable "%u" which will be replaced by the user’s part of the +JID. For example, "%.org". If the value is in the form of +*\[Attr\]* then *AttrFormat* is assumed to be "%u". + +## listen + +*\[Options, ...\]* + +The option for listeners configuration. See the +[Listen Modules](listen.md) section for details. + +## log\_burst\_limit\_count + +*Number* + + + +The number of messages to +accept in `log_burst_limit_window_time` period before starting to drop +them. Default 500 + +## log\_burst\_limit\_window\_time + +*Number* + + + +The time period to rate-limit +log messages by. Defaults to 1 second. + +## log\_modules\_fully + +*\[Module, ...\]* + + + +List of modules that will log +everything independently from the general loglevel option. + +## log\_rotate\_count + +*Number* + +The number of rotated log files to keep. The default value is *1*, which +means that only keeps `ejabberd.log.0`, `error.log.0` and `crash.log.0`. + +## log\_rotate\_size + +*pos\_integer() | infinity* + +The size (in bytes) of a log file to trigger rotation. If set to +*infinity*, log rotation is disabled. The default value is *10485760* +(that is, 10 Mb). + +## loglevel + +*none | emergency | alert | critical | error | warning | notice | info | debug* + +Verbosity of log files generated by ejabberd. The default value is +*info*. NOTE: previous versions of ejabberd had log levels defined in +numeric format (*0..5*). The numeric values are still accepted for +backward compatibility, but are not recommended. + +## max\_fsm\_queue + +*Size* + +This option specifies the maximum number of elements in the queue of the +FSM (Finite State Machine). Roughly speaking, each message in such +queues represents one XML stanza queued to be sent into its relevant +outgoing stream. If queue size reaches the limit (because, for example, +the receiver of stanzas is too slow), the FSM and the corresponding +connection (if any) will be terminated and error message will be logged. +The reasonable value for this option depends on your hardware +configuration. The allowed values are positive integers. The default +value is *10000*. + +## modules + +*{Module: Options}* + +The option for modules configuration. See [Modules](modules.md) section +for details. + +## negotiation\_timeout + +*timeout()* + +Time to wait for an XMPP stream negotiation to complete. When timeout +occurs, the corresponding XMPP stream is closed. The default value is +*120* seconds. + +## net\_ticktime + +*timeout()* + +This option can be used to tune tick time parameter of *net\_kernel*. It +tells Erlang VM how often nodes should check if intra-node communication +was not interrupted. This option must have identical value on all nodes, +or it will lead to subtle bugs. Usually leaving default value of this is +option is best, tweak it only if you know what you are doing. The +default value is *1 minute*. + +## new\_sql\_schema + +*true | false* + +Whether to use *new* SQL schema. All schemas are located at +. There are two +schemas available. The default legacy schema stores one XMPP domain into +one ejabberd database. The *new* schema can handle several XMPP domains +in a single ejabberd database. Using this *new* schema is best when +serving several XMPP domains and/or changing domains from time to time. +This avoid need to manage several databases and handle complex +configuration changes. The default depends on configuration flag +*--enable-new-sql-schema* which is set at compile time. + +## oauth\_access + +*AccessName* + +By default creating OAuth tokens is not allowed. To define which users +can create OAuth tokens, you can refer to an ejabberd access rule in the +*oauth\_access* option. Use *all* to allow everyone to create tokens. + +## oauth\_cache\_life\_time + +*timeout()* + +Same as [cache_life_time](#cache_life_time), but applied to OAuth cache only. If not +set, the value from [cache_life_time](#cache_life_time) will be used. + +## oauth\_cache\_missed + +*true | false* + +Same as [cache_missed](#cache_missed), but applied to OAuth cache only. If not set, +the value from [cache_missed](#cache_missed) will be used. + +## oauth\_cache\_rest\_failure\_life\_time + +*timeout()* + + + +The time that a failure in +OAuth ReST is cached. The default value is *infinity*. + +## oauth\_cache\_size + +*pos\_integer() | infinity* + +Same as [cache_size](#cache_size), but applied to OAuth cache only. If not set, the +value from [cache_size](#cache_size) will be used. + +## oauth\_client\_id\_check + +*allow | db | deny* + +Define whether the client authentication is always allowed, denied, or +it will depend if the client ID is present in the database. The default +value is *allow*. + +## oauth\_db\_type + +*mnesia | sql* + +Database backend to use for OAuth authentication. The default value is +picked from [default_db](#default_db) option, or if it’s not set, *mnesia* will be +used. + +## oauth\_expire + +*timeout()* + +Time during which the OAuth token is valid, in seconds. After that +amount of time, the token expires and the delegated credential cannot be +used and is removed from the database. The default is *4294967* seconds. + +## oauth\_use\_cache + +*true | false* + +Same as [use_cache](#use_cache), but applied to OAuth cache only. If not set, the +value from [use_cache](#use_cache) will be used. + +## oom\_killer + +*true | false* + +Enable or disable OOM (out-of-memory) killer. When system memory raises +above the limit defined in [oom_watermark](#oom_watermark) option, ejabberd triggers +OOM killer to terminate most memory consuming Erlang processes. Note +that in order to maintain functionality, ejabberd only attempts to kill +transient processes, such as those managing client sessions, s2s or +database connections. The default value is *true*. + +## oom\_queue + +*Size* + +Trigger OOM killer when some of the running Erlang processes have +messages queue above this *Size*. Note that such processes won’t be +killed if [oom_killer](#oom_killer) option is set to *false* or if *oom\_watermark* +is not reached yet. + +## oom\_watermark + +*Percent* + +A percent of total system memory consumed at which OOM killer should be +activated with some of the processes possibly be killed (see +[oom_killer](#oom_killer) option). Later, when memory drops below this *Percent*, +OOM killer is deactivated. The default value is *80* percents. + +## outgoing\_s2s\_families + +*\[ipv6 | ipv4, ...\]* + + + +Specify which address +families to try, in what order. The default is *\[ipv6, ipv4\]* which +means it first tries connecting with IPv6, if that fails it tries using +IPv4. This option is obsolete and irrelevant when using ejabberd [23.01](../../archive/23.01/index.md) +and Erlang/OTP 22, or newer versions of them. + +## outgoing\_s2s\_ipv4\_address + +*Address* + + + +Specify the IPv4 address that +will be used when establishing an outgoing S2S IPv4 connection, for +example "127.0.0.1". The default value is *undefined*. + +## outgoing\_s2s\_ipv6\_address + +*Address* + + + +Specify the IPv6 address that +will be used when establishing an outgoing S2S IPv6 connection, for +example "::FFFF:127.0.0.1". The default value is *undefined*. + +## outgoing\_s2s\_port + +*1..65535* + +A port number to use for outgoing s2s connections when the target server +doesn’t have an SRV record. The default value is *5269*. + +## outgoing\_s2s\_timeout + +*timeout()* + +The timeout in seconds for outgoing S2S connection attempts. The default +value is *10* seconds. + +## pam\_service + +*Name* + +This option defines the PAM service name. Refer to the PAM documentation +of your operation system for more information. The default value is +*ejabberd*. + +## pam\_userinfotype + +*username | jid* + +This option defines what type of information about the user ejabberd +provides to the PAM service: only the username, or the user’s JID. +Default is *username*. + +## pgsql\_users\_number\_estimate + +*true | false* + +Whether to use PostgreSQL estimation when counting registered users. The +default value is *false*. + +## queue\_dir + +*Directory* + +If [queue_type](#queue_type) option is set to *file*, use this *Directory* to store +file queues. The default is to keep queues inside Mnesia directory. + +## queue\_type + +*ram | file* + +Default type of queues in ejabberd. Modules may have its own value of +the option. The value of *ram* means that queues will be kept in memory. +If value *file* is set, you may also specify directory in [queue_dir](#queue_dir) +option where file queues will be placed. The default value is *ram*. + +## redis\_connect\_timeout + +*timeout()* + +A timeout to wait for the connection to be re-established to the Redis +server. The default is *1 second*. + +## redis\_db + +*Number* + +Redis database number. The default is *0*. + +## redis\_password + +*Password* + +The password to the Redis server. The default is an empty string, i.e. +no password. + +## redis\_pool\_size + +*Number* + +The number of simultaneous connections to the Redis server. The default +value is *10*. + +## redis\_port + +*1..65535* + +The port where the Redis server is accepting connections. The default is +*6379*. + +## redis\_queue\_type + +*ram | file* + +The type of request queue for the Redis server. See description of +[queue_type](#queue_type) option for the explanation. The default value is the +value defined in [queue_type](#queue_type) or *ram* if the latter is not set. + +## redis\_server + +*Hostname* + +A hostname or an IP address of the Redis server. The default is +*localhost*. + +## registration\_timeout + +*timeout()* + +This is a global option for module [mod_register](modules.md#mod_register). It limits the +frequency of registrations from a given IP or username. So, a user that +tries to register a new account from the same IP address or JID during +this time after their previous registration will receive an error with +the corresponding explanation. To disable this limitation, set the value +to *infinity*. The default value is *600 seconds*. + +## resource\_conflict + +*setresource | closeold | closenew* + +NOTE: this option is deprecated and may be removed anytime in the future +versions. The possible values match exactly the three possibilities +described in [XMPP Core: section +7.7.2.2](https://tools.ietf.org/html/rfc6120#section-7.7.2.2). The +default value is *closeold*. If the client uses old Jabber Non-SASL +authentication (XEP-0078), then this option is not respected, and the +action performed is *closeold*. + +## router\_cache\_life\_time + +*timeout()* + +Same as [cache_life_time](#cache_life_time), but applied to routing table cache only. If +not set, the value from [cache_life_time](#cache_life_time) will be used. + +## router\_cache\_missed + +*true | false* + +Same as [cache_missed](#cache_missed), but applied to routing table cache only. If +not set, the value from [cache_missed](#cache_missed) will be used. + +## router\_cache\_size + +*pos\_integer() | infinity* + +Same as [cache_size](#cache_size), but applied to routing table cache only. If not +set, the value from [cache_size](#cache_size) will be used. + +## router\_db\_type + +*mnesia | redis | sql* + +Database backend to use for routing information. The default value is +picked from [default_ram_db](#default_ram_db) option, or if it’s not set, *mnesia* will +be used. + +## router\_use\_cache + +*true | false* + +Same as [use_cache](#use_cache), but applied to routing table cache only. If not +set, the value from [use_cache](#use_cache) will be used. + +## rpc\_timeout + +*timeout()* + +A timeout for remote function calls between nodes in an ejabberd +cluster. You should probably never change this value since those calls +are used for internal needs only. The default value is *5* seconds. + +## s2s\_access + +*Access* + +This [Access Rule](../../admin/configuration/basic.md#access-rules) defines to what remote +servers can s2s connections be established. The default value is *all*; +no restrictions are applied, it is allowed to connect s2s to/from all +remote servers. + +## s2s\_cafile + +*Path* + +A path to a file with CA root certificates that will be used to +authenticate s2s connections. If not set, the value of [ca_file](#ca_file) will +be used. + +You can use [host_config](#host_config) to specify this option per-vhost. + +## s2s\_ciphers + +*\[Cipher, ...\]* + +A list of OpenSSL ciphers to use for s2s connections. The default value +is shown in the example below: + +**Example**: + + s2s_ciphers: + - HIGH + - "!aNULL" + - "!eNULL" + - "!3DES" + - "@STRENGTH" + +## s2s\_dhfile + +*Path* + +Full path to a file containing custom DH parameters to use for s2s +connections. Such a file could be created with the command "openssl +dhparam -out dh.pem 2048". If this option is not specified, 2048-bit +MODP Group with 256-bit Prime Order Subgroup will be used as defined in +RFC5114 Section 2.3. + +## s2s\_dns\_retries + +*Number* + +DNS resolving retries. The default value is *2*. + +## s2s\_dns\_timeout + +*timeout()* + +The timeout for DNS resolving. The default value is *10* seconds. + +## s2s\_max\_retry\_delay + +*timeout()* + +The maximum allowed delay for s2s connection retry to connect after a +failed connection attempt. The default value is *300* seconds (5 +minutes). + +## s2s\_protocol\_options + +*\[Option, ...\]* + +List of general SSL options to use for s2s connections. These map to +OpenSSL’s *set\_options()*. The default value is shown in the example +below: + +**Example**: + + s2s_protocol_options: + - no_sslv3 + - cipher_server_preference + - no_compression + +## s2s\_queue\_type + +*ram | file* + +The type of a queue for s2s packets. See description of [queue_type](#queue_type) +option for the explanation. The default value is the value defined in +[queue_type](#queue_type) or *ram* if the latter is not set. + +## s2s\_timeout + +*timeout()* + +A time to wait before closing an idle s2s connection. The default value +is *1* hour. + +## s2s\_tls\_compression + +*true | false* + +Whether to enable or disable TLS compression for s2s connections. The +default value is *false*. + +## s2s\_use\_starttls + +*true | false | optional | required* + +Whether to use STARTTLS for s2s connections. The value of *false* means +STARTTLS is prohibited. The value of *true* or *optional* means STARTTLS +is enabled but plain connections are still allowed. And the value of +*required* means that only STARTTLS connections are allowed. The default +value is *false* (for historical reasons). + +## s2s\_zlib + +*true | false* + +Whether to use *zlib* compression (as defined in +[XEP-0138](https://xmpp.org/extensions/xep-0138.html)) or not. The +default value is *false*. WARNING: this type of compression is nowadays +considered insecure. + +## shaper + +*{ShaperName: Rate}* + +The option defines a set of shapers. Every shaper is assigned a name +*ShaperName* that can be used in other parts of the configuration file, +such as [shaper_rules](#shaper_rules) option. The shaper itself is defined by its +*Rate*, where *Rate* stands for the maximum allowed incoming rate in +**bytes** per second. When a connection exceeds this limit, ejabberd +stops reading from the socket until the average rate is again below the +allowed maximum. In the example below shaper *normal* limits the traffic +speed to 1,000 bytes/sec and shaper *fast* limits the traffic speed to +50,000 bytes/sec: + +**Example**: + + shaper: + normal: 1000 + fast: 50000 + +## shaper\_rules + +*{ShaperRuleName: {Number|ShaperName: ACLRule|ACLName}}* + +An entry allowing to declaring shaper to use for matching user/hosts. +Semantics is similar to [access_rules](#access_rules) option, the only difference is +that instead using *allow* or *deny*, a name of a shaper (defined in +[shaper](#shaper) option) or a positive number should be used. + +**Example**: + + shaper_rules: + connections_limit: + 10: + user: peter@example.com + 100: admin + 5: all + download_speed: + fast: admin + slow: anonymous_users + normal: all + log_days: 30 + +## sm\_cache\_life\_time + +*timeout()* + +Same as [cache_life_time](#cache_life_time), but applied to client sessions table cache +only. If not set, the value from [cache_life_time](#cache_life_time) will be used. + +## sm\_cache\_missed + +*true | false* + +Same as [cache_missed](#cache_missed), but applied to client sessions table cache +only. If not set, the value from [cache_missed](#cache_missed) will be used. + +## sm\_cache\_size + +*pos\_integer() | infinity* + +Same as [cache_size](#cache_size), but applied to client sessions table cache only. +If not set, the value from [cache_size](#cache_size) will be used. + +## sm\_db\_type + +*mnesia | redis | sql* + +Database backend to use for client sessions information. The default +value is picked from [default_ram_db](#default_ram_db) option, or if it’s not set, +*mnesia* will be used. + +## sm\_use\_cache + +*true | false* + +Same as [use_cache](#use_cache), but applied to client sessions table cache only. +If not set, the value from [use_cache](#use_cache) will be used. + +## sql\_connect\_timeout + +*timeout()* + +A time to wait for connection to an SQL server to be established. The +default value is *5* seconds. + +## sql\_database + +*Database* + +An SQL database name. For SQLite this must be a full path to a database +file. The default value is *ejabberd*. + +## sql\_flags ● + +*\[mysql\_alternative\_upsert\]* + + + +This option accepts a list of +SQL flags, and is empty by default. *mysql\_alternative\_upsert* forces +the alternative upsert implementation in MySQL. + +## sql\_keepalive\_interval + +*timeout()* + +An interval to make a dummy SQL request to keep alive the connections to +the database. There is no default value, so no keepalive requests are +made. + +## sql\_odbc\_driver + +*Path* + + + +Path to the ODBC driver to use +to connect to a Microsoft SQL Server database. This option only applies +if the [sql_type](#sql_type) option is set to *mssql* and [sql_server](#sql_server) is not +an ODBC connection string. The default value is: *libtdsodbc.so* + +## sql\_password + +*Password* + +The password for SQL authentication. The default is empty string. + +## sql\_pool\_size + +*Size* + +Number of connections to the SQL server that ejabberd will open for each +virtual host. The default value is 10. WARNING: for SQLite this value is +*1* by default and it’s not recommended to change it due to potential +race conditions. + +## sql\_port + +*1..65535* + +The port where the SQL server is accepting connections. The default is +*3306* for MySQL, *5432* for PostgreSQL and *1433* for MS SQL. The +option has no effect for SQLite. + +## sql\_prepared\_statements + +*true | false* + + + +This option is *true* by +default, and is useful to disable prepared statements. The option is +valid for PostgreSQL and MySQL. + +## sql\_query\_timeout + +*timeout()* + +A time to wait for an SQL query response. The default value is *60* +seconds. + +## sql\_queue\_type + +*ram | file* + +The type of a request queue for the SQL server. See description of +[queue_type](#queue_type) option for the explanation. The default value is the +value defined in [queue_type](#queue_type) or *ram* if the latter is not set. + +## sql\_server + +*Host* + +The hostname or IP address of the SQL server. For [sql_type](#sql_type) *mssql* +or *odbc* this can also be an ODBC connection string. The default value +is *localhost*. + +## sql\_ssl + +*true | false* + + + +Whether to use SSL +encrypted connections to the SQL server. The option is only available +for MySQL, MS SQL and PostgreSQL. The default value is *false*. + +## sql\_ssl\_cafile + +*Path* + +A path to a file with CA root certificates that will be used to verify +SQL connections. Implies [sql_ssl](#sql_ssl) and [sql_ssl_verify](#sql_ssl_verify) options are +set to *true*. There is no default which means certificate verification +is disabled. This option has no effect for MS SQL. + +## sql\_ssl\_certfile + +*Path* + +A path to a certificate file that will be used for SSL connections to +the SQL server. Implies [sql_ssl](#sql_ssl) option is set to *true*. There is no +default which means ejabberd won’t provide a client certificate to the +SQL server. This option has no effect for MS SQL. + +## sql\_ssl\_verify + +*true | false* + +Whether to verify SSL connection to the SQL server against CA root +certificates defined in [sql_ssl_cafile](#sql_ssl_cafile) option. Implies [sql_ssl](#sql_ssl) +option is set to *true*. This option has no effect for MS SQL. The +default value is *false*. + +## sql\_start\_interval + +*timeout()* + +A time to wait before retrying to restore failed SQL connection. The +default value is *30* seconds. + +## sql\_type + +*mssql | mysql | odbc | pgsql | sqlite* + +The type of an SQL connection. The default is *odbc*. + +## sql\_username + +*Username* + +A user name for SQL authentication. The default value is *ejabberd*. + +## trusted\_proxies + +*all | \[Network1, Network2, ...\]* + +Specify what proxies are trusted when an HTTP request contains the +header *X-Forwarded-For*. You can specify *all* to allow all proxies, or +specify a list of IPs, possibly with masks. The default value is an +empty list. Using this option you can know the real IP of the request, +for admin purpose, or security configuration (for example using +*mod\_fail2ban*). IMPORTANT: The proxy MUST be configured to set the +*X-Forwarded-For* header if you enable this option as, otherwise, the +client can set it itself and as a result the IP value cannot be trusted +for security rules in ejabberd. + +## update\_sql\_schema + +*true | false* + +Allow ejabberd to update SQL schema. The default value is *true*. + +## use\_cache + +*true | false* + +Enable or disable cache. The default is *true*. Several modules have a +similar option; and some core ejabberd parts support similar options +too, see [auth_use_cache](#auth_use_cache), [oauth_use_cache](#oauth_use_cache), [router_use_cache](#router_use_cache), +and [sm_use_cache](#sm_use_cache). + +## validate\_stream + +*true | false* + +Whether to validate any incoming XML packet according to the schemas of +[supported XMPP +extensions](https://github.com/processone/xmpp#supported-xmpp-elements). +WARNING: the validation is only intended for the use by client +developers - don’t enable it in production environment. The default +value is *false*. + +## version + +*string()* + +The option can be used to set custom ejabberd version, that will be used +by different parts of ejabberd, for example by [mod_version](modules.md#mod_version) module. +The default value is obtained at compile time from the underlying +version control system. + +## websocket\_origin + +*ignore | URL* + +This option enables validation for *Origin* header to protect against +connections from other domains than given in the configuration file. In +this way, the lower layer load balancer can be chosen for a specific +ejabberd implementation while still providing a secure WebSocket +connection. The default value is *ignore*. An example value of the *URL* +is "https://test.example.org:8081". + +## websocket\_ping\_interval + +*timeout()* + +Defines time between pings sent by the server to a client (WebSocket +level protocol pings are used for this) to keep a connection active. If +the client doesn’t respond to two consecutive pings, the connection will +be assumed as closed. The value of *0* can be used to disable the +feature. This option makes the server sending pings only for connections +using the RFC compliant protocol. For older style connections the server +expects that whitespace pings would be used for this purpose. The +default value is *60* seconds. + +## websocket\_timeout + +*timeout()* + +Amount of time without any communication after which the connection +would be closed. The default value is *300* seconds. + diff --git a/content/admin/upgrade/from_23.10_to_24.02.md b/content/archive/24.02/upgrade.md similarity index 80% rename from content/admin/upgrade/from_23.10_to_24.02.md rename to content/archive/24.02/upgrade.md index 6f3c692f..ac669112 100644 --- a/content/admin/upgrade/from_23.10_to_24.02.md +++ b/content/archive/24.02/upgrade.md @@ -1,74 +1,71 @@ ---- -title: Upgrade to ejabberd 24.02 -toc: true ---- +# Upgrade to ejabberd 24.02 -If you upgrade ejabberd from a previous release to [24.02](/archive/20_02/), +If you upgrade ejabberd from a previous release to [24.02](../../archive/24.02/index.md), please review those changes: -- [Update the SQL schema](#sql) -- Update API commands as explained below, or use [API versioning](#api) -- [Mix or Rebar3 used by default instead of Rebar to compile ejabberd](#mixdefault) -- [Authentication workaround for Converse.js and Strophe.js](#converse) +- Update the SQL schema +- Update API commands as explained below, or use API versioning +- Mix or Rebar3 used by default instead of Rebar to compile ejabberd +- Authentication workaround for Converse.js and Strophe.js ## Update the SQL schema The table `archive` has a text column named `origin_id` (see [commit 975681](https://github.com/processone/ejabberd/commit/975681)). You have two methods to update the SQL schema of your existing database: -If using MySQL or PosgreSQL, you can enable the option [`update_sql_schema`](https://docs.ejabberd.im/admin/configuration/toplevel/#update-sql-schema) and ejabberd will take care to update the SQL schema when needed: add in your ejabberd configuration file the line `update_sql_schema: true` +If using MySQL or PosgreSQL, you can enable the option [`update_sql_schema`](../../admin/configuration/toplevel.md#update_sql_schema) and ejabberd will take care to update the SQL schema when needed: add in your ejabberd configuration file the line `update_sql_schema: true` If you are using other database, or prefer to update manually the SQL schema: * MySQL default schema: -```sql +``` sql ALTER TABLE archive ADD COLUMN origin_id text NOT NULL DEFAULT ''; ALTER TABLE archive ALTER COLUMN origin_id DROP DEFAULT; CREATE INDEX i_archive_username_origin_id USING BTREE ON archive(username(191), origin_id(191)); ``` * MySQL new schema: -```sql +``` sql ALTER TABLE archive ADD COLUMN origin_id text NOT NULL DEFAULT ''; ALTER TABLE archive ALTER COLUMN origin_id DROP DEFAULT; -CREATE INDEX i_archive_sh_username_origin_id USING BTREE ON archive(server_host(191), username(191), origin_id(191)) +CREATE INDEX i_archive_sh_username_origin_id USING BTREE ON archive(server_host(191), username(191), origin_id(191)); ``` * PostgreSQL default schema: -```sql +``` sql ALTER TABLE archive ADD COLUMN origin_id text NOT NULL DEFAULT ''; ALTER TABLE archive ALTER COLUMN origin_id DROP DEFAULT; CREATE INDEX i_archive_username_origin_id ON archive USING btree (username, origin_id); ``` * PostgreSQL new schema: -```sql +``` sql ALTER TABLE archive ADD COLUMN origin_id text NOT NULL DEFAULT ''; ALTER TABLE archive ALTER COLUMN origin_id DROP DEFAULT; CREATE INDEX i_archive_sh_username_origin_id ON archive USING btree (server_host, username, origin_id); ``` * MSSQL default schema: -```sql +``` sql ALTER TABLE [dbo].[archive] ADD [origin_id] VARCHAR (250) NOT NULL; CREATE INDEX [archive_username_origin_id] ON [archive] (username, origin_id) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON); ``` * MSSQL new schema: -```sql +``` sql ALTER TABLE [dbo].[archive] ADD [origin_id] VARCHAR (250) NOT NULL; CREATE INDEX [archive_sh_username_origin_id] ON [archive] (server_host, username, origin_id) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON); ``` * SQLite default schema: -```sql +``` sql ALTER TABLE archive ADD COLUMN origin_id text NOT NULL DEFAULT ''; CREATE INDEX i_archive_username_origin_id ON archive (username, origin_id); ``` * SQLite new schema: -```sql +``` sql ALTER TABLE archive ADD COLUMN origin_id text NOT NULL DEFAULT ''; CREATE INDEX i_archive_sh_username_origin_id ON archive (server_host, username, origin_id); ``` @@ -79,19 +76,20 @@ Until now, when a new ejabberd release changed some API command (an argument ren Now the ejabberd API commands can have different versions, by default the most recent one is used, and the API client can specify the API version it supports. -In fact, this feature was [implemented seven years ago](https://github.com/processone/ejabberd/commit/3dc55c6d47e3093a6147ce275c7269a7d08ffc45), included in [ejabberd 16.04](https://www.process-one.net/blog/ejabberd-16-04/), documented in [ejabberd Docs: API Versioning](https://docs.ejabberd.im/developer/ejabberd-api/api_versioning/)... but it was never actually used! +In fact, this feature was [implemented seven years ago](https://github.com/processone/ejabberd/commit/3dc55c6d47e3093a6147ce275c7269a7d08ffc45), included in [ejabberd 16.04](https://www.process-one.net/blog/ejabberd-16-04/), documented in [ejabberd Docs: API Versioning](../../developer/ejabberd-api/api_versioning.md)... but it was never actually used! This ejabberd release includes many fixes to get API versioning up to date, and it starts being used by several commands. Let's say that ejabberd 23.10 implemented API version 0, and this ejabberd 24.02 adds API version 1. You may want to update your API client to use the new API version 1... or you can continue using API version 0 and delay API update a few weeks or months. To continue using API version 0: + - if using ejabberdctl, use the switch `--version 0`. For example: `ejabberdctl --version 0 get_roster admin localhost` - if using mod_http_api, in ejabberd configuration file add `v0` to the `request_handlers` path. For example: `/api/v0: mod_http_api` -Check the ejabberd [24.02](/archive/20_02/) full release notes for more details about the changed commands. +Check the ejabberd [24.02](../../archive/24.02/index.md) full release notes for more details about the changed commands. -Check the full documentation in [ejabberd Docs: API Versioning](https://docs.ejabberd.im/developer/ejabberd-api/api_versioning/). +Check the full documentation in [ejabberd Docs: API Versioning](../../developer/ejabberd-api/api_versioning.md). ## Use Mix or Rebar3 by default instead of Rebar to compile ejabberd @@ -99,7 +97,7 @@ ejabberd uses [Rebar](https://github.com/rebar/rebar) to manage dependencies and [Rebar3](https://github.com/erlang/rebar3) is supported by ejabberd since [20.12](https://www.process-one.net/blog/ejabberd-20-12/) [0fc1aea](https://github.com/processone/ejabberd/commit/0fc1aea379924b6f83f274f173d0bbd163cae1c2). Among other benefits, this allows to download dependencies from [hex.pm](https://hex.pm/) and cache them in your system instead of downloading them from git every time, and allows to compile Elixir files and Elixir dependencies. -In fact, ejabberd can be compiled using `mix` (a tool included with the [Elixir programming language](https://elixir-lang.org/)) since ejabberd [15.04](https://www.process-one.net/blog/ejabberd-15-04/) [ea8db99](https://github.com/processone/ejabberd/commit/ea8db9967fbfe53f581c3ae721657d9e6f919864) (with improvements in ejabberd [21.07](https://www.process-one.net/blog/ejabberd-22-07/) [4c5641a](https://github.com/processone/ejabberd/commit/4c5641a6489d0669b4220b5ac759a4e1271af3b5)) +In fact, ejabberd can be compiled using `mix` (a tool included with the [Elixir programming language](https://elixir-lang.org/)) since ejabberd [15.04](https://www.process-one.net/blog/ejabberd-15-04/) [ea8db99](https://github.com/processone/ejabberd/commit/ea8db9967fbfe53f581c3ae721657d9e6f919864) (with improvements in ejabberd [21.07](https://www.process-one.net/blog/ejabberd-21-07/) [4c5641a](https://github.com/processone/ejabberd/commit/4c5641a6489d0669b4220b5ac759a4e1271af3b5)) For those reasons, the tool selection performed by `./configure` will now be: @@ -113,10 +111,9 @@ For those reasons, the tool selection performed by `./configure` will now be: This ejabberd release includes support for [XEP-0474: SASL SCRAM Downgrade Protection](https://xmpp.org/extensions/xep-0474.html), and some clients may not support it correctly yet. -If you are using [Converse.js](https://github.com/conversejs/converse.js) v0.9.1-beta or older, or any other client based in [Strophe.js](https://github.com/strophe/strophejs) v1.6.2 or older, you may notice that they cannot authenticate correctly to ejabberd. +If you are using [Converse.js](https://github.com/conversejs/converse.js) 10.1.6 or older, [Movim](https://github.com/movim/movim) 0.23 Kojima or older, or any other client based in [Strophe.js](https://github.com/strophe/strophejs) v1.6.2 or older, you may notice that they cannot authenticate correctly to ejabberd. -To solve that problem, either update to newer versions of those programs (if they exist), or you can enable temporarily the option [`disable_sasl_scram_downgrade_protection`](https://docs.ejabberd.im/admin/configuration/toplevel/#disable-sasl-scram-downgrade-protection) in the ejabberd configuration file `ejabberd.yml` like this: -```yaml +To solve that problem, either update to newer versions of those programs (if they exist), or you can enable temporarily the option [`disable_sasl_scram_downgrade_protection`](../../admin/configuration/toplevel.md#disable_sasl_scram_downgrade_protection) in the ejabberd configuration file `ejabberd.yml` like this: +``` yaml disable_sasl_scram_downgrade_protection: true ``` - diff --git a/content/archive/24.06/admin-api.md b/content/archive/24.06/admin-api.md new file mode 100644 index 00000000..d4bad3ec --- /dev/null +++ b/content/archive/24.06/admin-api.md @@ -0,0 +1,7118 @@ +--- +search: + exclude: true +--- + +# API Reference + +> This section describes API commands of ejabberd [24.06](../../archive/24.06/index.md). If you are using an old ejabberd release, please refer to the corresponding archived version of this page in the [Archive](../../archive/index.md). The commands that changed in this version are marked with 🟤. + + + +## abort_delete_old_mam_messages + + + +Abort currently running delete old MAM messages operation + +__Arguments:__ + +- *host* :: string : Name of host where operation should be aborted + +__Result:__ + +- *status* :: string : Status text + +__Tags:__ +[purge](admin-tags.md#purge) + +__Module:__ +[mod_mam](modules.md#mod_mam) + +__Examples:__ + + +~~~ json +POST /api/abort_delete_old_mam_messages +{ + "host": "localhost" +} + +HTTP/1.1 200 OK +"Operation aborted" +~~~ + + + + +## abort_delete_old_messages + + + +Abort currently running delete old offline messages operation + +__Arguments:__ + +- *host* :: string : Name of host where operation should be aborted + +__Result:__ + +- *status* :: string : Status text + +__Tags:__ +[purge](admin-tags.md#purge) + +__Examples:__ + + +~~~ json +POST /api/abort_delete_old_messages +{ + "host": "localhost" +} + +HTTP/1.1 200 OK +"Operation aborted" +~~~ + + + + +## add_rosteritem + + + +Add an item to a user's roster (supports ODBC) + +__Arguments:__ + +- *localuser* :: string : User name +- *localhost* :: string : Server name +- *user* :: string : Contact user name +- *host* :: string : Contact server name +- *nick* :: string : Nickname +- *groups* :: [group::string] : Groups +- *subs* :: string : Subscription + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[roster](admin-tags.md#roster), [v1](admin-tags.md#v1) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/add_rosteritem +{ + "localuser": "user1", + "localhost": "myserver.com", + "user": "user2", + "host": "myserver.com", + "nick": "User 2", + "groups": [ + "Friends", + "Team 1" + ], + "subs": "both" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## backup + + +Backup the Mnesia database to a binary file + +__Arguments:__ + +- *file* :: string : Full path for the destination backup file + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[mnesia](admin-tags.md#mnesia) + +__Examples:__ + + +~~~ json +POST /api/backup +{ + "file": "/var/lib/ejabberd/database.backup" +} + +HTTP/1.1 200 OK +"Success" +~~~ + + + + +## ban_account 🟤 + + + +Ban an account + + +This command kicks the account sessions, sets a random password, and stores ban details in the account private storage. This command requires mod_private to be enabled. Check also [get_ban_details](#get_ban_details) API and `_unban_account`_ API. + +__Arguments:__ + +- *user* :: string : User name to ban +- *host* :: string : Server name +- *reason* :: string : Reason for banning user + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[accounts](admin-tags.md#accounts), [v2](admin-tags.md#v2) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/ban_account +{ + "user": "attacker", + "host": "myserver.com", + "reason": "Spaming other users" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## bookmarks_to_pep + + +Export private XML storage bookmarks to PEP + +__Arguments:__ + +- *user* :: string : Username +- *host* :: string : Server + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[private](admin-tags.md#private) + +__Module:__ +[mod_private](modules.md#mod_private) + +__Examples:__ + + +~~~ json +POST /api/bookmarks_to_pep +{ + "user": "bob", + "host": "example.com" +} + +HTTP/1.1 200 OK +"Bookmarks exported" +~~~ + + + + +## change_password + + +Change the password of an account + +__Arguments:__ + +- *user* :: string : User name +- *host* :: string : Server name +- *newpass* :: string : New password for user + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[accounts](admin-tags.md#accounts) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/change_password +{ + "user": "peter", + "host": "myserver.com", + "newpass": "blank" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## change_room_option + + +Change an option in a MUC room + +__Arguments:__ + +- *name* :: string : Room name +- *service* :: string : MUC service +- *option* :: string : Option name +- *value* :: string : Value to assign + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[muc_room](admin-tags.md#muc_room) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/change_room_option +{ + "name": "room1", + "service": "conference.example.com", + "option": "members_only", + "value": "true" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## check_account + + +Check if an account exists or not + +__Arguments:__ + +- *user* :: string : User name to check +- *host* :: string : Server to check + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[accounts](admin-tags.md#accounts) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/check_account +{ + "user": "peter", + "host": "myserver.com" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## check_password + + +Check if a password is correct + +__Arguments:__ + +- *user* :: string : User name to check +- *host* :: string : Server to check +- *password* :: string : Password to check + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[accounts](admin-tags.md#accounts) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/check_password +{ + "user": "peter", + "host": "myserver.com", + "password": "secret" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## check_password_hash + + +Check if the password hash is correct + + +Allows hash methods from the Erlang/OTP [crypto](https://www.erlang.org/doc/man/crypto) application. + +__Arguments:__ + +- *user* :: string : User name to check +- *host* :: string : Server to check +- *passwordhash* :: string : Password's hash value +- *hashmethod* :: string : Name of hash method + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[accounts](admin-tags.md#accounts) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/check_password_hash +{ + "user": "peter", + "host": "myserver.com", + "passwordhash": "5ebe2294ecd0e0f08eab7690d2a6ee69", + "hashmethod": "md5" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## clear_cache + + +Clear database cache on all nodes + +__Arguments:__ + + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[server](admin-tags.md#server) + +__Examples:__ + + +~~~ json +POST /api/clear_cache +{ + +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## compile + + +Recompile and reload Erlang source code file + +__Arguments:__ + +- *file* :: string : Filename of erlang source file to compile + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[erlang](admin-tags.md#erlang) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/compile +{ + "file": "/home/me/srcs/ejabberd/mod_example.erl" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## connected_users + + +List all established sessions + +__Arguments:__ + + +__Result:__ + +- *connected_users* :: [sessions::string] : List of users sessions + +__Tags:__ +[session](admin-tags.md#session) + +__Examples:__ + + +~~~ json +POST /api/connected_users +{ + +} + +HTTP/1.1 200 OK +[ + "user1@example.com", + "user2@example.com" +] +~~~ + + + + +## connected_users_info + + +List all established sessions and their information + +__Arguments:__ + + +__Result:__ + +- *connected_users_info* :: [{jid::string, connection::string, ip::string, port::integer, priority::integer, node::string, uptime::integer, status::string, resource::string, statustext::string}] + +__Tags:__ +[session](admin-tags.md#session) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/connected_users_info +{ + +} + +HTTP/1.1 200 OK +[ + { + "jid": "user1@myserver.com/tka", + "connection": "c2s", + "ip": "127.0.0.1", + "port": 42656, + "priority": 8, + "node": "ejabberd@localhost", + "uptime": 231, + "status": "dnd", + "resource": "tka", + "statustext": "" + } +] +~~~ + + + + +## connected_users_number + + +Get the number of established sessions + +__Arguments:__ + + +__Result:__ + +- *num_sessions* :: integer + +__Tags:__ +[session](admin-tags.md#session), [statistics](admin-tags.md#statistics) + +__Examples:__ + + +~~~ json +POST /api/connected_users_number +{ + +} + +HTTP/1.1 200 OK +2 +~~~ + + + + +## connected_users_vhost + + +Get the list of established sessions in a vhost + +__Arguments:__ + +- *host* :: string : Server name + +__Result:__ + +- *connected_users_vhost* :: [sessions::string] + +__Tags:__ +[session](admin-tags.md#session) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/connected_users_vhost +{ + "host": "myexample.com" +} + +HTTP/1.1 200 OK +[ + "user1@myserver.com/tka", + "user2@localhost/tka" +] +~~~ + + + + +## convert_to_scram + + +Convert the passwords of users to SCRAM + +__Arguments:__ + +- *host* :: string : Vhost which users' passwords will be scrammed + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[sql](admin-tags.md#sql) + +__Examples:__ + + +~~~ json +POST /api/convert_to_scram +{ + "host": "example.com" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## convert_to_yaml + + +Convert the input file from Erlang to YAML format + +__Arguments:__ + +- *in* :: string : Full path to the original configuration file +- *out* :: string : And full path to final file + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[config](admin-tags.md#config) + +__Examples:__ + + +~~~ json +POST /api/convert_to_yaml +{ + "in": "/etc/ejabberd/ejabberd.cfg", + "out": "/etc/ejabberd/ejabberd.yml" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## create_room + + +Create a MUC room name@service in host + +__Arguments:__ + +- *name* :: string : Room name +- *service* :: string : MUC service +- *host* :: string : Server host + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[muc_room](admin-tags.md#muc_room) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/create_room +{ + "name": "room1", + "service": "conference.example.com", + "host": "example.com" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## create_room_with_opts + + +Create a MUC room name@service in host with given options + + +The syntax of `affiliations` is: `Type:JID,Type:JID`. The syntax of `subscribers` is: `JID:Nick:Node:Node2:Node3,JID:Nick:Node`. + +__Arguments:__ + +- *name* :: string : Room name +- *service* :: string : MUC service +- *host* :: string : Server host +- *options* :: [{name::string, value::string}] : List of options + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[muc_room](admin-tags.md#muc_room), [muc_sub](admin-tags.md#muc_sub) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/create_room_with_opts +{ + "name": "room1", + "service": "conference.example.com", + "host": "localhost", + "options": [ + { + "name": "members_only", + "value": "true" + }, + { + "name": "affiliations", + "value": "owner:bob@example.com,member:peter@example.com" + }, + { + "name": "subscribers", + "value": "bob@example.com:Bob:messages:subject,anne@example.com:Anne:messages" + } + ] +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## create_rooms_file + + +Create the rooms indicated in file + + +Provide one room JID per line. Rooms will be created after restart. + +__Arguments:__ + +- *file* :: string : Path to the text file with one room JID per line + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[muc](admin-tags.md#muc) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/create_rooms_file +{ + "file": "/home/ejabberd/rooms.txt" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## delete_expired_messages + + +Delete expired offline messages from database + +__Arguments:__ + + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[purge](admin-tags.md#purge) + +__Examples:__ + + +~~~ json +POST /api/delete_expired_messages +{ + +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## delete_expired_pubsub_items + + + +Delete expired PubSub items + +__Arguments:__ + + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[purge](admin-tags.md#purge) + +__Module:__ +[mod_pubsub](modules.md#mod_pubsub) + +__Examples:__ + + +~~~ json +POST /api/delete_expired_pubsub_items +{ + +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## delete_mnesia + + +Delete elements in Mnesia database for a given vhost + +__Arguments:__ + +- *host* :: string : Vhost which content will be deleted in Mnesia database + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[mnesia](admin-tags.md#mnesia) + +__Examples:__ + + +~~~ json +POST /api/delete_mnesia +{ + "host": "example.com" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## delete_old_mam_messages + + +Delete MAM messages older than DAYS + + +Valid message TYPEs: `chat`, `groupchat`, `all`. + +__Arguments:__ + +- *type* :: string : Type of messages to delete (`chat`, `groupchat`, `all`) +- *days* :: integer : Days to keep messages + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[purge](admin-tags.md#purge) + +__Module:__ +[mod_mam](modules.md#mod_mam) + +__Examples:__ + + +~~~ json +POST /api/delete_old_mam_messages +{ + "type": "all", + "days": 31 +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## delete_old_mam_messages_batch + + + +Delete MAM messages older than DAYS + + +Valid message TYPEs: `chat`, `groupchat`, `all`. + +__Arguments:__ + +- *host* :: string : Name of host where messages should be deleted +- *type* :: string : Type of messages to delete (`chat`, `groupchat`, `all`) +- *days* :: integer : Days to keep messages +- *batch_size* :: integer : Number of messages to delete per batch +- *rate* :: integer : Desired rate of messages to delete per minute + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[purge](admin-tags.md#purge) + +__Module:__ +[mod_mam](modules.md#mod_mam) + +__Examples:__ + + +~~~ json +POST /api/delete_old_mam_messages_batch +{ + "host": "localhost", + "type": "all", + "days": 31, + "batch_size": 1000, + "rate": 10000 +} + +HTTP/1.1 200 OK +"Removal of 5000 messages in progress" +~~~ + + + + +## delete_old_mam_messages_status + + + +Status of delete old MAM messages operation + +__Arguments:__ + +- *host* :: string : Name of host where messages should be deleted + +__Result:__ + +- *status* :: string : Status test + +__Tags:__ +[purge](admin-tags.md#purge) + +__Module:__ +[mod_mam](modules.md#mod_mam) + +__Examples:__ + + +~~~ json +POST /api/delete_old_mam_messages_status +{ + "host": "localhost" +} + +HTTP/1.1 200 OK +"Operation in progress, delete 5000 messages" +~~~ + + + + +## delete_old_messages + + +Delete offline messages older than DAYS + +__Arguments:__ + +- *days* :: integer : Number of days + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[purge](admin-tags.md#purge) + +__Examples:__ + + +~~~ json +POST /api/delete_old_messages +{ + "days": 31 +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## delete_old_messages_batch + + + +Delete offline messages older than DAYS + +__Arguments:__ + +- *host* :: string : Name of host where messages should be deleted +- *days* :: integer : Days to keep messages +- *batch_size* :: integer : Number of messages to delete per batch +- *rate* :: integer : Desired rate of messages to delete per minute + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[purge](admin-tags.md#purge) + +__Examples:__ + + +~~~ json +POST /api/delete_old_messages_batch +{ + "host": "localhost", + "days": 31, + "batch_size": 1000, + "rate": 10000 +} + +HTTP/1.1 200 OK +"Removal of 5000 messages in progress" +~~~ + + + + +## delete_old_messages_status + + + +Status of delete old offline messages operation + +__Arguments:__ + +- *host* :: string : Name of host where messages should be deleted + +__Result:__ + +- *status* :: string : Status test + +__Tags:__ +[purge](admin-tags.md#purge) + +__Examples:__ + + +~~~ json +POST /api/delete_old_messages_status +{ + "host": "localhost" +} + +HTTP/1.1 200 OK +"Operation in progress, delete 5000 messages" +~~~ + + + + +## delete_old_pubsub_items + + + +Keep only NUMBER of PubSub items per node + +__Arguments:__ + +- *number* :: integer : Number of items to keep per node + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[purge](admin-tags.md#purge) + +__Module:__ +[mod_pubsub](modules.md#mod_pubsub) + +__Examples:__ + + +~~~ json +POST /api/delete_old_pubsub_items +{ + "number": 1000 +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## delete_old_push_sessions + + +Remove push sessions older than DAYS + +__Arguments:__ + +- *days* :: integer + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[purge](admin-tags.md#purge) + +__Module:__ +[mod_push](modules.md#mod_push) + +__Examples:__ + + +~~~ json +POST /api/delete_old_push_sessions +{ + "days": 1 +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## delete_old_users + + +Delete users that didn't log in last days, or that never logged + + +To protect admin accounts, configure this for example: +``` yaml +access_rules: + protect_old_users: + - allow: admin + - deny: all +``` + + +__Arguments:__ + +- *days* :: integer : Last login age in days of accounts that should be removed + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[accounts](admin-tags.md#accounts), [purge](admin-tags.md#purge) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/delete_old_users +{ + "days": 30 +} + +HTTP/1.1 200 OK +"Deleted 2 users: ["oldman@myserver.com", "test@myserver.com"]" +~~~ + + + + +## delete_old_users_vhost + + +Delete users that didn't log in last days in vhost, or that never logged + + +To protect admin accounts, configure this for example: +``` yaml +access_rules: + delete_old_users: + - deny: admin + - allow: all +``` + + +__Arguments:__ + +- *host* :: string : Server name +- *days* :: integer : Last login age in days of accounts that should be removed + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[accounts](admin-tags.md#accounts), [purge](admin-tags.md#purge) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/delete_old_users_vhost +{ + "host": "myserver.com", + "days": 30 +} + +HTTP/1.1 200 OK +"Deleted 2 users: ["oldman@myserver.com", "test@myserver.com"]" +~~~ + + + + +## delete_rosteritem + + +Delete an item from a user's roster (supports ODBC) + +__Arguments:__ + +- *localuser* :: string : User name +- *localhost* :: string : Server name +- *user* :: string : Contact user name +- *host* :: string : Contact server name + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[roster](admin-tags.md#roster) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/delete_rosteritem +{ + "localuser": "user1", + "localhost": "myserver.com", + "user": "user2", + "host": "myserver.com" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## destroy_room + + +Destroy a MUC room + +__Arguments:__ + +- *name* :: string : Room name +- *service* :: string : MUC service + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[muc_room](admin-tags.md#muc_room) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/destroy_room +{ + "name": "room1", + "service": "conference.example.com" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## destroy_rooms_file + + +Destroy the rooms indicated in file + + +Provide one room JID per line. + +__Arguments:__ + +- *file* :: string : Path to the text file with one room JID per line + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[muc](admin-tags.md#muc) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/destroy_rooms_file +{ + "file": "/home/ejabberd/rooms.txt" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## dump + + +Dump the Mnesia database to a text file + +__Arguments:__ + +- *file* :: string : Full path for the text file + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[mnesia](admin-tags.md#mnesia) + +__Examples:__ + + +~~~ json +POST /api/dump +{ + "file": "/var/lib/ejabberd/database.txt" +} + +HTTP/1.1 200 OK +"Success" +~~~ + + + + +## dump_config + + +Dump configuration in YAML format as seen by ejabberd + +__Arguments:__ + +- *out* :: string : Full path to output file + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[config](admin-tags.md#config) + +__Examples:__ + + +~~~ json +POST /api/dump_config +{ + "out": "/tmp/ejabberd.yml" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## dump_table + + +Dump a Mnesia table to a text file + +__Arguments:__ + +- *file* :: string : Full path for the text file +- *table* :: string : Table name + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[mnesia](admin-tags.md#mnesia) + +__Examples:__ + + +~~~ json +POST /api/dump_table +{ + "file": "/var/lib/ejabberd/table-muc-registered.txt", + "table": "muc_registered" +} + +HTTP/1.1 200 OK +"Success" +~~~ + + + + +## export2sql + + +Export virtual host information from Mnesia tables to SQL file + + +Configure the modules to use SQL, then call this command. After correctly exported the database of a vhost, you may want to delete from mnesia with the [delete_mnesia](#delete_mnesia) API. + +__Arguments:__ + +- *host* :: string : Vhost +- *file* :: string : Full path to the destination SQL file + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[mnesia](admin-tags.md#mnesia) + +__Examples:__ + + +~~~ json +POST /api/export2sql +{ + "host": "example.com", + "file": "/var/lib/ejabberd/example.com.sql" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## export_piefxis + + +Export data of all users in the server to PIEFXIS files (XEP-0227) + +__Arguments:__ + +- *dir* :: string : Full path to a directory + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[mnesia](admin-tags.md#mnesia) + +__Examples:__ + + +~~~ json +POST /api/export_piefxis +{ + "dir": "/var/lib/ejabberd/" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## export_piefxis_host + + +Export data of users in a host to PIEFXIS files (XEP-0227) + +__Arguments:__ + +- *dir* :: string : Full path to a directory +- *host* :: string : Vhost to export + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[mnesia](admin-tags.md#mnesia) + +__Examples:__ + + +~~~ json +POST /api/export_piefxis_host +{ + "dir": "/var/lib/ejabberd/", + "host": "example.com" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## gc + + + +Force full garbage collection + +__Arguments:__ + + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[server](admin-tags.md#server) + +__Examples:__ + + +~~~ json +POST /api/gc +{ + +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## gen_html_doc_for_commands + + +Generates html documentation for ejabberd_commands + +__Arguments:__ + +- *file* :: string : Path to file where generated documentation should be stored +- *regexp* :: string : Regexp matching names of commands or modules that will be included inside generated document +- *examples* :: string : Comma separated list of languages (chosen from `java`, `perl`, `xmlrpc`, `json`) that will have example invocation include in markdown document + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[documentation](admin-tags.md#documentation) + +__Examples:__ + + +~~~ json +POST /api/gen_html_doc_for_commands +{ + "file": "/home/me/docs/api.html", + "regexp": "mod_admin", + "examples": "java,json" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## gen_markdown_doc_for_commands + + +Generates markdown documentation for ejabberd_commands + +__Arguments:__ + +- *file* :: string : Path to file where generated documentation should be stored +- *regexp* :: string : Regexp matching names of commands or modules that will be included inside generated document, or `runtime` to get commands registered at runtime +- *examples* :: string : Comma separated list of languages (chosen from `java`, `perl`, `xmlrpc`, `json`) that will have example invocation include in markdown document + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[documentation](admin-tags.md#documentation) + +__Examples:__ + + +~~~ json +POST /api/gen_markdown_doc_for_commands +{ + "file": "/home/me/docs/api.html", + "regexp": "mod_admin", + "examples": "java,json" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## gen_markdown_doc_for_tags + + + +Generates markdown documentation for ejabberd_commands + +__Arguments:__ + +- *file* :: string : Path to file where generated documentation should be stored + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[documentation](admin-tags.md#documentation) + +__Examples:__ + + +~~~ json +POST /api/gen_markdown_doc_for_tags +{ + "file": "/home/me/docs/tags.md" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## get_ban_details 🟤 + + + +Get ban details about an account + + +Check [ban_account](#ban_account) API. + +__Arguments:__ + +- *user* :: string : User name to unban +- *host* :: string : Server name + +__Result:__ + +- *ban_details* :: [{name::string, value::string}] + +__Tags:__ +[accounts](admin-tags.md#accounts), [v2](admin-tags.md#v2) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/get_ban_details +{ + "user": "attacker", + "host": "myserver.com" +} + +HTTP/1.1 200 OK +[ + { + "name": "reason", + "value": "Spamming other users" + }, + { + "name": "bandate", + "value": "2024-04-22T09:16:47.975312Z" + }, + { + "name": "lastdate", + "value": "2024-04-22T08:39:12Z" + }, + { + "name": "lastreason", + "value": "Connection reset by peer" + } +] +~~~ + + + + +## get_cookie + + +Get the Erlang cookie of this node + +__Arguments:__ + + +__Result:__ + +- *cookie* :: string : Erlang cookie used for authentication by ejabberd + +__Tags:__ +[erlang](admin-tags.md#erlang) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/get_cookie +{ + +} + +HTTP/1.1 200 OK +"MWTAVMODFELNLSMYXPPD" +~~~ + + + + +## get_last + + +Get last activity information + + +Timestamp is UTC and [XEP-0082](https://xmpp.org/extensions/xep-0082.html) format, for example: `2017-02-23T22:25:28.063062Z ONLINE` + +__Arguments:__ + +- *user* :: string : User name +- *host* :: string : Server name + +__Result:__ + +- *last_activity* :: {timestamp::string, status::string} : Last activity timestamp and status + +__Tags:__ +[last](admin-tags.md#last) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/get_last +{ + "user": "user1", + "host": "myserver.com" +} + +HTTP/1.1 200 OK +{ + "timestamp": "2017-06-30T14:32:16.060684Z", + "status": "ONLINE" +} +~~~ + + + + +## get_loglevel + + +Get the current loglevel + +__Arguments:__ + + +__Result:__ + +- *levelatom* :: string : Tuple with the log level number, its keyword and description + +__Tags:__ +[logs](admin-tags.md#logs) + +__Examples:__ + + +~~~ json +POST /api/get_loglevel +{ + +} + +HTTP/1.1 200 OK +"warning" +~~~ + + + + +## get_master 🟤 + + + +Get master node of the clustered Mnesia tables + + +If there is no master, returns `none`. + +__Arguments:__ + + +__Result:__ + +- *nodename* :: string + +__Tags:__ +[cluster](admin-tags.md#cluster) + +__Examples:__ + + +~~~ json +POST /api/get_master +{ + +} + +HTTP/1.1 200 OK +"aaaaa" +~~~ + + + + +## get_offline_count + + +Get the number of unread offline messages + +__Arguments:__ + +- *user* :: string +- *host* :: string + +__Result:__ + +- *value* :: integer : Number + +__Tags:__ +[offline](admin-tags.md#offline) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/get_offline_count +{ + "user": "aaaaa", + "host": "bbbbb" +} + +HTTP/1.1 200 OK +5 +~~~ + + + + +## get_presence + + +Retrieve the resource with highest priority, and its presence (show and status message) for a given user. + + +The `jid` value contains the user JID with resource. + +The `show` value contains the user presence flag. It can take limited values: + + - `available` + - `chat` (Free for chat) + - `away` + - `dnd` (Do not disturb) + - `xa` (Not available, extended away) + - `unavailable` (Not connected) + +`status` is a free text defined by the user client. + +__Arguments:__ + +- *user* :: string : User name +- *host* :: string : Server name + +__Result:__ + +- *presence* :: {jid::string, show::string, status::string} + +__Tags:__ +[session](admin-tags.md#session) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/get_presence +{ + "user": "peter", + "host": "myexample.com" +} + +HTTP/1.1 200 OK +{ + "jid": "user1@myserver.com/tka", + "show": "dnd", + "status": "Busy" +} +~~~ + + + + +## get_room_affiliation + + +Get affiliation of a user in MUC room + +__Arguments:__ + +- *name* :: string : Room name +- *service* :: string : MUC service +- *jid* :: string : User JID + +__Result:__ + +- *affiliation* :: string : Affiliation of the user + +__Tags:__ +[muc_room](admin-tags.md#muc_room) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/get_room_affiliation +{ + "name": "room1", + "service": "conference.example.com", + "jid": "user1@example.com" +} + +HTTP/1.1 200 OK +"member" +~~~ + + + + +## get_room_affiliations + + +Get the list of affiliations of a MUC room + +__Arguments:__ + +- *name* :: string : Room name +- *service* :: string : MUC service + +__Result:__ + +- *affiliations* :: [{username::string, domain::string, affiliation::string, reason::string}] : The list of affiliations with username, domain, affiliation and reason + +__Tags:__ +[muc_room](admin-tags.md#muc_room) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/get_room_affiliations +{ + "name": "room1", + "service": "conference.example.com" +} + +HTTP/1.1 200 OK +[ + { + "username": "user1", + "domain": "example.com", + "affiliation": "member", + "reason": "member" + } +] +~~~ + + + + +## get_room_history + + + +Get history of messages stored inside MUC room state + +__Arguments:__ + +- *name* :: string : Room name +- *service* :: string : MUC service + +__Result:__ + +- *history* :: [{timestamp::string, message::string}] + +__Tags:__ +[muc_room](admin-tags.md#muc_room) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/get_room_history +{ + "name": "room1", + "service": "conference.example.com" +} + +HTTP/1.1 200 OK +[ + { + "timestamp": "aaaaa", + "message": "bbbbb" + }, + { + "timestamp": "ccccc", + "message": "ddddd" + } +] +~~~ + + + + +## get_room_occupants + + +Get the list of occupants of a MUC room + +__Arguments:__ + +- *name* :: string : Room name +- *service* :: string : MUC service + +__Result:__ + +- *occupants* :: [{jid::string, nick::string, role::string}] : The list of occupants with JID, nick and affiliation + +__Tags:__ +[muc_room](admin-tags.md#muc_room) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/get_room_occupants +{ + "name": "room1", + "service": "conference.example.com" +} + +HTTP/1.1 200 OK +[ + { + "jid": "user1@example.com/psi", + "nick": "User 1", + "role": "owner" + } +] +~~~ + + + + +## get_room_occupants_number + + +Get the number of occupants of a MUC room + +__Arguments:__ + +- *name* :: string : Room name +- *service* :: string : MUC service + +__Result:__ + +- *occupants* :: integer : Number of room occupants + +__Tags:__ +[muc_room](admin-tags.md#muc_room) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/get_room_occupants_number +{ + "name": "room1", + "service": "conference.example.com" +} + +HTTP/1.1 200 OK +7 +~~~ + + + + +## get_room_options + + +Get options from a MUC room + +__Arguments:__ + +- *name* :: string : Room name +- *service* :: string : MUC service + +__Result:__ + +- *options* :: [{name::string, value::string}] : List of room options tuples with name and value + +__Tags:__ +[muc_room](admin-tags.md#muc_room) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/get_room_options +{ + "name": "room1", + "service": "conference.example.com" +} + +HTTP/1.1 200 OK +[ + { + "name": "members_only", + "value": "true" + } +] +~~~ + + + + +## get_roster + + + +Get list of contacts in a local user roster + + +`subscription` can be: `none`, `from`, `to`, `both`. + +`pending` can be: `in`, `out`, `none`. + +__Arguments:__ + +- *user* :: string +- *host* :: string + +__Result:__ + +- *contacts* :: [{jid::string, nick::string, subscription::string, pending::string, groups::[group::string]}] + +__Tags:__ +[roster](admin-tags.md#roster) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/get_roster +{ + "user": "aaaaa", + "host": "bbbbb" +} + +HTTP/1.1 200 OK +[ + { + "jid": "aaaaa", + "nick": "bbbbb", + "subscription": "ccccc", + "pending": "ddddd", + "groups": [ + "eeeee", + "fffff" + ] + }, + { + "jid": "ggggg", + "nick": "hhhhh", + "subscription": "iiiii", + "pending": "jjjjj", + "groups": [ + "kkkkk", + "lllll" + ] + } +] +~~~ + + + + +## get_roster_count 🟤 + + + +Get number of contacts in a local user roster + +__Arguments:__ + +- *user* :: string +- *host* :: string + +__Result:__ + +- *value* :: integer : Number + +__Tags:__ +[roster](admin-tags.md#roster) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/get_roster_count +{ + "user": "aaaaa", + "host": "bbbbb" +} + +HTTP/1.1 200 OK +5 +~~~ + + + + +## get_subscribers + + +List subscribers of a MUC conference + +__Arguments:__ + +- *name* :: string : Room name +- *service* :: string : MUC service + +__Result:__ + +- *subscribers* :: [jid::string] : The list of users that are subscribed to that room + +__Tags:__ +[muc_room](admin-tags.md#muc_room), [muc_sub](admin-tags.md#muc_sub) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/get_subscribers +{ + "name": "room1", + "service": "conference.example.com" +} + +HTTP/1.1 200 OK +[ + "user2@example.com", + "user3@example.com" +] +~~~ + + + + +## get_user_rooms + + +Get the list of rooms where this user is occupant + +__Arguments:__ + +- *user* :: string : Username +- *host* :: string : Server host + +__Result:__ + +- *rooms* :: [room::string] + +__Tags:__ +[muc](admin-tags.md#muc) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/get_user_rooms +{ + "user": "tom", + "host": "example.com" +} + +HTTP/1.1 200 OK +[ + "room1@conference.example.com", + "room2@conference.example.com" +] +~~~ + + + + +## get_user_subscriptions + + + +Get the list of rooms where this user is subscribed + +__Arguments:__ + +- *user* :: string : Username +- *host* :: string : Server host + +__Result:__ + +- *rooms* :: [{roomjid::string, usernick::string, nodes::[node::string]}] + +__Tags:__ +[muc](admin-tags.md#muc), [muc_sub](admin-tags.md#muc_sub) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/get_user_subscriptions +{ + "user": "tom", + "host": "example.com" +} + +HTTP/1.1 200 OK +[ + { + "roomjid": "room1@conference.example.com", + "usernick": "Tommy", + "nodes": [ + "mucsub:config" + ] + } +] +~~~ + + + + +## get_vcard + + +Get content from a vCard field + + +Some vcard field names in `get`/`set_vcard` are: + +* FN - Full Name +* NICKNAME - Nickname +* BDAY - Birthday +* TITLE - Work: Position +* ROLE - Work: Role + +For a full list of vCard fields check [XEP-0054: vcard-temp](https://xmpp.org/extensions/xep-0054.html) + +__Arguments:__ + +- *user* :: string : User name +- *host* :: string : Server name +- *name* :: string : Field name + +__Result:__ + +- *content* :: string : Field content + +__Tags:__ +[vcard](admin-tags.md#vcard) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/get_vcard +{ + "user": "user1", + "host": "myserver.com", + "name": "NICKNAME" +} + +HTTP/1.1 200 OK +"User 1" +~~~ + + + + +## get_vcard2 + + +Get content from a vCard subfield + + +Some vcard field names and subnames in `get`/`set_vcard2` are: + +* N FAMILY - Family name +* N GIVEN - Given name +* N MIDDLE - Middle name +* ADR CTRY - Address: Country +* ADR LOCALITY - Address: City +* TEL HOME - Telephone: Home +* TEL CELL - Telephone: Cellphone +* TEL WORK - Telephone: Work +* TEL VOICE - Telephone: Voice +* EMAIL USERID - E-Mail Address +* ORG ORGNAME - Work: Company +* ORG ORGUNIT - Work: Department + +For a full list of vCard fields check [XEP-0054: vcard-temp](https://xmpp.org/extensions/xep-0054.html) + +__Arguments:__ + +- *user* :: string : User name +- *host* :: string : Server name +- *name* :: string : Field name +- *subname* :: string : Subfield name + +__Result:__ + +- *content* :: string : Field content + +__Tags:__ +[vcard](admin-tags.md#vcard) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/get_vcard2 +{ + "user": "user1", + "host": "myserver.com", + "name": "N", + "subname": "FAMILY" +} + +HTTP/1.1 200 OK +"Schubert" +~~~ + + + + +## get_vcard2_multi + + +Get multiple contents from a vCard field + + +Some vcard field names and subnames in `get`/`set_vcard2` are: + +* N FAMILY - Family name +* N GIVEN - Given name +* N MIDDLE - Middle name +* ADR CTRY - Address: Country +* ADR LOCALITY - Address: City +* TEL HOME - Telephone: Home +* TEL CELL - Telephone: Cellphone +* TEL WORK - Telephone: Work +* TEL VOICE - Telephone: Voice +* EMAIL USERID - E-Mail Address +* ORG ORGNAME - Work: Company +* ORG ORGUNIT - Work: Department + +For a full list of vCard fields check [XEP-0054: vcard-temp](https://xmpp.org/extensions/xep-0054.html) + +__Arguments:__ + +- *user* :: string +- *host* :: string +- *name* :: string +- *subname* :: string + +__Result:__ + +- *contents* :: [value::string] + +__Tags:__ +[vcard](admin-tags.md#vcard) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/get_vcard2_multi +{ + "user": "aaaaa", + "host": "bbbbb", + "name": "ccccc", + "subname": "ddddd" +} + +HTTP/1.1 200 OK +[ + "aaaaa", + "bbbbb" +] +~~~ + + + + +## halt + + + +Halt ejabberd abruptly with status code 1 + +__Arguments:__ + + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[server](admin-tags.md#server) + +__Examples:__ + + +~~~ json +POST /api/halt +{ + +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## help + + +Get list of commands, or help of a command (only ejabberdctl) + + +This command is exclusive for the ejabberdctl command-line script, don't attempt to execute it using any other API frontend. + +__Arguments:__ + + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[ejabberdctl](admin-tags.md#ejabberdctl) + +__Examples:__ + + +~~~ json +POST /api/help +{ + +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## import_dir + + +Import users data from jabberd14 spool dir + +__Arguments:__ + +- *file* :: string : Full path to the jabberd14 spool directory + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[mnesia](admin-tags.md#mnesia) + +__Examples:__ + + +~~~ json +POST /api/import_dir +{ + "file": "/var/lib/ejabberd/jabberd14/" +} + +HTTP/1.1 200 OK +"Success" +~~~ + + + + +## import_file + + +Import user data from jabberd14 spool file + +__Arguments:__ + +- *file* :: string : Full path to the jabberd14 spool file + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[mnesia](admin-tags.md#mnesia) + +__Examples:__ + + +~~~ json +POST /api/import_file +{ + "file": "/var/lib/ejabberd/jabberd14.spool" +} + +HTTP/1.1 200 OK +"Success" +~~~ + + + + +## import_piefxis + + +Import users data from a PIEFXIS file (XEP-0227) + +__Arguments:__ + +- *file* :: string : Full path to the PIEFXIS file + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[mnesia](admin-tags.md#mnesia) + +__Examples:__ + + +~~~ json +POST /api/import_piefxis +{ + "file": "/var/lib/ejabberd/example.com.xml" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## import_prosody + + +Import data from Prosody + + +Note: this requires ejabberd to be compiled with `./configure --enable-lua` (which installs the `luerl` library). + +__Arguments:__ + +- *dir* :: string : Full path to the Prosody data directory + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[mnesia](admin-tags.md#mnesia), [sql](admin-tags.md#sql) + +__Examples:__ + + +~~~ json +POST /api/import_prosody +{ + "dir": "/var/lib/prosody/datadump/" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## incoming_s2s_number + + +Number of incoming s2s connections on the node + +__Arguments:__ + + +__Result:__ + +- *s2s_incoming* :: integer + +__Tags:__ +[statistics](admin-tags.md#statistics), [s2s](admin-tags.md#s2s) + +__Examples:__ + + +~~~ json +POST /api/incoming_s2s_number +{ + +} + +HTTP/1.1 200 OK +1 +~~~ + + + + +## install_fallback + + +Install Mnesia database from a binary backup file + + +The binary backup file is installed as fallback: it will be used to restore the database at the next ejabberd start. This means that, after running this command, you have to restart ejabberd. This command requires less memory than [restore](#restore) API. + +__Arguments:__ + +- *file* :: string : Full path to the fallback file + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[mnesia](admin-tags.md#mnesia) + +__Examples:__ + + +~~~ json +POST /api/install_fallback +{ + "file": "/var/lib/ejabberd/database.fallback" +} + +HTTP/1.1 200 OK +"Success" +~~~ + + + + +## join_cluster 🟤 + + + +Join our local node into the cluster handled by Node + +__Arguments:__ + +- *node* :: string : Nodename of the node to join + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[cluster](admin-tags.md#cluster) + +__Examples:__ + + +~~~ json +POST /api/join_cluster +{ + "node": "ejabberd1@machine7" +} + +HTTP/1.1 200 OK +"Success" +~~~ + + + + +## join_cluster_here 🟤 + + + +Join a remote Node here, into our cluster + +__Arguments:__ + +- *node* :: string : Nodename of the node to join here + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[cluster](admin-tags.md#cluster) + +__Examples:__ + + +~~~ json +POST /api/join_cluster_here +{ + "node": "ejabberd1@machine7" +} + +HTTP/1.1 200 OK +"Success" +~~~ + + + + +## kick_session + + +Kick a user session + +__Arguments:__ + +- *user* :: string : User name +- *host* :: string : Server name +- *resource* :: string : User's resource +- *reason* :: string : Reason for closing session + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[session](admin-tags.md#session) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/kick_session +{ + "user": "peter", + "host": "myserver.com", + "resource": "Psi", + "reason": "Stuck connection" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## kick_user 🟤 + + + +Disconnect user's active sessions + +__Arguments:__ + +- *user* :: string : User name +- *host* :: string : Server name + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[session](admin-tags.md#session), [v2](admin-tags.md#v2) + +__Examples:__ + + +~~~ json +POST /api/kick_user +{ + "user": "user1", + "host": "example.com" +} + +HTTP/1.1 200 OK +"Kicked sessions: 2" +~~~ + + + + +## leave_cluster + + +Remove and shutdown Node from the running cluster + + +This command can be run from any running node of the cluster, even the node to be removed. In the removed node, this command works only when using ejabberdctl, not mod_http_api or other code that runs inside the same ejabberd node that will leave. + +__Arguments:__ + +- *node* :: string : Nodename of the node to kick from the cluster + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[cluster](admin-tags.md#cluster) + +__Examples:__ + + +~~~ json +POST /api/leave_cluster +{ + "node": "ejabberd1@machine8" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## list_certificates + + +Lists all ACME certificates + +__Arguments:__ + + +__Result:__ + +- *certificates* :: [{domain::string, file::string, used::string}] + +__Tags:__ +[acme](admin-tags.md#acme) + +__Examples:__ + + +~~~ json +POST /api/list_certificates +{ + +} + +HTTP/1.1 200 OK +[ + { + "domain": "aaaaa", + "file": "bbbbb", + "used": "ccccc" + }, + { + "domain": "ddddd", + "file": "eeeee", + "used": "fffff" + } +] +~~~ + + + + +## list_cluster + + +List running nodes that are part of this cluster + +__Arguments:__ + + +__Result:__ + +- *nodes* :: [node::string] + +__Tags:__ +[cluster](admin-tags.md#cluster) + +__Examples:__ + + +~~~ json +POST /api/list_cluster +{ + +} + +HTTP/1.1 200 OK +[ + "ejabberd1@machine7", + "ejabberd1@machine8" +] +~~~ + + + + +## list_cluster_detailed 🟤 + + + +List nodes (both running and known) and some stats + +__Arguments:__ + + +__Result:__ + +- *nodes* :: [{name::string, running::string, status::string, online_users::integer, processes::integer, uptime_seconds::integer, master_node::string}] + +__Tags:__ +[cluster](admin-tags.md#cluster) + +__Examples:__ + + +~~~ json +POST /api/list_cluster_detailed +{ + +} + +HTTP/1.1 200 OK +[ + { + "name": "ejabberd@localhost", + "running": "true", + "status": "The node ejabberd is started. Status...", + "online_users": 7, + "processes": 348, + "uptime_seconds": 60, + "master_node": "none" + } +] +~~~ + + + + +## load + + +Restore Mnesia database from a text dump file + + +Restore immediately. This is not recommended for big databases, as it will consume much time, memory and processor. In that case it's preferable to use [backup](#backup) API and [install_fallback](#install_fallback) API. + +__Arguments:__ + +- *file* :: string : Full path to the text file + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[mnesia](admin-tags.md#mnesia) + +__Examples:__ + + +~~~ json +POST /api/load +{ + "file": "/var/lib/ejabberd/database.txt" +} + +HTTP/1.1 200 OK +"Success" +~~~ + + + + +## man + + + +Generate Unix manpage for current ejabberd version + +__Arguments:__ + + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[documentation](admin-tags.md#documentation) + +__Examples:__ + + +~~~ json +POST /api/man +{ + +} + +HTTP/1.1 200 OK +"Success" +~~~ + + + + +## mnesia_change_nodename + + +Change the erlang node name in a backup file + +__Arguments:__ + +- *oldnodename* :: string : Name of the old erlang node +- *newnodename* :: string : Name of the new node +- *oldbackup* :: string : Path to old backup file +- *newbackup* :: string : Path to the new backup file + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[mnesia](admin-tags.md#mnesia) + +__Examples:__ + + +~~~ json +POST /api/mnesia_change_nodename +{ + "oldnodename": "ejabberd@machine1", + "newnodename": "ejabberd@machine2", + "oldbackup": "/var/lib/ejabberd/old.backup", + "newbackup": "/var/lib/ejabberd/new.backup" +} + +HTTP/1.1 200 OK +"Success" +~~~ + + + + +## mnesia_info + + +Dump info on global Mnesia state + +__Arguments:__ + + +__Result:__ + +- *res* :: string + +__Tags:__ +[mnesia](admin-tags.md#mnesia) + +__Examples:__ + + +~~~ json +POST /api/mnesia_info +{ + +} + +HTTP/1.1 200 OK +"aaaaa" +~~~ + + + + +## mnesia_info_ctl + + + +Show information of Mnesia system (only ejabberdctl) + + +This command is exclusive for the ejabberdctl command-line script, don't attempt to execute it using any other API frontend. + +__Arguments:__ + + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[ejabberdctl](admin-tags.md#ejabberdctl), [mnesia](admin-tags.md#mnesia) + +__Examples:__ + + +~~~ json +POST /api/mnesia_info_ctl +{ + +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## mnesia_table_info + + +Dump info on Mnesia table state + +__Arguments:__ + +- *table* :: string : Mnesia table name + +__Result:__ + +- *res* :: string + +__Tags:__ +[mnesia](admin-tags.md#mnesia) + +__Examples:__ + + +~~~ json +POST /api/mnesia_table_info +{ + "table": "roster" +} + +HTTP/1.1 200 OK +"aaaaa" +~~~ + + + + +## module_check + + +Check the contributed module repository compliance + +__Arguments:__ + +- *module* :: string : Module name + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[modules](admin-tags.md#modules) + +__Examples:__ + + +~~~ json +POST /api/module_check +{ + "module": "mod_rest" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## module_install + + +Compile, install and start an available contributed module + +__Arguments:__ + +- *module* :: string : Module name + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[modules](admin-tags.md#modules) + +__Examples:__ + + +~~~ json +POST /api/module_install +{ + "module": "mod_rest" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## module_uninstall + + +Uninstall a contributed module + +__Arguments:__ + +- *module* :: string : Module name + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[modules](admin-tags.md#modules) + +__Examples:__ + + +~~~ json +POST /api/module_uninstall +{ + "module": "mod_rest" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## module_upgrade + + +Upgrade the running code of an installed module + + +In practice, this uninstalls and installs the module + +__Arguments:__ + +- *module* :: string : Module name + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[modules](admin-tags.md#modules) + +__Examples:__ + + +~~~ json +POST /api/module_upgrade +{ + "module": "mod_rest" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## modules_available + + +List the contributed modules available to install + +__Arguments:__ + + +__Result:__ + +- *modules* :: [{name::string, summary::string}] : List of tuples with module name and description + +__Tags:__ +[modules](admin-tags.md#modules) + +__Examples:__ + + +~~~ json +POST /api/modules_available +{ + +} + +HTTP/1.1 200 OK +{ + "mod_cron": "Execute scheduled commands", + "mod_rest": "ReST frontend" +} +~~~ + + + + +## modules_installed + + +List the contributed modules already installed + +__Arguments:__ + + +__Result:__ + +- *modules* :: [{name::string, summary::string}] : List of tuples with module name and description + +__Tags:__ +[modules](admin-tags.md#modules) + +__Examples:__ + + +~~~ json +POST /api/modules_installed +{ + +} + +HTTP/1.1 200 OK +{ + "mod_cron": "Execute scheduled commands", + "mod_rest": "ReST frontend" +} +~~~ + + + + +## modules_update_specs + + +Update the module source code from Git + + +A connection to Internet is required + +__Arguments:__ + + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[modules](admin-tags.md#modules) + +__Examples:__ + + +~~~ json +POST /api/modules_update_specs +{ + +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## muc_online_rooms + + +List existing rooms + + +Ask for a specific host, or `global` to use all vhosts. + +__Arguments:__ + +- *service* :: string : MUC service, or `global` for all + +__Result:__ + +- *rooms* :: [room::string] : List of rooms + +__Tags:__ +[muc](admin-tags.md#muc) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/muc_online_rooms +{ + "service": "conference.example.com" +} + +HTTP/1.1 200 OK +[ + "room1@conference.example.com", + "room2@conference.example.com" +] +~~~ + + + + +## muc_online_rooms_by_regex + + +List existing rooms filtered by regexp + + +Ask for a specific host, or `global` to use all vhosts. + +__Arguments:__ + +- *service* :: string : MUC service, or `global` for all +- *regex* :: string : Regex pattern for room name + +__Result:__ + +- *rooms* :: [{jid::string, public::string, participants::integer}] : List of rooms with summary + +__Tags:__ +[muc](admin-tags.md#muc) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/muc_online_rooms_by_regex +{ + "service": "conference.example.com", + "regex": "^prefix" +} + +HTTP/1.1 200 OK +[ + { + "jid": "room1@conference.example.com", + "public": "true", + "participants": 10 + }, + { + "jid": "room2@conference.example.com", + "public": "false", + "participants": 10 + } +] +~~~ + + + + +## muc_register_nick + + +Register a nick to a User JID in a MUC service + +__Arguments:__ + +- *nick* :: string : Nick +- *jid* :: string : User JID +- *service* :: string : Service + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[muc](admin-tags.md#muc) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/muc_register_nick +{ + "nick": "Tim", + "jid": "tim@example.org", + "service": "conference.example.org" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## muc_unregister_nick + + +Unregister the nick registered by that account in the MUC service + +__Arguments:__ + +- *jid* :: string : User JID +- *service* :: string : MUC service + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[muc](admin-tags.md#muc) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/muc_unregister_nick +{ + "jid": "tim@example.org", + "service": "conference.example.org" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## num_resources + + +Get the number of resources of a user + +__Arguments:__ + +- *user* :: string : User name +- *host* :: string : Server name + +__Result:__ + +- *resources* :: integer : Number of active resources for a user + +__Tags:__ +[session](admin-tags.md#session) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/num_resources +{ + "user": "peter", + "host": "myserver.com" +} + +HTTP/1.1 200 OK +5 +~~~ + + + + +## oauth_add_client_implicit + + +Add [OAuth](../../developer/ejabberd-api/oauth.md) client_id with implicit grant type + +__Arguments:__ + +- *client_id* :: string +- *client_name* :: string +- *redirect_uri* :: string + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[oauth](admin-tags.md#oauth) + +__Examples:__ + + +~~~ json +POST /api/oauth_add_client_implicit +{ + "client_id": "aaaaa", + "client_name": "bbbbb", + "redirect_uri": "ccccc" +} + +HTTP/1.1 200 OK +"Success" +~~~ + + + + +## oauth_add_client_password + + +Add [OAuth](../../developer/ejabberd-api/oauth.md) client_id with password grant type + +__Arguments:__ + +- *client_id* :: string +- *client_name* :: string +- *secret* :: string + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[oauth](admin-tags.md#oauth) + +__Examples:__ + + +~~~ json +POST /api/oauth_add_client_password +{ + "client_id": "aaaaa", + "client_name": "bbbbb", + "secret": "ccccc" +} + +HTTP/1.1 200 OK +"Success" +~~~ + + + + +## oauth_issue_token + + + +Issue an [OAuth](../../developer/ejabberd-api/oauth.md) optionredir token for the given jid + +__Arguments:__ + +- *jid* :: string : Jid for which issue token +- *ttl* :: integer : Time to live of generated token in seconds +- *scopes* :: [scope::string] : List of scopes to allow + +__Result:__ + +- *result* :: {token::string, scopes::[scope::string], expires_in::string} + +__Tags:__ +[oauth](admin-tags.md#oauth), [v1](admin-tags.md#v1) + +__Examples:__ + + +~~~ json +POST /api/oauth_issue_token +{ + "jid": "user@server.com", + "ttl": 3600, + "scopes": [ + "connected_users_number", + "muc_online_rooms" + ] +} + +HTTP/1.1 200 OK +{ + "token": "aaaaa", + "scopes": [ + "bbbbb", + "ccccc" + ], + "expires_in": "ddddd" +} +~~~ + + + + +## oauth_list_tokens + + +List [OAuth](../../developer/ejabberd-api/oauth.md) tokens, user, scope, and seconds to expire (only Mnesia) + + +List OAuth tokens, their user and scope, and how many seconds remain until expirity + +__Arguments:__ + + +__Result:__ + +- *tokens* :: [{token::string, user::string, scope::string, expires_in::string}] + +__Tags:__ +[oauth](admin-tags.md#oauth) + +__Examples:__ + + +~~~ json +POST /api/oauth_list_tokens +{ + +} + +HTTP/1.1 200 OK +[ + { + "token": "aaaaa", + "user": "bbbbb", + "scope": "ccccc", + "expires_in": "ddddd" + }, + { + "token": "eeeee", + "user": "fffff", + "scope": "ggggg", + "expires_in": "hhhhh" + } +] +~~~ + + + + +## oauth_remove_client + + +Remove [OAuth](../../developer/ejabberd-api/oauth.md) client_id + +__Arguments:__ + +- *client_id* :: string + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[oauth](admin-tags.md#oauth) + +__Examples:__ + + +~~~ json +POST /api/oauth_remove_client +{ + "client_id": "aaaaa" +} + +HTTP/1.1 200 OK +"Success" +~~~ + + + + +## oauth_revoke_token + + + +Revoke authorization for an [OAuth](../../developer/ejabberd-api/oauth.md) token + +__Arguments:__ + +- *token* :: string + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[oauth](admin-tags.md#oauth) + +__Examples:__ + + +~~~ json +POST /api/oauth_revoke_token +{ + "token": "aaaaa" +} + +HTTP/1.1 200 OK +"Success" +~~~ + + + + +## outgoing_s2s_number + + +Number of outgoing s2s connections on the node + +__Arguments:__ + + +__Result:__ + +- *s2s_outgoing* :: integer + +__Tags:__ +[statistics](admin-tags.md#statistics), [s2s](admin-tags.md#s2s) + +__Examples:__ + + +~~~ json +POST /api/outgoing_s2s_number +{ + +} + +HTTP/1.1 200 OK +1 +~~~ + + + + +## print_sql_schema + + + +Print SQL schema for the given RDBMS (only ejabberdctl) + + +This command is exclusive for the ejabberdctl command-line script, don't attempt to execute it using any other API frontend. + +__Arguments:__ + +- *db_type* :: string : Database type: pgsql | mysql | sqlite +- *db_version* :: string : Your database version: 16.1, 8.2.0... +- *new_schema* :: string : Use new schema: 0, false, 1 or true + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[ejabberdctl](admin-tags.md#ejabberdctl), [sql](admin-tags.md#sql) + +__Examples:__ + + +~~~ json +POST /api/print_sql_schema +{ + "db_type": "pgsql", + "db_version": "16.1", + "new_schema": "true" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## privacy_set + + +Send a IQ set privacy stanza for a local account + +__Arguments:__ + +- *user* :: string : Username +- *host* :: string : Server name +- *xmlquery* :: string : Query XML element + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[stanza](admin-tags.md#stanza) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/privacy_set +{ + "user": "user1", + "host": "myserver.com", + "xmlquery": "..." +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## private_get + + +Get some information from a user private storage + +__Arguments:__ + +- *user* :: string : User name +- *host* :: string : Server name +- *element* :: string : Element name +- *ns* :: string : Namespace + +__Result:__ + +- *res* :: string + +__Tags:__ +[private](admin-tags.md#private) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/private_get +{ + "user": "user1", + "host": "myserver.com", + "element": "storage", + "ns": "storage:rosternotes" +} + +HTTP/1.1 200 OK +"aaaaa" +~~~ + + + + +## private_set + + +Set to the user private storage + +__Arguments:__ + +- *user* :: string : User name +- *host* :: string : Server name +- *element* :: string : XML storage element + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[private](admin-tags.md#private) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/private_set +{ + "user": "user1", + "host": "myserver.com", + "element": "" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## process_rosteritems + + +List/delete rosteritems that match filter + + +Explanation of each argument: + +* `action`: what to do with each rosteritem that matches all the filtering options +* `subs`: subscription type +* `asks`: pending subscription +* `users`: the JIDs of the local user +* `contacts`: the JIDs of the contact in the roster + +**Mnesia backend:** + +Allowed values in the arguments: + +* `action` = `list` | `delete` +* `subs` = `any` | SUB[:SUB]* +* `asks` = `any` | ASK[:ASK]* +* `users` = `any` | JID[:JID]* +* `contacts` = `any` | JID[:JID]* + +where + +* SUB = `none` | `from `| `to` | `both` +* ASK = `none` | `out` | `in` +* JID = characters valid in a JID, and can use the globs: `*`, `?`, `!` and `[...]` + +This example will list roster items with subscription `none`, `from` or `to` that have any ask property, of local users which JID is in the virtual host `example.org` and that the contact JID is either a bare server name (without user part) or that has a user part and the server part contains the word `icq`: + `list none:from:to any *@example.org *:*@*icq*` + +**SQL backend:** + +Allowed values in the arguments: + +* `action` = `list` | `delete` +* `subs` = `any` | SUB +* `asks` = `any` | ASK +* `users` = JID +* `contacts` = JID + +where + +* SUB = `none` | `from` | `to` | `both` +* ASK = `none` | `out` | `in` +* JID = characters valid in a JID, and can use the globs: `_` and `%` + +This example will list roster items with subscription `to` that have any ask property, of local users which JID is in the virtual host `example.org` and that the contact JID's server part contains the word `icq`: + `list to any %@example.org %@%icq%` + +__Arguments:__ + +- *action* :: string +- *subs* :: string +- *asks* :: string +- *users* :: string +- *contacts* :: string + +__Result:__ + +- *response* :: [{user::string, contact::string}] + +__Tags:__ +[roster](admin-tags.md#roster) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/process_rosteritems +{ + "action": "aaaaa", + "subs": "bbbbb", + "asks": "ccccc", + "users": "ddddd", + "contacts": "eeeee" +} + +HTTP/1.1 200 OK +[ + { + "user": "aaaaa", + "contact": "bbbbb" + }, + { + "user": "ccccc", + "contact": "ddddd" + } +] +~~~ + + + + +## push_alltoall + + +Add all the users to all the users of Host in Group + +__Arguments:__ + +- *host* :: string : Server name +- *group* :: string : Group name + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[roster](admin-tags.md#roster) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/push_alltoall +{ + "host": "myserver.com", + "group": "Everybody" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## push_roster + + +Push template roster from file to a user + + +The text file must contain an erlang term: a list of tuples with username, servername, group and nick. For example: +`[{"user1", "localhost", "Workers", "User 1"}, + {"user2", "localhost", "Workers", "User 2"}].` + +If there are problems parsing UTF8 character encoding, provide the corresponding string with the `<<"STRING"/utf8>>` syntax, for example: +`[{"user2", "localhost", "Workers", <<"User 2"/utf8>>}]`. + +__Arguments:__ + +- *file* :: string : File path +- *user* :: string : User name +- *host* :: string : Server name + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[roster](admin-tags.md#roster) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/push_roster +{ + "file": "/home/ejabberd/roster.txt", + "user": "user1", + "host": "localhost" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## push_roster_all + + +Push template roster from file to all those users + + +The text file must contain an erlang term: a list of tuples with username, servername, group and nick. Example: +`[{"user1", "localhost", "Workers", "User 1"}, + {"user2", "localhost", "Workers", "User 2"}].` + +__Arguments:__ + +- *file* :: string : File path + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[roster](admin-tags.md#roster) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/push_roster_all +{ + "file": "/home/ejabberd/roster.txt" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## register + + +Register a user + +__Arguments:__ + +- *user* :: string : Username +- *host* :: string : Local vhost served by ejabberd +- *password* :: string : Password + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[accounts](admin-tags.md#accounts) + +__Examples:__ + + +~~~ json +POST /api/register +{ + "user": "bob", + "host": "example.com", + "password": "SomEPass44" +} + +HTTP/1.1 200 OK +"Success" +~~~ + + + + +## registered_users + + +List all registered users in HOST + +__Arguments:__ + +- *host* :: string : Local vhost + +__Result:__ + +- *users* :: [username::string] : List of registered accounts usernames + +__Tags:__ +[accounts](admin-tags.md#accounts) + +__Examples:__ + + +~~~ json +POST /api/registered_users +{ + "host": "example.com" +} + +HTTP/1.1 200 OK +[ + "user1", + "user2" +] +~~~ + + + + +## registered_vhosts + + +List all registered vhosts in SERVER + +__Arguments:__ + + +__Result:__ + +- *vhosts* :: [vhost::string] : List of available vhosts + +__Tags:__ +[server](admin-tags.md#server) + +__Examples:__ + + +~~~ json +POST /api/registered_vhosts +{ + +} + +HTTP/1.1 200 OK +[ + "example.com", + "anon.example.com" +] +~~~ + + + + +## reload_config + + +Reload config file in memory + +__Arguments:__ + + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[config](admin-tags.md#config) + +__Examples:__ + + +~~~ json +POST /api/reload_config +{ + +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## remove_mam_for_user + + +Remove mam archive for user + +__Arguments:__ + +- *user* :: string : Username +- *host* :: string : Server + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[mam](admin-tags.md#mam) + +__Module:__ +[mod_mam](modules.md#mod_mam) + +__Examples:__ + + +~~~ json +POST /api/remove_mam_for_user +{ + "user": "bob", + "host": "example.com" +} + +HTTP/1.1 200 OK +"MAM archive removed" +~~~ + + + + +## remove_mam_for_user_with_peer + + +Remove mam archive for user with peer + +__Arguments:__ + +- *user* :: string : Username +- *host* :: string : Server +- *with* :: string : Peer + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[mam](admin-tags.md#mam) + +__Module:__ +[mod_mam](modules.md#mod_mam) + +__Examples:__ + + +~~~ json +POST /api/remove_mam_for_user_with_peer +{ + "user": "bob", + "host": "example.com", + "with": "anne@example.com" +} + +HTTP/1.1 200 OK +"MAM archive removed" +~~~ + + + + +## reopen_log + + +Reopen maybe the log files after being renamed + + +Has no effect on ejabberd main log files, only on log files generated by some modules. +This can be useful when an external tool is used for log rotation. See [Log Files](../../admin/guide/troubleshooting.md#log-files). + +__Arguments:__ + + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[logs](admin-tags.md#logs) + +__Examples:__ + + +~~~ json +POST /api/reopen_log +{ + +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## request_certificate + + +Requests certificates for all or some domains + + +Domains can be `all`, or a list of domains separared with comma characters + +__Arguments:__ + +- *domains* :: string : Domains for which to acquire a certificate + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[acme](admin-tags.md#acme) + +__Examples:__ + + +~~~ json +POST /api/request_certificate +{ + "domains": "example.com,domain.tld,conference.domain.tld" +} + +HTTP/1.1 200 OK +"Success" +~~~ + + + + +## resource_num + + +Resource string of a session number + +__Arguments:__ + +- *user* :: string : User name +- *host* :: string : Server name +- *num* :: integer : ID of resource to return + +__Result:__ + +- *resource* :: string : Name of user resource + +__Tags:__ +[session](admin-tags.md#session) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/resource_num +{ + "user": "peter", + "host": "myserver.com", + "num": 2 +} + +HTTP/1.1 200 OK +"Psi" +~~~ + + + + +## restart + + +Restart ejabberd gracefully + +__Arguments:__ + + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[server](admin-tags.md#server) + +__Examples:__ + + +~~~ json +POST /api/restart +{ + +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## restart_module + + +Stop an ejabberd module, reload code and start + +__Arguments:__ + +- *host* :: string : Server name +- *module* :: string : Module to restart + +__Result:__ + +- *res* :: integer : Returns integer code: + - `0`: code reloaded, module restarted + - `1`: error: module not loaded + - `2`: code not reloaded, but module restarted + +__Tags:__ +[erlang](admin-tags.md#erlang) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/restart_module +{ + "host": "myserver.com", + "module": "mod_admin_extra" +} + +HTTP/1.1 200 OK +0 +~~~ + + + + +## restore + + +Restore the Mnesia database from a binary backup file + + +This restores immediately from a binary backup file the internal Mnesia database. This will consume a lot of memory if you have a large database, you may prefer [install_fallback](#install_fallback) API. + +__Arguments:__ + +- *file* :: string : Full path to the backup file + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[mnesia](admin-tags.md#mnesia) + +__Examples:__ + + +~~~ json +POST /api/restore +{ + "file": "/var/lib/ejabberd/database.backup" +} + +HTTP/1.1 200 OK +"Success" +~~~ + + + + +## revoke_certificate + + +Revokes the selected ACME certificate + +__Arguments:__ + +- *file* :: string : Filename of the certificate + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[acme](admin-tags.md#acme) + +__Examples:__ + + +~~~ json +POST /api/revoke_certificate +{ + "file": "aaaaa" +} + +HTTP/1.1 200 OK +"Success" +~~~ + + + + +## rooms_empty_destroy 🟤 + + + +Destroy the rooms that have no messages in archive + + +The MUC service argument can be `global` to get all hosts. + +__Arguments:__ + +- *service* :: string : MUC service, or `global` for all + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[muc](admin-tags.md#muc), [v2](admin-tags.md#v2) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/rooms_empty_destroy +{ + "service": "conference.example.com" +} + +HTTP/1.1 200 OK +"Destroyed rooms: 2" +~~~ + + + + +## rooms_empty_list + + +List the rooms that have no messages in archive + + +The MUC service argument can be `global` to get all hosts. + +__Arguments:__ + +- *service* :: string : MUC service, or `global` for all + +__Result:__ + +- *rooms* :: [room::string] : List of empty rooms + +__Tags:__ +[muc](admin-tags.md#muc) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/rooms_empty_list +{ + "service": "conference.example.com" +} + +HTTP/1.1 200 OK +[ + "room1@conference.example.com", + "room2@conference.example.com" +] +~~~ + + + + +## rooms_unused_destroy + + +Destroy the rooms that are unused for many days in the service + + +The room recent history is used, so it's recommended to wait a few days after service start before running this. The MUC service argument can be `global` to get all hosts. + +__Arguments:__ + +- *service* :: string : MUC service, or `global` for all +- *days* :: integer : Number of days + +__Result:__ + +- *rooms* :: [room::string] : List of unused rooms that has been destroyed + +__Tags:__ +[muc](admin-tags.md#muc) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/rooms_unused_destroy +{ + "service": "conference.example.com", + "days": 31 +} + +HTTP/1.1 200 OK +[ + "room1@conference.example.com", + "room2@conference.example.com" +] +~~~ + + + + +## rooms_unused_list + + +List the rooms that are unused for many days in the service + + +The room recent history is used, so it's recommended to wait a few days after service start before running this. The MUC service argument can be `global` to get all hosts. + +__Arguments:__ + +- *service* :: string : MUC service, or `global` for all +- *days* :: integer : Number of days + +__Result:__ + +- *rooms* :: [room::string] : List of unused rooms + +__Tags:__ +[muc](admin-tags.md#muc) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/rooms_unused_list +{ + "service": "conference.example.com", + "days": 31 +} + +HTTP/1.1 200 OK +[ + "room1@conference.example.com", + "room2@conference.example.com" +] +~~~ + + + + +## rotate_log + + +Rotate maybe log file of some module + + +Has no effect on ejabberd main log files, only on log files generated by some modules. + +__Arguments:__ + + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[logs](admin-tags.md#logs) + +__Examples:__ + + +~~~ json +POST /api/rotate_log +{ + +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## send_direct_invitation + + + +Send a direct invitation to several destinations + + +Since ejabberd [20.12](../../archive/20.12/index.md), this command is asynchronous: the API call may return before the server has send all the invitations. + +`password` and `message` can be set to `none`. + +__Arguments:__ + +- *name* :: string : Room name +- *service* :: string : MUC service +- *password* :: string : Password, or `none` +- *reason* :: string : Reason text, or `none` +- *users* :: [jid::string] : List of users JIDs + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[muc_room](admin-tags.md#muc_room), [v1](admin-tags.md#v1) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/send_direct_invitation +{ + "name": "room1", + "service": "conference.example.com", + "password": "", + "reason": "Check this out!", + "users": [ + "user2@localhost", + "user3@example.com" + ] +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## send_message + + +Send a message to a local or remote bare of full JID + + +When sending a groupchat message to a MUC room, `from` must be the full JID of a room occupant, or the bare JID of a MUC service admin, or the bare JID of a MUC/Sub subscribed user. + +__Arguments:__ + +- *type* :: string : Message type: `normal`, `chat`, `headline`, `groupchat` +- *from* :: string : Sender JID +- *to* :: string : Receiver JID +- *subject* :: string : Subject, or empty string +- *body* :: string : Body + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[stanza](admin-tags.md#stanza) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/send_message +{ + "type": "headline", + "from": "admin@localhost", + "to": "user1@localhost", + "subject": "Restart", + "body": "In 5 minutes" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## send_stanza + + +Send a stanza; provide From JID and valid To JID + +__Arguments:__ + +- *from* :: string : Sender JID +- *to* :: string : Destination JID +- *stanza* :: string : Stanza + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[stanza](admin-tags.md#stanza) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/send_stanza +{ + "from": "admin@localhost", + "to": "user1@localhost", + "stanza": "" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## send_stanza_c2s + + +Send a stanza from an existing C2S session + + +`user`@`host`/`resource` must be an existing C2S session. As an alternative, use [send_stanza](#send_stanza) API instead. + +__Arguments:__ + +- *user* :: string : Username +- *host* :: string : Server name +- *resource* :: string : Resource +- *stanza* :: string : Stanza + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[stanza](admin-tags.md#stanza) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/send_stanza_c2s +{ + "user": "admin", + "host": "myserver.com", + "resource": "bot", + "stanza": "" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## set_last + + +Set last activity information + + +Timestamp is the seconds since `1970-01-01 00:00:00 UTC`. For example value see `date +%s` + +__Arguments:__ + +- *user* :: string : User name +- *host* :: string : Server name +- *timestamp* :: integer : Number of seconds since epoch +- *status* :: string : Status message + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[last](admin-tags.md#last) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/set_last +{ + "user": "user1", + "host": "myserver.com", + "timestamp": 1500045311, + "status": "GoSleeping" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## set_loglevel + + +Set the loglevel + + +Possible loglevels: `none`, `emergency`, `alert`, `critical`, + `error`, `warning`, `notice`, `info`, `debug`. + +__Arguments:__ + +- *loglevel* :: string : Desired logging level + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[logs](admin-tags.md#logs) + +__Examples:__ + + +~~~ json +POST /api/set_loglevel +{ + "loglevel": "debug" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## set_master + + +Set master node of the clustered Mnesia tables + + +If `nodename` is set to `self`, then this node will be set as its own master. + +__Arguments:__ + +- *nodename* :: string : Name of the erlang node that will be considered master of this node + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[cluster](admin-tags.md#cluster) + +__Examples:__ + + +~~~ json +POST /api/set_master +{ + "nodename": "ejabberd@machine7" +} + +HTTP/1.1 200 OK +"Success" +~~~ + + + + +## set_nickname + + +Set nickname in a user's vCard + +__Arguments:__ + +- *user* :: string : User name +- *host* :: string : Server name +- *nickname* :: string : Nickname + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[vcard](admin-tags.md#vcard) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/set_nickname +{ + "user": "user1", + "host": "myserver.com", + "nickname": "User 1" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## set_presence + + + +Set presence of a session + +__Arguments:__ + +- *user* :: string : User name +- *host* :: string : Server name +- *resource* :: string : Resource +- *type* :: string : Type: `available`, `error`, `probe`... +- *show* :: string : Show: `away`, `chat`, `dnd`, `xa`. +- *status* :: string : Status text +- *priority* :: integer : Priority, provide this value as an integer + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[session](admin-tags.md#session), [v1](admin-tags.md#v1) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/set_presence +{ + "user": "user1", + "host": "myserver.com", + "resource": "tka1", + "type": "available", + "show": "away", + "status": "BB", + "priority": 7 +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## set_room_affiliation + + +Change an affiliation in a MUC room + +__Arguments:__ + +- *name* :: string : Room name +- *service* :: string : MUC service +- *jid* :: string : User JID +- *affiliation* :: string : Affiliation to set + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[muc_room](admin-tags.md#muc_room) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/set_room_affiliation +{ + "name": "room1", + "service": "conference.example.com", + "jid": "user2@example.com", + "affiliation": "member" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## set_vcard + + +Set content in a vCard field + + +Some vcard field names in `get`/`set_vcard` are: + +* FN - Full Name +* NICKNAME - Nickname +* BDAY - Birthday +* TITLE - Work: Position +* ROLE - Work: Role + +For a full list of vCard fields check [XEP-0054: vcard-temp](https://xmpp.org/extensions/xep-0054.html) + +__Arguments:__ + +- *user* :: string : User name +- *host* :: string : Server name +- *name* :: string : Field name +- *content* :: string : Value + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[vcard](admin-tags.md#vcard) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/set_vcard +{ + "user": "user1", + "host": "myserver.com", + "name": "URL", + "content": "www.example.com" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## set_vcard2 + + +Set content in a vCard subfield + + +Some vcard field names and subnames in `get`/`set_vcard2` are: + +* N FAMILY - Family name +* N GIVEN - Given name +* N MIDDLE - Middle name +* ADR CTRY - Address: Country +* ADR LOCALITY - Address: City +* TEL HOME - Telephone: Home +* TEL CELL - Telephone: Cellphone +* TEL WORK - Telephone: Work +* TEL VOICE - Telephone: Voice +* EMAIL USERID - E-Mail Address +* ORG ORGNAME - Work: Company +* ORG ORGUNIT - Work: Department + +For a full list of vCard fields check [XEP-0054: vcard-temp](https://xmpp.org/extensions/xep-0054.html) + +__Arguments:__ + +- *user* :: string : User name +- *host* :: string : Server name +- *name* :: string : Field name +- *subname* :: string : Subfield name +- *content* :: string : Value + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[vcard](admin-tags.md#vcard) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/set_vcard2 +{ + "user": "user1", + "host": "myserver.com", + "name": "TEL", + "subname": "NUMBER", + "content": "123456" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## set_vcard2_multi + + +Set multiple contents in a vCard subfield + + +Some vcard field names and subnames in `get`/`set_vcard2` are: + +* N FAMILY - Family name +* N GIVEN - Given name +* N MIDDLE - Middle name +* ADR CTRY - Address: Country +* ADR LOCALITY - Address: City +* TEL HOME - Telephone: Home +* TEL CELL - Telephone: Cellphone +* TEL WORK - Telephone: Work +* TEL VOICE - Telephone: Voice +* EMAIL USERID - E-Mail Address +* ORG ORGNAME - Work: Company +* ORG ORGUNIT - Work: Department + +For a full list of vCard fields check [XEP-0054: vcard-temp](https://xmpp.org/extensions/xep-0054.html) + +__Arguments:__ + +- *user* :: string +- *host* :: string +- *name* :: string +- *subname* :: string +- *contents* :: [value::string] + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[vcard](admin-tags.md#vcard) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/set_vcard2_multi +{ + "user": "aaaaa", + "host": "bbbbb", + "name": "ccccc", + "subname": "ddddd", + "contents": [ + "eeeee", + "fffff" + ] +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## srg_add 🟤 + + + +Add/Create a Shared Roster Group (without details) + +__Arguments:__ + +- *group* :: string : Group identifier +- *host* :: string : Group server name + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[shared_roster_group](admin-tags.md#shared_roster_group) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/srg_add +{ + "group": "group3", + "host": "myserver.com" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## srg_add_displayed 🟤 + + + +Add a group to displayed_groups of a Shared Roster Group + +__Arguments:__ + +- *group* :: string : Group identifier +- *host* :: string : Group server name +- *add* :: string : Group to add to displayed_groups + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[shared_roster_group](admin-tags.md#shared_roster_group) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/srg_add_displayed +{ + "group": "group3", + "host": "myserver.com", + "add": "group1" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## srg_create + + + +Create a Shared Roster Group + +__Arguments:__ + +- *group* :: string : Group identifier +- *host* :: string : Group server name +- *label* :: string : Group name +- *description* :: string : Group description +- *display* :: [group::string] : List of groups to display + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[shared_roster_group](admin-tags.md#shared_roster_group), [v1](admin-tags.md#v1) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/srg_create +{ + "group": "group3", + "host": "myserver.com", + "label": "Group3", + "description": "Third group", + "display": [ + "group1", + "group2" + ] +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## srg_del_displayed 🟤 + + + +Delete a group from displayed_groups of a Shared Roster Group + +__Arguments:__ + +- *group* :: string : Group identifier +- *host* :: string : Group server name +- *del* :: string : Group to delete from displayed_groups + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[shared_roster_group](admin-tags.md#shared_roster_group) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/srg_del_displayed +{ + "group": "group3", + "host": "myserver.com", + "del": "group1" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## srg_delete + + +Delete a Shared Roster Group + +__Arguments:__ + +- *group* :: string : Group identifier +- *host* :: string : Group server name + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[shared_roster_group](admin-tags.md#shared_roster_group) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/srg_delete +{ + "group": "group3", + "host": "myserver.com" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## srg_get_displayed 🟤 + + + +Get displayed groups of a Shared Roster Group + +__Arguments:__ + +- *group* :: string : Group identifier +- *host* :: string : Group server name + +__Result:__ + +- *display* :: [group::string] : List of groups to display + +__Tags:__ +[shared_roster_group](admin-tags.md#shared_roster_group) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/srg_get_displayed +{ + "group": "group3", + "host": "myserver.com" +} + +HTTP/1.1 200 OK +[ + "group1", + "group2" +] +~~~ + + + + +## srg_get_info + + +Get info of a Shared Roster Group + +__Arguments:__ + +- *group* :: string : Group identifier +- *host* :: string : Group server name + +__Result:__ + +- *informations* :: [{key::string, value::string}] : List of group information, as key and value + +__Tags:__ +[shared_roster_group](admin-tags.md#shared_roster_group) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/srg_get_info +{ + "group": "group3", + "host": "myserver.com" +} + +HTTP/1.1 200 OK +[ + { + "key": "name", + "value": "Group 3" + }, + { + "key": "displayed_groups", + "value": "group1" + } +] +~~~ + + + + +## srg_get_members + + +Get members of a Shared Roster Group + +__Arguments:__ + +- *group* :: string : Group identifier +- *host* :: string : Group server name + +__Result:__ + +- *members* :: [member::string] : List of group identifiers + +__Tags:__ +[shared_roster_group](admin-tags.md#shared_roster_group) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/srg_get_members +{ + "group": "group3", + "host": "myserver.com" +} + +HTTP/1.1 200 OK +[ + "user1@localhost", + "user2@localhost" +] +~~~ + + + + +## srg_list + + +List the Shared Roster Groups in Host + +__Arguments:__ + +- *host* :: string : Server name + +__Result:__ + +- *groups* :: [id::string] : List of group identifiers + +__Tags:__ +[shared_roster_group](admin-tags.md#shared_roster_group) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/srg_list +{ + "host": "myserver.com" +} + +HTTP/1.1 200 OK +[ + "group1", + "group2" +] +~~~ + + + + +## srg_set_info 🟤 + + + +Set info of a Shared Roster Group + +__Arguments:__ + +- *group* :: string : Group identifier +- *host* :: string : Group server name +- *key* :: string : Information key: label, description +- *value* :: string : Information value + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[shared_roster_group](admin-tags.md#shared_roster_group) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/srg_set_info +{ + "group": "group3", + "host": "myserver.com", + "key": "label", + "value": "Family" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## srg_user_add + + +Add the JID user@host to the Shared Roster Group + +__Arguments:__ + +- *user* :: string : Username +- *host* :: string : User server name +- *group* :: string : Group identifier +- *grouphost* :: string : Group server name + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[shared_roster_group](admin-tags.md#shared_roster_group) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/srg_user_add +{ + "user": "user1", + "host": "myserver.com", + "group": "group3", + "grouphost": "myserver.com" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## srg_user_del + + +Delete this JID user@host from the Shared Roster Group + +__Arguments:__ + +- *user* :: string : Username +- *host* :: string : User server name +- *group* :: string : Group identifier +- *grouphost* :: string : Group server name + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[shared_roster_group](admin-tags.md#shared_roster_group) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/srg_user_del +{ + "user": "user1", + "host": "myserver.com", + "group": "group3", + "grouphost": "myserver.com" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## stats + + +Get some statistical value for the whole ejabberd server + + +Allowed statistics `name` are: `registeredusers`, `onlineusers`, `onlineusersnode`, `uptimeseconds`, `processes`. + +__Arguments:__ + +- *name* :: string : Statistic name + +__Result:__ + +- *stat* :: integer : Integer statistic value + +__Tags:__ +[statistics](admin-tags.md#statistics) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/stats +{ + "name": "registeredusers" +} + +HTTP/1.1 200 OK +6 +~~~ + + + + +## stats_host + + +Get some statistical value for this host + + +Allowed statistics `name` are: `registeredusers`, `onlineusers`. + +__Arguments:__ + +- *name* :: string : Statistic name +- *host* :: string : Server JID + +__Result:__ + +- *stat* :: integer : Integer statistic value + +__Tags:__ +[statistics](admin-tags.md#statistics) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/stats_host +{ + "name": "registeredusers", + "host": "example.com" +} + +HTTP/1.1 200 OK +6 +~~~ + + + + +## status + + +Get status of the ejabberd server + +__Arguments:__ + + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[server](admin-tags.md#server) + +__Examples:__ + + +~~~ json +POST /api/status +{ + +} + +HTTP/1.1 200 OK +"The node ejabberd@localhost is started with status: startedejabberd X.X is running in that node" +~~~ + + + + +## status_list + + +List of logged users with this status + +__Arguments:__ + +- *status* :: string : Status type to check + +__Result:__ + +- *users* :: [{user::string, host::string, resource::string, priority::integer, status::string}] + +__Tags:__ +[session](admin-tags.md#session) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/status_list +{ + "status": "dnd" +} + +HTTP/1.1 200 OK +[ + { + "user": "peter", + "host": "myserver.com", + "resource": "tka", + "priority": 6, + "status": "Busy" + } +] +~~~ + + + + +## status_list_host + + +List of users logged in host with their statuses + +__Arguments:__ + +- *host* :: string : Server name +- *status* :: string : Status type to check + +__Result:__ + +- *users* :: [{user::string, host::string, resource::string, priority::integer, status::string}] + +__Tags:__ +[session](admin-tags.md#session) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/status_list_host +{ + "host": "myserver.com", + "status": "dnd" +} + +HTTP/1.1 200 OK +[ + { + "user": "peter", + "host": "myserver.com", + "resource": "tka", + "priority": 6, + "status": "Busy" + } +] +~~~ + + + + +## status_num + + +Number of logged users with this status + +__Arguments:__ + +- *status* :: string : Status type to check + +__Result:__ + +- *users* :: integer : Number of connected sessions with given status type + +__Tags:__ +[session](admin-tags.md#session), [statistics](admin-tags.md#statistics) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/status_num +{ + "status": "dnd" +} + +HTTP/1.1 200 OK +23 +~~~ + + + + +## status_num_host + + +Number of logged users with this status in host + +__Arguments:__ + +- *host* :: string : Server name +- *status* :: string : Status type to check + +__Result:__ + +- *users* :: integer : Number of connected sessions with given status type + +__Tags:__ +[session](admin-tags.md#session), [statistics](admin-tags.md#statistics) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/status_num_host +{ + "host": "myserver.com", + "status": "dnd" +} + +HTTP/1.1 200 OK +23 +~~~ + + + + +## stop + + +Stop ejabberd gracefully + +__Arguments:__ + + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[server](admin-tags.md#server) + +__Examples:__ + + +~~~ json +POST /api/stop +{ + +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## stop_kindly + + +Inform users and rooms, wait, and stop the server + + +Provide the delay in seconds, and the announcement quoted, for example: +`ejabberdctl stop_kindly 60 \"The server will stop in one minute.\"` + +__Arguments:__ + +- *delay* :: integer : Seconds to wait +- *announcement* :: string : Announcement to send, with quotes + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[server](admin-tags.md#server) + +__Examples:__ + + +~~~ json +POST /api/stop_kindly +{ + "delay": 60, + "announcement": "Server will stop now." +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## stop_s2s_connections + + +Stop all s2s outgoing and incoming connections + +__Arguments:__ + + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[s2s](admin-tags.md#s2s) + +__Examples:__ + + +~~~ json +POST /api/stop_s2s_connections +{ + +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## subscribe_room + + + +Subscribe to a MUC conference + +__Arguments:__ + +- *user* :: string : User JID +- *nick* :: string : a user's nick +- *room* :: string : the room to subscribe +- *nodes* :: [node::string] : list of nodes + +__Result:__ + +- *nodes* :: [node::string] : The list of nodes that has subscribed + +__Tags:__ +[muc_room](admin-tags.md#muc_room), [muc_sub](admin-tags.md#muc_sub), [v1](admin-tags.md#v1) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/subscribe_room +{ + "user": "tom@localhost", + "nick": "Tom", + "room": "room1@conference.localhost", + "nodes": [ + "urn:xmpp:mucsub:nodes:messages", + "urn:xmpp:mucsub:nodes:affiliations" + ] +} + +HTTP/1.1 200 OK +[ + "urn:xmpp:mucsub:nodes:messages", + "urn:xmpp:mucsub:nodes:affiliations" +] +~~~ + + + + +## subscribe_room_many + + + +Subscribe several users to a MUC conference + + +This command accepts up to 50 users at once (this is configurable with the [mod_muc_admin](modules.md#mod_muc_admin) option `subscribe_room_many_max_users`) + +__Arguments:__ + +- *users* :: [{jid::string, nick::string}] : Users JIDs and nicks +- *room* :: string : the room to subscribe +- *nodes* :: [node::string] : nodes separated by commas: `,` + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[muc_room](admin-tags.md#muc_room), [muc_sub](admin-tags.md#muc_sub), [v1](admin-tags.md#v1) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/subscribe_room_many +{ + "users": [ + { + "jid": "tom@localhost", + "nick": "Tom" + }, + { + "jid": "jerry@localhost", + "nick": "Jerry" + } + ], + "room": "room1@conference.localhost", + "nodes": [ + "urn:xmpp:mucsub:nodes:messages", + "urn:xmpp:mucsub:nodes:affiliations" + ] +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## unban_account 🟤 + + + +Revert the ban from an account: set back the old password + + +Check [ban_account](#ban_account) API. + +__Arguments:__ + +- *user* :: string : User name to unban +- *host* :: string : Server name + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[accounts](admin-tags.md#accounts), [v2](admin-tags.md#v2) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/unban_account +{ + "user": "gooduser", + "host": "myserver.com" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## unban_ip + + +Remove banned IP addresses from the fail2ban table + + +Accepts an IP address with a network mask. Returns the number of unbanned addresses, or a negative integer if there were any error. + +__Arguments:__ + +- *address* :: string : IP address, optionally with network mask. + +__Result:__ + +- *unbanned* :: integer : Amount of unbanned entries, or negative in case of error. + +__Tags:__ +[accounts](admin-tags.md#accounts) + +__Module:__ +[mod_fail2ban](modules.md#mod_fail2ban) + +__Examples:__ + + +~~~ json +POST /api/unban_ip +{ + "address": "::FFFF:127.0.0.1/128" +} + +HTTP/1.1 200 OK +3 +~~~ + + + + +## unregister + + +Unregister a user + + +This deletes the authentication and all the data associated to the account (roster, vcard...). + +__Arguments:__ + +- *user* :: string : Username +- *host* :: string : Local vhost served by ejabberd + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[accounts](admin-tags.md#accounts) + +__Examples:__ + + +~~~ json +POST /api/unregister +{ + "user": "bob", + "host": "example.com" +} + +HTTP/1.1 200 OK +"Success" +~~~ + + + + +## unsubscribe_room + + +Unsubscribe from a MUC conference + +__Arguments:__ + +- *user* :: string : User JID +- *room* :: string : the room to subscribe + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[muc_room](admin-tags.md#muc_room), [muc_sub](admin-tags.md#muc_sub) + +__Module:__ +[mod_muc_admin](modules.md#mod_muc_admin) + +__Examples:__ + + +~~~ json +POST /api/unsubscribe_room +{ + "user": "tom@localhost", + "room": "room1@conference.localhost" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## update + + +Update the given module + + +To update all the possible modules, use `all`. + +__Arguments:__ + +- *module* :: string + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[server](admin-tags.md#server) + +__Examples:__ + + +~~~ json +POST /api/update +{ + "module": "all" +} + +HTTP/1.1 200 OK +"Updated modules: mod_configure, mod_vcard" +~~~ + + + + +## update_list + + +List modified modules that can be updated + +__Arguments:__ + + +__Result:__ + +- *modules* :: [module::string] + +__Tags:__ +[server](admin-tags.md#server) + +__Examples:__ + + +~~~ json +POST /api/update_list +{ + +} + +HTTP/1.1 200 OK +[ + "mod_configure", + "mod_vcard" +] +~~~ + + + + +## user_resources + + +List user's connected resources + +__Arguments:__ + +- *user* :: string : User name +- *host* :: string : Server name + +__Result:__ + +- *resources* :: [resource::string] + +__Tags:__ +[session](admin-tags.md#session) + +__Examples:__ + + +~~~ json +POST /api/user_resources +{ + "user": "user1", + "host": "example.com" +} + +HTTP/1.1 200 OK +[ + "tka1", + "Gajim", + "mobile-app" +] +~~~ + + + + +## user_sessions_info + + +Get information about all sessions of a user + +__Arguments:__ + +- *user* :: string : User name +- *host* :: string : Server name + +__Result:__ + +- *sessions_info* :: [{connection::string, ip::string, port::integer, priority::integer, node::string, uptime::integer, status::string, resource::string, statustext::string}] + +__Tags:__ +[session](admin-tags.md#session) + +__Module:__ +[mod_admin_extra](modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/user_sessions_info +{ + "user": "peter", + "host": "myserver.com" +} + +HTTP/1.1 200 OK +[ + { + "connection": "c2s", + "ip": "127.0.0.1", + "port": 42656, + "priority": 8, + "node": "ejabberd@localhost", + "uptime": 231, + "status": "dnd", + "resource": "tka", + "statustext": "" + } +] +~~~ + + diff --git a/content/archive/24.06/admin-tags.md b/content/archive/24.06/admin-tags.md new file mode 100644 index 00000000..87090a53 --- /dev/null +++ b/content/archive/24.06/admin-tags.md @@ -0,0 +1,726 @@ +--- +search: + exclude: true +--- + +# API Tags + +> This section enumerates the API tags of ejabberd [24.06](../../archive/24.06/index.md). If you are using an old ejabberd release, please refer to the corresponding archived version of this page in the [Archive](../../archive/index.md). + + + +## accounts + + +* [ban_account](admin-api.md#ban_account) + + +* [change_password](admin-api.md#change_password) + + +* [check_account](admin-api.md#check_account) + + +* [check_password](admin-api.md#check_password) + + +* [check_password_hash](admin-api.md#check_password_hash) + + +* [delete_old_users](admin-api.md#delete_old_users) + + +* [delete_old_users_vhost](admin-api.md#delete_old_users_vhost) + + +* [get_ban_details](admin-api.md#get_ban_details) + + +* [register](admin-api.md#register) + + +* [registered_users](admin-api.md#registered_users) + + +* [unban_account](admin-api.md#unban_account) + + +* [unban_ip](admin-api.md#unban_ip) + + +* [unregister](admin-api.md#unregister) + + +## acme + + +* [list_certificates](admin-api.md#list_certificates) + + +* [request_certificate](admin-api.md#request_certificate) + + +* [revoke_certificate](admin-api.md#revoke_certificate) + + +## cluster + + +* [get_master](admin-api.md#get_master) + + +* [join_cluster](admin-api.md#join_cluster) + + +* [join_cluster_here](admin-api.md#join_cluster_here) + + +* [leave_cluster](admin-api.md#leave_cluster) + + +* [list_cluster](admin-api.md#list_cluster) + + +* [list_cluster_detailed](admin-api.md#list_cluster_detailed) + + +* [set_master](admin-api.md#set_master) + + +## config + + +* [convert_to_yaml](admin-api.md#convert_to_yaml) + + +* [dump_config](admin-api.md#dump_config) + + +* [reload_config](admin-api.md#reload_config) + + +## documentation + + +* [gen_html_doc_for_commands](admin-api.md#gen_html_doc_for_commands) + + +* [gen_markdown_doc_for_commands](admin-api.md#gen_markdown_doc_for_commands) + + +* [gen_markdown_doc_for_tags](admin-api.md#gen_markdown_doc_for_tags) + + +* [man](admin-api.md#man) + + +## ejabberdctl + + +* [help](admin-api.md#help) + + +* [mnesia_info_ctl](admin-api.md#mnesia_info_ctl) + + +* [print_sql_schema](admin-api.md#print_sql_schema) + + +## erlang + + +* [compile](admin-api.md#compile) + + +* [get_cookie](admin-api.md#get_cookie) + + +* [restart_module](admin-api.md#restart_module) + + +## last + + +* [get_last](admin-api.md#get_last) + + +* [set_last](admin-api.md#set_last) + + +## logs + + +* [get_loglevel](admin-api.md#get_loglevel) + + +* [reopen_log](admin-api.md#reopen_log) + + +* [rotate_log](admin-api.md#rotate_log) + + +* [set_loglevel](admin-api.md#set_loglevel) + + +## mam + + +* [remove_mam_for_user](admin-api.md#remove_mam_for_user) + + +* [remove_mam_for_user_with_peer](admin-api.md#remove_mam_for_user_with_peer) + + +## mnesia + + +* [backup](admin-api.md#backup) + + +* [delete_mnesia](admin-api.md#delete_mnesia) + + +* [dump](admin-api.md#dump) + + +* [dump_table](admin-api.md#dump_table) + + +* [export2sql](admin-api.md#export2sql) + + +* [export_piefxis](admin-api.md#export_piefxis) + + +* [export_piefxis_host](admin-api.md#export_piefxis_host) + + +* [import_dir](admin-api.md#import_dir) + + +* [import_file](admin-api.md#import_file) + + +* [import_piefxis](admin-api.md#import_piefxis) + + +* [import_prosody](admin-api.md#import_prosody) + + +* [install_fallback](admin-api.md#install_fallback) + + +* [load](admin-api.md#load) + + +* [mnesia_change_nodename](admin-api.md#mnesia_change_nodename) + + +* [mnesia_info](admin-api.md#mnesia_info) + + +* [mnesia_info_ctl](admin-api.md#mnesia_info_ctl) + + +* [mnesia_table_info](admin-api.md#mnesia_table_info) + + +* [restore](admin-api.md#restore) + + +## modules + + +* [module_check](admin-api.md#module_check) + + +* [module_install](admin-api.md#module_install) + + +* [module_uninstall](admin-api.md#module_uninstall) + + +* [module_upgrade](admin-api.md#module_upgrade) + + +* [modules_available](admin-api.md#modules_available) + + +* [modules_installed](admin-api.md#modules_installed) + + +* [modules_update_specs](admin-api.md#modules_update_specs) + + +## muc + + +* [create_rooms_file](admin-api.md#create_rooms_file) + + +* [destroy_rooms_file](admin-api.md#destroy_rooms_file) + + +* [get_user_rooms](admin-api.md#get_user_rooms) + + +* [get_user_subscriptions](admin-api.md#get_user_subscriptions) + + +* [muc_online_rooms](admin-api.md#muc_online_rooms) + + +* [muc_online_rooms_by_regex](admin-api.md#muc_online_rooms_by_regex) + + +* [muc_register_nick](admin-api.md#muc_register_nick) + + +* [muc_unregister_nick](admin-api.md#muc_unregister_nick) + + +* [rooms_empty_destroy](admin-api.md#rooms_empty_destroy) + + +* [rooms_empty_list](admin-api.md#rooms_empty_list) + + +* [rooms_unused_destroy](admin-api.md#rooms_unused_destroy) + + +* [rooms_unused_list](admin-api.md#rooms_unused_list) + + +## muc_room + + +* [change_room_option](admin-api.md#change_room_option) + + +* [create_room](admin-api.md#create_room) + + +* [create_room_with_opts](admin-api.md#create_room_with_opts) + + +* [destroy_room](admin-api.md#destroy_room) + + +* [get_room_affiliation](admin-api.md#get_room_affiliation) + + +* [get_room_affiliations](admin-api.md#get_room_affiliations) + + +* [get_room_history](admin-api.md#get_room_history) + + +* [get_room_occupants](admin-api.md#get_room_occupants) + + +* [get_room_occupants_number](admin-api.md#get_room_occupants_number) + + +* [get_room_options](admin-api.md#get_room_options) + + +* [get_subscribers](admin-api.md#get_subscribers) + + +* [send_direct_invitation](admin-api.md#send_direct_invitation) + + +* [set_room_affiliation](admin-api.md#set_room_affiliation) + + +* [subscribe_room](admin-api.md#subscribe_room) + + +* [subscribe_room_many](admin-api.md#subscribe_room_many) + + +* [unsubscribe_room](admin-api.md#unsubscribe_room) + + +## muc_sub + + +* [create_room_with_opts](admin-api.md#create_room_with_opts) + + +* [get_subscribers](admin-api.md#get_subscribers) + + +* [get_user_subscriptions](admin-api.md#get_user_subscriptions) + + +* [subscribe_room](admin-api.md#subscribe_room) + + +* [subscribe_room_many](admin-api.md#subscribe_room_many) + + +* [unsubscribe_room](admin-api.md#unsubscribe_room) + + +## oauth + + +* [oauth_add_client_implicit](admin-api.md#oauth_add_client_implicit) + + +* [oauth_add_client_password](admin-api.md#oauth_add_client_password) + + +* [oauth_issue_token](admin-api.md#oauth_issue_token) + + +* [oauth_list_tokens](admin-api.md#oauth_list_tokens) + + +* [oauth_remove_client](admin-api.md#oauth_remove_client) + + +* [oauth_revoke_token](admin-api.md#oauth_revoke_token) + + +## offline + + +* [get_offline_count](admin-api.md#get_offline_count) + + +## private + + +* [bookmarks_to_pep](admin-api.md#bookmarks_to_pep) + + +* [private_get](admin-api.md#private_get) + + +* [private_set](admin-api.md#private_set) + + +## purge + + +* [abort_delete_old_mam_messages](admin-api.md#abort_delete_old_mam_messages) + + +* [abort_delete_old_messages](admin-api.md#abort_delete_old_messages) + + +* [delete_expired_messages](admin-api.md#delete_expired_messages) + + +* [delete_expired_pubsub_items](admin-api.md#delete_expired_pubsub_items) + + +* [delete_old_mam_messages](admin-api.md#delete_old_mam_messages) + + +* [delete_old_mam_messages_batch](admin-api.md#delete_old_mam_messages_batch) + + +* [delete_old_mam_messages_status](admin-api.md#delete_old_mam_messages_status) + + +* [delete_old_messages](admin-api.md#delete_old_messages) + + +* [delete_old_messages_batch](admin-api.md#delete_old_messages_batch) + + +* [delete_old_messages_status](admin-api.md#delete_old_messages_status) + + +* [delete_old_pubsub_items](admin-api.md#delete_old_pubsub_items) + + +* [delete_old_push_sessions](admin-api.md#delete_old_push_sessions) + + +* [delete_old_users](admin-api.md#delete_old_users) + + +* [delete_old_users_vhost](admin-api.md#delete_old_users_vhost) + + +## roster + + +* [add_rosteritem](admin-api.md#add_rosteritem) + + +* [delete_rosteritem](admin-api.md#delete_rosteritem) + + +* [get_roster](admin-api.md#get_roster) + + +* [get_roster_count](admin-api.md#get_roster_count) + + +* [process_rosteritems](admin-api.md#process_rosteritems) + + +* [push_alltoall](admin-api.md#push_alltoall) + + +* [push_roster](admin-api.md#push_roster) + + +* [push_roster_all](admin-api.md#push_roster_all) + + +## s2s + + +* [incoming_s2s_number](admin-api.md#incoming_s2s_number) + + +* [outgoing_s2s_number](admin-api.md#outgoing_s2s_number) + + +* [stop_s2s_connections](admin-api.md#stop_s2s_connections) + + +## server + + +* [clear_cache](admin-api.md#clear_cache) + + +* [gc](admin-api.md#gc) + + +* [halt](admin-api.md#halt) + + +* [registered_vhosts](admin-api.md#registered_vhosts) + + +* [restart](admin-api.md#restart) + + +* [status](admin-api.md#status) + + +* [stop](admin-api.md#stop) + + +* [stop_kindly](admin-api.md#stop_kindly) + + +* [update](admin-api.md#update) + + +* [update_list](admin-api.md#update_list) + + +## session + + +* [connected_users](admin-api.md#connected_users) + + +* [connected_users_info](admin-api.md#connected_users_info) + + +* [connected_users_number](admin-api.md#connected_users_number) + + +* [connected_users_vhost](admin-api.md#connected_users_vhost) + + +* [get_presence](admin-api.md#get_presence) + + +* [kick_session](admin-api.md#kick_session) + + +* [kick_user](admin-api.md#kick_user) + + +* [num_resources](admin-api.md#num_resources) + + +* [resource_num](admin-api.md#resource_num) + + +* [set_presence](admin-api.md#set_presence) + + +* [status_list](admin-api.md#status_list) + + +* [status_list_host](admin-api.md#status_list_host) + + +* [status_num](admin-api.md#status_num) + + +* [status_num_host](admin-api.md#status_num_host) + + +* [user_resources](admin-api.md#user_resources) + + +* [user_sessions_info](admin-api.md#user_sessions_info) + + +## shared_roster_group + + +* [srg_add](admin-api.md#srg_add) + + +* [srg_add_displayed](admin-api.md#srg_add_displayed) + + +* [srg_create](admin-api.md#srg_create) + + +* [srg_del_displayed](admin-api.md#srg_del_displayed) + + +* [srg_delete](admin-api.md#srg_delete) + + +* [srg_get_displayed](admin-api.md#srg_get_displayed) + + +* [srg_get_info](admin-api.md#srg_get_info) + + +* [srg_get_members](admin-api.md#srg_get_members) + + +* [srg_list](admin-api.md#srg_list) + + +* [srg_set_info](admin-api.md#srg_set_info) + + +* [srg_user_add](admin-api.md#srg_user_add) + + +* [srg_user_del](admin-api.md#srg_user_del) + + +## sql + + +* [convert_to_scram](admin-api.md#convert_to_scram) + + +* [import_prosody](admin-api.md#import_prosody) + + +* [print_sql_schema](admin-api.md#print_sql_schema) + + +## stanza + + +* [privacy_set](admin-api.md#privacy_set) + + +* [send_message](admin-api.md#send_message) + + +* [send_stanza](admin-api.md#send_stanza) + + +* [send_stanza_c2s](admin-api.md#send_stanza_c2s) + + +## statistics + + +* [connected_users_number](admin-api.md#connected_users_number) + + +* [incoming_s2s_number](admin-api.md#incoming_s2s_number) + + +* [outgoing_s2s_number](admin-api.md#outgoing_s2s_number) + + +* [stats](admin-api.md#stats) + + +* [stats_host](admin-api.md#stats_host) + + +* [status_num](admin-api.md#status_num) + + +* [status_num_host](admin-api.md#status_num_host) + + +## v1 + + +* [add_rosteritem](admin-api.md#add_rosteritem) + + +* [oauth_issue_token](admin-api.md#oauth_issue_token) + + +* [send_direct_invitation](admin-api.md#send_direct_invitation) + + +* [set_presence](admin-api.md#set_presence) + + +* [srg_create](admin-api.md#srg_create) + + +* [subscribe_room](admin-api.md#subscribe_room) + + +* [subscribe_room_many](admin-api.md#subscribe_room_many) + + +## v2 + + +* [ban_account](admin-api.md#ban_account) + + +* [get_ban_details](admin-api.md#get_ban_details) + + +* [kick_user](admin-api.md#kick_user) + + +* [rooms_empty_destroy](admin-api.md#rooms_empty_destroy) + + +* [unban_account](admin-api.md#unban_account) + + +## vcard + + +* [get_vcard](admin-api.md#get_vcard) + + +* [get_vcard2](admin-api.md#get_vcard2) + + +* [get_vcard2_multi](admin-api.md#get_vcard2_multi) + + +* [set_nickname](admin-api.md#set_nickname) + + +* [set_vcard](admin-api.md#set_vcard) + + +* [set_vcard2](admin-api.md#set_vcard2) + + +* [set_vcard2_multi](admin-api.md#set_vcard2_multi) diff --git a/content/archive/24.06/index.md b/content/archive/24.06/index.md new file mode 100644 index 00000000..6de53229 --- /dev/null +++ b/content/archive/24.06/index.md @@ -0,0 +1,11 @@ +# Archived Documentation for 24.06 + +This section contains some archived sections for ejabberd 24.06. + +If you are upgrading ejabberd from a previous release, you can check: + +* [Specific version upgrade notes](upgrade.md) +* [ejabberd 24.06 release announcement](https://www.process-one.net/blog/ejabberd-24-06/) +* [Docs Github Compare from 24.02](https://github.com/processone/docs.ejabberd.im/compare/24.02..24.06) +* [ejabberd Github Compare from 24.02](https://github.com/processone/ejabberd/compare/24.02..24.06) + diff --git a/content/archive/24.06/listen-options.md b/content/archive/24.06/listen-options.md new file mode 100644 index 00000000..ab590b37 --- /dev/null +++ b/content/archive/24.06/listen-options.md @@ -0,0 +1,399 @@ +--- +search: + exclude: true +--- + +# Listen Options + +> This section describes the most recent ejabberd version. If you are using an old ejabberd release, please refer to the corresponding archived version of this page in the [Archive](../../archive/index.md). + +This is a detailed description of each option allowed by the listening +modules: + +## access + +*AccessName* + +This option defines access to the port. The default value is `all`. + +## backlog + +*Value* + +The backlog value defines the maximum length that the queue of + pending connections may grow to. This should be increased if the + server is going to handle lots of new incoming connections as they + may be dropped if there is no space in the queue (and ejabberd was + not able to accept them immediately). Default value is 5. + +## cafile + +*Path* + +Path to a file of CA root certificates. +The default is to use system defined file if possible. + +This option is useful to define the file for a specific port listener. +To set a file for all client listeners or for specific vhosts, you can use the +[`c2s_cafile`](toplevel.md#c2s_cafile) top-level option. +To set a file for all server connections, you can use the +[`s2s_cafile`](toplevel.md#s2s_cafile) top-level option +or the +[`ca_file`](toplevel.md#ca_file) top-level option. + +Please note: if this option is set in +[`ejabberd_c2s`](listen.md#ejabberd_c2s) +or [`ejabberd_s2s_in`](listen.md#ejabberd_s2s_in) +and the corresponding top-level option is also set +([`c2s_cafile`](toplevel.md#c2s_cafile), +[`s2s_cafile`](toplevel.md#s2s_cafile)), +then the top-level option is used, not this one. + +## certfile + +*Path* + +Path to the certificate file. +Only makes sense when the [`tls`](#tls) +options is set. +If this option is not set, you should set the +[`certfiles`](toplevel.md#certfiles) top-level option +or configure [ACME](../../admin/configuration/basic.md#acme). + +## check_from + +*true | false* + +This option can be used with +[`ejabberd_service`](listen.md#ejabberd_service) only. + [`XEP-0114`](https://xmpp.org/extensions/xep-0114.html) requires that + the domain must match the hostname of the component. If this option + is set to `false`, `ejabberd` will allow the component to send + stanzas with any arbitrary domain in the ’from’ attribute. Only use + this option if you are completely sure about it. The default value + is `true`, to be compliant with + [`XEP-0114`](https://xmpp.org/extensions/xep-0114.html). + +## ciphers + +*Ciphers* + +OpenSSL ciphers list in the same format accepted by + ‘`openssl ciphers`’ command. + +Please note: if this option is set in +[`ejabberd_c2s`](listen.md#ejabberd_c2s) +or [`ejabberd_s2s_in`](listen.md#ejabberd_s2s_in) +and the corresponding top-level option is also set +([`c2s_ciphers`](toplevel.md#c2s_ciphers), +[`s2s_ciphers`](toplevel.md#s2s_ciphers)), +then the top-level option is used, not this one. + +## custom_headers + +*{Name: Value}* + +Specify additional HTTP headers to be included in all HTTP responses. +Default value is: `[]` + +## default_host + +*undefined | HostName* + +If the HTTP request received by ejabberd contains the HTTP header + `Host` with an ambiguous virtual host that doesn’t match any one + defined in ejabberd (see + [Host Names](../../admin/configuration/basic.md#host_names)), + then this configured HostName + is set as the request Host. The default value of this option is: + `undefined`. + +## dhfile + +*Path* + +Full path to a file containing custom parameters for Diffie-Hellman key + exchange. Such a file could be created with the command + `openssl dhparam -out dh.pem 2048`. If this option is not specified, + default parameters will be used, which might not provide the same level + of security as using custom parameters. + +Please note: if this option is set in +[`ejabberd_c2s`](listen.md#ejabberd_c2s) +or [`ejabberd_s2s_in`](listen.md#ejabberd_s2s_in) +and the corresponding top-level option is also set +([`c2s_dhfile`](toplevel.md#c2s_dhfile), +[`s2s_dhfile`](toplevel.md#s2s_dhfile)), +then the top-level option is used, not this one. + +## global_routes + +*true | false* + +This option emulates legacy behaviour which registers all routes +defined in [`hosts`](toplevel.md#hosts) +on a component connected. This behaviour +is considered harmful in the case when it's desired to multiplex +different components on the same port, so, to disable it, +set `global_routes` to `false`. + +The default value is `true`, +e.g. legacy behaviour is emulated: the only reason for this is +to maintain backward compatibility with existing deployments. + +## hosts + +*{Hostname: [HostOption, ...]}* + +The external Jabber component that connects to this +[`ejabberd_service`](listen.md#ejabberd_service) +can serve one or more hostnames. As `HostOption` + you can define options for the component; currently the only allowed + option is the password required to the component when attempt to + connect to ejabberd: `password: Secret`. Note that you + cannot define in a single `ejabberd_service` components of different + services: add an `ejabberd_service` for each service, as seen in an + example below. This option may not be necessary if the component + already provides the host in its packets; in that case, you can simply + provide the password option that will be used for all the hosts + (see port 5236 definition in the example below). + +## max_fsm_queue + +*Size* + +This option specifies the maximum number of elements in the queue of + the FSM (Finite State Machine). Roughly speaking, each message in + such queues represents one XML stanza queued to be sent into its + relevant outgoing stream. If queue size reaches the limit (because, + for example, the receiver of stanzas is too slow), the FSM and the + corresponding connection (if any) will be terminated and error + message will be logged. The reasonable value for this option depends + on your hardware configuration. This option can be specified for + [`ejabberd_service`](listen.md#ejabberd_service) + and [`ejabberd_c2s`](listen.md#ejabberd_c2s) + listeners, or also globally for + [`ejabberd_s2s_out`](listen.md#ejabberd_s2s_out). + If the option is not specified for + `ejabberd_service` or `ejabberd_c2s` listeners, the globally + configured value is used. The allowed values are integers and + ’undefined’. Default value: ’10000’. + +## max_payload_size + +*Size* + +Specify the maximum payload size in bytes. +It can be either an integer or the word `infinity`. +The default value is `infinity`. + +## max_stanza_size + +*Size* + +This option specifies an approximate maximum size in bytes of XML + stanzas. Approximate, because it is calculated with the precision of + one block of read data. For example `{max_stanza_size, 65536}`. The + default value is `infinity`. Recommended values are 65536 for c2s + connections and 131072 for s2s connections. s2s max stanza size must + always much higher than c2s limit. Change this value with extreme + care as it can cause unwanted disconnect if set too low. + +## password + +*Secret* + +Specify the password to verify an external component that connects to the port. + +## port + +*Port number, or unix domain socket path* + + + +Declares at which port/unix domain socket should be listening. + +Can be set to number between `1` and `65535` to listen on TCP or UDP socket, +or can be set to string in form `"unix:/path/to/socket"` to create and listen +on unix domain socket `/path/to/socket`. + +## protocol_options + +*ProtocolOpts* + +List of general options relating to SSL/TLS. These map to + [`OpenSSL’s set_options()`](https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_options.html). + The default entry is: `"no_sslv3|cipher_server_preference|no_compression"` + +Please note: if this option is set in +[`ejabberd_c2s`](listen.md#ejabberd_c2s) +or [`ejabberd_s2s_in`](listen.md#ejabberd_s2s_in) +and the corresponding top-level option is also set +([`c2s_protocol_options`](toplevel.md#c2s_protocol_options), +[`s2s_protocol_options`](toplevel.md#s2s_protocol_options)), +then the top-level option is used, not this one. + +## request_handlers + +*{Path: Module}* + +To define one or several handlers that will serve HTTP requests in +[`ejabberd_http`](listen.md#ejabberd_http). The + Path is a string; so the URIs that start with that Path will be + served by Module. For example, if you want `mod_foo` to serve the + URIs that start with `/a/b/`, and you also want `mod_bosh` to + serve the URIs `/bosh/`, use this option: + +``` yaml +request_handlers: + /a/b: mod_foo + /bosh: mod_bosh + /mqtt: mod_mqtt +``` + +## send_timeout + +*Integer | infinity* + + + +Sets the longest time that data can wait to be accepted to sent by OS socket. Triggering this timeout will cause the server to close it. By default it's set to 15 seconds, expressed in milliseconds: 15000 + +## shaper + +*none | ShaperName* + +This option defines a shaper for the port (see section +[Shapers](../../admin/configuration/basic.md#shapers)). + The default value is `none`. + +## shaper_rule + +*none | ShaperRule* + +This option defines a shaper rule for +[`ejabberd_service`](listen.md#ejabberd_service) (see +section [Shapers](../../admin/configuration/basic.md#shapers)). +The recommended value is `fast`. + +## starttls + +*true | false* + +This option specifies that STARTTLS encryption is available on +connections to the port. You should also set the +[`certfiles`](toplevel.md#certfiles) top-level option +or configure [ACME](../../admin/configuration/basic.md#acme). + +This option gets implicitly enabled when enabling +[`starttls_required`](#starttls_required) or [`tls_verify`](#tls_verify). + +## starttls_required + +*true | false* + +This option specifies that STARTTLS encryption is required on connections to the port. No unencrypted connections will be allowed. +You should also set the [`certfiles`](toplevel.md#certfiles) top-level option or configure [ACME](../../admin/configuration/basic.md#acme). + +Enabling this option implicitly enables also the [`starttls`](#starttls) option. + +## tag + +*String* + +Allow specifying a tag in a `listen` section and later use it to have a special [`api_permissions`](toplevel.md#api_permissions) just for it. + +For example: + +``` yaml +listen: + - + port: 4000 + module: ejabberd_http + tag: "magic_listener" + +api_permissions: + "magic_access": + from: + - tag: "magic_listener" + who: all + what: "*" +``` + +The default value is the empty string: `""`. + +## timeout + +*Integer* + +Timeout of the connections, expressed in milliseconds. Default: 5000 + +## tls + +*true | false* + +This option specifies that traffic on the port will be encrypted + using SSL immediately after connecting. This was the traditional + encryption method in the early Jabber software, commonly on port + 5223 for client-to-server communications. But this method is + nowadays deprecated and not recommended. The preferable encryption + method is STARTTLS on port 5222, as defined + [`RFC 6120: XMPP Core`](https://xmpp.org/rfcs/rfc6120.html#tls), + which can be enabled in `ejabberd` with the option + [`starttls`](#starttls). + +If this option is set, you should also set the + [`certfiles`](toplevel.md#certfiles) top-level + option or configure [ACME](../../admin/configuration/basic.md#acme). + +The option `tls` can also be used in + [`ejabberd_http`](listen.md#ejabberd_http) + to support HTTPS. + +Enabling this option implicitly disables the [`starttls`](#starttls) option. + +## tls_compression + +*true | false* + +Whether to enable or disable TLS compression. The default value is + `false`. + +Please note: if this option is set in +[`ejabberd_c2s`](listen.md#ejabberd_c2s) +or [`ejabberd_s2s_in`](listen.md#ejabberd_s2s_in) +and the corresponding top-level option is also set +([`c2s_tls_compression`](toplevel.md#c2s_tls_compression), +[`s2s_tls_compression`](toplevel.md#s2s_tls_compression)), +then the top-level option is used, not this one. + +## tls_verify + +*false | true* + +This option specifies whether to verify the certificate or not when TLS is enabled. + +The default value is `false`, which means no checks are performed. + +The certificate will be checked against trusted CA roots, either defined at the operation system level or defined in the + listener [`cafile`](#cafile). If trusted, it will accept the jid that is embedded in the certificate in the + `subjectAltName` field of that certificate. + +Enabling this option implicitly enables also the [`starttls`](#starttls) option. + +## use_proxy_protocol + +*true | false* + +Is this listener accessed by proxy service that is using + proxy protocol for supplying real IP addresses to ejabberd server. You can read about this protocol + in [Proxy protocol specification](https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt). + The default value of this option is`false`. + +## zlib + +*true | false* + +This option specifies that Zlib stream compression (as defined in + [`XEP-0138`](https://xmpp.org/extensions/xep-0138.html)) is available + on connections to the port. diff --git a/content/archive/24.06/listen.md b/content/archive/24.06/listen.md new file mode 100644 index 00000000..b3206970 --- /dev/null +++ b/content/archive/24.06/listen.md @@ -0,0 +1,822 @@ +--- +search: + exclude: true +--- + +# Listen Modules + +> This section describes the most recent ejabberd version. If you are using an old ejabberd release, please refer to the corresponding archived version of this page in the [Archive](../../archive/index.md). + +## Listen Options + +The `listen` option defines for which ports, addresses and network +protocols `ejabberd` will listen and what services will be run on them. + +Each element of the list is an associative array with the following +elements: + +- **port**: *Number* + + Defines which port number to listen for incoming connections: + it can be a Jabber/XMPP standard port or any other valid port number. + + Alternatively, set the option to a string in form `"unix:/path/to/socket"` + to create and listen on a unix domain socket `/path/to/socket`. + +- **ip**: *IpAddress* + + The socket will listen only in that network interface. + Depending on the type of the IP address, IPv4 or IPv6 will be used. + + It is possible to specify a generic address + (`"0.0.0.0"` for IPv4 or `"::"` for IPv6), + so `ejabberd` will listen in all addresses. + Note that on some operating systems and/or OS configurations, listening + on `"::"` will mean listening for IPv4 traffic as well as IPv6 traffic. + + Some example values for IP address: + + - `"0.0.0.0"` to listen in all IPv4 network interfaces. This is the + default value when the option is not specified. + + - `"::"` to listen in all IPv6 network interfaces + + - `"10.11.12.13"` is the IPv4 address `10.11.12.13` + + - `"::FFFF:127.0.0.1"` is the IPv6 address `::FFFF:127.0.0.1/128` + +- **transport**: *tcp|udp* + + Defines the transport protocol. Default is `tcp`. + +- **module**: *ModuleName* + + Listening module that serves this port + +- Any other options for the socket and for the listening module, described later. + +For example: + +``` yaml +listen: + - + port: 5222 + ip: 127.0.0.1 + module: ejabberd_c2s + starttls: true + - + port: 5269 + transport: tcp + module: ejabberd_s2s_in +``` + +## ejabberd_c2s + +Handles c2s connections. + +General listen options supported: +[access](listen-options.md#access), +[cafile](listen-options.md#cafile), +[ciphers](listen-options.md#ciphers), +[dhfile](listen-options.md#dhfile), +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_stanza_size](listen-options.md#max_stanza_size), +[protocol_options](listen-options.md#protocol_options), +[send_timeout](listen-options.md#send_timeout), +[shaper](listen-options.md#shaper), +[starttls](listen-options.md#starttls), +[starttls_required](listen-options.md#starttls_required), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls-compression), +[tls_verify](listen-options.md#tls_verify), +[zlib](listen-options.md#zlib). + +## ejabberd_s2s_in + +Handles incoming s2s connections. + +General listen options supported: +[cafile](listen-options.md#cafile), +[ciphers](listen-options.md#ciphers), +[dhfile](listen-options.md#dhfile), +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_stanza_size](listen-options.md#max_stanza_size), +[protocol_options](listen-options.md#protocol_options), +[send_timeout](listen-options.md#send_timeout), +[shaper](listen-options.md#shaper), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls-compression). + +## ejabberd_service + +Interacts with an [`external component`](https://ejabberd.im/tutorials-transports) +as defined in [XEP-0114: Jabber Component Protocol](https://xmpp.org/extensions/xep-0114.html). + +General listen options supported: +[access](listen-options.md#access), +[cafile](listen-options.md#cafile), +[certfile](listen-options.md#certfile), +[check_from](listen-options.md#check_from), +[ciphers](listen-options.md#ciphers), +[dhfile](listen-options.md#dhfile), +[global_routes](listen-options.md#global_routes), +[hosts](listen-options.md#hosts), +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_stanza_size](listen-options.md#max_stanza_size), +[password](listen-options.md#password), +[protocol_options](listen-options.md#protocol_options), +[send_timeout](listen-options.md#send_timeout), +[shaper](listen-options.md#shaper), +[shaper_rule](listen-options.md#shaper-rule), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls-compression). + +## mod_mqtt + +Support for MQTT requires configuring `mod_mqtt` both in the +[listen](toplevel.md#listen) and the +[modules](toplevel.md#modules) sections. +Check the [mod_mqtt module](modules.md#mod_mqtt) options, +and the [MQTT Support](../../admin/guide/mqtt/index.md) section. + +General listen options supported: +[backlog](listen-options.md#backlog), +[max_fsm_queue](listen-options.md#max_fsm_queue), +[max_payload_size](listen-options.md#max_payload_size), +[send_timeout](listen-options.md#send_timeout), +[tls](listen-options.md#tls), +[tls_verify](listen-options.md#tls_verify). + + + +## ejabberd_stun + +`ejabberd` can act as a stand-alone STUN/TURN server, +and this module handles STUN/TURN requests as defined in +([`RFC 5389`](https://tools.ietf.org/html/rfc5389)/[`RFC 5766`](https://tools.ietf.org/html/rfc5766). +In that role `ejabberd` helps clients with ICE +([`RFC 5245`](https://tools.ietf.org/html/rfc5245) or Jingle ICE +([`XEP-0176`](https://xmpp.org/extensions/xep-0176.html) support to +discover their external addresses and ports and to relay media traffic +when it is impossible to establish direct peer-to-peer connection. + +General listen options supported: +[certfile](listen-options.md#certfile), +[send_timeout](listen-options.md#send_timeout), +[shaper](listen-options.md#shaper), +[tls](listen-options.md#tls), + +The specific `ejabberd_stun` configurable options are: + +- **auth_realm**: *String* + + When `auth_type` is set to `user` and you have several virtual hosts + configured you should set this option explicitly to the virtual host + you want to serve on this particular listening port. + Implies `use_turn`. + +- **auth_type**: *user|anonymous* + + Which authentication type to use for TURN allocation requests. + When type `user` is set, ejabberd authentication backend is used. + For `anonymous` type no authentication is performed (not recommended for public services). + The default is `user`. + Implies `use_turn`. + +- **shaper**: *Atom* + + For `tcp` transports defines shaper to use. + The default is `none`. + +- **server_name**: *String* + + Defines software version to return with every response. + The default is the STUN library version. + +- **turn_blacklist**: *String | [String,...]* + + Specify one or more IP addresses and/or subnet addresses/masks. + The TURN server will refuse to relay traffic from/to blacklisted IP addresses. + By default, loopback addresses (`127.0.0.0/8` and `::1/128`) are blacklisted. + +- **turn_ipv4_address**: *String* + + The IPv4 address advertised by your TURN server. + The address should not be NAT’ed or firewalled. + There is not default, so you should set this option explicitly. + Implies `use_turn`. + +- **turn_ipv6_address**: *String* + + The IPv6 address advertised by your TURN server. + The address should not be NAT’ed or firewalled. + There is not default, so you should set this option explicitly. + Implies `use_turn`. + +- **turn_max_allocations**: *Integer|infinity* + + Maximum number of TURN allocations available from the particular IP address. + The default value is 10. Implies `use_turn`. + +- **turn_max_permissions**: *Integer|infinity* + + Maximum number of TURN permissions available from the particular IP address. + The default value is 10. + Implies `use_turn`. + +- **turn_max_port**: *Integer* + + Together with `turn_min_port` forms port range to allocate from. + The default is 65535. + Implies `use_turn`. + +- **turn_min_port**: *Integer* + + Together with `turn_max_port` forms port range to allocate from. + The default is 49152. + Implies `use_turn`. + +- **use_turn**: *true|false* + + Enables/disables TURN (media relay) functionality. + The default is `false`. + +Example configuration with disabled TURN functionality (STUN only): + +``` yaml +listen: + - + port: 3478 + transport: udp + module: ejabberd_stun + - + port: 3478 + module: ejabberd_stun + - + port: 5349 + module: ejabberd_stun + certfile: /etc/ejabberd/server.pem +``` + +Example configuration with TURN functionality. Note that STUN is always +enabled if TURN is enabled. Here, only UDP section is shown: + +``` yaml +listen: + - + port: 3478 + transport: udp + use_turn: true + turn_ipv4_address: 10.20.30.1 + module: ejabberd_stun +``` + +You also need to configure DNS SRV records properly so clients can +easily discover a STUN/TURN server serving your XMPP domain. Refer to +section +[`DNS Discovery of a Server`](https://tools.ietf.org/html/rfc5389#section-9) +of [`RFC 5389`](https://tools.ietf.org/html/rfc5389) and section +[`Creating an Allocation`](https://tools.ietf.org/html/rfc5766#section-6) +of [`RFC 5766`](https://tools.ietf.org/html/rfc5766) for details. + +Example DNS SRV configuration for STUN only: + +``` sh +_stun._udp IN SRV 0 0 3478 stun.example.com. +_stun._tcp IN SRV 0 0 3478 stun.example.com. +_stuns._tcp IN SRV 0 0 5349 stun.example.com. +``` + +And you should also add these in the case if TURN is enabled: + +``` sh +_turn._udp IN SRV 0 0 3478 turn.example.com. +_turn._tcp IN SRV 0 0 3478 turn.example.com. +_turns._tcp IN SRV 0 0 5349 turn.example.com. +``` + +## ejabberd_sip + + +`ejabberd` has built-in support to handle SIP requests +as defined in [`RFC 3261`](https://tools.ietf.org/html/rfc3261). + +To activate this feature, +add the [`ejabberd_sip`](#ejabberd_sip) listen module, enable +[`mod_sip`](modules.md#mod_sip) module +for the desired virtual host, and configure DNS properly. + +To add a listener you should configure `ejabberd_sip` listening module +as described in [Listen](#listen-options) section. +If option [`tls`](listen-options.md#tls) is specified, +option [`certfile`](listen-options.md#certfile) +must be specified as well, otherwise incoming TLS connections +would fail. + +General listen options supported: +[certfile](listen-options.md#certfile), +[send_timeout](listen-options.md#send_timeout), +[tls](listen-options.md#tls). + +Example configuration with standard ports (as per +[`RFC 3261`](https://tools.ietf.org/html/rfc3261)): + +``` yaml +listen: + - + port: 5060 + transport: udp + module: ejabberd_sip + - + port: 5060 + module: ejabberd_sip + - + port: 5061 + module: ejabberd_sip + tls: true + certfile: /etc/ejabberd/server.pem +``` + +Note that there is no StartTLS support in SIP and +[`SNI`](https://en.wikipedia.org/wiki/Server_Name_Indication) support is +somewhat tricky, so for TLS you have to configure different virtual +hosts on different ports if you have different certificate files for +them. + +Next you need to configure DNS SIP records for your virtual domains. +Refer to [`RFC 3263`](https://tools.ietf.org/html/rfc3263) for the +detailed explanation. Simply put, you should add NAPTR and SRV records +for your domains. Skip NAPTR configuration if your DNS provider doesn't +support this type of records. It’s not fatal, however, highly +recommended. + +Example configuration of NAPTR records: + +``` sh +example.com IN NAPTR 10 0 "s" "SIPS+D2T" "" _sips._tcp.example.com. +example.com IN NAPTR 20 0 "s" "SIP+D2T" "" _sip._tcp.example.com. +example.com IN NAPTR 30 0 "s" "SIP+D2U" "" _sip._udp.example.com. +``` + +Example configuration of SRV records with standard ports (as per +[`RFC 3261`](https://tools.ietf.org/html/rfc3261): + +``` sh +_sip._udp IN SRV 0 0 5060 sip.example.com. +_sip._tcp IN SRV 0 0 5060 sip.example.com. +_sips._tcp IN SRV 0 0 5061 sip.example.com. +``` + +!!! warning + + SIP authentication does not support SCRAM. As such, it is not possible + to use `mod_sip` to authenticate when ejabberd has been set to encrypt + password with SCRAM. + +## ejabberd_http + +Handles incoming HTTP connections. + +With the proper request handlers configured, this serves HTTP services like +[ACME](../../admin/configuration/basic.md#acme), +[API](modules.md#mod_http_api), +[BOSH](modules.md#mod_bosh), +[CAPTCHA](../../admin/configuration/basic.md#captcha), +[Fileserver](modules.md#mod_http_fileserver), +[OAuth](../../developer/ejabberd-api/../../developer/ejabberd-api/oauth.md), +[RegisterWeb](modules.md#mod_register_web), +[Upload](modules.md#mod_http_upload), +[WebAdmin](../../admin/guide/managing.md#web-admin), +[WebSocket](#ejabberd_http_ws), +[XML-RPC](#ejabberd_xmlrpc). + +Options: +[cafile](listen-options.md#cafile), +[ciphers](listen-options.md#ciphers), +[custom_headers](listen-options.md#custom_headers), +[default_host](listen-options.md#default_host), +[dhfile](listen-options.md#dhfile), +[protocol_options](listen-options.md#protocol_options), +[request_handlers](listen-options.md#request_handlers), +[send_timeout](listen-options.md#send_timeout), +[tag](listen-options.md#tag), +[tls](listen-options.md#tls), +[tls_compression](listen-options.md#tls-compression), +and the [trusted_proxies](toplevel.md#trusted_proxies) top-level option. + +### ejabberd_http_ws + +This module enables XMPP communication over WebSocket connection as +described in [`RFC 7395`](https://tools.ietf.org/html/rfc7395). + +#### WebSocket Config + +To enable WebSocket, simply add a handler to the `request_handlers` +section of an `ejabberd_http` listener: + +``` yaml +listen: + - + port: 5280 + module: ejabberd_http + request_handlers: + /xmpp: ejabberd_http_ws +``` + +This module can be configured using those top-level options: + +- [websocket\_origin](toplevel.md#websocket_origin) +- [websocket\_ping\_interval](toplevel.md#websocket_ping_interval) +- [websocket\_timeout](toplevel.md#websocket_timeout) + +#### WebSocket Discovery + +With the example configuration previously mentioned, +the WebSocket URL would be: `ws://localhost:5280/xmpp` + +You may want to provide a `host-meta` file so clients can +easily discover WebSocket service for your XMPP domain +(see [XEP-0156](https://xmpp.org/extensions/xep-0156.html#http)). +One easy way to provide that file is using +[`mod_host_meta`](modules.md#mod_host_meta). + +#### Testing WebSocket + +A test client can be found on Github: [WebSocket test client](https://github.com/processone/xmpp-websocket-client) + +There is an example configuration for WebSocket and Converse.js in the +ejabberd [21.12](../../archive/21.12/index.md) release notes. + + + +### ejabberd_xmlrpc + +Handles XML-RPC requests to execute +[ejabberd commands](../../admin/guide/managing.md#ejabberd_commands). +It is configured as a request handler in +[ejabberd_http](#ejabberd_http). + +This is the minimum configuration required to enable the feature: + +``` yaml +listen: + - + port: 5280 + module: ejabberd_http + request_handlers: + /xmlrpc: ejabberd_xmlrpc + +api_permissions: + "public commands": + who: + ip: 127.0.0.1/8 + what: + - connected_users_number +``` + +Example Python3 script: + +``` python +import xmlrpc.client +server = xmlrpc.client.ServerProxy("http://127.0.0.1:5280/xmlrpc/"); +print(server.connected_users_number()) +``` + +By default there is no restriction to who can execute what commands, +so it is strongly recommended that you configure restrictions using +[API Permissions](../../developer/ejabberd-api/permissions.md). + +This example configuration adds some restrictions (only requests from localhost are accepted, the XML-RPC query must include authentication credentials of a specific account registered in ejabberd, and only two commands are accepted): + +``` yaml +listen: + - + port: 5280 + ip: "::" + module: ejabberd_http + request_handlers: + /xmlrpc: ejabberd_xmlrpc + +api_permissions: + "some XMLRPC commands": + from: ejabberd_xmlrpc + who: + - ip: 127.0.0.1 + - user: user1@localhost + what: + - registered_users + - connected_users_number +``` + +Example Python3 script for that restricted configuration: + +``` python +import xmlrpc.client +server = xmlrpc.client.ServerProxy("http://127.0.0.1:5280/xmlrpc/"); + +params = {} +params['host'] = 'localhost' + +auth = {'user': 'user1', + 'server': 'localhost', + 'password': 'mypass11', + 'admin': True} + +def calling(command, data): + fn = getattr(server, command) + return fn(auth, data) + +print(calling('registered_users', params)) +``` + +Please notice, when using the old Python2, replace the two first lines with: + +``` python +import xmlrpclib +server = xmlrpclib.Server("http://127.0.0.1:5280/xmlrpc/"); +``` + +It's possible to use OAuth for authentication instead of plain password, see +[OAuth Support](../../developer/ejabberd-api/../../developer/ejabberd-api/oauth.md). + +In ejabberd [20.03](../../archive/20.03/index.md) and older, +it was possible to configure `ejabberd_xmlrpc` as a +listener, see the old document for reference and example configuration: +[Listening Module](../../archive/../../admin/configuration/old.md#listening_module). + +Just for reference, there's also the old +[`ejabberd_xmlrpc documentation`](https://ejabberd.im/ejabberd_xmlrpc) +with example clients in other languages. + +## Examples + +For example, the following simple configuration defines: + +- There are three domains. The default certificate file is `server.pem`. However, the c2s and s2s connections to the domain `example.com` use the file `example_com.pem`. + +- Port 5222 listens for c2s connections with STARTTLS, and also allows plain connections for old clients. + +- Port 5223 listens for c2s connections with the old SSL. + +- Port 5269 listens for s2s connections with STARTTLS. The socket is set for IPv6 instead of IPv4. + +- Port 3478 listens for STUN requests over UDP. + +- Port 5280 listens for HTTP requests, and serves the HTTP-Bind (BOSH) service. + +- Port 5281 listens for HTTP requests, using HTTPS to serve HTTP-Bind (BOSH) and the Web Admin as explained in [Managing: Web Admin](../../admin/guide/managing.md#web-admin). The socket only listens connections to the IP address 127.0.0.1. + +``` yaml +hosts: + - example.com + - example.org + - example.net + +certfiles: + - /etc/ejabberd/server.pem + - /etc/ejabberd/example_com.pem + +listen: + - + port: 5222 + module: ejabberd_c2s + access: c2s + shaper: c2s_shaper + starttls: true + max_stanza_size: 65536 + - + port: 5223 + module: ejabberd_c2s + access: c2s + shaper: c2s_shaper + tls: true + max_stanza_size: 65536 + - + port: 5269 + ip: "::" + module: ejabberd_s2s_in + shaper: s2s_shaper + max_stanza_size: 131072 + - + port: 3478 + transport: udp + module: ejabberd_stun + - + port: 5280 + module: ejabberd_http + request_handlers: + /bosh: mod_bosh + - + port: 5281 + ip: 127.0.0.1 + module: ejabberd_http + tls: true + request_handlers: + /admin: ejabberd_web_admin + /bosh: mod_bosh + +s2s_use_starttls: optional +outgoing_s2s_families: + - ipv4 + - ipv6 +outgoing_s2s_timeout: 10000 +trusted_proxies: [127.0.0.1, 192.168.1.11] +``` + +In this example, the following configuration defines that: + +- c2s connections are listened for on port 5222 (all IPv4 addresses) + and on port 5223 (SSL, IP 192.168.0.1 and fdca:8ab6:a243:75ef::1) + and denied for the user called ‘`bad`’. + +- s2s connections are listened for on port 5269 (all IPv4 addresses) + with STARTTLS for secured traffic strictly required, and the + certificates are verified. Incoming and outgoing connections of + remote XMPP servers are denied, only two servers can connect: + “jabber.example.org” and “example.com”. + +- Port 5280 is serving the Web Admin and the HTTP-Bind (BOSH) service in + all the IPv4 addresses. Note that it is also possible to serve them + on different ports. The second example in section [Managing: Web Admin](../../admin/guide/managing.md#web-admin) shows + how exactly this can be done. A request handler to serve MQTT over WebSocket is also defined. + +- All users except for the administrators have a traffic of limit + 1,000Bytes/second + +- The [`AIM transport`](https://ejabberd.im/pyaimt) + `aim.example.org` is connected to port 5233 on localhost IP + addresses (127.0.0.1 and ::1) with password ‘`aimsecret`’. + +- The ICQ transport JIT (`icq.example.org` and `sms.example.org`) is + connected to port 5234 with password ‘`jitsecret`’. + +- The [`MSN transport`](https://ejabberd.im/pymsnt) + `msn.example.org` is connected to port 5235 with password + ‘`msnsecret`’. + +- The [`Yahoo! transport`](https://ejabberd.im/yahoo-transport-2) + `yahoo.example.org` is connected to port 5236 with password + ‘`yahoosecret`’. + +- The + [`Gadu-Gadu transport`](https://ejabberd.im/jabber-gg-transport) + `gg.example.org` is connected to port 5237 with password + ‘`ggsecret`’. + +- The [`Jabber Mail Component`](https://ejabberd.im/jmc) + `jmc.example.org` is connected to port 5238 with password + ‘`jmcsecret`’. + +- The service custom has enabled the special option to avoiding + checking the `from` attribute in the packets send by this component. + The component can send packets in behalf of any users from the + server, or even on behalf of any server. + +``` yaml +acl: + blocked: + user: bad + trusted_servers: + server: + - example.com + - jabber.example.org + xmlrpc_bot: + user: + - xmlrpc-robot@example.org +shaper: + normal: 1000 +shaper_rules: + c2s_shaper: + - none: admin + - normal +access_rules: + c2s: + - deny: blocked + - allow + xmlrpc_access: + - allow: xmlrpc_bot + s2s: + - allow: trusted_servers +certfiles: + - /path/to/ssl.pem +s2s_access: s2s +s2s_use_starttls: required_trusted +listen: + - + port: 5222 + module: ejabberd_c2s + shaper: c2s_shaper + access: c2s + - + ip: 192.168.0.1 + port: 5223 + module: ejabberd_c2s + tls: true + access: c2s + - + ip: "FDCA:8AB6:A243:75EF::1" + port: 5223 + module: ejabberd_c2s + tls: true + access: c2s + - + port: 5269 + module: ejabberd_s2s_in + - + port: 5280 + module: ejabberd_http + request_handlers: + /admin: ejabberd_web_admin + /bosh: mod_bosh + /mqtt: mod_mqtt + - + port: 4560 + module: ejabberd_xmlrpc + access_commands: {} + - + ip: 127.0.0.1 + port: 5233 + module: ejabberd_service + hosts: + aim.example.org: + password: aimsecret + - + ip: "::1" + port: 5233 + module: ejabberd_service + hosts: + aim.example.org: + password: aimsecret + - + port: 5234 + module: ejabberd_service + hosts: + icq.example.org: + password: jitsecret + sms.example.org: + password: jitsecret + - + port: 5235 + module: ejabberd_service + hosts: + msn.example.org: + password: msnsecret + - + port: 5236 + module: ejabberd_service + password: yahoosecret + - + port: 5237 + module: ejabberd_service + hosts: + gg.example.org: + password: ggsecret + - + port: 5238 + module: ejabberd_service + hosts: + jmc.example.org: + password: jmcsecret + - + port: 5239 + module: ejabberd_service + check_from: false + hosts: + custom.example.org: + password: customsecret +``` + +Note, that for services based in jabberd14 or WPJabber you have to make +the transports log and do XDB by themselves: + +``` xml + + + + + + %d: [%t] (%h): %s + /var/log/jabber/service.log + + + + + + + + + /usr/lib/jabber/xdb_file.so + + + /var/spool/jabber + + +``` diff --git a/content/archive/24.06/modules.md b/content/archive/24.06/modules.md new file mode 100644 index 00000000..59229faf --- /dev/null +++ b/content/archive/24.06/modules.md @@ -0,0 +1,3956 @@ +--- +search: + exclude: true +--- + +# Modules Options + +> This section describes modules options of ejabberd [24.06](../../archive/24.06/index.md). If you are using an old ejabberd release, please refer to the corresponding archived version of this page in the [Archive](../../archive/index.md). The modules +that changed in this version are marked with 🟤. + +mod\_adhoc +---------- + +This module implements [XEP-0050: Ad-Hoc +Commands](https://xmpp.org/extensions/xep-0050.html). It’s an auxiliary +module and is only needed by some of the other modules. + +__Available options:__ + +- **report\_commands\_node**: *true | false* +Provide the Commands item in the Service Discovery. Default value: +*false*. + +mod\_admin\_extra +----------------- + +This module provides additional administrative commands. + +Details for some commands: + +- *ban\_account*: This command kicks all the connected sessions of the + account from the server. It also changes their password to a + randomly generated one, so they can’t login anymore unless a server + administrator changes their password again. It is possible to define + the reason of the ban. The new password also includes the reason and + the date and time of the ban. See an example below. + +- *pushroster*: (and *pushroster-all*) The roster file must be placed, + if using Windows, on the directory where you installed ejabberd: + `C:/Program Files/ejabberd` or similar. If you use other Operating + System, place the file on the same directory where the .beam files + are installed. See below an example roster file. + +- *srg\_create*: If you want to put a group Name with blank spaces, + use the characters "' and '" to define when the Name starts and + ends. See an example below. + +The module has no options. + +__Examples:__ + +With this configuration, vCards can only be modified with +mod\_admin\_extra commands: + +~~~ yaml +acl: + adminextraresource: + - resource: "modadminextraf8x,31ad" +access_rules: + vcard_set: + - allow: adminextraresource +modules: + mod_admin_extra: {} + mod_vcard: + access_set: vcard_set +~~~ + +Content of roster file for *pushroster* command: + +~~~ yaml +[{<<"bob">>, <<"example.org">>, <<"workers">>, <<"Bob">>}, +{<<"mart">>, <<"example.org">>, <<"workers">>, <<"Mart">>}, +{<<"Rich">>, <<"example.org">>, <<"bosses">>, <<"Rich">>}]. +~~~ + +With this call, the sessions of the local account which JID is + will be kicked, and its password will be set to +something like +*BANNED\_ACCOUNT—20080425T21:45:07—2176635—Spammed\_rooms* + +~~~ yaml +ejabberdctl vhost example.org ban_account boby "Spammed rooms" +~~~ + +Call to srg\_create using double-quotes and single-quotes: + +~~~ yaml +ejabberdctl srg_create g1 example.org "'Group number 1'" this_is_g1 g1 +~~~ + +mod\_admin\_update\_sql +----------------------- + +This module can be used to update existing SQL database from the default +to the new schema. Check the section +[Default and New Schemas](../../admin/configuration/database.md#default-and-new-schemas) for +details. Please note that only MS SQL, MySQL, and PostgreSQL are +supported. When the module is loaded use [update_sql](../../developer/ejabberd-api/admin-api.md#update_sql) API. + +The module has no options. + +mod\_announce +------------- + +This module enables configured users to broadcast announcements and to +set the message of the day (MOTD). Configured users can perform these +actions with an XMPP client either using Ad-hoc Commands or sending +messages to specific JIDs. + +Note that this module can be resource intensive on large deployments as +it may broadcast a lot of messages. This module should be disabled for +instances of ejabberd with hundreds of thousands users. + +The Ad-hoc Commands are listed in the Server Discovery. For this feature +to work, [mod_adhoc](#mod_adhoc) must be enabled. + +The specific JIDs where messages can be sent are listed below. The first +JID in each entry will apply only to the specified virtual host +example.org, while the JID between brackets will apply to all virtual +hosts in ejabberd: + +- example.org/announce/all (example.org/announce/all-hosts/all):: The + message is sent to all registered users. If the user is online and + connected to several resources, only the resource with the highest + priority will receive the message. If the registered user is not + connected, the message will be stored offline in assumption that + offline storage (see [mod_offline](#mod_offline)) is enabled. + +- example.org/announce/online + (example.org/announce/all-hosts/online):: The message is sent to all + connected users. If the user is online and connected to several + resources, all resources will receive the message. + +- example.org/announce/motd (example.org/announce/all-hosts/motd):: + The message is set as the message of the day (MOTD) and is sent to + users when they login. In addition the message is sent to all + connected users (similar to announce/online). + +- example.org/announce/motd/update + (example.org/announce/all-hosts/motd/update):: The message is set as + message of the day (MOTD) and is sent to users when they login. The + message is not sent to any currently connected user. + +- example.org/announce/motd/delete + (example.org/announce/all-hosts/motd/delete):: Any message sent to + this JID removes the existing message of the day (MOTD). + +__Available options:__ + +- **access**: *AccessName* +This option specifies who is allowed to send announcements and to set +the message of the day. The default value is *none* (i.e. nobody is able +to send such messages). + +- **cache\_life\_time**: *timeout()* +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module +only. + +- **cache\_missed**: *true | false* +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module +only. + +- **cache\_size**: *pos\_integer() | infinity* +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module +only. + +- **db\_type**: *mnesia | sql* +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module +only. + +- **use\_cache**: *true | false* +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. + +mod\_avatar +----------- + +The purpose of the module is to cope with legacy and modern XMPP clients +posting avatars. The process is described in [XEP-0398: User Avatar to +vCard-Based Avatars +Conversion](https://xmpp.org/extensions/xep-0398.html). + +Also, the module supports conversion between avatar image formats on the +fly. + +The module depends on [mod_vcard](#mod_vcard), [mod_vcard_xupdate](#mod_vcard_xupdate) and +[mod_pubsub](#mod_pubsub). + +__Available options:__ + +- **convert**: *{From: To}* +Defines image conversion rules: the format in *From* will be converted +to format in *To*. The value of *From* can also be *default*, which is +match-all rule. NOTE: the list of supported formats is detected at +compile time depending on the image libraries installed in the system. + + **Example**: + + ~~~ yaml + convert: + webp: jpg + default: png + ~~~ + +- **rate\_limit**: *Number* +Limit any given JID by the number of avatars it is able to convert per +minute. This is to protect the server from image conversion DoS. The +default value is *10*. + +mod\_block\_strangers +--------------------- + +This module blocks and logs any messages coming from an unknown entity. +If a writing entity is not in your roster, you can let this module drop +and/or log the message. By default you’ll just not receive message from +that entity. Enable this module if you want to drop SPAM messages. + +__Available options:__ + +- **access**: *AccessName* +The option is supposed to be used when *allow\_local\_users* and +*allow\_transports* are not enough. It’s an ACL where *deny* means the +message will be rejected (or a CAPTCHA would be generated for a +presence, if configured), and *allow* means the sender is whitelisted +and the stanza will pass through. The default value is *none*, which +means nothing is whitelisted. + +- **allow\_local\_users**: *true | false* +This option specifies if strangers from the same local host should be +accepted or not. The default value is *true*. + +- **allow\_transports**: *true | false* +If set to *true* and some server’s JID is in user’s roster, then +messages from any user of this server are accepted even if no +subscription present. The default value is *true*. + +- **captcha**: *true | false* +Whether to generate CAPTCHA or not in response to messages from +strangers. See also section [CAPTCHA](../../admin/configuration/basic.md#captcha) of the +Configuration Guide. The default value is *false*. + +- **drop**: *true | false* +This option specifies if strangers messages should be dropped or not. +The default value is *true*. + +- **log**: *true | false* +This option specifies if strangers' messages should be logged (as info +message) in ejabberd.log. The default value is *false*. + +mod\_blocking +------------- + +The module implements [XEP-0191: Blocking +Command](https://xmpp.org/extensions/xep-0191.html). + +This module depends on *mod\_privacy* where all the configuration is +performed. + +The module has no options. + +mod\_bosh +--------- + +This module implements XMPP over BOSH as defined in +[XEP-0124](https://xmpp.org/extensions/xep-0124.html) and +[XEP-0206](https://xmpp.org/extensions/xep-0206.html). BOSH stands for +Bidirectional-streams Over Synchronous HTTP. It makes it possible to +simulate long lived connections required by XMPP over the HTTP protocol. +In practice, this module makes it possible to use XMPP in a browser +without WebSocket support and more generally to have a way to use XMPP +while having to get through an HTTP proxy. + +__Available options:__ + +- **cache\_life\_time**: *timeout()* +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module +only. + +- **cache\_missed**: *true | false* +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module +only. + +- **cache\_size**: *pos\_integer() | infinity* +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module +only. + +- **json**: *true | false* +This option has no effect. + +- **max\_concat**: *pos\_integer() | infinity* +This option limits the number of stanzas that the server will send in a +single bosh request. The default value is *unlimited*. + +- **max\_inactivity**: *timeout()* +The option defines the maximum inactivity period. The default value is +*30* seconds. + +- **max\_pause**: *pos\_integer()* +Indicate the maximum length of a temporary session pause (in seconds) +that a client can request. The default value is *120*. + +- **prebind**: *true | false* +If enabled, the client can create the session without going through +authentication. Basically, it creates a new session with anonymous +authentication. The default value is *false*. + +- **queue\_type**: *ram | file* +Same as top-level [queue_type](toplevel.md#queue_type) option, but applied to this module +only. + +- **ram\_db\_type**: *mnesia | sql | redis* +Same as top-level [default_ram_db](toplevel.md#default_ram_db) option, but applied to this module +only. + +- **use\_cache**: *true | false* +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. + +__**Example**:__ + +~~~ yaml +listen: + - + port: 5222 + module: ejabberd_c2s + - + port: 5443 + module: ejabberd_http + request_handlers: + /bosh: mod_bosh + +modules: + mod_bosh: {} +~~~ + +mod\_caps +--------- + +This module implements [XEP-0115: Entity +Capabilities](https://xmpp.org/extensions/xep-0115.html). The main +purpose of the module is to provide PEP functionality (see +[mod_pubsub](#mod_pubsub)). + +__Available options:__ + +- **cache\_life\_time**: *timeout()* +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module +only. + +- **cache\_missed**: *true | false* +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module +only. + +- **cache\_size**: *pos\_integer() | infinity* +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module +only. + +- **db\_type**: *mnesia | sql* +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module +only. + +- **use\_cache**: *true | false* +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. + +mod\_carboncopy +--------------- + +The module implements [XEP-0280: Message +Carbons](https://xmpp.org/extensions/xep-0280.html). The module +broadcasts messages on all connected user resources (devices). + +The module has no options. + +mod\_client\_state +------------------ + +This module allows for queueing certain types of stanzas when a client +indicates that the user is not actively using the client right now (see +[XEP-0352: Client State +Indication](https://xmpp.org/extensions/xep-0352.html)). This can save +bandwidth and resources. + +A stanza is dropped from the queue if it’s effectively obsoleted by a +new one (e.g., a new presence stanza would replace an old one from the +same client). The queue is flushed if a stanza arrives that won’t be +queued, or if the queue size reaches a certain limit (currently 100 +stanzas), or if the client becomes active again. + +__Available options:__ + +- **queue\_chat\_states**: *true | false* +Queue "standalone" chat state notifications (as defined in [XEP-0085: +Chat State Notifications](https://xmpp.org/extensions/xep-0085.html)) +while a client indicates inactivity. The default value is *true*. + +- **queue\_pep**: *true | false* +Queue PEP notifications while a client is inactive. When the queue is +flushed, only the most recent notification of a given PEP node is +delivered. The default value is *true*. + +- **queue\_presence**: *true | false* +While a client is inactive, queue presence stanzas that indicate +(un)availability. The default value is *true*. + +mod\_configure +-------------- + +The module provides server configuration functionality via [XEP-0050: +Ad-Hoc Commands](https://xmpp.org/extensions/xep-0050.html). Implements +many commands as defined in [XEP-0133: Service +Administration](https://xmpp.org/extensions/xep-0133.html). This module +requires [mod_adhoc](#mod_adhoc) to be loaded. + +The module has no options. + +mod\_conversejs +--------------- + + + + +This module serves a simple page for the +[Converse](https://conversejs.org/) XMPP web browser client. + +To use this module, in addition to adding it to the *modules* section, +you must also enable it in *listen* → *ejabberd\_http* → +[request_handlers](listen-options.md#request_handlers). + +Make sure either *mod\_bosh* or *ejabberd\_http\_ws* +[request_handlers](listen-options.md#request_handlers) are enabled. + +When *conversejs\_css* and *conversejs\_script* are *auto*, by default +they point to the public Converse client. + +__Available options:__ + +- **bosh\_service\_url**: *auto | BoshURL* +BOSH service URL to which Converse can connect to. The keyword *@HOST@* +is replaced with the real virtual host name. If set to *auto*, it will +build the URL of the first configured BOSH request handler. The default +value is *auto*. + +- **conversejs\_css**: *auto | URL* +Converse CSS URL. The keyword *@HOST@* is replaced with the hostname. +The default value is *auto*. + +- **conversejs\_options**: *{Name: Value}* + + Specify additional options to +be passed to Converse. See [Converse +configuration](https://conversejs.org/docs/html/configuration.html). +Only boolean, integer and string values are supported; lists are not +supported. + +- **conversejs\_resources**: *Path* + + Local path to the Converse +files. If not set, the public Converse client will be used instead. + +- **conversejs\_script**: *auto | URL* +Converse main script URL. The keyword *@HOST@* is replaced with the +hostname. The default value is *auto*. + +- **default\_domain**: *Domain* +Specify a domain to act as the default for user JIDs. The keyword +*@HOST@* is replaced with the hostname. The default value is *@HOST@*. + +- **websocket\_url**: *auto | WebSocketURL* +A WebSocket URL to which Converse can connect to. The keyword *@HOST@* +is replaced with the real virtual host name. If set to *auto*, it will +build the URL of the first configured WebSocket request handler. The +default value is *auto*. + +__Examples:__ + +Manually setup WebSocket url, and use the public Converse client: + +~~~ yaml +listen: + - + port: 5280 + module: ejabberd_http + request_handlers: + /bosh: mod_bosh + /websocket: ejabberd_http_ws + /conversejs: mod_conversejs + +modules: + mod_bosh: {} + mod_conversejs: + websocket_url: "ws://@HOST@:5280/websocket" +~~~ + +Host Converse locally and let auto detection of WebSocket and Converse +URLs: + +~~~ yaml +listen: + - + port: 443 + module: ejabberd_http + tls: true + request_handlers: + /websocket: ejabberd_http_ws + /conversejs: mod_conversejs + +modules: + mod_conversejs: + conversejs_resources: "/home/ejabberd/conversejs-9.0.0/package/dist" +~~~ + +Configure some additional options for Converse + +~~~ yaml +modules: + mod_conversejs: + websocket_url: auto + conversejs_options: + auto_away: 30 + clear_cache_on_logout: true + i18n: "pt" + locked_domain: "@HOST@" + message_archiving: always + theme: dracula +~~~ + +mod\_delegation +--------------- + +This module is an implementation of [XEP-0355: Namespace +Delegation](https://xmpp.org/extensions/xep-0355.html). Only admin mode +has been implemented by now. Namespace delegation allows external +services to handle IQ using specific namespace. This may be applied for +external PEP service. + +> **Warning** +> +> Security issue: Namespace delegation gives components access to +> sensitive data, so permission should be granted carefully, only if you +> trust the component. + +> **Note** +> +> This module is complementary to [mod_privilege](#mod_privilege) but can also be used +> separately. + +__Available options:__ + +- **namespaces**: *{Namespace: Options}* +If you want to delegate namespaces to a component, specify them in this +option, and associate them to an access rule. The *Options* are: + + - **access**: *AccessName* + The option defines which components are + allowed for namespace delegation. The default value is *none*. + + - **filtering**: *Attributes* + The list of attributes. Currently not + used. + +__Examples:__ + +Make sure you do not delegate the same namespace to several services at +the same time. As in the example provided later, to have the +*sat-pubsub.example.org* component perform correctly disable the +*mod\_pubsub* module. + +~~~ yaml +access_rules: + external_pubsub: + allow: external_component + external_mam: + allow: external_component + +acl: + external_component: + server: sat-pubsub.example.org + +modules: + mod_delegation: + namespaces: + urn:xmpp:mam:1: + access: external_mam + http://jabber.org/protocol/pubsub: + access: external_pubsub +~~~ + +mod\_disco +---------- + +This module adds support for [XEP-0030: Service +Discovery](https://xmpp.org/extensions/xep-0030.html). With this module +enabled, services on your server can be discovered by XMPP clients. + +__Available options:__ + +- **extra\_domains**: *\[Domain, ...\]* +With this option, you can specify a list of extra domains that are added +to the Service Discovery item list. The default value is an empty list. + +- **name**: *Name* +A name of the server in the Service Discovery. This will only be +displayed by special XMPP clients. The default value is *ejabberd*. + +- **server\_info**: *\[Info, ...\]* +Specify additional information about the server, as described in +[XEP-0157: Contact Addresses for XMPP +Services](https://xmpp.org/extensions/xep-0157.html). Every *Info* +element in the list is constructed from the following options: + + - **modules**: *all | \[Module, ...\]* + The value can be the keyword + *all*, in which case the information is reported in all the + services, or a list of ejabberd modules, in which case the + information is only specified for the services provided by those + modules. + + - **name**: *Name* + The field *var* name that will be defined. See + XEP-0157 for some standardized names. + + - **urls**: *\[URI, ...\]* + A list of contact URIs, such as HTTP URLs, + XMPP URIs and so on. + + **Example**: + + ~~~ yaml + server_info: + - + modules: all + name: abuse-addresses + urls: ["mailto:abuse@shakespeare.lit"] + - + modules: [mod_muc] + name: "Web chatroom logs" + urls: ["http://www.example.org/muc-logs"] + - + modules: [mod_disco] + name: feedback-addresses + urls: + - http://shakespeare.lit/feedback.php + - mailto:feedback@shakespeare.lit + - xmpp:feedback@shakespeare.lit + - + modules: + - mod_disco + - mod_vcard + name: admin-addresses + urls: + - mailto:xmpp@shakespeare.lit + - xmpp:admins@shakespeare.lit + ~~~ + +mod\_fail2ban +------------- + +The module bans IPs that show the malicious signs. Currently only C2S +authentication failures are detected. + +Unlike the standalone program, *mod\_fail2ban* clears the record of +authentication failures after some time since the first failure or on a +successful authentication. It also does not simply block network +traffic, but provides the client with a descriptive error message. + +> **Warning** +> +> You should not use this module behind a proxy or load balancer. +> ejabberd will see the failures as coming from the load balancer and, +> when the threshold of auth failures is reached, will reject all +> connections coming from the load balancer. You can lock all your user +> base out of ejabberd when using this module behind a proxy. + +__Available options:__ + +- **access**: *AccessName* +Specify an access rule for whitelisting IP addresses or networks. If the +rule returns *allow* for a given IP address, that address will never be +banned. The *AccessName* should be of type *ip*. The default value is +*none*. + +- **c2s\_auth\_ban\_lifetime**: *timeout()* +The lifetime of the IP ban caused by too many C2S authentication +failures. The default value is *1* hour. + +- **c2s\_max\_auth\_failures**: *Number* +The number of C2S authentication failures to trigger the IP ban. The +default value is *20*. + +mod\_host\_meta +--------------- + + + + +This module serves small *host-meta* files as described in [XEP-0156: +Discovering Alternative XMPP Connection +Methods](https://xmpp.org/extensions/xep-0156.html). + +To use this module, in addition to adding it to the *modules* section, +you must also enable it in *listen* → *ejabberd\_http* → +[request_handlers](listen-options.md#request_handlers). + +Notice it only works if ejabberd\_http has tls enabled. + +__Available options:__ + +- **bosh\_service\_url**: *undefined | auto | BoshURL* +BOSH service URL to announce. The keyword *@HOST@* is replaced with the +real virtual host name. If set to *auto*, it will build the URL of the +first configured BOSH request handler. The default value is *auto*. + +- **websocket\_url**: *undefined | auto | WebSocketURL* +WebSocket URL to announce. The keyword *@HOST@* is replaced with the +real virtual host name. If set to *auto*, it will build the URL of the +first configured WebSocket request handler. The default value is *auto*. + +__**Example**:__ + +~~~ yaml +listen: + - + port: 443 + module: ejabberd_http + tls: true + request_handlers: + /bosh: mod_bosh + /ws: ejabberd_http_ws + /.well-known/host-meta: mod_host_meta + /.well-known/host-meta.json: mod_host_meta + +modules: + mod_bosh: {} + mod_host_meta: + bosh_service_url: "https://@HOST@:5443/bosh" + websocket_url: "wss://@HOST@:5443/ws" +~~~ + +mod\_http\_api +-------------- + +This module provides a ReST interface to call +[ejabberd API](../../developer/ejabberd-api/index.md) commands using +JSON data. + +To use this module, in addition to adding it to the *modules* section, +you must also enable it in *listen* → *ejabberd\_http* → +[request_handlers](listen-options.md#request_handlers). + +To use a specific API version N, when defining the URL path in the +request\_handlers, add a *vN*. For example: */api/v2: mod\_http\_api* + +To run a command, send a POST request to the corresponding URL: +*http://localhost:5280/api/<command\_name>* + +The module has no options. + +__**Example**:__ + +~~~ yaml +listen: + - + port: 5280 + module: ejabberd_http + request_handlers: + /api: mod_http_api + +modules: + mod_http_api: {} +~~~ + +mod\_http\_fileserver +--------------------- + +This simple module serves files from the local disk over HTTP. + +__Available options:__ + +- **accesslog**: *Path* +File to log accesses using an Apache-like format. No log will be +recorded if this option is not specified. + +- **content\_types**: *{Extension: Type}* +Specify mappings of extension to content type. There are several content +types already defined. With this option you can add new definitions or +modify existing ones. The default values are: + + **Example**: + + ~~~ yaml + content_types: + .css: text/css + .gif: image/gif + .html: text/html + .jar: application/java-archive + .jpeg: image/jpeg + .jpg: image/jpeg + .js: text/javascript + .png: image/png + .svg: image/svg+xml + .txt: text/plain + .xml: application/xml + .xpi: application/x-xpinstall + .xul: application/vnd.mozilla.xul+xml + ~~~ + +- **custom\_headers**: *{Name: Value}* +Indicate custom HTTP headers to be included in all responses. There are +no custom headers by default. + +- **default\_content\_type**: *Type* +Specify the content type to use for unknown extensions. The default +value is *application/octet-stream*. + +- **directory\_indices**: *\[Index, ...\]* +Indicate one or more directory index files, similarly to Apache’s +*DirectoryIndex* variable. When an HTTP request hits a directory instead +of a regular file, those directory indices are looked in order, and the +first one found is returned. The default value is an empty list. + +- **docroot**: *Path* +Directory to serve the files from. This is a mandatory option. + +- **must\_authenticate\_with**: *\[{Username, Hostname}, ...\]* +List of accounts that are allowed to use this service. Default value: +*\[\]*. + +__Examples:__ + +This example configuration will serve the files from the local directory +*/var/www* in the address *http://example.org:5280/pub/content/*. In +this example a new content type *ogg* is defined, *png* is redefined, +and *jpg* definition is deleted: + +~~~ yaml +listen: + - + port: 5280 + module: ejabberd_http + request_handlers: + /pub/content: mod_http_fileserver + +modules: + mod_http_fileserver: + docroot: /var/www + accesslog: /var/log/ejabberd/access.log + directory_indices: + - index.html + - main.htm + custom_headers: + X-Powered-By: Erlang/OTP + X-Fry: "It's a widely-believed fact!" + content_types: + .ogg: audio/ogg + .png: image/png + default_content_type: text/html +~~~ + +mod\_http\_upload +----------------- + +This module allows for requesting permissions to upload a file via HTTP +as described in [XEP-0363: HTTP File +Upload](https://xmpp.org/extensions/xep-0363.html). If the request is +accepted, the client receives a URL for uploading the file and another +URL from which that file can later be downloaded. + +In order to use this module, it must be enabled in *listen* → +*ejabberd\_http* → +[request_handlers](listen-options.md#request_handlers). + +__Available options:__ + +- **access**: *AccessName* +This option defines the access rule to limit who is permitted to use the +HTTP upload service. The default value is *local*. If no access rule of +that name exists, no user will be allowed to use the service. + +- **custom\_headers**: *{Name: Value}* +This option specifies additional header fields to be included in all +HTTP responses. By default no custom headers are included. + +- **dir\_mode**: *Permission* +This option defines the permission bits of the *docroot* directory and +any directories created during file uploads. The bits are specified as +an octal number (see the chmod(1) manual page) within double quotes. For +example: "0755". The default is undefined, which means no explicit +permissions will be set. + +- **docroot**: *Path* +Uploaded files are stored below the directory specified (as an absolute +path) with this option. The keyword @HOME@ is replaced with the home +directory of the user running ejabberd, and the keyword @HOST@ with the +virtual host name. The default value is "@HOME@/upload". + +- **external\_secret**: *Text* +This option makes it possible to offload all HTTP Upload processing to a +separate HTTP server. Both ejabberd and the HTTP server should share +this secret and behave exactly as described at [Prosody’s +mod\_http\_upload\_external](https://modules.prosody.im/mod_http_upload_external.html) +in the *Implementation* section. There is no default value. + +- **file\_mode**: *Permission* +This option defines the permission bits of uploaded files. The bits are +specified as an octal number (see the chmod(1) manual page) within +double quotes. For example: "0644". The default is undefined, which +means no explicit permissions will be set. + +- **get\_url**: *URL* +This option specifies the initial part of the GET URLs used for +downloading the files. The default value is *undefined*. When this +option is *undefined*, this option is set to the same value as +*put\_url*. The keyword @HOST@ is replaced with the virtual host name. +NOTE: if GET requests are handled by *mod\_http\_upload*, the *get\_url* +must match the *put\_url*. Setting it to a different value only makes +sense if an external web server or [mod_http_fileserver](#mod_http_fileserver) is used to +serve the uploaded files. + +- **host** +Deprecated. Use *hosts* instead. + +- **hosts**: *\[Host, ...\]* +This option defines the Jabber IDs of the service. If the *hosts* option +is not specified, the only Jabber ID will be the hostname of the virtual +host with the prefix "upload.". The keyword *@HOST@* is replaced with +the real virtual host name. + +- **jid\_in\_url**: *node | sha1* +When this option is set to *node*, the node identifier of the user’s JID +(i.e., the user name) is included in the GET and PUT URLs generated by +*mod\_http\_upload*. Otherwise, a SHA-1 hash of the user’s bare JID is +included instead. The default value is *sha1*. + +- **max\_size**: *Size* +This option limits the acceptable file size. Either a number of bytes +(larger than zero) or *infinity* must be specified. The default value is +*104857600*. + +- **name**: *Name* +A name of the service in the Service Discovery. This will only be +displayed by special XMPP clients. The default value is "HTTP File +Upload". + +- **put\_url**: *URL* +This option specifies the initial part of the PUT URLs used for file +uploads. The keyword @HOST@ is replaced with the virtual host name. +NOTE: different virtual hosts cannot use the same PUT URL. The default +value is "https://@HOST@:5443/upload". + +- **rm\_on\_unregister**: *true | false* +This option specifies whether files uploaded by a user should be removed +when that user is unregistered. The default value is *true*. + +- **secret\_length**: *Length* +This option defines the length of the random string included in the GET +and PUT URLs generated by *mod\_http\_upload*. The minimum length is 8 +characters, but it is recommended to choose a larger value. The default +value is *40*. + +- **service\_url** +Deprecated. + +- **thumbnail**: *true | false* +This option specifies whether ejabberd should create thumbnails of +uploaded images. If a thumbnail is created, a <thumbnail/> element +that contains the download <uri/> and some metadata is returned +with the PUT response. The default value is *false*. + +- **vcard**: *vCard* +A custom vCard of the service that will be displayed by some XMPP +clients in Service Discovery. The value of *vCard* is a YAML map +constructed from an XML representation of vCard. Since the +representation has no attributes, the mapping is straightforward. + + **Example**: + + ~~~ yaml + # This XML representation of vCard: + # + # Conferences + # + # + # Elm Street + # + # + # + # is translated to: + vcard: + fn: Conferences + adr: + - + work: true + street: Elm Street + ~~~ + +__**Example**:__ + +~~~ yaml +listen: + - + port: 5443 + module: ejabberd_http + tls: true + request_handlers: + /upload: mod_http_upload + +modules: + mod_http_upload: + docroot: /ejabberd/upload + put_url: "https://@HOST@:5443/upload" +~~~ + +mod\_http\_upload\_quota +------------------------ + +This module adds quota support for mod\_http\_upload. + +This module depends on *mod\_http\_upload*. + +__Available options:__ + +- **access\_hard\_quota**: *AccessName* +This option defines which access rule is used to specify the "hard +quota" for the matching JIDs. That rule must yield a positive number for +any JID that is supposed to have a quota limit. This is the number of +megabytes a corresponding user may upload. When this threshold is +exceeded, ejabberd deletes the oldest files uploaded by that user until +their disk usage equals or falls below the specified soft quota (see +*access\_soft\_quota*). The default value is *hard\_upload\_quota*. + +- **access\_soft\_quota**: *AccessName* +This option defines which access rule is used to specify the "soft +quota" for the matching JIDs. That rule must yield a positive number of +megabytes for any JID that is supposed to have a quota limit. See the +description of the *access\_hard\_quota* option for details. The default +value is *soft\_upload\_quota*. + +- **max\_days**: *Days* +If a number larger than zero is specified, any files (and directories) +older than this number of days are removed from the subdirectories of +the *docroot* directory, once per day. The default value is *infinity*. + +__Examples:__ + +Please note that it’s not necessary to specify the *access\_hard\_quota* +and *access\_soft\_quota* options in order to use the quota feature. You +can stick to the default names and just specify access rules such as +those in this example: + +~~~ yaml +shaper_rules: + soft_upload_quota: + 1000: all # MiB + hard_upload_quota: + 1100: all # MiB + +modules: + mod_http_upload: {} + mod_http_upload_quota: + max_days: 100 +~~~ + +mod\_jidprep +------------ + +This module allows XMPP clients to ask the server to normalize a JID as +per the rules specified in [RFC 6122: XMPP Address +Format](https://tools.ietf.org/html/rfc6122). This might be useful for +clients in certain constrained environments, or for testing purposes. + +__Available options:__ + +- **access**: *AccessName* +This option defines which access rule will be used to control who is +allowed to use this service. The default value is *local*. + +mod\_last +--------- + +This module adds support for [XEP-0012: Last +Activity](https://xmpp.org/extensions/xep-0012.html). It can be used to +discover when a disconnected user last accessed the server, to know when +a connected user was last active on the server, or to query the uptime +of the ejabberd server. + +__Available options:__ + +- **cache\_life\_time**: *timeout()* +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module +only. + +- **cache\_missed**: *true | false* +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module +only. + +- **cache\_size**: *pos\_integer() | infinity* +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module +only. + +- **db\_type**: *mnesia | sql* +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module +only. + +- **use\_cache**: *true | false* +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. + +mod\_legacy\_auth +----------------- + +The module implements [XEP-0078: Non-SASL +Authentication](https://xmpp.org/extensions/xep-0078.html). + +> **Note** +> +> This type of authentication was obsoleted in 2008 and you unlikely +> need this module unless you have something like outdated Jabber bots. + +The module has no options. + +mod\_mam +-------- + +This module implements [XEP-0313: Message Archive +Management](https://xmpp.org/extensions/xep-0313.html) and [XEP-0441: +Message Archive Management +Preferences](https://xmpp.org/extensions/xep-0441.html). Compatible XMPP +clients can use it to store their chat history on the server. + +__Available options:__ + +- **access\_preferences**: *AccessName* +This access rule defines who is allowed to modify the MAM preferences. +The default value is *all*. + +- **assume\_mam\_usage**: *true | false* +This option determines how ejabberd’s stream management code (see +[mod_stream_mgmt](#mod_stream_mgmt)) handles unacknowledged messages when the connection +is lost. Usually, such messages are either bounced or resent. However, +neither is done for messages that were stored in the user’s MAM archive +if this option is set to *true*. In this case, ejabberd assumes those +messages will be retrieved from the archive. The default value is +*false*. + +- **cache\_life\_time**: *timeout()* +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module +only. + +- **cache\_missed**: *true | false* +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module +only. + +- **cache\_size**: *pos\_integer() | infinity* +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module +only. + +- **clear\_archive\_on\_room\_destroy**: *true | false* +Whether to destroy message archive of a room (see [mod_muc](#mod_muc)) when it +gets destroyed. The default value is *true*. + +- **compress\_xml**: *true | false* +When enabled, new messages added to archives are compressed using a +custom compression algorithm. This feature works only with SQL backends. +The default value is *false*. + +- **db\_type**: *mnesia | sql* +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module +only. + +- **default**: *always | never | roster* +The option defines default policy for chat history. When *always* is set +every chat message is stored. With *roster* only chat history with +contacts from user’s roster is stored. And *never* fully disables chat +history. Note that a client can change its policy via protocol commands. +The default value is *never*. + +- **request\_activates\_archiving**: *true | false* +If the value is *true*, no messages are stored for a user until their +client issue a MAM request, regardless of the value of the *default* +option. Once the server received a request, that user’s messages are +archived as usual. The default value is *false*. + +- **use\_cache**: *true | false* +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. + +- **user\_mucsub\_from\_muc\_archive**: *true | false* +When this option is disabled, for each individual subscriber a separate +mucsub message is stored. With this option enabled, when a user fetches +archive virtual mucsub, messages are generated from muc archives. The +default value is *false*. + +mod\_matrix\_gw +--------------- + + + + +[Matrix](https://matrix.org/) gateway. + +__Available options:__ + +- **host**: *Host* +This option defines the Jabber IDs of the service. If the *host* option +is not specified, the Jabber ID will be the hostname of the virtual host +with the prefix *"matrix."*. The keyword *@HOST@* is replaced with the +real virtual host name. + +- **key**: *string()* +Value of the matrix signing key, in base64. + +- **key\_name**: *string()* +Name of the matrix signing key. + +- **matrix\_domain**: *Domain* +Specify a domain in the Matrix federation. The keyword *@HOST@* is +replaced with the hostname. The default value is *@HOST@*. + +- **matrix\_id\_as\_jid**: *true | false* +If set to *false*, all packets failing to be delivered via an XMPP +server-to-server connection will then be routed to the Matrix gateway by +translating a Jabber ID *user@matrixdomain.tld* to a Matrix user +identifier *@user:matrixdomain.tld*. When set to *true*, messages must +be explicitly sent to the matrix gateway service Jabber ID to be routed +to a remote Matrix server. In this case, to send a message to Matrix +user *@user:matrixdomain.tld*, the client must send a message to the JID +*user%.tld*, where +*matrix.myxmppdomain.tld* is the JID of the gateway service as set by +the *host* option. The default is *false*. + +__**Example**:__ + +~~~ yaml +listen: + - + port: 8448 + module: ejabberd_http + tls: true + request_handlers: + "/_matrix": mod_matrix_gw + +modules: + mod_matrix_gw: + key_name: "key1" + key: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" + matrix_id_as_jid: true +~~~ + +mod\_metrics +------------ + +This module sends events to external backend (by now only +[grapherl](https://github.com/processone/grapherl) is supported). +Supported events are: + +- sm\_register\_connection + +- sm\_remove\_connection + +- user\_send\_packet + +- user\_receive\_packet + +- s2s\_send\_packet + +- s2s\_receive\_packet + +- register\_user + +- remove\_user + +- offline\_message + +When enabled, every call to these hooks triggers a counter event to be +sent to the external backend. + +__Available options:__ + +- **ip**: *IPv4Address* +IPv4 address where the backend is located. The default value is +*127.0.0.1*. + +- **port**: *Port* +An internet port number at which the backend is listening for incoming +connections/packets. The default value is *11111*. + +mod\_mix +-------- + + + + +This module is an experimental implementation of [XEP-0369: Mediated +Information eXchange (MIX)](https://xmpp.org/extensions/xep-0369.html). +It’s asserted that the MIX protocol is going to replace the MUC protocol +in the future (see [mod_muc](#mod_muc)). + +To learn more about how to use that feature, you can refer to our +tutorial: [Getting started with MIX](../../tutorials/mix-010.md) + +The module depends on [mod_mam](#mod_mam). + +__Available options:__ + +- **access\_create**: *AccessName* +An access rule to control MIX channels creations. The default value is +*all*. + +- **db\_type**: *mnesia | sql* +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module +only. + +- **host** +Deprecated. Use *hosts* instead. + +- **hosts**: *\[Host, ...\]* +This option defines the Jabber IDs of the service. If the *hosts* option +is not specified, the only Jabber ID will be the hostname of the virtual +host with the prefix "mix.". The keyword *@HOST@* is replaced with the +real virtual host name. + +- **name**: *Name* +A name of the service in the Service Discovery. This will only be +displayed by special XMPP clients. The default value is *Channels*. + +mod\_mix\_pam +------------- + +This module implements [XEP-0405: Mediated Information eXchange (MIX): +Participant Server +Requirements](https://xmpp.org/extensions/xep-0405.html). The module is +needed if MIX compatible clients on your server are going to join MIX +channels (either on your server or on any remote servers). + +> **Note** +> +> *mod\_mix* is not required for this module to work, however, without +> *mod\_mix\_pam* the MIX functionality of your local XMPP clients will +> be impaired. + +__Available options:__ + +- **cache\_life\_time**: *timeout()* +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module +only. + +- **cache\_missed**: *true | false* +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module +only. + +- **cache\_size**: *pos\_integer() | infinity* +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module +only. + +- **db\_type**: *mnesia | sql* +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module +only. + +- **use\_cache**: *true | false* +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. + +mod\_mqtt +--------- + +This module adds [support for the MQTT](../../admin/guide/mqtt/index.md) +protocol version *3.1.1* and *5.0*. Remember to configure *mod\_mqtt* in +*modules* and *listen* sections. + +__Available options:__ + +- **access\_publish**: *{TopicFilter: AccessName}* +Access rules to restrict access to topics for publishers. By default +there are no restrictions. + +- **access\_subscribe**: *{TopicFilter: AccessName}* +Access rules to restrict access to topics for subscribers. By default +there are no restrictions. + +- **cache\_life\_time**: *timeout()* +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module +only. + +- **cache\_missed**: *true | false* +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module +only. + +- **cache\_size**: *pos\_integer() | infinity* +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module +only. + +- **db\_type**: *mnesia | sql* +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module +only. + +- **match\_retained\_limit**: *pos\_integer() | infinity* +The option limits the number of retained messages returned to a client +when it subscribes to some topic filter. The default value is *1000*. + +- **max\_queue**: *Size* +Maximum queue size for outgoing packets. The default value is *5000*. + +- **max\_topic\_aliases**: *0..65535* +The maximum number of aliases a client is able to associate with the +topics. The default value is *100*. + +- **max\_topic\_depth**: *Depth* +The maximum topic depth, i.e. the number of slashes (*/*) in the topic. +The default value is *8*. + +- **queue\_type**: *ram | file* +Same as top-level [queue_type](toplevel.md#queue_type) option, but applied to this module +only. + +- **ram\_db\_type**: *mnesia* +Same as top-level [default_ram_db](toplevel.md#default_ram_db) option, but applied to this module +only. + +- **session\_expiry**: *timeout()* +The option specifies how long to wait for an MQTT session resumption. +When *0* is set, the session gets destroyed when the underlying client +connection is closed. The default value is *5* minutes. + +- **use\_cache**: *true | false* +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. + +mod\_mqtt\_bridge +----------------- + +This module adds ability to synchronize local MQTT topics with data on +remote servers It can update topics on remote servers when local user +updates local topic, or can subscribe for changes on remote server, and +update local copy when remote data is updated. It is available since +ejabberd [23.01](../../archive/23.01/index.md). + +__Available options:__ + +- **replication\_user**: *JID* +Identifier of a user that will be assigned as owner of local changes. + +- **servers**: *{ServerUrl: {publish: \[TopicPairs, subscribe: \[TopicPairs\], authentication: \[AuthInfo\]}}\]* +Declaration of data to share, must contain *publish* or *subscribe* or +both, and *authentication* section with username/password field or +certfile pointing to client certificate. Accepted urls can use schema +mqtt, mqtts (mqtt with tls), mqtt5, mqtt5s (both to trigger v5 +protocol), ws, wss, ws5, wss5. Certificate authentication can be only +used with mqtts, mqtt5s, wss, wss5. + +__**Example**:__ + +~~~ yaml +modules: + mod_mqtt_bridge: + servers: + "mqtt://server.com": + publish: + "localA": "remoteA" # local changes to 'localA' will be replicated on remote server as 'remoteA' + "topicB": "topicB" + subscribe: + "remoteB": "localB" # changes to 'remoteB' on remote server will be stored as 'localB' on local server + authentication: + certfile: "/etc/ejabberd/mqtt_server.pem" + replication_user: "mqtt@xmpp.server.com" +~~~ + +mod\_muc +-------- + +This module provides support for [XEP-0045: Multi-User +Chat](https://xmpp.org/extensions/xep-0045.html). Users can discover +existing rooms, join or create them. Occupants of a room can chat in +public or have private chats. + +The MUC service allows any Jabber ID to register a nickname, so nobody +else can use that nickname in any room in the MUC service. To register a +nickname, open the Service Discovery in your XMPP client and register in +the MUC service. + +It is also possible to register a nickname in a room, so nobody else can +use that nickname in that room. If a nick is registered in the MUC +service, that nick cannot be registered in any room, and vice versa: a +nick that is registered in a room cannot be registered at the MUC +service. + +This module supports clustering and load balancing. One module can be +started per cluster node. Rooms are distributed at creation time on all +available MUC module instances. The multi-user chat module is clustered +but the rooms themselves are not clustered nor fault-tolerant: if the +node managing a set of rooms goes down, the rooms disappear and they +will be recreated on an available node on first connection attempt. + +__Available options:__ + +- **access**: *AccessName* +You can specify who is allowed to use the Multi-User Chat service. By +default everyone is allowed to use it. + +- **access\_admin**: *AccessName* +This option specifies who is allowed to administrate the Multi-User Chat +service. The default value is *none*, which means that only the room +creator can administer their room. The administrators can send a normal +message to the service JID, and it will be shown in all active rooms as +a service message. The administrators can send a groupchat message to +the JID of an active room, and the message will be shown in the room as +a service message. + +- **access\_create**: *AccessName* +To configure who is allowed to create new rooms at the Multi-User Chat +service, this option can be used. The default value is *all*, which +means everyone is allowed to create rooms. + +- **access\_mam**: *AccessName* +To configure who is allowed to modify the *mam* room option. The default +value is *all*, which means everyone is allowed to modify that option. + +- **access\_persistent**: *AccessName* +To configure who is allowed to modify the *persistent* room option. The +default value is *all*, which means everyone is allowed to modify that +option. + +- **access\_register**: *AccessName* + + This option specifies who +is allowed to register nickname within the Multi-User Chat service and +rooms. The default is *all* for backward compatibility, which means that +any user is allowed to register any free nick in the MUC service and in +the rooms. + +- **cleanup\_affiliations\_on\_start**: *true | false* + + Remove affiliations for +non-existing local users on startup. The default value is *false*. + +- **db\_type**: *mnesia | sql* +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module +only. + +- **default\_room\_options**: *Options* +Define the default room options. Note that the creator of a room can +modify the options of his room at any time using an XMPP client with MUC +capability. The *Options* are: + + - **allow\_change\_subj**: *true | false* + Allow occupants to change + the subject. The default value is *true*. + + - **allow\_private\_messages\_from\_visitors**: *anyone | moderators | + nobody* Visitors can send private messages to other occupants. The + default value is *anyone* which means visitors can send private + messages to any occupant. + + - **allow\_query\_users**: *true | false* + Occupants can send IQ + queries to other occupants. The default value is *true*. + + - **allow\_subscription**: *true | false* + Allow users to subscribe to + room events as described in + [Multi-User Chat Subscriptions](../../developer/xmpp-clients-bots/extensions/muc-sub.md). + The default value is *false*. + + - **allow\_user\_invites**: *true | false* + Allow occupants to send + invitations. The default value is *false*. + + - **allow\_visitor\_nickchange**: *true | false* + Allow visitors to + change nickname. The default value is *true*. + + - **allow\_visitor\_status**: *true | false* + Allow visitors to send + status text in presence updates. If disallowed, the status text is + stripped before broadcasting the presence update to all the room + occupants. The default value is *true*. + + - **allow\_voice\_requests**: *true | false* + Allow visitors in a + moderated room to request voice. The default value is *true*. + + - **allowpm**: *anyone | participants | moderators | none* + Who can + send private messages. The default value is *anyone*. + + - **anonymous**: *true | false* + The room is anonymous: occupants don’t + see the real JIDs of other occupants. Note that the room moderators + can always see the real JIDs of the occupants. The default value is + *true*. + + - **captcha\_protected**: *true | false* + When a user tries to join a + room where they have no affiliation (not owner, admin or member), + the room requires them to fill a CAPTCHA challenge (see section + [CAPTCHA](../../admin/configuration/basic.md#captcha) in order to accept their join in the + room. The default value is *false*. + + - **description**: *Room Description* + Short description of the room. + The default value is an empty string. + + - **enable\_hats**: *true | false* + Allow extended roles as defined in + XEP-0317 Hats. The default value is *false*. + + - **lang**: *Language* + Preferred language for the discussions in the + room. The language format should conform to RFC 5646. There is no + value by default. + + - **logging**: *true | false* + The public messages are logged using + [mod_muc_log](#mod_muc_log). The default value is *false*. + + - **mam**: *true | false* + Enable message archiving. Implies mod\_mam + is enabled. The default value is *false*. + + - **max\_users**: *Number* + Maximum number of occupants in the room. + The default value is *200*. + + - **members\_by\_default**: *true | false* + The occupants that enter + the room are participants by default, so they have "voice". The + default value is *true*. + + - **members\_only**: *true | false* + Only members of the room can + enter. The default value is *false*. + + - **moderated**: *true | false* + Only occupants with "voice" can send + public messages. The default value is *true*. + + - **password**: *Password* + Password of the room. Implies option + *password\_protected* set to *true*. There is no default value. + + - **password\_protected**: *true | false* + The password is required to + enter the room. The default value is *false*. + + - **persistent**: *true | false* + The room persists even if the last + participant leaves. The default value is *false*. + + - **presence\_broadcast**: *\[moderator | participant | visitor, + ...\]* List of roles for which presence is broadcasted. The list can + contain one or several of: *moderator*, *participant*, *visitor*. + The default value is shown in the example below: + + **Example**: + + ~~~ yaml + presence_broadcast: + - moderator + - participant + - visitor + ~~~ + + - **public**: *true | false* + The room is public in the list of the MUC + service, so it can be discovered. MUC admins and room participants + will see private rooms in Service Discovery if their XMPP client + supports this feature. The default value is *true*. + + - **public\_list**: *true | false* + The list of participants is public, + without requiring to enter the room. The default value is *true*. + + - **pubsub**: *PubSub Node* + XMPP URI of associated Publish/Subscribe + node. The default value is an empty string. + + - **title**: *Room Title* + A human-readable title of the room. There is + no default value + + - **vcard**: *vCard* + A custom vCard for the room. See the equivalent + mod\_muc option.The default value is an empty string. + + - **voice\_request\_min\_interval**: *Number* + Minimum interval between + voice requests, in seconds. The default value is *1800*. + +- **hibernation\_timeout**: *infinity | Seconds* +Timeout before hibernating the room process, expressed in seconds. The +default value is *infinity*. + +- **history\_size**: *Size* +A small history of the current discussion is sent to users when they +enter the room. With this option you can define the number of history +messages to keep and send to users joining the room. The value is a +non-negative integer. Setting the value to 0 disables the history +feature and, as a result, nothing is kept in memory. The default value +is 20. This value affects all rooms on the service. NOTE: modern XMPP +clients rely on Message Archives (XEP-0313), so feel free to disable the +history feature if you’re only using modern clients and have *mod\_mam* +module loaded. + +- **host** +Deprecated. Use *hosts* instead. + +- **hosts**: *\[Host, ...\]* +This option defines the Jabber IDs of the service. If the *hosts* option +is not specified, the only Jabber ID will be the hostname of the virtual +host with the prefix "conference.". The keyword *@HOST@* is replaced +with the real virtual host name. + +- **max\_captcha\_whitelist**: *Number* + + This option defines the +maximum number of characters that Captcha Whitelist can have when +configuring the room. The default value is *infinity*. + +- **max\_password**: *Number* + + This option defines the +maximum number of characters that Password can have when configuring the +room. The default value is *infinity*. + +- **max\_room\_desc**: *Number* +This option defines the maximum number of characters that Room +Description can have when configuring the room. The default value is +*infinity*. + +- **max\_room\_id**: *Number* +This option defines the maximum number of characters that Room ID can +have when creating a new room. The default value is *infinity*. + +- **max\_room\_name**: *Number* +This option defines the maximum number of characters that Room Name can +have when configuring the room. The default value is *infinity*. + +- **max\_rooms\_discoitems**: *Number* +When there are more rooms than this *Number*, only the non-empty ones +are returned in a Service Discovery query. The default value is *100*. + +- **max\_user\_conferences**: *Number* +This option defines the maximum number of rooms that any given user can +join. The default value is *100*. This option is used to prevent +possible abuses. Note that this is a soft limit: some users can +sometimes join more conferences in cluster configurations. + +- **max\_users**: *Number* +This option defines at the service level, the maximum number of users +allowed per room. It can be lowered in each room configuration but +cannot be increased in individual room configuration. The default value +is *200*. + +- **max\_users\_admin\_threshold**: *Number* +This option defines the number of service admins or room owners allowed +to enter the room when the maximum number of allowed occupants was +reached. The default limit is *5*. + +- **max\_users\_presence**: *Number* +This option defines after how many users in the room, it is considered +overcrowded. When a MUC room is considered overcrowded, presence +broadcasts are limited to reduce load, traffic and excessive presence +"storm" received by participants. The default value is *1000*. + +- **min\_message\_interval**: *Number* +This option defines the minimum interval between two messages send by an +occupant in seconds. This option is global and valid for all rooms. A +decimal value can be used. When this option is not defined, message rate +is not limited. This feature can be used to protect a MUC service from +occupant abuses and limit number of messages that will be broadcasted by +the service. A good value for this minimum message interval is 0.4 +second. If an occupant tries to send messages faster, an error is send +back explaining that the message has been discarded and describing the +reason why the message is not acceptable. + +- **min\_presence\_interval**: *Number* +This option defines the minimum of time between presence changes coming +from a given occupant in seconds. This option is global and valid for +all rooms. A decimal value can be used. When this option is not defined, +no restriction is applied. This option can be used to protect a MUC +service for occupants abuses. If an occupant tries to change its +presence more often than the specified interval, the presence is cached +by ejabberd and only the last presence is broadcasted to all occupants +in the room after expiration of the interval delay. Intermediate +presence packets are silently discarded. A good value for this option is +4 seconds. + +- **name**: *string()* +The value of the service name. This name is only visible in some clients +that support [XEP-0030: Service +Discovery](https://xmpp.org/extensions/xep-0030.html). The default is +*Chatrooms*. + +- **preload\_rooms**: *true | false* +Whether to load all persistent rooms in memory on startup. If disabled, +the room is only loaded on first participant join. The default is +*true*. It makes sense to disable room preloading when the number of +rooms is high: this will improve server startup time and memory +consumption. + +- **queue\_type**: *ram | file* +Same as top-level [queue_type](toplevel.md#queue_type) option, but applied to this module +only. + +- **ram\_db\_type**: *mnesia | sql* +Same as top-level [default_ram_db](toplevel.md#default_ram_db) option, but applied to this module +only. + +- **regexp\_room\_id**: *string()* +This option defines the regular expression that a Room ID must satisfy +to allow the room creation. The default value is the empty string. + +- **room\_shaper**: *none | ShaperName* +This option defines shaper for the MUC rooms. The default value is +*none*. + +- **user\_message\_shaper**: *none | ShaperName* +This option defines shaper for the users messages. The default value is +*none*. + +- **user\_presence\_shaper**: *none | ShaperName* +This option defines shaper for the users presences. The default value is +*none*. + +- **vcard**: *vCard* +A custom vCard of the service that will be displayed by some XMPP +clients in Service Discovery. The value of *vCard* is a YAML map +constructed from an XML representation of vCard. Since the +representation has no attributes, the mapping is straightforward. + + **Example**: + + ~~~ yaml + # This XML representation of vCard: + # + # Conferences + # + # + # Elm Street + # + # + # + # is translated to: + vcard: + fn: Conferences + adr: + - + work: true + street: Elm Street + ~~~ + +mod\_muc\_admin +--------------- + +This module provides commands to administer local MUC services and their +MUC rooms. It also provides simple WebAdmin pages to view the existing +rooms. + +This module depends on [mod_muc](#mod_muc). + +__Available options:__ + +- **subscribe\_room\_many\_max\_users**: *Number* + + How many users can be +subscribed to a room at once using the *subscribe\_room\_many* command. +The default value is *50*. + +mod\_muc\_log +------------- + +This module enables optional logging of Multi-User Chat (MUC) public +conversations to HTML. Once you enable this module, users can join a +room using a MUC capable XMPP client, and if they have enough +privileges, they can request the configuration form in which they can +set the option to enable room logging. + +Features: + +- Room details are added on top of each page: room title, JID, author, + subject and configuration. + +- The room JID in the generated HTML is a link to join the room (using + XMPP URI). + +- Subject and room configuration changes are tracked and displayed. + +- Joins, leaves, nick changes, kicks, bans and */me* are tracked and + displayed, including the reason if available. + +- Generated HTML files are XHTML 1.0 Transitional and CSS compliant. + +- Timestamps are self-referencing links. + +- Links on top for quicker navigation: Previous day, Next day, Up. + +- CSS is used for style definition, and a custom CSS file can be used. + +- URLs on messages and subjects are converted to hyperlinks. + +- Timezone used on timestamps is shown on the log files. + +- A custom link can be added on top of each page. + +The module depends on [mod_muc](#mod_muc). + +__Available options:__ + +- **access\_log**: *AccessName* +This option restricts which occupants are allowed to enable or disable +room logging. The default value is *muc\_admin*. NOTE: for this default +setting you need to have an access rule for *muc\_admin* in order to +take effect. + +- **cssfile**: *Path | URL* +With this option you can set whether the HTML files should have a custom +CSS file or if they need to use the embedded CSS. Allowed values are +either *Path* to local file or an *URL* to a remote file. By default a +predefined CSS will be embedded into the HTML page. + +- **dirname**: *room\_jid | room\_name* +Configure the name of the room directory. If set to *room\_jid*, the +room directory name will be the full room JID. Otherwise, the room +directory name will be only the room name, not including the MUC service +name. The default value is *room\_jid*. + +- **dirtype**: *subdirs | plain* +The type of the created directories can be specified with this option. +If set to *subdirs*, subdirectories are created for each year and month. +Otherwise, the names of the log files contain the full date, and there +are no subdirectories. The default value is *subdirs*. + +- **file\_format**: *html | plaintext* +Define the format of the log files: *html* stores in HTML format, +*plaintext* stores in plain text. The default value is *html*. + +- **file\_permissions**: *{mode: Mode, group: Group}* +Define the permissions that must be used when creating the log files: +the number of the mode, and the numeric id of the group that will own +the files. The default value is shown in the example below: + + **Example**: + + ~~~ yaml + file_permissions: + mode: 644 + group: 33 + ~~~ + +- **outdir**: *Path* +This option sets the full path to the directory in which the HTML files +should be stored. Make sure the ejabberd daemon user has write access on +that directory. The default value is *www/muc*. + +- **spam\_prevention**: *true | false* +If set to *true*, a special attribute is added to links that prevent +their indexation by search engines. The default value is *true*, which +mean that *nofollow* attributes will be added to user submitted links. + +- **timezone**: *local | universal* +The time zone for the logs is configurable with this option. If set to +*local*, the local time, as reported to Erlang emulator by the operating +system, will be used. Otherwise, UTC time will be used. The default +value is *local*. + +- **top\_link**: *{URL: Text}* +With this option you can customize the link on the top right corner of +each log file. The default value is shown in the example below: + + **Example**: + + ~~~ yaml + top_link: + /: Home + ~~~ + +- **url**: *URL* +A top level *URL* where a client can access logs of a particular +conference. The conference name is appended to the URL if *dirname* +option is set to *room\_name* or a conference JID is appended to the +*URL* otherwise. There is no default value. + +mod\_muc\_occupantid +-------------------- + + + + +This module implements [XEP-0421: Anonymous unique occupant identifiers +for MUCs](https://xmpp.org/extensions/xep-0421.html). + +When the module is enabled, the feature is enabled in all semi-anonymous +rooms. + +The module has no options. + +mod\_muc\_rtbl +-------------- + + + + +This module implement Real-time blocklists for MUC rooms. + +It works by observing remote pubsub node conforming with specification +described in . + +__Available options:__ + +- **rtbl\_node**: *PubsubNodeName* +Name of pubsub node that should be used to track blocked users. The +default value is *muc\_bans\_sha256*. + +- **rtbl\_server**: *Domain* +Domain of xmpp server that serves block list. The default value is +*xmppbl.org* + +mod\_multicast +-------------- + +This module implements a service for [XEP-0033: Extended Stanza +Addressing](https://xmpp.org/extensions/xep-0033.html). + +__Available options:__ + +- **access**: *Access* +The access rule to restrict who can send packets to the multicast +service. Default value: *all*. + +- **host** +Deprecated. Use *hosts* instead. + +- **hosts**: *\[Host, ...\]* +This option defines the Jabber IDs of the service. If the *hosts* option +is not specified, the only Jabber ID will be the hostname of the virtual +host with the prefix "multicast.". The keyword *@HOST@* is replaced with +the real virtual host name. The default value is *multicast.@HOST@*. + +- **limits**: *Sender: Stanza: Number* +Specify a list of custom limits which override the default ones defined +in XEP-0033. Limits are defined per sender type and stanza type, where: + + - *sender* can be: *local* or *remote*. + + - *stanza* can be: *message* or *presence*. + + - *number* can be a positive integer or *infinite*. + + **Example**: + + ~~~ yaml + # Default values: + local: + message: 100 + presence: 100 + remote: + message: 20 + presence: 20 + ~~~ + +- **name** +Service name to provide in the Info query to the Service Discovery. +Default is *"Multicast"*. + +- **vcard** +vCard element to return when queried. Default value is *undefined*. + +__**Example**:__ + +~~~ yaml +# Only admins can send packets to multicast service +access_rules: + multicast: + - allow: admin + +# If you want to allow all your users: +access_rules: + multicast: + - allow + +# This allows both admins and remote users to send packets, +# but does not allow local users +acl: + allservers: + server_glob: "*" +access_rules: + multicast: + - allow: admin + - deny: local + - allow: allservers + +modules: + mod_multicast: + host: multicast.example.org + access: multicast + limits: + local: + message: 40 + presence: infinite + remote: + message: 150 +~~~ + +mod\_offline +------------ + +This module implements [XEP-0160: Best Practices for Handling Offline +Messages](https://xmpp.org/extensions/xep-0160.html) and [XEP-0013: +Flexible Offline Message +Retrieval](https://xmpp.org/extensions/xep-0013.html). This means that +all messages sent to an offline user will be stored on the server until +that user comes online again. Thus it is very similar to how email +works. A user is considered offline if no session presence priority > +0 are currently open. + +> **Note** +> +> *ejabberdctl* has a command to delete expired messages (see chapter +> [Managing an ejabberd server](../../admin/guide/managing.md) in online +> documentation. + +__Available options:__ + +- **access\_max\_user\_messages**: *AccessName* +This option defines which access rule will be enforced to limit the +maximum number of offline messages that a user can have (quota). When a +user has too many offline messages, any new messages that they receive +are discarded, and a <resource-constraint/> error is returned to +the sender. The default value is *max\_user\_offline\_messages*. + +- **bounce\_groupchat**: *true | false* +This option is use the disable an optimization that avoids bouncing +error messages when groupchat messages could not be stored as offline. +It will reduce chat room load, without any drawback in standard use +cases. You may change default value only if you have a custom module +which uses offline hook after *mod\_offline*. This option can be useful +for both standard MUC and MucSub, but the bounce is much more likely to +happen in the context of MucSub, so it is even more important to have it +on large MucSub services. The default value is *false*, meaning the +optimization is enabled. + +- **cache\_life\_time**: *timeout()* +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module +only. + +- **cache\_size**: *pos\_integer() | infinity* +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module +only. + +- **db\_type**: *mnesia | sql* +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module +only. + +- **store\_empty\_body**: *true | false | unless\_chat\_state* +Whether or not to store messages that lack a <body/> element. The +default value is *unless\_chat\_state*, which tells ejabberd to store +messages even if they lack the <body/> element, unless they only +contain a chat state notification (as defined in [XEP-0085: Chat State +Notifications](https://xmpp.org/extensions/xep-0085.html). + +- **store\_groupchat**: *true | false* +Whether or not to store groupchat messages. The default value is +*false*. + +- **use\_cache**: *true | false* +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. + +- **use\_mam\_for\_storage**: *true | false* +This is an experimental option. Enabling this option, *mod\_offline* +uses the *mod\_mam* archive table instead of its own spool table to +retrieve the messages received when the user was offline. This allows +client developers to slowly drop XEP-0160 and rely on XEP-0313 instead. +It also further reduces the storage required when you enable MucSub. +Enabling this option has a known drawback for the moment: most of +flexible message retrieval queries don’t work (those that allow +retrieval/deletion of messages by id), but this specification is not +widely used. The default value is *false* to keep former behaviour as +default. + +__Examples:__ + +This example allows power users to have as much as 5000 offline +messages, administrators up to 2000, and all the other users up to 100: + +~~~ yaml +acl: + admin: + user: + - admin1@localhost + - admin2@example.org + poweruser: + user: + - bob@example.org + - jane@example.org + +shaper_rules: + max_user_offline_messages: + - 5000: poweruser + - 2000: admin + - 100 + +modules: + ... + mod_offline: + access_max_user_messages: max_user_offline_messages + ... +~~~ + +mod\_ping +--------- + +This module implements support for [XEP-0199: XMPP +Ping](https://xmpp.org/extensions/xep-0199.html) and periodic +keepalives. When this module is enabled ejabberd responds correctly to +ping requests, as defined by the protocol. + +__Available options:__ + +- **ping\_ack\_timeout**: *timeout()* +How long to wait before deeming that a client has not answered a given +server ping request. NOTE: when [mod_stream_mgmt](#mod_stream_mgmt) is loaded and stream +management is enabled by a client, this value is ignored, and the +`ack_timeout` applies instead. The default value is *undefined*. + +- **ping\_interval**: *timeout()* +How often to send pings to connected clients, if option *send\_pings* is +set to *true*. If a client connection does not send or receive any +stanza within this interval, a ping request is sent to the client. The +default value is *1* minute. + +- **send\_pings**: *true | false* +If this option is set to *true*, the server sends pings to connected +clients that are not active in a given interval defined in +*ping\_interval* option. This is useful to keep client connections alive +or checking availability. The default value is *false*. + +- **timeout\_action**: *none | kill* +What to do when a client does not answer to a server ping request in +less than period defined in *ping\_ack\_timeout* option: *kill* means +destroying the underlying connection, *none* means to do nothing. NOTE: +when [mod_stream_mgmt](#mod_stream_mgmt) is loaded and stream management is enabled by a +client, killing the client connection doesn’t mean killing the client +session - the session will be kept alive in order to give the client a +chance to resume it. The default value is *none*. + +__**Example**:__ + +~~~ yaml +modules: + mod_ping: + send_pings: true + ping_interval: 4 min + timeout_action: kill +~~~ + +mod\_pres\_counter +------------------ + +This module detects flood/spam in presence subscriptions traffic. If a +user sends or receives more of those stanzas in a given time interval, +the exceeding stanzas are silently dropped, and a warning is logged. + +__Available options:__ + +- **count**: *Number* +The number of subscription presence stanzas (subscribe, unsubscribe, +subscribed, unsubscribed) allowed for any direction (input or output) +per time defined in *interval* option. Please note that two users +subscribing to each other usually generate 4 stanzas, so the recommended +value is *4* or more. The default value is *5*. + +- **interval**: *timeout()* +The time interval. The default value is *1* minute. + +__**Example**:__ + +~~~ yaml +modules: + mod_pres_counter: + count: 5 + interval: 30 secs +~~~ + +mod\_privacy +------------ + +This module implements [XEP-0016: Privacy +Lists](https://xmpp.org/extensions/xep-0016.html). + +> **Note** +> +> Nowadays modern XMPP clients rely on [XEP-0191: Blocking +> Command](https://xmpp.org/extensions/xep-0191.html) which is +> implemented by *mod\_blocking* module. However, you still need +> *mod\_privacy* loaded in order for [mod_blocking](#mod_blocking) to work. + +__Available options:__ + +- **cache\_life\_time**: *timeout()* +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module +only. + +- **cache\_missed**: *true | false* +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module +only. + +- **cache\_size**: *pos\_integer() | infinity* +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module +only. + +- **db\_type**: *mnesia | sql* +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module +only. + +- **use\_cache**: *true | false* +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. + +mod\_private +------------ + +This module adds support for [XEP-0049: Private XML +Storage](https://xmpp.org/extensions/xep-0049.html). + +Using this method, XMPP entities can store private data on the server, +retrieve it whenever necessary and share it between multiple connected +clients of the same user. The data stored might be anything, as long as +it is a valid XML. One typical usage is storing a bookmark of all user’s +conferences ([XEP-0048: +Bookmarks](https://xmpp.org/extensions/xep-0048.html)). + +It also implements the bookmark conversion described in [XEP-0402: PEP +Native Bookmarks](https://xmpp.org/extensions/xep-0402.html), see the +command [bookmarks_to_pep](../../developer/ejabberd-api/admin-api.md#bookmarks_to_pep) API. + +__Available options:__ + +- **cache\_life\_time**: *timeout()* +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module +only. + +- **cache\_missed**: *true | false* +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module +only. + +- **cache\_size**: *pos\_integer() | infinity* +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module +only. + +- **db\_type**: *mnesia | sql* +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module +only. + +- **use\_cache**: *true | false* +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. + +mod\_privilege +-------------- + +This module is an implementation of [XEP-0356: Privileged +Entity](https://xmpp.org/extensions/xep-0356.html). This extension +allows components to have privileged access to other entity data (send +messages on behalf of the server or on behalf of a user, get/set user +roster, access presence information, etc.). This may be used to write +powerful external components, for example implementing an external +[PEP](https://xmpp.org/extensions/xep-0163.html) or +[MAM](https://xmpp.org/extensions/xep-0313.html) service. + +By default a component does not have any privileged access. It is worth +noting that the permissions grant access to the component to a specific +data type for all users of the virtual host on which *mod\_privilege* is +loaded. + +Make sure you have a listener configured to connect your component. +Check the section about listening ports for more information. + +> **Warning** +> +> Security issue: Privileged access gives components access to sensitive +> data, so permission should be granted carefully, only if you trust a +> component. + +> **Note** +> +> This module is complementary to [mod_delegation](#mod_delegation), but can also be +> used separately. + +__Available options:__ + +- **message**: *Options* +This option defines permissions for messages. By default no permissions +are given. The *Options* are: + + - **outgoing**: *AccessName* + The option defines an access rule for + sending outgoing messages by the component. The default value is + *none*. + +- **presence**: *Options* +This option defines permissions for presences. By default no permissions +are given. The *Options* are: + + - **managed\_entity**: *AccessName* + An access rule that gives + permissions to the component to receive server presences. The + default value is *none*. + + - **roster**: *AccessName* + An access rule that gives permissions to + the component to receive the presence of both the users and the + contacts in their roster. The default value is *none*. + +- **roster**: *Options* +This option defines roster permissions. By default no permissions are +given. The *Options* are: + + - **both**: *AccessName* + Sets read/write access to a user’s roster. + The default value is *none*. + + - **get**: *AccessName* + Sets read access to a user’s roster. The + default value is *none*. + + - **set**: *AccessName* + Sets write access to a user’s roster. The + default value is *none*. + +__**Example**:__ + +~~~ yaml +modules: + mod_privilege: + roster: + get: all + presence: + managed_entity: all + message: + outgoing: all +~~~ + +mod\_proxy65 +------------ + +This module implements [XEP-0065: SOCKS5 +Bytestreams](https://xmpp.org/extensions/xep-0065.html). It allows +ejabberd to act as a file transfer proxy between two XMPP clients. + +__Available options:__ + +- **access**: *AccessName* +Defines an access rule for file transfer initiators. The default value +is *all*. You may want to restrict access to the users of your server +only, in order to avoid abusing your proxy by the users of remote +servers. + +- **auth\_type**: *anonymous | plain* +SOCKS5 authentication type. The default value is *anonymous*. If set to +*plain*, ejabberd will use authentication backend as it would for SASL +PLAIN. + +- **host** +Deprecated. Use *hosts* instead. + +- **hostname**: *Host* +Defines a hostname offered by the proxy when establishing a session with +clients. This is useful when you run the proxy behind a NAT. The keyword +*@HOST@* is replaced with the virtual host name. The default is to use +the value of *ip* option. Examples: *proxy.mydomain.org*, +*200.150.100.50*. + +- **hosts**: *\[Host, ...\]* +This option defines the Jabber IDs of the service. If the *hosts* option +is not specified, the only Jabber ID will be the hostname of the virtual +host with the prefix "proxy.". The keyword *@HOST@* is replaced with the +real virtual host name. + +- **ip**: *IPAddress* +This option specifies which network interface to listen for. The default +value is an IP address of the service’s DNS name, or, if fails, +*127.0.0.1*. + +- **max\_connections**: *pos\_integer() | infinity* +Maximum number of active connections per file transfer initiator. The +default value is *infinity*. + +- **name**: *Name* +The value of the service name. This name is only visible in some clients +that support [XEP-0030: Service +Discovery](https://xmpp.org/extensions/xep-0030.html). The default is +"SOCKS5 Bytestreams". + +- **port**: *1..65535* +A port number to listen for incoming connections. The default value is +*7777*. + +- **ram\_db\_type**: *mnesia | redis | sql* +Same as top-level [default_ram_db](toplevel.md#default_ram_db) option, but applied to this module +only. + +- **recbuf**: *Size* +A size of the buffer for incoming packets. If you define a shaper, set +the value of this option to the size of the shaper in order to avoid +traffic spikes in file transfers. The default value is *65536* bytes. + +- **shaper**: *Shaper* +This option defines a shaper for the file transfer peers. A shaper with +the maximum bandwidth will be selected. The default is *none*, i.e. no +shaper. + +- **sndbuf**: *Size* +A size of the buffer for outgoing packets. If you define a shaper, set +the value of this option to the size of the shaper in order to avoid +traffic spikes in file transfers. The default value is *65536* bytes. + +- **vcard**: *vCard* +A custom vCard of the service that will be displayed by some XMPP +clients in Service Discovery. The value of *vCard* is a YAML map +constructed from an XML representation of vCard. Since the +representation has no attributes, the mapping is straightforward. + +__**Example**:__ + +~~~ yaml +acl: + admin: + user: admin@example.org + proxy_users: + server: example.org + +access_rules: + proxy65_access: + allow: proxy_users + +shaper_rules: + proxy65_shaper: + none: admin + proxyrate: proxy_users + +shaper: + proxyrate: 10240 + +modules: + mod_proxy65: + host: proxy1.example.org + name: "File Transfer Proxy" + ip: 200.150.100.1 + port: 7778 + max_connections: 5 + access: proxy65_access + shaper: proxy65_shaper + recbuf: 10240 + sndbuf: 10240 +~~~ + +mod\_pubsub +----------- + +This module offers a service for [XEP-0060: +Publish-Subscribe](https://xmpp.org/extensions/xep-0060.html). The +functionality in *mod\_pubsub* can be extended using plugins. The plugin +that implements PEP ([XEP-0163: Personal Eventing via +Pubsub](https://xmpp.org/extensions/xep-0163.html)) is enabled in the +default ejabberd configuration file, and it requires [mod_caps](#mod_caps). + +__Available options:__ + +- **access\_createnode**: *AccessName* +This option restricts which users are allowed to create pubsub nodes +using *acl* and *access*. By default any account in the local ejabberd +server is allowed to create pubsub nodes. The default value is: *all*. + +- **db\_type**: *mnesia | sql* +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module +only. + +- **default\_node\_config**: *List of Key:Value* +To override default node configuration, regardless of node plugin. Value +is a list of key-value definition. Node configuration still uses default +configuration defined by node plugin, and overrides any items by value +defined in this configurable list. + +- **force\_node\_config**: *List of Node and the list of its Key:Value* +Define the configuration for given nodes. The default value is: *\[\]*. + + **Example**: + + ~~~ yaml + force_node_config: + ## Avoid buggy clients to make their bookmarks public + storage:bookmarks: + access_model: whitelist + ~~~ + +- **host** +Deprecated. Use *hosts* instead. + +- **hosts**: *\[Host, ...\]* +This option defines the Jabber IDs of the service. If the *hosts* option +is not specified, the only Jabber ID will be the hostname of the virtual +host with the prefix "pubsub.". The keyword *@HOST@* is replaced with +the real virtual host name. + +- **ignore\_pep\_from\_offline**: *false | true* +To specify whether or not we should get last published PEP items from +users in our roster which are offline when we connect. Value is *true* +or *false*. If not defined, pubsub assumes true so we only get last +items of online contacts. + +- **last\_item\_cache**: *false | true* +To specify whether or not pubsub should cache last items. Value is +*true* or *false*. If not defined, pubsub does not cache last items. On +systems with not so many nodes, caching last items speeds up pubsub and +allows you to raise the user connection rate. The cost is memory usage, +as every item is stored in memory. + +- **max\_item\_expire\_node**: *timeout() | infinity* + + Specify the maximum item epiry +time. Default value is: *infinity*. + +- **max\_items\_node**: *non\_neg\_integer() | infinity* +Define the maximum number of items that can be stored in a node. Default +value is: *1000*. + +- **max\_nodes\_discoitems**: *pos\_integer() | infinity* +The maximum number of nodes to return in a discoitem response. The +default value is: *100*. + +- **max\_subscriptions\_node**: *MaxSubs* +Define the maximum number of subscriptions managed by a node. Default +value is no limitation: *undefined*. + +- **name**: *Name* +The value of the service name. This name is only visible in some clients +that support [XEP-0030: Service +Discovery](https://xmpp.org/extensions/xep-0030.html). The default is +*vCard User Search*. + +- **nodetree**: *Nodetree* +To specify which nodetree to use. If not defined, the default pubsub +nodetree is used: *tree*. Only one nodetree can be used per host, and is +shared by all node plugins. + + - *tree* nodetree store node configuration and relations on the + database. *flat* nodes are stored without any relationship, and + *hometree* nodes can have child nodes. + + - *virtual* nodetree does not store nodes on database. This saves + resources on systems with tons of nodes. If using the *virtual* + nodetree, you can only enable those node plugins: *\[flat, pep\]* or + *\[flat\]*; any other plugins configuration will not work. Also, all + nodes will have the default configuration, and this can not be + changed. Using *virtual* nodetree requires to start from a clean + database, it will not work if you used the default *tree* nodetree + before. + +- **pep\_mapping**: *List of Key:Value* +In this option you can provide a list of key-value to choose defined +node plugins on given PEP namespace. The following example will use +*node\_tune* instead of *node\_pep* for every PEP node with the tune +namespace: + + **Example**: + + ~~~ yaml + modules: + ... + mod_pubsub: + pep_mapping: + http://jabber.org/protocol/tune: tune + ... + ~~~ + +- **plugins**: *\[Plugin, ...\]* +To specify which pubsub node plugins to use. The first one in the list +is used by default. If this option is not defined, the default plugins +list is: *\[flat\]*. PubSub clients can define which plugin to use when +creating a node: add *type='plugin-name*' attribute to the *create* +stanza element. + + - *flat* plugin handles the default behaviour and follows standard + XEP-0060 implementation. + + - *pep* plugin adds extension to handle Personal Eventing Protocol + (XEP-0163) to the PubSub engine. When enabled, PEP is handled + automatically. + +- **vcard**: *vCard* +A custom vCard of the server that will be displayed by some XMPP clients +in Service Discovery. The value of *vCard* is a YAML map constructed +from an XML representation of vCard. Since the representation has no +attributes, the mapping is straightforward. + + **Example**: + + ~~~ yaml + # This XML representation of vCard: + # + # Conferences + # + # + # Elm Street + # + # + # + # is translated to: + vcard: + fn: Conferences + adr: + - + work: true + street: Elm Street + ~~~ + +__Examples:__ + +Example of configuration that uses flat nodes as default, and allows use +of flat, hometree and pep nodes: + +~~~ yaml +modules: + mod_pubsub: + access_createnode: pubsub_createnode + max_subscriptions_node: 100 + default_node_config: + notification_type: normal + notify_retract: false + max_items: 4 + plugins: + - flat + - pep +~~~ + +Using relational database requires using mod\_pubsub with db\_type +*sql*. Only flat, hometree and pep plugins supports SQL. The following +example shows previous configuration with SQL usage: + +~~~ yaml +modules: + mod_pubsub: + db_type: sql + access_createnode: pubsub_createnode + ignore_pep_from_offline: true + last_item_cache: false + plugins: + - flat + - pep +~~~ + +mod\_push +--------- + +This module implements the XMPP server’s part of the push notification +solution specified in [XEP-0357: Push +Notifications](https://xmpp.org/extensions/xep-0357.html). It does not +generate, for example, APNS or FCM notifications directly. Instead, it’s +designed to work with so-called "app servers" operated by third-party +vendors of mobile apps. Those app servers will usually trigger +notification delivery to the user’s mobile device using +platform-dependent backend services such as FCM or APNS. + +__Available options:__ + +- **cache\_life\_time**: *timeout()* +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module +only. + +- **cache\_missed**: *true | false* +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module +only. + +- **cache\_size**: *pos\_integer() | infinity* +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module +only. + +- **db\_type**: *mnesia | sql* +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module +only. + +- **include\_body**: *true | false | Text* +If this option is set to *true*, the message text is included with push +notifications generated for incoming messages with a body. The option +can instead be set to a static *Text*, in which case the specified text +will be included in place of the actual message body. This can be useful +to signal the app server whether the notification was triggered by a +message with body (as opposed to other types of traffic) without leaking +actual message contents. The default value is "New message". + +- **include\_sender**: *true | false* +If this option is set to *true*, the sender’s JID is included with push +notifications generated for incoming messages with a body. The default +value is *false*. + +- **notify\_on**: *messages | all* + + If this option is set to +*messages*, notifications are generated only for actual chat messages +with a body text (or some encrypted payload). If it’s set to *all*, any +kind of XMPP stanza will trigger a notification. If unsure, it’s +strongly recommended to stick to *all*, which is the default value. + +- **use\_cache**: *true | false* +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. + +mod\_push\_keepalive +-------------------- + +This module tries to keep the stream management session (see +[mod_stream_mgmt](#mod_stream_mgmt)) of a disconnected mobile client alive if the client +enabled push notifications for that session. However, the normal session +resumption timeout is restored once a push notification is issued, so +the session will be closed if the client doesn’t respond to push +notifications. + +The module depends on [mod_push](#mod_push). + +__Available options:__ + +- **resume\_timeout**: *timeout()* +This option specifies the period of time until the session of a +disconnected push client times out. This timeout is only in effect as +long as no push notification is issued. Once that happened, the +resumption timeout configured for [mod_stream_mgmt](#mod_stream_mgmt) is restored. The +default value is *72* hours. + +- **wake\_on\_start**: *true | false* +If this option is set to *true*, notifications are generated for **all** +registered push clients during server startup. This option should not be +enabled on servers with many push clients as it can generate significant +load on the involved push services and the server itself. The default +value is *false*. + +- **wake\_on\_timeout**: *true | false* +If this option is set to *true*, a notification is generated shortly +before the session would time out as per the *resume\_timeout* option. +The default value is *true*. + +mod\_register +------------- + +This module adds support for [XEP-0077: In-Band +Registration](https://xmpp.org/extensions/xep-0077.html). This protocol +enables end users to use an XMPP client to: + +- Register a new account on the server. + +- Change the password from an existing account on the server. + +- Delete an existing account on the server. + +This module reads also the top-level [registration_timeout](toplevel.md#registration_timeout) option +defined globally for the server, so please check that option +documentation too. + +__Available options:__ + +- **access**: *AccessName* +Specify rules to restrict what usernames can be registered. If a rule +returns *deny* on the requested username, registration of that user name +is denied. There are no restrictions by default. + +- **access\_from**: *AccessName* +By default, *ejabberd* doesn’t allow the client to register new accounts +from s2s or existing c2s sessions. You can change it by defining access +rule in this option. Use with care: allowing registration from s2s leads +to uncontrolled massive accounts creation by rogue users. + +- **access\_remove**: *AccessName* +Specify rules to restrict access for user unregistration. By default any +user is able to unregister their account. + +- **allow\_modules**: *all | \[Module, ...\]* + + List of modules that can +register accounts, or *all*. The default value is *all*, which is +equivalent to something like *\[mod\_register, mod\_register\_web\]*. + +- **captcha\_protected**: *true | false* +Protect registrations with [CAPTCHA](../../admin/configuration/basic.md#captcha). The default is +*false*. + +- **ip\_access**: *AccessName* +Define rules to allow or deny account registration depending on the IP +address of the XMPP client. The *AccessName* should be of type *ip*. The +default value is *all*. + +- **password\_strength**: *Entropy* +This option sets the minimum [Shannon +entropy](https://en.wikipedia.org/wiki/Entropy_(information_theory)) for +passwords. The value *Entropy* is a number of bits of entropy. The +recommended minimum is 32 bits. The default is *0*, i.e. no checks are +performed. + +- **redirect\_url**: *URL* +This option enables registration redirection as described in [XEP-0077: +In-Band Registration: +Redirection](https://xmpp.org/extensions/xep-0077.html#redirect). + +- **registration\_watchers**: *\[JID, ...\]* +This option defines a list of JIDs which will be notified each time a +new account is registered. + +- **welcome\_message**: *{subject: Subject, body: Body}* +Set a welcome message that is sent to each newly registered account. The +message will have subject *Subject* and text *Body*. + +mod\_register\_web +------------------ + +This module provides a web page where users can: + +- Register a new account on the server. + +- Change the password from an existing account on the server. + +- Unregister an existing account on the server. + +This module supports [CAPTCHA](../../admin/configuration/basic.md#captcha) to register a new +account. To enable this feature, configure the top-level [captcha_cmd](toplevel.md#captcha_cmd) +and top-level [captcha_url](toplevel.md#captcha_url) options. + +As an example usage, the users of the host *localhost* can visit the +page: *https://localhost:5280/register/* It is important to include the +last / character in the URL, otherwise the subpages URL will be +incorrect. + +This module is enabled in *listen* → *ejabberd\_http* → +[request_handlers](listen-options.md#request_handlers), no need to +enable in *modules*. The module depends on [mod_register](#mod_register) where all +the configuration is performed. + +The module has no options. + +__**Example**:__ + +~~~ yaml +listen: + - + port: 5280 + module: ejabberd_http + request_handlers: + /register: mod_register_web + +modules: + mod_register: {} +~~~ + +mod\_roster +----------- + +This module implements roster management as defined in [RFC6121 Section +2](https://tools.ietf.org/html/rfc6121#section-2). The module also adds +support for [XEP-0237: Roster +Versioning](https://xmpp.org/extensions/xep-0237.html). + +__Available options:__ + +- **access**: *AccessName* +This option can be configured to specify rules to restrict roster +management. If the rule returns *deny* on the requested user name, that +user cannot modify their personal roster, i.e. they cannot +add/remove/modify contacts or send presence subscriptions. The default +value is *all*, i.e. no restrictions. + +- **cache\_life\_time**: *timeout()* +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module +only. + +- **cache\_missed**: *true | false* +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module +only. + +- **cache\_size**: *pos\_integer() | infinity* +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module +only. + +- **db\_type**: *mnesia | sql* +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module +only. + +- **store\_current\_id**: *true | false* +If this option is set to *true*, the current roster version number is +stored on the database. If set to *false*, the roster version number is +calculated on the fly each time. Enabling this option reduces the load +for both ejabberd and the database. This option does not affect the +client in any way. This option is only useful if option *versioning* is +set to *true*. The default value is *false*. IMPORTANT: if you use +[mod_shared_roster](#mod_shared_roster) or [mod_shared_roster_ldap](#mod_shared_roster_ldap), you must set the +value of the option to *false*. + +- **use\_cache**: *true | false* +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. + +- **versioning**: *true | false* +Enables/disables Roster Versioning. The default value is *false*. + +__**Example**:__ + +~~~ yaml +modules: + mod_roster: + versioning: true + store_current_id: false +~~~ + +mod\_s2s\_dialback +------------------ + +The module adds support for [XEP-0220: Server +Dialback](https://xmpp.org/extensions/xep-0220.html) to provide server +identity verification based on DNS. + +> **Warning** +> +> DNS-based verification is vulnerable to [DNS cache +> poisoning](https://en.wikipedia.org/wiki/DNS_spoofing), so modern +> servers rely on verification based on PKIX certificates. Thus this +> module is only recommended for backward compatibility with servers +> running outdated software or non-TLS servers, or those with invalid +> certificates (as long as you accept the risks, e.g. you assume that +> the remote server has an invalid certificate due to poor +> administration and not because it’s compromised). + +__Available options:__ + +- **access**: *AccessName* +An access rule that can be used to restrict dialback for some servers. +The default value is *all*. + +__**Example**:__ + +~~~ yaml +modules: + mod_s2s_dialback: + access: + allow: + server: legacy.domain.tld + server: invalid-cert.example.org + deny: all +~~~ + +mod\_service\_log +----------------- + +This module forwards copies of all stanzas to remote XMPP servers or +components. Every stanza is encapsulated into <forwarded/> element +as described in [XEP-0297: Stanza +Forwarding](https://xmpp.org/extensions/xep-0297.html). + +__Available options:__ + +- **loggers**: *\[Domain, ...\]* +A list of servers or connected components to which stanzas will be +forwarded. + +__**Example**:__ + +~~~ yaml +modules: + mod_service_log: + loggers: + - xmpp-server.tld + - component.domain.tld +~~~ + +mod\_shared\_roster +------------------- + +This module enables you to create shared roster groups: groups of +accounts that can see members from (other) groups in their rosters. + +The big advantages of this feature are that end users do not need to +manually add all users to their rosters, and that they cannot +permanently delete users from the shared roster groups. A shared roster +group can have members from any XMPP server, but the presence will only +be available from and to members of the same virtual host where the +group is created. It still allows the users to have / add their own +contacts, as it does not replace the standard roster. Instead, the +shared roster contacts are merged to the relevant users at retrieval +time. The standard user rosters thus stay unmodified. + +Shared roster groups can be edited via the Web Admin, and some API +commands called *srg\_\**. Each group has a unique name and those +parameters: + +- Label: Used in the rosters where this group is displayed. + +- Description: of the group, which has no effect. + +- Members: A list of JIDs of group members, entered one per line in + the Web Admin. The special member directive *@all@* represents all + the registered users in the virtual host; which is only recommended + for a small server with just a few hundred users. The special member + directive *@online@* represents the online users in the virtual + host. With those two directives, the actual list of members in those + shared rosters is generated dynamically at retrieval time. + +- Displayed: A list of groups that will be in the rosters of this + group’s members. A group of other vhost can be identified with + *groupid@vhost*. + +This module depends on [mod_roster](#mod_roster). If not enabled, roster queries +will return 503 errors. + +__Available options:__ + +- **cache\_life\_time**: *timeout()* +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module +only. + +- **cache\_missed**: *true | false* +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module +only. + +- **cache\_size**: *pos\_integer() | infinity* +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module +only. + +- **db\_type**: *mnesia | sql* +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module +only. + +- **use\_cache**: *true | false* +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. + +__Examples:__ + +Take the case of a computer club that wants all its members seeing each +other in their rosters. To achieve this, they need to create a shared +roster group similar to this one: + +~~~ yaml +Name: club_members +Label: Club Members +Description: Members from the computer club +Members: member1@example.org, member2@example.org, member3@example.org +Displayed Groups: club_members +~~~ + +In another case we have a company which has three divisions: Management, +Marketing and Sales. All group members should see all other members in +their rosters. Additionally, all managers should have all marketing and +sales people in their roster. Simultaneously, all marketeers and the +whole sales team should see all managers. This scenario can be achieved +by creating shared roster groups as shown in the following lists: + +~~~ yaml +First list: +Name: management +Label: Management +Description: Management +Members: manager1@example.org, manager2@example.org +Displayed: management, marketing, sales + +Second list: +Name: marketing +Label: Marketing +Description: Marketing +Members: marketeer1@example.org, marketeer2@example.org, marketeer3@example.org +Displayed: management, marketing + +Third list: +Name: sales +Label: Sales +Description: Sales +Members: salesman1@example.org, salesman2@example.org, salesman3@example.org +Displayed: management, sales +~~~ + +mod\_shared\_roster\_ldap +------------------------- + +This module lets the server administrator automatically populate users' +rosters (contact lists) with entries based on users and groups defined +in an LDAP-based directory. + +> **Note** +> +> *mod\_shared\_roster\_ldap* depends on *mod\_roster* being enabled. +> Roster queries will return *503* errors if *mod\_roster* is not +> enabled. + +The module accepts many configuration options. Some of them, if +unspecified, default to the values specified for the top level of +configuration. This lets you avoid specifying, for example, the bind +password in multiple places. + +- Filters: *ldap\_rfilter*, *ldap\_ufilter*, *ldap\_gfilter*, + *ldap\_filter*. These options specify LDAP filters used to query for + shared roster information. All of them are run against the + ldap\_base. + +- Attributes: *ldap\_groupattr*, *ldap\_groupdesc*, + *ldap\_memberattr*, *ldap\_userdesc*, *ldap\_useruid*. These options + specify the names of the attributes which hold interesting data in + the entries returned by running filters specified with the filter + options. + +- Control parameters: *ldap\_auth\_check*, + *ldap\_group\_cache\_validity*, *ldap\_memberattr\_format*, + *ldap\_memberattr\_format\_re*, *ldap\_user\_cache\_validity*. These + parameters control the behaviour of the module. + +- Connection parameters: The module also accepts the connection + parameters, all of which default to the top-level parameter of the + same name, if unspecified. See + [LDAP Connection](../../admin/configuration/ldap.md#ldap-connection) section for more + information about them. + +Check also the [Configuration examples](../../admin/configuration/ldap.md#ldap-examples) section +to get details about retrieving the roster, and configuration examples +including Flat DIT and Deep DIT. + +__Available options:__ + +- **cache\_life\_time** +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module +only. + +- **cache\_missed** +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module +only. + +- **cache\_size** +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module +only. + +- **ldap\_auth\_check**: *true | false* +Whether the module should check (via the ejabberd authentication +subsystem) for existence of each user in the shared LDAP roster. Set to +*false* if you want to disable the check. Default value is *true*. + +- **ldap\_backups** +Same as top-level [ldap_backups](toplevel.md#ldap_backups) option, but applied to this module +only. + +- **ldap\_base** +Same as top-level [ldap_base](toplevel.md#ldap_base) option, but applied to this module only. + +- **ldap\_deref\_aliases** +Same as top-level [ldap_deref_aliases](toplevel.md#ldap_deref_aliases) option, but applied to this +module only. + +- **ldap\_encrypt** +Same as top-level [ldap_encrypt](toplevel.md#ldap_encrypt) option, but applied to this module +only. + +- **ldap\_filter** +Additional filter which is AND-ed together with "User Filter" and "Group +Filter". For more information check the LDAP [Filters](../../admin/configuration/ldap.md#filters) +section. + +- **ldap\_gfilter** +"Group Filter", used when retrieving human-readable name (a.k.a. +"Display Name") and the members of a group. See also the parameters +*ldap\_groupattr*, *ldap\_groupdesc* and *ldap\_memberattr*. If +unspecified, defaults to the top-level parameter of the same name. If +that one also is unspecified, then the filter is constructed exactly +like "User Filter". + +- **ldap\_groupattr** +The name of the attribute that holds the group name, and that is used to +differentiate between them. Retrieved from results of the "Roster +Filter" and "Group Filter". Defaults to *cn*. + +- **ldap\_groupdesc** +The name of the attribute which holds the human-readable group name in +the objects you use to represent groups. Retrieved from results of the +"Group Filter". Defaults to whatever *ldap\_groupattr* is set. + +- **ldap\_memberattr** +The name of the attribute which holds the IDs of the members of a group. +Retrieved from results of the "Group Filter". Defaults to *memberUid*. +The name of the attribute differs depending on the objectClass you use +for your group objects, for example: *posixGroup* → *memberUid*; +*groupOfNames* → *member*; *groupOfUniqueNames* → *uniqueMember*. + +- **ldap\_memberattr\_format** +A globbing format for extracting user ID from the value of the attribute +named by *ldap\_memberattr*. Defaults to *%u*, which means that the +whole value is the member ID. If you change it to something different, +you may also need to specify the User and Group Filters manually; see +section Filters. + +- **ldap\_memberattr\_format\_re** +A regex for extracting user ID from the value of the attribute named by +*ldap\_memberattr*. Check the LDAP +[Control Parameters](../../admin/configuration/ldap.md#control-parameters) section. + +- **ldap\_password** +Same as top-level [ldap_password](toplevel.md#ldap_password) option, but applied to this module +only. + +- **ldap\_port** +Same as top-level [ldap_port](toplevel.md#ldap_port) option, but applied to this module only. + +- **ldap\_rfilter** +So called "Roster Filter". Used to find names of all "shared roster" +groups. See also the *ldap\_groupattr* parameter. If unspecified, +defaults to the top-level parameter of the same name. You must specify +it in some place in the configuration, there is no default. + +- **ldap\_rootdn** +Same as top-level [ldap_rootdn](toplevel.md#ldap_rootdn) option, but applied to this module +only. + +- **ldap\_servers** +Same as top-level [ldap_servers](toplevel.md#ldap_servers) option, but applied to this module +only. + +- **ldap\_tls\_cacertfile** +Same as top-level [ldap_tls_cacertfile](toplevel.md#ldap_tls_cacertfile) option, but applied to this +module only. + +- **ldap\_tls\_certfile** +Same as top-level [ldap_tls_certfile](toplevel.md#ldap_tls_certfile) option, but applied to this +module only. + +- **ldap\_tls\_depth** +Same as top-level [ldap_tls_depth](toplevel.md#ldap_tls_depth) option, but applied to this module +only. + +- **ldap\_tls\_verify** +Same as top-level [ldap_tls_verify](toplevel.md#ldap_tls_verify) option, but applied to this module +only. + +- **ldap\_ufilter** +"User Filter", used for retrieving the human-readable name of roster +entries (usually full names of people in the roster). See also the +parameters *ldap\_userdesc* and *ldap\_useruid*. For more information +check the LDAP [Filters](../../admin/configuration/ldap.md#filters) section. + +- **ldap\_uids** +Same as top-level [ldap_uids](toplevel.md#ldap_uids) option, but applied to this module only. + +- **ldap\_userdesc** +The name of the attribute which holds the human-readable user name. +Retrieved from results of the "User Filter". Defaults to *cn*. + +- **ldap\_userjidattr** +The name of the attribute which is used to map user id to XMPP jid. If +not specified (and that is default value of this option), user jid will +be created from user id and this module host. + +- **ldap\_useruid** +The name of the attribute which holds the ID of a roster item. Value of +this attribute in the roster item objects needs to match the ID +retrieved from the *ldap\_memberattr* attribute of a group object. +Retrieved from results of the "User Filter". Defaults to *cn*. + +- **use\_cache** +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. + +mod\_sic +-------- + +This module adds support for [XEP-0279: Server IP +Check](https://xmpp.org/extensions/xep-0279.html). This protocol enables +a client to discover its external IP address. + +> **Warning** +> +> The protocol extension is deferred and seems like there are no clients +> supporting it, so using this module is not recommended and, +> furthermore, the module might be removed in the future. + +The module has no options. + +mod\_sip +-------- + +This module adds SIP proxy/registrar support for the corresponding +virtual host. + +> **Note** +> +> It is not enough to just load this module. You should also configure +> listeners and DNS records properly. For details see the section about +> the [ejabberd_sip](listen.md#ejabberd_sip) listen module in the +> ejabberd Documentation. + +__Available options:__ + +- **always\_record\_route**: *true | false* +Always insert "Record-Route" header into SIP messages. With this +approach it is possible to bypass NATs/firewalls a bit more easily. The +default value is *true*. + +- **flow\_timeout\_tcp**: *timeout()* +The option sets a keep-alive timer for [SIP +outbound](https://tools.ietf.org/html/rfc5626) TCP connections. The +default value is *2* minutes. + +- **flow\_timeout\_udp**: *timeout()* +The options sets a keep-alive timer for [SIP +outbound](https://tools.ietf.org/html/rfc5626) UDP connections. The +default value is *29* seconds. + +- **record\_route**: *URI* +When the option *always\_record\_route* is set to *true* or when [SIP +outbound](https://tools.ietf.org/html/rfc5626) is utilized, ejabberd +inserts "Record-Route" header field with this *URI* into a SIP message. +The default is a SIP URI constructed from the virtual host on which the +module is loaded. + +- **routes**: *\[URI, ...\]* +You can set a list of SIP URIs of routes pointing to this SIP proxy +server. The default is a list containing a single SIP URI constructed +from the virtual host on which the module is loaded. + +- **via**: *\[URI, ...\]* +A list to construct "Via" headers for inserting them into outgoing SIP +messages. This is useful if you’re running your SIP proxy in a +non-standard network topology. Every *URI* element in the list must be +in the form of "scheme://host:port", where "transport" must be *tls*, +*tcp*, or *udp*, "host" must be a domain name or an IP address and +"port" must be an internet port number. Note that all parts of the *URI* +are mandatory (e.g. you cannot omit "port" or "scheme"). + +__**Example**:__ + +~~~ yaml +modules: + mod_sip: + always_record_route: false + record_route: "sip:example.com;lr" + routes: + - "sip:example.com;lr" + - "sip:sip.example.com;lr" + flow_timeout_udp: 30 sec + flow_timeout_tcp: 1 min + via: + - tls://sip-tls.example.com:5061 + - tcp://sip-tcp.example.com:5060 + - udp://sip-udp.example.com:5060 +~~~ + +mod\_stats +---------- + +This module adds support for [XEP-0039: Statistics +Gathering](https://xmpp.org/extensions/xep-0039.html). This protocol +allows you to retrieve the following statistics from your ejabberd +server: + +- Total number of registered users on the current virtual host + (users/total). + +- Total number of registered users on all virtual hosts + (users/all-hosts/total). + +- Total number of online users on the current virtual host + (users/online). + +- Total number of online users on all virtual hosts + (users/all-hosts/online). + +> **Note** +> +> The protocol extension is deferred and seems like even a few clients +> that were supporting it are now abandoned. So using this module makes +> very little sense. + +The module has no options. + +mod\_stream\_mgmt +----------------- + +This module adds support for [XEP-0198: Stream +Management](https://xmpp.org/extensions/xep-0198.html). This protocol +allows active management of an XML stream between two XMPP entities, +including features for stanza acknowledgments and stream resumption. + +__Available options:__ + +- **ack\_timeout**: *timeout()* +A time to wait for stanza acknowledgments. Setting it to *infinity* +effectively disables the timeout. The default value is *1* minute. + +- **cache\_life\_time**: *timeout()* +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module +only. The default value is *48 hours*. + +- **cache\_size**: *pos\_integer() | infinity* +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module +only. + +- **max\_ack\_queue**: *Size* +This option specifies the maximum number of unacknowledged stanzas +queued for possible retransmission. When the limit is exceeded, the +client session is terminated. The allowed values are positive integers +and *infinity*. You should be careful when setting this value as it +should not be set too low, otherwise, you could kill sessions in a loop, +before they get the chance to finish proper session initiation. It +should definitely be set higher that the size of the offline queue (for +example at least 3 times the value of the max offline queue and never +lower than *1000*). The default value is *5000*. + +- **max\_resume\_timeout**: *timeout()* +A client may specify the period of time until a session times out if the +connection is lost. During this period of time, the client may resume +its session. This option limits the period of time a client is permitted +to request. It must be set to a timeout equal to or larger than the +default *resume\_timeout*. By default, it is set to the same value as +the *resume\_timeout* option. + +- **queue\_type**: *ram | file* +Same as top-level [queue_type](toplevel.md#queue_type) option, but applied to this module +only. + +- **resend\_on\_timeout**: *true | false | if\_offline* +If this option is set to *true*, any message stanzas that weren’t +acknowledged by the client will be resent on session timeout. This +behavior might often be desired, but could have unexpected results under +certain circumstances. For example, a message that was sent to two +resources might get resent to one of them if the other one timed out. +Therefore, the default value for this option is *false*, which tells +ejabberd to generate an error message instead. As an alternative, the +option may be set to *if\_offline*. In this case, unacknowledged +messages are resent only if no other resource is online when the session +times out. Otherwise, error messages are generated. + +- **resume\_timeout**: *timeout()* +This option configures the (default) period of time until a session +times out if the connection is lost. During this period of time, a +client may resume its session. Note that the client may request a +different timeout value, see the *max\_resume\_timeout* option. Setting +it to *0* effectively disables session resumption. The default value is +*5* minutes. + +mod\_stun\_disco +---------------- + + + + +This module allows XMPP clients to discover STUN/TURN services and to +obtain temporary credentials for using them as per [XEP-0215: External +Service Discovery](https://xmpp.org/extensions/xep-0215.html). + +__Available options:__ + +- **access**: *AccessName* +This option defines which access rule will be used to control who is +allowed to discover STUN/TURN services and to request temporary +credentials. The default value is *local*. + +- **credentials\_lifetime**: *timeout()* +The lifetime of temporary credentials offered to clients. If ejabberd’s +built-in TURN service is used, TURN relays allocated using temporary +credentials will be terminated shortly after the credentials expired. +The default value is *12 hours*. Note that restarting the ejabberd node +invalidates any temporary credentials offered before the restart unless +a *secret* is specified (see below). + +- **offer\_local\_services**: *true | false* +This option specifies whether local STUN/TURN services configured as +ejabberd listeners should be announced automatically. Note that this +will not include TLS-enabled services, which must be configured manually +using the *services* option (see below). For non-anonymous TURN +services, temporary credentials will be offered to the client. The +default value is *true*. + +- **secret**: *Text* +The secret used for generating temporary credentials. If this option +isn’t specified, a secret will be auto-generated. However, a secret must +be specified explicitly if non-anonymous TURN services running on other +ejabberd nodes and/or external TURN *services* are configured. Also note +that auto-generated secrets are lost when the node is restarted, which +invalidates any credentials offered before the restart. Therefore, it’s +recommended to explicitly specify a secret if clients cache retrieved +credentials (for later use) across service restarts. + +- **services**: *\[Service, ...\]* +The list of services offered to clients. This list can include STUN/TURN +services running on any ejabberd node and/or external services. However, +if any listed TURN service not running on the local ejabberd node +requires authentication, a *secret* must be specified explicitly, and +must be shared with that service. This will only work with ejabberd’s +built-in STUN/TURN server and with external servers that support the +same [REST API For Access To TURN +Services](https://tools.ietf.org/html/draft-uberti-behave-turn-rest-00). +Unless the *offer\_local\_services* is set to *false*, the explicitly +listed services will be offered in addition to those announced +automatically. + + - **host**: *Host* + The hostname or IP address the STUN/TURN service is + listening on. For non-TLS services, it’s recommended to specify an + IP address (to avoid additional DNS lookup latency on the client + side). For TLS services, the hostname (or IP address) should match + the certificate. Specifying the *host* option is mandatory. + + - **port**: *1..65535* + The port number the STUN/TURN service is + listening on. The default port number is 3478 for non-TLS services + and 5349 for TLS services. + + - **restricted**: *true | false* + This option determines whether + temporary credentials for accessing the service are offered. The + default is *false* for STUN/STUNS services and *true* for TURN/TURNS + services. + + - **transport**: *tcp | udp* + The transport protocol supported by the + service. The default is *udp* for non-TLS services and *tcp* for TLS + services. + + - **type**: *stun | turn | stuns | turns* + The type of service. Must be + *stun* or *turn* for non-TLS services, *stuns* or *turns* for TLS + services. The default type is *stun*. + + **Example**: + + ~~~ yaml + services: + - + host: 203.0.113.3 + port: 3478 + type: stun + transport: udp + restricted: false + - + host: 203.0.113.3 + port: 3478 + type: turn + transport: udp + restricted: true + - + host: 2001:db8::3 + port: 3478 + type: stun + transport: udp + restricted: false + - + host: 2001:db8::3 + port: 3478 + type: turn + transport: udp + restricted: true + - + host: server.example.com + port: 5349 + type: turns + transport: tcp + restricted: true + ~~~ + +mod\_time +--------- + +This module adds support for [XEP-0202: Entity +Time](https://xmpp.org/extensions/xep-0202.html). In other words, the +module reports server’s system time. + +The module has no options. + +mod\_vcard +---------- + +This module allows end users to store and retrieve their vCard, and to +retrieve other users vCards, as defined in [XEP-0054: +vcard-temp](https://xmpp.org/extensions/xep-0054.html). The module also +implements an uncomplicated Jabber User Directory based on the vCards of +these users. Moreover, it enables the server to send its vCard when +queried. + +__Available options:__ + +- **allow\_return\_all**: *true | false* +This option enables you to specify if search operations with empty input +fields should return all users who added some information to their +vCard. The default value is *false*. + +- **cache\_life\_time**: *timeout()* +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module +only. + +- **cache\_missed**: *true | false* +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module +only. + +- **cache\_size**: *pos\_integer() | infinity* +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module +only. + +- **db\_type**: *mnesia | sql | ldap* +Same as top-level [default_db](toplevel.md#default_db) option, but applied to this module +only. + +- **host** +Deprecated. Use *hosts* instead. + +- **hosts**: *\[Host, ...\]* +This option defines the Jabber IDs of the service. If the *hosts* option +is not specified, the only Jabber ID will be the hostname of the virtual +host with the prefix "vjud.". The keyword *@HOST@* is replaced with the +real virtual host name. + +- **matches**: *pos\_integer() | infinity* +With this option, the number of reported search results can be limited. +If the option’s value is set to *infinity*, all search results are +reported. The default value is *30*. + +- **name**: *Name* +The value of the service name. This name is only visible in some clients +that support [XEP-0030: Service +Discovery](https://xmpp.org/extensions/xep-0030.html). The default is +*vCard User Search*. + +- **search**: *true | false* +This option specifies whether the search functionality is enabled or +not. If disabled, the options *hosts*, *name* and *vcard* will be +ignored and the Jabber User Directory service will not appear in the +Service Discovery item list. The default value is *false*. + +- **use\_cache**: *true | false* +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. + +- **vcard**: *vCard* +A custom vCard of the server that will be displayed by some XMPP clients +in Service Discovery. The value of *vCard* is a YAML map constructed +from an XML representation of vCard. Since the representation has no +attributes, the mapping is straightforward. + + **Example**: + + ~~~ yaml + # This XML representation of vCard: + # + # + # Conferences + # + # + # Elm Street + # + # + # + # is translated to: + # + vcard: + fn: Conferences + adr: + - + work: true + street: Elm Street + ~~~ + +__Available options for *ldap* backend:__ + +- **ldap\_backups** +Same as top-level [ldap_backups](toplevel.md#ldap_backups) option, but applied to this module +only. + +- **ldap\_base** +Same as top-level [ldap_base](toplevel.md#ldap_base) option, but applied to this module only. + +- **ldap\_deref\_aliases** +Same as top-level [ldap_deref_aliases](toplevel.md#ldap_deref_aliases) option, but applied to this +module only. + +- **ldap\_encrypt** +Same as top-level [ldap_encrypt](toplevel.md#ldap_encrypt) option, but applied to this module +only. + +- **ldap\_filter** +Same as top-level [ldap_filter](toplevel.md#ldap_filter) option, but applied to this module +only. + +- **ldap\_password** +Same as top-level [ldap_password](toplevel.md#ldap_password) option, but applied to this module +only. + +- **ldap\_port** +Same as top-level [ldap_port](toplevel.md#ldap_port) option, but applied to this module only. + +- **ldap\_rootdn** +Same as top-level [ldap_rootdn](toplevel.md#ldap_rootdn) option, but applied to this module +only. + +- **ldap\_search\_fields**: *{Name: Attribute, ...}* +This option defines the search form and the LDAP attributes to search +within. *Name* is the name of a search form field which will be +automatically translated by using the translation files (see +*msgs/\*.msg* for available words). *Attribute* is the LDAP attribute or +the pattern *%u*. + + **Examples**: + + The default is: + + ~~~ yaml + User: "%u" + "Full Name": displayName + "Given Name": givenName + "Middle Name": initials + "Family Name": sn + Nickname: "%u" + Birthday: birthDay + Country: c + City: l + Email: mail + "Organization Name": o + "Organization Unit": ou + ~~~ + +- **ldap\_search\_reported**: *{SearchField: VcardField}, ...}* +This option defines which search fields should be reported. +*SearchField* is the name of a search form field which will be +automatically translated by using the translation files (see +*msgs/\*.msg* for available words). *VcardField* is the vCard field name +defined in the *ldap\_vcard\_map* option. + + **Examples**: + + The default is: + + ~~~ yaml + "Full Name": FN + "Given Name": FIRST + "Middle Name": MIDDLE + "Family Name": LAST + "Nickname": NICKNAME + "Birthday": BDAY + "Country": CTRY + "City": LOCALITY + "Email": EMAIL + "Organization Name": ORGNAME + "Organization Unit": ORGUNIT + ~~~ + +- **ldap\_servers** +Same as top-level [ldap_servers](toplevel.md#ldap_servers) option, but applied to this module +only. + +- **ldap\_tls\_cacertfile** +Same as top-level [ldap_tls_cacertfile](toplevel.md#ldap_tls_cacertfile) option, but applied to this +module only. + +- **ldap\_tls\_certfile** +Same as top-level [ldap_tls_certfile](toplevel.md#ldap_tls_certfile) option, but applied to this +module only. + +- **ldap\_tls\_depth** +Same as top-level [ldap_tls_depth](toplevel.md#ldap_tls_depth) option, but applied to this module +only. + +- **ldap\_tls\_verify** +Same as top-level [ldap_tls_verify](toplevel.md#ldap_tls_verify) option, but applied to this module +only. + +- **ldap\_uids** +Same as top-level [ldap_uids](toplevel.md#ldap_uids) option, but applied to this module only. + +- **ldap\_vcard\_map**: *{Name: {Pattern, LDAPattributes}, ...}* +With this option you can set the table that maps LDAP attributes to +vCard fields. *Name* is the type name of the vCard as defined in [RFC +2426](https://tools.ietf.org/html/rfc2426). *Pattern* is a string which +contains pattern variables *%u*, *%d* or *%s*. *LDAPattributes* is the +list containing LDAP attributes. The pattern variables *%s* will be +sequentially replaced with the values of LDAP attributes from +*List\_of\_LDAP\_attributes*, *%u* will be replaced with the user part +of a JID, and *%d* will be replaced with the domain part of a JID. + + **Examples**: + + The default is: + + ~~~ yaml + NICKNAME: {"%u": []} + FN: {"%s": [displayName]} + LAST: {"%s": [sn]} + FIRST: {"%s": [givenName]} + MIDDLE: {"%s": [initials]} + ORGNAME: {"%s": [o]} + ORGUNIT: {"%s": [ou]} + CTRY: {"%s": [c]} + LOCALITY: {"%s": [l]} + STREET: {"%s": [street]} + REGION: {"%s": [st]} + PCODE: {"%s": [postalCode]} + TITLE: {"%s": [title]} + URL: {"%s": [labeleduri]} + DESC: {"%s": [description]} + TEL: {"%s": [telephoneNumber]} + EMAIL: {"%s": [mail]} + BDAY: {"%s": [birthDay]} + ROLE: {"%s": [employeeType]} + PHOTO: {"%s": [jpegPhoto]} + ~~~ + +__Available options for *mnesia* backend:__ + +- **search\_all\_hosts**: *true | false* +Whether to perform search on all virtual hosts or not. The default value +is *true*. + +mod\_vcard\_xupdate +------------------- + +The user’s client can store an avatar in the user vCard. The vCard-Based +Avatars protocol ([XEP-0153](https://xmpp.org/extensions/xep-0153.html)) +provides a method for clients to inform the contacts what is the avatar +hash value. However, simple or small clients may not implement that +protocol. + +If this module is enabled, all the outgoing client presence stanzas get +automatically the avatar hash on behalf of the client. So, the contacts +receive the presence stanzas with the *Update Data* described in +[XEP-0153](https://xmpp.org/extensions/xep-0153.html) as if the client +would had inserted it itself. If the client had already included such +element in the presence stanza, it is replaced with the element +generated by ejabberd. + +By enabling this module, each vCard modification produces a hash +recalculation, and each presence sent by a client produces hash +retrieval and a presence stanza rewrite. For this reason, enabling this +module will introduce a computational overhead in servers with clients +that change frequently their presence. However, the overhead is +significantly reduced by the use of caching, so you probably don’t want +to set *use\_cache* to *false*. + +The module depends on [mod_vcard](#mod_vcard). + +> **Note** +> +> Nowadays [XEP-0153](https://xmpp.org/extensions/xep-0153.html) is used +> mostly as "read-only", i.e. modern clients don’t publish their avatars +> inside vCards. Thus in the majority of cases the module is only used +> along with [mod_avatar](#mod_avatar) for providing backward compatibility. + +__Available options:__ + +- **cache\_life\_time**: *timeout()* +Same as top-level [cache_life_time](toplevel.md#cache_life_time) option, but applied to this module +only. + +- **cache\_missed**: *true | false* +Same as top-level [cache_missed](toplevel.md#cache_missed) option, but applied to this module +only. + +- **cache\_size**: *pos\_integer() | infinity* +Same as top-level [cache_size](toplevel.md#cache_size) option, but applied to this module +only. + +- **use\_cache**: *true | false* +Same as top-level [use_cache](toplevel.md#use_cache) option, but applied to this module only. + +mod\_version +------------ + +This module implements [XEP-0092: Software +Version](https://xmpp.org/extensions/xep-0092.html). Consequently, it +answers ejabberd’s version when queried. + +__Available options:__ + +- **show\_os**: *true | false* +Should the operating system be revealed or not. The default value is +*true*. + diff --git a/content/archive/24.06/toplevel.md b/content/archive/24.06/toplevel.md new file mode 100644 index 00000000..8182f57b --- /dev/null +++ b/content/archive/24.06/toplevel.md @@ -0,0 +1,1785 @@ +--- +search: + exclude: true +--- + +# Top-Level Options + +> This section describes top level options of ejabberd [24.06](../../archive/24.06/index.md). If you are using an old ejabberd release, please refer to the corresponding archived version of this page in the [Archive](../../archive/index.md). The options +that changed in this version are marked with 🟤. + +## access\_rules + +*{AccessName: {allow|deny: ACLRules|ACLName}}* + +This option defines [Access Rules](../../admin/configuration/basic.md#access-rules). Each access +rule is assigned a name that can be referenced from other parts of the +configuration file (mostly from *access* options of ejabberd modules). +Each rule definition may contain arbitrary number of *allow* or *deny* +sections, and each section may contain any number of ACL rules (see +[acl](#acl) option). There are no access rules defined by default. + +**Example**: + +~~~ yaml +access_rules: + configure: + allow: admin + something: + deny: someone + allow: all + s2s_banned: + deny: problematic_hosts + deny: banned_forever + deny: + ip: 222.111.222.111/32 + deny: + ip: 111.222.111.222/32 + allow: all + xmlrpc_access: + allow: + user: peter@example.com + allow: + user: ivone@example.com + allow: + user: bot@example.com + ip: 10.0.0.0/24 +~~~ + +## acl + +*{ACLName: {ACLType: ACLValue}}* + +The option defines access control lists: named sets of rules which are +used to match against different targets (such as a JID or an IP +address). Every set of rules has name *ACLName*: it can be any string +except *all* or *none* (those are predefined names for the rules that +match all or nothing respectively). The name *ACLName* can be referenced +from other parts of the configuration file, for example in +[access_rules](#access_rules) option. The rules of *ACLName* are represented by +mapping *{ACLType: ACLValue}*. These can be one of the following: + +- **ip**: *Network* + The rule matches any IP address from the + *Network*. + +- **node\_glob**: *Pattern* + Same as *node\_regexp*, but matching is + performed on a specified *Pattern* according to the rules used by + the Unix shell. + +- **node\_regexp**: *user\_regexp@server\_regexp* + The rule matches any + JID with node part matching regular expression *user\_regexp* and + server part matching regular expression *server\_regexp*. + +- **resource**: *Resource* + The rule matches any JID with a resource + *Resource*. + +- **resource\_glob**: *Pattern* + Same as *resource\_regexp*, but + matching is performed on a specified *Pattern* according to the + rules used by the Unix shell. + +- **resource\_regexp**: *Regexp* + The rule matches any JID with a + resource that matches regular expression *Regexp*. + +- **server**: *Server* + The rule matches any JID from server *Server*. + The value of *Server* must be a valid hostname or an IP address. + +- **server\_glob**: *Pattern* + Same as *server\_regexp*, but matching + is performed on a specified *Pattern* according to the rules used by + the Unix shell. + +- **server\_regexp**: *Regexp* + The rule matches any JID from the + server that matches regular expression *Regexp*. + +- **user**: *Username* + If *Username* is in the form of "user@server", + the rule matches a JID against this value. Otherwise, if *Username* + is in the form of "user", the rule matches any JID that has + *Username* in the node part as long as the server part of this JID + is any virtual host served by ejabberd. + +- **user\_glob**: *Pattern* + Same as *user\_regexp*, but matching is + performed on a specified *Pattern* according to the rules used by + the Unix shell. + +- **user\_regexp**: *Regexp* + If *Regexp* is in the form of + "regexp@server", the rule matches any JID with node part matching + regular expression "regexp" as long as the server part of this JID + is equal to "server". If *Regexp* is in the form of "regexp", the + rule matches any JID with node part matching regular expression + "regexp" as long as the server part of this JID is any virtual host + served by ejabberd. + +## acme + +*Options* + +[ACME](../../admin/configuration/basic.md#acme) configuration, to automatically obtain SSL +certificates for the domains served by ejabberd, which means that +certificate requests and renewals are performed to some CA server (aka +"ACME server") in a fully automated mode. The *Options* are: + +- **auto**: *true | false* + Whether to automatically request + certificates for all configured domains (that yet have no a + certificate) on server start or configuration reload. The default is + *true*. + +- **ca\_url**: *URL* + The ACME directory URL used as an entry point for + the ACME server. The default value is + - the directory URL + of Let’s Encrypt authority. + +- **cert\_type**: *rsa | ec* + A type of a certificate key. Available + values are *ec* and *rsa* for EC and RSA certificates respectively. + It’s better to have RSA certificates for the purpose of backward + compatibility with legacy clients and servers, thus the default is + *rsa*. + +- **contact**: *\[Contact, ...\]* + A list of contact addresses + (typically emails) where an ACME server will send notifications when + problems occur. The value of *Contact* must be in the form of + "scheme:address" (e.g. "mailto:user@domain.tld"). The default is an + empty list which means an ACME server will send no notices. + +**Example**: + +~~~ yaml +acme: + ca_url: https://acme-v02.api.letsencrypt.org/directory + contact: + - mailto:admin@domain.tld + - mailto:bot@domain.tld + auto: true + cert_type: rsa +~~~ + +## allow\_contrib\_modules + +*true | false* + +Whether to allow installation of third-party modules or not. See +[ejabberd-contrib](../../developer/extending-ejabberd/modules.md#ejabberd-contrib) +documentation section. The default value is *true*. + +## allow\_multiple\_connections + +*true | false* + +This option is only used when the anonymous mode is enabled. Setting it +to *true* means that the same username can be taken multiple times in +anonymous login mode if different resource are used to connect. This +option is only useful in very special occasions. The default value is +*false*. + +## anonymous\_protocol + +*login\_anon | sasl\_anon | both* + +Define what anonymous protocol will be used: + +- *login\_anon* means that the anonymous login method will be used. + +- *sasl\_anon* means that the SASL Anonymous method will be used. + +- *both* means that SASL Anonymous and login anonymous are both + enabled. + +The default value is *sasl\_anon*. + +## api\_permissions + +*\[Permission, ...\]* + +Define the permissions for API access. Please consult the ejabberd Docs +web → For Developers → ejabberd ReST API → +[API Permissions](../../developer/ejabberd-api/permissions.md). + +## append\_host\_config + +*{Host: Options}* + +To define specific ejabberd modules in a virtual host, you can define +the global *modules* option with the common modules, and later add +specific modules to certain virtual hosts. To accomplish that, +*append\_host\_config* option can be used. + +## auth\_cache\_life\_time + +*timeout()* + +Same as [cache_life_time](#cache_life_time), but applied to authentication cache only. +If not set, the value from [cache_life_time](#cache_life_time) will be used. + +## auth\_cache\_missed + +*true | false* + +Same as [cache_missed](#cache_missed), but applied to authentication cache only. If +not set, the value from [cache_missed](#cache_missed) will be used. + +## auth\_cache\_size + +*pos\_integer() | infinity* + +Same as [cache_size](#cache_size), but applied to authentication cache only. If not +set, the value from [cache_size](#cache_size) will be used. + +## auth\_external\_user\_exists\_check + +*true | false* + + + +Supplement check for user +existence based on *mod\_last* data, for authentication methods that +don’t have a way to reliably tell if a user exists (like is the case for +*jwt* and certificate based authentication). This helps with processing +offline message for those users. The default value is *true*. + +## auth\_method + +*\[mnesia | sql | anonymous | external | jwt | ldap | pam, ...\]* + +A list of authentication methods to use. If several methods are defined, +authentication is considered successful as long as authentication of at +least one of the methods succeeds. The default value is *\[mnesia\]*. + +## auth\_opts + +*\[Option, ...\]* + +This is used by the contributed module *ejabberd\_auth\_http* that can +be installed from the +[ejabberd-contrib](https://github.com/processone/ejabberd-contrib) Git +repository. Please refer to that module’s README file for details. + +## auth\_password\_format + +*plain | scram* + + + +The option defines in what +format the users passwords are stored, plain text or in +[SCRAM](../../admin/configuration/authentication.md#scram) format: + +- *plain*: The password is stored as plain text in the database. This + is risky because the passwords can be read if your database gets + compromised. This is the default value. This format allows clients + to authenticate using: the old Jabber Non-SASL (XEP-0078), SASL + PLAIN, SASL DIGEST-MD5, and SASL SCRAM-SHA-1/256/512(-PLUS). + +- *scram*: The password is not stored, only some information required + to verify the hash provided by the client. It is impossible to + obtain the original plain password from the stored information; for + this reason, when this value is configured it cannot be changed to + plain anymore. This format allows clients to authenticate using: + SASL PLAIN and SASL SCRAM-SHA-1/256/512(-PLUS). The SCRAM variant + depends on the [auth_scram_hash](#auth_scram_hash) option. + +The default value is *plain*. + +## auth\_scram\_hash + +*sha | sha256 | sha512* + +Hash algorithm that should be used to store password in +[SCRAM](../../admin/configuration/authentication.md#scram) format. You shouldn’t change this if +you already have passwords generated with a different algorithm - users +that have such passwords will not be able to authenticate. The default +value is *sha*. + +## auth\_use\_cache + +*true | false* + +Same as [use_cache](#use_cache), but applied to authentication cache only. If not +set, the value from [use_cache](#use_cache) will be used. + +## c2s\_cafile + +*Path* + +Full path to a file containing one or more CA certificates in PEM +format. All client certificates should be signed by one of these root CA +certificates and should contain the corresponding JID(s) in +*subjectAltName* field. There is no default value. + +You can use [host_config](#host_config) to specify this option per-vhost. + +To set a specific file per listener, use the listener’s +[cafile](listen-options.md#cafile) option. Please notice that +*c2s\_cafile* overrides the listener’s *cafile* option. + +## c2s\_ciphers + +*\[Cipher, ...\]* + +A list of OpenSSL ciphers to use for c2s connections. The default value +is shown in the example below: + +**Example**: + +~~~ yaml +c2s_ciphers: + - HIGH + - "!aNULL" + - "!eNULL" + - "!3DES" + - "@STRENGTH" +~~~ + +## c2s\_dhfile + +*Path* + +Full path to a file containing custom DH parameters to use for c2s +connections. Such a file could be created with the command "openssl +dhparam -out dh.pem 2048". If this option is not specified, 2048-bit +MODP Group with 256-bit Prime Order Subgroup will be used as defined in +RFC5114 Section 2.3. + +## c2s\_protocol\_options + +*\[Option, ...\]* + +List of general SSL options to use for c2s connections. These map to +OpenSSL’s *set\_options()*. The default value is shown in the example +below: + +**Example**: + +~~~ yaml +c2s_protocol_options: + - no_sslv3 + - cipher_server_preference + - no_compression +~~~ + +## c2s\_tls\_compression + +*true | false* + +Whether to enable or disable TLS compression for c2s connections. The +default value is *false*. + +## ca\_file + +*Path* + +Path to a file of CA root certificates. The default is to use system +defined file if possible. + +For server connections, this *ca\_file* option is overridden by the +[s2s_cafile](#s2s_cafile) option. + +## cache\_life\_time + +*timeout()* + +The time of a cached item to keep in cache. Once it’s expired, the +corresponding item is erased from cache. The default value is *1 hour*. +Several modules have a similar option; and some core ejabberd parts +support similar options too, see [auth_cache_life_time](#auth_cache_life_time), +[oauth_cache_life_time](#oauth_cache_life_time), [router_cache_life_time](#router_cache_life_time), and +[sm_cache_life_time](#sm_cache_life_time). + +## cache\_missed + +*true | false* + +Whether or not to cache missed lookups. When there is an attempt to +lookup for a value in a database and this value is not found and the +option is set to *true*, this attempt will be cached and no attempts +will be performed until the cache expires (see [cache_life_time](#cache_life_time)). +Usually you don’t want to change it. Default is *true*. Several modules +have a similar option; and some core ejabberd parts support similar +options too, see [auth_cache_missed](#auth_cache_missed), [oauth_cache_missed](#oauth_cache_missed), +[router_cache_missed](#router_cache_missed), and [sm_cache_missed](#sm_cache_missed). + +## cache\_size + +*pos\_integer() | infinity* + +A maximum number of items (not memory!) in cache. The rule of thumb, for +all tables except rosters, you should set it to the number of maximum +online users you expect. For roster multiply this number by 20 or so. If +the cache size reaches this threshold, it’s fully cleared, i.e. all +items are deleted, and the corresponding warning is logged. You should +avoid frequent cache clearance, because this degrades performance. The +default value is *1000*. Several modules have a similar option; and some +core ejabberd parts support similar options too, see +[auth_cache_size](#auth_cache_size), [oauth_cache_size](#oauth_cache_size), [router_cache_size](#router_cache_size), and +[sm_cache_size](#sm_cache_size). + +## captcha\_cmd + +*Path | ModuleName* + + + +Full path to a script that +generates [CAPTCHA](../../admin/configuration/basic.md#captcha) images. *@VERSION@* is replaced +with ejabberd version number in *XX.YY* format. *@SEMVER@* is replaced +with ejabberd version number in semver format when compiled with +Elixir’s mix, or XX.YY format otherwise. Alternatively, it can be the +name of a module that implements ejabberd CAPTCHA support. There is no +default value: when this option is not set, CAPTCHA functionality is +completely disabled. + +**Examples**: + +When using the ejabberd installers or container image, the example +captcha scripts can be used like this: + +~~~ yaml +captcha_cmd: /opt/ejabberd-@VERSION@/lib/ejabberd-@SEMVER@/priv/bin/captcha.sh +~~~ + +## captcha\_host + +*String* + +Deprecated. Use [captcha_url](#captcha_url) instead. + +## captcha\_limit + +*pos\_integer() | infinity* + +Maximum number of [CAPTCHA](../../admin/configuration/basic.md#captcha) generated images per +minute for any given JID. The option is intended to protect the server +from CAPTCHA DoS. The default value is *infinity*. + +## captcha\_url + +*URL | auto | undefined* + + + +An URL where +[CAPTCHA](../../admin/configuration/basic.md#captcha) requests should be sent. NOTE: you need to +configure *request\_handlers* for *ejabberd\_http* listener as well. If +set to *auto*, it builds the URL using a *request\_handler* already +enabled, with encryption if available. If set to *undefined*, it builds +the URL using the deprecated [captcha_host](#captcha_host) + /captcha. The default +value is *auto*. + +## certfiles + +*\[Path, ...\]* + +The option accepts a list of file paths (optionally with wildcards) +containing either PEM certificates or PEM private keys. At startup or +configuration reload, ejabberd reads all certificates from these files, +sorts them, removes duplicates, finds matching private keys and then +rebuilds full certificate chains for the use in TLS connections. Use +this option when TLS is enabled in either of ejabberd listeners: +*ejabberd\_c2s*, *ejabberd\_http* and so on. NOTE: if you modify the +certificate files or change the value of the option, run *ejabberdctl +reload-config* in order to rebuild and reload the certificate chains. + +**Examples**: + +If you use [Let’s Encrypt](https://letsencrypt.org) certificates for +your domain "domain.tld", the configuration will look like this: + +~~~ yaml +certfiles: + - /etc/letsencrypt/live/domain.tld/fullchain.pem + - /etc/letsencrypt/live/domain.tld/privkey.pem +~~~ + +## cluster\_backend + +*Backend* + +A database backend to use for storing information about cluster. The +only available value so far is *mnesia*. + +## cluster\_nodes + +*\[Node, ...\]* + +A list of Erlang nodes to connect on ejabberd startup. This option is +mostly intended for ejabberd customization and sophisticated setups. The +default value is an empty list. + +## default\_db + +*mnesia | sql* + +Default persistent storage for ejabberd. Modules and other components +(e.g. authentication) may have its own value. The default value is +*mnesia*. + +## default\_ram\_db + +*mnesia | redis | sql* + +Default volatile (in-memory) storage for ejabberd. Modules and other +components (e.g. session management) may have its own value. The default +value is *mnesia*. + +## define\_macro + +*{MacroName: MacroValue}* + +Defines a macro. The value can be any valid arbitrary YAML value. For +convenience, it’s recommended to define a *MacroName* in capital +letters. Duplicated macros are not allowed. Macros are processed after +additional configuration files have been included, so it is possible to +use macros that are defined in configuration files included before the +usage. It is possible to use a *MacroValue* in the definition of another +macro. + +**Example**: + +~~~ yaml +define_macro: + DEBUG: debug + LOG_LEVEL: DEBUG + USERBOB: + user: bob@localhost + +loglevel: LOG_LEVEL + +acl: + admin: USERBOB +~~~ + +## disable\_sasl\_mechanisms + +*\[Mechanism, ...\]* + +Specify a list of SASL mechanisms (such as *DIGEST-MD5* or *SCRAM-SHA1*) +that should not be offered to the client. For convenience, the value of +*Mechanism* is case-insensitive. The default value is an empty list, +i.e. no mechanisms are disabled by default. + +## disable\_sasl\_scram\_downgrade\_protection + +*true | false* + +Allows to disable sending data required by *XEP-0474: SASL SCRAM +Downgrade Protection*. There are known buggy clients (like those that +use strophejs 1.6.2) which will not be able to authenticatate when +servers sends data from that specification. This options allows server +to disable it to allow even buggy clients connects, but in exchange +decrease MITM protection. The default value of this option is *false* +which enables this extension. + +## domain\_balancing + +*{Domain: Options}* + +An algorithm to load balance the components that are plugged on an +ejabberd cluster. It means that you can plug one or several instances of +the same component on each ejabberd node and that the traffic will be +automatically distributed. The algorithm to deliver messages to the +component(s) can be specified by this option. For any component +connected as *Domain*, available *Options* are: + +- **component\_number**: *2..1000* + The number of components to + balance. + +- **type**: *random | source | destination | bare\_source | + bare\_destination* How to deliver stanzas to connected components: + *random* - an instance is chosen at random; *destination* - an + instance is chosen by the full JID of the packet’s *to* attribute; + *source* - by the full JID of the packet’s *from* attribute; + *bare\_destination* - by the bare JID (without resource) of the + packet’s *to* attribute; *bare\_source* - by the bare JID (without + resource) of the packet’s *from* attribute is used. The default + value is *random*. + +**Example**: + +~~~ yaml +domain_balancing: + component.domain.tld: + type: destination + component_number: 5 + transport.example.org: + type: bare_source +~~~ + +## ext\_api\_headers + +*Headers* + +String of headers (separated with commas *,*) that will be provided by +ejabberd when sending ReST requests. The default value is an empty +string of headers: *""*. + +## ext\_api\_http\_pool\_size + +*pos\_integer()* + +Define the size of the HTTP pool, that is, the maximum number of +sessions that the ejabberd ReST service will handle simultaneously. The +default value is: *100*. + +## ext\_api\_path\_oauth + +*Path* + +Define the base URI path when performing OAUTH ReST requests. The +default value is: *"/oauth"*. + +## ext\_api\_url + +*URL* + +Define the base URI when performing ReST requests. The default value is: +*"http://localhost/api"*. + +## extauth\_pool\_name + +*Name* + +Define the pool name appendix, so the full pool name will be +*extauth\_pool\_Name*. The default value is the hostname. + +## extauth\_pool\_size + +*Size* + +The option defines the number of instances of the same external program +to start for better load balancing. The default is the number of +available CPU cores. + +## extauth\_program + +*Path* + +Indicate in this option the full path to the external authentication +script. The script must be executable by ejabberd. + +## fqdn + +*Domain* + +A fully qualified domain name that will be used in SASL DIGEST-MD5 +authentication. The default is detected automatically. + +## hide\_sensitive\_log\_data + +*true | false* + +A privacy option to not log sensitive data (mostly IP addresses). The +default value is *false* for backward compatibility. + +## host\_config + +*{Host: Options}* + +The option is used to redefine *Options* for virtual host *Host*. In the +example below LDAP authentication method will be used on virtual host +*domain.tld* and SQL method will be used on virtual host *example.org*. + +**Example**: + +~~~ yaml +hosts: + - domain.tld + - example.org + +auth_method: + - sql + +host_config: + domain.tld: + auth_method: + - ldap +~~~ + +## hosts + +*\[Domain1, Domain2, ...\]* + +The option defines a list containing one or more domains that *ejabberd* +will serve. This is a **mandatory** option. + +## include\_config\_file + +*\[Filename, ...\] | {Filename: Options}* + +Read additional configuration from *Filename*. If the value is provided +in *{Filename: Options}* format, the *Options* must be one of the +following: + +- **allow\_only**: *\[OptionName, ...\]* + Allows only the usage of + those options in the included file *Filename*. The options that do + not match this criteria are not accepted. The default value is to + include all options. + +- **disallow**: *\[OptionName, ...\]* + Disallows the usage of those + options in the included file *Filename*. The options that match this + criteria are not accepted. The default value is an empty list. + +## install\_contrib\_modules + +*\[Module, ...\]* + + + +Modules to install from +[ejabberd-contrib](../../developer/extending-ejabberd/modules.md#ejabberd-contrib) +at start time. The default value is an empty list of modules: *\[\]*. + +## jwt\_auth\_only\_rule + +*AccessName* + +This ACL rule defines accounts that can use only this auth method, even +if others are also defined in the ejabberd configuration file. In other +words: if there are several auth methods enabled for this host (JWT, +SQL, …), users that match this rule can only use JWT. The default value +is *none*. + +## jwt\_jid\_field + +*FieldName* + +By default, the JID is defined in the *"jid"* JWT field. In this option +you can specify other JWT field name where the JID is defined. + +## jwt\_key + +*FilePath* + +Path to the file that contains the JWK Key. The default value is +*undefined*. + +## language + +*Language* + +The option defines the default language of server strings that can be +seen by XMPP clients. If an XMPP client does not possess *xml:lang* +attribute, the specified language is used. The default value is *"en"*. + +## ldap\_backups + +*\[Host, ...\]* + +A list of IP addresses or DNS names of LDAP backup servers. When no +servers listed in [ldap_servers](#ldap_servers) option are reachable, ejabberd will +try to connect to these backup servers. The default is an empty list, +i.e. no backup servers specified. WARNING: ejabberd doesn’t try to +reconnect back to the main servers when they become operational again, +so the only way to restore these connections is to restart ejabberd. +This limitation might be fixed in future releases. + +## ldap\_base + +*Base* + +LDAP base directory which stores users accounts. There is no default +value: you must set the option in order for LDAP connections to work +properly. + +## ldap\_deref\_aliases + +*never | always | finding | searching* + +Whether to dereference aliases or not. The default value is *never*. + +## ldap\_dn\_filter + +*{Filter: FilterAttrs}* + +This filter is applied on the results returned by the main filter. The +filter performs an additional LDAP lookup to make the complete result. +This is useful when you are unable to define all filter rules in +*ldap\_filter*. You can define "%u", "%d", "%s" and "%D" pattern +variables in *Filter*: "%u" is replaced by a user’s part of the JID, +"%d" is replaced by the corresponding domain (virtual host), all "%s" +variables are consecutively replaced by values from the attributes in +*FilterAttrs* and "%D" is replaced by Distinguished Name from the result +set. There is no default value, which means the result is not filtered. +WARNING: Since this filter makes additional LDAP lookups, use it only as +the last resort: try to define all filter rules in [ldap_filter](#ldap_filter) +option if possible. + +**Example**: + +~~~ yaml +ldap_dn_filter: + "(&(name=%s)(owner=%D)(user=%u@%d))": [sn] +~~~ + +## ldap\_encrypt + +*tls | none* + +Whether to encrypt LDAP connection using TLS or not. The default value +is *none*. NOTE: STARTTLS encryption is not supported. + +## ldap\_filter + +*Filter* + +An LDAP filter as defined in +[RFC4515](https://tools.ietf.org/html/rfc4515). There is no default +value. Example: "(&(objectClass=shadowAccount)(memberOf=XMPP Users))". +NOTE: don’t forget to close brackets and don’t use superfluous +whitespaces. Also you must not use "uid" attribute in the filter because +this attribute will be appended to the filter automatically. + +## ldap\_password + +*Password* + +Bind password. The default value is an empty string. + +## ldap\_port + +*1..65535* + +Port to connect to your LDAP server. The default port is *389* if +encryption is disabled and *636* if encryption is enabled. + +## ldap\_rootdn + +*RootDN* + +Bind Distinguished Name. The default value is an empty string, which +means "anonymous connection". + +## ldap\_servers + +*\[Host, ...\]* + +A list of IP addresses or DNS names of your LDAP servers. The default +value is *\[localhost\]*. + +## ldap\_tls\_cacertfile + +*Path* + +A path to a file containing PEM encoded CA certificates. This option is +required when TLS verification is enabled. + +## ldap\_tls\_certfile + +*Path* + +A path to a file containing PEM encoded certificate along with PEM +encoded private key. This certificate will be provided by ejabberd when +TLS enabled for LDAP connections. There is no default value, which means +no client certificate will be sent. + +## ldap\_tls\_depth + +*Number* + +Specifies the maximum verification depth when TLS verification is +enabled, i.e. how far in a chain of certificates the verification +process can proceed before the verification is considered to be failed. +Peer certificate = 0, CA certificate = 1, higher level CA certificate = +2, etc. The value *2* thus means that a chain can at most contain peer +cert, CA cert, next CA cert, and an additional CA cert. The default +value is *1*. + +## ldap\_tls\_verify + +*false | soft | hard* + +This option specifies whether to verify LDAP server certificate or not +when TLS is enabled. When *hard* is set, ejabberd doesn’t proceed if the +certificate is invalid. When *soft* is set, ejabberd proceeds even if +the check has failed. The default is *false*, which means no checks are +performed. + +## ldap\_uids + +*\[Attr\] | {Attr: AttrFormat}* + +LDAP attributes which hold a list of attributes to use as alternatives +for getting the JID, where *Attr* is an LDAP attribute which holds the +user’s part of the JID and *AttrFormat* must contain one and only one +pattern variable "%u" which will be replaced by the user’s part of the +JID. For example, "%.org". If the value is in the form of +*\[Attr\]* then *AttrFormat* is assumed to be "%u". + +## listen + +*\[Options, ...\]* + +The option for listeners configuration. See the +[Listen Modules](listen.md) section for details. + +## log\_burst\_limit\_count + +*Number* + + + +The number of messages to +accept in `log_burst_limit_window_time` period before starting to drop +them. Default 500 + +## log\_burst\_limit\_window\_time + +*Number* + + + +The time period to rate-limit +log messages by. Defaults to 1 second. + +## log\_modules\_fully + +*\[Module, ...\]* + + + +List of modules that will log +everything independently from the general loglevel option. + +## log\_rotate\_count + +*Number* + +The number of rotated log files to keep. The default value is *1*, which +means that only keeps `ejabberd.log.0`, `error.log.0` and `crash.log.0`. + +## log\_rotate\_size + +*pos\_integer() | infinity* + +The size (in bytes) of a log file to trigger rotation. If set to +*infinity*, log rotation is disabled. The default value is *10485760* +(that is, 10 Mb). + +## loglevel + +*none | emergency | alert | critical | error | warning | notice | info | debug* + +Verbosity of log files generated by ejabberd. The default value is +*info*. NOTE: previous versions of ejabberd had log levels defined in +numeric format (*0..5*). The numeric values are still accepted for +backward compatibility, but are not recommended. + +## max\_fsm\_queue + +*Size* + +This option specifies the maximum number of elements in the queue of the +FSM (Finite State Machine). Roughly speaking, each message in such +queues represents one XML stanza queued to be sent into its relevant +outgoing stream. If queue size reaches the limit (because, for example, +the receiver of stanzas is too slow), the FSM and the corresponding +connection (if any) will be terminated and error message will be logged. +The reasonable value for this option depends on your hardware +configuration. The allowed values are positive integers. The default +value is *10000*. + +## modules + +*{Module: Options}* + +The option for modules configuration. See [Modules](modules.md) section +for details. + +## negotiation\_timeout + +*timeout()* + +Time to wait for an XMPP stream negotiation to complete. When timeout +occurs, the corresponding XMPP stream is closed. The default value is +*120* seconds. + +## net\_ticktime + +*timeout()* + +This option can be used to tune tick time parameter of *net\_kernel*. It +tells Erlang VM how often nodes should check if intra-node communication +was not interrupted. This option must have identical value on all nodes, +or it will lead to subtle bugs. Usually leaving default value of this is +option is best, tweak it only if you know what you are doing. The +default value is *1 minute*. + +## new\_sql\_schema + +*true | false* + +Whether to use *new* SQL schema. All schemas are located at +. There are two +schemas available. The default legacy schema stores one XMPP domain into +one ejabberd database. The *new* schema can handle several XMPP domains +in a single ejabberd database. Using this *new* schema is best when +serving several XMPP domains and/or changing domains from time to time. +This avoid need to manage several databases and handle complex +configuration changes. The default depends on configuration flag +*--enable-new-sql-schema* which is set at compile time. + +## oauth\_access + +*AccessName* + +By default creating OAuth tokens is not allowed. To define which users +can create OAuth tokens, you can refer to an ejabberd access rule in the +*oauth\_access* option. Use *all* to allow everyone to create tokens. + +## oauth\_cache\_life\_time + +*timeout()* + +Same as [cache_life_time](#cache_life_time), but applied to OAuth cache only. If not +set, the value from [cache_life_time](#cache_life_time) will be used. + +## oauth\_cache\_missed + +*true | false* + +Same as [cache_missed](#cache_missed), but applied to OAuth cache only. If not set, +the value from [cache_missed](#cache_missed) will be used. + +## oauth\_cache\_rest\_failure\_life\_time + +*timeout()* + + + +The time that a failure in +OAuth ReST is cached. The default value is *infinity*. + +## oauth\_cache\_size + +*pos\_integer() | infinity* + +Same as [cache_size](#cache_size), but applied to OAuth cache only. If not set, the +value from [cache_size](#cache_size) will be used. + +## oauth\_client\_id\_check + +*allow | db | deny* + +Define whether the client authentication is always allowed, denied, or +it will depend if the client ID is present in the database. The default +value is *allow*. + +## oauth\_db\_type + +*mnesia | sql* + +Database backend to use for OAuth authentication. The default value is +picked from [default_db](#default_db) option, or if it’s not set, *mnesia* will be +used. + +## oauth\_expire + +*timeout()* + +Time during which the OAuth token is valid, in seconds. After that +amount of time, the token expires and the delegated credential cannot be +used and is removed from the database. The default is *4294967* seconds. + +## oauth\_use\_cache + +*true | false* + +Same as [use_cache](#use_cache), but applied to OAuth cache only. If not set, the +value from [use_cache](#use_cache) will be used. + +## oom\_killer + +*true | false* + +Enable or disable OOM (out-of-memory) killer. When system memory raises +above the limit defined in [oom_watermark](#oom_watermark) option, ejabberd triggers +OOM killer to terminate most memory consuming Erlang processes. Note +that in order to maintain functionality, ejabberd only attempts to kill +transient processes, such as those managing client sessions, s2s or +database connections. The default value is *true*. + +## oom\_queue + +*Size* + +Trigger OOM killer when some of the running Erlang processes have +messages queue above this *Size*. Note that such processes won’t be +killed if [oom_killer](#oom_killer) option is set to *false* or if *oom\_watermark* +is not reached yet. + +## oom\_watermark + +*Percent* + +A percent of total system memory consumed at which OOM killer should be +activated with some of the processes possibly be killed (see +[oom_killer](#oom_killer) option). Later, when memory drops below this *Percent*, +OOM killer is deactivated. The default value is *80* percents. + +## outgoing\_s2s\_families + +*\[ipv6 | ipv4, ...\]* + + + +Specify which address +families to try, in what order. The default is *\[ipv6, ipv4\]* which +means it first tries connecting with IPv6, if that fails it tries using +IPv4. This option is obsolete and irrelevant when using ejabberd [23.01](../../archive/23.01/index.md) +and Erlang/OTP 22, or newer versions of them. + +## outgoing\_s2s\_ipv4\_address + +*Address* + + + +Specify the IPv4 address that +will be used when establishing an outgoing S2S IPv4 connection, for +example "127.0.0.1". The default value is *undefined*. + +## outgoing\_s2s\_ipv6\_address + +*Address* + + + +Specify the IPv6 address that +will be used when establishing an outgoing S2S IPv6 connection, for +example "::FFFF:127.0.0.1". The default value is *undefined*. + +## outgoing\_s2s\_port + +*1..65535* + +A port number to use for outgoing s2s connections when the target server +doesn’t have an SRV record. The default value is *5269*. + +## outgoing\_s2s\_timeout + +*timeout()* + +The timeout in seconds for outgoing S2S connection attempts. The default +value is *10* seconds. + +## pam\_service + +*Name* + +This option defines the PAM service name. Refer to the PAM documentation +of your operation system for more information. The default value is +*ejabberd*. + +## pam\_userinfotype + +*username | jid* + +This option defines what type of information about the user ejabberd +provides to the PAM service: only the username, or the user’s JID. +Default is *username*. + +## pgsql\_users\_number\_estimate + +*true | false* + +Whether to use PostgreSQL estimation when counting registered users. The +default value is *false*. + +## queue\_dir + +*Directory* + +If [queue_type](#queue_type) option is set to *file*, use this *Directory* to store +file queues. The default is to keep queues inside Mnesia directory. + +## queue\_type + +*ram | file* + +Default type of queues in ejabberd. Modules may have its own value of +the option. The value of *ram* means that queues will be kept in memory. +If value *file* is set, you may also specify directory in [queue_dir](#queue_dir) +option where file queues will be placed. The default value is *ram*. + +## redis\_connect\_timeout + +*timeout()* + +A timeout to wait for the connection to be re-established to the Redis +server. The default is *1 second*. + +## redis\_db + +*Number* + +Redis database number. The default is *0*. + +## redis\_password + +*Password* + +The password to the Redis server. The default is an empty string, i.e. +no password. + +## redis\_pool\_size + +*Number* + +The number of simultaneous connections to the Redis server. The default +value is *10*. + +## redis\_port + +*1..65535* + +The port where the Redis server is accepting connections. The default is +*6379*. + +## redis\_queue\_type + +*ram | file* + +The type of request queue for the Redis server. See description of +[queue_type](#queue_type) option for the explanation. The default value is the +value defined in [queue_type](#queue_type) or *ram* if the latter is not set. + +## redis\_server + +*Hostname* + +A hostname or an IP address of the Redis server. The default is +*localhost*. + +## registration\_timeout + +*timeout()* + +This is a global option for module [mod_register](modules.md#mod_register). It limits the +frequency of registrations from a given IP or username. So, a user that +tries to register a new account from the same IP address or JID during +this time after their previous registration will receive an error with +the corresponding explanation. To disable this limitation, set the value +to *infinity*. The default value is *600 seconds*. + +## resource\_conflict + +*setresource | closeold | closenew* + +NOTE: this option is deprecated and may be removed anytime in the future +versions. The possible values match exactly the three possibilities +described in [XMPP Core: section +7.7.2.2](https://tools.ietf.org/html/rfc6120#section-7.7.2.2). The +default value is *closeold*. If the client uses old Jabber Non-SASL +authentication (XEP-0078), then this option is not respected, and the +action performed is *closeold*. + +## router\_cache\_life\_time + +*timeout()* + +Same as [cache_life_time](#cache_life_time), but applied to routing table cache only. If +not set, the value from [cache_life_time](#cache_life_time) will be used. + +## router\_cache\_missed + +*true | false* + +Same as [cache_missed](#cache_missed), but applied to routing table cache only. If +not set, the value from [cache_missed](#cache_missed) will be used. + +## router\_cache\_size + +*pos\_integer() | infinity* + +Same as [cache_size](#cache_size), but applied to routing table cache only. If not +set, the value from [cache_size](#cache_size) will be used. + +## router\_db\_type + +*mnesia | redis | sql* + +Database backend to use for routing information. The default value is +picked from [default_ram_db](#default_ram_db) option, or if it’s not set, *mnesia* will +be used. + +## router\_use\_cache + +*true | false* + +Same as [use_cache](#use_cache), but applied to routing table cache only. If not +set, the value from [use_cache](#use_cache) will be used. + +## rpc\_timeout + +*timeout()* + +A timeout for remote function calls between nodes in an ejabberd +cluster. You should probably never change this value since those calls +are used for internal needs only. The default value is *5* seconds. + +## s2s\_access + +*Access* + +This [Access Rule](../../admin/configuration/basic.md#access-rules) defines to what remote +servers can s2s connections be established. The default value is *all*; +no restrictions are applied, it is allowed to connect s2s to/from all +remote servers. + +## s2s\_cafile + +*Path* + +A path to a file with CA root certificates that will be used to +authenticate s2s connections. If not set, the value of [ca_file](#ca_file) will +be used. + +You can use [host_config](#host_config) to specify this option per-vhost. + +## s2s\_ciphers + +*\[Cipher, ...\]* + +A list of OpenSSL ciphers to use for s2s connections. The default value +is shown in the example below: + +**Example**: + +~~~ yaml +s2s_ciphers: + - HIGH + - "!aNULL" + - "!eNULL" + - "!3DES" + - "@STRENGTH" +~~~ + +## s2s\_dhfile + +*Path* + +Full path to a file containing custom DH parameters to use for s2s +connections. Such a file could be created with the command "openssl +dhparam -out dh.pem 2048". If this option is not specified, 2048-bit +MODP Group with 256-bit Prime Order Subgroup will be used as defined in +RFC5114 Section 2.3. + +## s2s\_dns\_retries + +*Number* + +DNS resolving retries. The default value is *2*. + +## s2s\_dns\_timeout + +*timeout()* + +The timeout for DNS resolving. The default value is *10* seconds. + +## s2s\_max\_retry\_delay + +*timeout()* + +The maximum allowed delay for s2s connection retry to connect after a +failed connection attempt. The default value is *300* seconds (5 +minutes). + +## s2s\_protocol\_options + +*\[Option, ...\]* + +List of general SSL options to use for s2s connections. These map to +OpenSSL’s *set\_options()*. The default value is shown in the example +below: + +**Example**: + +~~~ yaml +s2s_protocol_options: + - no_sslv3 + - cipher_server_preference + - no_compression +~~~ + +## s2s\_queue\_type + +*ram | file* + +The type of a queue for s2s packets. See description of [queue_type](#queue_type) +option for the explanation. The default value is the value defined in +[queue_type](#queue_type) or *ram* if the latter is not set. + +## s2s\_timeout + +*timeout()* + +A time to wait before closing an idle s2s connection. The default value +is *1* hour. + +## s2s\_tls\_compression + +*true | false* + +Whether to enable or disable TLS compression for s2s connections. The +default value is *false*. + +## s2s\_use\_starttls + +*true | false | optional | required* + +Whether to use STARTTLS for s2s connections. The value of *false* means +STARTTLS is prohibited. The value of *true* or *optional* means STARTTLS +is enabled but plain connections are still allowed. And the value of +*required* means that only STARTTLS connections are allowed. The default +value is *false* (for historical reasons). + +## s2s\_zlib + +*true | false* + +Whether to use *zlib* compression (as defined in +[XEP-0138](https://xmpp.org/extensions/xep-0138.html)) or not. The +default value is *false*. WARNING: this type of compression is nowadays +considered insecure. + +## shaper + +*{ShaperName: Rate}* + +The option defines a set of shapers. Every shaper is assigned a name +*ShaperName* that can be used in other parts of the configuration file, +such as [shaper_rules](#shaper_rules) option. The shaper itself is defined by its +*Rate*, where *Rate* stands for the maximum allowed incoming rate in +**bytes** per second. When a connection exceeds this limit, ejabberd +stops reading from the socket until the average rate is again below the +allowed maximum. In the example below shaper *normal* limits the traffic +speed to 1,000 bytes/sec and shaper *fast* limits the traffic speed to +50,000 bytes/sec: + +**Example**: + +~~~ yaml +shaper: + normal: 1000 + fast: 50000 +~~~ + +## shaper\_rules + +*{ShaperRuleName: {Number|ShaperName: ACLRule|ACLName}}* + +An entry allowing to declaring shaper to use for matching user/hosts. +Semantics is similar to [access_rules](#access_rules) option, the only difference is +that instead using *allow* or *deny*, a name of a shaper (defined in +[shaper](#shaper) option) or a positive number should be used. + +**Example**: + +~~~ yaml +shaper_rules: + connections_limit: + 10: + user: peter@example.com + 100: admin + 5: all + download_speed: + fast: admin + slow: anonymous_users + normal: all + log_days: 30 +~~~ + +## sm\_cache\_life\_time + +*timeout()* + +Same as [cache_life_time](#cache_life_time), but applied to client sessions table cache +only. If not set, the value from [cache_life_time](#cache_life_time) will be used. + +## sm\_cache\_missed + +*true | false* + +Same as [cache_missed](#cache_missed), but applied to client sessions table cache +only. If not set, the value from [cache_missed](#cache_missed) will be used. + +## sm\_cache\_size + +*pos\_integer() | infinity* + +Same as [cache_size](#cache_size), but applied to client sessions table cache only. +If not set, the value from [cache_size](#cache_size) will be used. + +## sm\_db\_type + +*mnesia | redis | sql* + +Database backend to use for client sessions information. The default +value is picked from [default_ram_db](#default_ram_db) option, or if it’s not set, +*mnesia* will be used. + +## sm\_use\_cache + +*true | false* + +Same as [use_cache](#use_cache), but applied to client sessions table cache only. +If not set, the value from [use_cache](#use_cache) will be used. + +## sql\_connect\_timeout + +*timeout()* + +A time to wait for connection to an SQL server to be established. The +default value is *5* seconds. + +## sql\_database + +*Database* + +An SQL database name. For SQLite this must be a full path to a database +file. The default value is *ejabberd*. + +## sql\_flags + +*\[mysql\_alternative\_upsert\]* + + + +This option accepts a list of +SQL flags, and is empty by default. *mysql\_alternative\_upsert* forces +the alternative upsert implementation in MySQL. + +## sql\_keepalive\_interval + +*timeout()* + +An interval to make a dummy SQL request to keep alive the connections to +the database. There is no default value, so no keepalive requests are +made. + +## sql\_odbc\_driver + +*Path* + + + +Path to the ODBC driver to use +to connect to a Microsoft SQL Server database. This option only applies +if the [sql_type](#sql_type) option is set to *mssql* and [sql_server](#sql_server) is not +an ODBC connection string. The default value is: *libtdsodbc.so* + +## sql\_password + +*Password* + +The password for SQL authentication. The default is empty string. + +## sql\_pool\_size + +*Size* + +Number of connections to the SQL server that ejabberd will open for each +virtual host. The default value is 10. WARNING: for SQLite this value is +*1* by default and it’s not recommended to change it due to potential +race conditions. + +## sql\_port + +*1..65535* + +The port where the SQL server is accepting connections. The default is +*3306* for MySQL, *5432* for PostgreSQL and *1433* for MS SQL. The +option has no effect for SQLite. + +## sql\_prepared\_statements + +*true | false* + + + +This option is *true* by +default, and is useful to disable prepared statements. The option is +valid for PostgreSQL and MySQL. + +## sql\_query\_timeout + +*timeout()* + +A time to wait for an SQL query response. The default value is *60* +seconds. + +## sql\_queue\_type + +*ram | file* + +The type of a request queue for the SQL server. See description of +[queue_type](#queue_type) option for the explanation. The default value is the +value defined in [queue_type](#queue_type) or *ram* if the latter is not set. + +## sql\_server 🟤 + +*Host | IP Address | ODBC Connection String | Unix Socket Path* + + + +The hostname or IP address +of the SQL server. For [sql_type](#sql_type) *mssql* or *odbc* this can also be +an ODBC connection string. When [sql_type](#sql_type) is *mysql* or *pgsql*, this +can be the path to a unix domain socket expressed like: +"unix:/path/to/socket".The default value is *localhost*. + +## sql\_ssl + +*true | false* + + + +Whether to use SSL +encrypted connections to the SQL server. The option is only available +for MySQL, MS SQL and PostgreSQL. The default value is *false*. + +## sql\_ssl\_cafile + +*Path* + +A path to a file with CA root certificates that will be used to verify +SQL connections. Implies [sql_ssl](#sql_ssl) and [sql_ssl_verify](#sql_ssl_verify) options are +set to *true*. There is no default which means certificate verification +is disabled. This option has no effect for MS SQL. + +## sql\_ssl\_certfile + +*Path* + +A path to a certificate file that will be used for SSL connections to +the SQL server. Implies [sql_ssl](#sql_ssl) option is set to *true*. There is no +default which means ejabberd won’t provide a client certificate to the +SQL server. This option has no effect for MS SQL. + +## sql\_ssl\_verify + +*true | false* + +Whether to verify SSL connection to the SQL server against CA root +certificates defined in [sql_ssl_cafile](#sql_ssl_cafile) option. Implies [sql_ssl](#sql_ssl) +option is set to *true*. This option has no effect for MS SQL. The +default value is *false*. + +## sql\_start\_interval + +*timeout()* + +A time to wait before retrying to restore failed SQL connection. The +default value is *30* seconds. + +## sql\_type + +*mssql | mysql | odbc | pgsql | sqlite* + +The type of an SQL connection. The default is *odbc*. + +## sql\_username + +*Username* + +A user name for SQL authentication. The default value is *ejabberd*. + +## trusted\_proxies + +*all | \[Network1, Network2, ...\]* + +Specify what proxies are trusted when an HTTP request contains the +header *X-Forwarded-For*. You can specify *all* to allow all proxies, or +specify a list of IPs, possibly with masks. The default value is an +empty list. Using this option you can know the real IP of the request, +for admin purpose, or security configuration (for example using +*mod\_fail2ban*). IMPORTANT: The proxy MUST be configured to set the +*X-Forwarded-For* header if you enable this option as, otherwise, the +client can set it itself and as a result the IP value cannot be trusted +for security rules in ejabberd. + +## update\_sql\_schema 🟤 + +*true | false* + + + +Allow ejabberd to update SQL +schema. This option was added in ejabberd [23.10](../../archive/23.10/index.md), and enabled by default +since [24.06](../../archive/24.06/index.md). The default value is *true*. + +## use\_cache + +*true | false* + +Enable or disable cache. The default is *true*. Several modules have a +similar option; and some core ejabberd parts support similar options +too, see [auth_use_cache](#auth_use_cache), [oauth_use_cache](#oauth_use_cache), [router_use_cache](#router_use_cache), +and [sm_use_cache](#sm_use_cache). + +## validate\_stream + +*true | false* + +Whether to validate any incoming XML packet according to the schemas of +[supported XMPP +extensions](https://github.com/processone/xmpp#supported-xmpp-elements). +WARNING: the validation is only intended for the use by client +developers - don’t enable it in production environment. The default +value is *false*. + +## version + +*string()* + +The option can be used to set custom ejabberd version, that will be used +by different parts of ejabberd, for example by [mod_version](modules.md#mod_version) module. +The default value is obtained at compile time from the underlying +version control system. + +## websocket\_origin + +*ignore | URL* + +This option enables validation for *Origin* header to protect against +connections from other domains than given in the configuration file. In +this way, the lower layer load balancer can be chosen for a specific +ejabberd implementation while still providing a secure WebSocket +connection. The default value is *ignore*. An example value of the *URL* +is "https://test.example.org:8081". + +## websocket\_ping\_interval + +*timeout()* + +Defines time between pings sent by the server to a client (WebSocket +level protocol pings are used for this) to keep a connection active. If +the client doesn’t respond to two consecutive pings, the connection will +be assumed as closed. The value of *0* can be used to disable the +feature. This option makes the server sending pings only for connections +using the RFC compliant protocol. For older style connections the server +expects that whitespace pings would be used for this purpose. The +default value is *60* seconds. + +## websocket\_timeout + +*timeout()* + +Amount of time without any communication after which the connection +would be closed. The default value is *300* seconds. + diff --git a/content/archive/24.06/upgrade.md b/content/archive/24.06/upgrade.md new file mode 100644 index 00000000..f0345c73 --- /dev/null +++ b/content/archive/24.06/upgrade.md @@ -0,0 +1,34 @@ +# Upgrade to ejabberd 24.06 + +If you upgrade ejabberd from a previous release to [24.06](../../archive/24.06/index.md), +please review those changes: + +- Update commands to API v2 +- Or continue using previous API version +- WebAdmin hooks changes + +## Update commands to API v2 + +ejabberd 24.06 has changed some commands, which are tagged as +[API v2](/developer/ejabberd-api/admin-tags.md#v1). + +Check [what commands have changed](#apiv2) as announced in the ejabberd 24.06 release notes, +and update them in your API client if you use any of them. + +## Continue using previous API version + +You can update your API client to use the new API version 2... or you can continue using API version 0 or version 1 and delay API update a few weeks or months. + +To continue using API version 0: + +- if using ejabberdctl, use the switch `--version 0`. For example: `ejabberdctl --version 0 get_roster admin localhost` +- if using mod_http_api, in ejabberd configuration file add `v0` to the `request_handlers` path. For example: `/api/v0: mod_http_api` + +Check the full documentation in [ejabberd Docs: API Versioning](../../developer/ejabberd-api/api_versioning.md). + +## WebAdmin hook changes + +There are several changes in WebAdmin hooks that now provide the whole HTTP request instead of only some of its elements. + +Check [what hooks have changed](#webadmin-hooks) as announced in the ejabberd 24.06 release notes, +and update them in your custom ejabberd modules if you use any of them. diff --git a/content/archive/index.md b/content/archive/index.md index e0c704f7..bcc74075 100644 --- a/content/archive/index.md +++ b/content/archive/index.md @@ -1,25 +1,25 @@ --- title: Archived Documentation -menu: Archive -order: 99 --- This section contains archived documentation of previous ejabberd releases. Please notice that it only contains the pages that most probably change between releases. -* [23.10](/archive/23_10/) -* [23.04](/archive/23_04/) -* [23.01](/archive/23_01/) -* [22.10](/archive/22_10/) -* [22.05](/archive/22_05/) -* [21.12](/archive/21_12/) -* [21.07](/archive/21_07/) -* [21.04](/archive/21_04/) -* [21.01](/archive/21_01/) -* [20.12](/archive/20_12/) -* [20.07](/archive/20_07/) -* [20.04](/archive/20_04/) -* [20.03](/archive/20_03/) -* [20.02](/archive/20_02/) -* [20.01](/archive/20_01/) +* [24.06](24.06/index.md) +* [24.02](24.02/index.md) +* [23.10](23.10/index.md) +* [23.04](23.04/index.md) +* [23.01](23.01/index.md) +* [22.10](22.10/index.md) +* [22.05](22.05/index.md) +* [21.12](21.12/index.md) +* [21.07](21.07/index.md) +* [21.04](21.04/index.md) +* [21.01](21.01/index.md) +* [20.12](20.12/index.md) +* [20.07](20.07/index.md) +* [20.04](20.04/index.md) +* [20.03](20.03/index.md) +* [20.02](20.02/index.md) +* [20.01](20.01/index.md) diff --git a/content/admin/configuration/old.md b/content/archive/old.md old mode 100755 new mode 100644 similarity index 55% rename from content/admin/configuration/old.md rename to content/archive/old.md index 66259d70..cdf3cfca --- a/content/admin/configuration/old.md +++ b/content/archive/old.md @@ -1,18 +1,18 @@ --- -title: Configuring ejabberd (Old document) -toc: true +search: + exclude: true --- -Here are the main entry points to learn more about ejabberd -configuration. ejabberd is extremely powerful and can be configured in -many ways with many options. +# Configuring ejabberd 20.03 or older -Do not let this complexity scare you. Most of you will be fine with -default config file (or light changes). +Here are the main entry points to learn more about ejabberd configuration. +ejabberd is extremely powerful and can be configured in many ways with many options. -# Config File Formatting +Do not let this complexity scare you. Most of you will be fine with default config file (or light changes). -## Yaml Configuration File Format +## Config File Formatting + +### Yaml Configuration File Format The configuration file will be loaded the first time you start `ejabberd`. The configuration file name MUST have “.yml” or “.yaml” @@ -32,14 +32,14 @@ report syntax related errors, as well as complains about unknown options and invalid values. Make sure you respect indentation (YAML is sensitive to this) or you will get pretty cryptic errors. -## Legacy Configuration File +### Legacy Configuration File In previous `ejabberd` version the configuration file should be written in Erlang terms. The format is still supported, but it is highly recommended to convert it to the new YAML format using `convert_to_yaml` command from `ejabberdctl` (see -[ejabberdctl](/admin/guide/managing/#ejabberdctl) -and [List of ejabberd Commands](/admin/guide/managing/#list-of-ejabberd-commands) +[ejabberdctl](../admin/guide/managing.md#ejabberdctl) +and [List of ejabberd Commands](../admin/guide/managing.md#list_of_ejabberd_commands) for details). If you want to specify some options using the old Erlang format, you @@ -47,11 +47,11 @@ can set them in an additional cfg file, and include it using the `include_config_file` option, see [Include Additional Configuration Files](#include-additional-configuration-files) for the option description and a related example in -[Restrict Execution with AccessCommands](/admin/guide/managing/#restrict-execution-with-accesscommands). +[Restrict Execution with AccessCommands](../admin/guide/managing.md#restrict_execution_with_accesscommands). -# Configuring One or Several XMPP Domains +## Configuring One or Several XMPP Domains -## Host Names +### Host Names `ejabberd` supports managing several independent XMPP domains on a single ejabberd instance, using a feature called virtual hosting. @@ -66,70 +66,70 @@ The syntax is: `[HostName1, Hostname2]` Examples: -- Serving one domain: - - - hosts: [example.org] +- Serving one domain: -- Serving three domains: +``` yaml +hosts: [example.org] +``` +- Serving three domains: - hosts: - - example.net - - example.com - - jabber.somesite.org +``` yaml + hosts: + - example.net + - example.com + - jabber.somesite.org +``` -## Virtual Hosting +### Virtual Hosting -When managing several XMPP domains in a single instance, those domains -are truly independent. It means they can even have different -configuration parameters. +When managing several XMPP domains in a single instance, those domains are truly independent. +It means they can even have different configuration parameters. -Options can be defined separately for every virtual host using the -`host_config` option. +Options can be defined separately for every virtual host using the `host_config` option. The syntax is: `{HostName: [Option, ...]}` Examples: -- Domain `example.net` is using the internal authentication method - while domain `example.com` is using the LDAP server running on the - domain `localhost` to perform authentication: - - - host_config: - example.net: - auth_method: internal - example.com: - auth_method: ldap - ldap_servers: - - localhost - ldap_uids: - - uid - ldap_rootdn: "dc=localdomain" - ldap_rootdn: "dc=example,dc=com" - ldap_password: "" - -- Domain `example.net` is using SQL to perform authentication while - domain `example.com` is using the LDAP servers running on the - domains `localhost` and `otherhost`: - - - host_config: - example.net: - auth_method: sql - sql_type: odbc - sql_server: "DSN=ejabberd;UID=ejabberd;PWD=ejabberd" - example.com: - auth_method: ldap - ldap_servers: - - localhost - - otherhost - ldap_uids: - - uid - ldap_rootdn: "dc=localdomain" - ldap_rootdn: "dc=example,dc=com" - ldap_password: "" +- Domain `example.net` is using the internal authentication method + while domain `example.com` is using the LDAP server running on the + domain `localhost` to perform authentication: + +``` yaml + host_config: + example.net: + auth_method: internal + example.com: + auth_method: ldap + ldap_servers: + - localhost + ldap_uids: + - uid + ldap_rootdn: "dc=localdomain" + ldap_rootdn: "dc=example,dc=com" + ldap_password: "" +``` + +- Domain `example.net` is using SQL to perform authentication while + domain `example.com` is using the LDAP servers running on the + domains `localhost` and `otherhost`: + + host_config: + example.net: + auth_method: sql + sql_type: odbc + sql_server: "DSN=ejabberd;UID=ejabberd;PWD=ejabberd" + example.com: + auth_method: ldap + ldap_servers: + - localhost + - otherhost + ldap_uids: + - uid + ldap_rootdn: "dc=localdomain" + ldap_rootdn: "dc=example,dc=com" + ldap_password: "" To define specific ejabberd modules in a virtual host, you can define the global `modules` option with the common modules, and later add @@ -140,41 +140,42 @@ the same syntax. In this example three virtual hosts have some similar modules, but there are also other different modules for some specific virtual hosts: +``` yaml + ## This ejabberd server has three vhosts: + hosts: + - one.example.org + - two.example.org + - three.example.org + + ## Configuration of modules that are common to all vhosts + modules: + mod_roster: {} + mod_configure: {} + mod_disco: {} + mod_private: {} + mod_time: {} + mod_last: {} + mod_version: {} + + ## Add some modules to vhost one: + append_host_config: + one.example.org: + modules: + mod_muc: + host: conference.one.example.org + mod_ping: {} + + ## Add a module just to vhost two: + append_host_config: + two.example.org: + modules: + mod_muc: + host: conference.two.example.org +``` + +## Basic Configuration - ## This ejabberd server has three vhosts: - hosts: - - one.example.org - - two.example.org - - three.example.org - - ## Configuration of modules that are common to all vhosts - modules: - mod_roster: {} - mod_configure: {} - mod_disco: {} - mod_private: {} - mod_time: {} - mod_last: {} - mod_version: {} - - ## Add some modules to vhost one: - append_host_config: - one.example.org: - modules: - mod_muc: - host: conference.one.example.org - mod_ping: {} - - ## Add a module just to vhost two: - append_host_config: - two.example.org: - modules: - mod_muc: - host: conference.two.example.org - -# Basic Configuration - -## Logging +### Logging `ejabberd` configuration can help a lot by having the right amount of logging set up. @@ -207,9 +208,11 @@ Here are some examples: The values in default configuration file are: +``` yaml log_rotate_size: 0 log_rotate_date: "$D0" log_rotate_count: 1 +``` **`log_rate_limit: Number`**: This option is used for overload protection: If you want to limit the number of messages per second allowed from error_logger, which is @@ -218,29 +221,30 @@ The values in default configuration file are: For example: +``` yaml log_rate_limit: 100 +``` **`hide_sensitive_log_data: Boolean`**: We have a privacy option to ensure we do not log IP address or sensitive data. Default value is false for backward compatibility. For example: +``` yaml hide_sensitive_log_data: false +``` +### Listening Ports -## Listening Ports - -The option `listen` defines for which ports, addresses and network -protocols `ejabberd` will listen and what services will be run on them. -Each element of the list is an associative array with the following -elements: +The option `listen` defines for which ports, addresses and network protocols `ejabberd` will listen and what services will be run on them. +Each element of the list is an associative array with the following elements: -- Port number. Optionally also the IP address and/or a transport - protocol. +- Port number. Optionally also the IP address and/or a transport + protocol. -- Listening module that serves this port. +- Listening module that serves this port. -- Options for the TCP socket and for the listening module. +- Options for the TCP socket and for the listening module. The option syntax is: @@ -248,92 +252,90 @@ The option syntax is: Example: +``` yaml + listen: + - + port: 5222 + module: ejabberd_c2s + starttls: true + - + port: 5269 + module: ejabberd_s2s_in + transport: tcp +``` - listen: - - - port: 5222 - module: ejabberd_c2s - starttls: true - - - port: 5269 - module: ejabberd_s2s_in - transport: tcp - -### Port Number, IP Address and Transport Protocol +#### Port Number, IP Address and Transport Protocol The port number defines which port to listen for incoming connections. It can be a Jabber/XMPP standard port or any other valid port number. -The IP address can be represented as a string. The socket will listen -only in that network interface. It is possible to specify a generic -address ("0.0.0.0" for IPv4 or "::" for IPv6), so `ejabberd` will listen -in all addresses. Depending on the type of the IP address, IPv4 or IPv6 -will be used. When the IP address is not specified, it will listen on -all IPv4 network addresses. +The IP address can be represented as a string. The socket will listen only in that network interface. +It is possible to specify a generic address ("0.0.0.0" for IPv4 or "::" for IPv6), so `ejabberd` will listen in all addresses. +Depending on the type of the IP address, IPv4 or IPv6 will be used. +When the IP address is not specified, it will listen on all IPv4 network addresses. -Note that on some operating systems and/or OS configurations, listening -on "::" will mean listening for IPv4 traffic as well as IPv6 traffic. +Note that on some operating systems and/or OS configurations, listening on "::" will mean listening for IPv4 traffic as well as IPv6 traffic. Some example values for IP address: -- `"0.0.0.0"` to listen in all IPv4 network interfaces. This is the - default value when no IP is specified. +- `"0.0.0.0"` to listen in all IPv4 network interfaces. This is the + default value when no IP is specified. -- `"::"` to listen in all IPv6 network interfaces +- `"::"` to listen in all IPv6 network interfaces -- `"10.11.12.13"` is the IPv4 address `10.11.12.13` +- `"10.11.12.13"` is the IPv4 address `10.11.12.13` -- `"::FFFF:127.0.0.1"` is the IPv6 address `::FFFF:127.0.0.1/128` +- `"::FFFF:127.0.0.1"` is the IPv6 address `::FFFF:127.0.0.1/128` The transport protocol can be `tcp` or `udp`. Default is `tcp`. -### Listening Module +#### Listening Module The available modules, their purpose and the options allowed by each one are: **`ejabberd_c2s`**: Handles c2s connections. Options: `access`, `ciphers`, `dhfile`, `protocol_options`, - `max_fsm_queue`, `max_stanza_size`, `shaper`, - `starttls`, `starttls_required`, `tls`, `zlib`, - `tls_compression` + `max_fsm_queue`, `max_stanza_size`, `shaper`, + `starttls`, `starttls_required`, `tls`, `zlib`, + `tls_compression` **`ejabberd_s2s_in`**: Handles incoming s2s connections. Options: `max_stanza_size`, `shaper`, `tls_compression` **`ejabberd_service`**: Interacts with an - [`external component`](https://ejabberd.im/tutorials-transports) - (as defined in the Jabber Component Protocol - ([`XEP-0114`](https://xmpp.org/extensions/xep-0114.html)). - Options: `access`, `hosts`, `max_fsm_queue`, `password`, `check_from`, - `shaper_rule` + [`external component`](https://ejabberd.im/tutorials-transports) + (as defined in the Jabber Component Protocol + ([`XEP-0114`](https://xmpp.org/extensions/xep-0114.html)). + Options: `access`, `hosts`, `max_fsm_queue`, `password`, `check_from`, + `shaper_rule` **`ejabberd_sip`**: Handles SIP requests as defined in - [`RFC 3261`](https://tools.ietf.org/html/rfc3261). - Options: `certfile`, `tls` + [`RFC 3261`](https://tools.ietf.org/html/rfc3261). + Options: `certfile`, `tls` **`ejabberd_stun`**: Handles STUN/TURN requests as defined in - [`RFC 5389`](https://tools.ietf.org/html/rfc5389) and - [`RFC 5766`](https://tools.ietf.org/html/rfc5766). - Options: `certfile`, `tls`, `use_turn`, `turn_ip`, - `turn_port_range`, `turn_max_allocations`, `turn_max_permissions`, - `shaper`, `server_name`, `auth_realm`, `auth_type` + [`RFC 5389`](https://tools.ietf.org/html/rfc5389) and + [`RFC 5766`](https://tools.ietf.org/html/rfc5766). + Options: `certfile`, `tls`, `use_turn`, `turn_ip`, + `turn_port_range`, `turn_max_allocations`, `turn_max_permissions`, + `shaper`, `server_name`, `auth_realm`, `auth_type` **`ejabberd_http`**: Handles incoming HTTP connections. This module is responsible for serving Web Admin, but also XMPP BOSH and Websocket with proper request handler configured. - Options: `default_host`, `dhfile`, - `request_handlers`, `tls`, `tls_compression`, - `trusted_proxies` (global option) + Options: `default_host`, `dhfile`, + `request_handlers`, `tls`, `tls_compression`, + `trusted_proxies` (global option) **`ejabberd_xmlrpc`**: Handles XML-RPC requests to execute - [ejabberd commands](/admin/guide/managing/#ejabberd-commands). - Options: `access_commands`, `maxsessions`, `timeout`. - For explanations about `access_commands` see - [Restrict Execution with AccessCommands](/admin/guide/managing/#restrict-execution-with-accesscommands). - Check some [XML-RPC examples](/developer/ejabberd-api/oauth/#xml-rpc-examples). - You can find more information in the old - [`ejabberd_xmlrpc documentation`](https://ejabberd.im/ejabberd_xmlrpc). + [ejabberd commands](../admin/guide/managing.md#ejabberd_commands). + Options: `access_commands`, `maxsessions`, `timeout`. + For explanations about `access_commands` see + [Restrict Execution with AccessCommands](../admin/guide/managing.md#restrict_execution_with_accesscommands). + Check some [XML-RPC examples](../developer/ejabberd-api/oauth.md#xml_rpc_examples). + You can find more information in the old + [`ejabberd_xmlrpc documentation`](https://ejabberd.im/ejabberd_xmlrpc). -### Options +#### Options This is a detailed description of each option allowed by the listening modules: @@ -341,126 +343,121 @@ modules: **`access: AccessName`**: This option defines access to the port. The default value is `all`. **`backlog: Value`**: The backlog value defines the maximum length that the queue of - pending connections may grow to. This should be increased if the - server is going to handle lots of new incoming connections as they - may be dropped if there is no space in the queue (and ejabberd was - not able to accept them immediately). Default value is 5. + pending connections may grow to. This should be increased if the + server is going to handle lots of new incoming connections as they + may be dropped if there is no space in the queue (and ejabberd was + not able to accept them immediately). Default value is 5. **`ciphers: Ciphers`**: OpenSSL ciphers list in the same format accepted by - ‘`openssl ciphers`’ command. + ‘`openssl ciphers`’ command. **`protocol_options: ProtocolOpts`**: List of general options relating to SSL/TLS. These map to - [`OpenSSL’s set_options()`](https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_options.html). - The default entry is: `"no_sslv3|cipher_server_preference|no_compression"` + `OpenSSL’s set_options()`. + The default entry is: `"no_sslv3|cipher_server_preference|no_compression"` **`default_host: undefined|HostName`**: If the HTTP request received by ejabberd contains the HTTP header - `Host` with an ambiguous virtual host that doesn’t match any one - defined in ejabberd (see [Host Names](#host-names)), then this configured HostName - is set as the request Host. The default value of this option is: - `undefined`. + `Host` with an ambiguous virtual host that doesn’t match any one + defined in ejabberd (see [Host Names](#host-names)), then this configured HostName + is set as the request Host. The default value of this option is: + `undefined`. **`dhfile: Path`**: Full path to a file containing custom parameters for Diffie-Hellman key - exchange. Such a file could be created with the command - `openssl dhparam -out dh.pem 2048`. If this option is not specified, - default parameters will be used, which might not provide the same level - of security as using custom parameters. + exchange. Such a file could be created with the command + `openssl dhparam -out dh.pem 2048`. If this option is not specified, + default parameters will be used, which might not provide the same level + of security as using custom parameters. **`hosts: {Hostname: [HostOption, ...]}`**: The external Jabber component that connects to this - `ejabberd_service` can serve one or more hostnames. As `HostOption` - you can define options for the component; currently the only allowed - option is the password required to the component when attempt to - connect to ejabberd: `password: Secret`. Note that you - cannot define in a single `ejabberd_service` components of different - services: add an `ejabberd_service` for each service, as seen in an - example below. This option may not be necessary if the component - already provides the host in its packets; in that case, you can simply - provide the password option that will be used for all the hosts - (see port 5236 definition in the example below). - -Remember that you must also install and enable the module `mod\_bosh`, -and the `ejabberd_c2s` listener must be available too. - -If HTTP Bind (BOSH) is enabled, it will be available at -`http://server:port/bosh/`. Be aware that support for HTTP Bind -is also needed in the XMPP client. Remark also that HTTP Bind can be -interesting to host a web-based XMPP client such as -[`JWChat`](http://jwchat.sourceforge.net/) (check the tutorials to -install JWChat with ejabberd and an -[`embedded local web server`](https://ejabberd.im/jwchat-localserver) -or [`Apache`](https://ejabberd.im/jwchat-apache)). + `ejabberd_service` can serve one or more hostnames. As `HostOption` + you can define options for the component; currently the only allowed + option is the password required to the component when attempt to + connect to ejabberd: `password: Secret`. Note that you + cannot define in a single `ejabberd_service` components of different + services: add an `ejabberd_service` for each service, as seen in an + example below. This option may not be necessary if the component + already provides the host in its packets; in that case, you can simply + provide the password option that will be used for all the hosts + (see port 5236 definition in the example below). + +Remember that you must also install and enable the module `mod\_bosh`, and the `ejabberd_c2s` listener must be available too. + +If HTTP Bind (BOSH) is enabled, it will be available at `http://server:port/bosh/`. +Be aware that support for HTTP Bind is also needed in the XMPP client. +Remark also that HTTP Bind can be interesting to host a web-based XMPP client such as [`JWChat`](https://jwchat.org) (check the tutorials to install JWChat with ejabberd and an [`embedded local web server`](https://ejabberd.im/jwchat-localserver) or [`Apache`](https://ejabberd.im/jwchat-apache)). **`max_fsm_queue: Size`**: This option specifies the maximum number of elements in the queue of - the FSM (Finite State Machine). Roughly speaking, each message in - such queues represents one XML stanza queued to be sent into its - relevant outgoing stream. If queue size reaches the limit (because, - for example, the receiver of stanzas is too slow), the FSM and the - corresponding connection (if any) will be terminated and error - message will be logged. The reasonable value for this option depends - on your hardware configuration. This option can be specified for - `ejabberd_service` and `ejabberd_c2s` listeners, or also globally - for `ejabberd_s2s_out`. If the option is not specified for - `ejabberd_service` or `ejabberd_c2s` listeners, the globally - configured value is used. The allowed values are integers and - ’undefined’. Default value: ’10000’. + the FSM (Finite State Machine). Roughly speaking, each message in + such queues represents one XML stanza queued to be sent into its + relevant outgoing stream. If queue size reaches the limit (because, + for example, the receiver of stanzas is too slow), the FSM and the + corresponding connection (if any) will be terminated and error + message will be logged. The reasonable value for this option depends + on your hardware configuration. This option can be specified for + `ejabberd_service` and `ejabberd_c2s` listeners, or also globally + for `ejabberd_s2s_out`. If the option is not specified for + `ejabberd_service` or `ejabberd_c2s` listeners, the globally + configured value is used. The allowed values are integers and + ’undefined’. Default value: ’10000’. **`max_stanza_size: Size`**: This option specifies an approximate maximum size in bytes of XML - stanzas. Approximate, because it is calculated with the precision of - one block of read data. For example `{max_stanza_size, 65536}`. The - default value is `infinity`. Recommended values are 65536 for c2s - connections and 131072 for s2s connections. s2s max stanza size must - always much higher than c2s limit. Change this value with extreme - care as it can cause unwanted disconnect if set too low. + stanzas. Approximate, because it is calculated with the precision of + one block of read data. For example `{max_stanza_size, 65536}`. The + default value is `infinity`. Recommended values are 65536 for c2s + connections and 131072 for s2s connections. s2s max stanza size must + always much higher than c2s limit. Change this value with extreme + care as it can cause unwanted disconnect if set too low. **`password: Secret`**: Specify the password to verify an external component that connects to the port. **`request_handlers: {Path: Module}`**: To define one or several handlers that will serve HTTP requests. The - Path is a string; so the URIs that start with that Path will be - served by Module. For example, if you want `mod_foo` to serve the - URIs that start with `/a/b/`, and you also want `mod_bosh` to - serve the URIs `/bosh/`, use this option: - - request_handlers: - /a/b: mod_foo - /bosh: mod_bosh - /mqtt: mod_mqtt + Path is a string; so the URIs that start with that Path will be + served by Module. For example, if you want `mod_foo` to serve the + URIs that start with `/a/b/`, and you also want `mod_bosh` to + serve the URIs `/bosh/`, use this option: + ``` yaml + request_handlers: + /a/b: mod_foo + /bosh: mod_bosh + /mqtt: mod_mqtt + ``` **`check_from: true|false`**: This option can be used with `ejabberd_service` only. - [`XEP-0114`](https://xmpp.org/extensions/xep-0114.html) requires that - the domain must match the hostname of the component. If this option - is set to `false`, `ejabberd` will allow the component to send - stanzas with any arbitrary domain in the ’from’ attribute. Only use - this option if you are completely sure about it. The default value - is `true`, to be compliant with - [`XEP-0114`](https://xmpp.org/extensions/xep-0114.html). + [`XEP-0114`](https://xmpp.org/extensions/xep-0114.html) requires that + the domain must match the hostname of the component. If this option + is set to `false`, `ejabberd` will allow the component to send + stanzas with any arbitrary domain in the ’from’ attribute. Only use + this option if you are completely sure about it. The default value + is `true`, to be compliant with + [`XEP-0114`](https://xmpp.org/extensions/xep-0114.html). **`shaper: none|ShaperName`**: This option defines a shaper for the port (see section [Shapers](#shapers)). - The default value is `none`. + The default value is `none`. **`shaper_rule: none|ShaperRule`**: This option defines a shaper rule for the `ejabberd_service` (see - section [Shapers](#shapers)). The recommended value is `fast`. + section [Shapers](#shapers)). The recommended value is `fast`. **`starttls: true|false`**: This option specifies that STARTTLS encryption is available on - connections to the port. You should also set the `certfiles` option or configure [ACME](#acme). + connections to the port. You should also set the `certfiles` option or configure [ACME](#acme). **`starttls_required: true|false`**: This option specifies that STARTTLS encryption is required on - connections to the port. No unencrypted connections will be allowed. - You should also set the `certfiles` option or configure [ACME](#acme). + connections to the port. No unencrypted connections will be allowed. + You should also set the `certfiles` option or configure [ACME](#acme). **`timeout: Integer`**: Timeout of the connections, expressed in milliseconds. Default: 5000 **`tls: true|false`**: This option specifies that traffic on the port will be encrypted - using SSL immediately after connecting. This was the traditional - encryption method in the early Jabber software, commonly on port - 5223 for client-to-server communications. But this method is - nowadays deprecated and not recommended. The preferable encryption - method is STARTTLS on port 5222, as defined - [`RFC 6120: XMPP Core`](https://xmpp.org/rfcs/rfc6120.html#tls), - which can be enabled in `ejabberd` with the option `starttls`. If - this option is set, you should also set the `certfiles` option or configure [ACME](#acme). - The option `tls` can also be used in `ejabberd_http` to support HTTPS. + using SSL immediately after connecting. This was the traditional + encryption method in the early Jabber software, commonly on port + 5223 for client-to-server communications. But this method is + nowadays deprecated and not recommended. The preferable encryption + method is STARTTLS on port 5222, as defined + [`RFC 6120: XMPP Core`](https://xmpp.org/rfcs/rfc6120.html#tls), + which can be enabled in `ejabberd` with the option `starttls`. If + this option is set, you should also set the `certfiles` option or configure [ACME](#acme). + The option `tls` can also be used in `ejabberd_http` to support HTTPS. **`tls_compression: true|false`**: Whether to enable or disable TLS compression. The default value is - `false`. + `false`. **`use_proxy_protocol: true|false`**: Is this listener accessed by proxy service that is using proxy protocol for supplying real IP addresses to ejabberd server. You can read about this protocol @@ -468,13 +465,12 @@ or [`Apache`](https://ejabberd.im/jwchat-apache)). The default value of this option is`false`. **`zlib: true|false`**: This option specifies that Zlib stream compression (as defined in - [`XEP-0138`](https://xmpp.org/extensions/xep-0138.html)) is available - on connections to the port. + [`XEP-0138`](https://xmpp.org/extensions/xep-0138.html)) is available + on connections to the port. -### Global Options +#### Global Options -There are some additional global options that can be specified in the -ejabberd configuration file (outside `listen`): +There are some additional global options that can be specified in the ejabberd configuration file (outside `listen`): **`acme`**: Automated SSL certificate management. See section [ACME](#acme). @@ -500,355 +496,344 @@ ejabberd configuration file (outside `listen`): parameters will be used, which might not provide the same level of security as using custom parameters. -**`c2s_protocol_options: ProtocolOpts`**: List of general options - relating to SSL/TLS. These map to [`OpenSSL’s - set_options()`](https://www.openssl.org/docs/man1.0.1/ssl/SSL_CTX_set_options.html). - The default entry is: - `"no_sslv3|cipher_server_preference|no_compression"` +**`c2s_protocol_options: ProtocolOpts`**: List of general options relating to SSL/TLS. These map to `OpenSSL’s set_options()`. + The default entry is: `"no_sslv3|cipher_server_preference|no_compression"` **`c2s_tls_compression: true|false`**: Whether to enable or disable TLS compression for c2s connections. The default value is `false`. **`s2s_use_starttls: false|optional|required|required_trusted`**: This option defines if s2s connections don’t use STARTTLS - encryption; if STARTTLS can be used optionally; if STARTTLS is - required to establish the connection; or if STARTTLS is required and - the remote certificate must be valid and trusted. Do note that - `required_trusted` is deprecated and will be unsupported in future - releases. Instead, set it to `required` and make sure `mod_s2s_dialback` - is *NOT* loaded. The default value is to not use STARTTLS: `false`. + encryption; if STARTTLS can be used optionally; if STARTTLS is + required to establish the connection; or if STARTTLS is required and + the remote certificate must be valid and trusted. Do note that + `required_trusted` is deprecated and will be unsupported in future + releases. Instead, set it to `required` and make sure `mod_s2s_dialback` + is *NOT* loaded. The default value is to not use STARTTLS: `false`. **`s2s_dhfile: Path`**: Full path to a file containing custom DH parameters. Such a file could be - created with the command `openssl dhparam -out dh.pem 2048`. If this - option is not specified, default parameters will be used, which might - not provide the same level of security as using custom parameters. + created with the command `openssl dhparam -out dh.pem 2048`. If this + option is not specified, default parameters will be used, which might + not provide the same level of security as using custom parameters. **`s2s_ciphers: Ciphers`**: OpenSSL ciphers list in the same format accepted by - ‘`openssl ciphers`’ command. + ‘`openssl ciphers`’ command. **`s2s_protocol_options: ProtocolOpts`**: List of general options relating to SSL/TLS. These map to - [`OpenSSL’s set_options()`](https://www.openssl.org/docs/man1.0.1/ssl/SSL_CTX_set_options.html). - The default entry is: `"no_sslv3|cipher_server_preference|no_compression"` + `OpenSSL’s set_options()`. + The default entry is: `"no_sslv3|cipher_server_preference|no_compression"` **`outgoing_s2s_families: [Family, ...]`**: Specify which address families to try, in what order. By default it - first tries connecting with IPv4, if that fails it tries using IPv6. + first tries connecting with IPv4, if that fails it tries using IPv6. **`outgoing_s2s_timeout: Timeout`**: The timeout in seconds for outgoing S2S connection attempts. **`s2s_access: Access`**: The policy for incoming and outgoing s2s connections to other XMPP - servers. The default value is `all`. You can disable connections to other servers (federation) - here by setting it to `none`, but this will not block other locally hosted servers as, for performance - reasons, they are connected internally and not via the s2s module. To block even those you might - need to use an additional module, for example [`mod_isolation`](https://github.com/processone/ejabberd-contrib/tree/master/mod_isolation). + servers. The default value is `all`. You can disable connections to other servers (federation) + here by setting it to `none`, but this will not block other locally hosted servers as, for performance + reasons, they are connected internally and not via the s2s module. To block even those you might + need to use an additional module, for example [`mod_isolation`](https://github.com/processone/ejabberd-contrib/tree/master/mod_isolation). **`s2s_dns_timeout: Timeout`**: The timeout in seconds for DNS resolving. The default value is `10`. **`s2s_dns_retries: Number`**: DNS resolving retries in seconds. The default value is `2`. **`s2s_max_retry_delay: Seconds`**: The maximum allowed delay for retry to connect after a failed - connection attempt. Specified in seconds. The default value is 300 - seconds (5 minutes). + connection attempt. Specified in seconds. The default value is 300 + seconds (5 minutes). **`s2s_tls_compression: true|false`**: Whether to enable or disable TLS compression for s2s connections. - The default value is `false`. + The default value is `false`. **`trusted_proxies: all | [IpString]`**: Specify what proxies are trusted when an HTTP request contains the - header `X-Forwarded-For` You can specify `all` to allow all proxies, - or specify a list of IPs in string format. The default value is: - `["127.0.0.1"]`. This allows, if enabled, to be able to know the real IP of the request, for admin purpose, - or security configuration (for example using [mod_fail2ban](#mod-fail2ban))). - **Important:** The proxy MUST be configured to set the `X-Forwarded-For` header if you enable this option as, - otherwise, the client can set it itself and as a result the IP value cannot be trusted for security rules in - ejabberd. + header `X-Forwarded-For` You can specify `all` to allow all proxies, + or specify a list of IPs in string format. The default value is: + `["127.0.0.1"]`. This allows, if enabled, to be able to know the real IP of the request, for admin purpose, + or security configuration (for example using [mod_fail2ban](#mod_fail2ban))). + **Important:** The proxy MUST be configured to set the `X-Forwarded-For` header if you enable this option as, + otherwise, the client can set it itself and as a result the IP value cannot be trusted for security rules in + ejabberd. ### Examples For example, the following simple configuration defines: -- There are three domains. The default certificate file is - `server.pem`. However, the c2s and s2s connections to the domain - `example.com` use the file `example_com.pem`. - -- Port 5222 listens for c2s connections with STARTTLS, and also allows - plain connections for old clients. - -- Port 5223 listens for c2s connections with the old SSL. - -- Port 5269 listens for s2s connections with STARTTLS. The socket is - set for IPv6 instead of IPv4. - -- Port 3478 listens for STUN requests over UDP. - -- Port 5280 listens for HTTP requests, and serves the HTTP-Bind (BOSH) - service. - -- Port 5281 listens for HTTP requests, using HTTPS to serve HTTP-Bind - (BOSH) and the Web Admin as explained in [Managing: Web Admin](/admin/guide/managing/#web-admin). The - socket only listens connections to the IP address 127.0.0.1. - - - hosts: - - example.com - - example.org - - example.net - - certfiles: - - /etc/ejabberd/server.pem - - /etc/ejabberd/example_com.pem - - listen: - - - port: 5222 - module: ejabberd_c2s - access: c2s - shaper: c2s_shaper - starttls: true - max_stanza_size: 65536 - - - port: 5223 - module: ejabberd_c2s - access: c2s - shaper: c2s_shaper - tls: true - max_stanza_size: 65536 - - - port: 5269 - ip: "::" - module: ejabberd_s2s_in - shaper: s2s_shaper - max_stanza_size: 131072 - - - port: 3478 - transport: udp - module: ejabberd_stun - - - port: 5280 - module: ejabberd_http - request_handlers: - /bosh: mod_bosh - - - port: 5281 - ip: 127.0.0.1 - module: ejabberd_http - tls: true - request_handlers: - /admin: ejabberd_web_admin - /bosh: mod_bosh - - s2s_use_starttls: optional - outgoing_s2s_families: - - ipv4 - - ipv6 - outgoing_s2s_timeout: 10000 - trusted_proxies: [127.0.0.1, 192.168.1.11] - +- There are three domains. The default certificate file is `server.pem`. However, the c2s and s2s connections to the domain + `example.com` use the file `example_com.pem`. + +- Port 5222 listens for c2s connections with STARTTLS, and also allows plain connections for old clients. + +- Port 5223 listens for c2s connections with the old SSL. + +- Port 5269 listens for s2s connections with STARTTLS. The socket is set for IPv6 instead of IPv4. + +- Port 3478 listens for STUN requests over UDP. + +- Port 5280 listens for HTTP requests, and serves the HTTP-Bind (BOSH) service. + +- Port 5281 listens for HTTP requests, using HTTPS to serve HTTP-Bind (BOSH) and the Web Admin as explained in [Managing: Web Admin](../admin/guide/managing.md#web_admin). +The socket only listens connections to the IP address 127.0.0.1. + +``` yaml + hosts: + - example.com + - example.org + - example.net + + certfiles: + - /etc/ejabberd/server.pem + - /etc/ejabberd/example_com.pem + + listen: + - + port: 5222 + module: ejabberd_c2s + access: c2s + shaper: c2s_shaper + starttls: true + max_stanza_size: 65536 + - + port: 5223 + module: ejabberd_c2s + access: c2s + shaper: c2s_shaper + tls: true + max_stanza_size: 65536 + - + port: 5269 + ip: "::" + module: ejabberd_s2s_in + shaper: s2s_shaper + max_stanza_size: 131072 + - + port: 3478 + transport: udp + module: ejabberd_stun + - + port: 5280 + module: ejabberd_http + request_handlers: + /bosh: mod_bosh + - + port: 5281 + ip: 127.0.0.1 + module: ejabberd_http + tls: true + request_handlers: + /admin: ejabberd_web_admin + /bosh: mod_bosh + + s2s_use_starttls: optional + outgoing_s2s_families: + - ipv4 + - ipv6 + outgoing_s2s_timeout: 10000 + trusted_proxies: [127.0.0.1, 192.168.1.11] +``` In this example, the following configuration defines that: -- c2s connections are listened for on port 5222 (all IPv4 addresses) - and on port 5223 (SSL, IP 192.168.0.1 and fdca:8ab6:a243:75ef::1) - and denied for the user called ‘`bad`’. - -- s2s connections are listened for on port 5269 (all IPv4 addresses) - with STARTTLS for secured traffic strictly required, and the - certificates are verified. Incoming and outgoing connections of - remote XMPP servers are denied, only two servers can connect: - “jabber.example.org” and “example.com”. - -- Port 5280 is serving the Web Admin and the HTTP-Bind (BOSH) service in - all the IPv4 addresses. Note that it is also possible to serve them - on different ports. The second example in section [Managing: Web Admin](/admin/guide/managing/#web-admin) shows - how exactly this can be done. A request handler to serve MQTT over Websocket is also defined. - -- All users except for the administrators have a traffic of limit - 1,000Bytes/second - -- The [`AIM transport`][2] - `aim.example.org` is connected to port 5233 on localhost IP - addresses (127.0.0.1 and ::1) with password ‘`aimsecret`’. - -- The ICQ transport JIT (`icq.example.org` and `sms.example.org`) is - connected to port 5234 with password ‘`jitsecret`’. - -- The [`MSN transport`][3] - `msn.example.org` is connected to port 5235 with password - ‘`msnsecret`’. - -- The [`Yahoo! transport`][4] - `yahoo.example.org` is connected to port 5236 with password - ‘`yahoosecret`’. - -- The - [`Gadu-Gadu transport`][5] - `gg.example.org` is connected to port 5237 with password - ‘`ggsecret`’. - -- The [`Jabber Mail Component`][6] - `jmc.example.org` is connected to port 5238 with password - ‘`jmcsecret`’. - -- The service custom has enabled the special option to avoiding - checking the `from` attribute in the packets send by this component. - The component can send packets in behalf of any users from the - server, or even on behalf of any server. - - - acl: - blocked: - user: bad - trusted_servers: - server: - - example.com - - jabber.example.org - xmlrpc_bot: - user: - - xmlrpc-robot@example.org - shaper: - normal: 1000 - shaper_rules: - c2s_shaper: - - none: admin - - normal - access_rules: - c2s: - - deny: blocked - - allow - xmlrpc_access: - - allow: xmlrpc_bot - s2s: - - allow: trusted_servers - certfiles: - - /path/to/ssl.pem - s2s_access: s2s - s2s_use_starttls: required_trusted - listen: - - - port: 5222 - module: ejabberd_c2s - shaper: c2s_shaper - access: c2s - - - ip: 192.168.0.1 - port: 5223 - module: ejabberd_c2s - tls: true - access: c2s - - - ip: "FDCA:8AB6:A243:75EF::1" - port: 5223 - module: ejabberd_c2s - tls: true - access: c2s - - - port: 5269 - module: ejabberd_s2s_in - - - port: 5280 - module: ejabberd_http - request_handlers: - /admin: ejabberd_web_admin - /bosh: mod_bosh +- c2s connections are listened for on port 5222 (all IPv4 addresses) + and on port 5223 (SSL, IP 192.168.0.1 and fdca:8ab6:a243:75ef::1) + and denied for the user called ‘`bad`’. + +- s2s connections are listened for on port 5269 (all IPv4 addresses) + with STARTTLS for secured traffic strictly required, and the + certificates are verified. Incoming and outgoing connections of + remote XMPP servers are denied, only two servers can connect: + “jabber.example.org” and “example.com”. + +- Port 5280 is serving the Web Admin and the HTTP-Bind (BOSH) service in + all the IPv4 addresses. Note that it is also possible to serve them + on different ports. The second example in section [Managing: Web Admin](../admin/guide/managing.md#web_admin) shows + how exactly this can be done. A request handler to serve MQTT over Websocket is also defined. + +- All users except for the administrators have a traffic of limit + 1,000Bytes/second + +- The [`AIM transport`][2] + `aim.example.org` is connected to port 5233 on localhost IP + addresses (127.0.0.1 and ::1) with password ‘`aimsecret`’. + +- The ICQ transport JIT (`icq.example.org` and `sms.example.org`) is + connected to port 5234 with password ‘`jitsecret`’. + +- The [`MSN transport`][3] + `msn.example.org` is connected to port 5235 with password + ‘`msnsecret`’. + +- The [`Yahoo! transport`][4] + `yahoo.example.org` is connected to port 5236 with password + ‘`yahoosecret`’. + +- The + [`Gadu-Gadu transport`][5] + `gg.example.org` is connected to port 5237 with password + ‘`ggsecret`’. + +- The [`Jabber Mail Component`][6] + `jmc.example.org` is connected to port 5238 with password + ‘`jmcsecret`’. + +- The service custom has enabled the special option to avoiding + checking the `from` attribute in the packets send by this component. + The component can send packets in behalf of any users from the + server, or even on behalf of any server. + +``` yaml + acl: + blocked: + user: bad + trusted_servers: + server: + - example.com + - jabber.example.org + xmlrpc_bot: + user: + - xmlrpc-robot@example.org + shaper: + normal: 1000 + shaper_rules: + c2s_shaper: + - none: admin + - normal + access_rules: + c2s: + - deny: blocked + - allow + xmlrpc_access: + - allow: xmlrpc_bot + s2s: + - allow: trusted_servers + certfiles: + - /path/to/ssl.pem + s2s_access: s2s + s2s_use_starttls: required_trusted + listen: + - + port: 5222 + module: ejabberd_c2s + shaper: c2s_shaper + access: c2s + - + ip: 192.168.0.1 + port: 5223 + module: ejabberd_c2s + tls: true + access: c2s + - + ip: "FDCA:8AB6:A243:75EF::1" + port: 5223 + module: ejabberd_c2s + tls: true + access: c2s + - + port: 5269 + module: ejabberd_s2s_in + - + port: 5280 + module: ejabberd_http + request_handlers: + /admin: ejabberd_web_admin + /bosh: mod_bosh /mqtt: mod_mqtt - - - port: 4560 - module: ejabberd_xmlrpc - access_commands: {} - - - ip: 127.0.0.1 - port: 5233 - module: ejabberd_service - hosts: - aim.example.org: - password: aimsecret - - - ip: "::1" - port: 5233 - module: ejabberd_service - hosts: - aim.example.org: - password: aimsecret - - - port: 5234 - module: ejabberd_service - hosts: - icq.example.org: - password: jitsecret - sms.example.org: - password: jitsecret - - - port: 5235 - module: ejabberd_service - hosts: - msn.example.org: - password: msnsecret - - - port: 5236 - module: ejabberd_service - password: yahoosecret - - - port: 5237 - module: ejabberd_service - hosts: - gg.example.org: - password: ggsecret - - - port: 5238 - module: ejabberd_service - hosts: - jmc.example.org: - password: jmcsecret - - - port: 5239 - module: ejabberd_service - check_from: false - hosts: - custom.example.org: - password: customsecret - + - + port: 4560 + module: ejabberd_xmlrpc + access_commands: {} + - + ip: 127.0.0.1 + port: 5233 + module: ejabberd_service + hosts: + aim.example.org: + password: aimsecret + - + ip: "::1" + port: 5233 + module: ejabberd_service + hosts: + aim.example.org: + password: aimsecret + - + port: 5234 + module: ejabberd_service + hosts: + icq.example.org: + password: jitsecret + sms.example.org: + password: jitsecret + - + port: 5235 + module: ejabberd_service + hosts: + msn.example.org: + password: msnsecret + - + port: 5236 + module: ejabberd_service + password: yahoosecret + - + port: 5237 + module: ejabberd_service + hosts: + gg.example.org: + password: ggsecret + - + port: 5238 + module: ejabberd_service + hosts: + jmc.example.org: + password: jmcsecret + - + port: 5239 + module: ejabberd_service + check_from: false + hosts: + custom.example.org: + password: customsecret +``` Note, that for services based in jabberd14 or WPJabber you have to make the transports log and do XDB by themselves: - - - - - - %d: [%t] (%h): %s - /var/log/jabber/service.log - + + + + %d: [%t] (%h): %s + /var/log/jabber/service.log + - - - - - - /usr/lib/jabber/xdb_file.so - - - /var/spool/jabber - - - -## ACME - -[ACME](https://tools.ietf.org/html/rfc8555) is used to automatically obtain SSL -certificates for the domains served by ejabberd, which means that -certificate requests and renewals are performed to some CA server (aka "ACME server") + + + + + /usr/lib/jabber/xdb_file.so + + + /var/spool/jabber + + +``` + +### ACME + +[ACME](https://tools.ietf.org/html/rfc8555) is used to automatically obtain SSL certificates for the domains served by ejabberd, which means that certificate requests and renewals are performed to some CA server (aka "ACME server") in a fully automated mode. The automated mode is enabled by default. -However, since ACME requires HTTP challenges -(i.e. an ACME server will connect to ejabberd server on HTTP port 80 during certificate issuance), -some configuration of ejabberd is still required. Namely, an HTTP listener for `ejabberd_http` -module should be configured on non-TLS port with so called "ACME well known" request handler: +However, since ACME requires HTTP challenges (i.e. an ACME server will connect to ejabberd server on HTTP port 80 during certificate issuance), some configuration of ejabberd is still required. Namely, an HTTP listener for `ejabberd_http` module should be configured on non-TLS port with so called "ACME well known" request handler: +``` yaml listen: ... - @@ -858,6 +843,7 @@ module should be configured on non-TLS port with so called "ACME well known" req /.well-known/acme-challenge: ejabberd_acme ... ... +``` Note that the ACME protocol **requires** challenges to be sent on port 80. Since this is a privileged port, ejabberd cannot listen on it directly without root privileges. Thus you need some mechanism @@ -874,33 +860,39 @@ By default, ejabberd uses [Let's Encrypt](https://letsencrypt.org) authority. Thus, the default value of `ca_url` option is `https://acme-v02.api.letsencrypt.org/directory` and the staging URL will be `https://acme-staging-v02.api.letsencrypt.org/directory`: +``` yaml acme: ## Staging environment ca_url: https://acme-staging-v02.api.letsencrypt.org/directory ## Production environment (the default): # ca_url: https://acme-v02.api.letsencrypt.org/directory +``` The automated mode can be disabled by setting `auto` option of section `acme` to `false`: +``` yaml acme: auto: false ... +``` In this case automated renewals are still enabled, however, in order to request a new certificate, you need to run `request-certificate` ejabberdctl command: - $ ejabberdctl request-certificate all + `$ ejabberdctl request-certificate all` If you only want to request certificates for a subset of the domains, run: - $ ejabberdctl request-certificate domain.tld,pubsub.domain.tld,server.com,conference.server.com,... + `$ ejabberdctl request-certificate domain.tld,pubsub.domain.tld,server.com,conference.server.com,...` You can view the certificates obtained using ACME: +``` sh $ ejabberdctl list-certificates domain.tld /path/to/cert/file1 true server.com /path/to/cert/file2 false ... +``` The output is mostly self-explained: every line contains the domain, the corresponding certificate file, and whether this certificate file is used or not. A certificate might not be used for several reasons: @@ -909,7 +901,7 @@ It's recommended to revoke unused certificates if they are not yet expired (see At any point you can revoke a certificate: pick the certificate file from the listing above and run: - $ ejabberdctl revoke-certificate /path/to/cert/file +`$ ejabberdctl revoke-certificate /path/to/cert/file` If the commands return errors, consult the log files for details. @@ -934,6 +926,7 @@ If the commands return errors, consult the log files for details. Example: +``` yaml acme: ca_url: https://acme-v02.api.letsencrypt.org/directory contact: @@ -942,8 +935,9 @@ Example: auto: true cert_type: rsa +``` -### ACME implementation details +#### ACME implementation details In nutshell, certification requests are performed in two phases. Firstly, ejabberd creates an account at the ACME server. That is an EC private key. Secondly, @@ -951,7 +945,8 @@ a certificate is requested. In the case of a revocation, no account is used - only a cerificate in question is needed. All information is stored under `acme` directory inside spool directory of ejabberd (typically `/var/lib/ejabberd`). An example content of the directory is the following: -``` + +``` sh $ tree /var/lib/ejabberd /var/lib/ejabberd ├── acme @@ -961,16 +956,21 @@ $ tree /var/lib/ejabberd │ └── 93816a8429ebbaa75574eb3f59d4a806b67d6917 ... ``` + Here, `account.key` is the EC private key used to identify the ACME account. You can inspect its content using `openssl` command: + +``` sh +openssl ec -text -noout -in /var/lib/ejabberd/acme/account.key ``` -$ openssl ec -text -noout -in /var/lib/ejabberd/acme/account.key -``` + Obtained certificates are stored under `acme/live` directory. You can inspect any of the certificates using `openssl` command as well: + +``` sh +openssl x509 -text -noout -in /var/lib/ejabberd/acme/live/251ce180d964e98a2f18b65504df2ab7c55943e2 ``` -$ openssl x509 -text -noout -in /var/lib/ejabberd/acme/live/251ce180d964e98a2f18b65504df2ab7c55943e2 -``` + In the case of errors, you can delete the whole `acme` directory - ejabberd will recreate its content on next certification request. However, don't delete it too frequently - usually there is a rate limit on the number of accounts and @@ -982,23 +982,21 @@ the limits are described [here](https://letsencrypt.org/docs/rate-limits). The option `auth_method` defines the authentication methods that are used for user authentication. The syntax is: -`[Method, ...]` - -: +`[Method, ...]` : The following authentication methods are supported by `ejabberd`: -- internal — See section [Internal](#internal). +- internal — See section [Internal](#internal). -- external — See section [External Script](#external-script). +- external — See section [External Script](#external-script). -- ldap — See section  [LDAP](#ldap). +- ldap — See section  [LDAP](#ldap). -- sql — See section [Relational Databases](#relational-databases). +- sql — See section [Relational Databases](#relational-databases). -- anonymous — See section [Anonymous Login and SASL Anonymous](#anonymous-login-and-sasl-anonymous). +- anonymous — See section [Anonymous Login and SASL Anonymous](#anonymous-login-and-sasl-anonymous). -- pam — See section [Pam Authentication](#pam-authentication). +- pam — See section [Pam Authentication](#pam-authentication). When the option is omitted, ejabberd will rely upon the default database which is configured in `default_db` option. If this option is not set neither the default authentication method will be `internal`. @@ -1037,18 +1035,18 @@ The option `auth_password_format: plain|scram` defines in what format the users passwords are stored: **`plain`**: The password is stored as plain text in the database. This is risky - because the passwords can be read if your database gets compromised. - This is the default value. This format allows clients to - authenticate using: the old Jabber Non-SASL - ([`XEP-0078`](https://xmpp.org/extensions/xep-0078.html)), - `SASL PLAIN`, `SASL DIGEST-MD5`, and `SASL SCRAM-SHA-1`. + because the passwords can be read if your database gets compromised. + This is the default value. This format allows clients to + authenticate using: the old Jabber Non-SASL + ([`XEP-0078`](https://xmpp.org/extensions/xep-0078.html)), + `SASL PLAIN`, `SASL DIGEST-MD5`, and `SASL SCRAM-SHA-1`. **`scram`**: The password is not stored, only some information that allows to - verify the hash provided by the client. It is impossible to obtain - the original plain password from the stored information; for this - reason, when this value is configured it cannot be changed to - `plain` anymore. This format allows clients to authenticate using: - `SASL PLAIN` and `SASL SCRAM-SHA-1`. + verify the hash provided by the client. It is impossible to obtain + the original plain password from the stored information; for this + reason, when this value is configured it cannot be changed to + `plain` anymore. This format allows clients to authenticate using: + `SASL PLAIN` and `SASL SCRAM-SHA-1`. For details about the client-server communication when using SCRAM-SHA-1, refer to [SASL and SCRAM-SHA-1](https://wiki.xmpp.org/web/SASLandSCRAM-SHA-1). @@ -1064,68 +1062,65 @@ into the Erlang function: Examples: -- To use internal authentication on `example.org` and LDAP - authentication on `example.net`: - +- To use internal authentication on `example.org` and LDAP + authentication on `example.net`: - host_config: - example.org: - auth_method: [internal] - example.net: - auth_method: [ldap] - -- To use internal authentication with hashed passwords on all virtual - hosts: +``` yaml + host_config: + example.org: + auth_method: [internal] + example.net: + auth_method: [ldap] +``` +- To use internal authentication with hashed passwords on all virtual + hosts: - auth_method: internal - auth_password_format: scram +``` yaml + auth_method: internal + auth_password_format: scram +``` -*Note on SCRAM using and foreign authentication limitations*: when using -the SCRAM password format, it is not possible to use foreign -authentication method in ejabberd, as the real password is not known, -Foreign authentication are use to authenticate through various bridges -ejabberd provide. Foreign authentication includes at the moment SIP -and TURN auth support and they will not be working with SCRAM. +*Note on SCRAM using and foreign authentication limitations*: when using the SCRAM password format, it is not possible to use foreign authentication method in ejabberd, as the real password is not known, +Foreign authentication are use to authenticate through various bridges ejabberd provide. +Foreign authentication includes at the moment SIP and TURN auth support and they will not be working with SCRAM. -### External Script +#### External Script -In this authentication method, when `ejabberd` starts, it start a -script, and calls it to perform authentication tasks. +In this authentication method, when `ejabberd` starts, it start a script, and calls it to perform authentication tasks. -The server administrator can write the external authentication script in -any language. The details on the interface between ejabberd and the -script are described in the `ejabberd Developers Guide`. There are also -[`several example authentication scripts`][9]. +The server administrator can write the external authentication script in any language. The details on the interface between ejabberd and the +script are described in the `ejabberd Developers Guide`. There are also [`several example authentication scripts`][9]. These are the specific options: **`extauth_program: PathToScript`**: Indicate in this option the full path to the external authentication - script. The script must be executable by ejabberd. + script. The script must be executable by ejabberd. **`extauth_instances: Integer`**: Indicate how many instances of the script to run simultaneously to - serve authentication in the virtual host. The default value is the - minimum number: 1. + serve authentication in the virtual host. The default value is the + minimum number: 1. **`auth_use_cache: false|true`**: Starting in *ejabberd 17.06*, caching has received a complete overhaul. - Instead of `extauth_cache`, a set of new variables describes cache - behaviour, and the default value is now `true`. Note that caching - interferes with the ability to maintain multiple passwords per - account. So if your authentication mechanism supports - application-specific passwords, caching must be disabled. - The options are called `auth_use_cache`, `auth_cache_missed`, - `auth_cache_size`, `auth_cache_life_time`, - and you can see details in the section [Caching](#caching). + Instead of `extauth_cache`, a set of new variables describes cache + behaviour, and the default value is now `true`. Note that caching + interferes with the ability to maintain multiple passwords per + account. So if your authentication mechanism supports + application-specific passwords, caching must be disabled. + The options are called `auth_use_cache`, `auth_cache_missed`, + `auth_cache_size`, `auth_cache_life_time`, + and you can see details in the section [Caching](#caching). This example sets external authentication, the extauth script, enables caching for 10 minutes, and starts three instances of the script for each virtual host defined in ejabberd: - - auth_method: [external] - extauth_program: /etc/ejabberd/JabberAuth.class.php - extauth_instances: 3 - auth_use_cache: false +``` yaml + auth_method: [external] + extauth_program: /etc/ejabberd/JabberAuth.class.php + extauth_instances: 3 + auth_use_cache: false +``` ### Anonymous Login and SASL Anonymous @@ -1133,165 +1128,172 @@ The `anonymous` authentication method enables two modes for anonymous authentication: **`Anonymous login`**: This is a standard login, that use the classical login and password - mechanisms, but where password is accepted or preconfigured for all - anonymous users. This login is compliant with SASL authentication, - password and digest non-SASL authentication, so this option will - work with almost all XMPP clients + mechanisms, but where password is accepted or preconfigured for all + anonymous users. This login is compliant with SASL authentication, + password and digest non-SASL authentication, so this option will + work with almost all XMPP clients **`SASL Anonymous`**: This is a special SASL authentication mechanism that allows to login - without providing username or password (see - [`XEP-0175`](https://xmpp.org/extensions/xep-0175.html)). The main - advantage of SASL Anonymous is that the protocol was designed to - give the user a login. This is useful to avoid in some case, where - the server has many users already logged or registered and when it - is hard to find a free username. The main disavantage is that you - need a client that specifically supports the SASL Anonymous - protocol. + without providing username or password (see + [`XEP-0175`](https://xmpp.org/extensions/xep-0175.html)). The main + advantage of SASL Anonymous is that the protocol was designed to + give the user a login. This is useful to avoid in some case, where + the server has many users already logged or registered and when it + is hard to find a free username. The main disavantage is that you + need a client that specifically supports the SASL Anonymous + protocol. The anonymous authentication method can be configured with the following options. Remember that you can use the `host_config` option to set virtual host specific options (see section [Virtual Hosting](#virtual-hosting)). **`allow_multiple_connections: false|true`**: This option is only used when the anonymous mode is enabled. Setting - it to `true` means that the same username can be taken multiple - times in anonymous login mode if different resource are used to - connect. This option is only useful in very special occasions. The - default value is `false`. + it to `true` means that the same username can be taken multiple + times in anonymous login mode if different resource are used to + connect. This option is only useful in very special occasions. The + default value is `false`. **`anonymous_protocol: login_anon | sasl_anon | both`**: `login_anon` means that the anonymous login method will be used. - `sasl_anon` means that the SASL Anonymous method will be used. - `both` means that SASL Anonymous and login anonymous are both - enabled. + `sasl_anon` means that the SASL Anonymous method will be used. + `both` means that SASL Anonymous and login anonymous are both + enabled. Those options are defined for each virtual host with the `host_config` parameter (see section  [Virtual Hosting](#virtual-hosting)). Examples: -- To enable anonymous login on all virtual hosts: - - - auth_method: [anonymous] - anonymous_protocol: login_anon - -- Similar as previous example, but limited to `public.example.org`: - - - host_config: - public.example.org: - auth_method: [anonymous] - anonymous_protoco: login_anon - -- To enable anonymous login and internal authentication on a virtual - host: +- To enable anonymous login on all virtual hosts: +``` yaml + auth_method: [anonymous] + anonymous_protocol: login_anon +``` - host_config: - public.example.org: - auth_method: - - internal - - anonymous - anonymous_protocol: login_anon +- Similar as previous example, but limited to `public.example.org`: -- To enable SASL Anonymous on a virtual host: +``` yaml + host_config: + public.example.org: + auth_method: [anonymous] + anonymous_protoco: login_anon +``` +- To enable anonymous login and internal authentication on a virtual host: - host_config: - public.example.org: - auth_method: [anonymous] - anonymous_protocol: sasl_anon +``` yaml + host_config: + public.example.org: + auth_method: + - internal + - anonymous + anonymous_protocol: login_anon +``` -- To enable SASL Anonymous and anonymous login on a virtual host: +- To enable SASL Anonymous on a virtual host: +``` yaml + host_config: + public.example.org: + auth_method: [anonymous] + anonymous_protocol: sasl_anon +``` - host_config: - public.example.org: - auth_method: [anonymous] - anonymous_protocol: both +- To enable SASL Anonymous and anonymous login on a virtual host: -- To enable SASL Anonymous, anonymous login, and internal - authentication on a virtual host: +``` yaml + host_config: + public.example.org: + auth_method: [anonymous] + anonymous_protocol: both +``` +- To enable SASL Anonymous, anonymous login, and internal authentication on a virtual host: - host_config: - public.example.org: - auth_method: - - internal - - anonymous - anonymous_protocol: both +``` yaml + host_config: + public.example.org: + auth_method: + - internal + - anonymous + anonymous_protocol: both +``` -There are more configuration examples and XMPP client example stanzas in -[`Anonymous users support`][10]. +There are more configuration examples and XMPP client example stanzas in [`Anonymous users support`][10]. -### PAM Authentication +#### PAM Authentication `ejabberd` supports authentication via Pluggable Authentication Modules (PAM). PAM is currently supported in AIX, FreeBSD, HP-UX, Linux, Mac OS X, NetBSD and Solaris. PAM authentication is disabled by default, so you have to configure and compile `ejabberd` with PAM support enabled: - - ./configure --enable-pam && make install + `./configure --enable-pam && make install` Options: **`pam_service: Name`**: This option defines the PAM service name. Default is `ejabberd`. - Refer to the PAM documentation of your operation system for more - information. + Refer to the PAM documentation of your operation system for more + information. **`pam_userinfotype: username|jid`**: This option defines what type of information about the user ejabberd - provides to the PAM service: only the username, or the user JID. - Default is `username`. + provides to the PAM service: only the username, or the user JID. + Default is `username`. Example: - auth_method: [pam] - pam_service: ejabberd +``` yaml + auth_method: [pam] + pam_service: ejabberd +``` Though it is quite easy to set up PAM support in `ejabberd`, PAM itself introduces some security issues: -- To perform PAM authentication `ejabberd` uses external C-program - called `epam`. By default, it is located in - `/var/lib/ejabberd/priv/bin/` directory. You have to set it root on - execution in the case when your PAM module requires root privileges - (`pam_unix.so` for example). Also you have to grant access for - `ejabberd` to this file and remove all other permissions from it. - Execute with root privileges: - - - chown root:ejabberd /var/lib/ejabberd/priv/bin/epam - chmod 4750 /var/lib/ejabberd/priv/bin/epam - -- Make sure you have the latest version of PAM installed on your - system. Some old versions of PAM modules cause memory leaks. If you - are not able to use the latest version, you can `kill(1)` `epam` - process periodically to reduce its memory consumption: `ejabberd` - will restart this process immediately. - -- `epam` program tries to turn off delays on authentication failures. - However, some PAM modules ignore this behavior and rely on their own - configuration options. You can create a configuration file - `ejabberd.pam`. This example shows how to turn off delays in - `pam_unix.so` module: +- To perform PAM authentication `ejabberd` uses external C-program + called `epam`. By default, it is located in + `/var/lib/ejabberd/priv/bin/` directory. You have to set it root on + execution in the case when your PAM module requires root privileges + (`pam_unix.so` for example). Also you have to grant access for + `ejabberd` to this file and remove all other permissions from it. + Execute with root privileges: + +``` sh + chown root:ejabberd /var/lib/ejabberd/priv/bin/epam + chmod 4750 /var/lib/ejabberd/priv/bin/epam +``` - #%PAM-1.0 - auth sufficient pam_unix.so likeauth nullok nodelay - account sufficient pam_unix.so +- Make sure you have the latest version of PAM installed on your + system. Some old versions of PAM modules cause memory leaks. If you + are not able to use the latest version, you can `kill(1)` `epam` + process periodically to reduce its memory consumption: `ejabberd` + will restart this process immediately. + +- `epam` program tries to turn off delays on authentication failures. + However, some PAM modules ignore this behavior and rely on their own + configuration options. You can create a configuration file + `ejabberd.pam`. This example shows how to turn off delays in + `pam_unix.so` module: + +``` sh + #%PAM-1.0 + auth sufficient pam_unix.so likeauth nullok nodelay + account sufficient pam_unix.so +``` That is not a ready to use configuration file: you must use it as a - hint when building your own PAM configuration instead. Note that if - you want to disable delays on authentication failures in the PAM - configuration file, you have to restrict access to this file, so a - malicious user can’t use your configuration to perform brute-force - attacks. + hint when building your own PAM configuration instead. Note that if + you want to disable delays on authentication failures in the PAM + configuration file, you have to restrict access to this file, so a + malicious user can’t use your configuration to perform brute-force + attacks. -- You may want to allow login access only for certain users. - `pam_listfile.so` module provides such functionality. +- You may want to allow login access only for certain users. + `pam_listfile.so` module provides such functionality. -- If you use `pam_winbind` to authorise against a Windows Active - Directory, then `/etc/nsswitch.conf` must be configured to use - `winbind` as well. +- If you use `pam_winbind` to authorise against a Windows Active + Directory, then `/etc/nsswitch.conf` must be configured to use + `winbind` as well. ### JWT Authentication @@ -1300,10 +1302,12 @@ clients send signed tokens instead of passwords, which are checked using a private key specified in the `jwt_key` option. JWT payload must look like this: +``` json { "jid": "test@example.org", "exp": 1564436511 } + ``` Options: @@ -1312,29 +1316,30 @@ Options: **`jwt_auth_only_rule: AccessName`**: The accounts that match this access rule can authenticate only using JWT, even if ejabberd is configured to support other auth methods too. Example: - - auth_method: jwt - jwt_key: /path/to/jwt/key +``` yaml + auth_method: jwt + jwt_key: /path/to/jwt/key +``` In this example, admins can use both JWT and plain passwords, while the rest of users can use only JWT. - # the order is important here, don't use [sql, jwt] - auth_method: [jwt, sql] +``` yaml + # the order is important here, don't use [sql, jwt] + auth_method: [jwt, sql] - access_rules: - ... - jwt_only: - deny: admin - allow: all + access_rules: + ... + jwt_only: + deny: admin + allow: all - jwt_auth_only_rule: jwt_only + jwt_auth_only_rule: jwt_only +``` ## Access Rules -*This section describes new ACL syntax introduced in ejabberd -16.06. For old access rule and ACL syntax documentation, please refer -to -[configuration document archive](https://github.com/processone/docs.ejabberd.im/blob/7391ac375fd8253f74214cbffa2bafb140501981/content/admin/guide/configuration.md)* +*This section describes new ACL syntax introduced in ejabberd 16.06. +For old access rule and ACL syntax documentation, please refer to [configuration document archive](https://github.com/processone/docs.ejabberd.im/blob/7391ac375fd8253f74214cbffa2bafb140501981/content/admin/guide/configuration.md)* ### ACL Definition @@ -1348,107 +1353,121 @@ following syntax: **`all`**: Matches all JIDs. Example: - acl: - world: all +``` yaml + acl: + world: all +``` **`user: Username`**: Matches the user with the name `Username` on any of the local virtual host. - Example: + Example: - - acl: - admin: - user: yozhik +``` yaml + acl: + admin: + user: yozhik +``` **`user: {Username: Server} | Jid`**: Matches the user with the JID `Username@Server` and any resource. - Example: - - - acl: - admin: - - user: - yozhik@example.org - - user: peter@example.org + Example: + +``` yaml + acl: + admin: + - user: + yozhik@example.org + - user: peter@example.org +``` **`server: Server`**: Matches any JID from server `Server`. Example: - - acl: - exampleorg: - server: example.org +``` yaml + acl: + exampleorg: + server: example.org +``` **`resource: Resource`**: Matches any JID with a resource `Resource`. Example: - acl: - mucklres: - resource: muckl +``` yaml + acl: + mucklres: + resource: muckl +``` **`shared_group: Groupname`**: Matches any member of a Shared Roster Group with name `Groupname` in - the virtual host. Example: + the virtual host. Example: - - acl: - techgroupmembers: - shared_group: techteam +``` yaml + acl: + techgroupmembers: + shared_group: techteam +``` **`shared_group: {Groupname: Server}`**: Matches any member of a Shared Roster Group with name `Groupname` in - the virtual host `Server`. Example: + the virtual host `Server`. Example: - - acl: - techgroupmembers: - shared_group: - techteam: example.org +``` yaml + acl: + techgroupmembers: + shared_group: + techteam: example.org +``` **`ip: Network`**: Matches any IP address from the `Network`. Example: - - acl: - loopback: - ip: - - 127.0.0.0/8 - - "::1" +``` yaml + acl: + loopback: + ip: + - 127.0.0.0/8 + - "::1" +``` **`user_regexp: Regexp`**: Matches any local user with a name that matches `Regexp` on local - virtual hosts. Example: + virtual hosts. Example: - - acl: - tests: - user_regexp: "^test[0-9]*$" +``` yaml + acl: + tests: + user_regexp: "^test[0-9]*$" +``` **`user_regexp: {Regexp: Server} | JidRegexp`**: Matches any user with a name that matches `Regexp` at server - `Server`. Example: - - - acl: - tests: - user_regexp: - - "^test1": example.org - - "^test2@example.org" + `Server`. Example: + +``` yaml + acl: + tests: + user_regexp: + - "^test1": example.org + - "^test2@example.org" +``` **`server_regexp: Regexp`**: Matches any JID from the server that matches `Regexp`. Example: - - acl: - icq: - server_regexp: "^icq\\." +``` yaml + acl: + icq: + server_regexp: "^icq\\." +``` **`resource_regexp: Regexp`**: Matches any JID with a resource that matches `Regexp`. Example: - - acl: - icq: - resource_regexp: "^laptop\\." +``` yaml + acl: + icq: + resource_regexp: "^laptop\\." +``` **`node_regexp: {UserRegexp: ServerRegexp}`**: Matches any user with a name that matches `UserRegexp` at any server - that matches `ServerRegexp`. Example: - - - acl: - yozhik: - node_regexp: - "^yozhik$": "^example.(com|org)$" + that matches `ServerRegexp`. Example: +``` yaml + acl: + yozhik: + node_regexp: + "^yozhik$": "^example.(com|org)$" +``` **`user_glob: Glob`**: @@ -1463,14 +1482,14 @@ following syntax: instead of regexp. These patterns can have the following special characters: -* **`*`**: matches any string including the null string. +- **`*`**: matches any string including the null string. -* **`?`**: matches any single character. +- **`?`**: matches any single character. -* **`[...]`**: matches any of the enclosed characters. Character ranges are - specified by a pair of characters separated by a `-`. If the - first character after `[` is a `!`, any character not enclosed - is matched. +- **`[...]`**: matches any of the enclosed characters. Character ranges are + specified by a pair of characters separated by a `-`. If the + first character after `[` is a `!`, any character not enclosed + is matched. The following `ACLName` are pre-defined: @@ -1500,7 +1519,7 @@ To simplify configuration two shortcut version are available: `- allow: acl` and `- allow`, example below shows equivalent definitions where short or long version are used: - +``` yaml access_rules: a_short: admin a_long: @@ -1513,6 +1532,7 @@ definitions where short or long version are used: - acl: banned - allow: - all +``` If you define specific Access rights in a virtual host, remember that the globally defined Access rights have precedence over those. This @@ -1522,7 +1542,7 @@ effect. Example: - +``` yaml access_rules: configure: - allow: admin @@ -1546,6 +1566,7 @@ Example: - allow: - user: bot@example.com - ip: 10.0.0.0/24 +``` The following `AccessName` are pre-defined: @@ -1566,7 +1587,6 @@ should be used. Examples: - shaper_rules: connections_limit: - 10: @@ -1579,7 +1599,6 @@ Examples: - normal log_days: 30 - ### Limiting Opened Sessions with ACL The special access `max_user_sessions` specifies the maximum number of @@ -1596,11 +1615,10 @@ The syntax is: This example limits the number of sessions per user to 5 for all users, and to 10 for admins: - - shaper_rules: - max_user_sessions: - - 10: admin - - 5 + shaper_rules: + max_user_sessions: + - 10: admin + - 5 ### Several connections to a remote XMPP server with ACL @@ -1615,11 +1633,10 @@ The syntax is: Examples: -- Allow up to 3 connections with each remote server: - +- Allow up to 3 connections with each remote server: - shaper_rules: - max_s2s_connections: 3 + shaper_rules: + max_s2s_connections: 3 ## Shapers @@ -1632,19 +1649,17 @@ maximum. Examples: -- To define a shaper named ‘`normal`’ with traffic speed limited to - 1,000bytes/second: - - - shaper: - normal: 1000 +- To define a shaper named ‘`normal`’ with traffic speed limited to + 1,000bytes/second: -- To define a shaper named ‘`fast`’ with traffic speed limited to - 50,000bytes/second: + shaper: + normal: 1000 +- To define a shaper named ‘`fast`’ with traffic speed limited to + 50,000bytes/second: - shaper: - fast: 50000 + shaper: + fast: 50000 ## Default Language @@ -1659,9 +1674,9 @@ translation file `Language.msg` in `ejabberd`’s `msgs` directory. For example, to set Russian as default language: - language: ru + language: ru -The page [Internationalization and Localization](/developer/extending-ejabberd/localization/) +The page [Internationalization and Localization](../developer/extending-ejabberd/localization.md) provides more details. ## CAPTCHA @@ -1674,36 +1689,34 @@ provided so the user can fill the challenge in a web browser. An example script is provided that generates the image using ImageMagick’s Convert program. -Note: we do not provide example scripts to support image generation on -Microsoft Windows. Captcha will not work with ejabberd Windows -installer. +!!! info + We do not provide example scripts to support image generation on Microsoft Windows. Captcha will not work with ejabberd Windows installer. The configurable options are: **`captcha_cmd: Path`**: Full path to a script that generates the image. The default value - disables the feature: `undefined` + disables the feature: `undefined` **`captcha_url: URL`**: An URL where CAPTCHA requests should be sent. You need to configure request_handlers for ejabberd_http listener as well. Example configuration: + hosts: [example.org] - hosts: [example.org] + captcha_cmd: /lib/ejabberd/priv/bin/captcha.sh + captcha_url: http://example.org:5280/captcha + ## captcha_url: https://example.org:443/captcha + ## captcha_url: http://example.com/captcha - captcha_cmd: /lib/ejabberd/priv/bin/captcha.sh - captcha_url: http://example.org:5280/captcha - ## captcha_url: https://example.org:443/captcha - ## captcha_url: http://example.com/captcha - - listen: - ... - - - port: 5280 - module: ejabberd_http - request_handlers: - /captcha: ejabberd_captcha - ... + listen: + ... + - + port: 5280 + module: ejabberd_http + request_handlers: + /captcha: ejabberd_captcha + ... ## Node settings @@ -1730,76 +1743,74 @@ You should configure `ejabberd_stun` listening module as described in [Listening Module](#listening-module) section. The specific configurable options are: **`tls: true|false`**: If enabled, `certfile` option must be set, otherwise `ejabberd` will - not be able to accept TLS connections. Obviously, this option makes - sense for `tcp` transport only. The default is `false`. + not be able to accept TLS connections. Obviously, this option makes + sense for `tcp` transport only. The default is `false`. **`certfile: Path`**: Path to the certificate file. Only makes sense when `tls` is set. **`use_turn: true|false`**: Enables/disables TURN (media relay) functionality. The default is - `false`. + `false`. **`turn_ip: String`**: The IPv4 address advertised by your TURN server. The address should - not be NAT’ed or firewalled. There is not default, so you should set - this option explicitly. Implies `use_turn`. + not be NAT’ed or firewalled. There is not default, so you should set + this option explicitly. Implies `use_turn`. **`turn_min_port: Integer`**: Together with `turn_max_port` forms port range to allocate from. The - default is 49152. Implies `use_turn`. + default is 49152. Implies `use_turn`. **`turn_max_port: Integer`**: Together with `turn_min_port` forms port range to allocate from. The - default is 65535. Implies `use_turn`. + default is 65535. Implies `use_turn`. **`turn_max_allocations: Integer|infinity`**: Maximum number of TURN allocations available from the particular IP - address. The default value is 10. Implies `use_turn`. + address. The default value is 10. Implies `use_turn`. **`turn_max_permissions: Integer|infinity`**: Maximum number of TURN permissions available from the particular IP - address. The default value is 10. Implies `use_turn`. + address. The default value is 10. Implies `use_turn`. **`auth_type: user|anonymous`**: Which authentication type to use for TURN allocation requests. When - type `user` is set, ejabberd authentication backend is used. For - `anonymous` type no authentication is performed (not recommended for - public services). The default is `user`. Implies `use_turn`. + type `user` is set, ejabberd authentication backend is used. For + `anonymous` type no authentication is performed (not recommended for + public services). The default is `user`. Implies `use_turn`. **`auth_realm: String`**: When `auth_type` is set to `user` and you have several virtual hosts - configured you should set this option explicitly to the virtual host - you want to serve on this particular listening port. Implies - `use_turn`. + configured you should set this option explicitly to the virtual host + you want to serve on this particular listening port. Implies + `use_turn`. **`shaper: Atom`**: For `tcp` transports defines shaper to use. The default is `none`. **`server_name: String`**: Defines software version to return with every response. The default - is the STUN library version. + is the STUN library version. Example configuration with disabled TURN functionality (STUN only): - - listen: - ... - - - port: 3478 - transport: udp - module: ejabberd_stun - - - port: 3478 - module: ejabberd_stun - - - port: 5349 - module: ejabberd_stun - certfile: /etc/ejabberd/server.pem - ... + listen: + ... + - + port: 3478 + transport: udp + module: ejabberd_stun + - + port: 3478 + module: ejabberd_stun + - + port: 5349 + module: ejabberd_stun + certfile: /etc/ejabberd/server.pem + ... Example configuration with TURN functionality. Note that STUN is always enabled if TURN is enabled. Here, only UDP section is shown: - - listen: - ... - - - port: 3478 - transport: udp - use_turn: true - turn_ip: 10.20.30.1 - module: ejabberd_stun - ... + listen: + ... + - + port: 3478 + transport: udp + use_turn: true + turn_ip: 10.20.30.1 + module: ejabberd_stun + ... You also need to configure DNS SRV records properly so clients can easily discover a STUN/TURN server serving your XMPP domain. Refer to @@ -1811,15 +1822,15 @@ of [`RFC 5766`][19] for details. Example DNS SRV configuration for STUN only: - _stun._udp IN SRV 0 0 3478 stun.example.com. - _stun._tcp IN SRV 0 0 3478 stun.example.com. - _stuns._tcp IN SRV 0 0 5349 stun.example.com. + _stun._udp IN SRV 0 0 3478 stun.example.com. + _stun._tcp IN SRV 0 0 3478 stun.example.com. + _stuns._tcp IN SRV 0 0 5349 stun.example.com. And you should also add these in the case if TURN is enabled: - _turn._udp IN SRV 0 0 3478 turn.example.com. - _turn._tcp IN SRV 0 0 3478 turn.example.com. - _turns._tcp IN SRV 0 0 5349 turn.example.com. + _turn._udp IN SRV 0 0 3478 turn.example.com. + _turn._tcp IN SRV 0 0 3478 turn.example.com. + _turns._tcp IN SRV 0 0 5349 turn.example.com. ## SIP @@ -1837,22 +1848,21 @@ would fail. Example configuration with standard ports (as per [`RFC 3261`][20]): - - listen: - ... - - - port: 5060 - transport: udp - module: ejabberd_sip - - - port: 5060 - module: ejabberd_sip - - - port: 5061 - module: ejabberd_sip - tls: true - certfile: /etc/ejabberd/server.pem - ... + listen: + ... + - + port: 5060 + transport: udp + module: ejabberd_sip + - + port: 5060 + module: ejabberd_sip + - + port: 5061 + module: ejabberd_sip + tls: true + certfile: /etc/ejabberd/server.pem + ... Note that there is no StartTLS support in SIP and [`SNI`][21] support is @@ -1869,16 +1879,16 @@ recommended. Example configuration of NAPTR records: - example.com IN NAPTR 10 0 "s" "SIPS+D2T" "" _sips._tcp.example.com. - example.com IN NAPTR 20 0 "s" "SIP+D2T" "" _sip._tcp.example.com. - example.com IN NAPTR 30 0 "s" "SIP+D2U" "" _sip._udp.example.com. + example.com IN NAPTR 10 0 "s" "SIPS+D2T" "" _sips._tcp.example.com. + example.com IN NAPTR 20 0 "s" "SIP+D2T" "" _sip._tcp.example.com. + example.com IN NAPTR 30 0 "s" "SIP+D2U" "" _sip._udp.example.com. Example configuration of SRV records with standard ports (as per [`RFC 3261`][23]): - _sip._udp IN SRV 0 0 5060 sip.example.com. - _sip._tcp IN SRV 0 0 5060 sip.example.com. - _sips._tcp IN SRV 0 0 5061 sip.example.com. + _sip._udp IN SRV 0 0 5060 sip.example.com. + _sip._tcp IN SRV 0 0 5060 sip.example.com. + _sips._tcp IN SRV 0 0 5061 sip.example.com. ### Note on SIP usage @@ -1904,45 +1914,45 @@ wildcards. The file must exist and be readable. The allowed suboptions are: **`disallow: [Optionname, ...]`**: Disallows the usage of those options in the included configuration - file. The options that match this criteria are not accepted. The - default value is an empty list: `[]` + file. The options that match this criteria are not accepted. The + default value is an empty list: `[]` **`allow_only: [Optionname, ...]`**: Allows only the usage of those options in the included configuration - file. The options that do not match this criteria are not accepted. - The default value is: `all` + file. The options that do not match this criteria are not accepted. + The default value is: `all` This is a basic example: - include_config_file: /etc/ejabberd/additional.yml + include_config_file: /etc/ejabberd/additional.yml In this example, the included file is not allowed to contain a `listen` option. If such an option is present, the option will not be accepted. The file is in a subdirectory from where the main configuration file is. - include_config_file: - ./example.org/additional_not_listen.yml: - disallow: [listen] + include_config_file: + ./example.org/additional_not_listen.yml: + disallow: [listen] Please notice that options already defined in the main configuration file cannot be redefined in the included configuration files. But you can use `host_config` and `append_host_config` as usual (see [Virtual Hosting](#virtual-hosting)). In this example, `ejabberd.yml` defines some ACL for the whole ejabberd server, and later includes another file: - acl: - admin: - user: - - admin@localhost - include_config_file: - /etc/ejabberd/acl.yml + acl: + admin: + user: + - admin@localhost + include_config_file: + /etc/ejabberd/acl.yml The file `acl.yml` can add additional administrators to one of the virtual hosts: - append_host_config: - localhost: - acl: - admin: - user: - - bob@localhost - - jan@localhost + append_host_config: + localhost: + acl: + admin: + user: + - bob@localhost + - jan@localhost ## Option Macros in Configuration File @@ -1965,55 +1975,50 @@ It is possible to use a macro in the definition of another macro. This example shows the basic usage of a macro: - - define_macro: - LOG_LEVEL_NUMBER: 5 - loglevel: LOG_LEVEL_NUMBER + define_macro: + LOG_LEVEL_NUMBER: 5 + loglevel: LOG_LEVEL_NUMBER The resulting option interpreted by `ejabberd` is: `loglevel: 5`. This example shows that values can be any arbitrary YAML value: - - define_macro: - USERBOB: - user: - - bob@localhost - acl: - admin: USERBOB + define_macro: + USERBOB: + user: + - bob@localhost + acl: + admin: USERBOB The resulting option interpreted by `ejabberd` is: - - acl: - admin: - user: - - bob@localhost + acl: + admin: + user: + - bob@localhost This complex example: - - define_macro: - NUMBER_PORT_C2S: 5222 - NUMBER_PORT_HTTP: 5280 - listen: - - - port: NUMBER_PORT_C2S - module: ejabberd_c2s - - - port: NUMBER_PORT_HTTP - module: ejabberd_http + define_macro: + NUMBER_PORT_C2S: 5222 + NUMBER_PORT_HTTP: 5280 + listen: + - + port: NUMBER_PORT_C2S + module: ejabberd_c2s + - + port: NUMBER_PORT_HTTP + module: ejabberd_http produces this result after being interpreted: - - listen: - - - port: 5222 - module: ejabberd_c2s - - - port: 5280 - module: ejabberd_http + listen: + - + port: 5222 + module: ejabberd_c2s + - + port: 5280 + module: ejabberd_http # Database and LDAP Configuration @@ -2027,31 +2032,31 @@ storage systems for modules, and so forth. The following databases are supported by `ejabberd`: -- [`Mnesia`][24] +- [`Mnesia`][24] -- [`MySQL`][25] +- [`MySQL`][25] -- [`Any ODBC compatible database`][26] +- [`Any ODBC compatible database`][26] -- [`PostgreSQL`][27] +- [`PostgreSQL`][27] -- [`MS SQL Server/SQL Azure`][115] +- [`MS SQL Server/SQL Azure`][115] -- [`SQLite`][119] +- [`SQLite`][119] -- [`Redis`][29] (only for transient data) +- [`Redis`][29] (only for transient data) The following LDAP servers are tested with `ejabberd`: -- [`Active Directory`][30] (see - section [Active Directory](#active-directory)) +- `Active Directory` (see + section [Active Directory](#active-directory)) -- [`OpenLDAP`][31] +- [`OpenLDAP`][31] -- [`CommuniGate Pro`][32] +- [`CommuniGate Pro`][32] -- Normally any LDAP compatible server should work; inform us about - your success with a not-listed server so that we can list it here. +- Normally any LDAP compatible server should work; inform us about + your success with a not-listed server so that we can list it here. Important note about virtual hosting: if you define several domains in ejabberd.yml (see section [Host Names](#host-names)), you probably want that each @@ -2061,15 +2066,14 @@ virtual hosts. For that purpose, the options described in the next sections must be set inside a `host_config` for each vhost (see section [Virtual Hosting](#virtual-hosting)). For example: - - host_config: - public.example.org: - sql_type: pgsql - sql_server: localhost - sql_database: database-public-example-org - sql_username: ejabberd - sql_password: password - auth_method: [sql] + host_config: + public.example.org: + sql_type: pgsql + sql_server: localhost + sql_database: database-public-example-org + sql_username: ejabberd + sql_password: password + auth_method: [sql] ## Relational Databases @@ -2087,7 +2091,7 @@ are using PostgreSQL and need the new schema, use `pg.new.sql`. If you choose the new schema, you MUST add an extra line into `ejabberd.yml` configuration file to enable the feature: - new_sql_schema: true + new_sql_schema: true The actual database access is defined in the options with `sql_` prefix. The values are used to define if we want to use ODBC, or one of @@ -2100,60 +2104,58 @@ The following parameters are available: **`sql_server: String`**: A hostname of the SQL server. The default is `localhost`. **`sql_port: Port`**: The port where the SQL server is accepting connections. The option - is valid for `mysql`, `pgsql` and `mssql`. The default is `3306` and - `5432` respectively. + is valid for `mysql`, `pgsql` and `mssql`. The default is `3306` and + `5432` respectively. **`sql_database: String`**: The database name. The default is `ejabberd`. The option is valid - for `mysql`, `pgsql` and `mssql`. + for `mysql`, `pgsql` and `mssql`. **`sql_username: String`**: The username. The default is `ejabberd`. The option is valid - for `mysql`, `pgsql` and `mssql`. + for `mysql`, `pgsql` and `mssql`. **`sql_password: String`**: The password. The default is empty string. The option is valid - for `mysql`, `pgsql` and `mssql`. + for `mysql`, `pgsql` and `mssql`. **`sql_ssl: Boolean`**: use ssl if not set plain tcp. - The default value is `false`. The option is valid for `pgsql` and `mysql`. + The default value is `false`. The option is valid for `pgsql` and `mysql`. **`sql_ssl_verify: Boolean`**: if set verify ssl connect. - The default value is `false`. The option is valid for `pgsql`. + The default value is `false`. The option is valid for `pgsql`. **`sql_ssl_cafile: String`**: The path to a CA certificate file. - By default the option is not set. The option is valid for `pgsql`. + By default the option is not set. The option is valid for `pgsql`. **`sql_ssl_certfile: String`**: The path to a client/authentication certificate file. - By default the option is not set. The option is valid for `pgsql`. + By default the option is not set. The option is valid for `pgsql`. **`sql_pool_size: N`**: By default `ejabberd` opens 10 connections to the database for each - virtual host. You can change this number by using this option. + virtual host. You can change this number by using this option. **`sql_keepalive_interval: N`**: You can configure an interval to make a dummy SQL request to keep - alive the connections to the database. The default value is - ’undefined’, so no keepalive requests are made. Specify in seconds: - for example 28800 means 8 hours. + alive the connections to the database. The default value is + ’undefined’, so no keepalive requests are made. Specify in seconds: + for example 28800 means 8 hours. **`sql_start_interval: N`**: If the connection to the database fails, `ejabberd` waits 30 seconds - before retrying. You can modify this interval with this option. + before retrying. You can modify this interval with this option. **`sql_prepared_statements: Boolean`**: If you need to disable prepared - statements. The default value is `true`. The option is valid for - `pgsql` and `mysql`. + statements. The default value is `true`. The option is valid for + `pgsql` and `mysql`. Example of plain ODBC connection: - - sql_server: "DSN=database;UID=ejabberd;PWD=password" + sql_server: "DSN=database;UID=ejabberd;PWD=password" Example of MySQL connection: - - sql_type: mysql - sql_server: server.company.com - sql_port: 3306 # the default - sql_database: mydb - sql_username: user1 - sql_password: "**********" - sql_pool_size: 5 + sql_type: mysql + sql_server: server.company.com + sql_port: 3306 # the default + sql_database: mydb + sql_username: user1 + sql_password: "**********" + sql_pool_size: 5 ## Microsoft SQL Notes @@ -2162,11 +2164,10 @@ For now, MS SQL is only supported in Unix-like OS'es. You need to have Also, in some cases you need to add machine name to `sql_username`, especially when you have `sql_server` defined as an IP address, e.g.: - - sql_type: mssql - sql_server: 1.2.3.4 - ... - sql_username: user1@host + sql_type: mssql + sql_server: 1.2.3.4 + ... + sql_username: user1@host ### SQL Authentication @@ -2179,8 +2180,7 @@ Please note that if you use SQL auth method and set SCRAM format, old plain passwords that may be stored in the database are not automatically scrammed. For that, you can execute the command: - - ejabberdctl convert_to_scram example.org + ejabberdctl convert_to_scram example.org ### SQL Storage @@ -2191,7 +2191,6 @@ storage to your database, just make sure that your database is running well (see previous sections), and add the module option `db_type: sql` or set `default_db: sql` globally if you want to use SQL for all modules. - ## LDAP `ejabberd` has built-in LDAP support. You can authenticate users against @@ -2211,36 +2210,36 @@ authentication and other for regular calls. Parameters: **`ldap_servers: [Servers, ...]`**: List of IP addresses or DNS names of your LDAP servers. This option - is required. + is required. **`ldap_encrypt: none|tls`**: Type of connection encryption to the LDAP server. Allowed values - are: `none`, `tls`. The value `tls` enables encryption by using LDAP - over SSL. Note that STARTTLS encryption is not supported. The - default value is: `none`. + are: `none`, `tls`. The value `tls` enables encryption by using LDAP + over SSL. Note that STARTTLS encryption is not supported. The + default value is: `none`. **`ldap_tls_verify: false|soft|hard`**: This option specifies whether to verify LDAP server certificate or - not when TLS is enabled. When `hard` is enabled `ejabberd` doesn’t - proceed if a certificate is invalid. When `soft` is enabled - `ejabberd` proceeds even if check fails. The default is `false` - which means no checks are performed. + not when TLS is enabled. When `hard` is enabled `ejabberd` doesn’t + proceed if a certificate is invalid. When `soft` is enabled + `ejabberd` proceeds even if check fails. The default is `false` + which means no checks are performed. **`ldap_tls_cacertfile: Path`**: Path to file containing PEM encoded CA certificates. This option is - needed (and required) when TLS verification is enabled. + needed (and required) when TLS verification is enabled. **`ldap_tls_depth: Number`**: Specifies the maximum verification depth when TLS verification is - enabled, i.e. how far in a chain of certificates the verification - process can proceed before the verification is considered to fail. - Peer certificate = 0, CA certificate = 1, higher level CA - certificate = 2, etc. The value 2 thus means that a chain can at - most contain peer cert, CA cert, next CA cert, and an additional CA - cert. The default value is 1. + enabled, i.e. how far in a chain of certificates the verification + process can proceed before the verification is considered to fail. + Peer certificate = 0, CA certificate = 1, higher level CA + certificate = 2, etc. The value 2 thus means that a chain can at + most contain peer cert, CA cert, next CA cert, and an additional CA + cert. The default value is 1. **`ldap_port: Number`**: Port to connect to your LDAP server. The default port is 389 if - encryption is disabled; and 636 if encryption is enabled. If you - configure a value, it is stored in `ejabberd`’s database. Then, if - you remove that value from the configuration file, the value - previously stored in the database will be used instead of the - default port. + encryption is disabled; and 636 if encryption is enabled. If you + configure a value, it is stored in `ejabberd`’s database. Then, if + you remove that value from the configuration file, the value + previously stored in the database will be used instead of the + default port. **`ldap_rootdn: RootDN`**: Bind DN. The default value is empty string "" which means ‘anonymous connection’. @@ -2250,13 +2249,12 @@ Parameters: Example: - - auth_method: [ldap] - ldap_servers: - - ldap1.example.org - ldap_port: 389 - ldap_rootdn: "cn=Manager,dc=domain,dc=org" - ldap_password: "**********" + auth_method: [ldap] + ldap_servers: + - ldap1.example.org + ldap_port: 389 + ldap_rootdn: "cn=Manager,dc=domain,dc=org" + ldap_password: "**********" ### LDAP Authentication @@ -2266,43 +2264,42 @@ LDAP implementation does not support SASL authentication. Available options are: **`ldap_base: Base`**: LDAP base directory which stores users accounts. This option is - required. + required. **`ldap_uids: [ ldap_uidattr | {ldap_uidattr: ldap_uidattr_format} ]`**: LDAP attribute which holds a list of attributes to use as - alternatives for getting the JID. The default attributes are - `[{uid, %u}]`. The attributes are of the form: `[{ldap_uidattr}]` or - `[{ldap_uidattr, ldap_uidattr_format}]`. You can use as many comma - separated attributes as needed. The values for `ldap_uidattr` and - `ldap_uidattr_format` are described as follow: + alternatives for getting the JID. The default attributes are + `[{uid, %u}]`. The attributes are of the form: `[{ldap_uidattr}]` or + `[{ldap_uidattr, ldap_uidattr_format}]`. You can use as many comma + separated attributes as needed. The values for `ldap_uidattr` and + `ldap_uidattr_format` are described as follow: -* **`ldap_uidattr`**: LDAP attribute which holds the user’s part of a JID. The default - value is `uid`. +- **`ldap_uidattr`**: LDAP attribute which holds the user’s part of a JID. The default + value is `uid`. -* **`ldap_uidattr_format`**: Format of the `ldap_uidattr` variable. The format *must* contain - one and only one pattern variable `%u` which will be replaced by - the user’s part of a JID. For example, `%u@example.org`. The - default value is `%u`. +- **`ldap_uidattr_format`**: Format of the `ldap_uidattr` variable. The format *must* contain + one and only one pattern variable `%u` which will be replaced by + the user’s part of a JID. For example, `%u@example.org`. The + default value is `%u`. **`ldap_filter: Filter`**: [`RFC 4515`][34] LDAP filter. The - default Filter value is: `undefined`. Example: - `(&(objectClass=shadowAccount)(memberOf=Jabber Users))`. Please, do - not forget to close brackets and do not use superfluous whitespaces. - Also you *must not* use `ldap_uidattr` attribute in filter because - this attribute will be substituted in LDAP filter automatically. + default Filter value is: `undefined`. Example: + `(&(objectClass=shadowAccount)(memberOf=Jabber Users))`. Please, do + not forget to close brackets and do not use superfluous whitespaces. + Also you *must not* use `ldap_uidattr` attribute in filter because + this attribute will be substituted in LDAP filter automatically. **`ldap_dn_filter: { Filter: FilterAttrs }`**: This filter is applied on the results returned by the main filter. - This filter performs additional LDAP lookup to make the complete - result. This is useful when you are unable to define all filter - rules in `ldap_filter`. You can define `%u`, `%d`, `%s` and `%D` - pattern variables in Filter: `%u` is replaced by a user’s part of a - JID, `%d` is replaced by the corresponding domain (virtual host), - all `%s` variables are consecutively replaced by values of - FilterAttrs attributes and `%D` is replaced by Distinguished Name. - By default `ldap_dn_filter` is undefined. Example: - - - ldap_dn_filter: - "(&(name=%s)(owner=%D)(user=%u@%d))": [sn] + This filter performs additional LDAP lookup to make the complete + result. This is useful when you are unable to define all filter + rules in `ldap_filter`. You can define `%u`, `%d`, `%s` and `%D` + pattern variables in Filter: `%u` is replaced by a user’s part of a + JID, `%d` is replaced by the corresponding domain (virtual host), + all `%s` variables are consecutively replaced by values of + FilterAttrs attributes and `%D` is replaced by Distinguished Name. + By default `ldap_dn_filter` is undefined. Example: + + ldap_dn_filter: + "(&(name=%s)(owner=%D)(user=%u@%d))": [sn] Since this filter makes additional LDAP lookups, use it only in the last resort: try to define all filter rules in `ldap_filter` if @@ -2320,67 +2317,65 @@ connection to the LDAP server is encrypted using TLS, and using the custom port 6123. Corresponding authentication section should looks like this: - - ## Authentication method - auth_method: [ldap] - ## DNS name of our LDAP server - ldap_servers: [ldap.example.org] - ## Bind to LDAP server as "cn=Manager,dc=example,dc=org" with password "secret" - ldap_rootdn: "cn=Manager,dc=example,dc=org" - ldap_password: secret - ldap_encrypt: tls - ldap_port: 6123 - ## Define the user's base - ldap_base: "ou=Users,dc=example,dc=org" - ## We want to authorize users from 'shadowAccount' object class only - ldap_filter: "(objectClass=shadowAccount)" + ## Authentication method + auth_method: [ldap] + ## DNS name of our LDAP server + ldap_servers: [ldap.example.org] + ## Bind to LDAP server as "cn=Manager,dc=example,dc=org" with password "secret" + ldap_rootdn: "cn=Manager,dc=example,dc=org" + ldap_password: secret + ldap_encrypt: tls + ldap_port: 6123 + ## Define the user's base + ldap_base: "ou=Users,dc=example,dc=org" + ## We want to authorize users from 'shadowAccount' object class only + ldap_filter: "(objectClass=shadowAccount)" Now we want to use users LDAP-info as their vCards. We have four attributes defined in our LDAP schema: `mail` — email address, `givenName` — first name, `sn` — second name, `birthDay` — birthday. Also we want users to search each other. Let’s see how we can set it up: - - modules: - ... - mod_vcard: - db_type: ldap - ## We use the same server and port, but want to bind anonymously because - ## our LDAP server accepts anonymous requests to - ## "ou=AddressBook,dc=example,dc=org" subtree. - ldap_rootdn: "" - ldap_password: "" - ## define the addressbook's base - ldap_base: "ou=AddressBook,dc=example,dc=org" - ## uidattr: user's part of JID is located in the "mail" attribute - ## uidattr_format: common format for our emails - ldap_uids: - mail: "%u@mail.example.org" - ## We have to define empty filter here, because entries in addressbook does not - ## belong to shadowAccount object class - ldap_filter: "" - ## Now we want to define vCard pattern - ldap_vcard_map: - NICKNAME: {"%u": []} # just use user's part of JID as their nickname - GIVEN: {"%s": [givenName]} - FAMILY: {"%s": [sn]} - FN: {"%s, %s": [sn, givenName]} # example: "Smith, John" - EMAIL: {"%s": [mail]} - BDAY: {"%s": [birthDay]}]} - ## Search form - ldap_search_fields: - User: "%u" - Name: givenName - "Family Name": sn - Email: mail - Birthday: birthDay - ## vCard fields to be reported - ## Note that JID is always returned with search results - ldap_search_reported: - "Full Name": FN - Nickname: NICKNAME - Birthday: BDAY - ... + modules: + ... + mod_vcard: + db_type: ldap + ## We use the same server and port, but want to bind anonymously because + ## our LDAP server accepts anonymous requests to + ## "ou=AddressBook,dc=example,dc=org" subtree. + ldap_rootdn: "" + ldap_password: "" + ## define the addressbook's base + ldap_base: "ou=AddressBook,dc=example,dc=org" + ## uidattr: user's part of JID is located in the "mail" attribute + ## uidattr_format: common format for our emails + ldap_uids: + mail: "%u@mail.example.org" + ## We have to define empty filter here, because entries in addressbook does not + ## belong to shadowAccount object class + ldap_filter: "" + ## Now we want to define vCard pattern + ldap_vcard_map: + NICKNAME: {"%u": []} # just use user's part of JID as their nickname + GIVEN: {"%s": [givenName]} + FAMILY: {"%s": [sn]} + FN: {"%s, %s": [sn, givenName]} # example: "Smith, John" + EMAIL: {"%s": [mail]} + BDAY: {"%s": [birthDay]}]} + ## Search form + ldap_search_fields: + User: "%u" + Name: givenName + "Family Name": sn + Email: mail + Birthday: birthDay + ## vCard fields to be reported + ## Note that JID is always returned with search results + ldap_search_reported: + "Full Name": FN + Nickname: NICKNAME + Birthday: BDAY + ... Note that `mod_vcard` with LDAP backend checks for the existence of the user before searching their information in LDAP. @@ -2390,52 +2385,51 @@ before searching their information in LDAP. Active Directory is just an LDAP-server with predefined attributes. A sample configuration is shown below: - - auth_method: [ldap] - ldap_servers: [office.org] # List of LDAP servers - ldap_base: "DC=office,DC=org" # Search base of LDAP directory - ldap_rootdn: "CN=Administrator,CN=Users,DC=office,DC=org" # LDAP manager - ldap_password: "*******" # Password to LDAP manager - ldap_uids: [sAMAccountName] - ldap_filter: "(memberOf=*)" - - modules: - ... - mod_vcard: - db_type: ldap - ldap_vcard_map: - NICKNAME: {"%u": []} - GIVEN: {"%s": [givenName]} - MIDDLE: {"%s": [initials]} - FAMILY: {"%s": [sn]} - FN: {"%s": [displayName]} - EMAIL: {"%s": [mail]} - ORGNAME: {"%s": [company]} - ORGUNIT: {"%s": [department]} - CTRY: {"%s": [c]} - LOCALITY: {"%s": [l]} - STREET: {"%s": [streetAddress]} - REGION: {"%s": [st]} - PCODE: {"%s": [postalCode]} - TITLE: {"%s": [title]} - URL: {"%s": [wWWHomePage]} - DESC: {"%s": [description]} - TEL: {"%s": [telephoneNumber]}]} - ldap_search_fields: - User: "%u" - Name: givenName - "Family Name": sn - Email: mail - Company: company - Department: department - Role: title - Description: description - Phone: telephoneNumber - ldap_search_reported: - "Full Name": FN - Nickname: NICKNAME - Email: EMAIL - ... + auth_method: [ldap] + ldap_servers: [office.org] # List of LDAP servers + ldap_base: "DC=office,DC=org" # Search base of LDAP directory + ldap_rootdn: "CN=Administrator,CN=Users,DC=office,DC=org" # LDAP manager + ldap_password: "*******" # Password to LDAP manager + ldap_uids: [sAMAccountName] + ldap_filter: "(memberOf=*)" + + modules: + ... + mod_vcard: + db_type: ldap + ldap_vcard_map: + NICKNAME: {"%u": []} + GIVEN: {"%s": [givenName]} + MIDDLE: {"%s": [initials]} + FAMILY: {"%s": [sn]} + FN: {"%s": [displayName]} + EMAIL: {"%s": [mail]} + ORGNAME: {"%s": [company]} + ORGUNIT: {"%s": [department]} + CTRY: {"%s": [c]} + LOCALITY: {"%s": [l]} + STREET: {"%s": [streetAddress]} + REGION: {"%s": [st]} + PCODE: {"%s": [postalCode]} + TITLE: {"%s": [title]} + URL: {"%s": [wWWHomePage]} + DESC: {"%s": [description]} + TEL: {"%s": [telephoneNumber]}]} + ldap_search_fields: + User: "%u" + Name: givenName + "Family Name": sn + Email: mail + Company: company + Department: department + Role: title + Description: description + Phone: telephoneNumber + ldap_search_reported: + "Full Name": FN + Nickname: NICKNAME + Email: EMAIL + ... ## Redis @@ -2446,21 +2440,20 @@ There are several options available: **`redis_server: String`**: A hostname of the Redis server. The default is `localhost`. **`redis_port: Port`**: The port where the Redis server is accepting connections. The default - is 6379. + is 6379. **`redis_password: String`**: The password to the Redis server. The default is an empty string, - i.e. no password. + i.e. no password. **`redis_db: N`**: Redis database number. The default is 0. **`redis_connect_timeout: N`**: A number of seconds to wait for the connection to be established to the Redis - server. The default is 1 second. + server. The default is 1 second. Example configuration: - - redis_server: redis.server.com - redis_db: 1 + redis_server: redis.server.com + redis_db: 1 ## Default database configuration @@ -2474,7 +2467,7 @@ By default pointers to C2S sessions are kept in Mnesia. You may want to use another database backend for this. The option is: **`sm_db_type: mnesia|sql|redis`**: Note that for `sql` or `redis` you should have them configured. See sections - [Relational Databases](#relational-databases) or [Redis](#redis). + [Relational Databases](#relational-databases) or [Redis](#redis). # Modules Configuration @@ -2489,21 +2482,19 @@ The syntax is: Examples: -- In this example only the module `mod_muc` is loaded and no module - options are specified between the square brackets: - - - modules: - mod_muc: {} +- In this example only the module `mod_muc` is loaded and no module + options are specified between the square brackets: -- In the second example the modules `mod_muc`, `mod_time`, and - `mod_version` are loaded without options. + modules: + mod_muc: {} +- In the second example the modules `mod_muc`, `mod_time`, and + `mod_version` are loaded without options. - modules: - mod_muc: {} - mod_time: {} - mod_version: {} + modules: + mod_muc: {} + mod_time: {} + mod_version: {} ## Modules Overview @@ -2512,69 +2503,68 @@ The following table lists all modules included in `ejabberd`. | **Module** | **Feature** | **Dependencies** | |:-----------------------------------------------|:-----------------------------------------------------|:---------------------------------| | mod_adhoc | Ad-Hoc Commands ([`XEP-0050`][38]) | | -| [mod_announce](#mod-announce) | Manage announcements | recommends `mod_adhoc` | -| [mod_avatar](#mod-avatar) | User Avatar to vCard-Based Avatars Conversion ([`XEP-0398`][130]) | `mod_vcard`, `mod_vcard_xupdate`, `mod_pubsub` | -| [mod_block_strangers](#mod-block-strangers) | Block packets from non-subscribers | | +| [mod_announce](#mod_announce) | Manage announcements | recommends `mod_adhoc` | +| [mod_block_strangers](#mod_block_strangers) | Block packets from non-subscribers | | | mod_blocking | Simple Communications Blocking ([`XEP-0191`][39]) | `mod_privacy` | -| [mod_bosh](#mod-bosh) | BOSH ([`XEP-0124`][69]) and XMPP over BOSH ([`XEP-0206`][70]) | `ejabberd_c2s` listener | +| [mod_bosh](#mod_bosh) | BOSH ([`XEP-0124`][69]) and XMPP over BOSH ([`XEP-0206`][70]) | `ejabberd_c2s` listener | | mod_caps | Entity Capabilities ([`XEP-0115`][40]) | | | mod_carboncopy | Message Carbons ([`XEP-0280`][41]) | | -| [mod_client_state](#mod-client-state) | Filter stanzas for inactive clients | | +| [mod_client_state](#mod_client_state) | Filter stanzas for inactive clients | | | mod_configure | Server configuration using Ad-Hoc | `mod_adhoc` | -| [mod_delegation](#mod-delegation) | Namespace Delegation ([`XEP-0355`][123]) | | -| [mod_disco](#mod-disco) | Service Discovery ([`XEP-0030`][42]) | | -| [mod_fail2ban](#mod-fail2ban) | Bans IPs that show the malicious signs | | -| [mod_http_api](#mod-http-api) | REST API for ejabberd using JSON data | | -| [mod_http_fileserver](#mod-http-fileserver) | Small HTTP file server | | -| [mod_http_upload](#mod-http-upload) | HTTP File Upload ([`XEP-0363`][120]) | | -| [mod_http_upload_quota](#mod-http-upload-quota)| HTTP File Upload Quotas | `mod_http_upload` | -| [mod_jidprep](#mod-jidprep) | JID Prep ([`XEP-0328`][128]) | | -| [mod_last](#mod-last) | Last Activity ([`XEP-0012`][43]) | | -| [mod_mam](#mod-mam) | Message Archive Management ([`XEP-0313`][114]) | `mod_mam` | -| [mod_mix](#mod-mix) | Mediated Information eXchange ([`XEP-0369`][122]) | `mod_pubsub` | -| [mod_metrics](#mod-metrics) | Simple metrics handler for runtime statistics | | -| [mod_muc](#mod-muc) | Multi-User Chat ([`XEP-0045`][44]) | | +| [mod_delegation](#mod_delegation) | Namespace Delegation ([`XEP-0355`][123]) | | +| [mod_disco](#mod_disco) | Service Discovery ([`XEP-0030`][42]) | | +| [mod_fail2ban](#mod_fail2ban) | Bans IPs that show the malicious signs | | +| [mod_http_api](#mod_http_api) | REST API for ejabberd using JSON data | | +| [mod_http_fileserver](#mod_http_fileserver) | Small HTTP file server | | +| [mod_http_upload](#mod_http_upload) | HTTP File Upload ([`XEP-0363`][120]) | | +| [mod_http_upload_quota](#mod_http_upload_quota)| HTTP File Upload Quotas | `mod_http_upload` | +| [mod_jidprep](#mod_jidprep) | JID Prep ([`XEP-0328`][128]) | | +| [mod_last](#mod_last) | Last Activity ([`XEP-0012`][43]) | | +| [mod_mam](#mod_mam) | Message Archive Management ([`XEP-0313`][114]) | `mod_mam` | +| [mod_mix](#mod_mix) | Mediated Information eXchange ([`XEP-0369`][122]) | `mod_pubsub` | +| [mod_metrics](#mod_metrics) | Simple metrics handler for runtime statistics | | +| [mod_muc](#mod_muc) | Multi-User Chat ([`XEP-0045`][44]) | | | mod_muc_admin | Administrative commands for Multi-User Chat | `mod_muc` | -| [mod_muc_log](#mod-muc-log) | Multi-User Chat room logging | `mod_muc` | -| [mod_multicast](#mod-multicast) | Extended Stanza Addressing ([`XEP-0033`][109]) | | -| [mod_offline](#mod-offline) | Offline message storage ([`XEP-0160`][45]) | | -| [mod_ping](#mod-ping) | XMPP Ping and periodic keepalives ([`XEP-0199`][46]) | | -| [mod_pres_counter](#mod-pres-counter) | Detect presence subscription flood | | -| [mod_privacy](#mod-privacy) | Blocking Communication ([`XEP-0016`][47]) | | -| [mod_private](#mod-private) | Private XML Storage ([`XEP-0049`][48]) | | -| [mod_privilege](#mod-privilege) | Privileged Entity ([`XEP-0356`][124]) | | -| [mod_proxy65](#mod-proxy65) | SOCKS5 Bytestreams ([`XEP-0065`][49]) | | -| [mod_pubsub](#mod-pubsub) | Pub-Sub ([`XEP-0060`][50]), PEP ([`XEP-0163`][51]) | `mod_caps` | -| [mod_push](#mod-push) | Push Notifications ([`XEP-0357`][126]) | | -| [mod_push_keepalive](#mod-push-keepalive) | Keep sessions of push clients alive | `mod_push` | -| [mod_register](#mod-register) | In-Band Registration ([`XEP-0077`][54]) | | -| [mod_register_web](#mod-register-web) | Web for Account Registrations | | -| [mod_roster](#mod-roster) | Roster management (XMPP IM) | | -| [mod_s2s_dialback](#mod-s2s-dialback) | Server Dialback ([`XEP-0220`][127]) | | -| [mod_service_log](#mod-service-log) | Copy user messages to logger service | | -| [mod_shared_roster](#mod-shared-roster) | Shared roster management | `mod_roster` | -| [mod_shared_roster_ldap](#mod-shared-roster-ldap) | LDAP Shared roster management | `mod_roster` | -| [mod_sic](#mod-sic) | Server IP Check ([`XEP-0279`][55]) | | -| [mod_sip](#mod-sip) | SIP Registrar/Proxy ([`RFC 3261`][56]) | `ejabberd_sip` | -| [mod_stats](#mod-stats) | Statistics Gathering ([`XEP-0039`][57]) | | -| [mod_stream_mgmt](#mod-stream-mgmt) | Stream Management ([`XEP-0198`][125]) | | -| [mod_time](#mod-time) | Entity Time ([`XEP-0202`][58]) | | -| [mod_vcard](#mod-vcard) | vcard-temp ([`XEP-0054`][59]) | | -| [mod_vcard_xupdate](#mod-vcard-xupdate) | vCard-Based Avatars ([`XEP-0153`][61]) | `mod_vcard` | -| [mod_version](#mod-version) | Software Version ([`XEP-0092`][62]) | | - -- (\*) This module requires a supported database. For a list of - supported databases, see section [Database and LDAP Configuration](#database-and-ldap-configuration). +| [mod_muc_log](#mod_muc_log) | Multi-User Chat room logging | `mod_muc` | +| [mod_multicast](#mod_multicast) | Extended Stanza Addressing ([`XEP-0033`][109]) | | +| [mod_offline](#mod_offline) | Offline message storage ([`XEP-0160`][45]) | | +| [mod_ping](#mod_ping) | XMPP Ping and periodic keepalives ([`XEP-0199`][46]) | | +| [mod_pres_counter](#mod_pres_counter) | Detect presence subscription flood | | +| [mod_privacy](#mod_privacy) | Blocking Communication ([`XEP-0016`][47]) | | +| [mod_private](#mod_private) | Private XML Storage ([`XEP-0049`][48]) | | +| [mod_privilege](#mod_privilege) | Privileged Entity ([`XEP-0356`][124]) | | +| [mod_proxy65](#mod_proxy65) | SOCKS5 Bytestreams ([`XEP-0065`][49]) | | +| [mod_pubsub](#mod_pubsub) | Pub-Sub ([`XEP-0060`][50]), PEP ([`XEP-0163`][51]) | `mod_caps` | +| [mod_push](#mod_push) | Push Notifications ([`XEP-0357`][126]) | | +| [mod_push_keepalive](#mod_push_keepalive) | Keep sessions of push clients alive | `mod_push` | +| [mod_register](#mod_register) | In-Band Registration ([`XEP-0077`][54]) | | +| [mod_register_web](#mod_register_web) | Web for Account Registrations | | +| [mod_roster](#mod_roster) | Roster management (XMPP IM) | | +| [mod_s2s_dialback](#mod_s2s_dialback) | Server Dialback ([`XEP-0220`][127]) | | +| [mod_service_log](#mod_service_log) | Copy user messages to logger service | | +| [mod_shared_roster](#mod_shared_roster) | Shared roster management | `mod_roster` | +| [mod_shared_roster_ldap](#mod_shared_roster_ldap) | LDAP Shared roster management | `mod_roster` | +| [mod_sic](#mod_sic) | Server IP Check ([`XEP-0279`][55]) | | +| [mod_sip](#mod_sip) | SIP Registrar/Proxy ([`RFC 3261`][56]) | `ejabberd_sip` | +| [mod_stats](#mod_stats) | Statistics Gathering ([`XEP-0039`][57]) | | +| [mod_stream_mgmt](#mod_stream_mgmt) | Stream Management ([`XEP-0198`][125]) | | +| [mod_time](#mod_time) | Entity Time ([`XEP-0202`][58]) | | +| [mod_vcard](#mod_vcard) | vcard-temp ([`XEP-0054`][59]) | | +| [mod_vcard_xupdate](#mod_vcard_xupdate) | vCard-Based Avatars ([`XEP-0153`][61]) | `mod_vcard` | +| [mod_version](#mod_version) | Software Version ([`XEP-0092`][62]) | | + +- (\*) This module requires a supported database. For a list of + supported databases, see section [Database and LDAP Configuration](#database-and-ldap-configuration). You can see which database backend each module needs by looking at the suffix: -- No suffix, this means that the module uses Erlang’s built-in - database Mnesia as backend or SQL database - (see [Database and LDAP Configuration](#database-and-ldap-configuration)). +- No suffix, this means that the module uses Erlang’s built-in + database Mnesia as backend or SQL database + (see [Database and LDAP Configuration](#database-and-ldap-configuration)). -- ‘\_ldap’, this means that the module needs an LDAP server as - backend. +- ‘\_ldap’, this means that the module needs an LDAP server as + backend. You can find more [`contributed modules`][63] on the @@ -2602,23 +2592,20 @@ start time with the real virtual host string. This example configures the MUC module to provide its service in the Jabber ID `conference.example.org`: - - modules: - ... - mod_muc: - host: conference.example.org - ... + modules: + ... + mod_muc: + host: conference.example.org + ... However, if there are several virtual hosts and this module is enabled in all of them, the “@HOST@” keyword must be used: - - modules: - ... - mod_muc: - host: "conference.@HOST@" - ... - + modules: + ... + mod_muc: + host: "conference.@HOST@" + ... ### Caching @@ -2651,7 +2638,6 @@ like `auth`, `oauth`, `router` and `sm`. In those cases, please prepend the option names with the part name, for example `router_use_cache`, or `sm_cache_size`. - ## mod_admin_extra Available option: @@ -2663,7 +2649,6 @@ Available option: In this example configuration, the users vCards can only be modified by executing `mod_admin_extra` commands: - acl: adminextraresource: - resource: "modadminextraf8x,31ad" @@ -2684,16 +2669,14 @@ Description of some commands: - Other OS: on the same directory where the .beam files are. Example content for the roster file: - - [{<<"bob">>, <<"example.org">>, <<"workers">>, <<"Bob">>}, - {<<"mart">>, <<"example.org">>, <<"workers">>, <<"Mart">>}, - {<<"Rich">>, <<"example.org">>, <<"bosses">>, <<"Rich">>}]. + [{<<"bob">>, <<"example.org">>, <<"workers">>, <<"Bob">>}, + {<<"mart">>, <<"example.org">>, <<"workers">>, <<"Mart">>}, + {<<"Rich">>, <<"example.org">>, <<"bosses">>, <<"Rich">>}]. **`srg-create`**: If you want to put a group Name with blankspaces, use the characters "' and '" to define when the Name starts and ends. For example: - - ejabberdctl srg-create g1 example.org "'Group number 1'" this_is_g1 g1 + ejabberdctl srg-create g1 example.org "'Group number 1'" this_is_g1 g1 **`ban-account`**: This command kicks all the connected sessions of the account from the server. It also changes their password to a randomly @@ -2705,15 +2688,12 @@ also includes the reason and the date and time of the ban. For example, if this command is called: + ejabberdctl vhost example.org ban-account boby Spammed several MUC rooms - ejabberdctl vhost example.org ban-account boby Spammed several MUC rooms - -then the sessions of the local account which JID is boby@example.org +then the sessions of the local account which JID is will be kicked, and its password will be set to something like this: - - BANNED_ACCOUNT--20080425T21:45:07--2176635--Spammed_several_MUC_rooms - + BANNED_ACCOUNT--20080425T21:45:07--2176635--Spammed_several_MUC_rooms ## mod_announce @@ -2731,25 +2711,25 @@ first JID in each entry will apply only to the specified virtual host hosts in ejabberd. **`example.org/announce/all (example.org/announce/all-hosts/all)`**: The message is sent to all registered users. If the user is online - and connected to several resources, only the resource with the - highest priority will receive the message. If the registered user is - not connected, the message will be stored offline in assumption that - offline storage (see section  [mod_offline](#mod-offline)) is enabled. + and connected to several resources, only the resource with the + highest priority will receive the message. If the registered user is + not connected, the message will be stored offline in assumption that + offline storage (see section  [mod_offline](#mod_offline)) is enabled. **`example.org/announce/online (example.org/announce/all-hosts/online)`**: The message is sent to all connected users. If the user is online - and connected to several resources, all resources will receive the - message. + and connected to several resources, all resources will receive the + message. **`example.org/announce/motd (example.org/announce/all-hosts/motd)`**: The message is set as the message of the day (MOTD) and is sent to - users when they login. In addition the message is sent to all - connected users (similar to `announce/online`). + users when they login. In addition the message is sent to all + connected users (similar to `announce/online`). **`example.org/announce/motd/update (example.org/announce/all-hosts/motd/update)`**: The message is set as message of the day (MOTD) and is sent to users - when they login. The message is *not sent* to any currently - connected user. + when they login. The message is *not sent* to any currently + connected user. **`example.org/announce/motd/delete (example.org/announce/all-hosts/motd/delete)`**: Any message sent to this JID removes the existing message of the day - (MOTD). + (MOTD). Options: @@ -2758,47 +2738,45 @@ Options: **`use_cache: false|true`**: Use this option and related ones as explained in section [Caching](#caching). **`access: AccessName`**: This option specifies who is allowed to send announcements and to - set the message of the day (by default, nobody is able to send such - messages). + set the message of the day (by default, nobody is able to send such + messages). Examples: -- Only administrators can send announcements: - - - access_rules: - announce: - - allow: admin - - modules: - ... - mod_adhoc: {} - mod_announce: - access: announce - ... +- Only administrators can send announcements: -- Administrators as well as the direction can send announcements: + access_rules: + announce: + - allow: admin + modules: + ... + mod_adhoc: {} + mod_announce: + access: announce + ... - acl: - direction: - user: - big_boss@example.org - assistant@example.org - admin: - user: - admin@example.org - access_rules: - announce: - - allow: admin - - allow: direction - - modules: - ... - mod_adhoc: {} - mod_announce: - access: announce - ... +- Administrators as well as the direction can send announcements: + + acl: + direction: + user: + big_boss@example.org + assistant@example.org + admin: + user: + admin@example.org + access_rules: + announce: + - allow: admin + - allow: direction + + modules: + ... + mod_adhoc: {} + mod_announce: + access: announce + ... Note that `mod_announce` can be resource intensive on large deployments as it can broadcast lot of messages. This module should be disabled for @@ -2843,28 +2821,28 @@ more generally to have a way to use XMPP while having to get through an HTTP pro To use XMPP over BOSH, enable the module: - modules: - ... - mod_bosh: {} - ... + modules: + ... + mod_bosh: {} + ... and add `mod_bosh` in the HTTP listener service, together with `ejabberd_c2s`. For example: - listen: - - - port: 5222 - module: ejabberd_c2s - max_stanza_size: 65536 - shaper: c2s_shaper - access: c2s - ... - - - port: 5280 - module: ejabberd_http - request_handlers: - /bosh: mod_bosh - /admin: ejabberd_web_admin - ... + listen: + - + port: 5222 + module: ejabberd_c2s + max_stanza_size: 65536 + shaper: c2s_shaper + access: c2s + ... + - + port: 5280 + module: ejabberd_http + request_handlers: + /bosh: mod_bosh + /admin: ejabberd_web_admin + ... With this configuration, the module will serve the requests sent to `http://example.org:5280/bosh/` @@ -2875,13 +2853,13 @@ over BOSH. ### Options - **`{max_inactivity, Seconds}`**: Define the maximum inactivity period in seconds. Default value is 30 - seconds. For example, to set 50 seconds: + seconds. For example, to set 50 seconds: - modules: - ... - mod_bosh: - max_inactivity: 50 - ... + modules: + ... + mod_bosh: + max_inactivity: 50 + ... - **`use_cache: false|true`**: Use this option and related ones as explained in section [Caching](#caching). @@ -2914,26 +2892,25 @@ the client becomes active again. Options: **`queue_chat_states: true|false`**: Queue “standalone” chat state notifications (as defined in - [`XEP-0085`](https://xmpp.org/extensions/xep-0085.html)) while a - client indicates inactivity. The default value is `true`. + [`XEP-0085`](https://xmpp.org/extensions/xep-0085.html)) while a + client indicates inactivity. The default value is `true`. **`queue_pep: true|false`**: Queue PEP notifications while a client is inactive. When the queue is - flushed, only the most recent notification of a given PEP node is - delivered. The default value is `true`. + flushed, only the most recent notification of a given PEP node is + delivered. The default value is `true`. **`queue_presence: true|false`**: While a client is inactive, queue presence stanzas that indicate - (un)availability. The default value is `true`. + (un)availability. The default value is `true`. Example: - - modules: - ... - mod_client_state: - queue_chat_states: true - queue_pep: false - queue_presence: true - ... + modules: + ... + mod_client_state: + queue_chat_states: true + queue_pep: false + queue_presence: true + ... ## mod_delegation @@ -2943,32 +2920,31 @@ Example: To use the module add `mod_delegation` to `modules` section. If you want to delegate namespaces to a component, specify them in the namespaces option, and associate them to a access rule, e.g.: - - module: - ... - mod_delegation: - namespaces: - "urn:xmpp:mam:1": - filtering: [node] - access: external_mam - "http://jabber.org/protocol/pubsub": - access: external_pubsub - ... + module: + ... + mod_delegation: + namespaces: + "urn:xmpp:mam:1": + filtering: [node] + access: external_mam + "http://jabber.org/protocol/pubsub": + access: external_pubsub + ... You'll also have to define the access rules to allow the component to handle the namespaces: - access_rules: - ... - external_pubsub: - - allow: external_component - external_mam: - - allow: external_component + access_rules: + ... + external_pubsub: + - allow: external_component + external_mam: + - allow: external_component - acl: - ... - external_component: - server: - - sat-pubsub.example.org + acl: + ... + external_component: + server: + - sat-pubsub.example.org In the example above `sat-pubsub.example.org` will receive all `pubsub` requests and all `MAM` requests with the `node` filtering attribute presented in ``. @@ -2998,90 +2974,86 @@ offer. Options: **`extra_domains: [Domain, ...]`**: With this option, you can specify a list of extra domains that are - added to the Service Discovery item list. + added to the Service Discovery item list. **`server_info: [ { modules: Modules, name: Name, urls: [URL, ...] } ]`**: Specify additional information about the server, as described in - Contact Addresses for XMPP Services - ([`XEP-0157`](https://xmpp.org/extensions/xep-0157.html)). `Modules` - can be the keyword ‘all’, in which case the information is reported - in all the services; or a list of `ejabberd` modules, in which case - the information is only specified for the services provided by those - modules. Any arbitrary `Name` and `URL` can be specified, not only - contact addresses. + Contact Addresses for XMPP Services + ([`XEP-0157`](https://xmpp.org/extensions/xep-0157.html)). `Modules` + can be the keyword ‘all’, in which case the information is reported + in all the services; or a list of `ejabberd` modules, in which case + the information is only specified for the services provided by those + modules. Any arbitrary `Name` and `URL` can be specified, not only + contact addresses. Examples: -- To serve a link to the Jabber User Directory on `jabber.org`: - - - modules: - ... - mod_disco: - extra_domains: [users.jabber.org] - ... - -- To serve a link to the transports on another server: - - - modules: - ... - mod_disco: - extra_domains: - - icq.example.com - - msn.example.com - ... - -- To serve a link to a few friendly servers: - - - modules: - ... - mod_disco: - extra_domains: - - example.org - - example.com - ... - -- With this configuration, all services show abuse addresses, feedback - address on the main server, and admin addresses for both the main - server and the vJUD service: - - - modules: - ... - mod_disco: - server_info: - - - modules: all - name: abuse-addresses - urls: [mailto:abuse@shakespeare.lit] - - - modules: [mod_muc] - name: "Web chatroom logs" - urls: [http://www.example.org/muc-logs] - - - modules: [mod_disco] - name: feedback-addresses - urls: - - http://shakespeare.lit/feedback.php - - mailto:feedback@shakespeare.lit - - xmpp:feedback@shakespeare.lit - - - modules: - - mod_disco - - mod_vcard - name: admin-addresses - urls: - - mailto:xmpp@shakespeare.lit - - xmpp:admins@shakespeare.lit - ... +- To serve a link to the Jabber User Directory on `jabber.org`: + + modules: + ... + mod_disco: + extra_domains: [users.jabber.org] + ... + +- To serve a link to the transports on another server: + + modules: + ... + mod_disco: + extra_domains: + - icq.example.com + - msn.example.com + ... + +- To serve a link to a few friendly servers: + + modules: + ... + mod_disco: + extra_domains: + - example.org + - example.com + ... + +- With this configuration, all services show abuse addresses, feedback + address on the main server, and admin addresses for both the main + server and the vJUD service: + + modules: + ... + mod_disco: + server_info: + - + modules: all + name: abuse-addresses + urls: [mailto:abuse@shakespeare.lit] + - + modules: [mod_muc] + name: "Web chatroom logs" + urls: [http://www.example.org/muc-logs] + - + modules: [mod_disco] + name: feedback-addresses + urls: + - http://shakespeare.lit/feedback.php + - mailto:feedback@shakespeare.lit + - xmpp:feedback@shakespeare.lit + - + modules: + - mod_disco + - mod_vcard + name: admin-addresses + urls: + - mailto:xmpp@shakespeare.lit + - xmpp:admins@shakespeare.lit + ... ## mod_fail2ban The module bans IPs that show the malicious signs. Currently only C2S authentication failures are detected. -Unlike the [standalone program](https://www.fail2ban.org), `mod_fail2ban` +Unlike the [fail2ban standalone program](https://github.com/fail2ban/fail2ban), `mod_fail2ban` clears the record of authentication failures `c2s_auth_ban_lifetime` seconds after the first failure or on a successful authentication. It also does not simply block network traffic, but provides the client with @@ -3090,25 +3062,24 @@ a descriptive error message. Available options: **`c2s_auth_ban_lifetime: Seconds`**: The lifetime of the IP ban caused by too many C2S authentication - failures. The default is 3600, i.e. one hour. + failures. The default is 3600, i.e. one hour. **`c2s_max_auth_failures: Integer`**: The number of C2S authentication failures to trigger the IP ban. The - default is 20. + default is 20. **`access: AccessName`**: Specify an access rule for whitelisting IP addresses or networks. If - the rule returns ‘`allow`’ for a given IP address, that - address will never be banned. The `AccessName` should be of type - `ip`. The default value is `none`. + the rule returns ‘`allow`’ for a given IP address, that + address will never be banned. The `AccessName` should be of type + `ip`. The default value is `none`. Example: - - modules: - ... - mod_fail2ban: - c2s_auth_ban_lifetime: 7200 - c2s_max_auth_failures: 50 - ... + modules: + ... + mod_fail2ban: + c2s_auth_ban_lifetime: 7200 + c2s_max_auth_failures: 50 + ... *Warning*: You should not use `mod_fail2ban` behind a proxy or load balancer. ejabberd will see the failures as coming from the load balancer and, when the threshold of auth failures is reached, will reject all connections coming from the @@ -3120,35 +3091,32 @@ This module provides a ReST API to call ejabberd commands using JSON data. To start using it, simply add it as a request handler, for example: - - listen: - - - port: 5280 - module: ejabberd_http - request_handlers: - /api: mod_http_api + listen: + - + port: 5280 + module: ejabberd_http + request_handlers: + /api: mod_http_api To use a specific API version N, add a vN element in the URL path, like: - - /api/v2: mod_http_api + /api/v2: mod_http_api Access rights are defined with those global options: - - commands_admin_access: configure - commands: - - add_commands: user + commands_admin_access: configure + commands: + - add_commands: user `add_commands` allows exporting a class of commands, from -- `open`: methods that are not risky and can be called without any access check +- `open`: methods that are not risky and can be called without any access check -- `restricted`: the same, but will appear only in ejabberdctl list. This is the default. +- `restricted`: the same, but will appear only in ejabberdctl list. This is the default. -- `admin`: auth is required with XMLRPC and HTTP API and checked for admin privileges, works as usual in ejabberdctl. +- `admin`: auth is required with XMLRPC and HTTP API and checked for admin privileges, works as usual in ejabberdctl. -- `user`: can be used through XMLRPC and HTTP API, even by user. Only admin can use the commands for other users. +- `user`: can be used through XMLRPC and HTTP API, even by user. Only admin can use the commands for other users. Then, to run a command, send a POST request to the following URL: `http://localhost:5280/api/` @@ -3157,22 +3125,21 @@ It's also possible to enable unrestricted access to some commands from group of IP addresses by using option `admin_ip_access` by having fragment like this in configuration file: + modules: + mod_http_api: + admin_ip_access: admin_ip_access_rule - modules: - mod_http_api: - admin_ip_access: admin_ip_access_rule + access: + admin_ip_access_rule: + admin_ip_acl: + - command1 + - command2 + ## use `all` to give access to all commands - access: - admin_ip_access_rule: - admin_ip_acl: - - command1 - - command2 - ## use `all` to give access to all commands - - acl: - admin_ip_acl: - ip: - - 127.0.0.1/8 + acl: + admin_ip_acl: + ip: + - 127.0.0.1/8 ## mod_http_fileserver @@ -3183,61 +3150,59 @@ Options: **`docroot: Path`**: Directory to serve the files. **`accesslog: Path`**: File to log accesses using an Apache-like format. No log will be - recorded if this option is not specified. + recorded if this option is not specified. **`directory_indices: [Index, ...]`**: Indicate one or more directory index files, similarly to Apache’s - DirectoryIndex variable. When a web request hits a directory instead - of a regular file, those directory indices are looked in order, and - the first one found is returned. + DirectoryIndex variable. When a web request hits a directory instead + of a regular file, those directory indices are looked in order, and + the first one found is returned. **`custom_headers: {Name: Value}`**: Indicate custom HTTP headers to be included in all responses. - Default value is: `[]` + Default value is: `[]` **`content_types: {Name: Type}`**: Specify mappings of extension to content type. There are several - content types already defined, with this option you can add new - definitions, modify or delete existing ones. To delete an existing - definition, simply define it with a value: ‘undefined’. + content types already defined, with this option you can add new + definitions, modify or delete existing ones. To delete an existing + definition, simply define it with a value: ‘undefined’. **`default_content_type: Type`**: Specify the content type to use for unknown extensions. Default - value is ‘application/octet-stream’. + value is ‘application/octet-stream’. This example configuration will serve the files from the local directory `/var/www` in the address `http://example.org:5280/pub/archive/`. In this example a new content type `ogg` is defined, `png` is redefined, and `jpg` definition is deleted. To use this module you must enable it: - - modules: - ... - mod_http_fileserver: - docroot: /var/www - accesslog: /var/log/ejabberd/access.log - directory_indices: - - index.html - - main.htm - custom_headers: - X-Powered-By: Erlang/OTP - X-Fry: "It's a widely-believed fact!" - content_types: - .ogg: audio/ogg - .png: image/png - .jpg: undefined - default_content_type: text/html - ... + modules: + ... + mod_http_fileserver: + docroot: /var/www + accesslog: /var/log/ejabberd/access.log + directory_indices: + - index.html + - main.htm + custom_headers: + X-Powered-By: Erlang/OTP + X-Fry: "It's a widely-believed fact!" + content_types: + .ogg: audio/ogg + .png: image/png + .jpg: undefined + default_content_type: text/html + ... And define it as a handler in the HTTP service: - - listen: - ... - - - port: 5280 - module: ejabberd_http - request_handlers: - ... - /pub/archive: mod_http_fileserver - ... - ... + listen: + ... + - + port: 5280 + module: ejabberd_http + request_handlers: + ... + /pub/archive: mod_http_fileserver + ... + ... ## mod_http_upload @@ -3336,38 +3301,36 @@ in the 'Implementation' section. Default: `undefined`. Example: - - certfiles: - - /etc/ejabberd/certificate.pem - - listen: - ... - - - port: 5443 - module: ejabberd_http - tls: true - request_handlers: - ... - upload: mod_http_upload - ... - ... - - modules: - ... - mod_http_upload: - docroot: /ejabberd/upload - put_url: "https://@HOST@:5443/upload" - ... + certfiles: + - /etc/ejabberd/certificate.pem + + listen: + ... + - + port: 5443 + module: ejabberd_http + tls: true + request_handlers: + ... + upload: mod_http_upload + ... + ... + + modules: + ... + mod_http_upload: + docroot: /ejabberd/upload + put_url: "https://@HOST@:5443/upload" + ... And using a separate HTTP server to host the files: - - modules: - ... - mod_http_upload: - put_url: https://separate.http.server/upload - external_secret: "foo bar baz" - ... + modules: + ... + mod_http_upload: + put_url: https://separate.http.server/upload + external_secret: "foo bar baz" + ... ## mod_http_upload_quota @@ -3397,21 +3360,20 @@ Note: It's not necessary to specify the `access_hard_quota` and stick to the default names and just specify access rules such as those in the following example. - - shaper_rules: - ... - soft_upload_quota: - - 1000: all # MiB - hard_upload_quota: - - 1100: all # MiB - ... - - modules: - ... - mod_http_upload: {} - mod_http_upload_quota: - max_days: 100 - ... + shaper_rules: + ... + soft_upload_quota: + - 1000: all # MiB + hard_upload_quota: + - 1100: all # MiB + ... + + modules: + ... + mod_http_upload: {} + mod_http_upload_quota: + max_days: 100 + ... ## ejabberd_http_ws @@ -3423,16 +3385,16 @@ described in [`RFC 7395`][71]. To enable this module it must have handler added to `request_handlers` section of `ejabberd_http` listener: - listen: - ... - - - port: 5280 - module: ejabberd_http - request_handlers: - ... - /xmpp: ejabberd_http_ws - ... - ... + listen: + ... + - + port: 5280 + module: ejabberd_http + request_handlers: + ... + /xmpp: ejabberd_http_ws + ... + ... This module can be configured by using those options that should be placed in general section of config file: @@ -3483,8 +3445,8 @@ testing purposes. Options: **`access: AccessName`**: This option defines which access rule will be - used to control who is allowed to use this service. The default - is `local`. + used to control who is allowed to use this service. The default + is `local`. ## mod_last @@ -3504,10 +3466,10 @@ uptime of the `ejabberd` server. ### Example Configuration -~~~ yaml +``` yaml modules: mod_last: {} -~~~ +``` ### Implementation notes @@ -3584,7 +3546,7 @@ updated in 19.02, and is not yet ready to use in production. To learn more about how to use that feature, you can refer to our tutorial: -[Getting started with XEP-0369: Mediated Information eXchange (MIX) v0.1](/tutorials/mix-010/). +[Getting started with XEP-0369: Mediated Information eXchange (MIX) v0.1](../tutorials/mix-010.md). ## mod_metrics @@ -3609,15 +3571,15 @@ can chat in public or have private chats. Some of the features of Multi-User Chat: -- Sending public and private messages to room occupants. +- Sending public and private messages to room occupants. -- Inviting other users to a room. +- Inviting other users to a room. -- Setting a room subject. +- Setting a room subject. -- Creating password protected rooms. +- Creating password protected rooms. -- Kicking and banning occupants. +- Kicking and banning occupants. The MUC service allows any Jabber ID to register a nickname, so nobody else can use that nickname in any room in the MUC service. To register a @@ -3634,288 +3596,283 @@ will be recreated on an available node on first connection attempt. Module options: **`host: HostName`**: This option defines the Jabber ID of the service. If the `host` - option is not specified, the Jabber ID will be the hostname of the - virtual host with the prefix ‘`conference.`’. The keyword “@HOST@” - is replaced at start time with the real virtual host name. + option is not specified, the Jabber ID will be the hostname of the + virtual host with the prefix ‘`conference.`’. The keyword “@HOST@” + is replaced at start time with the real virtual host name. **`db_type: mnesia|sql`**: Define the type of storage where the module will create the tables and store user information. The default is the storage defined by the global option `default_db`, or `mnesia` if omitted. If `sql` value is defined, make sure you have defined the database, see [database](#database-and-ldap-configuration). **`access: AccessName`**: You can specify who is allowed to use the Multi-User Chat service. - By default everyone is allowed to use it. + By default everyone is allowed to use it. **`access_create: AccessName`**: To configure who is allowed to create new rooms at the Multi-User - Chat service, this option can be used. By default any account in the - local ejabberd server is allowed to create rooms. + Chat service, this option can be used. By default any account in the + local ejabberd server is allowed to create rooms. **`access_persistent: AccessName`**: To configure who is allowed to modify the ’persistent’ room option. - By default any account in the local ejabberd server is allowed to - modify that option. + By default any account in the local ejabberd server is allowed to + modify that option. **`access_mam: AccessName`**: To configure who is allowed to modify the ’mam’ room option. - By default any account in the local ejabberd server is allowed to - modify that option. + By default any account in the local ejabberd server is allowed to + modify that option. **`access_admin: AccessName`**: This option specifies who is allowed to administrate the Multi-User - Chat service. The default value is `none`, which means that only the - room creator can administer their room. The administrators can send a - normal message to the service JID, and it will be shown in all - active rooms as a service message. The administrators can send a - groupchat message to the JID of an active room, and the message will - be shown in the room as a service message. + Chat service. The default value is `none`, which means that only the + room creator can administer their room. The administrators can send a + normal message to the service JID, and it will be shown in all + active rooms as a service message. The administrators can send a + groupchat message to the JID of an active room, and the message will + be shown in the room as a service message. **`access_register: AccessName`**: This option specifies who is allowed to - register nickname within the Multi-User Chat service. The default is `all` - for backward compatibility, which means that any user is allowed to - register any free nick. + register nickname within the Multi-User Chat service. The default is `all` + for backward compatibility, which means that any user is allowed to + register any free nick. **`history_size: Size`**: A small history of the current discussion is sent to users when they - enter the room. With this option you can define the number of - history messages to keep and send to users joining the room. The - value is an integer. Setting the value to `0` disables the history - feature and, as a result, nothing is kept in memory. The default - value is `20`. This value is global and thus affects all rooms on - the service. + enter the room. With this option you can define the number of + history messages to keep and send to users joining the room. The + value is an integer. Setting the value to `0` disables the history + feature and, as a result, nothing is kept in memory. The default + value is `20`. This value is global and thus affects all rooms on + the service. **`max_users: Number`**: This option defines at the service level, the maximum number of - users allowed per room. It can be lowered in each room configuration - but cannot be increased in individual room configuration. The - default value is 200. + users allowed per room. It can be lowered in each room configuration + but cannot be increased in individual room configuration. The + default value is 200. **`max_users_admin_threshold: Number`**: This option defines the number of service admins or room owners - allowed to enter the room when the maximum number of allowed - occupants was reached. The default limit is 5. + allowed to enter the room when the maximum number of allowed + occupants was reached. The default limit is 5. **`max_user_conferences: Number`**: This option defines the maximum number of rooms that any given user - can join. The default value is 100. This option is used to prevent - possible abuses. Note that this is a soft limit: some users can - sometimes join more conferences in cluster configurations. + can join. The default value is 100. This option is used to prevent + possible abuses. Note that this is a soft limit: some users can + sometimes join more conferences in cluster configurations. **`max_room_id: Number`**: This option defines the maximum number of characters that Room ID - can have when creating a new room. The default value is to not - limit: `infinity`. + can have when creating a new room. The default value is to not + limit: `infinity`. **`regexp_room_id: String`**: This option defines the regular expression that a Room ID must satisfy - to allow the room creation. The default value is the empty string. + to allow the room creation. The default value is the empty string. **`max_room_name: Number`**: This option defines the maximum number of characters that Room Name - can have when configuring the room. The default value is to not - limit: `infinity`. + can have when configuring the room. The default value is to not + limit: `infinity`. **`max_room_desc: Number`**: This option defines the maximum number of characters that Room - Description can have when configuring the room. The default value is - to not limit: `infinity`. + Description can have when configuring the room. The default value is + to not limit: `infinity`. **`max_rooms_discoitems: Number`**: When there are more rooms than this Number, - only the non-empty ones are returned in a Service Discovery query. - The default value is: 100. + only the non-empty ones are returned in a Service Discovery query. + The default value is: 100. **`min_message_interval: Number`**: This option defines the minimum interval between two messages send - by an occupant in seconds. This option is global and valid for all - rooms. A decimal value can be used. When this option is not defined, - message rate is not limited. This feature can be used to protect a - MUC service from occupant abuses and limit number of messages that - will be broadcasted by the service. A good value for this minimum - message interval is 0.4 second. If an occupant tries to send - messages faster, an error is send back explaining that the message - has been discarded and describing the reason why the message is not - acceptable. + by an occupant in seconds. This option is global and valid for all + rooms. A decimal value can be used. When this option is not defined, + message rate is not limited. This feature can be used to protect a + MUC service from occupant abuses and limit number of messages that + will be broadcasted by the service. A good value for this minimum + message interval is 0.4 second. If an occupant tries to send + messages faster, an error is send back explaining that the message + has been discarded and describing the reason why the message is not + acceptable. **`min_presence_interval: Number`**: This option defines the minimum of time between presence changes - coming from a given occupant in seconds. This option is global and - valid for all rooms. A decimal value can be used. When this option - is not defined, no restriction is applied. This option can be used - to protect a MUC service for occupants abuses. If an occupant tries - to change its presence more often than the specified interval, the - presence is cached by `ejabberd` and only the last presence is - broadcasted to all occupants in the room after expiration of the - interval delay. Intermediate presence packets are silently - discarded. A good value for this option is 4 seconds. + coming from a given occupant in seconds. This option is global and + valid for all rooms. A decimal value can be used. When this option + is not defined, no restriction is applied. This option can be used + to protect a MUC service for occupants abuses. If an occupant tries + to change its presence more often than the specified interval, the + presence is cached by `ejabberd` and only the last presence is + broadcasted to all occupants in the room after expiration of the + interval delay. Intermediate presence packets are silently + discarded. A good value for this option is 4 seconds. **`max_users_presence: Number`**: This option defines after how many users in the room, it is considered overcrowded. When a MUC room is considered overcrowed, presence broadcasts are limited to reduce load, traffic and excessive presence 'storm' received by participants. - **`default_room_options: {OptionName: OptionValue}`**: This module option allows to define the desired default room - options. Note that the creator of a room can modify the options of - his room at any time using an XMPP client with MUC capability. - All of those room options can be set to `true` or `false`, except - `password` and `title` which are strings, and `max_users` that is - integer. The - available room options and the default values are: + options. Note that the creator of a room can modify the options of + his room at any time using an XMPP client with MUC capability. + All of those room options can be set to `true` or `false`, except + `password` and `title` which are strings, and `max_users` that is + integer. The + available room options and the default values are: -* **`allow_change_subj: true|false`**: Allow occupants to change the subject. +- **`allow_change_subj: true|false`**: Allow occupants to change the subject. -* **`allow_private_messages: true|false`**: Occupants can send private messages to other occupants. +- **`allow_private_messages: true|false`**: Occupants can send private messages to other occupants. -* **`allow_private_messages_from_visitors: anyone|moderators|nobody`**: Visitors can send private messages to other occupants. +- **`allow_private_messages_from_visitors: anyone|moderators|nobody`**: Visitors can send private messages to other occupants. -* **`allow_query_users: true|false`**: Occupants can send IQ queries to other occupants. +- **`allow_query_users: true|false`**: Occupants can send IQ queries to other occupants. -* **`allow_subscription: true|false`**: Allow users to subscribe to room events as described in - [`Multi-User Chat Subscriptions`](https://docs.ejabberd.im/developer/xmpp-clients-bots/proposed-extensions/muc-sub/). +- **`allow_subscription: true|false`**: Allow users to subscribe to room events as described in + [`Multi-User Chat Subscriptions`](../developer/xmpp-clients-bots/extensions/muc-sub.md). -* **`allow_user_invites: false|true`**: Allow occupants to send invitations. +- **`allow_user_invites: false|true`**: Allow occupants to send invitations. -* **`allow_visitor_nickchange: true|false`**: Allow visitors to change nickname. +- **`allow_visitor_nickchange: true|false`**: Allow visitors to change nickname. -* **`allow_visitor_status: true|false`**: Allow visitors to send status text in presence updates. If - disallowed, the `status` text is stripped before broadcasting - the presence update to all the room occupants. +- **`allow_visitor_status: true|false`**: Allow visitors to send status text in presence updates. If + disallowed, the `status` text is stripped before broadcasting + the presence update to all the room occupants. -* **`anonymous: true|false`**: The room is anonymous: occupants don’t see the real JIDs of - other occupants. Note that the room moderators can always see - the real JIDs of the occupants. +- **`anonymous: true|false`**: The room is anonymous: occupants don’t see the real JIDs of + other occupants. Note that the room moderators can always see + the real JIDs of the occupants. -* **`captcha_protected: false|true`**: When a user tries to join a room where they have no affiliation - (not owner, admin or member), the room requires them to fill a - CAPTCHA challenge (see section [CAPTCHA](#captcha)) in order to accept their - join in the room. +- **`captcha_protected: false|true`**: When a user tries to join a room where they have no affiliation + (not owner, admin or member), the room requires them to fill a + CAPTCHA challenge (see section [CAPTCHA](#captcha)) in order to accept their + join in the room. -* **`lang: Language`**: Preferred language for the discussions in the room. - The language format should conform to RFC 5646. +- **`lang: Language`**: Preferred language for the discussions in the room. + The language format should conform to RFC 5646. -* **`logging: false|true`**: The public messages are logged using `mod_muc_log`. +- **`logging: false|true`**: The public messages are logged using `mod_muc_log`. -* **`mam: false|true`**: Enable message archiving. Implies `mod_mam` is enabled. +- **`mam: false|true`**: Enable message archiving. Implies `mod_mam` is enabled. -* **`max_users: Number`**: Maximum number of occupants in the room. The default value is 200. +- **`max_users: Number`**: Maximum number of occupants in the room. The default value is 200. -* **`members_by_default: true|false`**: The occupants that enter the room are participants by default, - so they have ’voice’. +- **`members_by_default: true|false`**: The occupants that enter the room are participants by default, + so they have ’voice’. -* **`members_only: false|true`**: Only members of the room can enter. +- **`members_only: false|true`**: Only members of the room can enter. -* **`moderated: true|false`**: Only occupants with ’voice’ can send public messages. +- **`moderated: true|false`**: Only occupants with ’voice’ can send public messages. -* **`password: roompass123`**: Password of the room. You may want to enable the next option - too. +- **`password: roompass123`**: Password of the room. You may want to enable the next option + too. -* **`password_protected: false|true`**: The password is required to enter the room. +- **`password_protected: false|true`**: The password is required to enter the room. -* **`persistent: false|true`**: The room persists even if the last participant leaves. +- **`persistent: false|true`**: The room persists even if the last participant leaves. -* **`presence_broadcast: [moderator, participant, visitor]`**: List of roles for which presence is broadcasted. - The list can contain one or several of: moderator, participant, visitor. +- **`presence_broadcast: [moderator, participant, visitor]`**: List of roles for which presence is broadcasted. + The list can contain one or several of: moderator, participant, visitor. -* **`public: true|false`**: The room is public in the list of the MUC service, so it can be - discovered. MUC admins and room participants will see private rooms in Service Discovery, - and the room name will have the word: "private". +- **`public: true|false`**: The room is public in the list of the MUC service, so it can be + discovered. MUC admins and room participants will see private rooms in Service Discovery, + and the room name will have the word: "private". -* **`public_list: true|false`**: The list of participants is public, without requiring to enter - the room. +- **`public_list: true|false`**: The list of participants is public, without requiring to enter + the room. -* **`title: Room Title`**: A human-readable title of the room. +- **`title: Room Title`**: A human-readable title of the room. Examples: -- In the first example everyone is allowed to use the Multi-User Chat - service. Everyone will also be able to create new rooms but only the - user `admin@example.org` is allowed to administrate any room. In - this example they are also a global administrator. When - `admin@example.org` sends a message such as ‘Tomorrow, the XMPP - server will be moved to new hardware. This will involve service - breakdowns around 23:00 UMT. We apologise for this inconvenience.’ - to `conference.example.org`, it will be displayed in all active - rooms. In this example the history feature is disabled. - - - acl: - admin: - user: - - admin@example.org - - access_rules: - muc_admin: - - allow: admin - - modules: - ... - mod_muc: - access: all - access_create: all - access_admin: muc_admin - history_size: 0 - ... - -- In the second example the Multi-User Chat service is only accessible - by paying customers registered on our domains and on other servers. - Of course the administrator is also allowed to access rooms. In - addition, he is the only authority able to create and administer - rooms. When `admin@example.org` sends a message such as ‘Tomorrow, - the Jabber server will be moved to new hardware. This will involve - service breakdowns around 23:00 UMT. We apologise for this - inconvenience.’ to `conference.example.org`, it will be displayed in - all active rooms. No `history_size` option is used, this means that - the feature is enabled and the default value of 20 history messages - will be send to the users. - - - acl: - paying_customers: - user: - - customer1@example.net - - customer2@example.com - - customer3@example.org - admin: - user: - - admin@example.org - - access_rules: - muc_admin - - allow: admin - muc_access: - - allow: paying_customers - - allow: admin - - modules: - ... - mod_muc: - access: muc_access - access_create: muc_admin - access_admin: muc_admin - ... - -- In the following example, MUC anti abuse options are used. An - occupant cannot send more than one message every 0.4 seconds and - cannot change its presence more than once every 4 seconds. The - Room IDs can contain only letters and numbers. The - length of Room IDs and Room Names are limited to 20 characters, and - Room Description to 300 characters. No ACLs are defined, but some - user restriction could be added as well: - - - modules: - ... - mod_muc: - min_message_interval: 0.4 - min_presence_interval: 4 - regexp_room_id: "^[a-z0-9]+$" - max_room_id: 20 - max_room_name: 20 - max_room_desc: 300 - ... - -- This example shows how to use `default_room_options` to make sure - the newly created rooms have by default those options. - - - modules: - ... - mod_muc: - access: muc_access - access_create: muc_admin - default_room_options: - allow_change_subj: false - allow_query_users: true - allow_private_messages: true - members_by_default: false - presence_broadcast: [visitor, moderator] - title: "New chatroom" - anonymous: false - access_admin: muc_admin - ... +- In the first example everyone is allowed to use the Multi-User Chat + service. Everyone will also be able to create new rooms but only the + user `admin@example.org` is allowed to administrate any room. In + this example they are also a global administrator. When + `admin@example.org` sends a message such as ‘Tomorrow, the XMPP + server will be moved to new hardware. This will involve service + breakdowns around 23:00 UMT. We apologise for this inconvenience.’ + to `conference.example.org`, it will be displayed in all active + rooms. In this example the history feature is disabled. + + acl: + admin: + user: + - admin@example.org + + access_rules: + muc_admin: + - allow: admin + + modules: + ... + mod_muc: + access: all + access_create: all + access_admin: muc_admin + history_size: 0 + ... + +- In the second example the Multi-User Chat service is only accessible + by paying customers registered on our domains and on other servers. + Of course the administrator is also allowed to access rooms. In + addition, he is the only authority able to create and administer + rooms. When `admin@example.org` sends a message such as ‘Tomorrow, + the Jabber server will be moved to new hardware. This will involve + service breakdowns around 23:00 UMT. We apologise for this + inconvenience.’ to `conference.example.org`, it will be displayed in + all active rooms. No `history_size` option is used, this means that + the feature is enabled and the default value of 20 history messages + will be send to the users. + + acl: + paying_customers: + user: + - customer1@example.net + - customer2@example.com + - customer3@example.org + admin: + user: + - admin@example.org + + access_rules: + muc_admin + - allow: admin + muc_access: + - allow: paying_customers + - allow: admin + + modules: + ... + mod_muc: + access: muc_access + access_create: muc_admin + access_admin: muc_admin + ... + +- In the following example, MUC anti abuse options are used. An + occupant cannot send more than one message every 0.4 seconds and + cannot change its presence more than once every 4 seconds. The + Room IDs can contain only letters and numbers. The + length of Room IDs and Room Names are limited to 20 characters, and + Room Description to 300 characters. No ACLs are defined, but some + user restriction could be added as well: + + modules: + ... + mod_muc: + min_message_interval: 0.4 + min_presence_interval: 4 + regexp_room_id: "^[a-z0-9]+$" + max_room_id: 20 + max_room_name: 20 + max_room_desc: 300 + ... + +- This example shows how to use `default_room_options` to make sure + the newly created rooms have by default those options. + + modules: + ... + mod_muc: + access: muc_access + access_create: muc_admin + default_room_options: + allow_change_subj: false + allow_query_users: true + allow_private_messages: true + members_by_default: false + presence_broadcast: [visitor, moderator] + title: "New chatroom" + anonymous: false + access_admin: muc_admin + ... ## mod_muc_log @@ -3927,143 +3884,141 @@ set the option to enable room logging. Features: -- Room details are added on top of each page: room title, JID, author, - subject and configuration. +- Room details are added on top of each page: room title, JID, author, + subject and configuration. -- The room JID in the generated HTML is a link to join the room (using - [`XMPP URI`][79]). +- The room JID in the generated HTML is a link to join the room (using + [`XMPP URI`][79]). -- Subject and room configuration changes are tracked and displayed. +- Subject and room configuration changes are tracked and displayed. -- Joins, leaves, nick changes, kicks, bans and ‘/me’ are tracked and - displayed, including the reason if available. +- Joins, leaves, nick changes, kicks, bans and ‘/me’ are tracked and + displayed, including the reason if available. -- Generated HTML files are XHTML 1.0 Transitional and CSS compliant. +- Generated HTML files are XHTML 1.0 Transitional and CSS compliant. -- Timestamps are self-referencing links. +- Timestamps are self-referencing links. -- Links on top for quicker navigation: Previous day, Next day, Up. +- Links on top for quicker navigation: Previous day, Next day, Up. -- CSS is used for style definition, and a custom CSS file can be used. +- CSS is used for style definition, and a custom CSS file can be used. -- URLs on messages and subjects are converted to hyperlinks. +- URLs on messages and subjects are converted to hyperlinks. -- Timezone used on timestamps is shown on the log files. +- Timezone used on timestamps is shown on the log files. -- A custom link can be added on top of each page. +- A custom link can be added on top of each page. Options: **`access_log: AccessName`**: This option restricts which occupants are allowed to enable or - disable room logging. The default value is `muc_admin`. Note for - this default setting you need to have an access rule for `muc_admin` - in order to take effect. + disable room logging. The default value is `muc_admin`. Note for + this default setting you need to have an access rule for `muc_admin` + in order to take effect. **`cssfile: false|URL`**: With this option you can set whether the HTML files should have a - custom CSS file or if they need to use the embedded CSS file. - Allowed values are `false` and an URL to a CSS file. With the first - value, HTML files will include the embedded CSS code. With the - latter, you can specify the URL of the custom CSS file (for example: - `http://example.com/my.css`). The default value is `false`. + custom CSS file or if they need to use the embedded CSS file. + Allowed values are `false` and an URL to a CSS file. With the first + value, HTML files will include the embedded CSS code. With the + latter, you can specify the URL of the custom CSS file (for example: + `http://example.com/my.css`). The default value is `false`. **`dirname: room_jid|room_name`**: Allows to configure the name of the room directory. Allowed values - are `room_jid` and `room_name`. With the first value, the room - directory name will be the full room JID. With the latter, the room - directory name will be only the room name, not including the MUC - service name. The default value is `room_jid`. + are `room_jid` and `room_name`. With the first value, the room + directory name will be the full room JID. With the latter, the room + directory name will be only the room name, not including the MUC + service name. The default value is `room_jid`. **`dirtype: subdirs|plain`**: The type of the created directories can be specified with this - option. Allowed values are `subdirs` and `plain`. With the first - value, subdirectories are created for each year and month. With the - latter, the names of the log files contain the full date, and there - are no subdirectories. The default value is `subdirs`. + option. Allowed values are `subdirs` and `plain`. With the first + value, subdirectories are created for each year and month. With the + latter, the names of the log files contain the full date, and there + are no subdirectories. The default value is `subdirs`. **`file_format: html|plaintext`**: Define the format of the log files: `html` stores in HTML format, - `plaintext` stores in plain text. The default value is `html`. + `plaintext` stores in plain text. The default value is `html`. **`file_permissions: {mode: Mode, group: Group}`**: Define the permissions that must be used when creating the log - files: the number of the mode, and the numeric id of the group that - will own the files. The default value is `{644, 33}`. + files: the number of the mode, and the numeric id of the group that + will own the files. The default value is `{644, 33}`. **`outdir: Path`**: This option sets the full path to the directory in which the HTML - files should be stored. Make sure the `ejabberd` daemon user has - write access on that directory. The default value is `www/muc`. + files should be stored. Make sure the `ejabberd` daemon user has + write access on that directory. The default value is `www/muc`. **`spam_prevention: true|false`**: To prevent spam, the `spam_prevention` option adds a special - attribute to links that prevent their indexation by search engines. - The default value is `true`, which mean that nofollow attributes - will be added to user submitted links. + attribute to links that prevent their indexation by search engines. + The default value is `true`, which mean that nofollow attributes + will be added to user submitted links. **`timezone: local|universal`**: The time zone for the logs is configurable with this option. Allowed - values are `local` and `universal`. With the first value, the local - time, as reported to Erlang by the operating system, will be used. - With the latter, GMT/UTC time will be used. The default value is - `local`. + values are `local` and `universal`. With the first value, the local + time, as reported to Erlang by the operating system, will be used. + With the latter, GMT/UTC time will be used. The default value is + `local`. **`top_link: {URL: Text}`**: With this option you can customize the link on the top right corner - of each log file. The default value is `{/, Home}`. + of each log file. The default value is `{/, Home}`. **`url: URL`**: A top level URL where a client is able to access logs of a particular conference. The conference name is appended to the URL if `dirname` is `room_name` or - a conference JID is appended to the URL if `dirname` is `room_jid`. + a conference JID is appended to the URL if `dirname` is `room_jid`. Examples: -- In the first example any room owner can enable logging, and a custom - CSS file will be used, `http://example.com/my.css`. The names of the - log files will contain the full date, and there will be no - subdirectories. The log files will be stored in /var/www/muclogs, - and the time zone will be GMT/UTC. Finally, the top link will be - `Jabber.ru`. - - - access_rules: - - muc: allow - - modules: - ... - mod_muc_log: - access_log: muc - cssfile: http://example.com/my.css - dirtype: plain - dirname: room_jid - outdir: /var/www/muclogs - timezone: universal - spam_prevention: true - top_link: - http://www.jabber.ru/: Jabber.ru - ... - -- In the second example only `admin1@example.org` and - `admin2@example.net` can enable logging, and the embedded CSS file - will be used. The names of the log files will only contain the day - (number), and there will be subdirectories for each year and month. - The log files will be stored in /var/www/muclogs, and the local time - will be used. Finally, the top link will be the default - `Home`. - - - acl: - admin: - user: - - admin1@example.org - - admin2@example.net - access_rules: - muc_log: - - allow: admin - - modules: - ... - mod_muc_log: - access_log: muc_log - cssfile: false - dirtype: subdirs - file_permissions: - mode: 644 - group: 33 - outdir: /var/www/muclogs - timezone: local - ... +- In the first example any room owner can enable logging, and a custom + CSS file will be used, `http://example.com/my.css`. The names of the + log files will contain the full date, and there will be no + subdirectories. The log files will be stored in /var/www/muclogs, + and the time zone will be GMT/UTC. Finally, the top link will be + `Jabber.ru`. + + access_rules: + - muc: allow + + modules: + ... + mod_muc_log: + access_log: muc + cssfile: http://example.com/my.css + dirtype: plain + dirname: room_jid + outdir: /var/www/muclogs + timezone: universal + spam_prevention: true + top_link: + http://www.jabber.ru/: Jabber.ru + ... + +- In the second example only `admin1@example.org` and + `admin2@example.net` can enable logging, and the embedded CSS file + will be used. The names of the log files will only contain the day + (number), and there will be subdirectories for each year and month. + The log files will be stored in /var/www/muclogs, and the local time + will be used. Finally, the top link will be the default + `Home`. + + acl: + admin: + user: + - admin1@example.org + - admin2@example.net + access_rules: + muc_log: + - allow: admin + + modules: + ... + mod_muc_log: + access_log: muc_log + cssfile: false + dirtype: subdirs + file_permissions: + mode: 644 + group: 33 + outdir: /var/www/muclogs + timezone: local + ... - In the third example log files are served by `mod_http_fileserver` module and are available at `https://domain.tld:5443/chatlogs`: @@ -4088,7 +4043,6 @@ Examples: outdir: /var/www/muclogs ... - ## mod_multicast This module implements a service for Extended Stanza Addressing ([`XEP-0033`][109]) @@ -4112,46 +4066,46 @@ Edit ejabberd.yml and add the module to the list of modules: - The number can be a positive integer or the key word infinite. - Default values: - local: - message: 100 - presence: 100 - remote: - message: 20 - presence: 20 + local: + message: 100 + presence: 100 + remote: + message: 20 + presence: 20 ### Example configuration - # Only admins can send packets to multicast service - access_rules: - multicast: - - allow: admin - - # If you want to allow all your users: - access_rules: - multicast: - - allow - - # This allows both admins and remote users to send packets, - # but does not allow local users - acl: - allservers: - server_glob: "*" - access_rules: - multicast: - - allow: admin - - deny: local - - allow: allservers - - modules: - mod_multicast: - host: multicast.example.org - access: multicast - limits: - local: - message: 40 - presence: infinite - remote: - message: 150 + # Only admins can send packets to multicast service + access_rules: + multicast: + - allow: admin + + # If you want to allow all your users: + access_rules: + multicast: + - allow + + # This allows both admins and remote users to send packets, + # but does not allow local users + acl: + allservers: + server_glob: "*" + access_rules: + multicast: + - allow: admin + - deny: local + - allow: allservers + + modules: + mod_multicast: + host: multicast.example.org + access: multicast + limits: + local: + message: 40 + presence: infinite + remote: + message: 150 ### Service check @@ -4166,18 +4120,18 @@ there's a service called "Multicast". Instead of sending two stanzas, like this: -~~~ +``` xml Hello, world! Hello, world! -~~~ +``` now you can send a stanza like this: -~~~ +``` xml
@@ -4185,13 +4139,13 @@ now you can send a stanza like this: Hello, world! -~~~ +``` #### For the stanza receivers They will receive something like this: -~~~ +``` xml @@ -4201,7 +4155,7 @@ They will receive something like this: Hello, world! -~~~ +``` The addresses tag let the receiver knows that there were multiple recipients and can: @@ -4222,7 +4176,7 @@ email works. A user is considered offline if no session presence priority > 0 are currently open. Note that `ejabberdctl` has a command to delete expired messages (see -section [Managing: ejabberdctl](/admin/guide/managing/#ejabberdctl)). +section [Managing: ejabberdctl](../admin/guide/managing.md#ejabberdctl)). ### Options @@ -4232,23 +4186,23 @@ global option `default_db`, or `mnesia` if omitted. If `sql` value is defined, m [database](#database-and-ldap-configuration). **`access_max_user_messages: AccessName`**: This option defines which access rule (atom) will be enforced to - limit the maximum number of offline messages that a user can have - (quota). When a user has too many offline messages, any new - messages that they receive are discarded, and a resource-constraint - error is returned to the sender. The default value is - `max_user_offline_messages`. Then you can define an access rule - with a syntax similar to `max_user_sessions` (see - [Limiting Opened Sessions with ACL](#limiting-opened-sessions-with-acl)). + limit the maximum number of offline messages that a user can have + (quota). When a user has too many offline messages, any new + messages that they receive are discarded, and a resource-constraint + error is returned to the sender. The default value is + `max_user_offline_messages`. Then you can define an access rule + with a syntax similar to `max_user_sessions` (see + [Limiting Opened Sessions with ACL](#limiting-opened-sessions-with-acl)). **`store_empty_body: true|false|unless_chat_state`**: Whether or not to store messages that lack a `` element. The default - value is `unless_chat_state`, which tells ejabberd to store messages - even if they lack the `` element, *unless* they only contain a - chat state notification (as defined in - [`XEP-0085`](https://xmpp.org/extensions/xep-0085.html)). + value is `unless_chat_state`, which tells ejabberd to store messages + even if they lack the `` element, *unless* they only contain a + chat state notification (as defined in + [`XEP-0085`](https://xmpp.org/extensions/xep-0085.html)). **`pool_size: Size`**: This option specifies the size of the worker pool for storing - offline messages. The allowed values are positive integers. - Default value: `16`. + offline messages. The allowed values are positive integers. + Default value: `16`. **`bounce_groupchat: false|true`**: This option is use the disable an optimisation that avoids bouncing error messages when groupchat messages could not be stored as offline. It will reduce chat room load, without any drawback in standard @@ -4271,28 +4225,27 @@ This example allows power users to have as much as 5000 offline messages, administrators up to 2000, and all the other users up to 100. - - acl: - admin: - user: - - admin1@localhost - - admin2@example.org - poweruser: - user: - - bob@example.org - - jane@example.org - - shaper_rules: - max_user_offline_messages: - - 5000: poweruser - - 2000: admin + acl: + admin: + user: + - admin1@localhost + - admin2@example.org + poweruser: + user: + - bob@example.org + - jane@example.org + + shaper_rules: + max_user_offline_messages: + - 5000: poweruser + - 2000: admin - 100 - modules: - ... - mod_offline: - access_max_user_messages: max_user_offline_messages - ... + modules: + ... + mod_offline: + access_max_user_messages: max_user_offline_messages + ... ### Implementation notes @@ -4304,7 +4257,7 @@ You have several approach for a client to learn what happened when it was offlin (for example a mobile client) can use it to resync its own history with what happened when it was offline. In that case, the client is responsible for marking messages it considers new as "unread". See - [mod_mam](#mod-mam). + [mod_mam](#mod_mam). Some clients may rely on offline and/or message archives to catch up on messages on reconnect, but client developers should always consider @@ -4320,35 +4273,34 @@ ping requests, as defined in the protocol. Configuration options: **`send_pings: true|false`**: If this option is set to `true`, the server sends pings to connected - clients that are not active in a given interval `ping_interval`. - This is useful to keep client connections alive or checking - availability. By default this option is disabled. + clients that are not active in a given interval `ping_interval`. + This is useful to keep client connections alive or checking + availability. By default this option is disabled. **`ping_interval: Seconds`**: How often to send pings to connected clients, if the previous option - is enabled. If a client connection does not send or receive any - stanza in this interval, a ping request is sent to the client. The - default value is 60 seconds. + is enabled. If a client connection does not send or receive any + stanza in this interval, a ping request is sent to the client. The + default value is 60 seconds. **`ping_ack_timeout: Seconds`**: How long to wait before deeming that a client has not answered a given server ping request. - default value is 32 seconds. + default value is 32 seconds. **`timeout_action: none|kill`**: What to do when a client does not answer to a server ping request in - less than `ping_ack_timeout`. The default is to do nothing. + less than `ping_ack_timeout`. The default is to do nothing. This example enables Ping responses, configures the module to send pings to client connections that are inactive for 4 minutes, and if a client does not answer to the ping in less than 32 seconds, its connection is closed: - - modules: - ... - mod_ping: - send_pings: true - ping_interval: 240 - timeout_action: kill - ... + modules: + ... + mod_ping: + send_pings: true + ping_interval: 240 + timeout_action: kill + ... ## mod_pres_counter @@ -4359,23 +4311,22 @@ the exceeding stanzas are silently dropped, and warning is logged. Configuration options: **`count: StanzaNumber`**: The number of subscription presence stanzas (subscribe, unsubscribe, - subscribed, unsubscribed) allowed for any direction (input or - output) per time interval. Please note that two users subscribing to - each other usually generate 4 stanzas, so the recommended value is 4 - or more. The default value is: 5. + subscribed, unsubscribed) allowed for any direction (input or + output) per time interval. Please note that two users subscribing to + each other usually generate 4 stanzas, so the recommended value is 4 + or more. The default value is: 5. **`interval: Seconds`**: The time interval defined in seconds. The default value is 60. This example enables the module, and allows up to 5 presence subscription stanzas to be sent or received by the users in 60 seconds: - - modules: - ... - mod_pres_counter: - count: 5 - interval: 60 - ... + modules: + ... + mod_pres_counter: + count: 5 + interval: 60 + ... ## mod_privacy @@ -4384,15 +4335,15 @@ This module implements end users have support for it in their XMPP client, they will be able to: -- Retrieving one’s privacy lists. -- Adding, removing, and editing one’s privacy lists. -- Setting, changing, or declining active lists. -- Setting, changing, or declining the default list (i.e., the list that is active by default). -- Allowing or blocking messages based on JID, group, or subscription type (or globally). -- Allowing or blocking inbound presence notifications based on JID, group, or subscription type (or globally). -- Allowing or blocking outbound presence notifications based on JID, group, or subscription type (or globally). -- Allowing or blocking IQ stanzas based on JID, group, or subscription type (or globally). -- Allowing or blocking all communications based on JID, group, or subscription type (or globally). +- Retrieving one’s privacy lists. +- Adding, removing, and editing one’s privacy lists. +- Setting, changing, or declining active lists. +- Setting, changing, or declining the default list (i.e., the list that is active by default). +- Allowing or blocking messages based on JID, group, or subscription type (or globally). +- Allowing or blocking inbound presence notifications based on JID, group, or subscription type (or globally). +- Allowing or blocking outbound presence notifications based on JID, group, or subscription type (or globally). +- Allowing or blocking IQ stanzas based on JID, group, or subscription type (or globally). +- Allowing or blocking all communications based on JID, group, or subscription type (or globally). Options: @@ -4433,15 +4384,15 @@ grant access to the component to a specific data type for all users of the domai When configuring `mod_privilege` module, here are the available permissions: -* presence - * managed_entity: receive server user presence. - * roster: the component is allowed to receive the presence of both the users and the contacts in their roster. -* message - * outgoing: the component is allowed to send messages on behalf of either the server or a bare JID of server users. -* roster - * get: read access to a user's roster. - * set: write access to a user's roster. - * both: read/write access to a user's roster. +- presence + - managed_entity: receive server user presence. + - roster: the component is allowed to receive the presence of both the users and the contacts in their roster. +- message + - outgoing: the component is allowed to send messages on behalf of either the server or a bare JID of server users. +- roster + - get: read access to a user's roster. + - set: write access to a user's roster. + - both: read/write access to a user's roster. You grant access to the component by providing an ACL to apply to that permission or `all` to give that access level to all authenticated components. @@ -4450,7 +4401,7 @@ authenticated components. If you want to grant privileged access to a component, specify it in the module configurations, e.g.: -```yaml +``` yaml module: ... mod_privilege: @@ -4471,7 +4422,7 @@ Note: You need to make sure you have a listener configured to connect your compo Here is a more complete example, with ACL and support for namespace delegation ([XEP-0355](https://xmpp.org/extensions/xep-0355.html)): -```yaml +``` yaml listen: ... - port: 8888 @@ -4523,82 +4474,80 @@ This module implements SOCKS5 Bytestreams Options: **`host: HostName`**: This option defines the Jabber ID of the service. If the `host` - option is not specified, the Jabber ID will be the hostname of the - virtual host with the prefix ‘`proxy.`’. The keyword “@HOST@” is - replaced at start time with the real virtual host name. + option is not specified, the Jabber ID will be the hostname of the + virtual host with the prefix ‘`proxy.`’. The keyword “@HOST@” is + replaced at start time with the real virtual host name. **`name: Text`**: Defines Service Discovery name of the service. Default is - `SOCKS5 Bytestreams`. + `SOCKS5 Bytestreams`. **`ip: IP`**: This option specifies which network interface to listen for. Default - is an IP address of the service’s DNS name, or, if fails, - `"127.0.0.1"`. + is an IP address of the service’s DNS name, or, if fails, + `"127.0.0.1"`. **`port: Number`**: This option defines port to listen for incoming connections. Default - is 7777. + is 7777. **`hostname: HostName`**: Defines a hostname advertised by the service when establishing a - session with clients. This is useful when you run the service behind - a NAT. The keyword “@HOST@” is replaced with the virtual host name. - The default is the value of `ip` option. Examples: - `proxy.mydomain.org`, `200.150.100.50`. Note that not all clients - understand domain names in stream negotiation, so you should think - twice before setting domain name in this option. + session with clients. This is useful when you run the service behind + a NAT. The keyword “@HOST@” is replaced with the virtual host name. + The default is the value of `ip` option. Examples: + `proxy.mydomain.org`, `200.150.100.50`. Note that not all clients + understand domain names in stream negotiation, so you should think + twice before setting domain name in this option. **`auth_type: anonymous|plain`**: SOCKS5 authentication type. Possible values are `anonymous` and - `plain`. Default is `anonymous`. + `plain`. Default is `anonymous`. **`access: AccessName`**: Defines ACL for file transfer initiators. Default is `all`. **`max_connections: Number`**: Maximum number of active connections per file transfer initiator. No - limit by default. + limit by default. **`shaper: none|ShaperName`**: This option defines shaper for the file transfer peers. Shaper with - the maximum bandwidth will be selected. Default is `none`. + the maximum bandwidth will be selected. Default is `none`. Examples: -- The simplest configuration of the module: - +- The simplest configuration of the module: - modules: - ... - mod_proxy65: {} - ... - -- More complicated configuration. + modules: + ... + mod_proxy65: {} + ... +- More complicated configuration. - acl: - admin: - user: - - admin@example.org - proxy_users: - server: - - example.org + acl: + admin: + user: + - admin@example.org + proxy_users: + server: + - example.org - access_rules: - proxy65_access: - - allow: proxy_users - shaper_rules: - proxy65_shaper: - - none: admin - - proxyrate: proxy_users + access_rules: + proxy65_access: + - allow: proxy_users + shaper_rules: + proxy65_shaper: + - none: admin + - proxyrate: proxy_users - shaper: - proxyrate: 10240 + shaper: + proxyrate: 10240 - modules: - ... - mod_proxy65: - host: proxy1.example.org - name: "File Transfer Proxy" - ip: 200.150.100.1 - port: 7778 - max_connections: 5 - access: proxy65_access - shaper: proxy65_shaper - ... + modules: + ... + mod_proxy65: + host: proxy1.example.org + name: "File Transfer Proxy" + ip: 200.150.100.1 + port: 7778 + max_connections: 5 + access: proxy65_access + shaper: proxy65_shaper + ... ## mod_pubsub @@ -4612,46 +4561,46 @@ the default ejabberd configuration file, and it requires `mod_caps`. Options: **`host: HostName`**: This option defines the Jabber ID of the service. If the `host` - option is not specified, the Jabber ID will be the hostname of the - virtual host with the prefix ‘`pubsub.`’. The keyword “@HOST@” is - replaced at start time with the real virtual host name. + option is not specified, the Jabber ID will be the hostname of the + virtual host with the prefix ‘`pubsub.`’. The keyword “@HOST@” is + replaced at start time with the real virtual host name. If you use `mod_pubsub` with `sql` `db_type`, please ensure the prefix contains only one dot, for example ‘`pubsub.`’, or ‘`publish.`’,. **`access_createnode: AccessName`**: This option restricts which users are allowed to create pubsub nodes - using ACL and ACCESS. By default any account in the local ejabberd - server is allowed to create pubsub nodes. + using ACL and ACCESS. By default any account in the local ejabberd + server is allowed to create pubsub nodes. **`max_items_node: MaxItems`**: Define the maximum number of items that can be stored in a node. - Default value is 10. + Default value is 10. **`max_subscriptions_node: MaxSubs`**: Define the maximum number of subscriptions managed by a node. - Default value is undefined; no limitation. + Default value is undefined; no limitation. **`plugins: [ Plugin, ...]`**: To specify which pubsub node plugins to use. The first one in the - list is used by default. If this option is not defined, the default - plugins list is: `[flat]`. PubSub clients can define which plugin to - use when creating a node: add `type=’plugin-name’` attribute to the - `create` stanza element. + list is used by default. If this option is not defined, the default + plugins list is: `[flat]`. PubSub clients can define which plugin to + use when creating a node: add `type=’plugin-name’` attribute to the + `create` stanza element. - - `flat` plugin handles the default behaviour and follows standard +- `flat` plugin handles the default behaviour and follows standard XEP-0060 implementation. - - `pep` plugin adds extension to handle Personal Eventing Protocol +- `pep` plugin adds extension to handle Personal Eventing Protocol ([`XEP-0163`](https://xmpp.org/extensions/xep-0163.html)) to the PubSub engine. Adding pep plugin to PubSub make it handle PEP automatically. **`nodetree: Nodetree`**: To specify which nodetree to use. If not defined, the default pubsub - nodetree is used: `tree`. Only one nodetree can be used per host, - and is shared by all node plugins. + nodetree is used: `tree`. Only one nodetree can be used per host, + and is shared by all node plugins. - - `tree` nodetree store node configuration and relations on the +- `tree` nodetree store node configuration and relations on the database. `flat` nodes are stored without any relationship, and `hometree` nodes can have child nodes. - - `virtual` nodetree does not store nodes on database. This saves +- `virtual` nodetree does not store nodes on database. This saves resources on systems with tons of nodes. If using the `virtual` nodetree, you can only enable those node plugins: [`flat`, `pep`] or [`flat`]; any other plugins configuration will not work. Also, all @@ -4660,7 +4609,7 @@ prefix contains only one dot, for example ‘`pubsub.`’, or database, it will not work if you used the default “tree” nodetree before. - - `dag` nodetree provides experimental support for PubSub +- `dag` nodetree provides experimental support for PubSub Collection Nodes ([`XEP-0248`](https://xmpp.org/extensions/xep-0248.html)). In that case you should also add “dag” node plugin as default, for example: @@ -4668,67 +4617,64 @@ prefix contains only one dot, for example ‘`pubsub.`’, or plugins: [flat,pep] **`ignore_pep_from_offline: false|true`**: To specify whether or not we should get last published PEP items - from users in our roster which are offline when we connect. Value is - true or false. If not defined, pubsub assumes true so we only get - last items of online contacts. + from users in our roster which are offline when we connect. Value is + true or false. If not defined, pubsub assumes true so we only get + last items of online contacts. **`last_item_cache: false|true`**: To specify whether or not pubsub should cache last items. Value is - true or false. If not defined, pubsub do not cache last items. On - systems with not so many nodes, caching last items speeds up pubsub - and allows to raise user connection rate. The cost is memory usage, - as every item is stored in memory. + true or false. If not defined, pubsub do not cache last items. On + systems with not so many nodes, caching last items speeds up pubsub + and allows to raise user connection rate. The cost is memory usage, + as every item is stored in memory. **`default_node_config: Config`**: To override default node configuration, regardless of node plugin. Value - is a list of key-value definition. Node configuration still uses - default configuration defined by node plugin, and overrides any items - by value defined in this configurable list. + is a list of key-value definition. Node configuration still uses + default configuration defined by node plugin, and overrides any items + by value defined in this configurable list. **`pep_mapping: {Key, Value}`**: This allow to define a Key-Value list to choose defined node plugins - on given PEP namespace. The following example will use node\_tune - instead of node\_pep for every PEP node with tune namespace: - + on given PEP namespace. The following example will use node\_tune + instead of node\_pep for every PEP node with tune namespace: - modules: - ... - mod_pubsub: - pep_mapping: - http://jabber.org/protocol/tune: tune - ... + modules: + ... + mod_pubsub: + pep_mapping: + http://jabber.org/protocol/tune: tune + ... Example of configuration that uses flat nodes as default, and allows use of flat, hometree and pep nodes: - - modules: - ... - mod_pubsub: - access_createnode: pubsub_createnode - max_subscriptions_node: 100 - default_node_config: - notification_type: normal - notify_retract: false - max_items: 4 - plugins: - - flat - - pep - ... + modules: + ... + mod_pubsub: + access_createnode: pubsub_createnode + max_subscriptions_node: 100 + default_node_config: + notification_type: normal + notify_retract: false + max_items: 4 + plugins: + - flat + - pep + ... Using relational database requires using mod\_pubsub with db_type `sql`. Only flat, hometree and pep plugins supports SQL. The following example shows previous configuration with SQL usage: - - modules: - ... - mod_pubsub: - db_type: sql - access_createnode: pubsub_createnode - ignore_pep_from_offline: true - last_item_cache: false - plugins: - - flat - - pep - ... + modules: + ... + mod_pubsub: + db_type: sql + access_createnode: pubsub_createnode + ignore_pep_from_offline: true + last_item_cache: false + plugins: + - flat + - pep + ... ## mod_push @@ -4743,34 +4689,34 @@ services such as FCM or APNS. Options: **`include_sender: true|false`**: If this option is set to `true`, the - sender's JID is included with push notifications generated for - incoming messages with a body. Default: `false`. + sender's JID is included with push notifications generated for + incoming messages with a body. Default: `false`. **`include_body: true|false|String`**: If this option is set to - `true`, the message text is included with push notifications - generated for incoming messages with a body. The option can - instead be set to a static text, in which case the specified - text will be included in place of the actual message body. This - can be useful to signal the app server whether the notification - was triggered by a message with body (as opposed to other types - of traffic) without leaking actual message contents. Default: - `"New message"`. + `true`, the message text is included with push notifications + generated for incoming messages with a body. The option can + instead be set to a static text, in which case the specified + text will be included in place of the actual message body. This + can be useful to signal the app server whether the notification + was triggered by a message with body (as opposed to other types + of traffic) without leaking actual message contents. Default: + `"New message"`. **`db_type: mnesia|sql`**: The type of storage where the module will - store push session information. The default is the storage - defined by the global option `default_db`, or `mnesia` if - omitted. If `sql` is specified, make sure you have configured - the database, see the - [database](#database-and-ldap-configuration) section. + store push session information. The default is the storage + defined by the global option `default_db`, or `mnesia` if + omitted. If `sql` is specified, make sure you have configured + the database, see the + [database](#database-and-ldap-configuration) section. **`use_cache: false|true`**: Use this option and related ones as - explained in the section on [caching](#caching). + explained in the section on [caching](#caching). ## mod_push_keepalive -This module tries to keep the [stream management](#mod-stream-mgmt) +This module tries to keep the [stream management](#mod_stream_mgmt) session of a disconnected mobile client alive if the client enabled -[push notifications](#mod-push) for that session. However, the normal +[push notifications](#mod_push) for that session. However, the normal session resumption timeout is restored once a push notification is issued, so the session will be closed if the client doesn't respond to push notifications. @@ -4778,24 +4724,24 @@ push notifications. Options: **`resume_timeout: Seconds|undefined`**: This option specifies the - number of seconds until the session of a disconnected push - client times out. This timeout is only in effect as long as no - push notification is issued. Once that happened, the resumption - timeout configured for the [stream management - module](#mod-stream-mgmt) is restored. If this option is set to - `undefined`, the resumption timeout won't be modified by - `mod_push_keepalive`. Default: `259200`. + number of seconds until the session of a disconnected push + client times out. This timeout is only in effect as long as no + push notification is issued. Once that happened, the resumption + timeout configured for the [stream management + module](#mod_stream_mgmt) is restored. If this option is set to + `undefined`, the resumption timeout won't be modified by + `mod_push_keepalive`. Default: `259200`. **`wake_on_start: true|false`**: If this option is set to `true`, - notifications are generated for *all* registered push clients - during server startup. This option should *not* be enabled on - servers with many push clients as it can generate significant - load on the involved push services. Default: `false`. + notifications are generated for *all* registered push clients + during server startup. This option should *not* be enabled on + servers with many push clients as it can generate significant + load on the involved push services. Default: `false`. **`wake_on_timeout: true|false`**: If this option is set to `true`, a - notification is generated shortly before the session would time - out as per the `resume_timeout` described above. Default: - `true`. + notification is generated shortly before the session would time + out as per the `resume_timeout` described above. Default: + `true`. ## mod_register @@ -4803,44 +4749,44 @@ This module adds support for In-Band Registration ([`XEP-0077`][91]). This protocol enables end users to use a XMPP client to: -- Register a new account on the server. +- Register a new account on the server. -- Change the password from an existing account on the server. +- Change the password from an existing account on the server. -- Delete an existing account on the server. +- Delete an existing account on the server. Options: **`access: AccessName`**: Specify rules to restrict what usernames can be registered and - unregistered. If a rule returns ‘deny’ on the requested username, - registration and unregistration of that user name is denied. There - are no restrictions by default. + unregistered. If a rule returns ‘deny’ on the requested username, + registration and unregistration of that user name is denied. There + are no restrictions by default. **`access_from: AccessName`**: By default, `ejabberd` doesn't allow to register new accounts from - s2s or existing c2s sessions. You can change it by defining access - rule in this option. Use with care: allowing registration from s2s - leads to uncontrolled massive accounts creation by rogue users. + s2s or existing c2s sessions. You can change it by defining access + rule in this option. Use with care: allowing registration from s2s + leads to uncontrolled massive accounts creation by rogue users. **`captcha_protected: false|true`**: Protect registrations with CAPTCHA (see section [CAPTCHA](#captcha)). The - default is `false`. + default is `false`. **`ip_access: AccessName`**: Define rules to allow or deny account registration depending on the - IP address of the XMPP client. The `AccessName` should be of type - `ip`. The default value is `all`. + IP address of the XMPP client. The `AccessName` should be of type + `ip`. The default value is `all`. **`password_strength: Entropy`**: This option sets the minimum Shannon entropy for passwords. - The value `Entropy` is a number of bits of entropy. The recommended - minimum is 32 bits. The default is 0, i.e. no checks are performed. + The value `Entropy` is a number of bits of entropy. The recommended + minimum is 32 bits. The default is 0, i.e. no checks are performed. **`redirect_url: URL`**: This option enables registration redirection as described in - [`XEP-0077: In-Band Registration: Redirection`](https://xmpp.org/extensions/xep-0077.html#redirect). + [`XEP-0077: In-Band Registration: Redirection`](https://xmpp.org/extensions/xep-0077.html#redirect). **`registration_watchers: [ JID, ...]`**: This option defines a list of JIDs which will be notified each time - a new account is registered. + a new account is registered. **`welcome_message: {subject: Subject, body: Body}`**: Set a welcome message that is sent to each newly registered account. - The first string is the subject, and the second string is the - message body. + The first string is the subject, and the second string is the + message body. This module reads also another option defined globally for the server: `registration_timeout: Timeout`. This option limits the frequency of @@ -4854,86 +4800,82 @@ put a word like: `infinity`. Default value: 600 seconds. Examples: -- Next example prohibits the registration of too short account names, - and allows to create accounts only to clients of the local network: - - - acl: - loopback: - ip: - - 127.0.0.0/8 - - "::1" - shortname: - user_glob: - - "?" - - "??" - ## The same using regexp: - ##user_regexp: "^..?$" - - access_rules: - mynetworks: - - allow: loopback - register: - - deny: shortname - - allow: all - - modules: - mod_register: - ip_access: mynetworks - access: register - -- This configuration prohibits usage of In-Band Registration to create - or delete accounts, but allows existing accounts to change the - password: - - - modules: - ... - mod_register: - access: none - ... - -- This configuration disables all In-Band Registration functionality: - create, delete accounts and change password: - - - modules: - ... - ## mod_register: - ## access: register - ... - -- Define the welcome message and two registration watchers. Also - define a registration timeout of one hour: - - - registration_timeout: 3600 - modules: - ... - mod_register: - welcome_message: - subject: "Welcome!" - body: |- - Hi. - Welcome to this XMPP server. - Check https://xmpp.org/ - - Bye - registration_watchers: - - admin1@example.org - - boss@example.net - redirect_url: http://my.site.org/register - ... +- Next example prohibits the registration of too short account names, + and allows to create accounts only to clients of the local network: + + acl: + loopback: + ip: + - 127.0.0.0/8 + - "::1" + shortname: + user_glob: + - "?" + - "??" + ## The same using regexp: + ##user_regexp: "^..?$" + + access_rules: + mynetworks: + - allow: loopback + register: + - deny: shortname + - allow: all + + modules: + mod_register: + ip_access: mynetworks + access: register + +- This configuration prohibits usage of In-Band Registration to create + or delete accounts, but allows existing accounts to change the + password: + + modules: + ... + mod_register: + access: none + ... + +- This configuration disables all In-Band Registration functionality: + create, delete accounts and change password: + + modules: + ... + ## mod_register: + ## access: register + ... + +- Define the welcome message and two registration watchers. Also + define a registration timeout of one hour: + + registration_timeout: 3600 + modules: + ... + mod_register: + welcome_message: + subject: "Welcome!" + body: |- + Hi. + Welcome to this XMPP server. + Check https://xmpp.org/ + + Bye + registration_watchers: + - admin1@example.org + - boss@example.net + redirect_url: http://my.site.org/register + ... ## mod_register_web This module provides a web page where people can: -- Register a new account on the server. +- Register a new account on the server. -- Change the password from an existing account on the server. +- Change the password from an existing account on the server. -- Delete an existing account on the server. +- Delete an existing account on the server. This module supports CAPTCHA image to register a new account. To enable this feature, configure the options captcha\_cmd and captcha\_host. @@ -4941,34 +4883,33 @@ this feature, configure the options captcha\_cmd and captcha\_host. Options: **`registration_watchers: [ JID, ...]`**: This option defines a list of JIDs which will be notified each time - a new account is registered. + a new account is registered. This example configuration shows how to enable the module and the web handler: - - hosts: - - localhost - - example.org - - example.com - - certfiles: - - /etc/ejabberd/certificate.pem - - listen: - ... - - - port: 5281 - module: ejabberd_http - tls: true - request_handlers: - /register: mod_register_web - ... - - modules: - ... - mod_register_web: {} - ... + hosts: + - localhost + - example.org + - example.com + + certfiles: + - /etc/ejabberd/certificate.pem + + listen: + ... + - + port: 5281 + module: ejabberd_http + tls: true + request_handlers: + /register: mod_register_web + ... + + modules: + ... + mod_register_web: {} + ... For example, the users of the host `example.org` can visit the page: `https://example.org:5281/register/` It is important to include the last @@ -4987,52 +4928,50 @@ Options: **`use_cache: false|true`**: Use this option and related ones as explained in section [Caching](#caching). -**`versioning: false|true`**: Enables Roster Versioning. This option is disabled by default. We use a [simplified version of roster versioning](/developer/xmpp-clients-bots/extensions/roster-versioning/). +**`versioning: false|true`**: Enables Roster Versioning. This option is disabled by default. We use a [simplified version of roster versioning](../developer/xmpp-clients-bots/extensions/roster-versioning.md). **`store_current_id: false|true`**: If this option is enabled, the current version number is stored on - the database. If disabled, the version number is calculated on the - fly each time. Enabling this option reduces the load for both - ejabberd and the database. This option does not affect the client in - any way. This option is only useful if Roster Versioning is enabled. - This option is disabled by default. Important: if you use - `mod_shared_roster` or `mod_shared_roster_ldap`, you must disable - this option. + the database. If disabled, the version number is calculated on the + fly each time. Enabling this option reduces the load for both + ejabberd and the database. This option does not affect the client in + any way. This option is only useful if Roster Versioning is enabled. + This option is disabled by default. Important: if you use + `mod_shared_roster` or `mod_shared_roster_ldap`, you must disable + this option. **`access`**: This option can be configured to specify rules to restrict roster - management. If a rule returns ‘deny’ on the requested user name, - that user cannot modify their personal roster: not add/remove/modify - contacts, or subscribe/unsubscribe presence. By default there aren’t - restrictions. + management. If a rule returns ‘deny’ on the requested user name, + that user cannot modify their personal roster: not add/remove/modify + contacts, or subscribe/unsubscribe presence. By default there aren’t + restrictions. This example configuration enables Roster Versioning with storage of current id. The ICQ and MSN transports can get ICQ and MSN contacts, add them, or remove them for any local account: - - modules: - ... - mod_roster: - versioning: true - store_current_id: true - ... + modules: + ... + mod_roster: + versioning: true + store_current_id: true + ... With this example configuration, only admins can manage their rosters; everybody else cannot modify the roster: + acl: + admin: + user: + - sarah@example.org + access_rules: + roster: + - allow: admin - acl: - admin: - user: - - sarah@example.org - access_rules: - roster: - - allow: admin - - modules: - ... - mod_roster: - access: roster - ... + modules: + ... + mod_roster: + access: roster + ... ## mod_s2s_dialback @@ -5050,32 +4989,30 @@ the specified service(s). Options: **`loggers: [Names, ...]`**: With this option a (list of) service(s) that will receive the - packets can be specified. + packets can be specified. Examples: -- To log all end user packets to the Bandersnatch service running on - `bandersnatch.example.com`: +- To log all end user packets to the Bandersnatch service running on + `bandersnatch.example.com`: + modules: + ... + mod_service_log: + loggers: [bandersnatch.example.com] + ... - modules: - ... - mod_service_log: - loggers: [bandersnatch.example.com] - ... - -- To log all end user packets to the Bandersnatch service running on - `bandersnatch.example.com` and the backup service on - `bandersnatch.example.org`: - +- To log all end user packets to the Bandersnatch service running on + `bandersnatch.example.com` and the backup service on + `bandersnatch.example.org`: - modules: - ... - mod_service_log: - loggers: - - bandersnatch.example.com - - bandersnatch.example.org - ... + modules: + ... + mod_service_log: + loggers: + - bandersnatch.example.com + - bandersnatch.example.org + ... ## mod_shared_roster @@ -5108,82 +5045,81 @@ Options: Shared roster groups can be edited *only* via the Web Admin. Each group has a unique identification and the following parameters: -* **Name**: The name of the group, which will be displayed in the roster. +- **Name**: The name of the group, which will be displayed in the roster. -* **Description**: The description of the group. This parameter does not affect - anything. +- **Description**: The description of the group. This parameter does not affect + anything. -* **Members**: A list of JIDs of group members, entered one per line in the Web - Admin. The special member directive `@all@` represents all the - registered users in the virtual host; which is only recommended for - a small server with just a few hundred users. The special member - directive `@online@` represents the online users in the virtual - host. +- **Members**: A list of JIDs of group members, entered one per line in the Web + Admin. The special member directive `@all@` represents all the + registered users in the virtual host; which is only recommended for + a small server with just a few hundred users. The special member + directive `@online@` represents the online users in the virtual + host. -* **Displayed groups**: A list of groups that will be in the rosters of this group’s - members. A group of other vhost can be identified with - `groupid@vhost` +- **Displayed groups**: A list of groups that will be in the rosters of this group’s + members. A group of other vhost can be identified with + `groupid@vhost` Examples: - Take the case of a computer club that wants all its members seeing - each other in their rosters. To achieve this, they need to create a - shared roster group similar to this one: + each other in their rosters. To achieve this, they need to create a + shared roster group similar to this one: - **Identification**: Group ‘`club_members`’ + **Identification**: Group ‘`club_members`’ - **Name**: Club Members + **Name**: Club Members - **Description**: Members from the computer club + **Description**: Members from the computer club - **Members**: `member1@example.org`, `member2@example.org`, `member3@example.org` + **Members**: `member1@example.org`, `member2@example.org`, `member3@example.org` - **Displayed groups**: `club_members` + **Displayed groups**: `club_members` -- In another case we have a company which has three divisions: - Management, Marketing and Sales. All group members should see all - other members in their rosters. Additionally, all managers should - have all marketing and sales people in their roster. Simultaneously, - all marketeers and the whole sales team should see all managers. - This scenario can be achieved by creating shared roster groups as - shown in the following lists: +- In another case we have a company which has three divisions: + Management, Marketing and Sales. All group members should see all + other members in their rosters. Additionally, all managers should + have all marketing and sales people in their roster. Simultaneously, + all marketeers and the whole sales team should see all managers. + This scenario can be achieved by creating shared roster groups as + shown in the following lists: - First list: + First list: - **Identification**: Group ‘`management`’ + **Identification**: Group ‘`management`’ - **Name**: Management + **Name**: Management - **Description**: Management + **Description**: Management - **Members**: `manager1@example.org`, `manager2@example.org` + **Members**: `manager1@example.org`, `manager2@example.org` - **Displayed groups**: `management`, `marketing`, `sales` + **Displayed groups**: `management`, `marketing`, `sales` - Second list: + Second list: - **Identification**: Group ‘`marketing`’ + **Identification**: Group ‘`marketing`’ - **Name**: Marketing + **Name**: Marketing - **Description**: Marketing + **Description**: Marketing - **Members**: `marketeer1@example.org`, `marketeer2@example.org`, `marketeer3@example.org` + **Members**: `marketeer1@example.org`, `marketeer2@example.org`, `marketeer3@example.org` - **Displayed groups**: `management`, `marketing` + **Displayed groups**: `management`, `marketing` - Third list: + Third list: - **Identification**: Group ‘`sales`’ + **Identification**: Group ‘`sales`’ - **Name**: Sales + **Name**: Sales - **Description**: Sales + **Description**: Sales - **Members**: `salesman1@example.org`, `salesman2@example.org`, `salesman3@example.org` - - **Displayed groups**: `management`, `sales` + **Members**: `salesman1@example.org`, `salesman2@example.org`, `salesman3@example.org` + **Displayed groups**: `management`, `sales` ## mod_shared_roster_ldap @@ -5210,21 +5146,21 @@ These parameters specify LDAP filters used to query for shared roster information. All of them are run against the `ldap_base`. **`ldap_rfilter`**: So called “Roster Filter”. Used to find names of all “shared roster” - groups. See also the `ldap_groupattr` parameter. If unspecified, - defaults to the top-level parameter of the same name. You - *must* specify it in some place in the configuration, - there is no default. + groups. See also the `ldap_groupattr` parameter. If unspecified, + defaults to the top-level parameter of the same name. You + *must* specify it in some place in the configuration, + there is no default. **`ldap_ufilter`**: “User Filter” – used for retrieving the human-readable name of - roster entries (usually full names of people in the roster). See - also the parameters `ldap_userdesc` and `ldap_useruid`. If - unspecified, defaults to the top-level parameter of the same name. - If that one also is unspecified, then the filter is assembled from - values of other parameters as follows (`[ldap_SOMETHING]` is used to - mean “the value of the configuration parameter - `ldap_SOMETHING`”): + roster entries (usually full names of people in the roster). See + also the parameters `ldap_userdesc` and `ldap_useruid`. If + unspecified, defaults to the top-level parameter of the same name. + If that one also is unspecified, then the filter is assembled from + values of other parameters as follows (`[ldap_SOMETHING]` is used to + mean “the value of the configuration parameter + `ldap_SOMETHING`”): - (&(&([ldap_memberattr]=[ldap_memberattr_format])([ldap_groupattr]=%g))[ldap_filter]) + (&(&([ldap_memberattr]=[ldap_memberattr_format])([ldap_groupattr]=%g))[ldap_filter]) Subsequently `%u` and `%g` are replaced with a \*. This means that given the defaults, the filter sent to the LDAP @@ -5234,27 +5170,27 @@ server would be `(&(memberUid=*)(cn=*))`. If however the `(&(memberUid=uid=*,ou=People,o=org)(cn=*))`. **`ldap_gfilter`**: “Group Filter” – used when retrieving human-readable name (a.k.a. - “Display Name”) and the members of a group. See also the parameters - `ldap_groupattr`, `ldap_groupdesc` and `ldap_memberattr`. If - unspecified, defaults to the top-level parameter of the same name. - If that one also is unspecified, then the filter is constructed - exactly in the same way as *User Filter*. + “Display Name”) and the members of a group. See also the parameters + `ldap_groupattr`, `ldap_groupdesc` and `ldap_memberattr`. If + unspecified, defaults to the top-level parameter of the same name. + If that one also is unspecified, then the filter is constructed + exactly in the same way as *User Filter*. **`ldap_filter`**: Additional filter which is AND-ed together with *User - Filter* and *Group Filter*. If unspecified, - defaults to the top-level parameter of the same name. If that one is - also unspecified, then no additional filter is merged with the other - filters. + Filter* and *Group Filter*. If unspecified, + defaults to the top-level parameter of the same name. If that one is + also unspecified, then no additional filter is merged with the other + filters. Note that you will probably need to manually define the *User* and *Group Filter* (since the auto-assembled ones will not work) if: -- your `ldap_memberattr_format` is anything other than a - simple `%u`, +- your `ldap_memberattr_format` is anything other than a + simple `%u`, -- **and** the attribute specified with - `ldap_memberattr` does not support substring matches. +- **and** the attribute specified with + `ldap_memberattr` does not support substring matches. An example where it is the case is OpenLDAP and *(unique)MemberName* attribute from the @@ -5262,15 +5198,14 @@ An example where it is the case is OpenLDAP and is that you will see messages such as the following in your `slapd.log`: - - get_filter: unknown filter type=130 - filter="(&(?=undefined)(?=undefined)(something=else))" + get_filter: unknown filter type=130 + filter="(&(?=undefined)(?=undefined)(something=else))" ### Attributes These parameters specify the names of the attributes which hold interesting data in the entries returned by running filters specified in -section [Filters](#msrl-filters). +section [Filters](#filters). **`ldap_groupattr`**: The name of the attribute that holds the group name, and that is used to differentiate between them. Retrieved from results of the “Roster @@ -5282,15 +5217,15 @@ section [Filters](#msrl-filters). set. **`ldap_memberattr`**: The name of the attribute which holds the IDs of the members of a group. - Retrieved from results of the “Group Filter”. Defaults to - `memberUid`. + Retrieved from results of the “Group Filter”. Defaults to + `memberUid`. The name of the attribute differs depending on the `objectClass` you use for your group objects, for example: - `posixGroup` -> `memberUid` - `groupOfNames` -> `member` - `groupOfUniqueNames` -> `uniqueMember` + `posixGroup` -> `memberUid` + `groupOfNames` -> `member` + `groupOfUniqueNames` -> `uniqueMember` **`ldap_userdesc`**: The name of the attribute which holds the human-readable user name. Retrieved from results of the “User Filter”. Defaults to @@ -5307,29 +5242,29 @@ The name of the attribute differs depending on the These parameters control the behaviour of the module. **`ldap_memberattr_format`**: A globbing format for extracting user ID from the value of the - attribute named by `ldap_memberattr`. Defaults to `%u`, - which means that the whole value is the member ID. If you change it - to something different, you may also need to specify the User and - Group Filters manually — see section [Filters](#msrl-filters). + attribute named by `ldap_memberattr`. Defaults to `%u`, + which means that the whole value is the member ID. If you change it + to something different, you may also need to specify the User and + Group Filters manually — see section [Filters](#filters). **`ldap_memberattr_format_re`**: A regex for extracting user ID from the value of the attribute named - by `ldap_memberattr`. + by `ldap_memberattr`. An example value `“CN=(\\w*),(OU=.*,)*DC=company,DC=com”` works for user IDs such as the following: -- `CN=Romeo,OU=Montague,DC=company,DC=com` -- `CN=Abram,OU=Servants,OU=Montague,DC=company,DC=com` -- `CN=Juliet,OU=Capulet,DC=company,DC=com` -- `CN=Peter,OU=Servants,OU=Capulet,DC=company,DC=com` +- `CN=Romeo,OU=Montague,DC=company,DC=com` +- `CN=Abram,OU=Servants,OU=Montague,DC=company,DC=com` +- `CN=Juliet,OU=Capulet,DC=company,DC=com` +- `CN=Peter,OU=Servants,OU=Capulet,DC=company,DC=com` In case: -- the option is unset, -- or the `re` module in unavailable in the current +- the option is unset, +- or the `re` module in unavailable in the current Erlang environment, -- or the regular expression does not compile, +- or the regular expression does not compile, then instead of a regular expression, a simple format specified by `ldap_memberattr_format` is used. Also, in the last two @@ -5337,23 +5272,23 @@ cases an error message is logged during the module initialization. Also, note that in all cases `ldap_memberattr_format` (and `*not*` the regex version) is used for constructing -the default “User/Group Filter” — see section [Filters](#msrl-filters). +the default “User/Group Filter” — see section [Filters](#filters). **`ldap_auth_check`**: Whether the module should check (via the ejabberd authentication - subsystem) for existence of each user in the shared LDAP roster. See - section [mod_shared_roster_ldap](#mod-shared-roster-ldap) form more information. Set to - `off` if you want to disable the check. Defaults to - `on`. + subsystem) for existence of each user in the shared LDAP roster. See + section [mod_shared_roster_ldap](#mod_shared_roster_ldap) form more information. Set to + `off` if you want to disable the check. Defaults to + `on`. **`ldap_user_cache_validity`**: Number of seconds for which the cache for roster item full names is - considered fresh after retrieval. 300 by default. See - section [mod_shared_roster_ldap](#mod-shared-roster-ldap) on how it is used during roster - retrieval. + considered fresh after retrieval. 300 by default. See + section [mod_shared_roster_ldap](#mod_shared_roster_ldap) on how it is used during roster + retrieval. **`ldap_group_cache_validity`**: Number of seconds for which the cache for group membership is - considered fresh after retrieval. 300 by default. See - section [mod_shared_roster_ldap](#mod-shared-roster-ldap) on how it is used during roster - retrieval. + considered fresh after retrieval. 300 by default. See + section [mod_shared_roster_ldap](#mod_shared_roster_ldap) on how it is used during roster + retrieval. ### Connection parameters @@ -5366,69 +5301,69 @@ See [LDAP Connection](#ldap-connection)] for more information about them. When the module is called to retrieve the shared roster for a user, the following algorithm is used: -1. [step:rfilter] A list of names of groups to display is created: the - *Roster Filter* is run against the base DN, retrieving - the values of the attribute named by `ldap_groupattr`. +1. [step:rfilter] A list of names of groups to display is created: the + *Roster Filter* is run against the base DN, retrieving + the values of the attribute named by `ldap_groupattr`. -2. Unless the group cache is fresh (see the - `ldap_group_cache_validity` option), it is refreshed: +2. Unless the group cache is fresh (see the + `ldap_group_cache_validity` option), it is refreshed: - 1. Information for all groups is retrieved using a single query: - the *Group Filter* is run against the Base DN, - retrieving the values of attributes named by - `ldap_groupattr` (group ID), - `ldap_groupdesc` (group “Display Name”) and - `ldap_memberattr` (IDs of group members). + 1. Information for all groups is retrieved using a single query: + the *Group Filter* is run against the Base DN, + retrieving the values of attributes named by + `ldap_groupattr` (group ID), + `ldap_groupdesc` (group “Display Name”) and + `ldap_memberattr` (IDs of group members). - 2. group “Display Name”, read from the attribute named by - `ldap_groupdesc`, is stored in the cache for the - given group + 2. group “Display Name”, read from the attribute named by + `ldap_groupdesc`, is stored in the cache for the + given group - 3. the following processing takes place for each retrieved value of - attribute named by `ldap_memberattr`: + 3. the following processing takes place for each retrieved value of + attribute named by `ldap_memberattr`: - 1. the user ID part of it is extracted using - `ldap_memberattr_format(_re)`, + 1. the user ID part of it is extracted using + `ldap_memberattr_format(_re)`, - 2. then (unless `ldap_auth_check` is set to - `off`) for each found user ID, the module checks - (using the `ejabberd` authentication subsystem) whether such - user exists in the given virtual host. It is skipped if the - check is enabled and fails. + 2. then (unless `ldap_auth_check` is set to + `off`) for each found user ID, the module checks + (using the `ejabberd` authentication subsystem) whether such + user exists in the given virtual host. It is skipped if the + check is enabled and fails. - This step is here for historical reasons. If you have a tidy - DIT and properly defined “Roster Filter” and “Group Filter”, - it is safe to disable it by setting - `ldap_auth_check` to `off` — it will - speed up the roster retrieval. + This step is here for historical reasons. If you have a tidy + DIT and properly defined “Roster Filter” and “Group Filter”, + it is safe to disable it by setting + `ldap_auth_check` to `off` — it will + speed up the roster retrieval. - 3. the user ID is stored in the list of members in the cache - for the given group + 3. the user ID is stored in the list of members in the cache + for the given group -3. For each item (group name) in the list of groups retrieved in - step [step:rfilter]: +3. For each item (group name) in the list of groups retrieved in + step [step:rfilter]: - 1. the display name of a shared roster group is retrieved from the - group cache + 1. the display name of a shared roster group is retrieved from the + group cache - 2. for each IDs of users which belong to the group, retrieved from - the group cache: + 2. for each IDs of users which belong to the group, retrieved from + the group cache: - 1. the ID is skipped if it’s the same as the one for which we - are retrieving the roster. This is so that the user does not - have himself in the roster. + 1. the ID is skipped if it’s the same as the one for which we + are retrieving the roster. This is so that the user does not + have himself in the roster. - 2. the display name of a shared roster user is retrieved: + 2. the display name of a shared roster user is retrieved: - 1. first, unless the user name cache is fresh (see the - `ldap_user_cache_validity` option), it is - refreshed by running the *User Filter*, - against the Base DN, retrieving the values of attributes - named by `ldap_useruid` and - `ldap_userdesc`. + 1. first, unless the user name cache is fresh (see the + `ldap_user_cache_validity` option), it is + refreshed by running the *User Filter*, + against the Base DN, retrieving the values of attributes + named by `ldap_useruid` and + `ldap_userdesc`. - 2. then, the display name for the given user ID is - retrieved from the user name cache. + 2. then, the display name for the given user ID is + retrieved from the user name cache. ### Configuration examples @@ -5447,29 +5382,28 @@ stored in its `ou` attribute. Such layout has a few downsides, including: -- information duplication – the group name is repeated in every member - object +- information duplication – the group name is repeated in every member + object -- difficult group management – information about group members is not - centralized, but distributed between member objects +- difficult group management – information about group members is not + centralized, but distributed between member objects -- inefficiency – the list of unique group names has to be computed by - iterating over all users +- inefficiency – the list of unique group names has to be computed by + iterating over all users This however seems to be a common DIT layout, so the module keeps supporting it. You can use the following configuration… - - modules: - ... - mod_shared_roster_ldap: - ldap_base: "ou=flat,dc=nodomain" - ldap_rfilter: "(objectClass=inetOrgPerson)" - ldap_groupattr: ou - ldap_memberattr: cn - ldap_filter: "(objectClass=inetOrgPerson)" - ldap_userdesc: displayName - ... + modules: + ... + mod_shared_roster_ldap: + ldap_base: "ou=flat,dc=nodomain" + ldap_rfilter: "(objectClass=inetOrgPerson)" + ldap_groupattr: ou + ldap_memberattr: cn + ldap_filter: "(objectClass=inetOrgPerson)" + ldap_userdesc: displayName + ... …to be provided with a roster as shown in figure [fig:msrl-roster-flat] upon connecting as user `czesio`. @@ -5482,20 +5416,19 @@ different subtrees, but it’s not a requirement. If you use the following example module configuration with it: - - modules: - ... - mod_shared_roster_ldap: - ldap_base: "ou=deep,dc=nodomain" - ldap_rfilter: "(objectClass=groupOfUniqueNames)" - ldap_filter: "" - ldap_gfilter: "(&(objectClass=groupOfUniqueNames)(cn=%g))" - ldap_groupdesc: description - ldap_memberattr: uniqueMember - ldap_memberattr_format: "cn=%u,ou=people,ou=deep,dc=nodomain" - ldap_ufilter: "(&(objectClass=inetOrgPerson)(cn=%u))" - ldap_userdesc: displayName - ... + modules: + ... + mod_shared_roster_ldap: + ldap_base: "ou=deep,dc=nodomain" + ldap_rfilter: "(objectClass=groupOfUniqueNames)" + ldap_filter: "" + ldap_gfilter: "(&(objectClass=groupOfUniqueNames)(cn=%g))" + ldap_groupdesc: description + ldap_memberattr: uniqueMember + ldap_memberattr_format: "cn=%u,ou=people,ou=deep,dc=nodomain" + ldap_ufilter: "(&(objectClass=inetOrgPerson)(cn=%u))" + ldap_userdesc: displayName + ... …and connect as user `czesio`, then `ejabberd` will provide you with the roster shown in figure [fig:msrl-roster-deep]. @@ -5515,67 +5448,65 @@ section [SIP](#sip) for the full explanation. Example configuration: - - modules: - ... - mod_sip: {} - ... + modules: + ... + mod_sip: {} + ... Options: **`record_route: SIP_URI`**: When the option `always_record_route` is set or when SIP outbound is - utilized [`RFC 5626`](https://tools.ietf.org/html/rfc5626), - `ejabberd` inserts `Record-Route` header field with this `SIP_URI` - into a SIP message. The default is SIP URI constructed from the - virtual host. + utilized [`RFC 5626`](https://tools.ietf.org/html/rfc5626), + `ejabberd` inserts `Record-Route` header field with this `SIP_URI` + into a SIP message. The default is SIP URI constructed from the + virtual host. **`always_record_route: true|false`**: Always insert `Record-Route` header into SIP messages. This approach - allows to bypass NATs/firewalls a bit more easily. The default is - `true`. + allows to bypass NATs/firewalls a bit more easily. The default is + `true`. **`routes: [SIP_URI]`**: You can set a list of SIP URIs of routes pointing to this proxy - server. The default is a list of a SIP URI constructed from the - virtual host. + server. The default is a list of a SIP URI constructed from the + virtual host. **`flow_timeout_udp: Seconds`**: For SIP outbound UDP connections set a keep-alive timer to - `Seconds`. The default is 29. + `Seconds`. The default is 29. **`flow_timeout_tcp: Seconds`**: For SIP outbound TCP connections set a keep-alive timer to - `Seconds`. The default is 120. + `Seconds`. The default is 120. **`via: [{type: Type, host: Host, port: Port}]`**: With this option for every `Type` you can specify `Host` and `Port` - to set in `Via` header of outgoing SIP messages, where `Type` can be - `udp`, `tcp` or `tls`. `Host` is a string and `Port` is a non - negative integer. This is useful if you’re running your server in a - non-standard network topology. + to set in `Via` header of outgoing SIP messages, where `Type` can be + `udp`, `tcp` or `tls`. `Host` is a string and `Port` is a non + negative integer. This is useful if you’re running your server in a + non-standard network topology. Example complex configuration: - - modules: - ... - mod_sip: - always_record_route: false - record_route: "sip:example.com;lr" - routes: - - "sip:example.com;lr" - - "sip:sip.example.com;lr" - flow_timeout_udp: 30 - flow_timeout_tcp: 130 - via: - - - type: tls - host: sip-tls.example.com - port: 5061 - - - type: tcp - host: sip-tcp.example.com - port: 5060 - - - type: udp - host: sip-udp.example.com - port: 5060 - ... + modules: + ... + mod_sip: + always_record_route: false + record_route: "sip:example.com;lr" + routes: + - "sip:example.com;lr" + - "sip:sip.example.com;lr" + flow_timeout_udp: 30 + flow_timeout_tcp: 130 + via: + - + type: tls + host: sip-tls.example.com + port: 5061 + - + type: tcp + host: sip-tcp.example.com + port: 5060 + - + type: udp + host: sip-udp.example.com + port: 5060 + ... ## mod_stats @@ -5583,42 +5514,40 @@ This module adds support for Statistics Gathering ([`XEP-0039`][99]). This protocol allows you to retrieve next statistics from your `ejabberd` deployment: -- Total number of registered users on the current virtual host - (users/total). +- Total number of registered users on the current virtual host + (users/total). -- Total number of registered users on all virtual hosts - (users/all-hosts/total). +- Total number of registered users on all virtual hosts + (users/all-hosts/total). -- Total number of online users on the current virtual host - (users/online). +- Total number of online users on the current virtual host + (users/online). -- Total number of online users on all virtual hosts - (users/all-hosts/online). +- Total number of online users on all virtual hosts + (users/all-hosts/online). As there are only a small amount of clients (for example [`Tkabber`][100]) and software libraries with support for this XEP, a few examples are given of the XML you need to send in order to get the statistics. Here they are: -- You can request the number of online users on the current virtual - host (`example.org`) by sending: +- You can request the number of online users on the current virtual + host (`example.org`) by sending: + + + + + - - - - - +- You can request the total number of registered users on all virtual + hosts by sending: -- You can request the total number of registered users on all virtual - hosts by sending: - - - - - - - + + + + + ## mod_stream_mgmt @@ -5629,49 +5558,49 @@ including features for stanza acknowledgements and stream resumption. Options: **`max_ack_queue: Size`**: This option specifies the maximum number of unacknowledged stanzas - queued for possible retransmission. - When the limit is exceeded, the client session is - terminated. The allowed values are positive integers and `infinity`. - You should be careful when setting this value as it should not be set too low, - otherwise, you could killed sessions in loop, before they get the chance to finish - proper session initiation. It should definitely be set higher that the size of the - offline queue (for example at least 3 times the value of the max offline queue and never - lower than 1000). - Default value: `5000`. + queued for possible retransmission. + When the limit is exceeded, the client session is + terminated. The allowed values are positive integers and `infinity`. + You should be careful when setting this value as it should not be set too low, + otherwise, you could killed sessions in loop, before they get the chance to finish + proper session initiation. It should definitely be set higher that the size of the + offline queue (for example at least 3 times the value of the max offline queue and never + lower than 1000). + Default value: `5000`. **`max_resume_timeout: Seconds`**: A client may specify the number of - seconds until a session times out if the connection is lost. During - this period of time, the client may resume the session. This option - limits the number of seconds a client is permitted to request. - It must be set to - a number equal to or larger than the default `resume_timeout` (see - below). By default, it is set to the same value as the - `resume_timeout` option. + seconds until a session times out if the connection is lost. During + this period of time, the client may resume the session. This option + limits the number of seconds a client is permitted to request. + It must be set to + a number equal to or larger than the default `resume_timeout` (see + below). By default, it is set to the same value as the + `resume_timeout` option. **`resend_on_timeout: true|false|if_offline`**: If this option is set to `true`, - any message stanzas that weren’t acknowledged by the client will - be resent on session timeout. This behavior might often be desired, - but could have unexpected results under certain circumstances. For - example, a message that was sent to two resources might get resent - to one of them if the other one timed out. Therefore, the default - value for this option is `false`, which tells ejabberd to generate - an error message instead. As an alternative, the option may be set - to `if_offline`. In this case, unacknowledged messages are resent - only if no other resource is online when the session times out. - Otherwise, error messages are generated. + any message stanzas that weren’t acknowledged by the client will + be resent on session timeout. This behavior might often be desired, + but could have unexpected results under certain circumstances. For + example, a message that was sent to two resources might get resent + to one of them if the other one timed out. Therefore, the default + value for this option is `false`, which tells ejabberd to generate + an error message instead. As an alternative, the option may be set + to `if_offline`. In this case, unacknowledged messages are resent + only if no other resource is online when the session times out. + Otherwise, error messages are generated. **`resume_timeout: Seconds`**: This option configures the (default) number of seconds until a session - times out if the connection is lost. During this period of time, a - client may resume the session. - (Note that the client may request a different timeout value, see the - `max_resume_timeout` option above.) Setting it to `0` effectively disables - session resumption. The default value is `300`. + times out if the connection is lost. During this period of time, a + client may resume the session. + (Note that the client may request a different timeout value, see the + `max_resume_timeout` option above.) Setting it to `0` effectively disables + session resumption. The default value is `300`. **`ack_timeout: Seconds`**: The default value is `60`. - Setting it to `infinity` effectively disables the timeout. + Setting it to `infinity` effectively disables the timeout. **`queue_type: Discipline`**: The default value is `ram`. - The accepted values are `ram` and `file`. + The accepted values are `ram` and `file`. ## mod_time @@ -5691,9 +5620,9 @@ when queried. Options: **`host: HostName`**: This option defines the Jabber ID of the service. If the `host` - option is not specified, the Jabber ID will be the hostname of the - virtual host with the prefix ‘`vjud.`’. The keyword “@HOST@” is - replaced at start time with the real virtual host name. + option is not specified, the Jabber ID will be the hostname of the + virtual host with the prefix ‘`vjud.`’. The keyword “@HOST@” is + replaced at start time with the real virtual host name. **`db_type: mnesia|sql|ldap`**: Define the type of storage where the module will create the tables and store user information. The @@ -5707,52 +5636,50 @@ Options: **`use_cache: false|true`**: Use this option and related ones as explained in section [Caching](#caching). **`search: true|false`**: This option specifies whether the search functionality is enabled or - not. If disabled, the option `host` will be ignored and the Jabber - User Directory service will not appear in the Service Discovery item - list. The default value is `false`. + not. If disabled, the option `host` will be ignored and the Jabber + User Directory service will not appear in the Service Discovery item + list. The default value is `false`. **`matches: infinity|Number`**: With this option, the number of reported search results can be - limited. If the option’s value is set to `infinity`, all search - results are reported. The default value is `30`. + limited. If the option’s value is set to `infinity`, all search + results are reported. The default value is `30`. **`allow_return_all: false|true`**: This option enables you to specify if search operations with empty - input fields should return all users who added some information to - their vCard. The default value is `false`. + input fields should return all users who added some information to + their vCard. The default value is `false`. **`search_all_hosts, true|false`**: If this option is set to `true`, search operations will apply to all - virtual hosts. Otherwise only the current host will be searched. The - default value is `true`. This option is available in `mod_vcard` - when using Mnesia, but not when using SQL storage. + virtual hosts. Otherwise only the current host will be searched. The + default value is `true`. This option is available in `mod_vcard` + when using Mnesia, but not when using SQL storage. Examples: -- In this first situation, search results are limited to twenty items, - every user who added information to their vCard will be listed when - people do an empty search, and only users from the current host will - be returned: - - - modules: - ... - mod_vcard: - search: true - matches: 20 - allow_return_all: true - search_all_hosts: false - ... +- In this first situation, search results are limited to twenty items, + every user who added information to their vCard will be listed when + people do an empty search, and only users from the current host will + be returned: -- The second situation differs in a way that search results are not - limited, and that all virtual hosts will be searched instead of only - the current one: + modules: + ... + mod_vcard: + search: true + matches: 20 + allow_return_all: true + search_all_hosts: false + ... +- The second situation differs in a way that search results are not + limited, and that all virtual hosts will be searched instead of only + the current one: - modules: - ... - mod_vcard: - search: true - matches: infinity - allow_return_all: true - ... + modules: + ... + mod_vcard: + search: true + matches: infinity + allow_return_all: true + ... ### vCards in LDAP @@ -5776,110 +5703,107 @@ parameters to set the authentication method: `ldap_servers`, detailed information about these options. If one of these options is not set, `ejabberd` will look for the top-level option with the same name. - - The second group of parameters consists of the following `mod_vcard`-specific options: **`host: HostName`**: This option defines the Jabber ID of the service. If the `host` - option is not specified, the Jabber ID will be the hostname of the - virtual host with the prefix ‘`vjud.`’. The keyword “@HOST@” is - replaced at start time with the real virtual host name. + option is not specified, the Jabber ID will be the hostname of the + virtual host with the prefix ‘`vjud.`’. The keyword “@HOST@” is + replaced at start time with the real virtual host name. **`search: true|false`**: This option specifies whether the search functionality is enabled - (value: `true`) or disabled (value: `false`). If disabled, the - option `host` will be ignored and the Jabber User Directory service - will not appear in the Service Discovery item list. The default - value is `false`. + (value: `true`) or disabled (value: `false`). If disabled, the + option `host` will be ignored and the Jabber User Directory service + will not appear in the Service Discovery item list. The default + value is `false`. **`matches: infinity|Number`**: With this option, the number of reported search results can be - limited. If the option’s value is set to `infinity`, all search - results are reported. The default value is `30`. + limited. If the option’s value is set to `infinity`, all search + results are reported. The default value is `30`. **`ldap_vcard_map: {Name: {Pattern, LDAPattributes}, ...}`**: With this option you can set the table that maps LDAP attributes to - vCard fields. `Name` is the type name of the vCard as defined in - [`RFC 2426`](https://tools.ietf.org/html/rfc2426). `Pattern` is a - string which contains pattern variables `%u`, `%d` or `%s`. - `LDAPattributes` is the list containing LDAP attributes. The pattern - variables `%s` will be sequentially replaced with the values of LDAP - attributes from `List_of_LDAP_attributes`, `%u` will be replaced - with the user part of a JID, and `%d` will be replaced with the - domain part of a JID. The default is: - - NICKNAME: {"%u": []} - FN: {"%s": [displayName]} - LAST: {"%s": [sn]} - FIRST: {"%s": [givenName]} - MIDDLE: {"%s": [initials]} - ORGNAME: {"%s": [o]} - ORGUNIT: {"%s": [ou]} - CTRY: {"%s": [c]} - LOCALITY: {"%s": [l]} - STREET: {"%s": [street]} - REGION: {"%s": [st]} - PCODE: {"%s": [postalCode]} - TITLE: {"%s": [title]} - URL: {"%s": [labeleduri]} - DESC: {"%s": [description]} - TEL: {"%s": [telephoneNumber]} - EMAIL: {"%s": [mail]} - BDAY: {"%s": [birthDay]} - ROLE: {"%s": [employeeType]} - PHOTO: {"%s": [jpegPhoto]} + vCard fields. `Name` is the type name of the vCard as defined in + [`RFC 2426`](https://tools.ietf.org/html/rfc2426). `Pattern` is a + string which contains pattern variables `%u`, `%d` or `%s`. + `LDAPattributes` is the list containing LDAP attributes. The pattern + variables `%s` will be sequentially replaced with the values of LDAP + attributes from `List_of_LDAP_attributes`, `%u` will be replaced + with the user part of a JID, and `%d` will be replaced with the + domain part of a JID. The default is: + + NICKNAME: {"%u": []} + FN: {"%s": [displayName]} + LAST: {"%s": [sn]} + FIRST: {"%s": [givenName]} + MIDDLE: {"%s": [initials]} + ORGNAME: {"%s": [o]} + ORGUNIT: {"%s": [ou]} + CTRY: {"%s": [c]} + LOCALITY: {"%s": [l]} + STREET: {"%s": [street]} + REGION: {"%s": [st]} + PCODE: {"%s": [postalCode]} + TITLE: {"%s": [title]} + URL: {"%s": [labeleduri]} + DESC: {"%s": [description]} + TEL: {"%s": [telephoneNumber]} + EMAIL: {"%s": [mail]} + BDAY: {"%s": [birthDay]} + ROLE: {"%s": [employeeType]} + PHOTO: {"%s": [jpegPhoto]} **`ldap_search_fields: {Name: Attribute, ...}`**: This option defines the search form and the LDAP attributes to - search within. `Name` is the name of a search form field which will - be automatically translated by using the translation files (see - `msgs/*.msg` for available words). `Attribute` is the LDAP attribute - or the pattern `%u`. The default is: - - User: "%u" - "Full Name": displayName - "Given Name": givenName - "Middle Name": initials - "Family Name": sn - Nickname: "%u" - Birthday: birthDay - Country: c - City: l - Email: mail - "Organization Name": o - "Organization Unit": ou + search within. `Name` is the name of a search form field which will + be automatically translated by using the translation files (see + `msgs/*.msg` for available words). `Attribute` is the LDAP attribute + or the pattern `%u`. The default is: + + User: "%u" + "Full Name": displayName + "Given Name": givenName + "Middle Name": initials + "Family Name": sn + Nickname: "%u" + Birthday: birthDay + Country: c + City: l + Email: mail + "Organization Name": o + "Organization Unit": ou **`ldap_search_reported: {SearchField: VcardField}, ...}`**: This option defines which search fields should be reported. - `SearchField` is the name of a search form field which will be - automatically translated by using the translation files (see - `msgs/*.msg` for available words). `VcardField` is the vCard field - name defined in the `ldap_vcard_map` option. The default is: - - "Full Name": FN - "Given Name": FIRST - "Middle Name": MIDDLE - "Family Name": LAST - "Nickname": NICKNAME - "Birthday": BDAY - "Country": CTRY - "City": LOCALITY - "Email": EMAIL - "Organization Name": ORGNAME - "Organization Unit": ORGUNIT + `SearchField` is the name of a search form field which will be + automatically translated by using the translation files (see + `msgs/*.msg` for available words). `VcardField` is the vCard field + name defined in the `ldap_vcard_map` option. The default is: + + "Full Name": FN + "Given Name": FIRST + "Middle Name": MIDDLE + "Family Name": LAST + "Nickname": NICKNAME + "Birthday": BDAY + "Country": CTRY + "City": LOCALITY + "Email": EMAIL + "Organization Name": ORGNAME + "Organization Unit": ORGUNIT Examples: -- Let’s say `ldap.example.org` is the name of our LDAP server. We have - users with their passwords in `ou=Users,dc=example,dc=org` - directory. Also we have addressbook, which contains users emails and - their additional infos in `ou=AddressBook,dc=example,dc=org` - directory. Corresponding authentication section should looks like - this: - - - ## authentication method - auth_method: ldap - ## DNS name of our LDAP server - ldap_servers: - - ldap.example.org - ## We want to authorize users from 'shadowAccount' object class only - ldap_filter: "(objectClass=shadowAccount)" +- Let’s say `ldap.example.org` is the name of our LDAP server. We have + users with their passwords in `ou=Users,dc=example,dc=org` + directory. Also we have addressbook, which contains users emails and + their additional infos in `ou=AddressBook,dc=example,dc=org` + directory. Corresponding authentication section should looks like + this: + + ## authentication method + auth_method: ldap + ## DNS name of our LDAP server + ldap_servers: + - ldap.example.org + ## We want to authorize users from 'shadowAccount' object class only + ldap_filter: "(objectClass=shadowAccount)" Now we want to use users LDAP-info as their vCards. We have four attributes defined in our LDAP schema: `mail` — email address, @@ -5887,71 +5811,67 @@ attributes defined in our LDAP schema: `mail` — email address, Also we want users to search each other. Let’s see how we can set it up: - - modules: - mod_vcard: - db_type: ldap - ## We use the same server and port, but want to bind anonymously because - ## our LDAP server accepts anonymous requests to - ## "ou=AddressBook,dc=example,dc=org" subtree. - ldap_rootdn: "" - ldap_password: "" - ## define the addressbook's base - ldap_base: "ou=AddressBook,dc=example,dc=org" - ## uidattr: user's part of JID is located in the "mail" attribute - ## uidattr_format: common format for our emails - ldap_uids: {"mail": "%u@mail.example.org"} - ## Now we want to define vCard pattern - ldap_vcard_map: - NICKNAME: {"%u": []} # just use user's part of JID as their nickname - FIRST: {"%s": [givenName]} - LAST: {"%s": [sn]} - FN: {"%s, %s": [sn, givenName]} # example: "Smith, John" - EMAIL: {"%s": [mail]} - BDAY: {"%s": [birthDay]} - ## Search form - ldap_search_fields: - User: "%u" - Name: givenName - "Family Name": sn - Email: mail - Birthday: birthDay - ## vCard fields to be reported - ## Note that JID is always returned with search results - ldap_search_reported: - "Full Name": FN - Nickname: NICKNAME - Birthday: BDAY + modules: + mod_vcard: + db_type: ldap + ## We use the same server and port, but want to bind anonymously because + ## our LDAP server accepts anonymous requests to + ## "ou=AddressBook,dc=example,dc=org" subtree. + ldap_rootdn: "" + ldap_password: "" + ## define the addressbook's base + ldap_base: "ou=AddressBook,dc=example,dc=org" + ## uidattr: user's part of JID is located in the "mail" attribute + ## uidattr_format: common format for our emails + ldap_uids: {"mail": "%u@mail.example.org"} + ## Now we want to define vCard pattern + ldap_vcard_map: + NICKNAME: {"%u": []} # just use user's part of JID as their nickname + FIRST: {"%s": [givenName]} + LAST: {"%s": [sn]} + FN: {"%s, %s": [sn, givenName]} # example: "Smith, John" + EMAIL: {"%s": [mail]} + BDAY: {"%s": [birthDay]} + ## Search form + ldap_search_fields: + User: "%u" + Name: givenName + "Family Name": sn + Email: mail + Birthday: birthDay + ## vCard fields to be reported + ## Note that JID is always returned with search results + ldap_search_reported: + "Full Name": FN + Nickname: NICKNAME + Birthday: BDAY Note that `mod_vcard` with LDAP backend checks an existence of the user before searching their info in LDAP. -- `ldap_vcard_map` example: - - - ldap_vcard_map: - NICKNAME: {"%u": []} # just use user's part of JID as their nickname - FN: {"%s": [displayName]} - CTRY: {Russia: []} - EMAIL: {"%u@%d": []} - DESC: {"%s\n%s": [title, description]} - -- `ldap_search_fields` example: +- `ldap_vcard_map` example: + ldap_vcard_map: + NICKNAME: {"%u": []} # just use user's part of JID as their nickname + FN: {"%s": [displayName]} + CTRY: {Russia: []} + EMAIL: {"%u@%d": []} + DESC: {"%s\n%s": [title, description]} - ldap_search_fields: - User: uid - "Full Name": displayName - Email: mail +- `ldap_search_fields` example: -- `ldap_search_reported` example: + ldap_search_fields: + User: uid + "Full Name": displayName + Email: mail +- `ldap_search_reported` example: - ldap_search_reported: - "Full Name": FN - Email: EMAIL - Birthday: BDAY - Nickname: NICKNAME + ldap_search_reported: + "Full Name": FN + Email: EMAIL + Birthday: BDAY + Nickname: NICKNAME ## mod_vcard_xupdate @@ -5988,106 +5908,97 @@ it answers `ejabberd`’s version when queried. Options: **`show_os: true|false`**: Should the operating system be revealed or not. The default value is - `true`. - -[1]: https://en.wikipedia.org/wiki/YAML -[2]: https://ejabberd.im/pyaimt -[3]: https://ejabberd.im/pymsnt -[4]: https://ejabberd.im/yahoo-transport-2 -[5]: https://ejabberd.im/jabber-gg-transport -[6]: https://ejabberd.im/jmc -[7]: https://tools.ietf.org/html/rfc6120#section-7.7.2.2 -[8]: https://xmpp.org/extensions/xep-0078.html -[9]: https://ejabberd.im/extauth -[10]: https://ejabberd.im/Anonymous-users-support -[11]: https://xmpp.org/extensions/xep-0158.html -[12]: https://tools.ietf.org/html/rfc5389 -[13]: https://tools.ietf.org/html/rfc5766 -[14]: https://tools.ietf.org/html/rfc5245 -[15]: https://xmpp.org/extensions/xep-0176.html -[16]: https://tools.ietf.org/html/rfc5389#section-9 -[17]: https://tools.ietf.org/html/rfc5389 -[18]: https://tools.ietf.org/html/rfc5766#section-6 -[19]: https://tools.ietf.org/html/rfc5766 -[20]: https://tools.ietf.org/html/rfc3261 -[21]: https://en.wikipedia.org/wiki/Server_Name_Indication -[22]: https://tools.ietf.org/html/rfc3263 -[23]: https://tools.ietf.org/html/rfc3261 -[24]: https://erlang.org/doc/apps/mnesia/ -[25]: https://www.mysql.com/ -[26]: https://en.wikipedia.org/wiki/Open_Database_Connectivity -[27]: https://www.postgresql.org/ -[29]: https://redis.io/ -[30]: https://www.microsoft.com/activedirectory/ -[31]: https://openldap.org/ -[32]: https://communigate.com/ -[33]: https://tools.ietf.org/html/rfc3062 -[34]: https://tools.ietf.org/html/rfc4515 -[36]: https://en.wikipedia.org/wiki/LevelDB -[37]: https://redis.io/ -[38]: https://xmpp.org/extensions/xep-0050.html -[39]: https://xmpp.org/extensions/xep-0191.html -[40]: https://xmpp.org/extensions/xep-0115.html -[41]: https://xmpp.org/extensions/xep-0280.html -[42]: https://xmpp.org/extensions/xep-0030.html -[43]: https://xmpp.org/extensions/xep-0012.html -[44]: https://xmpp.org/extensions/xep-0045.html -[45]: https://xmpp.org/extensions/xep-0160.html -[46]: https://xmpp.org/extensions/xep-0199.html -[47]: https://xmpp.org/extensions/xep-0016.html -[48]: https://xmpp.org/extensions/xep-0049.html -[49]: https://xmpp.org/extensions/xep-0065.html -[50]: https://xmpp.org/extensions/xep-0060.html -[51]: https://xmpp.org/extensions/xep-0163.html -[54]: https://xmpp.org/extensions/xep-0077.html -[55]: https://xmpp.org/extensions/xep-0279.html -[56]: https://tools.ietf.org/html/rfc3261 -[57]: https://xmpp.org/extensions/xep-0039.html -[58]: https://xmpp.org/extensions/xep-0202.html -[59]: https://xmpp.org/extensions/xep-0054.html -[60]: https://xmpp.org/extensions/xep-0054.html -[61]: https://xmpp.org/extensions/xep-0153.html -[62]: https://xmpp.org/extensions/xep-0092.html -[63]: https://ejabberd.im/contributions -[65]: https://xmpp.org/extensions/xep-0352.html -[66]: https://xmpp.org/extensions/xep-0030.html -[67]: https://xmpp.org/extensions/xep-0011.html -[68]: https://xmpp.org/extensions/xep-0094.html -[69]: https://xmpp.org/extensions/xep-0124.html -[70]: https://xmpp.org/extensions/xep-0206.html -[71]: https://tools.ietf.org/html/rfc7395 -[72]: https://xmpp.org/extensions/xep-0045.html -[73]: https://xmpp.org/extensions/xep-0050.html -[75]: https://xmpp.org/extensions/xep-0012.html -[77]: https://xmpp.org/extensions/xep-0045.html -[79]: https://xmpp.org/rfcs/rfc5122.html -[80]: https://xmpp.org/extensions/xep-0160.html -[82]: https://xmpp.org/extensions/xep-0199.html -[83]: https://xmpp.org/extensions/xep-0016.html -[85]: https://xmpp.org/extensions/xep-0049.html -[86]: https://xmpp.org/extensions/xep-0048.html -[88]: https://xmpp.org/extensions/xep-0065.html -[89]: https://xmpp.org/extensions/xep-0060.html -[90]: https://xmpp.org/extensions/xep-0163.html -[91]: https://xmpp.org/extensions/xep-0077.html -[92]: https://tools.ietf.org/html/rfc6121#section-2 -[93]: https://xmpp.org/extensions/xep-0237.html -[95]: https://www.funkypenguin.co.nz/project/bandersnatch/ -[97]: https://en.wikipedia.org/wiki/Directory_Information_Tree -[98]: https://xmpp.org/extensions/xep-0279.html -[99]: https://xmpp.org/extensions/xep-0039.html -[100]: http://tkabber.jabber.ru/ -[101]: https://xmpp.org/extensions/xep-0202.html -[102]: https://xmpp.org/extensions/xep-0054.html -[104]: https://tools.ietf.org/html/rfc3062 -[105]: https://xmpp.org/extensions/xep-0153.html -[106]: https://xmpp.org/extensions/xep-0153.html -[108]: https://xmpp.org/extensions/xep-0092.html -[109]: https://xmpp.org/extensions/xep-0033.html -[110]: /admin/guide/managing/#ejabberdctl -[111]: /admin/guide/managing/#list-of-ejabberd-commands -[112]: /admin/guide/configuration/#include-additional-configuration-files -[113]: /admin/guide/managing/#restrict-execution-with-accesscommands + `true`. + +[1]: https://en.wikipedia.org/wiki/YAML +[2]: https://ejabberd.im/pyaimt +[3]: https://ejabberd.im/pymsnt +[4]: https://ejabberd.im/yahoo-transport-2 +[5]: https://ejabberd.im/jabber-gg-transport +[6]: https://ejabberd.im/jmc +[7]: https://tools.ietf.org/html/rfc6120#section-7.7.2.2 +[8]: https://xmpp.org/extensions/xep-0078.html +[9]: https://ejabberd.im/extauth +[10]: https://ejabberd.im/Anonymous-users-support +[11]: https://xmpp.org/extensions/xep-0158.html +[12]: https://tools.ietf.org/html/rfc5389 +[13]: https://tools.ietf.org/html/rfc5766 +[14]: https://tools.ietf.org/html/rfc5245 +[15]: https://xmpp.org/extensions/xep-0176.html +[16]: https://tools.ietf.org/html/rfc5389#section-9 +[17]: https://tools.ietf.org/html/rfc5389 +[18]: https://tools.ietf.org/html/rfc5766#section-6 +[19]: https://tools.ietf.org/html/rfc5766 +[20]: https://tools.ietf.org/html/rfc3261 +[21]: https://en.wikipedia.org/wiki/Server_Name_Indication +[22]: https://tools.ietf.org/html/rfc3263 +[23]: https://tools.ietf.org/html/rfc3261 +[24]: https://erlang.org/doc/apps/mnesia/ +[25]: https://www.mysql.com/ +[26]: https://en.wikipedia.org/wiki/Open_Database_Connectivity +[27]: https://www.postgresql.org/ +[29]: https://redis.io/ +[31]: https://openldap.org/ +[32]: https://communigate.com/ +[33]: https://tools.ietf.org/html/rfc3062 +[34]: https://tools.ietf.org/html/rfc4515 +[37]: https://redis.io/ +[38]: https://xmpp.org/extensions/xep-0050.html +[39]: https://xmpp.org/extensions/xep-0191.html +[40]: https://xmpp.org/extensions/xep-0115.html +[41]: https://xmpp.org/extensions/xep-0280.html +[42]: https://xmpp.org/extensions/xep-0030.html +[43]: https://xmpp.org/extensions/xep-0012.html +[44]: https://xmpp.org/extensions/xep-0045.html +[45]: https://xmpp.org/extensions/xep-0160.html +[46]: https://xmpp.org/extensions/xep-0199.html +[47]: https://xmpp.org/extensions/xep-0016.html +[48]: https://xmpp.org/extensions/xep-0049.html +[49]: https://xmpp.org/extensions/xep-0065.html +[50]: https://xmpp.org/extensions/xep-0060.html +[51]: https://xmpp.org/extensions/xep-0163.html +[54]: https://xmpp.org/extensions/xep-0077.html +[55]: https://xmpp.org/extensions/xep-0279.html +[56]: https://tools.ietf.org/html/rfc3261 +[57]: https://xmpp.org/extensions/xep-0039.html +[58]: https://xmpp.org/extensions/xep-0202.html +[59]: https://xmpp.org/extensions/xep-0054.html +[61]: https://xmpp.org/extensions/xep-0153.html +[62]: https://xmpp.org/extensions/xep-0092.html +[63]: https://ejabberd.im/contributions +[65]: https://xmpp.org/extensions/xep-0352.html +[66]: https://xmpp.org/extensions/xep-0030.html +[67]: https://xmpp.org/extensions/xep-0011.html +[68]: https://xmpp.org/extensions/xep-0094.html +[69]: https://xmpp.org/extensions/xep-0124.html +[70]: https://xmpp.org/extensions/xep-0206.html +[71]: https://tools.ietf.org/html/rfc7395 +[75]: https://xmpp.org/extensions/xep-0012.html +[77]: https://xmpp.org/extensions/xep-0045.html +[79]: https://xmpp.org/rfcs/rfc5122.html +[80]: https://xmpp.org/extensions/xep-0160.html +[82]: https://xmpp.org/extensions/xep-0199.html +[83]: https://xmpp.org/extensions/xep-0016.html +[85]: https://xmpp.org/extensions/xep-0049.html +[86]: https://xmpp.org/extensions/xep-0048.html +[88]: https://xmpp.org/extensions/xep-0065.html +[89]: https://xmpp.org/extensions/xep-0060.html +[90]: https://xmpp.org/extensions/xep-0163.html +[91]: https://xmpp.org/extensions/xep-0077.html +[92]: https://tools.ietf.org/html/rfc6121#section-2 +[93]: https://xmpp.org/extensions/xep-0237.html +[95]: https://www.funkypenguin.co.nz/project/bandersnatch/ +[97]: https://en.wikipedia.org/wiki/Directory_Information_Tree +[98]: https://xmpp.org/extensions/xep-0279.html +[99]: https://xmpp.org/extensions/xep-0039.html +[100]: http://tkabber.jabber.ru/ +[101]: https://xmpp.org/extensions/xep-0202.html +[102]: https://xmpp.org/extensions/xep-0054.html +[104]: https://tools.ietf.org/html/rfc3062 +[105]: https://xmpp.org/extensions/xep-0153.html +[106]: https://xmpp.org/extensions/xep-0153.html +[108]: https://xmpp.org/extensions/xep-0092.html +[109]: https://xmpp.org/extensions/xep-0033.html [114]: https://xmpp.org/extensions/xep-0313.html [115]: https://en.wikipedia.org/wiki/Microsoft_SQL_Server [116]: https://www.freetds.org/ diff --git a/content/admin/upgrade/from_15.11_to_16.02.md b/content/archive/older-releases/from_15.11_to_16.02.md old mode 100755 new mode 100644 similarity index 98% rename from content/admin/upgrade/from_15.11_to_16.02.md rename to content/archive/older-releases/from_15.11_to_16.02.md index 20aabf95..8d8443af --- a/content/admin/upgrade/from_15.11_to_16.02.md +++ b/content/archive/older-releases/from_15.11_to_16.02.md @@ -1,8 +1,4 @@ ---- -title: Upgrade to ejabberd 16.02 ---- - -# Ejabberd upgrade process +# Upgrade to ejabberd 16.02 The MySQL schema changed to UTF-8 encoding. If you are using MySQL backend you must upgrade the schema before starting ejabberd 16.02. @@ -10,7 +6,7 @@ you must upgrade the schema before starting ejabberd 16.02. ## SQL database upgrade Example for MySQL: -```bash +``` bash mysql -h host -u user database -p << EOF ALTER DATABASE ejabberd CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; diff --git a/content/admin/upgrade/from_16.02_to_16.03.md b/content/archive/older-releases/from_16.02_to_16.03.md old mode 100755 new mode 100644 similarity index 86% rename from content/admin/upgrade/from_16.02_to_16.03.md rename to content/archive/older-releases/from_16.02_to_16.03.md index 62ae5587..58608c37 --- a/content/admin/upgrade/from_16.02_to_16.03.md +++ b/content/archive/older-releases/from_16.02_to_16.03.md @@ -1,8 +1,4 @@ ---- -title: Upgrade to ejabberd 16.03 ---- - -# Ejabberd upgrade process +# Upgrade to ejabberd 16.03 If you are using an sql backend for authentication, you must upgrade your schema before starting ejabberd 16.03. This can be safely done @@ -11,7 +7,7 @@ while a previous version of ejabberd is actually running. ## SQL database upgrade Example for MySQL: -```bash +``` bash mysql -h host -u user database -p << EOF ALTER TABLE users ADD COLUMN serverkey text NOT NULL DEFAULT ''; ALTER TABLE users ADD COLUMN salt text NOT NULL DEFAULT ''; diff --git a/content/admin/upgrade/from_16.03_to_16.04.md b/content/archive/older-releases/from_16.03_to_16.04.md old mode 100755 new mode 100644 similarity index 86% rename from content/admin/upgrade/from_16.03_to_16.04.md rename to content/archive/older-releases/from_16.03_to_16.04.md index 1f953138..feb7f073 --- a/content/admin/upgrade/from_16.03_to_16.04.md +++ b/content/archive/older-releases/from_16.03_to_16.04.md @@ -1,8 +1,4 @@ ---- -title: Upgrade to ejabberd 16.04 ---- - -# Ejabberd upgrade process +# Upgrade to ejabberd 16.04 Two data type must be changed on the users table. This can be done at any time while ejabberd 16.03 is running. If you run an older version of ejabberd @@ -11,7 +7,7 @@ you must follow database upgrade process for 16.03 first. Note: this applies only to MySQL. Other backend does not need upgrade. ## MySQL database upgrade -```bash +``` bash mysql -h host -u user database -p << EOF ALTER TABLE users MODIFY serverkey varchar(64) NOT NULL DEFAULT ''; ALTER TABLE users MODIFY salt varchar(64) NOT NULL DEFAULT ''; diff --git a/content/admin/upgrade/from_16.04_to_16.06.md b/content/archive/older-releases/from_16.04_to_16.06.md old mode 100755 new mode 100644 similarity index 84% rename from content/admin/upgrade/from_16.04_to_16.06.md rename to content/archive/older-releases/from_16.04_to_16.06.md index 0ce8532b..385296f6 --- a/content/admin/upgrade/from_16.04_to_16.06.md +++ b/content/archive/older-releases/from_16.04_to_16.06.md @@ -1,8 +1,4 @@ ---- -title: Upgrade to ejabberd 16.06 ---- - -# Ejabberd upgrade process +# Upgrade to ejabberd 16.06 One data type must be changed on the users table. This can be done at any time while ejabberd 16.04 is running. If you run an older version of ejabberd @@ -11,7 +7,7 @@ you must follow database upgrade process for 16.03 and 16.04 first. Note: this applies only to MySQL. Other backend does not need upgrade. ## MySQL database upgrade -```bash +``` bash mysql -h host -u user database -p << EOF ALTER TABLE muc_room MODIFY opts mediumtext NOT NULL; EOF diff --git a/content/admin/upgrade/from_16.06_to_16.08.md b/content/archive/older-releases/from_16.06_to_16.08.md old mode 100755 new mode 100644 similarity index 83% rename from content/admin/upgrade/from_16.06_to_16.08.md rename to content/archive/older-releases/from_16.06_to_16.08.md index 209de33b..73d724e3 --- a/content/admin/upgrade/from_16.06_to_16.08.md +++ b/content/archive/older-releases/from_16.06_to_16.08.md @@ -1,8 +1,4 @@ ---- -title: Upgrade to ejabberd 16.08 ---- - -# Ejabberd upgrade process +# Upgrade to ejabberd 16.08 You need to create a new table to support the new OAuth feature before starting ejabberd 16.08. @@ -10,7 +6,7 @@ before starting ejabberd 16.08. ## SQL database upgrade Example for MySQL: -```bash +``` bash mysql -h host -u user database -p << EOF CREATE TABLE oauth_token ( token varchar(191) NOT NULL PRIMARY KEY, diff --git a/content/admin/upgrade/from_16.08_to_17.03.md b/content/archive/older-releases/from_16.08_to_17.03.md old mode 100755 new mode 100644 similarity index 97% rename from content/admin/upgrade/from_16.08_to_17.03.md rename to content/archive/older-releases/from_16.08_to_17.03.md index 74b1d02d..a6e07e10 --- a/content/admin/upgrade/from_16.08_to_17.03.md +++ b/content/archive/older-releases/from_16.08_to_17.03.md @@ -1,8 +1,4 @@ ---- -title: Upgrade to ejabberd 17.03 ---- - -# Ejabberd upgrade process +# Upgrade to ejabberd 17.03 If you are upgrading from ejabberd 16.08, 16.09, 16.12 or 17.01, and are using an SQL backend, you need to alter tables for better @@ -12,7 +8,7 @@ PubSub support before starting ejabberd 17.03. If you're running MySQL, this change in not mandatory but highly recommended -```bash +``` bash mysql -h host -u user database -p << EOF ALTER TABLE rosterusers MODIFY subscribe text NOT NULL; @@ -54,7 +50,7 @@ EOF If you're running PostgreSQL, this change is mandatory. -```bash +``` bash psql -W -h host database user << EOF ALTER TABLE rosterusers ALTER COLUMN subscribe SET NOT NULL; diff --git a/content/admin/upgrade/from_17.03_to_17.06.md b/content/archive/older-releases/from_17.03_to_17.06.md old mode 100755 new mode 100644 similarity index 91% rename from content/admin/upgrade/from_17.03_to_17.06.md rename to content/archive/older-releases/from_17.03_to_17.06.md index 5a5b8a3d..70ef59ac --- a/content/admin/upgrade/from_17.03_to_17.06.md +++ b/content/archive/older-releases/from_17.03_to_17.06.md @@ -1,8 +1,4 @@ ---- -title: Upgrade to ejabberd 17.06 ---- - -# Ejabberd upgrade process +# Upgrade to ejabberd 17.06 You may have to apply few changes if you are upgrading from ejabberd 17.03 or 17.04. While this is not mandatory, it's recommended to follow this procedure. diff --git a/content/admin/upgrade/from_17.06_to_17.09.md b/content/archive/older-releases/from_17.06_to_17.09.md old mode 100755 new mode 100644 similarity index 84% rename from content/admin/upgrade/from_17.06_to_17.09.md rename to content/archive/older-releases/from_17.06_to_17.09.md index 1bbba4fd..f3eae1c7 --- a/content/admin/upgrade/from_17.06_to_17.09.md +++ b/content/archive/older-releases/from_17.06_to_17.09.md @@ -1,8 +1,4 @@ ---- -title: Upgrade to ejabberd 17.09 ---- - -# Ejabberd upgrade process +# Upgrade to ejabberd 17.09 You should follow this procedure if you are upgrading from ejabberd 17.06, 17.07 or 17.08. diff --git a/content/admin/upgrade/from_17.09_to_17.11.md b/content/archive/older-releases/from_17.09_to_17.11.md old mode 100755 new mode 100644 similarity index 98% rename from content/admin/upgrade/from_17.09_to_17.11.md rename to content/archive/older-releases/from_17.09_to_17.11.md index 9de0b8da..788bf4e1 --- a/content/admin/upgrade/from_17.09_to_17.11.md +++ b/content/archive/older-releases/from_17.09_to_17.11.md @@ -1,8 +1,4 @@ ---- -title: Upgrade to ejabberd 17.11 ---- - -# Ejabberd upgrade process +# Upgrade to ejabberd 17.11 You should follow this procedure if you are upgrading from ejabberd 17.09 and running an SQL backend for archives (mod_mam) and/or PubSub (mod_pubsub) @@ -29,7 +25,7 @@ There are two new tables, one which allows optimization on mucsub subscriptions, and another one needed by mod_push. ### MySQL -```bash +``` bash DROP INDEX i_username ON archive; CREATE INDEX i_username_timestamp USING BTREE ON archive(username,timestamp); @@ -60,7 +56,7 @@ CREATE UNIQUE INDEX i_push_ut ON push_session (username(191), timestamp); ``` ### PostgreSQL -```bash +``` bash DROP INDEX i_username; CREATE INDEX i_username_timestamp ON archive USING btree (username, timestamp); @@ -91,7 +87,7 @@ CREATE UNIQUE INDEX i_push_ut ON push_session USING btree (username, timestamp); ``` ### SQLite -```bash +``` bash DROP INDEX i_username ON archive; CREATE INDEX i_username_timestamp ON archive(username, timestamp); @@ -124,7 +120,7 @@ CREATE UNIQUE INDEX i_push_ut ON push_session (username, timestamp); ``` ### MsSQL -```bash +``` bash DROP INDEX [archive_username] ON [archive]; CREATE INDEX [archive_username_timestamp] ON [archive] (username, timestamp) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON); diff --git a/content/admin/upgrade/from_17.11_to_18.01.md b/content/archive/older-releases/from_17.11_to_18.01.md old mode 100755 new mode 100644 similarity index 89% rename from content/admin/upgrade/from_17.11_to_18.01.md rename to content/archive/older-releases/from_17.11_to_18.01.md index 205f20a5..99473848 --- a/content/admin/upgrade/from_17.11_to_18.01.md +++ b/content/archive/older-releases/from_17.11_to_18.01.md @@ -1,8 +1,4 @@ ---- -title: Upgrade to ejabberd 18.01 ---- - -# Ejabberd upgrade process +# Upgrade to ejabberd 18.01 There is no significant change in code and database since 17.11. There is no specific upgrade procedure. diff --git a/content/admin/upgrade/from_18.01_to_18.03.md b/content/archive/older-releases/from_18.01_to_18.03.md old mode 100755 new mode 100644 similarity index 95% rename from content/admin/upgrade/from_18.01_to_18.03.md rename to content/archive/older-releases/from_18.01_to_18.03.md index 38b975c3..74171ecd --- a/content/admin/upgrade/from_18.01_to_18.03.md +++ b/content/archive/older-releases/from_18.01_to_18.03.md @@ -1,8 +1,4 @@ ---- -title: Upgrade to ejabberd 18.03 ---- - -# Ejabberd upgrade process +# Upgrade to ejabberd 18.03 You should follow this procedure if you are upgrading from ejabberd 18.01 and running an SQL backend for archives (mod_mam). @@ -17,7 +13,7 @@ following commands. Note: if your archive table is big, this action may take a while to complete. ### MySQL -```bash +``` bash DROP INDEX i_username_timestamp ON archive; DROP INDEX i_peer ON archive; DROP INDEX i_bare_peer ON archive; @@ -27,7 +23,7 @@ CREATE INDEX i_username_bare_peer USING BTREE ON archive(username(191), bare_pee ``` ### PostgreSQL -```bash +``` bash DROP INDEX i_peer ON archive; DROP INDEX i_bare_peer ON archive; CREATE INDEX i_username_peer ON archive USING btree (username, peer); @@ -35,7 +31,7 @@ CREATE INDEX i_username_bare_peer ON archive USING btree (username, bare_peer); ``` ### Sqlite -```bash +``` bash DROP INDEX i_peer ON archive; DROP INDEX i_bare_peer ON archive; CREATE INDEX i_archive_username_peer ON archive (username, peer); @@ -43,7 +39,7 @@ CREATE INDEX i_archive_username_bare_peer ON archive (username, bare_peer); ``` ### MsSql -```bash +``` bash DROP INDEX [archive_username_timestamp] ON [archive]; DROP INDEX [archive_peer] ON [archive]; DROP INDEX [archive_bare_peer] ON [archive]; diff --git a/content/admin/upgrade/from_18.03_to_18.04.md b/content/archive/older-releases/from_18.03_to_18.04.md old mode 100755 new mode 100644 similarity index 92% rename from content/admin/upgrade/from_18.03_to_18.04.md rename to content/archive/older-releases/from_18.03_to_18.04.md index 6a12ace7..fde20f13 --- a/content/admin/upgrade/from_18.03_to_18.04.md +++ b/content/archive/older-releases/from_18.03_to_18.04.md @@ -1,8 +1,4 @@ ---- -title: Upgrade to ejabberd 18.04 ---- - -# Ejabberd upgrade process +# Upgrade to ejabberd 18.04 You may follow this procedure if you are upgrading from ejabberd 18.03 or older, and running an SQL backend for PubSub. @@ -15,14 +11,14 @@ This change will speedup requests reading and sorting items. Note: if you're happy with performances, you don't need to apply this change. ### MySQL -```bash +``` bash ALTER TABLE pubsub_item MODIFY creation varchar(32) NOT NULL, MODIFY modification varchar(32) NOT NULL; ``` ### PostgreSQL -```bash +``` bash ALTER TABLE pubsub_item ALTER COLUMN creation TYPE varchar(32), ALTER COLUMN creation SET NOT NULL, @@ -31,7 +27,7 @@ ALTER TABLE pubsub_item ``` ### Sqlite -```bash +``` bash ALTER TABLE pubsub_item MODIFY creation varchar(32) NOT NULL, MODIFY modification varchar(32) NOT NULL; @@ -42,7 +38,7 @@ ALTER TABLE pubsub_item Note: We do not provide tested upgrade procedure on MsSQL Server. Following query should to the conversion. If you have problems with it please create an issue on ejabberd's github page. -```bash +``` bash ALTER TABLE [pubsub_item] ALTER COLUMN creation varchar(32) NOT NULL, ALTER COLUMN modification varchar(32) NOT NULL; diff --git a/content/admin/upgrade/from_18.04_to_18.06.md b/content/archive/older-releases/from_18.04_to_18.06.md old mode 100755 new mode 100644 similarity index 92% rename from content/admin/upgrade/from_18.04_to_18.06.md rename to content/archive/older-releases/from_18.04_to_18.06.md index cac104ff..f56ffe28 --- a/content/admin/upgrade/from_18.04_to_18.06.md +++ b/content/archive/older-releases/from_18.04_to_18.06.md @@ -1,8 +1,4 @@ ---- -title: Upgrade to ejabberd 18.06 ---- - -# Ejabberd upgrade process +# Upgrade to ejabberd 18.06 There are few option changes in this version. Please check the blogpost: https://www.process-one.net/blog/ejabberd-18-06/ diff --git a/content/admin/upgrade/from_18.06_to_18.09.md b/content/archive/older-releases/from_18.06_to_18.09.md old mode 100755 new mode 100644 similarity index 90% rename from content/admin/upgrade/from_18.06_to_18.09.md rename to content/archive/older-releases/from_18.06_to_18.09.md index 1a9cfe7b..3abd8fe5 --- a/content/admin/upgrade/from_18.06_to_18.09.md +++ b/content/archive/older-releases/from_18.06_to_18.09.md @@ -1,8 +1,4 @@ ---- -title: Upgrade to ejabberd 18.09 ---- - -# Ejabberd upgrade process +# Upgrade to ejabberd 18.09 You need to update your database schema if you're using MySQL. Else there is no special upgrade process for this version. @@ -18,7 +14,7 @@ You need to alter your MySQL schema if you're using big stanzas and archive on offline table. Else you can simply dismiss this change. Note: this operation can take a long time with large archives. -```bash +``` bash mysql -h host -u user database -p << EOF ALTER TABLE spool MODIFY xml mediumtext NOT NULL; ALTER TABLE archive MODIFY xml mediumtext NOT NULL; diff --git a/content/admin/upgrade/from_18.09_to_18.12.md b/content/archive/older-releases/from_18.09_to_18.12.md old mode 100755 new mode 100644 similarity index 95% rename from content/admin/upgrade/from_18.09_to_18.12.md rename to content/archive/older-releases/from_18.09_to_18.12.md index 04eb006c..d20ead5c --- a/content/admin/upgrade/from_18.09_to_18.12.md +++ b/content/archive/older-releases/from_18.09_to_18.12.md @@ -1,8 +1,4 @@ ---- -title: Upgrade to ejabberd 18.12 ---- - -# Ejabberd upgrade process +# Upgrade to ejabberd 18.12 You may need to update your database schema if you're using MySQL. A minor change on pubsub_item table was added right after 18.09 release and @@ -20,7 +16,7 @@ If you're a packager, we recommend to apply this change when possible. As ejabberd now supports XEP-0411, you must perform some actions before starting the service. If your users are NOT USING bookmarks, you can dismiss this. -```bash +``` bash $ for host in $(ejabberdctl registered-vhosts); do ejabberdctl registered-users "$host" | while read user; do ejabberdctl bookmarks-to-pep "$user" "$host" @@ -41,7 +37,7 @@ This raised errors when ejabberd was trying to read the content of the database. You not done yet, you need to alter your MySQL schema if you're using big stanzas on for pubsub items. Else you can simply dismiss this change. -```bash +``` bash mysql -h host -u user database -p << EOF ALTER TABLE pubsub_item MODIFY payload mediumtext NOT NULL; EOF diff --git a/content/admin/upgrade/from_18.12_to_19.02.md b/content/archive/older-releases/from_18.12_to_19.02.md old mode 100755 new mode 100644 similarity index 98% rename from content/admin/upgrade/from_18.12_to_19.02.md rename to content/archive/older-releases/from_18.12_to_19.02.md index f72e6a81..930ed150 --- a/content/admin/upgrade/from_18.12_to_19.02.md +++ b/content/archive/older-releases/from_18.12_to_19.02.md @@ -1,8 +1,4 @@ ---- -title: Upgrade to ejabberd 19.02 ---- - -# Ejabberd upgrade process +# Upgrade to ejabberd 19.02 19.02 adds support of latest MIX specification and MQTT protocol. You may improve your current configuration or SQL schema depending on your needs. @@ -12,7 +8,7 @@ You may improve your current configuration or SQL schema depending on your needs To enable MQTT, you need to add a new listener and enable mod_mqtt. Here is example of configuration: -```yaml +``` yaml listen: - port: 1883 @@ -37,7 +33,7 @@ When using PEP with MySQL, due to limitation in size of indexes, some long JIDs Index size on pubsub_node was modified to fix use of PEP. This change is optional and required only if you have issues when using PEP. -```bash +``` bash mysql -h host -u user database -p << EOF DROP INDEX i_pubsub_node_tuple ON pubsub_node; CREATE UNIQUE INDEX i_pubsub_node_tuple ON pubsub_node(host(71), node(120)); @@ -46,7 +42,7 @@ EOF If you want to use new MIX implementation, you must create some tables. -```sql +``` sql CREATE TABLE mix_channel ( channel text NOT NULL, service text NOT NULL, @@ -105,7 +101,7 @@ If you want to use new MQTT feature, you need to create a table. If you're using the new schema (`new_sql_schema`): -```sql +``` sql CREATE TABLE mqtt_pub ( username varchar(191) NOT NULL, server_host varchar(191) NOT NULL, @@ -125,7 +121,7 @@ CREATE TABLE mqtt_pub ( If you're using the old schema: -```sql +``` sql CREATE TABLE mqtt_pub ( username varchar(191) NOT NULL, resource varchar(191) NOT NULL, @@ -146,7 +142,7 @@ CREATE TABLE mqtt_pub ( If you want to use new MIX implementation, you must create some tables. -```sql +``` sql CREATE TABLE mix_channel ( channel text NOT NULL, service text NOT NULL, @@ -205,7 +201,7 @@ If you want to use new MQTT feature, you need to create a table. If you're using the new schema (`new_sql_schema`): -```sql +``` sql CREATE TABLE mqtt_pub ( username text NOT NULL, server_host text NOT NULL, @@ -226,7 +222,7 @@ CREATE UNIQUE INDEX i_mqtt_topic_server ON mqtt_pub (topic, server_host); If you're using the old schema: -```sql +``` sql CREATE TABLE mqtt_pub ( username text NOT NULL, resource text NOT NULL, @@ -248,7 +244,7 @@ CREATE UNIQUE INDEX i_mqtt_topic ON mqtt_pub (topic, server_host); If you want to use new MIX implementation, you must create some tables. -```sql +``` sql CREATE TABLE mix_channel ( channel text NOT NULL, service text NOT NULL, @@ -307,7 +303,7 @@ If you want to use new MQTT feature, you need to create a table. If you're using the new schema (`new_sql_schema`): -```sql +``` sql CREATE TABLE mqtt_pub ( username text NOT NULL, server_host text NOT NULL, @@ -328,7 +324,7 @@ CREATE UNIQUE INDEX i_mqtt_topic_server ON mqtt_pub (topic); If you're using the old schema: -```sql +``` sql CREATE TABLE mqtt_pub ( username text NOT NULL, resource text NOT NULL, diff --git a/content/admin/upgrade/from_19.02_to_19.05.md b/content/archive/older-releases/from_19.02_to_19.05.md old mode 100755 new mode 100644 similarity index 77% rename from content/admin/upgrade/from_19.02_to_19.05.md rename to content/archive/older-releases/from_19.02_to_19.05.md index 377f33c7..e4f7a88f --- a/content/admin/upgrade/from_19.02_to_19.05.md +++ b/content/archive/older-releases/from_19.02_to_19.05.md @@ -1,16 +1,12 @@ ---- -title: Upgrade to ejabberd 19.05 ---- - -# Ejabberd upgrade process +# Upgrade to ejabberd 19.05 19.05 don't add changes on data or configuration. You may alter your configuration if you want to use new feature to store offline messages in archives anyway. See more details on blogpost. -# Database +## Database Schema for MQTT tables was added after 19.02 release despite full support was already available. If you're using MQTT and need SQL backend, in case you -dismissed the change, please report to [ejabberd 19.02 upgrade note](/admin/upgrade/from_18.12_to_19.02/) +dismissed the change, please report to [ejabberd 19.02 upgrade note](from_18.12_to_19.02.md) diff --git a/content/admin/upgrade/from_19.05_to_19.08.md b/content/archive/older-releases/from_19.05_to_19.08.md old mode 100755 new mode 100644 similarity index 98% rename from content/admin/upgrade/from_19.05_to_19.08.md rename to content/archive/older-releases/from_19.05_to_19.08.md index b5ab9459..5af860fe --- a/content/admin/upgrade/from_19.05_to_19.08.md +++ b/content/archive/older-releases/from_19.05_to_19.08.md @@ -1,6 +1,4 @@ ---- -title: Upgrade to ejabberd 19.08 ---- +# Upgrade to ejabberd 19.08 ## Database @@ -12,7 +10,7 @@ The only SQL schema that changed since 19.05 is mysql.new.sql. mysql.new.sql from 19.05 schema can work 19.08, so the migration to 19.08 schema is optional, as it's just a type change from TEXT to VARCHAR for performances reason, but it will improve index utilization. -```sql +``` sql ALTER TABLE users MODIFY server_host varchar(191) NOT NULL; ALTER TABLE last MODIFY server_host varchar(191) NOT NULL; ALTER TABLE rosterusers MODIFY server_host varchar(191) NOT NULL; diff --git a/content/admin/upgrade/from_2.1.1x_to_16.02.md b/content/archive/older-releases/from_2.1.1x_to_16.02.md old mode 100755 new mode 100644 similarity index 96% rename from content/admin/upgrade/from_2.1.1x_to_16.02.md rename to content/archive/older-releases/from_2.1.1x_to_16.02.md index 2bf5b9b4..f414361b --- a/content/admin/upgrade/from_2.1.1x_to_16.02.md +++ b/content/archive/older-releases/from_2.1.1x_to_16.02.md @@ -1,8 +1,6 @@ ---- -title: Upgrade from 2.1.1x to 16.02 ---- +# Upgrade from 2.1.1x to 16.02 -# Compilation +## Compilation Compilation requires Erlang/OTP R17 or higher. Requires OpenSSL 1.0.0 or higher. @@ -21,15 +19,15 @@ You have three options: - You can still use your old ejabberd.cfg - You can convert your old config file to YAML with the command: `ejabberdctl convert_to_yaml` -# Ejabberd upgrade process +## Ejabberd upgrade process If you are using an sql backend for authentication, you need to upgrade your schema before starting ejabberd 16.02. This can be safely done while a previous version of ejabberd is actually running. -## MySQL database upgrade +### MySQL database upgrade -```bash +``` bash mysql -h host -u user database -p << EOF -- Table for mod_caps: Entity Capabilities (XEP-0115) @@ -105,9 +103,9 @@ EOF ``` -## PgSQL database upgrade +### PgSQL database upgrade -```bash +``` bash psql -W -h host database user << EOF -- Table for mod_caps: Entity Capabilities (XEP-0115) @@ -168,13 +166,13 @@ CREATE TABLE archive_prefs ( EOF ``` -## PubSub database upgrade +### PubSub database upgrade If you were using PubSub with sql backend and need to keep your pubsub data, you must alter the content of pubsub_node tables, changing type 'pep' instead of 'pep_odbc', 'flat' instead of 'flat_odbc', and 'hometree' instead of 'hometree_odbc'. -```bash +``` bash UPDATE pubsub_node SET type='pep' WHERE type='pep_odbc'; UPDATE pubsub_node SET type='flat' WHERE type='flat_odbc'; UPDATE pubsub_node SET type='hometree' WHERE type='hometree_odbc'; diff --git a/content/assets/css/headers-underline.css b/content/assets/css/headers-underline.css new file mode 100644 index 00000000..31acf62a --- /dev/null +++ b/content/assets/css/headers-underline.css @@ -0,0 +1,4 @@ +h1, h2, h3 { + padding-bottom: 0.2em; + border-bottom: 1px solid #b6b6b6; +} diff --git a/content/assets/css/mdversion.css b/content/assets/css/mdversion.css new file mode 100644 index 00000000..f8923a29 --- /dev/null +++ b/content/assets/css/mdversion.css @@ -0,0 +1,9 @@ +.mdx-badge__icon{ + background:var(--md-accent-fg-color--transparent); + padding:.2rem +} +.mdx-badge__text{ + font-size:.85em; + box-shadow:0 0 0 1px inset var(--md-accent-fg-color--transparent); + padding:.2rem .3rem +} diff --git a/content/assets/css/notes.css b/content/assets/css/notes.css new file mode 100644 index 00000000..98d2ad9b --- /dev/null +++ b/content/assets/css/notes.css @@ -0,0 +1,7 @@ +div .note-down, +div .note-left { + font-size: 0.9em; + color: red; + float: right; + position: relative; +} diff --git a/content/assets/css/status.css b/content/assets/css/status.css new file mode 100644 index 00000000..135c96ad --- /dev/null +++ b/content/assets/css/status.css @@ -0,0 +1,13 @@ +:root { + --md-status--ebe: url('data:image/svg+xml;charset=utf-8,plus-box-outline'); + --md-status--saas: url('data:image/svg+xml;charset=utf-8,cloud-outline'); +} + +.md-status--ebe::after { + mask-image: var(--md-status--ebe); + -webkit-mask-image: var(--md-status--ebe); +} +.md-status--saas::after { + mask-image: var(--md-status--saas); + -webkit-mask-image: var(--md-status--saas); +} diff --git a/content/assets/img/banner.png b/content/assets/img/banner.png new file mode 100644 index 00000000..69f739c0 Binary files /dev/null and b/content/assets/img/banner.png differ diff --git a/content/assets/img/favicon.ico b/content/assets/img/favicon.ico new file mode 100644 index 00000000..08843f91 Binary files /dev/null and b/content/assets/img/favicon.ico differ diff --git a/content/assets/img/footer_logo_e.png b/content/assets/img/footer_logo_e.png new file mode 100644 index 00000000..0496faf3 Binary files /dev/null and b/content/assets/img/footer_logo_e.png differ diff --git a/content/assets/img/footer_logo_e@2x.png b/content/assets/img/footer_logo_e@2x.png new file mode 100644 index 00000000..bacb62b8 Binary files /dev/null and b/content/assets/img/footer_logo_e@2x.png differ diff --git a/content/assets/img/logo-docs.png b/content/assets/img/logo-docs.png new file mode 100644 index 00000000..a9803398 Binary files /dev/null and b/content/assets/img/logo-docs.png differ diff --git a/content/assets/img/logo.png b/content/assets/img/logo.png new file mode 100644 index 00000000..20bc6a22 Binary files /dev/null and b/content/assets/img/logo.png differ diff --git a/content/assets/js/feedback.js b/content/assets/js/feedback.js new file mode 100644 index 00000000..6d199efe --- /dev/null +++ b/content/assets/js/feedback.js @@ -0,0 +1,19 @@ +var feedback = document.forms.feedback +feedback.hidden = false + +feedback.addEventListener("submit", function(ev) { + ev.preventDefault() + + var page = document.location.pathname + var data = ev.submitter.getAttribute("data-md-value") + + console.log(page, data) + + feedback.firstElementChild.disabled = true + + var note = feedback.querySelector( + ".md-feedback__note [data-md-value='" + data + "']" + ) + if (note) + note.hidden = false +}) \ No newline at end of file diff --git a/content/contributing/CODE_OF_CONDUCT.md b/content/contributing/CODE_OF_CONDUCT.md new file mode 100644 index 00000000..a9145ba2 --- /dev/null +++ b/content/contributing/CODE_OF_CONDUCT.md @@ -0,0 +1,46 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at the email address: conduct AT process-one.net. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/content/contributing/CONTRIBUTORS.md b/content/contributing/CONTRIBUTORS.md new file mode 100644 index 00000000..50c7d614 --- /dev/null +++ b/content/contributing/CONTRIBUTORS.md @@ -0,0 +1,37 @@ +# Contributors + +We would like to thanks official ejabberd source code contributors: + +- Sergey Abramyan +- Badlop +- Ludovic Bocquet +- Emilio Bustos +- Thiago Camargo +- Juan Pablo Carlino +- Paweł Chmielowski +- Gabriel Gatu +- Tsukasa Hamano +- Konstantinos Kallas +- Evgeny Khramtsov +- Ben Langfeld +- Peter Lemenkov +- Anna Mukharram +- Johan Oudinet +- Pablo Polvorin +- Mickaël Rémond +- Matthias Rieber +- Rafael Roemhild +- Christophe Romain +- Jérôme Sautret +- Sonny Scroggin +- Alexey Shchepin +- Shelley Shyan +- Radoslaw Szymczyszyn +- Stu Tomlinson +- Christian Ulrich +- Holger Weiß + +Please, if you think we are missing your contribution, do not hesitate to contact us at ProcessOne. +In case you do not want to appear in this list, please, let us know as well. + +Thanks ! diff --git a/content/contributing/index.md b/content/contributing/index.md new file mode 100644 index 00000000..72619891 --- /dev/null +++ b/content/contributing/index.md @@ -0,0 +1,149 @@ +# Contributing to ejabberd + +We'd love for you to contribute to our source code and to make ejabberd even better than it is +today! Here are the guidelines we'd like you to follow: + +* [Code of Conduct](#code-of-conduct) +* [Questions and Problems](#questions-bugs-features) +* [Issues and Bugs](#found-an-issue-or-bug) +* [Feature Requests](#missing-a-feature) +* [Issue Submission Guidelines](#issue-submission-guidelines) +* [Pull Request Submission Guidelines](#pull-request-submission-guidelines) +* [Signing the CLA](#signing-the-contributor-license-agreement-cla) + +## Code of Conduct + +Help us keep ejabberd community open-minded and inclusive. Please read and follow our [Code of Conduct][coc]. + +## Questions, Bugs, Features + +### Got a Question or Problem? + +Do not open issues for general support questions as we want to keep GitHub issues for bug reports +and feature requests. You've got much better chances of getting your question answered on dedicated +support platforms, the best being [Stack Overflow][stackoverflow]. + +Stack Overflow is a much better place to ask questions since: + +- there are thousands of people willing to help on Stack Overflow +- questions and answers stay available for public viewing so your question / answer might help + someone else +- Stack Overflow's voting system assures that the best answers are prominently visible. + +To save your and our time, we will systematically close all issues that are requests for general +support and redirect people to the section you are reading right now. + +Other channels for support are: +- ejabberd XMPP room: [ejabberd@conference.process-one.net][muc] +- [ejabberd XMPP room logs][logs] +- [ejabberd Mailing List][list] + +### Found an Issue or Bug? + +If you find a bug in the source code, you can help us by submitting an issue to our +[GitHub Repository][github]. Even better, you can submit a Pull Request with a fix. + +### Missing a Feature? + +You can request a new feature by submitting an issue to our [GitHub Repository][github-issues]. + +If you would like to implement a new feature then consider what kind of change it is: + +* **Major Changes** that you wish to contribute to the project should be discussed first in an + [GitHub issue][github-issues] that clearly outlines the changes and benefits of the feature. +* **Small Changes** can directly be crafted and submitted to the [GitHub Repository][github] + as a Pull Request. See the section about [Pull Request Submission Guidelines](#pull-request-submission-guidelines). + +## Issue Submission Guidelines + +Before you submit your issue search the archive, maybe your question was already answered. + +If your issue appears to be a bug, and hasn't been reported, open a new issue. Help us to maximize +the effort we can spend fixing issues and adding new features, by not reporting duplicate issues. + +The "[new issue][github-new-issue]" form contains a number of prompts that you should fill out to +make it easier to understand and categorize the issue. + +## Pull Request Submission Guidelines + +By submitting a pull request for a code or doc contribution, you need to have the right +to grant your contribution's copyright license to ProcessOne. Please check [ProcessOne CLA][cla] +for details. + +Before you submit your pull request consider the following guidelines: + +* Search [GitHub][github-pr] for an open or closed Pull Request + that relates to your submission. You don't want to duplicate effort. +* Create the [development environment][developer-setup] +* Make your changes in a new git branch: + + ```shell + git checkout -b my-fix-branch master + ``` +* Test your changes and, if relevant, expand the automated test suite. +* Create your patch commit, including appropriate test cases. +* If the changes affect public APIs, change or add relevant [documentation][doc-repo]. +* Commit your changes using a descriptive commit message. + + ```shell + git commit -a + ``` + Note: the optional commit `-a` command line option will automatically "add" and "rm" edited files. + +* Push your branch to GitHub: + + ```shell + git push origin my-fix-branch + ``` + +* In GitHub, send a pull request to `ejabberd:master`. This will trigger the automated testing. +We will also notify you if you have not yet signed the [contribution agreement][cla]. + +* If you find that the tests have failed, look into the logs to find out +if your changes caused test failures, the commit message was malformed etc. If you find that the +tests failed or times out for unrelated reasons, you can ping a team member so that the build can be +restarted. + +* If we suggest changes, then: + + * Make the required updates. + * Test your changes and test cases. + * Commit your changes to your branch (e.g. `my-fix-branch`). + * Push the changes to your GitHub repository (this will update your Pull Request). + + You can also amend the initial commits and force push them to the branch. + + ```shell + git rebase master -i + git push origin my-fix-branch -f + ``` + + This is generally easier to follow, but separate commits are useful if the Pull Request contains + iterations that might be interesting to see side-by-side. + +That's it! Thank you for your contribution! + +## Signing the Contributor License Agreement (CLA) + +Upon submitting a Pull Request, we will ask you to sign our CLA if you haven't done +so before. It's a quick process, we promise, and you will be able to do it all online + +You can read [ProcessOne Contribution License Agreement][cla] in PDF. + +This is part of the legal framework of the open-source ecosystem that adds some red tape, +but protects both the contributor and the company / foundation behind the project. It also +gives us the option to relicense the code with a more permissive license in the future. + + +[coc]: https://github.com/processone/ejabberd/blob/master/CODE_OF_CONDUCT.md +[stackoverflow]: https://stackoverflow.com/questions/tagged/ejabberd?sort=newest +[list]: https://lists.jabber.ru/mailman/listinfo/ejabberd +[muc]: xmpp:ejabberd@conference.process-one.net +[logs]: https://process-one.net/logs/ejabberd@conference.process-one.net/ +[github]: https://github.com/processone/ejabberd +[github-issues]: https://github.com/processone/ejabberd/issues +[github-new-issue]: https://github.com/processone/ejabberd/issues/new +[github-pr]: https://github.com/processone/ejabberd/pulls +[doc-repo]: https://github.com/processone/docs.ejabberd.im +[developer-setup]: https://docs.ejabberd.im/developer/ +[cla]: https://www.process-one.net/resources/ejabberd-cla.pdf diff --git a/content/developer/ejabberd-api/admin-api.md b/content/developer/ejabberd-api/admin-api.md index e7dbf471..25b96cfa 100644 --- a/content/developer/ejabberd-api/admin-api.md +++ b/content/developer/ejabberd-api/admin-api.md @@ -1,16 +1,12 @@ ---- -title: Administration API reference -toc: true -menu: API Reference -order: 1 -// Autogenerated with 'ejabberdctl gen_markdown_doc_for_commands' ---- +# API Reference + +> This section describes API commands of ejabberd [24.06](../../archive/24.06/index.md). If you are using an old ejabberd release, please refer to the corresponding archived version of this page in the [Archive](../../archive/index.md). The commands that changed in this version are marked with 🟤. + -> This section describes API of ejabberd. If you are using an old ejabberd release, please refer to the corresponding archived version of this page in the [Archive](/archive/). -
added in 22.05
## abort_delete_old_mam_messages + Abort currently running delete old MAM messages operation @@ -23,29 +19,30 @@ __Result:__ - *status* :: string : Status text __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](admin-tags.md#purge) __Module:__ -[mod_mam](/admin/configuration/modules/#mod-mam) +[mod_mam](../../admin/configuration/modules.md#mod_mam) __Examples:__ ~~~ json - POST /api/abort_delete_old_mam_messages - { - "host": "localhost" - } - - HTTP/1.1 200 OK - {"status": "Operation aborted"} +POST /api/abort_delete_old_mam_messages +{ + "host": "localhost" +} + +HTTP/1.1 200 OK +"Operation aborted" ~~~ -
added in 22.05
+ ## abort_delete_old_messages + Abort currently running delete old offline messages operation @@ -58,26 +55,27 @@ __Result:__ - *status* :: string : Status text __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](admin-tags.md#purge) __Examples:__ ~~~ json - POST /api/abort_delete_old_messages - { - "host": "localhost" - } - - HTTP/1.1 200 OK - {"status": "Operation aborted"} +POST /api/abort_delete_old_messages +{ + "host": "localhost" +} + +HTTP/1.1 200 OK +"Operation aborted" ~~~ -
updated in 24.02
+ ## add_rosteritem + Add an item to a user's roster (supports ODBC) @@ -96,31 +94,31 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[roster](/developer/ejabberd-api/admin-tags/#roster), [v1](/developer/ejabberd-api/admin-tags/#v1) +[roster](admin-tags.md#roster), [v1](admin-tags.md#v1) __Module:__ -[mod_admin_extra](/admin/configuration/modules/#mod-admin-extra) +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) __Examples:__ ~~~ json - POST /api/add_rosteritem - { - "localuser": "user1", - "localhost": "myserver.com", - "user": "user2", - "host": "myserver.com", - "nick": "User 2", - "groups": [ - "Friends", - "Team 1" - ], - "subs": "both" - } - - HTTP/1.1 200 OK - "" +POST /api/add_rosteritem +{ + "localuser": "user1", + "localhost": "myserver.com", + "user": "user2", + "host": "myserver.com", + "nick": "User 2", + "groups": [ + "Friends", + "Team 1" + ], + "subs": "both" +} + +HTTP/1.1 200 OK +"" ~~~ @@ -140,28 +138,32 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](admin-tags.md#mnesia) __Examples:__ ~~~ json - POST /api/backup - { - "file": "/var/lib/ejabberd/database.backup" - } - - HTTP/1.1 200 OK - "Success" +POST /api/backup +{ + "file": "/var/lib/ejabberd/database.backup" +} + +HTTP/1.1 200 OK +"Success" ~~~ -## ban_account +## ban_account 🟤 + -Ban an account: kick sessions and set random password +Ban an account + + +This command kicks the account sessions, sets a random password, and stores ban details in the account private storage. This command requires mod_private to be enabled. Check also [get_ban_details](#get_ban_details) API and `_unban_account`_ API. __Arguments:__ @@ -174,24 +176,24 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) +[accounts](admin-tags.md#accounts), [v2](admin-tags.md#v2) __Module:__ -[mod_admin_extra](/admin/configuration/modules/#mod-admin-extra) +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) __Examples:__ ~~~ json - POST /api/ban_account - { - "user": "attacker", - "host": "myserver.com", - "reason": "Spaming other users" - } - - HTTP/1.1 200 OK - "" +POST /api/ban_account +{ + "user": "attacker", + "host": "myserver.com", + "reason": "Spaming other users" +} + +HTTP/1.1 200 OK +"" ~~~ @@ -212,23 +214,23 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[private](/developer/ejabberd-api/admin-tags/#private) +[private](admin-tags.md#private) __Module:__ -[mod_private](/admin/configuration/modules/#mod-private) +[mod_private](../../admin/configuration/modules.md#mod_private) __Examples:__ ~~~ json - POST /api/bookmarks_to_pep - { - "user": "bob", - "host": "example.com" - } - - HTTP/1.1 200 OK - "Bookmarks exported" +POST /api/bookmarks_to_pep +{ + "user": "bob", + "host": "example.com" +} + +HTTP/1.1 200 OK +"Bookmarks exported" ~~~ @@ -250,24 +252,24 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) +[accounts](admin-tags.md#accounts) __Module:__ -[mod_admin_extra](/admin/configuration/modules/#mod-admin-extra) +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) __Examples:__ ~~~ json - POST /api/change_password - { - "user": "peter", - "host": "myserver.com", - "newpass": "blank" - } - - HTTP/1.1 200 OK - "" +POST /api/change_password +{ + "user": "peter", + "host": "myserver.com", + "newpass": "blank" +} + +HTTP/1.1 200 OK +"" ~~~ @@ -290,25 +292,25 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/admin/configuration/modules/#mod-muc-admin) +[mod_muc_admin](../../admin/configuration/modules.md#mod_muc_admin) __Examples:__ ~~~ json - POST /api/change_room_option - { - "name": "room1", - "service": "muc.example.com", - "option": "members_only", - "value": "true" - } - - HTTP/1.1 200 OK - "" +POST /api/change_room_option +{ + "name": "room1", + "service": "conference.example.com", + "option": "members_only", + "value": "true" +} + +HTTP/1.1 200 OK +"" ~~~ @@ -329,23 +331,23 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) +[accounts](admin-tags.md#accounts) __Module:__ -[mod_admin_extra](/admin/configuration/modules/#mod-admin-extra) +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) __Examples:__ ~~~ json - POST /api/check_account - { - "user": "peter", - "host": "myserver.com" - } - - HTTP/1.1 200 OK - "" +POST /api/check_account +{ + "user": "peter", + "host": "myserver.com" +} + +HTTP/1.1 200 OK +"" ~~~ @@ -367,24 +369,24 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) +[accounts](admin-tags.md#accounts) __Module:__ -[mod_admin_extra](/admin/configuration/modules/#mod-admin-extra) +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) __Examples:__ ~~~ json - POST /api/check_password - { - "user": "peter", - "host": "myserver.com", - "password": "secret" - } - - HTTP/1.1 200 OK - "" +POST /api/check_password +{ + "user": "peter", + "host": "myserver.com", + "password": "secret" +} + +HTTP/1.1 200 OK +"" ~~~ @@ -410,25 +412,25 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) +[accounts](admin-tags.md#accounts) __Module:__ -[mod_admin_extra](/admin/configuration/modules/#mod-admin-extra) +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) __Examples:__ ~~~ json - POST /api/check_password_hash - { - "user": "peter", - "host": "myserver.com", - "passwordhash": "5ebe2294ecd0e0f08eab7690d2a6ee69", - "hashmethod": "md5" - } - - HTTP/1.1 200 OK - "" +POST /api/check_password_hash +{ + "user": "peter", + "host": "myserver.com", + "passwordhash": "5ebe2294ecd0e0f08eab7690d2a6ee69", + "hashmethod": "md5" +} + +HTTP/1.1 200 OK +"" ~~~ @@ -447,19 +449,19 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](admin-tags.md#server) __Examples:__ ~~~ json - POST /api/clear_cache - { - - } - - HTTP/1.1 200 OK - "" +POST /api/clear_cache +{ + +} + +HTTP/1.1 200 OK +"" ~~~ @@ -479,22 +481,22 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[erlang](/developer/ejabberd-api/admin-tags/#erlang) +[erlang](admin-tags.md#erlang) __Module:__ -[mod_admin_extra](/admin/configuration/modules/#mod-admin-extra) +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) __Examples:__ ~~~ json - POST /api/compile - { - "file": "/home/me/srcs/ejabberd/mod_example.erl" - } - - HTTP/1.1 200 OK - "" +POST /api/compile +{ + "file": "/home/me/srcs/ejabberd/mod_example.erl" +} + +HTTP/1.1 200 OK +"" ~~~ @@ -513,22 +515,22 @@ __Result:__ - *connected_users* :: [sessions::string] : List of users sessions __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](admin-tags.md#session) __Examples:__ ~~~ json - POST /api/connected_users - { - - } - - HTTP/1.1 200 OK - [ - "user1@example.com", - "user2@example.com" - ] +POST /api/connected_users +{ + +} + +HTTP/1.1 200 OK +[ + "user1@example.com", + "user2@example.com" +] ~~~ @@ -547,35 +549,35 @@ __Result:__ - *connected_users_info* :: [{jid::string, connection::string, ip::string, port::integer, priority::integer, node::string, uptime::integer, status::string, resource::string, statustext::string}] __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](admin-tags.md#session) __Module:__ -[mod_admin_extra](/admin/configuration/modules/#mod-admin-extra) +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) __Examples:__ ~~~ json - POST /api/connected_users_info - { - - } - - HTTP/1.1 200 OK - [ - { - "jid": "user1@myserver.com/tka", - "connection": "c2s", - "ip": "127.0.0.1", - "port": 42656, - "priority": 8, - "node": "ejabberd@localhost", - "uptime": 231, - "status": "dnd", - "resource": "tka", - "statustext": "" - } - ] +POST /api/connected_users_info +{ + +} + +HTTP/1.1 200 OK +[ + { + "jid": "user1@myserver.com/tka", + "connection": "c2s", + "ip": "127.0.0.1", + "port": 42656, + "priority": 8, + "node": "ejabberd@localhost", + "uptime": 231, + "status": "dnd", + "resource": "tka", + "statustext": "" + } +] ~~~ @@ -594,19 +596,19 @@ __Result:__ - *num_sessions* :: integer __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session), [statistics](/developer/ejabberd-api/admin-tags/#statistics) +[session](admin-tags.md#session), [statistics](admin-tags.md#statistics) __Examples:__ ~~~ json - POST /api/connected_users_number - { - - } - - HTTP/1.1 200 OK - {"num_sessions": 2} +POST /api/connected_users_number +{ + +} + +HTTP/1.1 200 OK +2 ~~~ @@ -626,25 +628,25 @@ __Result:__ - *connected_users_vhost* :: [sessions::string] __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](admin-tags.md#session) __Module:__ -[mod_admin_extra](/admin/configuration/modules/#mod-admin-extra) +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) __Examples:__ ~~~ json - POST /api/connected_users_vhost - { - "host": "myexample.com" - } - - HTTP/1.1 200 OK - [ - "user1@myserver.com/tka", - "user2@localhost/tka" - ] +POST /api/connected_users_vhost +{ + "host": "myexample.com" +} + +HTTP/1.1 200 OK +[ + "user1@myserver.com/tka", + "user2@localhost/tka" +] ~~~ @@ -664,19 +666,19 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[sql](/developer/ejabberd-api/admin-tags/#sql) +[sql](admin-tags.md#sql) __Examples:__ ~~~ json - POST /api/convert_to_scram - { - "host": "example.com" - } - - HTTP/1.1 200 OK - "" +POST /api/convert_to_scram +{ + "host": "example.com" +} + +HTTP/1.1 200 OK +"" ~~~ @@ -697,20 +699,20 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[config](/developer/ejabberd-api/admin-tags/#config) +[config](admin-tags.md#config) __Examples:__ ~~~ json - POST /api/convert_to_yaml - { - "in": "/etc/ejabberd/ejabberd.cfg", - "out": "/etc/ejabberd/ejabberd.yml" - } - - HTTP/1.1 200 OK - "" +POST /api/convert_to_yaml +{ + "in": "/etc/ejabberd/ejabberd.cfg", + "out": "/etc/ejabberd/ejabberd.yml" +} + +HTTP/1.1 200 OK +"" ~~~ @@ -732,24 +734,24 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/admin/configuration/modules/#mod-muc-admin) +[mod_muc_admin](../../admin/configuration/modules.md#mod_muc_admin) __Examples:__ ~~~ json - POST /api/create_room - { - "name": "room1", - "service": "muc.example.com", - "host": "example.com" - } - - HTTP/1.1 200 OK - "" +POST /api/create_room +{ + "name": "room1", + "service": "conference.example.com", + "host": "example.com" +} + +HTTP/1.1 200 OK +"" ~~~ @@ -775,38 +777,38 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room), [muc_sub](/developer/ejabberd-api/admin-tags/#muc-sub) +[muc_room](admin-tags.md#muc_room), [muc_sub](admin-tags.md#muc_sub) __Module:__ -[mod_muc_admin](/admin/configuration/modules/#mod-muc-admin) +[mod_muc_admin](../../admin/configuration/modules.md#mod_muc_admin) __Examples:__ ~~~ json - POST /api/create_room_with_opts +POST /api/create_room_with_opts +{ + "name": "room1", + "service": "conference.example.com", + "host": "localhost", + "options": [ + { + "name": "members_only", + "value": "true" + }, { - "name": "room1", - "service": "muc.example.com", - "host": "localhost", - "options": [ - { - "name": "members_only", - "value": "true" - }, - { - "name": "affiliations", - "value": "owner:bob@example.com,member:peter@example.com" - }, - { - "name": "subscribers", - "value": "bob@example.com:Bob:messages:subject,anne@example.com:Anne:messages" - } - ] + "name": "affiliations", + "value": "owner:bob@example.com,member:peter@example.com" + }, + { + "name": "subscribers", + "value": "bob@example.com:Bob:messages:subject,anne@example.com:Anne:messages" } - - HTTP/1.1 200 OK - "" + ] +} + +HTTP/1.1 200 OK +"" ~~~ @@ -829,22 +831,22 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](admin-tags.md#muc) __Module:__ -[mod_muc_admin](/admin/configuration/modules/#mod-muc-admin) +[mod_muc_admin](../../admin/configuration/modules.md#mod_muc_admin) __Examples:__ ~~~ json - POST /api/create_rooms_file - { - "file": "/home/ejabberd/rooms.txt" - } - - HTTP/1.1 200 OK - "" +POST /api/create_rooms_file +{ + "file": "/home/ejabberd/rooms.txt" +} + +HTTP/1.1 200 OK +"" ~~~ @@ -863,26 +865,27 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](admin-tags.md#purge) __Examples:__ ~~~ json - POST /api/delete_expired_messages - { - - } - - HTTP/1.1 200 OK - "" +POST /api/delete_expired_messages +{ + +} + +HTTP/1.1 200 OK +"" ~~~ -
added in 21.12
+ ## delete_expired_pubsub_items + Delete expired PubSub items @@ -894,22 +897,22 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](admin-tags.md#purge) __Module:__ -[mod_pubsub](/admin/configuration/modules/#mod-pubsub) +[mod_pubsub](../../admin/configuration/modules.md#mod_pubsub) __Examples:__ ~~~ json - POST /api/delete_expired_pubsub_items - { - - } - - HTTP/1.1 200 OK - "" +POST /api/delete_expired_pubsub_items +{ + +} + +HTTP/1.1 200 OK +"" ~~~ @@ -929,19 +932,19 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](admin-tags.md#mnesia) __Examples:__ ~~~ json - POST /api/delete_mnesia - { - "host": "example.com" - } - - HTTP/1.1 200 OK - "" +POST /api/delete_mnesia +{ + "host": "example.com" +} + +HTTP/1.1 200 OK +"" ~~~ @@ -965,30 +968,31 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](admin-tags.md#purge) __Module:__ -[mod_mam](/admin/configuration/modules/#mod-mam) +[mod_mam](../../admin/configuration/modules.md#mod_mam) __Examples:__ ~~~ json - POST /api/delete_old_mam_messages - { - "type": "all", - "days": 31 - } - - HTTP/1.1 200 OK - "" +POST /api/delete_old_mam_messages +{ + "type": "all", + "days": 31 +} + +HTTP/1.1 200 OK +"" ~~~ -
added in 22.05
+ ## delete_old_mam_messages_batch + Delete MAM messages older than DAYS @@ -1008,33 +1012,34 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](admin-tags.md#purge) __Module:__ -[mod_mam](/admin/configuration/modules/#mod-mam) +[mod_mam](../../admin/configuration/modules.md#mod_mam) __Examples:__ ~~~ json - POST /api/delete_old_mam_messages_batch - { - "host": "localhost", - "type": "all", - "days": 31, - "batch_size": 1000, - "rate": 10000 - } - - HTTP/1.1 200 OK - "Removal of 5000 messages in progress" +POST /api/delete_old_mam_messages_batch +{ + "host": "localhost", + "type": "all", + "days": 31, + "batch_size": 1000, + "rate": 10000 +} + +HTTP/1.1 200 OK +"Removal of 5000 messages in progress" ~~~ -
added in 22.05
+ ## delete_old_mam_messages_status + Status of delete old MAM messages operation @@ -1047,22 +1052,22 @@ __Result:__ - *status* :: string : Status test __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](admin-tags.md#purge) __Module:__ -[mod_mam](/admin/configuration/modules/#mod-mam) +[mod_mam](../../admin/configuration/modules.md#mod_mam) __Examples:__ ~~~ json - POST /api/delete_old_mam_messages_status - { - "host": "localhost" - } - - HTTP/1.1 200 OK - {"status": "Operation in progress, delete 5000 messages"} +POST /api/delete_old_mam_messages_status +{ + "host": "localhost" +} + +HTTP/1.1 200 OK +"Operation in progress, delete 5000 messages" ~~~ @@ -1082,26 +1087,27 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](admin-tags.md#purge) __Examples:__ ~~~ json - POST /api/delete_old_messages - { - "days": 31 - } - - HTTP/1.1 200 OK - "" +POST /api/delete_old_messages +{ + "days": 31 +} + +HTTP/1.1 200 OK +"" ~~~ -
added in 22.05
+ ## delete_old_messages_batch + Delete offline messages older than DAYS @@ -1117,29 +1123,30 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](admin-tags.md#purge) __Examples:__ ~~~ json - POST /api/delete_old_messages_batch - { - "host": "localhost", - "days": 31, - "batch_size": 1000, - "rate": 10000 - } - - HTTP/1.1 200 OK - "Removal of 5000 messages in progress" +POST /api/delete_old_messages_batch +{ + "host": "localhost", + "days": 31, + "batch_size": 1000, + "rate": 10000 +} + +HTTP/1.1 200 OK +"Removal of 5000 messages in progress" ~~~ -
added in 22.05
+ ## delete_old_messages_status + Status of delete old offline messages operation @@ -1152,26 +1159,27 @@ __Result:__ - *status* :: string : Status test __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](admin-tags.md#purge) __Examples:__ ~~~ json - POST /api/delete_old_messages_status - { - "host": "localhost" - } - - HTTP/1.1 200 OK - {"status": "Operation in progress, delete 5000 messages"} +POST /api/delete_old_messages_status +{ + "host": "localhost" +} + +HTTP/1.1 200 OK +"Operation in progress, delete 5000 messages" ~~~ -
added in 21.12
+ ## delete_old_pubsub_items + Keep only NUMBER of PubSub items per node @@ -1184,22 +1192,22 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](admin-tags.md#purge) __Module:__ -[mod_pubsub](/admin/configuration/modules/#mod-pubsub) +[mod_pubsub](../../admin/configuration/modules.md#mod_pubsub) __Examples:__ ~~~ json - POST /api/delete_old_pubsub_items - { - "number": 1000 - } - - HTTP/1.1 200 OK - "" +POST /api/delete_old_pubsub_items +{ + "number": 1000 +} + +HTTP/1.1 200 OK +"" ~~~ @@ -1219,22 +1227,22 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[purge](/developer/ejabberd-api/admin-tags/#purge) +[purge](admin-tags.md#purge) __Module:__ -[mod_push](/admin/configuration/modules/#mod-push) +[mod_push](../../admin/configuration/modules.md#mod_push) __Examples:__ ~~~ json - POST /api/delete_old_push_sessions - { - "days": 1 - } - - HTTP/1.1 200 OK - "" +POST /api/delete_old_push_sessions +{ + "days": 1 +} + +HTTP/1.1 200 OK +"" ~~~ @@ -1247,7 +1255,7 @@ Delete users that didn't log in last days, or that never logged To protect admin accounts, configure this for example: -``` +``` yaml access_rules: protect_old_users: - allow: admin @@ -1264,22 +1272,22 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts), [purge](/developer/ejabberd-api/admin-tags/#purge) +[accounts](admin-tags.md#accounts), [purge](admin-tags.md#purge) __Module:__ -[mod_admin_extra](/admin/configuration/modules/#mod-admin-extra) +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) __Examples:__ ~~~ json - POST /api/delete_old_users - { - "days": 30 - } - - HTTP/1.1 200 OK - "Deleted 2 users: ["oldman@myserver.com", "test@myserver.com"]" +POST /api/delete_old_users +{ + "days": 30 +} + +HTTP/1.1 200 OK +"Deleted 2 users: ["oldman@myserver.com", "test@myserver.com"]" ~~~ @@ -1292,7 +1300,7 @@ Delete users that didn't log in last days in vhost, or that never logged To protect admin accounts, configure this for example: -``` +``` yaml access_rules: delete_old_users: - deny: admin @@ -1310,23 +1318,23 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts), [purge](/developer/ejabberd-api/admin-tags/#purge) +[accounts](admin-tags.md#accounts), [purge](admin-tags.md#purge) __Module:__ -[mod_admin_extra](/admin/configuration/modules/#mod-admin-extra) +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) __Examples:__ ~~~ json - POST /api/delete_old_users_vhost - { - "host": "myserver.com", - "days": 30 - } - - HTTP/1.1 200 OK - "Deleted 2 users: ["oldman@myserver.com", "test@myserver.com"]" +POST /api/delete_old_users_vhost +{ + "host": "myserver.com", + "days": 30 +} + +HTTP/1.1 200 OK +"Deleted 2 users: ["oldman@myserver.com", "test@myserver.com"]" ~~~ @@ -1349,25 +1357,25 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[roster](/developer/ejabberd-api/admin-tags/#roster) +[roster](admin-tags.md#roster) __Module:__ -[mod_admin_extra](/admin/configuration/modules/#mod-admin-extra) +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) __Examples:__ ~~~ json - POST /api/delete_rosteritem - { - "localuser": "user1", - "localhost": "myserver.com", - "user": "user2", - "host": "myserver.com" - } - - HTTP/1.1 200 OK - "" +POST /api/delete_rosteritem +{ + "localuser": "user1", + "localhost": "myserver.com", + "user": "user2", + "host": "myserver.com" +} + +HTTP/1.1 200 OK +"" ~~~ @@ -1388,23 +1396,23 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/admin/configuration/modules/#mod-muc-admin) +[mod_muc_admin](../../admin/configuration/modules.md#mod_muc_admin) __Examples:__ ~~~ json - POST /api/destroy_room - { - "name": "room1", - "service": "muc.example.com" - } - - HTTP/1.1 200 OK - "" +POST /api/destroy_room +{ + "name": "room1", + "service": "conference.example.com" +} + +HTTP/1.1 200 OK +"" ~~~ @@ -1427,22 +1435,22 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](admin-tags.md#muc) __Module:__ -[mod_muc_admin](/admin/configuration/modules/#mod-muc-admin) +[mod_muc_admin](../../admin/configuration/modules.md#mod_muc_admin) __Examples:__ ~~~ json - POST /api/destroy_rooms_file - { - "file": "/home/ejabberd/rooms.txt" - } - - HTTP/1.1 200 OK - "" +POST /api/destroy_rooms_file +{ + "file": "/home/ejabberd/rooms.txt" +} + +HTTP/1.1 200 OK +"" ~~~ @@ -1462,19 +1470,19 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](admin-tags.md#mnesia) __Examples:__ ~~~ json - POST /api/dump - { - "file": "/var/lib/ejabberd/database.txt" - } - - HTTP/1.1 200 OK - "Success" +POST /api/dump +{ + "file": "/var/lib/ejabberd/database.txt" +} + +HTTP/1.1 200 OK +"Success" ~~~ @@ -1494,19 +1502,19 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[config](/developer/ejabberd-api/admin-tags/#config) +[config](admin-tags.md#config) __Examples:__ ~~~ json - POST /api/dump_config - { - "out": "/tmp/ejabberd.yml" - } - - HTTP/1.1 200 OK - "" +POST /api/dump_config +{ + "out": "/tmp/ejabberd.yml" +} + +HTTP/1.1 200 OK +"" ~~~ @@ -1527,20 +1535,20 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](admin-tags.md#mnesia) __Examples:__ ~~~ json - POST /api/dump_table - { - "file": "/var/lib/ejabberd/table-muc-registered.txt", - "table": "muc_registered" - } - - HTTP/1.1 200 OK - "Success" +POST /api/dump_table +{ + "file": "/var/lib/ejabberd/table-muc-registered.txt", + "table": "muc_registered" +} + +HTTP/1.1 200 OK +"Success" ~~~ @@ -1552,7 +1560,7 @@ __Examples:__ Export virtual host information from Mnesia tables to SQL file -Configure the modules to use SQL, then call this command. After correctly exported the database of a vhost, you may want to delete from mnesia with the [delete_mnesia](/developer/ejabberd-api/admin-api/#delete-mnesia) command. +Configure the modules to use SQL, then call this command. After correctly exported the database of a vhost, you may want to delete from mnesia with the [delete_mnesia](#delete_mnesia) API. __Arguments:__ @@ -1564,20 +1572,20 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](admin-tags.md#mnesia) __Examples:__ ~~~ json - POST /api/export2sql - { - "host": "example.com", - "file": "/var/lib/ejabberd/example.com.sql" - } - - HTTP/1.1 200 OK - "" +POST /api/export2sql +{ + "host": "example.com", + "file": "/var/lib/ejabberd/example.com.sql" +} + +HTTP/1.1 200 OK +"" ~~~ @@ -1597,19 +1605,19 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](admin-tags.md#mnesia) __Examples:__ ~~~ json - POST /api/export_piefxis - { - "dir": "/var/lib/ejabberd/" - } - - HTTP/1.1 200 OK - "" +POST /api/export_piefxis +{ + "dir": "/var/lib/ejabberd/" +} + +HTTP/1.1 200 OK +"" ~~~ @@ -1630,27 +1638,28 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](admin-tags.md#mnesia) __Examples:__ ~~~ json - POST /api/export_piefxis_host - { - "dir": "/var/lib/ejabberd/", - "host": "example.com" - } - - HTTP/1.1 200 OK - "" +POST /api/export_piefxis_host +{ + "dir": "/var/lib/ejabberd/", + "host": "example.com" +} + +HTTP/1.1 200 OK +"" ~~~ -
added in 20.01
+ ## gc + Force full garbage collection @@ -1662,19 +1671,19 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](admin-tags.md#server) __Examples:__ ~~~ json - POST /api/gc - { - - } - - HTTP/1.1 200 OK - "" +POST /api/gc +{ + +} + +HTTP/1.1 200 OK +"" ~~~ @@ -1696,21 +1705,21 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[documentation](/developer/ejabberd-api/admin-tags/#documentation) +[documentation](admin-tags.md#documentation) __Examples:__ ~~~ json - POST /api/gen_html_doc_for_commands - { - "file": "/home/me/docs/api.html", - "regexp": "mod_admin", - "examples": "java,json" - } - - HTTP/1.1 200 OK - "" +POST /api/gen_html_doc_for_commands +{ + "file": "/home/me/docs/api.html", + "regexp": "mod_admin", + "examples": "java,json" +} + +HTTP/1.1 200 OK +"" ~~~ @@ -1732,28 +1741,29 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[documentation](/developer/ejabberd-api/admin-tags/#documentation) +[documentation](admin-tags.md#documentation) __Examples:__ ~~~ json - POST /api/gen_markdown_doc_for_commands - { - "file": "/home/me/docs/api.html", - "regexp": "mod_admin", - "examples": "java,json" - } - - HTTP/1.1 200 OK - "" +POST /api/gen_markdown_doc_for_commands +{ + "file": "/home/me/docs/api.html", + "regexp": "mod_admin", + "examples": "java,json" +} + +HTTP/1.1 200 OK +"" ~~~ -
added in 21.12
+ ## gen_markdown_doc_for_tags + Generates markdown documentation for ejabberd_commands @@ -1766,19 +1776,77 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[documentation](/developer/ejabberd-api/admin-tags/#documentation) +[documentation](admin-tags.md#documentation) __Examples:__ ~~~ json - POST /api/gen_markdown_doc_for_tags - { - "file": "/home/me/docs/tags.md" - } - - HTTP/1.1 200 OK - "" +POST /api/gen_markdown_doc_for_tags +{ + "file": "/home/me/docs/tags.md" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## get_ban_details 🟤 + + + +Get ban details about an account + + +Check [ban_account](#ban_account) API. + +__Arguments:__ + +- *user* :: string : User name to unban +- *host* :: string : Server name + +__Result:__ + +- *ban_details* :: [{name::string, value::string}] + +__Tags:__ +[accounts](admin-tags.md#accounts), [v2](admin-tags.md#v2) + +__Module:__ +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/get_ban_details +{ + "user": "attacker", + "host": "myserver.com" +} + +HTTP/1.1 200 OK +[ + { + "name": "reason", + "value": "Spamming other users" + }, + { + "name": "bandate", + "value": "2024-04-22T09:16:47.975312Z" + }, + { + "name": "lastdate", + "value": "2024-04-22T08:39:12Z" + }, + { + "name": "lastreason", + "value": "Connection reset by peer" + } +] ~~~ @@ -1797,22 +1865,22 @@ __Result:__ - *cookie* :: string : Erlang cookie used for authentication by ejabberd __Tags:__ -[erlang](/developer/ejabberd-api/admin-tags/#erlang) +[erlang](admin-tags.md#erlang) __Module:__ -[mod_admin_extra](/admin/configuration/modules/#mod-admin-extra) +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) __Examples:__ ~~~ json - POST /api/get_cookie - { - - } - - HTTP/1.1 200 OK - {"cookie": "MWTAVMODFELNLSMYXPPD"} +POST /api/get_cookie +{ + +} + +HTTP/1.1 200 OK +"MWTAVMODFELNLSMYXPPD" ~~~ @@ -1836,26 +1904,26 @@ __Result:__ - *last_activity* :: {timestamp::string, status::string} : Last activity timestamp and status __Tags:__ -[last](/developer/ejabberd-api/admin-tags/#last) +[last](admin-tags.md#last) __Module:__ -[mod_admin_extra](/admin/configuration/modules/#mod-admin-extra) +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) __Examples:__ ~~~ json - POST /api/get_last - { - "user": "user1", - "host": "myserver.com" - } - - HTTP/1.1 200 OK - { - "timestamp": "2017-06-30T14:32:16.060684Z", - "status": "ONLINE" - } +POST /api/get_last +{ + "user": "user1", + "host": "myserver.com" +} + +HTTP/1.1 200 OK +{ + "timestamp": "2017-06-30T14:32:16.060684Z", + "status": "ONLINE" +} ~~~ @@ -1874,19 +1942,54 @@ __Result:__ - *levelatom* :: string : Tuple with the log level number, its keyword and description __Tags:__ -[logs](/developer/ejabberd-api/admin-tags/#logs) +[logs](admin-tags.md#logs) __Examples:__ ~~~ json - POST /api/get_loglevel - { - - } - - HTTP/1.1 200 OK - {"levelatom": "warning"} +POST /api/get_loglevel +{ + +} + +HTTP/1.1 200 OK +"warning" +~~~ + + + + +## get_master 🟤 + + + +Get master node of the clustered Mnesia tables + + +If there is no master, returns `none`. + +__Arguments:__ + + +__Result:__ + +- *nodename* :: string + +__Tags:__ +[cluster](admin-tags.md#cluster) + +__Examples:__ + + +~~~ json +POST /api/get_master +{ + +} + +HTTP/1.1 200 OK +"aaaaa" ~~~ @@ -1907,23 +2010,23 @@ __Result:__ - *value* :: integer : Number __Tags:__ -[offline](/developer/ejabberd-api/admin-tags/#offline) +[offline](admin-tags.md#offline) __Module:__ -[mod_admin_extra](/admin/configuration/modules/#mod-admin-extra) +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) __Examples:__ ~~~ json - POST /api/get_offline_count - { - "user": "aaaaa", - "host": "bbbbb" - } - - HTTP/1.1 200 OK - {"value": 5} +POST /api/get_offline_count +{ + "user": "aaaaa", + "host": "bbbbb" +} + +HTTP/1.1 200 OK +5 ~~~ @@ -1958,27 +2061,27 @@ __Result:__ - *presence* :: {jid::string, show::string, status::string} __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](admin-tags.md#session) __Module:__ -[mod_admin_extra](/admin/configuration/modules/#mod-admin-extra) +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) __Examples:__ ~~~ json - POST /api/get_presence - { - "user": "peter", - "host": "myexample.com" - } - - HTTP/1.1 200 OK - { - "jid": "user1@myserver.com/tka", - "show": "dnd", - "status": "Busy" - } +POST /api/get_presence +{ + "user": "peter", + "host": "myexample.com" +} + +HTTP/1.1 200 OK +{ + "jid": "user1@myserver.com/tka", + "show": "dnd", + "status": "Busy" +} ~~~ @@ -2000,24 +2103,24 @@ __Result:__ - *affiliation* :: string : Affiliation of the user __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/admin/configuration/modules/#mod-muc-admin) +[mod_muc_admin](../../admin/configuration/modules.md#mod_muc_admin) __Examples:__ ~~~ json - POST /api/get_room_affiliation - { - "name": "room1", - "service": "muc.example.com", - "jid": "user1@example.com" - } - - HTTP/1.1 200 OK - {"affiliation": "member"} +POST /api/get_room_affiliation +{ + "name": "room1", + "service": "conference.example.com", + "jid": "user1@example.com" +} + +HTTP/1.1 200 OK +"member" ~~~ @@ -2038,37 +2141,38 @@ __Result:__ - *affiliations* :: [{username::string, domain::string, affiliation::string, reason::string}] : The list of affiliations with username, domain, affiliation and reason __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/admin/configuration/modules/#mod-muc-admin) +[mod_muc_admin](../../admin/configuration/modules.md#mod_muc_admin) __Examples:__ ~~~ json - POST /api/get_room_affiliations - { - "name": "room1", - "service": "muc.example.com" - } - - HTTP/1.1 200 OK - [ - { - "username": "user1", - "domain": "example.com", - "affiliation": "member", - "reason": "member" - } - ] +POST /api/get_room_affiliations +{ + "name": "room1", + "service": "conference.example.com" +} + +HTTP/1.1 200 OK +[ + { + "username": "user1", + "domain": "example.com", + "affiliation": "member", + "reason": "member" + } +] ~~~ -
added in 23.04
+ ## get_room_history + Get history of messages stored inside MUC room state @@ -2082,32 +2186,32 @@ __Result:__ - *history* :: [{timestamp::string, message::string}] __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/admin/configuration/modules/#mod-muc-admin) +[mod_muc_admin](../../admin/configuration/modules.md#mod_muc_admin) __Examples:__ ~~~ json - POST /api/get_room_history - { - "name": "room1", - "service": "muc.example.com" - } - - HTTP/1.1 200 OK - [ - { - "timestamp": "aaaaa", - "message": "bbbbb" - }, - { - "timestamp": "ccccc", - "message": "ddddd" - } - ] +POST /api/get_room_history +{ + "name": "room1", + "service": "conference.example.com" +} + +HTTP/1.1 200 OK +[ + { + "timestamp": "aaaaa", + "message": "bbbbb" + }, + { + "timestamp": "ccccc", + "message": "ddddd" + } +] ~~~ @@ -2128,29 +2232,29 @@ __Result:__ - *occupants* :: [{jid::string, nick::string, role::string}] : The list of occupants with JID, nick and affiliation __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/admin/configuration/modules/#mod-muc-admin) +[mod_muc_admin](../../admin/configuration/modules.md#mod_muc_admin) __Examples:__ ~~~ json - POST /api/get_room_occupants - { - "name": "room1", - "service": "muc.example.com" - } - - HTTP/1.1 200 OK - [ - { - "jid": "user1@example.com/psi", - "nick": "User 1", - "role": "owner" - } - ] +POST /api/get_room_occupants +{ + "name": "room1", + "service": "conference.example.com" +} + +HTTP/1.1 200 OK +[ + { + "jid": "user1@example.com/psi", + "nick": "User 1", + "role": "owner" + } +] ~~~ @@ -2171,23 +2275,23 @@ __Result:__ - *occupants* :: integer : Number of room occupants __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/admin/configuration/modules/#mod-muc-admin) +[mod_muc_admin](../../admin/configuration/modules.md#mod_muc_admin) __Examples:__ ~~~ json - POST /api/get_room_occupants_number - { - "name": "room1", - "service": "muc.example.com" - } - - HTTP/1.1 200 OK - {"occupants": 7} +POST /api/get_room_occupants_number +{ + "name": "room1", + "service": "conference.example.com" +} + +HTTP/1.1 200 OK +7 ~~~ @@ -2208,35 +2312,36 @@ __Result:__ - *options* :: [{name::string, value::string}] : List of room options tuples with name and value __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/admin/configuration/modules/#mod-muc-admin) +[mod_muc_admin](../../admin/configuration/modules.md#mod_muc_admin) __Examples:__ ~~~ json - POST /api/get_room_options - { - "name": "room1", - "service": "muc.example.com" - } - - HTTP/1.1 200 OK - [ - { - "name": "members_only", - "value": "true" - } - ] +POST /api/get_room_options +{ + "name": "room1", + "service": "conference.example.com" +} + +HTTP/1.1 200 OK +[ + { + "name": "members_only", + "value": "true" + } +] ~~~ -
improved in 23.10
+ ## get_roster + Get list of contacts in a local user roster @@ -2255,44 +2360,82 @@ __Result:__ - *contacts* :: [{jid::string, nick::string, subscription::string, pending::string, groups::[group::string]}] __Tags:__ -[roster](/developer/ejabberd-api/admin-tags/#roster) +[roster](admin-tags.md#roster) __Module:__ -[mod_admin_extra](/admin/configuration/modules/#mod-admin-extra) +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) __Examples:__ ~~~ json - POST /api/get_roster - { - "user": "aaaaa", - "host": "bbbbb" - } - - HTTP/1.1 200 OK - [ - { - "jid": "aaaaa", - "nick": "bbbbb", - "subscription": "ccccc", - "pending": "ddddd", - "groups": [ - "eeeee", - "fffff" - ] - }, - { - "jid": "ggggg", - "nick": "hhhhh", - "subscription": "iiiii", - "pending": "jjjjj", - "groups": [ - "kkkkk", - "lllll" - ] - } +POST /api/get_roster +{ + "user": "aaaaa", + "host": "bbbbb" +} + +HTTP/1.1 200 OK +[ + { + "jid": "aaaaa", + "nick": "bbbbb", + "subscription": "ccccc", + "pending": "ddddd", + "groups": [ + "eeeee", + "fffff" ] + }, + { + "jid": "ggggg", + "nick": "hhhhh", + "subscription": "iiiii", + "pending": "jjjjj", + "groups": [ + "kkkkk", + "lllll" + ] + } +] +~~~ + + + + +## get_roster_count 🟤 + + + +Get number of contacts in a local user roster + +__Arguments:__ + +- *user* :: string +- *host* :: string + +__Result:__ + +- *value* :: integer : Number + +__Tags:__ +[roster](admin-tags.md#roster) + +__Module:__ +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/get_roster_count +{ + "user": "aaaaa", + "host": "bbbbb" +} + +HTTP/1.1 200 OK +5 ~~~ @@ -2313,26 +2456,26 @@ __Result:__ - *subscribers* :: [jid::string] : The list of users that are subscribed to that room __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room), [muc_sub](/developer/ejabberd-api/admin-tags/#muc-sub) +[muc_room](admin-tags.md#muc_room), [muc_sub](admin-tags.md#muc_sub) __Module:__ -[mod_muc_admin](/admin/configuration/modules/#mod-muc-admin) +[mod_muc_admin](../../admin/configuration/modules.md#mod_muc_admin) __Examples:__ ~~~ json - POST /api/get_subscribers - { - "name": "room1", - "service": "muc.example.com" - } - - HTTP/1.1 200 OK - [ - "user2@example.com", - "user3@example.com" - ] +POST /api/get_subscribers +{ + "name": "room1", + "service": "conference.example.com" +} + +HTTP/1.1 200 OK +[ + "user2@example.com", + "user3@example.com" +] ~~~ @@ -2353,33 +2496,34 @@ __Result:__ - *rooms* :: [room::string] __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](admin-tags.md#muc) __Module:__ -[mod_muc_admin](/admin/configuration/modules/#mod-muc-admin) +[mod_muc_admin](../../admin/configuration/modules.md#mod_muc_admin) __Examples:__ ~~~ json - POST /api/get_user_rooms - { - "user": "tom", - "host": "example.com" - } - - HTTP/1.1 200 OK - [ - "room1@muc.example.com", - "room2@muc.example.com" - ] +POST /api/get_user_rooms +{ + "user": "tom", + "host": "example.com" +} + +HTTP/1.1 200 OK +[ + "room1@conference.example.com", + "room2@conference.example.com" +] ~~~ -
added in 21.04
+ ## get_user_subscriptions + Get the list of rooms where this user is subscribed @@ -2393,31 +2537,31 @@ __Result:__ - *rooms* :: [{roomjid::string, usernick::string, nodes::[node::string]}] __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc), [muc_sub](/developer/ejabberd-api/admin-tags/#muc-sub) +[muc](admin-tags.md#muc), [muc_sub](admin-tags.md#muc_sub) __Module:__ -[mod_muc_admin](/admin/configuration/modules/#mod-muc-admin) +[mod_muc_admin](../../admin/configuration/modules.md#mod_muc_admin) __Examples:__ ~~~ json - POST /api/get_user_subscriptions - { - "user": "tom", - "host": "example.com" - } - - HTTP/1.1 200 OK - [ - { - "roomjid": "room1@muc.example.com", - "usernick": "Tommy", - "nodes": [ - "mucsub:config" - ] - } +POST /api/get_user_subscriptions +{ + "user": "tom", + "host": "example.com" +} + +HTTP/1.1 200 OK +[ + { + "roomjid": "room1@conference.example.com", + "usernick": "Tommy", + "nodes": [ + "mucsub:config" ] + } +] ~~~ @@ -2450,24 +2594,24 @@ __Result:__ - *content* :: string : Field content __Tags:__ -[vcard](/developer/ejabberd-api/admin-tags/#vcard) +[vcard](admin-tags.md#vcard) __Module:__ -[mod_admin_extra](/admin/configuration/modules/#mod-admin-extra) +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) __Examples:__ ~~~ json - POST /api/get_vcard - { - "user": "user1", - "host": "myserver.com", - "name": "NICKNAME" - } - - HTTP/1.1 200 OK - {"content": "User 1"} +POST /api/get_vcard +{ + "user": "user1", + "host": "myserver.com", + "name": "NICKNAME" +} + +HTTP/1.1 200 OK +"User 1" ~~~ @@ -2508,25 +2652,25 @@ __Result:__ - *content* :: string : Field content __Tags:__ -[vcard](/developer/ejabberd-api/admin-tags/#vcard) +[vcard](admin-tags.md#vcard) __Module:__ -[mod_admin_extra](/admin/configuration/modules/#mod-admin-extra) +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) __Examples:__ ~~~ json - POST /api/get_vcard2 - { - "user": "user1", - "host": "myserver.com", - "name": "N", - "subname": "FAMILY" - } - - HTTP/1.1 200 OK - {"content": "Schubert"} +POST /api/get_vcard2 +{ + "user": "user1", + "host": "myserver.com", + "name": "N", + "subname": "FAMILY" +} + +HTTP/1.1 200 OK +"Schubert" ~~~ @@ -2567,35 +2711,36 @@ __Result:__ - *contents* :: [value::string] __Tags:__ -[vcard](/developer/ejabberd-api/admin-tags/#vcard) +[vcard](admin-tags.md#vcard) __Module:__ -[mod_admin_extra](/admin/configuration/modules/#mod-admin-extra) +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) __Examples:__ ~~~ json - POST /api/get_vcard2_multi - { - "user": "aaaaa", - "host": "bbbbb", - "name": "ccccc", - "subname": "ddddd" - } - - HTTP/1.1 200 OK - [ - "aaaaa", - "bbbbb" - ] +POST /api/get_vcard2_multi +{ + "user": "aaaaa", + "host": "bbbbb", + "name": "ccccc", + "subname": "ddddd" +} + +HTTP/1.1 200 OK +[ + "aaaaa", + "bbbbb" +] ~~~ -
added in 23.10
+ ## halt + Halt ejabberd abruptly with status code 1 @@ -2607,19 +2752,19 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](admin-tags.md#server) __Examples:__ ~~~ json - POST /api/halt - { - - } - - HTTP/1.1 200 OK - "" +POST /api/halt +{ + +} + +HTTP/1.1 200 OK +"" ~~~ @@ -2641,19 +2786,19 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[ejabberdctl](/developer/ejabberd-api/admin-tags/#ejabberdctl) +[ejabberdctl](admin-tags.md#ejabberdctl) __Examples:__ ~~~ json - POST /api/help - { - - } - - HTTP/1.1 200 OK - "" +POST /api/help +{ + +} + +HTTP/1.1 200 OK +"" ~~~ @@ -2673,19 +2818,19 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](admin-tags.md#mnesia) __Examples:__ ~~~ json - POST /api/import_dir - { - "file": "/var/lib/ejabberd/jabberd14/" - } - - HTTP/1.1 200 OK - "Success" +POST /api/import_dir +{ + "file": "/var/lib/ejabberd/jabberd14/" +} + +HTTP/1.1 200 OK +"Success" ~~~ @@ -2705,19 +2850,19 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](admin-tags.md#mnesia) __Examples:__ ~~~ json - POST /api/import_file - { - "file": "/var/lib/ejabberd/jabberd14.spool" - } - - HTTP/1.1 200 OK - "Success" +POST /api/import_file +{ + "file": "/var/lib/ejabberd/jabberd14.spool" +} + +HTTP/1.1 200 OK +"Success" ~~~ @@ -2737,19 +2882,19 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](admin-tags.md#mnesia) __Examples:__ ~~~ json - POST /api/import_piefxis - { - "file": "/var/lib/ejabberd/example.com.xml" - } - - HTTP/1.1 200 OK - "" +POST /api/import_piefxis +{ + "file": "/var/lib/ejabberd/example.com.xml" +} + +HTTP/1.1 200 OK +"" ~~~ @@ -2761,7 +2906,7 @@ __Examples:__ Import data from Prosody -Note: this requires ejabberd to be [compiled with `--enable-lua`](http://localhost:8098/admin/installation/#configure) (which installs the `luerl` library). +Note: this requires ejabberd to be compiled with `./configure --enable-lua` (which installs the `luerl` library). __Arguments:__ @@ -2772,19 +2917,19 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia), [sql](/developer/ejabberd-api/admin-tags/#sql) +[mnesia](admin-tags.md#mnesia), [sql](admin-tags.md#sql) __Examples:__ ~~~ json - POST /api/import_prosody - { - "dir": "/var/lib/prosody/datadump/" - } - - HTTP/1.1 200 OK - "" +POST /api/import_prosody +{ + "dir": "/var/lib/prosody/datadump/" +} + +HTTP/1.1 200 OK +"" ~~~ @@ -2803,19 +2948,19 @@ __Result:__ - *s2s_incoming* :: integer __Tags:__ -[statistics](/developer/ejabberd-api/admin-tags/#statistics), [s2s](/developer/ejabberd-api/admin-tags/#s2s) +[statistics](admin-tags.md#statistics), [s2s](admin-tags.md#s2s) __Examples:__ ~~~ json - POST /api/incoming_s2s_number - { - - } - - HTTP/1.1 200 OK - {"s2s_incoming": 1} +POST /api/incoming_s2s_number +{ + +} + +HTTP/1.1 200 OK +1 ~~~ @@ -2827,7 +2972,7 @@ __Examples:__ Install Mnesia database from a binary backup file -The binary backup file is installed as fallback: it will be used to restore the database at the next ejabberd start. This means that, after running this command, you have to restart ejabberd. This command requires less memory than [restore](/developer/ejabberd-api/admin-api/#restore). +The binary backup file is installed as fallback: it will be used to restore the database at the next ejabberd start. This means that, after running this command, you have to restart ejabberd. This command requires less memory than [restore](#restore) API. __Arguments:__ @@ -2838,54 +2983,85 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](admin-tags.md#mnesia) __Examples:__ ~~~ json - POST /api/install_fallback - { - "file": "/var/lib/ejabberd/database.fallback" - } - - HTTP/1.1 200 OK - "Success" +POST /api/install_fallback +{ + "file": "/var/lib/ejabberd/database.fallback" +} + +HTTP/1.1 200 OK +"Success" ~~~ -## join_cluster +## join_cluster 🟤 + + + +Join our local node into the cluster handled by Node + +__Arguments:__ + +- *node* :: string : Nodename of the node to join + +__Result:__ + +- *res* :: string : Raw result string + +__Tags:__ +[cluster](admin-tags.md#cluster) + +__Examples:__ + + +~~~ json +POST /api/join_cluster +{ + "node": "ejabberd1@machine7" +} + +HTTP/1.1 200 OK +"Success" +~~~ + + -Join this node into the cluster handled by Node +## join_cluster_here 🟤 + -This command works only with ejabberdctl, not mod_http_api or other code that runs inside the same ejabberd node that will be joined. +Join a remote Node here, into our cluster __Arguments:__ -- *node* :: string : Nodename of the node to join +- *node* :: string : Nodename of the node to join here __Result:__ -- *res* :: integer : Status code (`0` on success, `1` otherwise) +- *res* :: string : Raw result string __Tags:__ -[cluster](/developer/ejabberd-api/admin-tags/#cluster) +[cluster](admin-tags.md#cluster) __Examples:__ ~~~ json - POST /api/join_cluster - { - "node": "ejabberd1@machine7" - } - - HTTP/1.1 200 OK - "" +POST /api/join_cluster_here +{ + "node": "ejabberd1@machine7" +} + +HTTP/1.1 200 OK +"Success" ~~~ @@ -2908,32 +3084,33 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](admin-tags.md#session) __Module:__ -[mod_admin_extra](/admin/configuration/modules/#mod-admin-extra) +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) __Examples:__ ~~~ json - POST /api/kick_session - { - "user": "peter", - "host": "myserver.com", - "resource": "Psi", - "reason": "Stuck connection" - } - - HTTP/1.1 200 OK - "" +POST /api/kick_session +{ + "user": "peter", + "host": "myserver.com", + "resource": "Psi", + "reason": "Stuck connection" +} + +HTTP/1.1 200 OK +"" ~~~ -## kick_user +## kick_user 🟤 + Disconnect user's active sessions @@ -2944,23 +3121,23 @@ __Arguments:__ __Result:__ -- *num_resources* :: integer : Number of resources that were kicked +- *res* :: string : Raw result string __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](admin-tags.md#session), [v2](admin-tags.md#v2) __Examples:__ ~~~ json - POST /api/kick_user - { - "user": "user1", - "host": "example.com" - } - - HTTP/1.1 200 OK - {"num_resources": 3} +POST /api/kick_user +{ + "user": "user1", + "host": "example.com" +} + +HTTP/1.1 200 OK +"Kicked sessions: 2" ~~~ @@ -2983,19 +3160,19 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[cluster](/developer/ejabberd-api/admin-tags/#cluster) +[cluster](admin-tags.md#cluster) __Examples:__ ~~~ json - POST /api/leave_cluster - { - "node": "ejabberd1@machine8" - } - - HTTP/1.1 200 OK - "" +POST /api/leave_cluster +{ + "node": "ejabberd1@machine8" +} + +HTTP/1.1 200 OK +"" ~~~ @@ -3014,30 +3191,30 @@ __Result:__ - *certificates* :: [{domain::string, file::string, used::string}] __Tags:__ -[acme](/developer/ejabberd-api/admin-tags/#acme) +[acme](admin-tags.md#acme) __Examples:__ ~~~ json - POST /api/list_certificates - { - - } - - HTTP/1.1 200 OK - [ - { - "domain": "aaaaa", - "file": "bbbbb", - "used": "ccccc" - }, - { - "domain": "ddddd", - "file": "eeeee", - "used": "fffff" - } - ] +POST /api/list_certificates +{ + +} + +HTTP/1.1 200 OK +[ + { + "domain": "aaaaa", + "file": "bbbbb", + "used": "ccccc" + }, + { + "domain": "ddddd", + "file": "eeeee", + "used": "fffff" + } +] ~~~ @@ -3046,7 +3223,7 @@ __Examples:__ ## list_cluster -List nodes that are part of the cluster handled by Node +List running nodes that are part of this cluster __Arguments:__ @@ -3056,22 +3233,64 @@ __Result:__ - *nodes* :: [node::string] __Tags:__ -[cluster](/developer/ejabberd-api/admin-tags/#cluster) +[cluster](admin-tags.md#cluster) __Examples:__ ~~~ json - POST /api/list_cluster - { - - } - - HTTP/1.1 200 OK - [ - "ejabberd1@machine7", - "ejabberd1@machine8" - ] +POST /api/list_cluster +{ + +} + +HTTP/1.1 200 OK +[ + "ejabberd1@machine7", + "ejabberd1@machine8" +] +~~~ + + + + +## list_cluster_detailed 🟤 + + + +List nodes (both running and known) and some stats + +__Arguments:__ + + +__Result:__ + +- *nodes* :: [{name::string, running::string, status::string, online_users::integer, processes::integer, uptime_seconds::integer, master_node::string}] + +__Tags:__ +[cluster](admin-tags.md#cluster) + +__Examples:__ + + +~~~ json +POST /api/list_cluster_detailed +{ + +} + +HTTP/1.1 200 OK +[ + { + "name": "ejabberd@localhost", + "running": "true", + "status": "The node ejabberd is started. Status...", + "online_users": 7, + "processes": 348, + "uptime_seconds": 60, + "master_node": "none" + } +] ~~~ @@ -3083,7 +3302,7 @@ __Examples:__ Restore Mnesia database from a text dump file -Restore immediately. This is not recommended for big databases, as it will consume much time, memory and processor. In that case it's preferable to use [install_fallback](/developer/ejabberd-api/admin-api/#backup[backup] and http://./#install-fallback). +Restore immediately. This is not recommended for big databases, as it will consume much time, memory and processor. In that case it's preferable to use [backup](#backup) API and [install_fallback](#install_fallback) API. __Arguments:__ @@ -3094,26 +3313,27 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](admin-tags.md#mnesia) __Examples:__ ~~~ json - POST /api/load - { - "file": "/var/lib/ejabberd/database.txt" - } - - HTTP/1.1 200 OK - "Success" +POST /api/load +{ + "file": "/var/lib/ejabberd/database.txt" +} + +HTTP/1.1 200 OK +"Success" ~~~ -
added in 20.01
+ ## man + Generate Unix manpage for current ejabberd version @@ -3125,19 +3345,19 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[documentation](/developer/ejabberd-api/admin-tags/#documentation) +[documentation](admin-tags.md#documentation) __Examples:__ ~~~ json - POST /api/man - { - - } - - HTTP/1.1 200 OK - "Success" +POST /api/man +{ + +} + +HTTP/1.1 200 OK +"Success" ~~~ @@ -3160,22 +3380,22 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](admin-tags.md#mnesia) __Examples:__ ~~~ json - POST /api/mnesia_change_nodename - { - "oldnodename": "ejabberd@machine1", - "newnodename": "ejabberd@machine2", - "oldbackup": "/var/lib/ejabberd/old.backup", - "newbackup": "/var/lib/ejabberd/new.backup" - } - - HTTP/1.1 200 OK - "Success" +POST /api/mnesia_change_nodename +{ + "oldnodename": "ejabberd@machine1", + "newnodename": "ejabberd@machine2", + "oldbackup": "/var/lib/ejabberd/old.backup", + "newbackup": "/var/lib/ejabberd/new.backup" +} + +HTTP/1.1 200 OK +"Success" ~~~ @@ -3194,26 +3414,27 @@ __Result:__ - *res* :: string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](admin-tags.md#mnesia) __Examples:__ ~~~ json - POST /api/mnesia_info - { - - } - - HTTP/1.1 200 OK - {"res": "aaaaa"} +POST /api/mnesia_info +{ + +} + +HTTP/1.1 200 OK +"aaaaa" ~~~ -
renamed in 24.02
+ ## mnesia_info_ctl + Show information of Mnesia system (only ejabberdctl) @@ -3228,19 +3449,19 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[ejabberdctl](/developer/ejabberd-api/admin-tags/#ejabberdctl), [mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[ejabberdctl](admin-tags.md#ejabberdctl), [mnesia](admin-tags.md#mnesia) __Examples:__ ~~~ json - POST /api/mnesia_info_ctl - { - - } - - HTTP/1.1 200 OK - "" +POST /api/mnesia_info_ctl +{ + +} + +HTTP/1.1 200 OK +"" ~~~ @@ -3260,19 +3481,19 @@ __Result:__ - *res* :: string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](admin-tags.md#mnesia) __Examples:__ ~~~ json - POST /api/mnesia_table_info - { - "table": "roster" - } - - HTTP/1.1 200 OK - {"res": "aaaaa"} +POST /api/mnesia_table_info +{ + "table": "roster" +} + +HTTP/1.1 200 OK +"aaaaa" ~~~ @@ -3292,19 +3513,19 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[modules](/developer/ejabberd-api/admin-tags/#modules) +[modules](admin-tags.md#modules) __Examples:__ ~~~ json - POST /api/module_check - { - "module": "mod_rest" - } - - HTTP/1.1 200 OK - "" +POST /api/module_check +{ + "module": "mod_rest" +} + +HTTP/1.1 200 OK +"" ~~~ @@ -3324,19 +3545,19 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[modules](/developer/ejabberd-api/admin-tags/#modules) +[modules](admin-tags.md#modules) __Examples:__ ~~~ json - POST /api/module_install - { - "module": "mod_rest" - } - - HTTP/1.1 200 OK - "" +POST /api/module_install +{ + "module": "mod_rest" +} + +HTTP/1.1 200 OK +"" ~~~ @@ -3356,19 +3577,19 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[modules](/developer/ejabberd-api/admin-tags/#modules) +[modules](admin-tags.md#modules) __Examples:__ ~~~ json - POST /api/module_uninstall - { - "module": "mod_rest" - } - - HTTP/1.1 200 OK - "" +POST /api/module_uninstall +{ + "module": "mod_rest" +} + +HTTP/1.1 200 OK +"" ~~~ @@ -3391,19 +3612,19 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[modules](/developer/ejabberd-api/admin-tags/#modules) +[modules](admin-tags.md#modules) __Examples:__ ~~~ json - POST /api/module_upgrade - { - "module": "mod_rest" - } - - HTTP/1.1 200 OK - "" +POST /api/module_upgrade +{ + "module": "mod_rest" +} + +HTTP/1.1 200 OK +"" ~~~ @@ -3422,22 +3643,22 @@ __Result:__ - *modules* :: [{name::string, summary::string}] : List of tuples with module name and description __Tags:__ -[modules](/developer/ejabberd-api/admin-tags/#modules) +[modules](admin-tags.md#modules) __Examples:__ ~~~ json - POST /api/modules_available - { - - } - - HTTP/1.1 200 OK - { - "mod_cron": "Execute scheduled commands", - "mod_rest": "ReST frontend" - } +POST /api/modules_available +{ + +} + +HTTP/1.1 200 OK +{ + "mod_cron": "Execute scheduled commands", + "mod_rest": "ReST frontend" +} ~~~ @@ -3456,22 +3677,22 @@ __Result:__ - *modules* :: [{name::string, summary::string}] : List of tuples with module name and description __Tags:__ -[modules](/developer/ejabberd-api/admin-tags/#modules) +[modules](admin-tags.md#modules) __Examples:__ ~~~ json - POST /api/modules_installed - { - - } - - HTTP/1.1 200 OK - { - "mod_cron": "Execute scheduled commands", - "mod_rest": "ReST frontend" - } +POST /api/modules_installed +{ + +} + +HTTP/1.1 200 OK +{ + "mod_cron": "Execute scheduled commands", + "mod_rest": "ReST frontend" +} ~~~ @@ -3493,19 +3714,19 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[modules](/developer/ejabberd-api/admin-tags/#modules) +[modules](admin-tags.md#modules) __Examples:__ ~~~ json - POST /api/modules_update_specs - { - - } - - HTTP/1.1 200 OK - "" +POST /api/modules_update_specs +{ + +} + +HTTP/1.1 200 OK +"" ~~~ @@ -3528,25 +3749,25 @@ __Result:__ - *rooms* :: [room::string] : List of rooms __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](admin-tags.md#muc) __Module:__ -[mod_muc_admin](/admin/configuration/modules/#mod-muc-admin) +[mod_muc_admin](../../admin/configuration/modules.md#mod_muc_admin) __Examples:__ ~~~ json - POST /api/muc_online_rooms - { - "service": "muc.example.com" - } - - HTTP/1.1 200 OK - [ - "room1@muc.example.com", - "room2@muc.example.com" - ] +POST /api/muc_online_rooms +{ + "service": "conference.example.com" +} + +HTTP/1.1 200 OK +[ + "room1@conference.example.com", + "room2@conference.example.com" +] ~~~ @@ -3570,34 +3791,34 @@ __Result:__ - *rooms* :: [{jid::string, public::string, participants::integer}] : List of rooms with summary __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](admin-tags.md#muc) __Module:__ -[mod_muc_admin](/admin/configuration/modules/#mod-muc-admin) +[mod_muc_admin](../../admin/configuration/modules.md#mod_muc_admin) __Examples:__ ~~~ json - POST /api/muc_online_rooms_by_regex - { - "service": "muc.example.com", - "regex": "^prefix" - } - - HTTP/1.1 200 OK - [ - { - "jid": "room1@muc.example.com", - "public": "true", - "participants": 10 - }, - { - "jid": "room2@muc.example.com", - "public": "false", - "participants": 10 - } - ] +POST /api/muc_online_rooms_by_regex +{ + "service": "conference.example.com", + "regex": "^prefix" +} + +HTTP/1.1 200 OK +[ + { + "jid": "room1@conference.example.com", + "public": "true", + "participants": 10 + }, + { + "jid": "room2@conference.example.com", + "public": "false", + "participants": 10 + } +] ~~~ @@ -3619,24 +3840,24 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](admin-tags.md#muc) __Module:__ -[mod_muc_admin](/admin/configuration/modules/#mod-muc-admin) +[mod_muc_admin](../../admin/configuration/modules.md#mod_muc_admin) __Examples:__ ~~~ json - POST /api/muc_register_nick - { - "nick": "Tim", - "jid": "tim@example.org", - "service": "muc.example.org" - } - - HTTP/1.1 200 OK - "" +POST /api/muc_register_nick +{ + "nick": "Tim", + "jid": "tim@example.org", + "service": "conference.example.org" +} + +HTTP/1.1 200 OK +"" ~~~ @@ -3657,23 +3878,23 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](admin-tags.md#muc) __Module:__ -[mod_muc_admin](/admin/configuration/modules/#mod-muc-admin) +[mod_muc_admin](../../admin/configuration/modules.md#mod_muc_admin) __Examples:__ ~~~ json - POST /api/muc_unregister_nick - { - "jid": "tim@example.org", - "service": "muc.example.org" - } - - HTTP/1.1 200 OK - "" +POST /api/muc_unregister_nick +{ + "jid": "tim@example.org", + "service": "conference.example.org" +} + +HTTP/1.1 200 OK +"" ~~~ @@ -3694,23 +3915,23 @@ __Result:__ - *resources* :: integer : Number of active resources for a user __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](admin-tags.md#session) __Module:__ -[mod_admin_extra](/admin/configuration/modules/#mod-admin-extra) +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) __Examples:__ ~~~ json - POST /api/num_resources - { - "user": "peter", - "host": "myserver.com" - } - - HTTP/1.1 200 OK - {"resources": 5} +POST /api/num_resources +{ + "user": "peter", + "host": "myserver.com" +} + +HTTP/1.1 200 OK +5 ~~~ @@ -3719,7 +3940,7 @@ __Examples:__ ## oauth_add_client_implicit -Add [OAuth](https://docs.ejabberd.im/developer/ejabberd-api/oauth/) client_id with implicit grant type +Add [OAuth](oauth.md) client_id with implicit grant type __Arguments:__ @@ -3732,21 +3953,21 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[oauth](/developer/ejabberd-api/admin-tags/#oauth) +[oauth](admin-tags.md#oauth) __Examples:__ ~~~ json - POST /api/oauth_add_client_implicit - { - "client_id": "aaaaa", - "client_name": "bbbbb", - "redirect_uri": "ccccc" - } - - HTTP/1.1 200 OK - "Success" +POST /api/oauth_add_client_implicit +{ + "client_id": "aaaaa", + "client_name": "bbbbb", + "redirect_uri": "ccccc" +} + +HTTP/1.1 200 OK +"Success" ~~~ @@ -3755,7 +3976,7 @@ __Examples:__ ## oauth_add_client_password -Add [OAuth](https://docs.ejabberd.im/developer/ejabberd-api/oauth/) client_id with password grant type +Add [OAuth](oauth.md) client_id with password grant type __Arguments:__ @@ -3768,30 +3989,31 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[oauth](/developer/ejabberd-api/admin-tags/#oauth) +[oauth](admin-tags.md#oauth) __Examples:__ ~~~ json - POST /api/oauth_add_client_password - { - "client_id": "aaaaa", - "client_name": "bbbbb", - "secret": "ccccc" - } - - HTTP/1.1 200 OK - "Success" +POST /api/oauth_add_client_password +{ + "client_id": "aaaaa", + "client_name": "bbbbb", + "secret": "ccccc" +} + +HTTP/1.1 200 OK +"Success" ~~~ -
updated in 24.02
+ ## oauth_issue_token + -Issue an [OAuth](https://docs.ejabberd.im/developer/ejabberd-api/oauth/) token for the given jid +Issue an [OAuth](oauth.md) optionredir token for the given jid __Arguments:__ @@ -3804,31 +4026,31 @@ __Result:__ - *result* :: {token::string, scopes::[scope::string], expires_in::string} __Tags:__ -[oauth](/developer/ejabberd-api/admin-tags/#oauth), [v1](/developer/ejabberd-api/admin-tags/#v1) +[oauth](admin-tags.md#oauth), [v1](admin-tags.md#v1) __Examples:__ ~~~ json - POST /api/oauth_issue_token - { - "jid": "user@server.com", - "ttl": 3600, - "scopes": [ - "connected_users_number", - "muc_online_rooms" - ] - } - - HTTP/1.1 200 OK - { - "token": "aaaaa", - "scopes": [ - "bbbbb", - "ccccc" - ], - "expires_in": "ddddd" - } +POST /api/oauth_issue_token +{ + "jid": "user@server.com", + "ttl": 3600, + "scopes": [ + "connected_users_number", + "muc_online_rooms" + ] +} + +HTTP/1.1 200 OK +{ + "token": "aaaaa", + "scopes": [ + "bbbbb", + "ccccc" + ], + "expires_in": "ddddd" +} ~~~ @@ -3837,7 +4059,7 @@ __Examples:__ ## oauth_list_tokens -List [OAuth](https://docs.ejabberd.im/developer/ejabberd-api/oauth/) tokens, user, scope, and seconds to expire (only Mnesia) +List [OAuth](oauth.md) tokens, user, scope, and seconds to expire (only Mnesia) List OAuth tokens, their user and scope, and how many seconds remain until expirity @@ -3850,32 +4072,32 @@ __Result:__ - *tokens* :: [{token::string, user::string, scope::string, expires_in::string}] __Tags:__ -[oauth](/developer/ejabberd-api/admin-tags/#oauth) +[oauth](admin-tags.md#oauth) __Examples:__ ~~~ json - POST /api/oauth_list_tokens - { - - } - - HTTP/1.1 200 OK - [ - { - "token": "aaaaa", - "user": "bbbbb", - "scope": "ccccc", - "expires_in": "ddddd" - }, - { - "token": "eeeee", - "user": "fffff", - "scope": "ggggg", - "expires_in": "hhhhh" - } - ] +POST /api/oauth_list_tokens +{ + +} + +HTTP/1.1 200 OK +[ + { + "token": "aaaaa", + "user": "bbbbb", + "scope": "ccccc", + "expires_in": "ddddd" + }, + { + "token": "eeeee", + "user": "fffff", + "scope": "ggggg", + "expires_in": "hhhhh" + } +] ~~~ @@ -3884,7 +4106,7 @@ __Examples:__ ## oauth_remove_client -Remove [OAuth](https://docs.ejabberd.im/developer/ejabberd-api/oauth/) client_id +Remove [OAuth](oauth.md) client_id __Arguments:__ @@ -3895,28 +4117,29 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[oauth](/developer/ejabberd-api/admin-tags/#oauth) +[oauth](admin-tags.md#oauth) __Examples:__ ~~~ json - POST /api/oauth_remove_client - { - "client_id": "aaaaa" - } - - HTTP/1.1 200 OK - "Success" +POST /api/oauth_remove_client +{ + "client_id": "aaaaa" +} + +HTTP/1.1 200 OK +"Success" ~~~ -
changed in 22.05
+ ## oauth_revoke_token + -Revoke authorization for an [OAuth](https://docs.ejabberd.im/developer/ejabberd-api/oauth/) token +Revoke authorization for an [OAuth](oauth.md) token __Arguments:__ @@ -3927,19 +4150,19 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[oauth](/developer/ejabberd-api/admin-tags/#oauth) +[oauth](admin-tags.md#oauth) __Examples:__ ~~~ json - POST /api/oauth_revoke_token - { - "token": "aaaaa" - } - - HTTP/1.1 200 OK - "Success" +POST /api/oauth_revoke_token +{ + "token": "aaaaa" +} + +HTTP/1.1 200 OK +"Success" ~~~ @@ -3958,26 +4181,27 @@ __Result:__ - *s2s_outgoing* :: integer __Tags:__ -[statistics](/developer/ejabberd-api/admin-tags/#statistics), [s2s](/developer/ejabberd-api/admin-tags/#s2s) +[statistics](admin-tags.md#statistics), [s2s](admin-tags.md#s2s) __Examples:__ ~~~ json - POST /api/outgoing_s2s_number - { - - } - - HTTP/1.1 200 OK - {"s2s_outgoing": 1} +POST /api/outgoing_s2s_number +{ + +} + +HTTP/1.1 200 OK +1 ~~~ -
added in 24.02
+ ## print_sql_schema + Print SQL schema for the given RDBMS (only ejabberdctl) @@ -3995,21 +4219,21 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[ejabberdctl](/developer/ejabberd-api/admin-tags/#ejabberdctl), [sql](/developer/ejabberd-api/admin-tags/#sql) +[ejabberdctl](admin-tags.md#ejabberdctl), [sql](admin-tags.md#sql) __Examples:__ ~~~ json - POST /api/print_sql_schema - { - "db_type": "pgsql", - "db_version": "16.1", - "new_schema": "true" - } - - HTTP/1.1 200 OK - "" +POST /api/print_sql_schema +{ + "db_type": "pgsql", + "db_version": "16.1", + "new_schema": "true" +} + +HTTP/1.1 200 OK +"" ~~~ @@ -4031,24 +4255,24 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[stanza](/developer/ejabberd-api/admin-tags/#stanza) +[stanza](admin-tags.md#stanza) __Module:__ -[mod_admin_extra](/admin/configuration/modules/#mod-admin-extra) +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) __Examples:__ ~~~ json - POST /api/privacy_set - { - "user": "user1", - "host": "myserver.com", - "xmlquery": "..." - } - - HTTP/1.1 200 OK - "" +POST /api/privacy_set +{ + "user": "user1", + "host": "myserver.com", + "xmlquery": "..." +} + +HTTP/1.1 200 OK +"" ~~~ @@ -4071,25 +4295,25 @@ __Result:__ - *res* :: string __Tags:__ -[private](/developer/ejabberd-api/admin-tags/#private) +[private](admin-tags.md#private) __Module:__ -[mod_admin_extra](/admin/configuration/modules/#mod-admin-extra) +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) __Examples:__ ~~~ json - POST /api/private_get - { - "user": "user1", - "host": "myserver.com", - "element": "storage", - "ns": "storage:rosternotes" - } - - HTTP/1.1 200 OK - {"res": "aaaaa"} +POST /api/private_get +{ + "user": "user1", + "host": "myserver.com", + "element": "storage", + "ns": "storage:rosternotes" +} + +HTTP/1.1 200 OK +"aaaaa" ~~~ @@ -4111,24 +4335,24 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[private](/developer/ejabberd-api/admin-tags/#private) +[private](admin-tags.md#private) __Module:__ -[mod_admin_extra](/admin/configuration/modules/#mod-admin-extra) +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) __Examples:__ ~~~ json - POST /api/private_set - { - "user": "user1", - "host": "myserver.com", - "element": "" - } - - HTTP/1.1 200 OK - "" +POST /api/private_set +{ + "user": "user1", + "host": "myserver.com", + "element": "" +} + +HTTP/1.1 200 OK +"" ~~~ @@ -4199,35 +4423,35 @@ __Result:__ - *response* :: [{user::string, contact::string}] __Tags:__ -[roster](/developer/ejabberd-api/admin-tags/#roster) +[roster](admin-tags.md#roster) __Module:__ -[mod_admin_extra](/admin/configuration/modules/#mod-admin-extra) +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) __Examples:__ ~~~ json - POST /api/process_rosteritems - { - "action": "aaaaa", - "subs": "bbbbb", - "asks": "ccccc", - "users": "ddddd", - "contacts": "eeeee" - } - - HTTP/1.1 200 OK - [ - { - "user": "aaaaa", - "contact": "bbbbb" - }, - { - "user": "ccccc", - "contact": "ddddd" - } - ] +POST /api/process_rosteritems +{ + "action": "aaaaa", + "subs": "bbbbb", + "asks": "ccccc", + "users": "ddddd", + "contacts": "eeeee" +} + +HTTP/1.1 200 OK +[ + { + "user": "aaaaa", + "contact": "bbbbb" + }, + { + "user": "ccccc", + "contact": "ddddd" + } +] ~~~ @@ -4248,23 +4472,23 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[roster](/developer/ejabberd-api/admin-tags/#roster) +[roster](admin-tags.md#roster) __Module:__ -[mod_admin_extra](/admin/configuration/modules/#mod-admin-extra) +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) __Examples:__ ~~~ json - POST /api/push_alltoall - { - "host": "myserver.com", - "group": "Everybody" - } - - HTTP/1.1 200 OK - "" +POST /api/push_alltoall +{ + "host": "myserver.com", + "group": "Everybody" +} + +HTTP/1.1 200 OK +"" ~~~ @@ -4294,24 +4518,24 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[roster](/developer/ejabberd-api/admin-tags/#roster) +[roster](admin-tags.md#roster) __Module:__ -[mod_admin_extra](/admin/configuration/modules/#mod-admin-extra) +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) __Examples:__ ~~~ json - POST /api/push_roster - { - "file": "/home/ejabberd/roster.txt", - "user": "user1", - "host": "localhost" - } - - HTTP/1.1 200 OK - "" +POST /api/push_roster +{ + "file": "/home/ejabberd/roster.txt", + "user": "user1", + "host": "localhost" +} + +HTTP/1.1 200 OK +"" ~~~ @@ -4336,22 +4560,22 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[roster](/developer/ejabberd-api/admin-tags/#roster) +[roster](admin-tags.md#roster) __Module:__ -[mod_admin_extra](/admin/configuration/modules/#mod-admin-extra) +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) __Examples:__ ~~~ json - POST /api/push_roster_all - { - "file": "/home/ejabberd/roster.txt" - } - - HTTP/1.1 200 OK - "" +POST /api/push_roster_all +{ + "file": "/home/ejabberd/roster.txt" +} + +HTTP/1.1 200 OK +"" ~~~ @@ -4373,21 +4597,21 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) +[accounts](admin-tags.md#accounts) __Examples:__ ~~~ json - POST /api/register - { - "user": "bob", - "host": "example.com", - "password": "SomEPass44" - } - - HTTP/1.1 200 OK - "Success" +POST /api/register +{ + "user": "bob", + "host": "example.com", + "password": "SomEPass44" +} + +HTTP/1.1 200 OK +"Success" ~~~ @@ -4407,22 +4631,22 @@ __Result:__ - *users* :: [username::string] : List of registered accounts usernames __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) +[accounts](admin-tags.md#accounts) __Examples:__ ~~~ json - POST /api/registered_users - { - "host": "example.com" - } - - HTTP/1.1 200 OK - [ - "user1", - "user2" - ] +POST /api/registered_users +{ + "host": "example.com" +} + +HTTP/1.1 200 OK +[ + "user1", + "user2" +] ~~~ @@ -4441,22 +4665,22 @@ __Result:__ - *vhosts* :: [vhost::string] : List of available vhosts __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](admin-tags.md#server) __Examples:__ ~~~ json - POST /api/registered_vhosts - { - - } - - HTTP/1.1 200 OK - [ - "example.com", - "anon.example.com" - ] +POST /api/registered_vhosts +{ + +} + +HTTP/1.1 200 OK +[ + "example.com", + "anon.example.com" +] ~~~ @@ -4475,19 +4699,19 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[config](/developer/ejabberd-api/admin-tags/#config) +[config](admin-tags.md#config) __Examples:__ ~~~ json - POST /api/reload_config - { - - } - - HTTP/1.1 200 OK - "" +POST /api/reload_config +{ + +} + +HTTP/1.1 200 OK +"" ~~~ @@ -4508,23 +4732,23 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mam](/developer/ejabberd-api/admin-tags/#mam) +[mam](admin-tags.md#mam) __Module:__ -[mod_mam](/admin/configuration/modules/#mod-mam) +[mod_mam](../../admin/configuration/modules.md#mod_mam) __Examples:__ ~~~ json - POST /api/remove_mam_for_user - { - "user": "bob", - "host": "example.com" - } - - HTTP/1.1 200 OK - "MAM archive removed" +POST /api/remove_mam_for_user +{ + "user": "bob", + "host": "example.com" +} + +HTTP/1.1 200 OK +"MAM archive removed" ~~~ @@ -4546,24 +4770,24 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mam](/developer/ejabberd-api/admin-tags/#mam) +[mam](admin-tags.md#mam) __Module:__ -[mod_mam](/admin/configuration/modules/#mod-mam) +[mod_mam](../../admin/configuration/modules.md#mod_mam) __Examples:__ ~~~ json - POST /api/remove_mam_for_user_with_peer - { - "user": "bob", - "host": "example.com", - "with": "anne@example.com" - } - - HTTP/1.1 200 OK - "MAM archive removed" +POST /api/remove_mam_for_user_with_peer +{ + "user": "bob", + "host": "example.com", + "with": "anne@example.com" +} + +HTTP/1.1 200 OK +"MAM archive removed" ~~~ @@ -4576,7 +4800,7 @@ Reopen maybe the log files after being renamed Has no effect on ejabberd main log files, only on log files generated by some modules. -This can be useful when an external tool is used for log rotation. See [Log Files](https://docs.ejabberd.im/admin/guide/troubleshooting/#log-files). +This can be useful when an external tool is used for log rotation. See [Log Files](../../admin/guide/troubleshooting.md#log-files). __Arguments:__ @@ -4586,19 +4810,19 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[logs](/developer/ejabberd-api/admin-tags/#logs) +[logs](admin-tags.md#logs) __Examples:__ ~~~ json - POST /api/reopen_log - { - - } - - HTTP/1.1 200 OK - "" +POST /api/reopen_log +{ + +} + +HTTP/1.1 200 OK +"" ~~~ @@ -4621,19 +4845,19 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[acme](/developer/ejabberd-api/admin-tags/#acme) +[acme](admin-tags.md#acme) __Examples:__ ~~~ json - POST /api/request_certificate - { - "domains": "example.com,domain.tld,conference.domain.tld" - } - - HTTP/1.1 200 OK - "Success" +POST /api/request_certificate +{ + "domains": "example.com,domain.tld,conference.domain.tld" +} + +HTTP/1.1 200 OK +"Success" ~~~ @@ -4655,24 +4879,24 @@ __Result:__ - *resource* :: string : Name of user resource __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](admin-tags.md#session) __Module:__ -[mod_admin_extra](/admin/configuration/modules/#mod-admin-extra) +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) __Examples:__ ~~~ json - POST /api/resource_num - { - "user": "peter", - "host": "myserver.com", - "num": 2 - } - - HTTP/1.1 200 OK - {"resource": "Psi"} +POST /api/resource_num +{ + "user": "peter", + "host": "myserver.com", + "num": 2 +} + +HTTP/1.1 200 OK +"Psi" ~~~ @@ -4691,19 +4915,19 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](admin-tags.md#server) __Examples:__ ~~~ json - POST /api/restart - { - - } - - HTTP/1.1 200 OK - "" +POST /api/restart +{ + +} + +HTTP/1.1 200 OK +"" ~~~ @@ -4727,23 +4951,23 @@ __Result:__ - `2`: code not reloaded, but module restarted __Tags:__ -[erlang](/developer/ejabberd-api/admin-tags/#erlang) +[erlang](admin-tags.md#erlang) __Module:__ -[mod_admin_extra](/admin/configuration/modules/#mod-admin-extra) +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) __Examples:__ ~~~ json - POST /api/restart_module - { - "host": "myserver.com", - "module": "mod_admin_extra" - } - - HTTP/1.1 200 OK - {"res": 0} +POST /api/restart_module +{ + "host": "myserver.com", + "module": "mod_admin_extra" +} + +HTTP/1.1 200 OK +0 ~~~ @@ -4755,7 +4979,7 @@ __Examples:__ Restore the Mnesia database from a binary backup file -This restores immediately from a binary backup file the internal Mnesia database. This will consume a lot of memory if you have a large database, you may prefer [install_fallback](/developer/ejabberd-api/admin-api/#install-fallback). +This restores immediately from a binary backup file the internal Mnesia database. This will consume a lot of memory if you have a large database, you may prefer [install_fallback](#install_fallback) API. __Arguments:__ @@ -4766,19 +4990,19 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[mnesia](/developer/ejabberd-api/admin-tags/#mnesia) +[mnesia](admin-tags.md#mnesia) __Examples:__ ~~~ json - POST /api/restore - { - "file": "/var/lib/ejabberd/database.backup" - } - - HTTP/1.1 200 OK - "Success" +POST /api/restore +{ + "file": "/var/lib/ejabberd/database.backup" +} + +HTTP/1.1 200 OK +"Success" ~~~ @@ -4798,26 +5022,27 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[acme](/developer/ejabberd-api/admin-tags/#acme) +[acme](admin-tags.md#acme) __Examples:__ ~~~ json - POST /api/revoke_certificate - { - "file": "aaaaa" - } - - HTTP/1.1 200 OK - "Success" +POST /api/revoke_certificate +{ + "file": "aaaaa" +} + +HTTP/1.1 200 OK +"Success" ~~~ -## rooms_empty_destroy +## rooms_empty_destroy 🟤 + Destroy the rooms that have no messages in archive @@ -4830,28 +5055,25 @@ __Arguments:__ __Result:__ -- *rooms* :: [room::string] : List of empty rooms that have been destroyed +- *res* :: string : Raw result string __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](admin-tags.md#muc), [v2](admin-tags.md#v2) __Module:__ -[mod_muc_admin](/admin/configuration/modules/#mod-muc-admin) +[mod_muc_admin](../../admin/configuration/modules.md#mod_muc_admin) __Examples:__ ~~~ json - POST /api/rooms_empty_destroy - { - "service": "muc.example.com" - } - - HTTP/1.1 200 OK - [ - "room1@muc.example.com", - "room2@muc.example.com" - ] +POST /api/rooms_empty_destroy +{ + "service": "conference.example.com" +} + +HTTP/1.1 200 OK +"Destroyed rooms: 2" ~~~ @@ -4874,25 +5096,25 @@ __Result:__ - *rooms* :: [room::string] : List of empty rooms __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](admin-tags.md#muc) __Module:__ -[mod_muc_admin](/admin/configuration/modules/#mod-muc-admin) +[mod_muc_admin](../../admin/configuration/modules.md#mod_muc_admin) __Examples:__ ~~~ json - POST /api/rooms_empty_list - { - "service": "muc.example.com" - } - - HTTP/1.1 200 OK - [ - "room1@muc.example.com", - "room2@muc.example.com" - ] +POST /api/rooms_empty_list +{ + "service": "conference.example.com" +} + +HTTP/1.1 200 OK +[ + "room1@conference.example.com", + "room2@conference.example.com" +] ~~~ @@ -4916,26 +5138,26 @@ __Result:__ - *rooms* :: [room::string] : List of unused rooms that has been destroyed __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](admin-tags.md#muc) __Module:__ -[mod_muc_admin](/admin/configuration/modules/#mod-muc-admin) +[mod_muc_admin](../../admin/configuration/modules.md#mod_muc_admin) __Examples:__ ~~~ json - POST /api/rooms_unused_destroy - { - "service": "muc.example.com", - "days": 31 - } - - HTTP/1.1 200 OK - [ - "room1@muc.example.com", - "room2@muc.example.com" - ] +POST /api/rooms_unused_destroy +{ + "service": "conference.example.com", + "days": 31 +} + +HTTP/1.1 200 OK +[ + "room1@conference.example.com", + "room2@conference.example.com" +] ~~~ @@ -4959,26 +5181,26 @@ __Result:__ - *rooms* :: [room::string] : List of unused rooms __Tags:__ -[muc](/developer/ejabberd-api/admin-tags/#muc) +[muc](admin-tags.md#muc) __Module:__ -[mod_muc_admin](/admin/configuration/modules/#mod-muc-admin) +[mod_muc_admin](../../admin/configuration/modules.md#mod_muc_admin) __Examples:__ ~~~ json - POST /api/rooms_unused_list - { - "service": "muc.example.com", - "days": 31 - } - - HTTP/1.1 200 OK - [ - "room1@muc.example.com", - "room2@muc.example.com" - ] +POST /api/rooms_unused_list +{ + "service": "conference.example.com", + "days": 31 +} + +HTTP/1.1 200 OK +[ + "room1@conference.example.com", + "room2@conference.example.com" +] ~~~ @@ -5000,31 +5222,32 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[logs](/developer/ejabberd-api/admin-tags/#logs) +[logs](admin-tags.md#logs) __Examples:__ ~~~ json - POST /api/rotate_log - { - - } - - HTTP/1.1 200 OK - "" +POST /api/rotate_log +{ + +} + +HTTP/1.1 200 OK +"" ~~~ -
updated in 24.02
+ ## send_direct_invitation + Send a direct invitation to several destinations -Since ejabberd 20.12, this command is asynchronous: the API call may return before the server has send all the invitations. +Since ejabberd [20.12](../../archive/20.12/index.md), this command is asynchronous: the API call may return before the server has send all the invitations. `password` and `message` can be set to `none`. @@ -5041,29 +5264,29 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room), [v1](/developer/ejabberd-api/admin-tags/#v1) +[muc_room](admin-tags.md#muc_room), [v1](admin-tags.md#v1) __Module:__ -[mod_muc_admin](/admin/configuration/modules/#mod-muc-admin) +[mod_muc_admin](../../admin/configuration/modules.md#mod_muc_admin) __Examples:__ ~~~ json - POST /api/send_direct_invitation - { - "name": "room1", - "service": "muc.example.com", - "password": "", - "reason": "Check this out!", - "users": [ - "user2@localhost", - "user3@example.com" - ] - } - - HTTP/1.1 200 OK - "" +POST /api/send_direct_invitation +{ + "name": "room1", + "service": "conference.example.com", + "password": "", + "reason": "Check this out!", + "users": [ + "user2@localhost", + "user3@example.com" + ] +} + +HTTP/1.1 200 OK +"" ~~~ @@ -5090,26 +5313,26 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[stanza](/developer/ejabberd-api/admin-tags/#stanza) +[stanza](admin-tags.md#stanza) __Module:__ -[mod_admin_extra](/admin/configuration/modules/#mod-admin-extra) +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) __Examples:__ ~~~ json - POST /api/send_message - { - "type": "headline", - "from": "admin@localhost", - "to": "user1@localhost", - "subject": "Restart", - "body": "In 5 minutes" - } - - HTTP/1.1 200 OK - "" +POST /api/send_message +{ + "type": "headline", + "from": "admin@localhost", + "to": "user1@localhost", + "subject": "Restart", + "body": "In 5 minutes" +} + +HTTP/1.1 200 OK +"" ~~~ @@ -5131,24 +5354,24 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[stanza](/developer/ejabberd-api/admin-tags/#stanza) +[stanza](admin-tags.md#stanza) __Module:__ -[mod_admin_extra](/admin/configuration/modules/#mod-admin-extra) +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) __Examples:__ ~~~ json - POST /api/send_stanza - { - "from": "admin@localhost", - "to": "user1@localhost", - "stanza": "" - } - - HTTP/1.1 200 OK - "" +POST /api/send_stanza +{ + "from": "admin@localhost", + "to": "user1@localhost", + "stanza": "" +} + +HTTP/1.1 200 OK +"" ~~~ @@ -5160,7 +5383,7 @@ __Examples:__ Send a stanza from an existing C2S session -`user`@`host`/`resource` must be an existing C2S session. As an alternative, use [send_stanza](/developer/ejabberd-api/admin-api/#send-stanza) instead. +`user`@`host`/`resource` must be an existing C2S session. As an alternative, use [send_stanza](#send_stanza) API instead. __Arguments:__ @@ -5174,25 +5397,25 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[stanza](/developer/ejabberd-api/admin-tags/#stanza) +[stanza](admin-tags.md#stanza) __Module:__ -[mod_admin_extra](/admin/configuration/modules/#mod-admin-extra) +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) __Examples:__ ~~~ json - POST /api/send_stanza_c2s - { - "user": "admin", - "host": "myserver.com", - "resource": "bot", - "stanza": "" - } - - HTTP/1.1 200 OK - "" +POST /api/send_stanza_c2s +{ + "user": "admin", + "host": "myserver.com", + "resource": "bot", + "stanza": "" +} + +HTTP/1.1 200 OK +"" ~~~ @@ -5218,25 +5441,25 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[last](/developer/ejabberd-api/admin-tags/#last) +[last](admin-tags.md#last) __Module:__ -[mod_admin_extra](/admin/configuration/modules/#mod-admin-extra) +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) __Examples:__ ~~~ json - POST /api/set_last - { - "user": "user1", - "host": "myserver.com", - "timestamp": 1500045311, - "status": "GoSleeping" - } - - HTTP/1.1 200 OK - "" +POST /api/set_last +{ + "user": "user1", + "host": "myserver.com", + "timestamp": 1500045311, + "status": "GoSleeping" +} + +HTTP/1.1 200 OK +"" ~~~ @@ -5260,19 +5483,19 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[logs](/developer/ejabberd-api/admin-tags/#logs) +[logs](admin-tags.md#logs) __Examples:__ ~~~ json - POST /api/set_loglevel - { - "loglevel": "debug" - } - - HTTP/1.1 200 OK - "" +POST /api/set_loglevel +{ + "loglevel": "debug" +} + +HTTP/1.1 200 OK +"" ~~~ @@ -5295,19 +5518,19 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[cluster](/developer/ejabberd-api/admin-tags/#cluster) +[cluster](admin-tags.md#cluster) __Examples:__ ~~~ json - POST /api/set_master - { - "nodename": "ejabberd@machine7" - } - - HTTP/1.1 200 OK - "Success" +POST /api/set_master +{ + "nodename": "ejabberd@machine7" +} + +HTTP/1.1 200 OK +"Success" ~~~ @@ -5329,31 +5552,32 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[vcard](/developer/ejabberd-api/admin-tags/#vcard) +[vcard](admin-tags.md#vcard) __Module:__ -[mod_admin_extra](/admin/configuration/modules/#mod-admin-extra) +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) __Examples:__ ~~~ json - POST /api/set_nickname - { - "user": "user1", - "host": "myserver.com", - "nickname": "User 1" - } - - HTTP/1.1 200 OK - "" +POST /api/set_nickname +{ + "user": "user1", + "host": "myserver.com", + "nickname": "User 1" +} + +HTTP/1.1 200 OK +"" ~~~ -
updated in 24.02
+ ## set_presence + Set presence of a session @@ -5372,28 +5596,28 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session), [v1](/developer/ejabberd-api/admin-tags/#v1) +[session](admin-tags.md#session), [v1](admin-tags.md#v1) __Module:__ -[mod_admin_extra](/admin/configuration/modules/#mod-admin-extra) +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) __Examples:__ ~~~ json - POST /api/set_presence - { - "user": "user1", - "host": "myserver.com", - "resource": "tka1", - "type": "available", - "show": "away", - "status": "BB", - "priority": 7 - } - - HTTP/1.1 200 OK - "" +POST /api/set_presence +{ + "user": "user1", + "host": "myserver.com", + "resource": "tka1", + "type": "available", + "show": "away", + "status": "BB", + "priority": 7 +} + +HTTP/1.1 200 OK +"" ~~~ @@ -5416,25 +5640,25 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room) +[muc_room](admin-tags.md#muc_room) __Module:__ -[mod_muc_admin](/admin/configuration/modules/#mod-muc-admin) +[mod_muc_admin](../../admin/configuration/modules.md#mod_muc_admin) __Examples:__ ~~~ json - POST /api/set_room_affiliation - { - "name": "room1", - "service": "muc.example.com", - "jid": "user2@example.com", - "affiliation": "member" - } - - HTTP/1.1 200 OK - "" +POST /api/set_room_affiliation +{ + "name": "room1", + "service": "conference.example.com", + "jid": "user2@example.com", + "affiliation": "member" +} + +HTTP/1.1 200 OK +"" ~~~ @@ -5468,25 +5692,25 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[vcard](/developer/ejabberd-api/admin-tags/#vcard) +[vcard](admin-tags.md#vcard) __Module:__ -[mod_admin_extra](/admin/configuration/modules/#mod-admin-extra) +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) __Examples:__ ~~~ json - POST /api/set_vcard - { - "user": "user1", - "host": "myserver.com", - "name": "URL", - "content": "www.example.com" - } - - HTTP/1.1 200 OK - "" +POST /api/set_vcard +{ + "user": "user1", + "host": "myserver.com", + "name": "URL", + "content": "www.example.com" +} + +HTTP/1.1 200 OK +"" ~~~ @@ -5528,26 +5752,26 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[vcard](/developer/ejabberd-api/admin-tags/#vcard) +[vcard](admin-tags.md#vcard) __Module:__ -[mod_admin_extra](/admin/configuration/modules/#mod-admin-extra) +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) __Examples:__ ~~~ json - POST /api/set_vcard2 - { - "user": "user1", - "host": "myserver.com", - "name": "TEL", - "subname": "NUMBER", - "content": "123456" - } - - HTTP/1.1 200 OK - "" +POST /api/set_vcard2 +{ + "user": "user1", + "host": "myserver.com", + "name": "TEL", + "subname": "NUMBER", + "content": "123456" +} + +HTTP/1.1 200 OK +"" ~~~ @@ -5589,36 +5813,115 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[vcard](/developer/ejabberd-api/admin-tags/#vcard) +[vcard](admin-tags.md#vcard) __Module:__ -[mod_admin_extra](/admin/configuration/modules/#mod-admin-extra) +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) __Examples:__ ~~~ json - POST /api/set_vcard2_multi - { - "user": "aaaaa", - "host": "bbbbb", - "name": "ccccc", - "subname": "ddddd", - "contents": [ - "eeeee", - "fffff" - ] - } - - HTTP/1.1 200 OK - "" +POST /api/set_vcard2_multi +{ + "user": "aaaaa", + "host": "bbbbb", + "name": "ccccc", + "subname": "ddddd", + "contents": [ + "eeeee", + "fffff" + ] +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## srg_add 🟤 + + + +Add/Create a Shared Roster Group (without details) + +__Arguments:__ + +- *group* :: string : Group identifier +- *host* :: string : Group server name + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[shared_roster_group](admin-tags.md#shared_roster_group) + +__Module:__ +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/srg_add +{ + "group": "group3", + "host": "myserver.com" +} + +HTTP/1.1 200 OK +"" ~~~ -
updated in 24.02
+ + +## srg_add_displayed 🟤 + + + +Add a group to displayed_groups of a Shared Roster Group + +__Arguments:__ + +- *group* :: string : Group identifier +- *host* :: string : Group server name +- *add* :: string : Group to add to displayed_groups + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[shared_roster_group](admin-tags.md#shared_roster_group) + +__Module:__ +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/srg_add_displayed +{ + "group": "group3", + "host": "myserver.com", + "add": "group1" +} + +HTTP/1.1 200 OK +"" +~~~ + + + ## srg_create + Create a Shared Roster Group @@ -5635,29 +5938,69 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[shared_roster_group](/developer/ejabberd-api/admin-tags/#shared-roster-group), [v1](/developer/ejabberd-api/admin-tags/#v1) +[shared_roster_group](admin-tags.md#shared_roster_group), [v1](admin-tags.md#v1) __Module:__ -[mod_admin_extra](/admin/configuration/modules/#mod-admin-extra) +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) __Examples:__ ~~~ json - POST /api/srg_create - { - "group": "group3", - "host": "myserver.com", - "label": "Group3", - "description": "Third group", - "display": [ - "group1", - "group2" - ] - } - - HTTP/1.1 200 OK - "" +POST /api/srg_create +{ + "group": "group3", + "host": "myserver.com", + "label": "Group3", + "description": "Third group", + "display": [ + "group1", + "group2" + ] +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## srg_del_displayed 🟤 + + + +Delete a group from displayed_groups of a Shared Roster Group + +__Arguments:__ + +- *group* :: string : Group identifier +- *host* :: string : Group server name +- *del* :: string : Group to delete from displayed_groups + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[shared_roster_group](admin-tags.md#shared_roster_group) + +__Module:__ +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/srg_del_displayed +{ + "group": "group3", + "host": "myserver.com", + "del": "group1" +} + +HTTP/1.1 200 OK +"" ~~~ @@ -5678,23 +6021,64 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[shared_roster_group](/developer/ejabberd-api/admin-tags/#shared-roster-group) +[shared_roster_group](admin-tags.md#shared_roster_group) __Module:__ -[mod_admin_extra](/admin/configuration/modules/#mod-admin-extra) +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) __Examples:__ ~~~ json - POST /api/srg_delete - { - "group": "group3", - "host": "myserver.com" - } - - HTTP/1.1 200 OK - "" +POST /api/srg_delete +{ + "group": "group3", + "host": "myserver.com" +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## srg_get_displayed 🟤 + + + +Get displayed groups of a Shared Roster Group + +__Arguments:__ + +- *group* :: string : Group identifier +- *host* :: string : Group server name + +__Result:__ + +- *display* :: [group::string] : List of groups to display + +__Tags:__ +[shared_roster_group](admin-tags.md#shared_roster_group) + +__Module:__ +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/srg_get_displayed +{ + "group": "group3", + "host": "myserver.com" +} + +HTTP/1.1 200 OK +[ + "group1", + "group2" +] ~~~ @@ -5715,32 +6099,32 @@ __Result:__ - *informations* :: [{key::string, value::string}] : List of group information, as key and value __Tags:__ -[shared_roster_group](/developer/ejabberd-api/admin-tags/#shared-roster-group) +[shared_roster_group](admin-tags.md#shared_roster_group) __Module:__ -[mod_admin_extra](/admin/configuration/modules/#mod-admin-extra) +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) __Examples:__ ~~~ json - POST /api/srg_get_info - { - "group": "group3", - "host": "myserver.com" - } - - HTTP/1.1 200 OK - [ - { - "key": "name", - "value": "Group 3" - }, - { - "key": "displayed_groups", - "value": "group1" - } - ] +POST /api/srg_get_info +{ + "group": "group3", + "host": "myserver.com" +} + +HTTP/1.1 200 OK +[ + { + "key": "name", + "value": "Group 3" + }, + { + "key": "displayed_groups", + "value": "group1" + } +] ~~~ @@ -5761,26 +6145,26 @@ __Result:__ - *members* :: [member::string] : List of group identifiers __Tags:__ -[shared_roster_group](/developer/ejabberd-api/admin-tags/#shared-roster-group) +[shared_roster_group](admin-tags.md#shared_roster_group) __Module:__ -[mod_admin_extra](/admin/configuration/modules/#mod-admin-extra) +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) __Examples:__ ~~~ json - POST /api/srg_get_members - { - "group": "group3", - "host": "myserver.com" - } - - HTTP/1.1 200 OK - [ - "user1@localhost", - "user2@localhost" - ] +POST /api/srg_get_members +{ + "group": "group3", + "host": "myserver.com" +} + +HTTP/1.1 200 OK +[ + "user1@localhost", + "user2@localhost" +] ~~~ @@ -5800,25 +6184,67 @@ __Result:__ - *groups* :: [id::string] : List of group identifiers __Tags:__ -[shared_roster_group](/developer/ejabberd-api/admin-tags/#shared-roster-group) +[shared_roster_group](admin-tags.md#shared_roster_group) __Module:__ -[mod_admin_extra](/admin/configuration/modules/#mod-admin-extra) +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) __Examples:__ ~~~ json - POST /api/srg_list - { - "host": "myserver.com" - } - - HTTP/1.1 200 OK - [ - "group1", - "group2" - ] +POST /api/srg_list +{ + "host": "myserver.com" +} + +HTTP/1.1 200 OK +[ + "group1", + "group2" +] +~~~ + + + + +## srg_set_info 🟤 + + + +Set info of a Shared Roster Group + +__Arguments:__ + +- *group* :: string : Group identifier +- *host* :: string : Group server name +- *key* :: string : Information key: label, description +- *value* :: string : Information value + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[shared_roster_group](admin-tags.md#shared_roster_group) + +__Module:__ +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/srg_set_info +{ + "group": "group3", + "host": "myserver.com", + "key": "label", + "value": "Family" +} + +HTTP/1.1 200 OK +"" ~~~ @@ -5841,25 +6267,25 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[shared_roster_group](/developer/ejabberd-api/admin-tags/#shared-roster-group) +[shared_roster_group](admin-tags.md#shared_roster_group) __Module:__ -[mod_admin_extra](/admin/configuration/modules/#mod-admin-extra) +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) __Examples:__ ~~~ json - POST /api/srg_user_add - { - "user": "user1", - "host": "myserver.com", - "group": "group3", - "grouphost": "myserver.com" - } - - HTTP/1.1 200 OK - "" +POST /api/srg_user_add +{ + "user": "user1", + "host": "myserver.com", + "group": "group3", + "grouphost": "myserver.com" +} + +HTTP/1.1 200 OK +"" ~~~ @@ -5882,25 +6308,25 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[shared_roster_group](/developer/ejabberd-api/admin-tags/#shared-roster-group) +[shared_roster_group](admin-tags.md#shared_roster_group) __Module:__ -[mod_admin_extra](/admin/configuration/modules/#mod-admin-extra) +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) __Examples:__ ~~~ json - POST /api/srg_user_del - { - "user": "user1", - "host": "myserver.com", - "group": "group3", - "grouphost": "myserver.com" - } - - HTTP/1.1 200 OK - "" +POST /api/srg_user_del +{ + "user": "user1", + "host": "myserver.com", + "group": "group3", + "grouphost": "myserver.com" +} + +HTTP/1.1 200 OK +"" ~~~ @@ -5923,22 +6349,22 @@ __Result:__ - *stat* :: integer : Integer statistic value __Tags:__ -[statistics](/developer/ejabberd-api/admin-tags/#statistics) +[statistics](admin-tags.md#statistics) __Module:__ -[mod_admin_extra](/admin/configuration/modules/#mod-admin-extra) +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) __Examples:__ ~~~ json - POST /api/stats - { - "name": "registeredusers" - } - - HTTP/1.1 200 OK - {"stat": 6} +POST /api/stats +{ + "name": "registeredusers" +} + +HTTP/1.1 200 OK +6 ~~~ @@ -5962,23 +6388,23 @@ __Result:__ - *stat* :: integer : Integer statistic value __Tags:__ -[statistics](/developer/ejabberd-api/admin-tags/#statistics) +[statistics](admin-tags.md#statistics) __Module:__ -[mod_admin_extra](/admin/configuration/modules/#mod-admin-extra) +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) __Examples:__ ~~~ json - POST /api/stats_host - { - "name": "registeredusers", - "host": "example.com" - } - - HTTP/1.1 200 OK - {"stat": 6} +POST /api/stats_host +{ + "name": "registeredusers", + "host": "example.com" +} + +HTTP/1.1 200 OK +6 ~~~ @@ -5997,19 +6423,19 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](admin-tags.md#server) __Examples:__ ~~~ json - POST /api/status - { - - } - - HTTP/1.1 200 OK - "The node ejabberd@localhost is started with status: startedejabberd X.X is running in that node" +POST /api/status +{ + +} + +HTTP/1.1 200 OK +"The node ejabberd@localhost is started with status: startedejabberd X.X is running in that node" ~~~ @@ -6029,30 +6455,30 @@ __Result:__ - *users* :: [{user::string, host::string, resource::string, priority::integer, status::string}] __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](admin-tags.md#session) __Module:__ -[mod_admin_extra](/admin/configuration/modules/#mod-admin-extra) +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) __Examples:__ ~~~ json - POST /api/status_list - { - "status": "dnd" - } - - HTTP/1.1 200 OK - [ - { - "user": "peter", - "host": "myserver.com", - "resource": "tka", - "priority": 6, - "status": "Busy" - } - ] +POST /api/status_list +{ + "status": "dnd" +} + +HTTP/1.1 200 OK +[ + { + "user": "peter", + "host": "myserver.com", + "resource": "tka", + "priority": 6, + "status": "Busy" + } +] ~~~ @@ -6073,31 +6499,31 @@ __Result:__ - *users* :: [{user::string, host::string, resource::string, priority::integer, status::string}] __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](admin-tags.md#session) __Module:__ -[mod_admin_extra](/admin/configuration/modules/#mod-admin-extra) +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) __Examples:__ ~~~ json - POST /api/status_list_host - { - "host": "myserver.com", - "status": "dnd" - } - - HTTP/1.1 200 OK - [ - { - "user": "peter", - "host": "myserver.com", - "resource": "tka", - "priority": 6, - "status": "Busy" - } - ] +POST /api/status_list_host +{ + "host": "myserver.com", + "status": "dnd" +} + +HTTP/1.1 200 OK +[ + { + "user": "peter", + "host": "myserver.com", + "resource": "tka", + "priority": 6, + "status": "Busy" + } +] ~~~ @@ -6117,22 +6543,22 @@ __Result:__ - *users* :: integer : Number of connected sessions with given status type __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session), [statistics](/developer/ejabberd-api/admin-tags/#statistics) +[session](admin-tags.md#session), [statistics](admin-tags.md#statistics) __Module:__ -[mod_admin_extra](/admin/configuration/modules/#mod-admin-extra) +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) __Examples:__ ~~~ json - POST /api/status_num - { - "status": "dnd" - } - - HTTP/1.1 200 OK - {"users": 23} +POST /api/status_num +{ + "status": "dnd" +} + +HTTP/1.1 200 OK +23 ~~~ @@ -6153,23 +6579,23 @@ __Result:__ - *users* :: integer : Number of connected sessions with given status type __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session), [statistics](/developer/ejabberd-api/admin-tags/#statistics) +[session](admin-tags.md#session), [statistics](admin-tags.md#statistics) __Module:__ -[mod_admin_extra](/admin/configuration/modules/#mod-admin-extra) +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) __Examples:__ ~~~ json - POST /api/status_num_host - { - "host": "myserver.com", - "status": "dnd" - } - - HTTP/1.1 200 OK - {"users": 23} +POST /api/status_num_host +{ + "host": "myserver.com", + "status": "dnd" +} + +HTTP/1.1 200 OK +23 ~~~ @@ -6188,19 +6614,19 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](admin-tags.md#server) __Examples:__ ~~~ json - POST /api/stop - { - - } - - HTTP/1.1 200 OK - "" +POST /api/stop +{ + +} + +HTTP/1.1 200 OK +"" ~~~ @@ -6225,20 +6651,20 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](admin-tags.md#server) __Examples:__ ~~~ json - POST /api/stop_kindly - { - "delay": 60, - "announcement": "Server will stop now." - } - - HTTP/1.1 200 OK - "" +POST /api/stop_kindly +{ + "delay": 60, + "announcement": "Server will stop now." +} + +HTTP/1.1 200 OK +"" ~~~ @@ -6257,26 +6683,27 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[s2s](/developer/ejabberd-api/admin-tags/#s2s) +[s2s](admin-tags.md#s2s) __Examples:__ ~~~ json - POST /api/stop_s2s_connections - { - - } - - HTTP/1.1 200 OK - "" +POST /api/stop_s2s_connections +{ + +} + +HTTP/1.1 200 OK +"" ~~~ -
updated in 24.02
+ ## subscribe_room + Subscribe to a MUC conference @@ -6292,43 +6719,44 @@ __Result:__ - *nodes* :: [node::string] : The list of nodes that has subscribed __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room), [muc_sub](/developer/ejabberd-api/admin-tags/#muc-sub), [v1](/developer/ejabberd-api/admin-tags/#v1) +[muc_room](admin-tags.md#muc_room), [muc_sub](admin-tags.md#muc_sub), [v1](admin-tags.md#v1) __Module:__ -[mod_muc_admin](/admin/configuration/modules/#mod-muc-admin) +[mod_muc_admin](../../admin/configuration/modules.md#mod_muc_admin) __Examples:__ ~~~ json - POST /api/subscribe_room - { - "user": "tom@localhost", - "nick": "Tom", - "room": "room1@conference.localhost", - "nodes": [ - "urn:xmpp:mucsub:nodes:messages", - "urn:xmpp:mucsub:nodes:affiliations" - ] - } - - HTTP/1.1 200 OK - [ - "urn:xmpp:mucsub:nodes:messages", - "urn:xmpp:mucsub:nodes:affiliations" - ] +POST /api/subscribe_room +{ + "user": "tom@localhost", + "nick": "Tom", + "room": "room1@conference.localhost", + "nodes": [ + "urn:xmpp:mucsub:nodes:messages", + "urn:xmpp:mucsub:nodes:affiliations" + ] +} + +HTTP/1.1 200 OK +[ + "urn:xmpp:mucsub:nodes:messages", + "urn:xmpp:mucsub:nodes:affiliations" +] ~~~ -
updated in 24.02
+ ## subscribe_room_many + Subscribe several users to a MUC conference -This command accepts up to 50 users at once (this is configurable with the [mod_muc_admin](/admin/configuration/modules/#mod-muc-admin) option `subscribe_room_many_max_users`) +This command accepts up to 50 users at once (this is configurable with the [mod_muc_admin](../../admin/configuration/modules.md#mod_muc_admin) option `subscribe_room_many_max_users`) __Arguments:__ @@ -6341,36 +6769,77 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room), [muc_sub](/developer/ejabberd-api/admin-tags/#muc-sub), [v1](/developer/ejabberd-api/admin-tags/#v1) +[muc_room](admin-tags.md#muc_room), [muc_sub](admin-tags.md#muc_sub), [v1](admin-tags.md#v1) __Module:__ -[mod_muc_admin](/admin/configuration/modules/#mod-muc-admin) +[mod_muc_admin](../../admin/configuration/modules.md#mod_muc_admin) __Examples:__ ~~~ json - POST /api/subscribe_room_many +POST /api/subscribe_room_many +{ + "users": [ + { + "jid": "tom@localhost", + "nick": "Tom" + }, { - "users": [ - { - "jid": "tom@localhost", - "nick": "Tom" - }, - { - "jid": "jerry@localhost", - "nick": "Jerry" - } - ], - "room": "room1@conference.localhost", - "nodes": [ - "urn:xmpp:mucsub:nodes:messages", - "urn:xmpp:mucsub:nodes:affiliations" - ] + "jid": "jerry@localhost", + "nick": "Jerry" } - - HTTP/1.1 200 OK - "" + ], + "room": "room1@conference.localhost", + "nodes": [ + "urn:xmpp:mucsub:nodes:messages", + "urn:xmpp:mucsub:nodes:affiliations" + ] +} + +HTTP/1.1 200 OK +"" +~~~ + + + + +## unban_account 🟤 + + + +Revert the ban from an account: set back the old password + + +Check [ban_account](#ban_account) API. + +__Arguments:__ + +- *user* :: string : User name to unban +- *host* :: string : Server name + +__Result:__ + +- *res* :: integer : Status code (`0` on success, `1` otherwise) + +__Tags:__ +[accounts](admin-tags.md#accounts), [v2](admin-tags.md#v2) + +__Module:__ +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) + +__Examples:__ + + +~~~ json +POST /api/unban_account +{ + "user": "gooduser", + "host": "myserver.com" +} + +HTTP/1.1 200 OK +"" ~~~ @@ -6393,22 +6862,22 @@ __Result:__ - *unbanned* :: integer : Amount of unbanned entries, or negative in case of error. __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) +[accounts](admin-tags.md#accounts) __Module:__ -[mod_fail2ban](/admin/configuration/modules/#mod-fail2ban) +[mod_fail2ban](../../admin/configuration/modules.md#mod_fail2ban) __Examples:__ ~~~ json - POST /api/unban_ip - { - "address": "::FFFF:127.0.0.1/128" - } - - HTTP/1.1 200 OK - {"unbanned": 3} +POST /api/unban_ip +{ + "address": "::FFFF:127.0.0.1/128" +} + +HTTP/1.1 200 OK +3 ~~~ @@ -6432,20 +6901,20 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[accounts](/developer/ejabberd-api/admin-tags/#accounts) +[accounts](admin-tags.md#accounts) __Examples:__ ~~~ json - POST /api/unregister - { - "user": "bob", - "host": "example.com" - } - - HTTP/1.1 200 OK - "Success" +POST /api/unregister +{ + "user": "bob", + "host": "example.com" +} + +HTTP/1.1 200 OK +"Success" ~~~ @@ -6466,23 +6935,23 @@ __Result:__ - *res* :: integer : Status code (`0` on success, `1` otherwise) __Tags:__ -[muc_room](/developer/ejabberd-api/admin-tags/#muc-room), [muc_sub](/developer/ejabberd-api/admin-tags/#muc-sub) +[muc_room](admin-tags.md#muc_room), [muc_sub](admin-tags.md#muc_sub) __Module:__ -[mod_muc_admin](/admin/configuration/modules/#mod-muc-admin) +[mod_muc_admin](../../admin/configuration/modules.md#mod_muc_admin) __Examples:__ ~~~ json - POST /api/unsubscribe_room - { - "user": "tom@localhost", - "room": "room1@conference.localhost" - } - - HTTP/1.1 200 OK - "" +POST /api/unsubscribe_room +{ + "user": "tom@localhost", + "room": "room1@conference.localhost" +} + +HTTP/1.1 200 OK +"" ~~~ @@ -6505,19 +6974,19 @@ __Result:__ - *res* :: string : Raw result string __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](admin-tags.md#server) __Examples:__ ~~~ json - POST /api/update - { - "module": "mod_vcard" - } - - HTTP/1.1 200 OK - "Success" +POST /api/update +{ + "module": "all" +} + +HTTP/1.1 200 OK +"Updated modules: mod_configure, mod_vcard" ~~~ @@ -6536,22 +7005,22 @@ __Result:__ - *modules* :: [module::string] __Tags:__ -[server](/developer/ejabberd-api/admin-tags/#server) +[server](admin-tags.md#server) __Examples:__ ~~~ json - POST /api/update_list - { - - } - - HTTP/1.1 200 OK - [ - "mod_configure", - "mod_vcard" - ] +POST /api/update_list +{ + +} + +HTTP/1.1 200 OK +[ + "mod_configure", + "mod_vcard" +] ~~~ @@ -6572,24 +7041,24 @@ __Result:__ - *resources* :: [resource::string] __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](admin-tags.md#session) __Examples:__ ~~~ json - POST /api/user_resources - { - "user": "user1", - "host": "example.com" - } - - HTTP/1.1 200 OK - [ - "tka1", - "Gajim", - "mobile-app" - ] +POST /api/user_resources +{ + "user": "user1", + "host": "example.com" +} + +HTTP/1.1 200 OK +[ + "tka1", + "Gajim", + "mobile-app" +] ~~~ @@ -6610,35 +7079,35 @@ __Result:__ - *sessions_info* :: [{connection::string, ip::string, port::integer, priority::integer, node::string, uptime::integer, status::string, resource::string, statustext::string}] __Tags:__ -[session](/developer/ejabberd-api/admin-tags/#session) +[session](admin-tags.md#session) __Module:__ -[mod_admin_extra](/admin/configuration/modules/#mod-admin-extra) +[mod_admin_extra](../../admin/configuration/modules.md#mod_admin_extra) __Examples:__ ~~~ json - POST /api/user_sessions_info - { - "user": "peter", - "host": "myserver.com" - } - - HTTP/1.1 200 OK - [ - { - "connection": "c2s", - "ip": "127.0.0.1", - "port": 42656, - "priority": 8, - "node": "ejabberd@localhost", - "uptime": 231, - "status": "dnd", - "resource": "tka", - "statustext": "" - } - ] +POST /api/user_sessions_info +{ + "user": "peter", + "host": "myserver.com" +} + +HTTP/1.1 200 OK +[ + { + "connection": "c2s", + "ip": "127.0.0.1", + "port": 42656, + "priority": 8, + "node": "ejabberd@localhost", + "uptime": 231, + "status": "dnd", + "resource": "tka", + "statustext": "" + } +] ~~~ diff --git a/content/developer/ejabberd-api/admin-tags.md b/content/developer/ejabberd-api/admin-tags.md index 1c993a9b..a555cac0 100644 --- a/content/developer/ejabberd-api/admin-tags.md +++ b/content/developer/ejabberd-api/admin-tags.md @@ -1,675 +1,721 @@ ---- -title: API Tags -toc: true -menu: API Tags -order: 2 -// Autogenerated with 'ejabberdctl gen_markdown_doc_for_tags' ---- +# API Tags + +> This section enumerates the API tags of ejabberd [24.06](../../archive/24.06/index.md). If you are using an old ejabberd release, please refer to the corresponding archived version of this page in the [Archive](../../archive/index.md). -This section enumerates the tags and their associated API. ## accounts -* [ban_account](/developer/ejabberd-api/admin-api/#ban-account) +* [ban_account](admin-api.md#ban_account) + + +* [change_password](admin-api.md#change_password) + + +* [check_account](admin-api.md#check_account) -* [change_password](/developer/ejabberd-api/admin-api/#change-password) +* [check_password](admin-api.md#check_password) -* [check_account](/developer/ejabberd-api/admin-api/#check-account) +* [check_password_hash](admin-api.md#check_password_hash) -* [check_password](/developer/ejabberd-api/admin-api/#check-password) +* [delete_old_users](admin-api.md#delete_old_users) -* [check_password_hash](/developer/ejabberd-api/admin-api/#check-password-hash) +* [delete_old_users_vhost](admin-api.md#delete_old_users_vhost) -* [delete_old_users](/developer/ejabberd-api/admin-api/#delete-old-users) +* [get_ban_details](admin-api.md#get_ban_details) -* [delete_old_users_vhost](/developer/ejabberd-api/admin-api/#delete-old-users-vhost) +* [register](admin-api.md#register) -* [register](/developer/ejabberd-api/admin-api/#register) +* [registered_users](admin-api.md#registered_users) -* [registered_users](/developer/ejabberd-api/admin-api/#registered-users) +* [unban_account](admin-api.md#unban_account) -* [unban_ip](/developer/ejabberd-api/admin-api/#unban-ip) +* [unban_ip](admin-api.md#unban_ip) -* [unregister](/developer/ejabberd-api/admin-api/#unregister) +* [unregister](admin-api.md#unregister) ## acme -* [list_certificates](/developer/ejabberd-api/admin-api/#list-certificates) +* [list_certificates](admin-api.md#list_certificates) -* [request_certificate](/developer/ejabberd-api/admin-api/#request-certificate) +* [request_certificate](admin-api.md#request_certificate) -* [revoke_certificate](/developer/ejabberd-api/admin-api/#revoke-certificate) +* [revoke_certificate](admin-api.md#revoke_certificate) ## cluster -* [join_cluster](/developer/ejabberd-api/admin-api/#join-cluster) +* [get_master](admin-api.md#get_master) + + +* [join_cluster](admin-api.md#join_cluster) + + +* [join_cluster_here](admin-api.md#join_cluster_here) -* [leave_cluster](/developer/ejabberd-api/admin-api/#leave-cluster) +* [leave_cluster](admin-api.md#leave_cluster) -* [list_cluster](/developer/ejabberd-api/admin-api/#list-cluster) +* [list_cluster](admin-api.md#list_cluster) -* [set_master](/developer/ejabberd-api/admin-api/#set-master) +* [list_cluster_detailed](admin-api.md#list_cluster_detailed) + + +* [set_master](admin-api.md#set_master) ## config -* [convert_to_yaml](/developer/ejabberd-api/admin-api/#convert-to-yaml) +* [convert_to_yaml](admin-api.md#convert_to_yaml) -* [dump_config](/developer/ejabberd-api/admin-api/#dump-config) +* [dump_config](admin-api.md#dump_config) -* [reload_config](/developer/ejabberd-api/admin-api/#reload-config) +* [reload_config](admin-api.md#reload_config) ## documentation -* [gen_html_doc_for_commands](/developer/ejabberd-api/admin-api/#gen-html-doc-for-commands) +* [gen_html_doc_for_commands](admin-api.md#gen_html_doc_for_commands) -* [gen_markdown_doc_for_commands](/developer/ejabberd-api/admin-api/#gen-markdown-doc-for-commands) +* [gen_markdown_doc_for_commands](admin-api.md#gen_markdown_doc_for_commands) -* [gen_markdown_doc_for_tags](/developer/ejabberd-api/admin-api/#gen-markdown-doc-for-tags) +* [gen_markdown_doc_for_tags](admin-api.md#gen_markdown_doc_for_tags) -* [man](/developer/ejabberd-api/admin-api/#man) +* [man](admin-api.md#man) ## ejabberdctl -* [help](/developer/ejabberd-api/admin-api/#help) +* [help](admin-api.md#help) -* [mnesia_info_ctl](/developer/ejabberd-api/admin-api/#mnesia-info-ctl) +* [mnesia_info_ctl](admin-api.md#mnesia_info_ctl) -* [print_sql_schema](/developer/ejabberd-api/admin-api/#print-sql-schema) +* [print_sql_schema](admin-api.md#print_sql_schema) ## erlang -* [compile](/developer/ejabberd-api/admin-api/#compile) +* [compile](admin-api.md#compile) -* [get_cookie](/developer/ejabberd-api/admin-api/#get-cookie) +* [get_cookie](admin-api.md#get_cookie) -* [restart_module](/developer/ejabberd-api/admin-api/#restart-module) +* [restart_module](admin-api.md#restart_module) ## last -* [get_last](/developer/ejabberd-api/admin-api/#get-last) +* [get_last](admin-api.md#get_last) -* [set_last](/developer/ejabberd-api/admin-api/#set-last) +* [set_last](admin-api.md#set_last) ## logs -* [get_loglevel](/developer/ejabberd-api/admin-api/#get-loglevel) +* [get_loglevel](admin-api.md#get_loglevel) -* [reopen_log](/developer/ejabberd-api/admin-api/#reopen-log) +* [reopen_log](admin-api.md#reopen_log) -* [rotate_log](/developer/ejabberd-api/admin-api/#rotate-log) +* [rotate_log](admin-api.md#rotate_log) -* [set_loglevel](/developer/ejabberd-api/admin-api/#set-loglevel) +* [set_loglevel](admin-api.md#set_loglevel) ## mam -* [remove_mam_for_user](/developer/ejabberd-api/admin-api/#remove-mam-for-user) +* [remove_mam_for_user](admin-api.md#remove_mam_for_user) -* [remove_mam_for_user_with_peer](/developer/ejabberd-api/admin-api/#remove-mam-for-user-with-peer) +* [remove_mam_for_user_with_peer](admin-api.md#remove_mam_for_user_with_peer) ## mnesia -* [backup](/developer/ejabberd-api/admin-api/#backup) +* [backup](admin-api.md#backup) -* [delete_mnesia](/developer/ejabberd-api/admin-api/#delete-mnesia) +* [delete_mnesia](admin-api.md#delete_mnesia) -* [dump](/developer/ejabberd-api/admin-api/#dump) +* [dump](admin-api.md#dump) -* [dump_table](/developer/ejabberd-api/admin-api/#dump-table) +* [dump_table](admin-api.md#dump_table) -* [export2sql](/developer/ejabberd-api/admin-api/#export2sql) +* [export2sql](admin-api.md#export2sql) -* [export_piefxis](/developer/ejabberd-api/admin-api/#export-piefxis) +* [export_piefxis](admin-api.md#export_piefxis) -* [export_piefxis_host](/developer/ejabberd-api/admin-api/#export-piefxis-host) +* [export_piefxis_host](admin-api.md#export_piefxis_host) -* [import_dir](/developer/ejabberd-api/admin-api/#import-dir) +* [import_dir](admin-api.md#import_dir) -* [import_file](/developer/ejabberd-api/admin-api/#import-file) +* [import_file](admin-api.md#import_file) -* [import_piefxis](/developer/ejabberd-api/admin-api/#import-piefxis) +* [import_piefxis](admin-api.md#import_piefxis) -* [import_prosody](/developer/ejabberd-api/admin-api/#import-prosody) +* [import_prosody](admin-api.md#import_prosody) -* [install_fallback](/developer/ejabberd-api/admin-api/#install-fallback) +* [install_fallback](admin-api.md#install_fallback) -* [load](/developer/ejabberd-api/admin-api/#load) +* [load](admin-api.md#load) -* [mnesia_change_nodename](/developer/ejabberd-api/admin-api/#mnesia-change-nodename) +* [mnesia_change_nodename](admin-api.md#mnesia_change_nodename) -* [mnesia_info](/developer/ejabberd-api/admin-api/#mnesia-info) +* [mnesia_info](admin-api.md#mnesia_info) -* [mnesia_info_ctl](/developer/ejabberd-api/admin-api/#mnesia-info-ctl) +* [mnesia_info_ctl](admin-api.md#mnesia_info_ctl) -* [mnesia_table_info](/developer/ejabberd-api/admin-api/#mnesia-table-info) +* [mnesia_table_info](admin-api.md#mnesia_table_info) -* [restore](/developer/ejabberd-api/admin-api/#restore) +* [restore](admin-api.md#restore) ## modules -* [module_check](/developer/ejabberd-api/admin-api/#module-check) +* [module_check](admin-api.md#module_check) -* [module_install](/developer/ejabberd-api/admin-api/#module-install) +* [module_install](admin-api.md#module_install) -* [module_uninstall](/developer/ejabberd-api/admin-api/#module-uninstall) +* [module_uninstall](admin-api.md#module_uninstall) -* [module_upgrade](/developer/ejabberd-api/admin-api/#module-upgrade) +* [module_upgrade](admin-api.md#module_upgrade) -* [modules_available](/developer/ejabberd-api/admin-api/#modules-available) +* [modules_available](admin-api.md#modules_available) -* [modules_installed](/developer/ejabberd-api/admin-api/#modules-installed) +* [modules_installed](admin-api.md#modules_installed) -* [modules_update_specs](/developer/ejabberd-api/admin-api/#modules-update-specs) +* [modules_update_specs](admin-api.md#modules_update_specs) ## muc -* [create_rooms_file](/developer/ejabberd-api/admin-api/#create-rooms-file) +* [create_rooms_file](admin-api.md#create_rooms_file) -* [destroy_rooms_file](/developer/ejabberd-api/admin-api/#destroy-rooms-file) +* [destroy_rooms_file](admin-api.md#destroy_rooms_file) -* [get_user_rooms](/developer/ejabberd-api/admin-api/#get-user-rooms) +* [get_user_rooms](admin-api.md#get_user_rooms) -* [get_user_subscriptions](/developer/ejabberd-api/admin-api/#get-user-subscriptions) +* [get_user_subscriptions](admin-api.md#get_user_subscriptions) -* [muc_online_rooms](/developer/ejabberd-api/admin-api/#muc-online-rooms) +* [muc_online_rooms](admin-api.md#muc_online_rooms) -* [muc_online_rooms_by_regex](/developer/ejabberd-api/admin-api/#muc-online-rooms-by-regex) +* [muc_online_rooms_by_regex](admin-api.md#muc_online_rooms_by_regex) -* [muc_register_nick](/developer/ejabberd-api/admin-api/#muc-register-nick) +* [muc_register_nick](admin-api.md#muc_register_nick) -* [muc_unregister_nick](/developer/ejabberd-api/admin-api/#muc-unregister-nick) +* [muc_unregister_nick](admin-api.md#muc_unregister_nick) -* [rooms_empty_destroy](/developer/ejabberd-api/admin-api/#rooms-empty-destroy) +* [rooms_empty_destroy](admin-api.md#rooms_empty_destroy) -* [rooms_empty_list](/developer/ejabberd-api/admin-api/#rooms-empty-list) +* [rooms_empty_list](admin-api.md#rooms_empty_list) -* [rooms_unused_destroy](/developer/ejabberd-api/admin-api/#rooms-unused-destroy) +* [rooms_unused_destroy](admin-api.md#rooms_unused_destroy) -* [rooms_unused_list](/developer/ejabberd-api/admin-api/#rooms-unused-list) +* [rooms_unused_list](admin-api.md#rooms_unused_list) ## muc_room -* [change_room_option](/developer/ejabberd-api/admin-api/#change-room-option) +* [change_room_option](admin-api.md#change_room_option) -* [create_room](/developer/ejabberd-api/admin-api/#create-room) +* [create_room](admin-api.md#create_room) -* [create_room_with_opts](/developer/ejabberd-api/admin-api/#create-room-with-opts) +* [create_room_with_opts](admin-api.md#create_room_with_opts) -* [destroy_room](/developer/ejabberd-api/admin-api/#destroy-room) +* [destroy_room](admin-api.md#destroy_room) -* [get_room_affiliation](/developer/ejabberd-api/admin-api/#get-room-affiliation) +* [get_room_affiliation](admin-api.md#get_room_affiliation) -* [get_room_affiliations](/developer/ejabberd-api/admin-api/#get-room-affiliations) +* [get_room_affiliations](admin-api.md#get_room_affiliations) -* [get_room_history](/developer/ejabberd-api/admin-api/#get-room-history) +* [get_room_history](admin-api.md#get_room_history) -* [get_room_occupants](/developer/ejabberd-api/admin-api/#get-room-occupants) +* [get_room_occupants](admin-api.md#get_room_occupants) -* [get_room_occupants_number](/developer/ejabberd-api/admin-api/#get-room-occupants-number) +* [get_room_occupants_number](admin-api.md#get_room_occupants_number) -* [get_room_options](/developer/ejabberd-api/admin-api/#get-room-options) +* [get_room_options](admin-api.md#get_room_options) -* [get_subscribers](/developer/ejabberd-api/admin-api/#get-subscribers) +* [get_subscribers](admin-api.md#get_subscribers) -* [send_direct_invitation](/developer/ejabberd-api/admin-api/#send-direct-invitation) +* [send_direct_invitation](admin-api.md#send_direct_invitation) -* [set_room_affiliation](/developer/ejabberd-api/admin-api/#set-room-affiliation) +* [set_room_affiliation](admin-api.md#set_room_affiliation) -* [subscribe_room](/developer/ejabberd-api/admin-api/#subscribe-room) +* [subscribe_room](admin-api.md#subscribe_room) -* [subscribe_room_many](/developer/ejabberd-api/admin-api/#subscribe-room-many) +* [subscribe_room_many](admin-api.md#subscribe_room_many) -* [unsubscribe_room](/developer/ejabberd-api/admin-api/#unsubscribe-room) +* [unsubscribe_room](admin-api.md#unsubscribe_room) ## muc_sub -* [create_room_with_opts](/developer/ejabberd-api/admin-api/#create-room-with-opts) +* [create_room_with_opts](admin-api.md#create_room_with_opts) -* [get_subscribers](/developer/ejabberd-api/admin-api/#get-subscribers) +* [get_subscribers](admin-api.md#get_subscribers) -* [get_user_subscriptions](/developer/ejabberd-api/admin-api/#get-user-subscriptions) +* [get_user_subscriptions](admin-api.md#get_user_subscriptions) -* [subscribe_room](/developer/ejabberd-api/admin-api/#subscribe-room) +* [subscribe_room](admin-api.md#subscribe_room) -* [subscribe_room_many](/developer/ejabberd-api/admin-api/#subscribe-room-many) +* [subscribe_room_many](admin-api.md#subscribe_room_many) -* [unsubscribe_room](/developer/ejabberd-api/admin-api/#unsubscribe-room) +* [unsubscribe_room](admin-api.md#unsubscribe_room) ## oauth -* [oauth_add_client_implicit](/developer/ejabberd-api/admin-api/#oauth-add-client-implicit) +* [oauth_add_client_implicit](admin-api.md#oauth_add_client_implicit) -* [oauth_add_client_password](/developer/ejabberd-api/admin-api/#oauth-add-client-password) +* [oauth_add_client_password](admin-api.md#oauth_add_client_password) -* [oauth_issue_token](/developer/ejabberd-api/admin-api/#oauth-issue-token) +* [oauth_issue_token](admin-api.md#oauth_issue_token) -* [oauth_list_tokens](/developer/ejabberd-api/admin-api/#oauth-list-tokens) +* [oauth_list_tokens](admin-api.md#oauth_list_tokens) -* [oauth_remove_client](/developer/ejabberd-api/admin-api/#oauth-remove-client) +* [oauth_remove_client](admin-api.md#oauth_remove_client) -* [oauth_revoke_token](/developer/ejabberd-api/admin-api/#oauth-revoke-token) +* [oauth_revoke_token](admin-api.md#oauth_revoke_token) ## offline -* [get_offline_count](/developer/ejabberd-api/admin-api/#get-offline-count) +* [get_offline_count](admin-api.md#get_offline_count) ## private -* [bookmarks_to_pep](/developer/ejabberd-api/admin-api/#bookmarks-to-pep) +* [bookmarks_to_pep](admin-api.md#bookmarks_to_pep) -* [private_get](/developer/ejabberd-api/admin-api/#private-get) +* [private_get](admin-api.md#private_get) -* [private_set](/developer/ejabberd-api/admin-api/#private-set) +* [private_set](admin-api.md#private_set) ## purge -* [abort_delete_old_mam_messages](/developer/ejabberd-api/admin-api/#abort-delete-old-mam-messages) +* [abort_delete_old_mam_messages](admin-api.md#abort_delete_old_mam_messages) -* [abort_delete_old_messages](/developer/ejabberd-api/admin-api/#abort-delete-old-messages) +* [abort_delete_old_messages](admin-api.md#abort_delete_old_messages) -* [delete_expired_messages](/developer/ejabberd-api/admin-api/#delete-expired-messages) +* [delete_expired_messages](admin-api.md#delete_expired_messages) -* [delete_expired_pubsub_items](/developer/ejabberd-api/admin-api/#delete-expired-pubsub-items) +* [delete_expired_pubsub_items](admin-api.md#delete_expired_pubsub_items) -* [delete_old_mam_messages](/developer/ejabberd-api/admin-api/#delete-old-mam-messages) +* [delete_old_mam_messages](admin-api.md#delete_old_mam_messages) -* [delete_old_mam_messages_batch](/developer/ejabberd-api/admin-api/#delete-old-mam-messages-batch) +* [delete_old_mam_messages_batch](admin-api.md#delete_old_mam_messages_batch) -* [delete_old_mam_messages_status](/developer/ejabberd-api/admin-api/#delete-old-mam-messages-status) +* [delete_old_mam_messages_status](admin-api.md#delete_old_mam_messages_status) -* [delete_old_messages](/developer/ejabberd-api/admin-api/#delete-old-messages) +* [delete_old_messages](admin-api.md#delete_old_messages) -* [delete_old_messages_batch](/developer/ejabberd-api/admin-api/#delete-old-messages-batch) +* [delete_old_messages_batch](admin-api.md#delete_old_messages_batch) -* [delete_old_messages_status](/developer/ejabberd-api/admin-api/#delete-old-messages-status) +* [delete_old_messages_status](admin-api.md#delete_old_messages_status) -* [delete_old_pubsub_items](/developer/ejabberd-api/admin-api/#delete-old-pubsub-items) +* [delete_old_pubsub_items](admin-api.md#delete_old_pubsub_items) -* [delete_old_push_sessions](/developer/ejabberd-api/admin-api/#delete-old-push-sessions) +* [delete_old_push_sessions](admin-api.md#delete_old_push_sessions) -* [delete_old_users](/developer/ejabberd-api/admin-api/#delete-old-users) +* [delete_old_users](admin-api.md#delete_old_users) -* [delete_old_users_vhost](/developer/ejabberd-api/admin-api/#delete-old-users-vhost) +* [delete_old_users_vhost](admin-api.md#delete_old_users_vhost) ## roster -* [add_rosteritem](/developer/ejabberd-api/admin-api/#add-rosteritem) +* [add_rosteritem](admin-api.md#add_rosteritem) + +* [delete_rosteritem](admin-api.md#delete_rosteritem) -* [delete_rosteritem](/developer/ejabberd-api/admin-api/#delete-rosteritem) +* [get_roster](admin-api.md#get_roster) -* [get_roster](/developer/ejabberd-api/admin-api/#get-roster) +* [get_roster_count](admin-api.md#get_roster_count) -* [process_rosteritems](/developer/ejabberd-api/admin-api/#process-rosteritems) +* [process_rosteritems](admin-api.md#process_rosteritems) -* [push_alltoall](/developer/ejabberd-api/admin-api/#push-alltoall) +* [push_alltoall](admin-api.md#push_alltoall) -* [push_roster](/developer/ejabberd-api/admin-api/#push-roster) +* [push_roster](admin-api.md#push_roster) -* [push_roster_all](/developer/ejabberd-api/admin-api/#push-roster-all) + +* [push_roster_all](admin-api.md#push_roster_all) ## s2s -* [incoming_s2s_number](/developer/ejabberd-api/admin-api/#incoming-s2s-number) +* [incoming_s2s_number](admin-api.md#incoming_s2s_number) -* [outgoing_s2s_number](/developer/ejabberd-api/admin-api/#outgoing-s2s-number) +* [outgoing_s2s_number](admin-api.md#outgoing_s2s_number) -* [stop_s2s_connections](/developer/ejabberd-api/admin-api/#stop-s2s-connections) +* [stop_s2s_connections](admin-api.md#stop_s2s_connections) ## server -* [clear_cache](/developer/ejabberd-api/admin-api/#clear-cache) +* [clear_cache](admin-api.md#clear_cache) -* [gc](/developer/ejabberd-api/admin-api/#gc) +* [gc](admin-api.md#gc) -* [halt](/developer/ejabberd-api/admin-api/#halt) +* [halt](admin-api.md#halt) -* [registered_vhosts](/developer/ejabberd-api/admin-api/#registered-vhosts) +* [registered_vhosts](admin-api.md#registered_vhosts) -* [restart](/developer/ejabberd-api/admin-api/#restart) +* [restart](admin-api.md#restart) -* [status](/developer/ejabberd-api/admin-api/#status) +* [status](admin-api.md#status) -* [stop](/developer/ejabberd-api/admin-api/#stop) +* [stop](admin-api.md#stop) -* [stop_kindly](/developer/ejabberd-api/admin-api/#stop-kindly) +* [stop_kindly](admin-api.md#stop_kindly) -* [update](/developer/ejabberd-api/admin-api/#update) +* [update](admin-api.md#update) -* [update_list](/developer/ejabberd-api/admin-api/#update-list) +* [update_list](admin-api.md#update_list) ## session -* [connected_users](/developer/ejabberd-api/admin-api/#connected-users) +* [connected_users](admin-api.md#connected_users) -* [connected_users_info](/developer/ejabberd-api/admin-api/#connected-users-info) +* [connected_users_info](admin-api.md#connected_users_info) -* [connected_users_number](/developer/ejabberd-api/admin-api/#connected-users-number) +* [connected_users_number](admin-api.md#connected_users_number) -* [connected_users_vhost](/developer/ejabberd-api/admin-api/#connected-users-vhost) +* [connected_users_vhost](admin-api.md#connected_users_vhost) -* [get_presence](/developer/ejabberd-api/admin-api/#get-presence) +* [get_presence](admin-api.md#get_presence) -* [kick_session](/developer/ejabberd-api/admin-api/#kick-session) +* [kick_session](admin-api.md#kick_session) -* [kick_user](/developer/ejabberd-api/admin-api/#kick-user) +* [kick_user](admin-api.md#kick_user) -* [num_resources](/developer/ejabberd-api/admin-api/#num-resources) +* [num_resources](admin-api.md#num_resources) -* [resource_num](/developer/ejabberd-api/admin-api/#resource-num) +* [resource_num](admin-api.md#resource_num) -* [set_presence](/developer/ejabberd-api/admin-api/#set-presence) +* [set_presence](admin-api.md#set_presence) -* [status_list](/developer/ejabberd-api/admin-api/#status-list) +* [status_list](admin-api.md#status_list) -* [status_list_host](/developer/ejabberd-api/admin-api/#status-list-host) +* [status_list_host](admin-api.md#status_list_host) -* [status_num](/developer/ejabberd-api/admin-api/#status-num) +* [status_num](admin-api.md#status_num) -* [status_num_host](/developer/ejabberd-api/admin-api/#status-num-host) +* [status_num_host](admin-api.md#status_num_host) -* [user_resources](/developer/ejabberd-api/admin-api/#user-resources) +* [user_resources](admin-api.md#user_resources) -* [user_sessions_info](/developer/ejabberd-api/admin-api/#user-sessions-info) +* [user_sessions_info](admin-api.md#user_sessions_info) ## shared_roster_group -* [srg_create](/developer/ejabberd-api/admin-api/#srg-create) +* [srg_add](admin-api.md#srg_add) + + +* [srg_add_displayed](admin-api.md#srg_add_displayed) + + +* [srg_create](admin-api.md#srg_create) + +* [srg_del_displayed](admin-api.md#srg_del_displayed) -* [srg_delete](/developer/ejabberd-api/admin-api/#srg-delete) +* [srg_delete](admin-api.md#srg_delete) -* [srg_get_info](/developer/ejabberd-api/admin-api/#srg-get-info) +* [srg_get_displayed](admin-api.md#srg_get_displayed) -* [srg_get_members](/developer/ejabberd-api/admin-api/#srg-get-members) +* [srg_get_info](admin-api.md#srg_get_info) -* [srg_list](/developer/ejabberd-api/admin-api/#srg-list) +* [srg_get_members](admin-api.md#srg_get_members) -* [srg_user_add](/developer/ejabberd-api/admin-api/#srg-user-add) +* [srg_list](admin-api.md#srg_list) -* [srg_user_del](/developer/ejabberd-api/admin-api/#srg-user-del) + +* [srg_set_info](admin-api.md#srg_set_info) + + +* [srg_user_add](admin-api.md#srg_user_add) + + +* [srg_user_del](admin-api.md#srg_user_del) ## sql -* [convert_to_scram](/developer/ejabberd-api/admin-api/#convert-to-scram) +* [convert_to_scram](admin-api.md#convert_to_scram) -* [import_prosody](/developer/ejabberd-api/admin-api/#import-prosody) +* [import_prosody](admin-api.md#import_prosody) -* [print_sql_schema](/developer/ejabberd-api/admin-api/#print-sql-schema) +* [print_sql_schema](admin-api.md#print_sql_schema) ## stanza -* [privacy_set](/developer/ejabberd-api/admin-api/#privacy-set) +* [privacy_set](admin-api.md#privacy_set) -* [send_message](/developer/ejabberd-api/admin-api/#send-message) +* [send_message](admin-api.md#send_message) -* [send_stanza](/developer/ejabberd-api/admin-api/#send-stanza) +* [send_stanza](admin-api.md#send_stanza) -* [send_stanza_c2s](/developer/ejabberd-api/admin-api/#send-stanza-c2s) +* [send_stanza_c2s](admin-api.md#send_stanza_c2s) ## statistics -* [connected_users_number](/developer/ejabberd-api/admin-api/#connected-users-number) +* [connected_users_number](admin-api.md#connected_users_number) -* [incoming_s2s_number](/developer/ejabberd-api/admin-api/#incoming-s2s-number) +* [incoming_s2s_number](admin-api.md#incoming_s2s_number) -* [outgoing_s2s_number](/developer/ejabberd-api/admin-api/#outgoing-s2s-number) +* [outgoing_s2s_number](admin-api.md#outgoing_s2s_number) -* [stats](/developer/ejabberd-api/admin-api/#stats) +* [stats](admin-api.md#stats) -* [stats_host](/developer/ejabberd-api/admin-api/#stats-host) +* [stats_host](admin-api.md#stats_host) -* [status_num](/developer/ejabberd-api/admin-api/#status-num) +* [status_num](admin-api.md#status_num) -* [status_num_host](/developer/ejabberd-api/admin-api/#status-num-host) +* [status_num_host](admin-api.md#status_num_host) ## v1 -* [add_rosteritem](/developer/ejabberd-api/admin-api/#add-rosteritem) +* [add_rosteritem](admin-api.md#add_rosteritem) + + +* [oauth_issue_token](admin-api.md#oauth_issue_token) + + +* [send_direct_invitation](admin-api.md#send_direct_invitation) + + +* [set_presence](admin-api.md#set_presence) + + +* [srg_create](admin-api.md#srg_create) + + +* [subscribe_room](admin-api.md#subscribe_room) + + +* [subscribe_room_many](admin-api.md#subscribe_room_many) -* [oauth_issue_token](/developer/ejabberd-api/admin-api/#oauth-issue-token) +## v2 -* [send_direct_invitation](/developer/ejabberd-api/admin-api/#send-direct-invitation) +* [ban_account](admin-api.md#ban_account) -* [set_presence](/developer/ejabberd-api/admin-api/#set-presence) +* [get_ban_details](admin-api.md#get_ban_details) -* [srg_create](/developer/ejabberd-api/admin-api/#srg-create) +* [kick_user](admin-api.md#kick_user) -* [subscribe_room](/developer/ejabberd-api/admin-api/#subscribe-room) +* [rooms_empty_destroy](admin-api.md#rooms_empty_destroy) -* [subscribe_room_many](/developer/ejabberd-api/admin-api/#subscribe-room-many) +* [unban_account](admin-api.md#unban_account) ## vcard -* [get_vcard](/developer/ejabberd-api/admin-api/#get-vcard) +* [get_vcard](admin-api.md#get_vcard) -* [get_vcard2](/developer/ejabberd-api/admin-api/#get-vcard2) +* [get_vcard2](admin-api.md#get_vcard2) -* [get_vcard2_multi](/developer/ejabberd-api/admin-api/#get-vcard2-multi) +* [get_vcard2_multi](admin-api.md#get_vcard2_multi) -* [set_nickname](/developer/ejabberd-api/admin-api/#set-nickname) +* [set_nickname](admin-api.md#set_nickname) -* [set_vcard](/developer/ejabberd-api/admin-api/#set-vcard) +* [set_vcard](admin-api.md#set_vcard) -* [set_vcard2](/developer/ejabberd-api/admin-api/#set-vcard2) +* [set_vcard2](admin-api.md#set_vcard2) -* [set_vcard2_multi](/developer/ejabberd-api/admin-api/#set-vcard2-multi) +* [set_vcard2_multi](admin-api.md#set_vcard2_multi) diff --git a/content/developer/ejabberd-api/api_versioning.md b/content/developer/ejabberd-api/api_versioning.md old mode 100755 new mode 100644 index f3775088..10dc6eaa --- a/content/developer/ejabberd-api/api_versioning.md +++ b/content/developer/ejabberd-api/api_versioning.md @@ -1,82 +1,52 @@ ---- -title: API Versioning -menu: Versioning -order: 22 -toc: true ---- +# API Versioning -# Introduction + -It is possible to support different versions of the ejabberd API. -Versioning is used to ensure compatibility with third party -backend that uses the API. -This feature is available since ejabberd 24.XX. - -When a command is modified (either its -declaration or its definition, breaking compatibility), those -modifications can be done in a new version of the API, keeping the old -command still available in the previous API version. -An API version is an integer (sub-versions are not supported). +## Introduction -If the API client does not specify the API version, -ejabberd uses by default the most recent available API version. +It is possible to support different versions of the ejabberd API. +Versioning is used to ensure compatibility with third party backend that uses the API. -Alternatively, the API client can specify an API version, -and ejabberd will use that one to process the query, -or the most recent to the one specified. -For example: if a command is defined in API versions 0, 2, 3, 7, and 9, -and a client declares to support up to API version 5, -then ejabberd uses the command API version 3, which is the most recent available -for the one supported by the client. +When a command is modified (either its declaration or its definition, breaking compatibility), those modifications can be done in a new version of the API, keeping the old command still available in the previous API version. +An API version is an integer (sub-versions are not supported). -API versioning is supported by -[`mod_http_api`](https://docs.ejabberd.im/admin/configuration/modules/#mod-http-api) -ReST interface and -[`ejabberdctl`](https://docs.ejabberd.im/admin/guide/managing/#ejabberdctl) -command line script. -However [`ejabberd_xmlrpc`](https://docs.ejabberd.im/admin/configuration/listen/#ejabberd-xmlrpc) -doesn't support API versioning, and consequently it can only use the latest API version. +If the API client does not specify the API version, ejabberd uses by default the most recent available API version. +Alternatively, the API client can specify an API version, and ejabberd will use that one to process the query, or the most recent to the one specified. +For example: if a command is defined in API versions 0, 2, 3, 7, and 9, and a client declares to support up to API version 5, then ejabberd uses the command API version 3, which is the most recent available for the one supported by the client. -# Command Definition +API versioning is supported by [`mod_http_api`](../../admin/configuration/modules.md#mod_http_api) ReST interface and [`ejabberdctl`](../../admin/guide/managing.md#ejabberdctl) command line script. +However [`ejabberd_xmlrpc`](../../admin/configuration/listen.md#ejabberd_xmlrpc) doesn't support API versioning, and consequently it can only use the latest API version. -If a command is modified, a new `#ejabberd_commands` record should be -defined with a `version` attribute set to the API version (an integer) -where this command version is available. There is no need to -add a new `#ejabberd_commands` record for commands that are not modified -in a given API version, immediate inferior version is used. +## Command Definition -By default, all commands are in API version 0, and latest API is used -if no version is specified when calling `ejabberd_commands` directly -without specifying a version. +If a command is modified, a new `#ejabberd_commands` record should be defined with a `version` attribute set to the API version (an integer) where this command version is available. +There is no need to add a new `#ejabberd_commands` record for commands that are not modified in a given API version, immediate inferior version is used. +By default, all commands are in API version 0, and latest API is used if no version is specified when calling `ejabberd_commands` directly without specifying a version. -# API Documentation +## API Documentation -The command documentation indicates the api version as a tag: `v1`, `v2`, ... +The command documentation indicates the api version as a tag: `v1`, `v2`... Commands not versioned do not have such a tag: they are version 0. -The [ejabberd Docs: API Tags](https://docs.ejabberd.im/developer/ejabberd-api/admin-tags/) -page lists the most recent API versions, and what commands are included. +The [ejabberd Docs: API Tags](../ejabberd-api/admin-api.md) page lists the most recent API versions, and what commands are included. -To know exactly what is the format expected for a command in a specific API version, -use `ejabberdctl` specifying what API version you want to consult -and the command name, for example: -``` +To know exactly what is the format expected for a command in a specific API version, use `ejabberdctl` specifying what API version you want to consult and the command name, for example: + +``` sh ejabberdctl --version 0 help get_roster ``` +## `mod_http_api` -# `mod_http_api` - -The server administrator can set the default version when configuring `request_handlers`, -by including a `vN` in its path, where `N` is an integer corresponding to the version. +The server administrator can set the default version when configuring `request_handlers`, by including a `vN` in its path, where `N` is an integer corresponding to the version. -In any case, the API client can specify a version when sending the request, -by appending `vN` to the request path. +In any case, the API client can specify a version when sending the request, by appending `vN` to the request path. For example, when configured like: -```yaml + +``` yaml listen: - request_handlers: @@ -85,7 +55,7 @@ listen: /api: mod_http_api ``` -see what API version will be used depending on the URL: +See what API version will be used depending on the URL: - `api/command` use the latest available version - `api/command/v0` use version 0 @@ -96,48 +66,53 @@ see what API version will be used depending on the URL: - `api/v0/command/v1` use version 1 In this example, the server administrator configured the default API version to 0: -```yaml + +``` yaml listen: - request_handlers: /api/v0: mod_http_api ``` -the client doesn't specify any version, so 0 is used: -``` +The client doesn't specify any version, so 0 is used: + +``` sh $ curl -k -X POST -H "Content-type: application/json" \ -d '{}' "http://localhost:5280/api/v0/get_loglevel" {"levelatom":"info"} ``` This time the client requests the API version 2: -``` + +``` sh $ curl -k -X POST -H "Content-type: application/json" \ -d '{}' "http://localhost:5280/api/v0/get_loglevel/v2" "info" ``` - -# `ejabberdctl` +## `ejabberdctl` By default the latest version of a given command is used. To use a command in a specific API version, use the `--version` switch, followed by the version number, and then the command name. Example: -``` bash + +``` sh ejabberdctl --version 2 set_loglevel 4 ``` Use the most recent API version: -``` + +``` sh $ ejabberdctl get_roster admin localhost jan@localhost jan none subscribe group1,group2 tom@localhost tom none subscribe group3 ``` Use version 0: -``` + +``` sh $ ejabberdctl --version 0 get_roster admin localhost jan@localhost jan none subscribe group1;group2 tom@localhost tom none subscribe group3 diff --git a/content/developer/ejabberd-api/commands.md b/content/developer/ejabberd-api/commands.md old mode 100755 new mode 100644 index 025ccd5f..b67b4ef6 --- a/content/developer/ejabberd-api/commands.md +++ b/content/developer/ejabberd-api/commands.md @@ -1,69 +1,40 @@ ---- -title: ejabberd commands -menu: Record -order: 18 ---- +# ejabberd commands -By defining command using api available through `ejabberd_commands` -module, it's possible to add operations that would be available to -users through `ejabberdctl` command, XML-RPC socket or JSON based REST -service. +By defining command using api available through `ejabberd_commands` module, it's possible to add operations that would be available to users through `ejabberdctl` command, XML-RPC socket or JSON based REST service. -Each command needs to provide information about required arguments -and produced result by filling `#ejabberd_commands` record and -registering it in dispatcher by calling -`ejabberd_commands:register_commands([ListOfEjabberdCommandsRecords])`. +Each command needs to provide information about required arguments and produced result by filling `#ejabberd_commands` record and registering it in dispatcher by calling `ejabberd_commands:register_commands([ListOfEjabberdCommandsRecords])`. -# Structure of `#ejabberd_commands` record +## Structure of `#ejabberd_commands` record -# Writing ejabberd commands supporting OAuth +## Writing ejabberd commands supporting OAuth -If you have existing commands that you want to make OAuth compliant, -you can make them OAuth compliant very easily. +If you have existing commands that you want to make OAuth compliant, you can make them OAuth compliant very easily. -An ejabberd command is defined by an `#ejabberd_commands` Erlang -record. The record requires a few fields: +An ejabberd command is defined by an `#ejabberd_commands` Erlang record. The record requires a few fields: - **name**: This is an atom defining the name of the command. -- **tags**: This is a list of atoms used to group the command into - consistent group of commands. This is mostly used to group commands - in `ejabberdctl` command-line tool. Existing categories are: - - - `session`: For commands related to user XMPP sessions. - - `roster`: Commands related to contact list management. - - TODO: List other tags that we already use. +- **tags**: This is a list of atoms used to group the command into consistent group of commands. This is mostly used to group commands in `ejabberdctl` command-line tool. Existing categories are: + - `session`: For commands related to user XMPP sessions. + - `roster`: Commands related to contact list management. + - **desc**: Description of the command for online help. -- **module** and **function**: Module and function to call to execute - the command logic. -- **args**: Argument of the command. An argument is defined by a tuple - of atoms of the form `{argument_name, data_type}`. `data_type` can be - one of: - - - binary - - TODO other types +- **module** and **function**: Module and function to call to execute the command logic. +- **args**: Argument of the command. An argument is defined by a tuple of atoms of the form `{argument_name, data_type}`. `data_type` can be one of: + - binary + - **result**: defines what the command will return. -- **policy**: Is an optional field, containing an atom that define - restriction policy of the command. It can be on of: `open`, `admin`, - `user`, `restricted`. Default is `restricted`, meaning the command - can be used from ejabberdctl command-line tool. -- **version**: API version number where this command is available (see - *API versioning* documentation for details). +- **policy**: Is an optional field, containing an atom that define restriction policy of the command. It can be on of: `open`, `admin`, `user`, `restricted`. Default is `restricted`, meaning the command can be used from ejabberdctl command-line tool. +- **version**: API version number where this command is available (see *API versioning* documentation for details). -To define a command that can be used by server user over ReST or -XML-RPC API, you just have to define it with policy `user`. Then, you -have to make sure that the function will take a user binary and a host -binary as first parameter of the function. They do not have to be put -in the `args` list in `#ejabberd_commands` record as the `user policy -implicitly expect them. +To define a command that can be used by server user over ReST or XML-RPC API, you just have to define it with policy `user`. Then, you have to make sure that the function will take a user binary and a host binary as first parameter of the function. They do not have to be put in the `args` list in `#ejabberd_commands` record as the `user policy implicitly expect them. -That's all you need to have commands that can be used in a variety of -ways. +That's all you need to have commands that can be used in a variety of ways. Here is a example way to register commands when -``` +``` erlang start(_Host, _Opts) -> ejabberd_commands:register_commands(commands()). diff --git a/content/developer/ejabberd-api/index.md b/content/developer/ejabberd-api/index.md old mode 100755 new mode 100644 index 2759fc9e..bdf80a31 --- a/content/developer/ejabberd-api/index.md +++ b/content/developer/ejabberd-api/index.md @@ -1,43 +1,31 @@ ---- -title: ejabberd Rest API -menu: API -order: 10 -toc: true ---- +# ejabberd Rest API -# Introduction +## Introduction ejabberd comes with a powerful API serving two goals: 1. Manage the XMPP service and integrate the platform with back-end platforms and script tools. -2. Allow users to perform tasks via the client, allowing simple basic clients that do not need to use XMPP protocol. +2. Allow users to perform tasks via the client, allowing simple basic clients that do not need to use XMPP protocol. This can be handy, for example to send a message from your smartwatch, or show the number of offline messages. The system is powerful and very versatile and you can configure it very finely, but it can be quite daunting to set up. -This section is written to demystify ejabberd API configuration and help you -integrate ejabberd with your other back-ends or script through an HTTP / HTTPS ReST API. +This section is written to demystify ejabberd API configuration and help you integrate ejabberd with your other back-ends or script through an HTTP / HTTPS ReST API. -# Understanding ejabberd "commands" +## Understanding ejabberd "commands" ejabberd operations are organised around the concept of commands. ejabberd standard modules already provide many commands, but the mechanism is generic and any module can provide its own set of commands. This exposition of commands for third-party modules make it very powerful. -All commands can be exposed through interfaces. Available interfaces are: +All commands can be exposed through interfaces. Available interfaces are: -- [ejabberdctl](/admin/guide/managing/#ejabberdctl) command-line tool, -- [mod_http_api](/admin/configuration/modules/#mod-http-api) for ReST calls using JSON data, -- [ejabberd_xmlrpc](/admin/configuration/listen/#ejabberd-xmlrpc) for XML-RPC calls, -- to some extend, XMPP protocol itself through discovery and adhoc commands, using - [mod_configure](/admin/configuration/modules/#mod-configure). +- [ejabberdctl](../../admin/guide/managing.md#ejabberdctl) command-line tool, +- [mod_http_api](../../admin/configuration/modules.md#mod_http_api) for ReST calls using JSON data, +- [ejabberd_xmlrpc](../../admin/configuration/listen.md#ejabberd_xmlrpc) for XML-RPC calls, +- to some extend, XMPP protocol itself through discovery and adhoc commands, using [mod_configure](../../admin/configuration/modules.md#mod_configure). -The [ejabberd-contrib Github repository](https://github.com/processone/ejabberd-contrib) -provides other interfaces that can be installed to -execute ejabberd commands in different ways: `mod_rest` (HTTP POST -service), `mod_shcommands` (ejabberd WebAdmin page). +The [ejabberd-contrib Github repository](https://github.com/processone/ejabberd-contrib) provides other interfaces that can be installed to execute ejabberd commands in different ways: `mod_rest` (HTTP POST service), `mod_shcommands` (ejabberd WebAdmin page). -Any module in ejabberd can add its own command(s) through ejabberd Erlang/Elixir API, making the whole -system totally extensible. A third-party module can expose its own command(s) and feel like a real part -of the system. A module that exposes commands allows server admins to expose it the way they want. +Any module in ejabberd can add its own command(s) through ejabberd Erlang/Elixir API, making the whole system totally extensible. A third-party module can expose its own command(s) and feel like a real part of the system. A module that exposes commands allows server admins to expose it the way they want. ejabberd commands are universal, extensible and widely available through various configurable entrypoints. @@ -45,11 +33,11 @@ _Note: The XML-RPC API still works but is deprecated in favor of the ReST API. Y -# The role of ejabberd API +## The role of ejabberd API As we have seen, ejabberd API role is to provide and control access to ejabberd commands over HTTP/HTTPS. -Thus, ejabberd API primary goal is to grant access to some or all ejabberd "commands". +Thus, ejabberd API primary goal is to grant access to some or all ejabberd "commands". An admin ejabberd ReST API requires: @@ -57,28 +45,23 @@ An admin ejabberd ReST API requires: - HTTP/HTTPS handlers configured to expose the desired commands. - The selection of authentication mechanisms that can be used to access the API. Two mechanisms are available to access the HTTP API: + - Basic authentication. This mechanism is enabled by default. + - OAuth 2.0 token based authentication. It has to be explicitly added to the config file. - - Basic authentication. This mechanism is enabled by default. - - OAuth 2.0 token based authentication. It has to be explicitly added to the config file. - -# Learning the basics +## Learning the basics The first resources to read to learn about ejabberd ReST API configuration are the following: -* [Simple API configuration](/developer/ejabberd-api/simple-configuration/) -* Using ejabberd client API libraries and tools +- [Simple API configuration](simple-configuration.md) +- Using ejabberd client API libraries and tools - + -The list of available commands is available in the -[API Reference](/developer/ejabberd-api/admin-api/) section. -Additionally, you can check at runtime what commands are available -in your installed server using [ejabberdctl](/admin/guide/managing/#ejabberdctl): +The list of available commands is available in the [API Reference](admin-api.md) section. +Additionally, you can check at runtime what commands are available in your installed server using [ejabberdctl](../../admin/guide/managing.md#ejabberdctl): -``` bash +``` sh ❯ ejabberdctl Usage: ejabberdctl [--no-timeout] [--node nodename] [--version api_version] command [arguments] @@ -89,7 +72,6 @@ Available commands in this ejabberd node: Ban an account: kick sessions and set random password ... - ❯ ejabberdctl help ... @@ -97,12 +79,10 @@ Available commands in this ejabberd node: ... ``` -# Next steps +## Next steps You can dig deeper into ejabberd ReST API configuration on the following pages: -* [API Permissions](/developer/ejabberd-api/permissions/) - -* [OAuth Support](/developer/ejabberd-api/oauth/) - -* [Administration API Commands](/developer/ejabberd-api/admin-api/) +- [API Permissions](permissions.md) +- [OAuth Support](oauth.md) +- [Administration API Commands](admin-api.md) diff --git a/content/developer/ejabberd-api/oauth.md b/content/developer/ejabberd-api/oauth.md old mode 100755 new mode 100644 index a00bf03d..fca97c88 --- a/content/developer/ejabberd-api/oauth.md +++ b/content/developer/ejabberd-api/oauth.md @@ -1,134 +1,94 @@ ---- -title: OAuth Support -toc: true -menu: OAuth Support -order: 15 ---- +# OAuth Support -# Introduction + -ejabberd includes a full support OAuth 2.0 deep inside the ejabberd -stack. +## Introduction + +ejabberd includes a full support OAuth 2.0 deep inside the ejabberd stack. This OAuth integration makes ejabberd: -- an ideal project to develop XMPP applications with Web in mind, as - it exposes ejabberd features as ReST or XML-RPC HTTP based API - endpoints. **OAuth makes ejabberd the ideal XMPP server to integrate in a - larger Web / HTTP ecosystem**. - -- a more **secure tool that can leverage the use of oAuth token to - authenticate, hiding your real password from the client itself**. As - your password is never shared with client directly with our X-OAUTH2 - authentication mechanism, user have less risks of having their - primary password leaked. - -- a tool that can be used at the core of larger platforms as oauth - token can be used by users and admins to **delegate rights to - subcomponents / subservices**. - -- a tool that is friendly to other online services as users can - delegate rights to others SaaS platform they are using. This will - be possible to let services access your message archive, show your - offline message count or with future commands send message to users - and chatrooms on your behalf. This is done in a granular way, with a - scope limited to a specific function. And the delegation rights for - a specific app / third party can always be revoked at any time as - this is usually the case with OAuth services. +- an ideal project to develop XMPP applications with Web in mind, as it exposes ejabberd features as ReST or XML-RPC HTTP based API endpoints. +**OAuth makes ejabberd the ideal XMPP server to integrate in a larger Web / HTTP ecosystem**. + +- a more **secure tool that can leverage the use of oAuth token to authenticate, hiding your real password from the client itself**. As your password is never shared with client directly with our X-OAUTH2 authentication mechanism, user have less risks of having their primary password leaked. + +- a tool that can be used at the core of larger platforms as oauth token can be used by users and admins to **delegate rights to subcomponents / subservices**. + +- a tool that is friendly to other online services as users can delegate rights to others SaaS platform they are using. +This will be possible to let services access your message archive, show your offline message count or with future commands send message to users and chatrooms on your behalf. +This is done in a granular way, with a scope limited to a specific function. And the delegation rights for a specific app / third party can always be revoked at any time as this is usually the case with OAuth services. You can read more on OAuth from [OAuth website](https://oauth.net). -OAuth support is available in ejabberd 15.09 and newest releases. +## Configuration -# Configuration +### Authentication method -## Authentication method +An [X-OAUTH2 SASL authentication](#x-oauth2-authentication) mechanism is enabled by default in ejabberd. -An [X-OAUTH2 SASL authentication](#x-oauth2-authentication) -mechanism is enabled by default in ejabberd. +However, if the `ejabberd_oauth` HTTP request handler is not enabled, there is no way to generate token from outside ejabberd. +In this case, you may want to disable X-OAUTH2 with the [disable_sasl_mechanisms](../../admin/configuration/toplevel.md#disable_sasl_mechanisms) top-level option in `ejabberd.yml` file, either at global or at virtual host level: -However, if the `ejabberd_oauth` HTTP request handler is not enabled, -there is no way to generate token from outside ejabberd. -In this case, you may want to disable X-OAUTH2 with the -[disable_sasl_mechanisms](/admin/configuration/toplevel/#disable-sasl-mechanisms) -top-level option in `ejabberd.yml` file, either at global or at virtual host -level: +``` yaml +disable_sasl_mechanisms: ["X-OAUTH2"] +``` - - disable_sasl_mechanisms: ["X-OAUTH2"] +### ejabberd listeners -## ejabberd listeners +To enable OAuth support in ejabberd, you need to edit your `ejabberd.yml` file to add the following snippets. -To enable OAuth support in ejabberd, you need to edit your -`ejabberd.yml` file to add the following snippets. +You first need to expose more HTTP endpoint in [ejabberd_http](../../admin/configuration/listen.md#ejabberd_http) modules: -You first need to expose more HTTP endpoint in -[ejabberd_http](/admin/configuration/listen/#ejabberd-http) modules: +- `ejabberd_oauth` is the request handler that will allow generating token for third-parties (clients, services). It is usually exposed on "/oauth" endpoint. This handler is mandatory to support OAuth. +- [mod_http_api](../../admin/configuration/modules.md#mod_http_api) request handler enables ReST API endpoint to perform delegated actions on ejabberd using an HTTP JSON API. This handler is usually exposed on "/api" endpoint. It is optional. +- [ejabberd_xmlrpc](../../admin/configuration/listen.md#ejabberd_xmlrpc) listener can be set on a separate port to query commands using the XML-RPC protocol. + +Here is a example of the `listen` section in ejabberd configuration file, focusing on HTTP handlers: + +``` yaml +listen: + - + port: 4560 + module: ejabberd_http + request_handlers: + ## Handle ejabberd commands using XML-RPC + /: ejabberd_xmlrpc + - + port: 5280 + module: ejabberd_http + request_handlers: + /websocket: ejabberd_http_ws + /log: mod_log_http + # OAuth support: + /oauth: ejabberd_oauth + # ReST API: + /api: mod_http_api +``` -- `ejabberd_oauth` is the request handler that will allow - generating token for third-parties (clients, services). It is - usually exposed on "/oauth" endpoint. This handler is mandatory - to support OAuth. -- [mod_http_api](/admin/configuration/modules/#mod-http-api) request handler - enables ReST API - endpoint to perform delegated actions on ejabberd using an HTTP - JSON API. This handler is usually exposed on "/api" - endpoint. It is optional. +### Module configuration -- [ejabberd_xmlrpc](/admin/configuration/listen/#ejabberd-xmlrpc) listener - can be set on a separate port to query commands using the XML-RPC protocol. +Some commands are implemented by ejabberd internals and are always available, but other commands are implemented by optional modules. +If the documentation of a command you want to use mentions a module, make sure you have enabled that module in `ejabberd.yml`. +For example the [add_rosteritem](admin-api.md#add_rosteritem) command is implemented in the mod_admin_extra module. -Here is a example of the `listen` section in ejabberd configuration -file, focusing on HTTP handlers: +By the way, ejabberd implements several commands to manage OAuth, check the [oauth tag](admin-tags.md#oauth) documentation. - - listen: - - - port: 4560 - module: ejabberd_http - request_handlers: - ## Handle ejabberd commands using XML-RPC - /: ejabberd_xmlrpc - - - port: 5280 - module: ejabberd_http - request_handlers: - /websocket: ejabberd_http_ws - /log: mod_log_http - # OAuth support: - /oauth: ejabberd_oauth - # ReST API: - /api: mod_http_api - -## Module configuration - -Some commands are implemented by ejabberd internals and are always available, -but other commands are implemented by optional modules. -If the documentation of a command you want to use mentions a module, -make sure you have enabled that module in `ejabberd.yml`. -For example the -[add_rosteritem](/developer/ejabberd-api/admin-api/#add-rosteritem) -command is implemented in the mod_admin_extra module. - -By the way, ejabberd implements several commands to manage OAuth, -check the [oauth tag](/developer/ejabberd-api/admin-tags/#oauth) documentation. - -## OAuth specific parameters +### OAuth specific parameters OAuth is configured using those top-level options: -- [oauth_access](/admin/configuration/toplevel/#oauth-access) -- [oauth_cache_life_time](/admin/configuration/toplevel/#oauth-cache-life-time) -- [oauth_cache_missed](/admin/configuration/toplevel/#oauth-cache-missed) -- [oauth_cache_rest_failure_life_time](/admin/configuration/toplevel/#oauth-cache-rest-failure-life_time) -- [oauth_cache_size](/admin/configuration/toplevel/#oauth-cache-size) -- [oauth_client_id_check](/admin/configuration/toplevel/#oauth-client-id-check) -- [oauth_db_type](/admin/configuration/toplevel/#oauth-db-type) -- [oauth_expire](/admin/configuration/toplevel/#oauth-expire) -- [oauth_use_cache](/admin/configuration/toplevel/#oauth-use-cache) +- [oauth_access](../../admin/configuration/toplevel.md#oauth_access) +- [oauth_cache_life_time](../../admin/configuration/toplevel.md#oauth_cache_life_time) +- [oauth_cache_missed](../../admin/configuration/toplevel.md#oauth_cache_missed) +- [oauth_cache_rest_failure_life_time](../../admin/configuration/toplevel.md#oauth_cache_rest_failure_life_time) +- [oauth_cache_size](../../admin/configuration/toplevel.md#oauth_cache_size) +- [oauth_client_id_check](../../admin/configuration/toplevel.md#oauth_client_id_check) +- [oauth_db_type](../../admin/configuration/toplevel.md#oauth_db_type) +- [oauth_expire](../../admin/configuration/toplevel.md#oauth_expire) +- [oauth_use_cache](../../admin/configuration/toplevel.md#oauth_use_cache) -A basic setup is to allow all accounts to create tokens, -and tokens expire after an hour: +A basic setup is to allow all accounts to create tokens, and tokens expire after an hour: ``` yaml oauth_access: all @@ -142,13 +102,11 @@ Currently, OAuth tokens are stored in Mnesia database. In a future release, we plan to support multiple token backends. --> -# authorization_token +## authorization_token -An easy way to generate a token is using the -[oauth_issue_token](/developer/ejabberd-api/admin-api/#oauth-issue-token) -command with the ejabberdctl shell script: +An easy way to generate a token is using the [oauth_issue_token](admin-api.md#oauth_issue_token) command with the ejabberdctl shell script: -``` bash +``` sh ejabberdctl oauth_issue_token user1@localhost 3600 ejabberd:admin r9KFladBTYJS71OggKCifo0GJwyT7oY4 [<<"ejabberd:admin">>] 3600 seconds @@ -166,92 +124,57 @@ You will get redirected to an URL similar to: Take note of the access_token value, as this will be used later. --> -The users can generate tokens themselves -by visiting -`/oauth/authorization_token` in a webview in your application or in a -web browser. +The users can generate tokens themselves by visiting `/oauth/authorization_token` in a webview in your application or in a web browser. For example, URL can be: - http://example.net:5280/oauth/authorization_token?response_type=token&client_id=Client1&redirect_uri=http://client.uri&scope=get_roster+sasl_auth + `http://example.net:5280/oauth/authorization_token?response_type=token&client_id=Client1&redirect_uri=http://client.uri&scope=get_roster+sasl_auth` -**Note:** To use the `get_roster` scope, enable `mod_admin_extra`, because the -[get_roster](/developer/ejabberd-api/admin-api/#get-roster) - API is defined in that module. Otherwise, the command is unknown and you -will get an `invalid_scope` error. +**Note:** To use the `get_roster` scope, enable `mod_admin_extra`, because the [get_roster](admin-api.md#get_roster) API is defined in that module. Otherwise, the command is unknown and you will get an `invalid_scope` error. See [Module configuration](#module-configuration) for details. Parameters are described in OAuth 2.0 specification: - `response_type`: Should be `token`. - `client_id`: This is the name of the application that is asking for Oauth token. -- [`scope`](#scopes): This is the scope of the rights being delegated to the - application. It will limit the feature the application can perform - and thus ensure the user is not giving away more right than expected - by the application. As a developer, you should always limit the - scope to what you actually need. -- [`redirect_uri`](#redirect-uri): After token is generated, token is passed to the - application using the redirect URI. It can obviously work for web - applications, but also for mobile applications, using a redirect URI - that the mobile application have registered: Proper code for - handling the token will thus be executed directly in the mobile - application. -- `state`: State parameter is optional and use by client to pass - information that will be passed as well as state parameter in the - redirect URI. - -Directing the user to this URL will present an authentication form -summarizing what is the app requiring the token and the scope / rights -that are going to be granted. - -The user can then put their login and password to confirm that they -accept granting delegating rights and confirm the token generation. -If the provided credentials are valid, the browser or webview will -redirect the user to the redirect_uri, to actually let ejabberd pass -the token to the app that requested it. It can be either a Web app or -`a mobile / desktop application. - -# redirect_uri - -The `redirect_uri` originally passed in the authorization_token -request will be called on successful validation of user credentials, -with added parameters. +- [`scope`](#scopes): This is the scope of the rights being delegated to the application. It will limit the feature the application can perform and thus ensure the user is not giving away more right than expected by the application. As a developer, you should always limit the scope to what you actually need. +- [`redirect_uri`](#redirect_uri): After token is generated, token is passed to the application using the redirect URI. It can obviously work for web applications, but also for mobile applications, using a redirect URI that the mobile application have registered: Proper code for handling the token will thus be executed directly in the mobile application. +- `state`: State parameter is optional and use by client to pass information that will be passed as well as state parameter in the redirect URI. + +Directing the user to this URL will present an authentication form summarizing what is the app requiring the token and the scope / rights that are going to be granted. + +The user can then put their login and password to confirm that they accept granting delegating rights and confirm the token generation. +If the provided credentials are valid, the browser or webview will redirect the user to the redirect_uri, to actually let ejabberd pass the token to the app that requested it. It can be either a Web app or `a mobile / desktop application. + +## redirect_uri + +The `redirect_uri` originally passed in the authorization_token request will be called on successful validation of user credentials, with added parameters. For example, redirect URI called by ejabberd can be: - http://client.uri/?access_token=RHIT8DoudzOctdzBhYL9bYvXz28xQ4Oj&token_type=bearer&expires_in=3600&scope=user_get_roster+sasl_auth&state= +`http://client.uri/?access_token=RHIT8DoudzOctdzBhYL9bYvXz28xQ4Oj&token_type=bearer&expires_in=3600&scope=user_get_roster+sasl_auth&state=` Parameters are described in OAuth specification: -- `access_token`: This is the actual token that the client - application can use for OAuth authentication. +- `access_token`: This is the actual token that the client application can use for OAuth authentication. - `token_type`: ejabberd supports `bearer` token type. -- `expires_in`: This is the validity duration of the token, in - seconds. When the token expires, a new authorization token will need - to be generated an approved by the user. +- `expires_in`: This is the validity duration of the token, in seconds. When the token expires, a new authorization token will need to be generated an approved by the user. -- `scope`: Confirms the granted scope to the requesting - application. Several scopes can be passed, separated by '+'. -- `state`: If a state parameter was passed by requesting application - in authorization_token URL, it will be passed back to the - application as a parameter of the `redirect_uri` to help with the - client workflow. +- `scope`: Confirms the granted scope to the requesting application. Several scopes can be passed, separated by '+'. +- `state`: If a state parameter was passed by requesting application in authorization_token URL, it will be passed back to the + application as a parameter of the `redirect_uri` to help with the client workflow. -# Scopes +## Scopes -- `sasl_auth`: This scope is use to generate a token that can login - over XMPP using SASL X-OAUTH2 mechanism. +- `sasl_auth`: This scope is use to generate a token that can login over XMPP using SASL X-OAUTH2 mechanism. - `ejabberd:admin` - `ejabberd:user` -- Scopes for each existing [API command](/developer/ejabberd-api/admin-api/). - For example, there is a scope `registered_users` - because there is a command called - [registered_users](/developer/ejabberd-api/admin-api/#registered-users). - Ensure you enable the module that defines the command that you want to use, - see [Module configuration](#module-configuration) for details. +- Scopes for each existing [API command](admin-api.md). + For example, there is a scope `registered_users` because there is a command called [registered_users](admin-api.md#registered-users). + Ensure you enable the module that defines the command that you want to use, see [Module configuration](#module-configuration) for details. -# X-OAuth2 Authentication +## X-OAuth2 Authentication -You can connect to ejabberd using an X-OAUTH2 token that is valid in -the scope `sasl_auth`. You can use an OAuth token as generated in the -previous steps instead of a password when connecting to ejabberd -servers support OAuth SASL mechanism. +You can connect to ejabberd using an X-OAUTH2 token that is valid in the scope `sasl_auth`. You can use an OAuth token as generated in the previous steps instead of a password when connecting to ejabberd servers support OAuth SASL mechanism. -When enabled, X-OAUTH2 SASL mechanism is advertised in server stream -features: +When enabled, X-OAUTH2 SASL mechanism is advertised in server stream features: - - - - - - PLAIN - DIGEST-MD5 - X-OAUTH2 - SCRAM-SHA-1 - - - -Authentication with X-OAUTH2 is done by modifying the SASL auth -element as follow: +``` xml + + + + + PLAIN + DIGEST-MD5 + X-OAUTH2 + SCRAM-SHA-1 + + +``` - - - base64("\0" + user_name + "\0" + oauth_token) - +Authentication with X-OAUTH2 is done by modifying the SASL auth element as follow: -The content in the auth element should be the base64 encoding of a -string containing a null byte, followed by the user name, another null -byte and the string representation of the user’s OAuth token. This is -similar to how to authenticate with a password using the PLAIN -mechanism, except the token is added instead of the user’s password. +``` xml + + base64("\0" + user_name + "\0" + oauth_token) + +``` -The response is standard for SASL XMPP authentication. For example, on -success, server will reply with: +The content in the auth element should be the base64 encoding of a string containing a null byte, followed by the user name, another null byte and the string representation of the user’s OAuth token. +This is similar to how to authenticate with a password using the PLAIN mechanism, except the token is added instead of the user’s password. - - +The response is standard for SASL XMPP authentication. For example, on success, server will reply with: + +``` xml + +``` -# ReST Example +## ReST Example -It is possible to use OAuth to authenticate a client when -attempting to perform a ReST or XML-RPC query. +It is possible to use OAuth to authenticate a client when attempting to perform a ReST or XML-RPC query. -## Configuring +### Configuring -First of all check all the required options are setup -([listener](#ejabberd-listeners), -[OAuth](#oauth-specific-parameters), -[API](/developer/ejabberd-api/permissions/) -and [ACL](/admin/configuration/basic/#acl)): +First of all check all the required options are setup ([listener](#ejabberd-listeners), [OAuth](#oauth-specific-parameters), [API](permissions.md) and [ACL](../../admin/configuration/basic.md#acl)): ``` yaml listen: @@ -356,18 +268,17 @@ modules: Register the account with admin rights, and another one used for the queries: -``` bash +``` sh ejabberdctl register user1 localhost asd ejabberdctl register user2 localhost asd ejabberdctl add_rosteritem user2 localhost tom localhost Tom "" none ``` -## Obtain bearer token +### Obtain bearer token -Obtain a bearer token as explained in [authorization_token](#authorization-token), -either using `ejabberdctl`: +Obtain a bearer token as explained in [authorization_token](#authorization_token), either using `ejabberdctl`: -```bash +``` sh ejabberdctl oauth_issue_token user1@localhost 3600 ejabberd:admin r9KFladBTYJS71OggKCifo0GJwyT7oY4 [<<"ejabberd:admin">>] 3600 seconds ``` @@ -382,19 +293,16 @@ Or using a web browser: This redirects to a new URL which contains the access_token, for example: - - http://localhost:5280/oauth/authorization_token?access_token=r9KFladBTYJS71OggKCifo0GJwyT7oY4&token_type=bearer&expires_in=31536000&scope=ejabberd:admin&state= - +`http://localhost:5280/oauth/authorization_token?access_token=r9KFladBTYJS71OggKCifo0GJwyT7oY4&token_type=bearer&expires_in=31536000&scope=ejabberd:admin&state=` -## Passing credentials +### Passing credentials -When using ReST, the client authorization is done by using a bearer token -(no need to pass the user and host parameters). +When using ReST, the client authorization is done by using a bearer token (no need to pass the user and host parameters). For that, include an Authorization HTTP header like: - - Authorization: Bearer r9KFladBTYJS71OggKCifo0GJwyT7oY4 - +``` sh +Authorization: Bearer r9KFladBTYJS71OggKCifo0GJwyT7oY4 +``` -## Query examples +### Query examples Let's use `curl` to get the list of registered_users with a HTTP GET query: -``` bash +``` sh curl -X GET \ -H "Authorization: Bearer r9KFladBTYJS71OggKCifo0GJwyT7oY4" \ http://localhost:5280/api/registered_users?host=localhost @@ -428,21 +336,19 @@ curl -X GET \ Or provide the bearer token with this option: -``` bash +``` sh curl -X GET \ --oauth2-bearer r9KFladBTYJS71OggKCifo0GJwyT7oY4 \ http://localhost:5280/api/registered_users?host=localhost ``` -With a command like [get_roster](/developer/ejabberd-api/admin-api/#get-roster) -you can get your own roster, or act as an admin to get any user roster. +With a command like [get_roster](admin-api.md#get_roster) you can get your own roster, or act as an admin to get any user roster. -The HTTP endpoint does not take any parameter, so we can just do an -HTTP POST with empty JSON structure list (see `-d` option). +The HTTP endpoint does not take any parameter, so we can just do an HTTP POST with empty JSON structure list (see `-d` option). In this example let's use a HTTP POST query: -``` bash +``` sh curl -v -X POST \ --oauth2-bearer r9KFladBTYJS71OggKCifo0GJwyT7oY4 \ http://localhost:5280/api/get_roster \ @@ -451,7 +357,6 @@ curl -v -X POST \ [{"jid":"tom@localhost","nick":"Tom","subscription":"none","ask":"none","group":""}] ``` - -# XML-RPC Example +## XML-RPC Example For XML-RPC, credentials must be passed as XML-RPC parameters, including token but also user and host parameters. This is for legacy @@ -471,155 +376,161 @@ host implicit, thanks to bearer token. Here is an (Erlang) XML-RPC example on how to get your own roster: - - xmlrpc:call({127, 0, 0, 1}, 4560, "/", - {call, get_roster, [ - {struct, [{user, "peter"}, - {server, "example.com"}, - {token, "0n6LaEjyAOxVDyZChzZfoKMYxc8uUk6L"}]}]}, - false, 60000, "Host: localhost\r\n", []). +``` erlang +xmlrpc:call({127, 0, 0, 1}, 4560, "/", + {call, get_roster, [ + {struct, [{user, "peter"}, + {server, "example.com"}, + {token, "0n6LaEjyAOxVDyZChzZfoKMYxc8uUk6L"}]}]}, + false, 60000, "Host: localhost\r\n", []). +``` This will lead to sending this XML-RPC payload to server: - - - - get_roster - - - - - - server - - example.com - - - - user - - peter - - - - token - - 0n6LaEjyAOxVDyZChzZfoKMYxc8uUk6L - - - - - - - +``` xml + + + get_roster + + + + + + server + + example.com + + + + user + + peter + + + + token + + 0n6LaEjyAOxVDyZChzZfoKMYxc8uUk6L + + + + + + + +``` To get roster of other user using admin authorization, this erlang XML-RPC code can be used: - - xmlrpc:call({127, 0, 0, 1}, 4560, "/", - {call, get_roster, [ - {struct, [{user, "admin"}, - {server, "example.com"}, - {token, "0n6LaEjyAOxVDyZChzZfoKMYxc8uUk6L"} - {admin, true}]}, - {struct, [{user, "peter"}, - {server, "example.com"}]}]}, - false, 60000, "Host: localhost\r\n", []). +``` erlang +xmlrpc:call({127, 0, 0, 1}, 4560, "/", + {call, get_roster, [ + {struct, [{user, "admin"}, + {server, "example.com"}, + {token, "0n6LaEjyAOxVDyZChzZfoKMYxc8uUk6L"} + {admin, true}]}, + {struct, [{user, "peter"}, + {server, "example.com"}]}]}, + false, 60000, "Host: localhost\r\n", []). +``` This is an equivalent Python 2 script: - - import xmlrpclib +``` python +import xmlrpclib - server_url = 'http://127.0.0.1:4560' - server = xmlrpclib.ServerProxy(server_url) +server_url = 'http://127.0.0.1:4560' +server = xmlrpclib.ServerProxy(server_url) - LOGIN = {'user': 'admin', - 'server': 'example.com', - 'token': '0n6LaEjyAOxVDyZChzZfoKMYxc8uUk6L', - 'admin': True} +LOGIN = {'user': 'admin', + 'server': 'example.com', + 'token': '0n6LaEjyAOxVDyZChzZfoKMYxc8uUk6L', + 'admin': True} - def calling(command, data): - fn = getattr(server, command) - return fn(LOGIN, data) +def calling(command, data): + fn = getattr(server, command) + return fn(LOGIN, data) - print calling('get_roster', {'user':'peter', 'server':'example.com'}) +print calling('get_roster', {'user':'peter', 'server':'example.com'}) +``` And this is an equivalent Python 3 script: - - from xmlrpc import client +``` python +from xmlrpc import client - server_url = 'http://127.0.0.1:4560' - server = client.ServerProxy(server_url) +server_url = 'http://127.0.0.1:4560' +server = client.ServerProxy(server_url) - LOGIN = {'user': 'admin', - 'server': 'example.com', - 'token': '0n6LaEjyAOxVDyZChzZfoKMYxc8uUk6L', - 'admin': True} +LOGIN = {'user': 'admin', + 'server': 'example.com', + 'token': '0n6LaEjyAOxVDyZChzZfoKMYxc8uUk6L', + 'admin': True} - def calling(command, data): - fn = getattr(server, command) - return fn(LOGIN, data) +def calling(command, data): + fn = getattr(server, command) + return fn(LOGIN, data) - result = calling('get_roster', {'user':'peter', 'server':'example.com'}) - print(result) +result = calling('get_roster', {'user':'peter', 'server':'example.com'}) +print(result) +``` Those calls would send this XML to server: - - - - get_roster - - - - - - admin - - 1 - - - - server - - example.com - - - - user - - admin - - - - token - - 0n6LaEjyAOxVDyZChzZfoKMYxc8uUk6L - - - - - - - - - - user - - peter - - - - server - - example.com - - - - - - - +``` xml + + + get_roster + + + + + + admin + + 1 + + + + server + + example.com + + + + user + + admin + + + + token + + 0n6LaEjyAOxVDyZChzZfoKMYxc8uUk6L + + + + + + + + + + user + + peter + + + + server + + example.com + + + + + + + +``` diff --git a/content/developer/ejabberd-api/permissions.md b/content/developer/ejabberd-api/permissions.md old mode 100755 new mode 100644 index 1d2ba72f..124eaaf7 --- a/content/developer/ejabberd-api/permissions.md +++ b/content/developer/ejabberd-api/permissions.md @@ -1,17 +1,12 @@ ---- -title: API Permissions -toc: true -menu: Permissions -order: 16 ---- +# API Permissions -This page describes the new flexible permission mechanism introduced in -ejabberd 16.12. + + +This page describes ejabberd's flexible permission mechanism. Access to all available endpoints are configured using `api_permissions` option. -It allows to define multiple groups, each one with separate list of filters -on who and what are allowed by rules specified inside it. +It allows to define multiple groups, each one with separate list of filters on who and what are allowed by rules specified inside it. Basic rule looks like this: @@ -28,14 +23,11 @@ api_permissions: - mod_http_api ``` -It tells that group named `Admin access` allows all users that are accepted by -ACL rule `admin` to execute all commands except command `stop`, using the command-line tool `ejabberdctl` or sending a ReST query handled by `mod_http_api`. +It tells that group named `Admin access` allows all users that are accepted by ACL rule `admin` to execute all commands except command `stop`, using the command-line tool `ejabberdctl` or sending a ReST query handled by `mod_http_api`. -Each group has associated name (that is just used in log messages), `who` section -for rules that authentication details must match, `what` section for specifying -list of command, and `from` with list of modules that API was delivered to. +Each group has associated name (that is just used in log messages), `who` section for rules that authentication details must match, `what` section for specifying list of command, and `from` with list of modules that API was delivered to. -# Rules inside `who` section +## Rules inside `who` section There are 3 types of rules that can be placed in `who` section: @@ -43,19 +35,19 @@ There are 3 types of rules that can be placed in `who` section: or the short version: *Name | ACLRule* This accepts a command when the authentication provided matches - rules of `Name` - [Access Control List](/admin/configuration/basic/#acl) + rules of `Name` + [Access Control List](../../admin/configuration/basic.md#acl) (or inline rules from `ACLDefinition` or `ACLRule`) - **access:** *Name | AccessDefinition* This allows execution if - the [Access Rule](/admin/configuration/basic/#access-rules) + the [Access Rule](../../admin/configuration/basic.md#access-rules) `Name` or inline `AccessDefinition` returns `allowed` for command's authentication details - **oauth:** *ListOfRules* This rule (and only this) will match for commands that were executed - with [OAuth](/developer/ejabberd-api/oauth/) authentication. + with [OAuth](oauth.md) authentication. Inside ListOfRules you can use any rule described above (`acl: Name`, `AClName`, `access: Name`) and additionally you must include `scope: ListOfScopeNames` with OAuth @@ -63,16 +55,14 @@ There are 3 types of rules that can be placed in `who` section: in command authentication. `who` allows the command to be executed if at least one rule matches. -If you want to require several rules to match at this same time, -use `access` (see examples below). -Missing `who` rule is equivalent to `who: none` which will stop group -from accepting any command. +If you want to require several rules to match at this same time, use `access` (see examples below). + +Missing `who` rule is equivalent to `who: none` which will stop group from accepting any command. -## Examples of `who` rules +### Examples of `who` rules -This accepts user `admin@server.com` or commands originating -from localhost: +This accepts user `admin@server.com` or commands originating from localhost: ``` yaml who: @@ -80,8 +70,7 @@ who: ip: 127.0.0.1/8 ``` -This only allows execution of a command if it's invoked by user -`admin@server.com` and comes from localhost address. +This only allows execution of a command if it's invoked by user `admin@server.com` and comes from localhost address. If one of those restrictions isn't satisfied, execution will fail: ``` yaml @@ -92,8 +81,7 @@ who: ip: 127.0.0.1/8 ``` -Those rules match for users from `muc_admin` ACL both using regular -authentication and OAuth): +Those rules match for users from `muc_admin` ACL both using regular authentication and OAuth: ``` yaml who: @@ -107,24 +95,21 @@ who: acl: muc_admin ``` -# Rules in `what` section +## Rules in `what` section Rules in `what` section are constructed from `"strings"` literals. You can use: -- *"command_name"* of an existing [API command](/developer/ejabberd-api/admin-api/) +- *"command_name"* of an existing [API command](admin-api.md) - *command_name* is same as before, but no need to provide `"` - **"*"** is a wildcard rule to match all commands - **"[tag:** *tagname* **]"** allows all commands that have been declared with tag `tagname`. You can consult the list of tags and their commands with: `ejabberdctl help tags` -Additionally each rule can be prepended with `!` character to change -it into negative assertion rule. Command names that would match what is -after `!` character will be removed from list of allowed commands. +Additionally each rule can be prepended with `!` character to change it into negative assertion rule. Command names that would match what is after `!` character will be removed from list of allowed commands. -Missing `what` rule is equivalent to `what: "!*"` which will stop group -from accepting any command. +Missing `what` rule is equivalent to `what: "!*"` which will stop group from accepting any command. -## Example of `what` rules +### Example of `what` rules This allows execution of all commands except command `stop`: @@ -151,22 +136,15 @@ what: - "!*" ``` -# Rules in `from` section - -This section allows to specify list of allowed module names that expose API -to outside world. Currently those modules are `ejabberd_xmlrpc`, `mod_http_api` -and `ejabberd_ctl`. +## Rules in `from` section -If `from` section is missing from group then all endpoints are accepted, -if it's specified endpoint must be listed inside it to be allowed to execute. +This section allows to specify list of allowed module names that expose API to outside world. Currently those modules are `ejabberd_xmlrpc`, `mod_http_api` and `ejabberd_ctl`. +If `from` section is missing from group then all endpoints are accepted, if it's specified endpoint must be listed inside it to be allowed to execute. -# Examples +## Examples -Those rules allow execution of any command invoked -by `ejabberdctl` shell command, or all command except `start` and `stop` -for users in ACL admin, with regular authentication or `ejabberd:admin` -scoped OAuth tokens. +Those rules allow execution of any command invoked by `ejabberdctl` shell command, or all command except `start` and `stop` for users in ACL admin, with regular authentication or `ejabberd:admin` scoped OAuth tokens. ``` yaml api_permissions: diff --git a/content/developer/ejabberd-api/simple-configuration.md b/content/developer/ejabberd-api/simple-configuration.md old mode 100755 new mode 100644 index f36f8711..634d4cae --- a/content/developer/ejabberd-api/simple-configuration.md +++ b/content/developer/ejabberd-api/simple-configuration.md @@ -1,9 +1,4 @@ ---- -title: Simple ejabberd Rest API Configuration -menu: Simple Config -order: 0 -toc: true ---- +# Simple ejabberd Rest API Configuration -# Restrict to Local network +## Restrict to Local network If you are planning to use ejabberd API for admin purpose, it is often enough to configure it to be available local commands. Access is thus generally limited by IP addresses, either restricted to localhost only, or restricted to one of your platform back-end. -1. Make sure an [ejabberd_http](/admin/configuration/listen/#ejabberd-http) -listener is using [mod_http_api](/admin/configuration/modules/#mod-http-api) - on a given root URL and on a desired port: +1. Make sure an [ejabberd_http](../../admin/configuration/listen.md#ejabberd_http) listener is using [mod_http_api](../../admin/configuration/modules.md#mod_http_api) on a given root URL and on a desired port: ``` yaml listen: @@ -30,7 +23,7 @@ listener is using [mod_http_api](/admin/configuration/modules/#mod-http-api) ip: 127.0.0.1 request_handlers: /api: mod_http_api - ``` + ``` The `ip` option ensures it listens only on the local interface (127.0.0.1) instead of listening on all interface (0.0.0.0). @@ -51,16 +44,15 @@ listener is using [mod_http_api](/admin/configuration/modules/#mod-http-api) 3. Now you can query the API, for example: - ``` bash + ``` sh curl '127.0.0.1:5281/api/registered_users?host=localhost' ["user2","user8"] ``` -# Encryption +## Encryption -If you already defined certificates and your connection is not on a local network, -you may want to use encryption. +If you already defined certificates and your connection is not on a local network, you may want to use encryption. 1. Setup encryption like this: @@ -76,7 +68,7 @@ you may want to use encryption. 2. Now you can query using HTTPS: - ``` bash + ``` sh curl 'https://127.0.0.1:5281/api/registered_users?host=localhost' ["user2","user8"] @@ -84,16 +76,15 @@ you may want to use encryption. 3. If you are using a self-signed certificate, you can bypass the corresponding error message: - ``` bash + ``` sh curl --insecure 'https://127.0.0.1:5281/api/registered_users?host=localhost' ["user2","user8"] ``` -# Basic Authentication +## Basic Authentication -Quite probably you will want to require authentication to execute API queries, -either using basic auth or OAuth. +Quite probably you will want to require authentication to execute API queries, either using basic auth or OAuth. 1. Assuming you have the simple listener: @@ -105,7 +96,7 @@ either using basic auth or OAuth. ip: 127.0.0.1 request_handlers: /api: mod_http_api - ``` + ``` 2. Define an ACL with the account that you will use to authenticate: @@ -128,16 +119,15 @@ either using basic auth or OAuth. what: "*" ``` -4. If that account does not yet exist, - [register it](/admin/installation/#administration-account): +4. If that account does not yet exist, register it: - ``` bash + ``` sh ejabberdctl register john localhost somePass ``` 5. Now, when sending an API query, provide the authentication for that account: - ``` bash + ``` sh curl --basic --user john@localhost:somePass \ '127.0.0.1:5281/api/registered_users?host=localhost' @@ -159,13 +149,11 @@ either using basic auth or OAuth. print(res.text) ``` -# OAuth Authentication +## OAuth Authentication -Before using OAuth to interact with ejabberd API, -you need to configure [OAuth support in ejabberd](/developer/ejabberd-api/oauth/). +Before using OAuth to interact with ejabberd API, you need to configure [OAuth support in ejabberd](oauth.md). -Here are example entries to check / change in your ejabberd -configuration file: +Here are example entries to check / change in your ejabberd configuration file: 1. Add a request handler for OAuth: @@ -184,7 +172,7 @@ configuration file: /oauth: ejabberd_oauth ``` -2. Set the [oauth_access](/admin/configuration/toplevel/#oauth-access) +2. Set the [oauth_access](../../admin/configuration/toplevel.md#oauth_access) top-level option to allow token creation: ``` yaml @@ -214,15 +202,15 @@ configuration file: what: "*" ``` -5. If that account does not yet exist, - [register it](/admin/installation/#administration-account): +5. If that account does not yet exist, register it: - ``` bash + ``` sh ejabberdctl register john localhost somePass ``` 6. Request an authorization token. A quick way is using ejabberdctl: - ``` bash + + ``` sh ejabberdctl oauth_issue_token user123@localhost 3600 ejabberd:admin erHymcBiT2r0QsuOpDjIrsEvnOS4grkj [<<"ejabberd:admin">>] 3600 seconds ``` @@ -244,4 +232,3 @@ configuration file: ["user2","user8","john"] ``` - diff --git a/content/developer/elixir.md b/content/developer/elixir.md deleted file mode 100755 index 2f013d3c..00000000 --- a/content/developer/elixir.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect: /developer/extending-ejabberd/elixir/ ---- - diff --git a/content/developer/extending-ejabberd/architecture.md b/content/developer/extending-ejabberd/architecture.md old mode 100755 new mode 100644 index 45c386a3..f178897d --- a/content/developer/extending-ejabberd/architecture.md +++ b/content/developer/extending-ejabberd/architecture.md @@ -1,60 +1,34 @@ ---- -title: ejabberd Architecture -menu: Architecture ---- +# Architecture -This section contains information to help your understand ejabberd -architecture and will explain how to integrate ejabberd properly into -your overall infrastructure. +This section contains information to help your understand ejabberd architecture and will explain how to integrate ejabberd properly into your overall infrastructure. -# Overview +## Overview -ejabberd is a configurable system where modules can be enabled or -disabled based on customer requirements. Users can connect not only -from a regular PC but also from mobile devices and from the web. User -data can be stored internally in Mnesia or in one of the support SQL -or NoSQL backend. Users can be totally managed by your own backend -through a ReST interface. +ejabberd is a configurable system where modules can be enabled or disabled based on customer requirements. Users can connect not only from a regular PC but also from mobile devices and from the web. User data can be stored internally in Mnesia or in one of the support SQL or NoSQL backend. +Users can be totally managed by your own backend through a ReST interface. -ejabberd internal architecture is organised around its router. Most of -the other elements are plugins that can be adapted, enhanced or -replaced to build a custom solution tailored to your needs. +ejabberd internal architecture is organised around its router. Most of the other elements are plugins that can be adapted, enhanced or replaced to build a custom solution tailored to your needs. -ejabberd support a core concept of XMPP: Federation. Federation is a -mechanism allowing different independent XMPP servers and clusters to -communicate with each other. +ejabberd support a core concept of XMPP: Federation. Federation is a mechanism allowing different independent XMPP servers and clusters to communicate with each other. Here is a high level diagram of ejabberd internal architecture: -[![][image-1]](/static/images/architect/ejabberd_internals.pdf) +![image-1](./images/ejabberd_internals.png) -[*Click for large size PDF*](/static/images/architect/ejabberd_internals.pdf) +## Typical large scale deployments -# Typical large scale deployments +Here is a diagram for a typical ejabberd large scale deployment. It can scale massively and rely on several back-ends. -Here is a diagram for a typical ejabberd large scale deployment. It -can scale massively and rely on several back-ends. +![image-2](./images/ejabberd_large_scale.png) -[![][image-2]](/static/images/architect/ejabberd_large_scale.pdf) +Note that ejabberd ejabberd support a core concept of XMPP: Federation. +Federation is a mechanism allowing different independent XMPP servers and clusters to communicate with each other. +This is a purely optional layer, but it can help integrate with the rest of the world. +It is also sometimes internally by companies to group users in subsidiaries or regions. -[*Click for large size PDF*](/static/images/architect/ejabberd_large_scale.pdf) +## Virtual hosting -Note that ejabberd ejabberd support a core concept of XMPP: -Federation. Federation is a mechanism allowing different independent -XMPP servers and clusters to communicate with each other. This is a -purely optional layer, but it can help integrate with the rest of the -world. It is also sometimes internally by companies to group users in -subsidiaries or regions. +If you need to manage several small XMPP domains, ejabberd supports virtual hosting. + It means you can host as many domain as you want on a single ejabberd deployment. -# Virtual hosting - -If you need to manage several small XMPP domains, ejabberd supports -virtual hosting. It means you can host as many domain as you want on a -single ejabberd deployment. - -Instances can be made to be totally independent and invisible for each -other if needed (or they can communicate as they would through -federation). - -[image-1]: /static/images/architect/ejabberd_internals.png -[image-2]: /static/images/architect/ejabberd_large_scale.png +Instances can be made to be totally independent and invisible for each other if needed (or they can communicate as they would through federation). diff --git a/content/developer/extending-ejabberd/elixir.md b/content/developer/extending-ejabberd/elixir.md old mode 100755 new mode 100644 index 9e362e3f..42178063 --- a/content/developer/extending-ejabberd/elixir.md +++ b/content/developer/extending-ejabberd/elixir.md @@ -1,12 +1,8 @@ ---- -title: ejabberd for Elixir Developers -menu: Elixir Dev -toc: true ---- +# ejabberd for Elixir Developers -
improved in 21.07
+ -# Building ejabberd with Mix +## Building ejabberd with Mix You can build ejabberd with [Elixir](https://elixir-lang.org/) `mix` tool. This allows ejabberd to use Elixir libraries @@ -18,43 +14,42 @@ Also, if using Erlang/OTP 24, then Elixir 1.11.4 or higher is required. 1. Make sure you have the - [requirements](/admin/installation/#requirements) + [requirements](../../admin/install/source.md/#requirements) installed. On MacOS you need to use Homebrew and - [set up your environment](/admin/installation/#macos). + [set up your environment](../../admin/install/homebrew.md). 1. Clone ejabberd project from Github: - ~~~ bash + ``` sh git clone https://github.com/processone/ejabberd.git cd ejabberd - ~~~ + ``` -1. [Compile](/admin/installation/#compilation) ejabberd: +1. [Compile](../../admin/install/source.md/#compilation) ejabberd: - ~~~ bash + ``` sh ./autogen.sh ./configure --with-rebar=mix make - ~~~ + ``` -1. [Build a development release](/admin/installation/#development-release): +1. [Build a development release](../../admin/install/source.md/#development-release): - ~~~ bash + ``` sh make dev - ~~~ + ``` 1. There are many ways to start ejabberd, using the `ejabberdctl` or `ejabberd` scripts: - ~~~ bash + ``` sh _build/prod/rel/ejabberd/bin/ejabberdctl iexlive _build/prod/rel/ejabberd/bin/ejabberdctl live _build/prod/rel/ejabberd/bin/ejabberd start_iex - ... - ~~~ + ``` 1. You should see that ejabberd is properly started: - ~~~ bash + ``` iex Erlang/OTP 23 [erts-11.1.8] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:1] 2021-08-03 13:37:36.561603+02:00 [info] Loading configuration from /home/bernar/e/git/ejabberd/_build/dev/rel/ejabberd/etc/ejabberd/ejabberd.yml @@ -65,22 +60,19 @@ Also, if using Erlang/OTP 24, then Elixir 1.11.4 or higher is required. Interactive Elixir (1.10.3) - press Ctrl+C to exit (type h() ENTER for help) iex(ejabberd@localhost)1> - ~~~ + ``` 1. Now that ejabberd starts correctly, adapt to your needs the default ejabberd configuration file located at `_build/dev/rel/ejabberd/etc/ejabberd/ejabberd.yml` For example, enable this example Elixir ejabberd module: - ~~~ yaml + ``` yaml modules: 'ModPresenceDemo': {} mod_adhoc: {} - ... - ~~~ - -
new in 16.02
+ ``` -# Embed ejabberd in an elixir app +## Embed ejabberd in an elixir app ejabberd is available as an Hex.pm application: [ejabberd on hex.pm](https://hex.pm/packages/ejabberd). @@ -93,63 +85,61 @@ This makes the management of your ejabberd plugins easier and cleaner. To create your own application depending on ejabberd, you can go through the following steps: - 1. Create a new Elixir app using `mix`: - ~~~ bash + ``` sh mix new ejapp cd ejapp - ~~~ + ``` 1. Add [ejabberd package](https://hex.pm/packages/ejabberd) as a dependency in your `mix.exs` file: - ~~~ elixir + ``` elixir defmodule Ejapp.MixProject do - ... defp deps do [ {:ejabberd, "~> 21.7"} ] end end - ~~~ + ``` 1. Compile everything: - ~~~ bash + ``` sh mix do deps.get, compile - ~~~ + ``` 1. Create paths and files for ejabberd: - ~~~ bash + ``` sh mkdir config mkdir logs mkdir mnesia wget -O config/ejabberd.yml https://raw.githubusercontent.com/processone/ejabberd/master/ejabberd.yml.example - ~~~ + ``` 1. Define those paths in `config/config.exs`: - ~~~ elixir + ``` elixir import Config config :ejabberd, file: "config/ejabberd.yml", log_path: 'logs/ejabberd.log' config :mnesia, dir: 'mnesia/' - ~~~ + ``` 1. Start your app, ejabberd will be started as a dependency: - ~~~ bash + ``` sh iex -S mix - ~~~ + ``` 1. You should see that ejabberd is properly started: - ~~~ bash + ``` iex Erlang/OTP 23 [erts-11.1.8] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:1] Compiling 1 file (.ex) @@ -165,17 +155,17 @@ through the following steps: Interactive Elixir (1.10.3) - press Ctrl+C to exit (type h() ENTER for help) iex(1)> - ~~~ + ``` 1. Register user from Elixir console: - ~~~ elixir + ``` elixir :ejabberd_auth.try_register("test", "localhost", "passw0rd") - ~~~ + ``` 1. You are all set, you can now connect with an XMPP client ! -# Call elixir code in erlang code +## Call elixir code in erlang code It's possible to use Elixir libraries in an Erlang module, both the ones included in Elixir, or any other you add as a dependency. @@ -185,31 +175,35 @@ This simple example invokes Elixir's as shown in one of its documentation examples, and uses the result in the ejabberd vCard nickname field: -```diff +``` diff --- a/src/mod_vcard.erl +++ b/src/mod_vcard.erl @@ -209,6 +209,7 @@ process_local_iq(#iq{type = get, to = To, lang = Lang} = IQ) -> VCard = case mod_vcard_opt:vcard(ServerHost) of - undefined -> - #vcard_temp{fn = <<"ejabberd">>, -+ nickname = 'Elixir.String':duplicate(<<"abc">>, 2), - url = ejabberd_config:get_uri(), - desc = misc:get_descr(Lang, ?T("Erlang XMPP Server")), - bday = <<"2002-11-16">>}; + undefined -> + #vcard_temp{fn = <<"ejabberd">>, ++ nickname = 'Elixir.String':duplicate(<<"abc">>, 2), + url = ejabberd_config:get_uri(), + desc = misc:get_descr(Lang, ?T("Erlang XMPP Server")), + bday = <<"2002-11-16">>}; ``` Notice that the elixir code: -```elixir + +``` elixir String.duplicate("abc", 2) ``` + is written in erlang as: -```erlang + +``` erlang 'Elixir.String':duplicate(<<"abc">>, 2), ``` + Check [Erlang/Elixir Syntax: A Crash Course](https://elixir-lang.org/crash-course.html) for details. -# Use elixir library in erlang code +## Use elixir library in erlang code This example demonstrates how to add an elixir library as a dependency in ejabberd, and use it in an ejabberd module written in erlang. @@ -219,7 +213,8 @@ elixir library to build a QR code of ejabberd's URI and return it as the server vCard photo. First add the dependency to `mix.exs`: -```diff + +``` diff --- a/mix.exs +++ b/mix.exs @@ -46,7 +46,7 @@ defmodule Ejabberd.MixProject do @@ -241,12 +236,9 @@ First add the dependency to `mix.exs`: {:yconf, "~> 1.0"}] ``` -Then call -[QRCodeEx.encode/2](https://hexdocs.pm/qrcode_ex/QRCodeEx.Encode.html#encode/2), -[QRCodeEx.png/2](https://hexdocs.pm/qrcode_ex/QRCodeEx.PNG.html#png/2), -and provide the result as the photo in the server vcard: +Then call [QRCodeEx.encode/2](https://hexdocs.pm/qrcode_ex/QRCodeEx.Encode.html#encode/2), [QRCodeEx.png/2](https://hexdocs.pm/qrcode_ex/QRCodeEx.PNG.html#png/2), and provide the result as the photo in the server vcard: -```diff +``` diff --- a/src/mod_vcard.erl +++ b/src/mod_vcard.erl @@ -206,9 +206,13 @@ process_local_iq(#iq{type = set, lang = Lang} = IQ) -> @@ -257,51 +249,43 @@ and provide the result as the photo in the server vcard: + PhotoBin = 'Elixir.QRCodeEx':png(PhotoEncoded, [{color, <<17, 120, 0>>}]), + PhotoEl = #vcard_photo{type = <<"image/png">>, binval = PhotoBin}, VCard = case mod_vcard_opt:vcard(ServerHost) of - undefined -> - #vcard_temp{fn = <<"ejabberd">>, -+ photo = PhotoEl, - url = ejabberd_config:get_uri(), - desc = misc:get_descr(Lang, ?T("Erlang XMPP Server")), - bday = <<"2002-11-16">>}; + undefined -> + #vcard_temp{fn = <<"ejabberd">>, ++ photo = PhotoEl, + url = ejabberd_config:get_uri(), + desc = misc:get_descr(Lang, ?T("Erlang XMPP Server")), + bday = <<"2002-11-16">>}; ``` -# Write ejabberd module in elixir +## Write ejabberd module in elixir -If you plan to write an ejabberd module that heavily depends on Elixir dependencies, -you may want to write it in elixir from scratch. +If you plan to write an ejabberd module that heavily depends on Elixir dependencies, you may want to write it in elixir from scratch. -The Elixir source code is placed in the -[ejabberd's lib/](https://github.com/processone/ejabberd/tree/master/lib) path. -Any elixir module placed in `lib/` will be compiled by Mix, -installed with all the other erlang modules, -and available for you to use. +The Elixir source code is placed in the [ejabberd's lib/](https://github.com/processone/ejabberd/tree/master/lib) path. +Any elixir module placed in `lib/` will be compiled by Mix, installed with all the other erlang modules, and available for you to use. -As you can see, there's a file named -[mod_presence_demo.ex](https://github.com/processone/ejabberd/blob/master/lib/mod_presence_demo.ex) -which defines an ejabberd module written in elixir called `ModPresenceDemo`. +As you can see, there's a file named [mod_presence_demo.ex](https://github.com/processone/ejabberd/blob/master/lib/mod_presence_demo.ex) which defines an ejabberd module written in elixir called `ModPresenceDemo`. To enable `ModPresenceDemo`, add it to `ejabberd.yml` like this: -```erlang + +``` erlang modules: 'Elixir.ModPresenceDemo': {} - ... ``` -Let's write a new ejabberd module in elixir, add it to ejabberd's source code, -compile and install it. -This example module requires the QRCodeEx Elixir library, -and adds a simple web page that generates QR code of any given JID. +Let's write a new ejabberd module in elixir, add it to ejabberd's source code, compile and install it. +This example module requires the QRCodeEx Elixir library, and adds a simple web page that generates QR code of any given JID. -1. Copy the [mod_qrcode.ex](#mod-qrcode-ex) source code to ejabberd's `lib/` path: +1. Copy the [mod_qrcode.ex](#mod_qrcodeex) source code to ejabberd's `lib/` path: - ~~~ bash + ``` sh lib/mod_qrcode.ex - ~~~ + ``` 2. Recompile and reinstall ejabberd. 3. Enable the module in `ejabberd.yml`: - ~~~ yaml + ``` yaml listen: - port: 5280 @@ -310,125 +294,112 @@ and adds a simple web page that generates QR code of any given JID. modules: 'Elixir.ModQrcode': {} - ~~~ + ``` 4. When restarting ejabberd, it will show in the logs: - ~~~ + ``` erl 2022-07-06 13:14:35.363081+02:00 [info] Starting ejabberd module Qrcode - ~~~ + ``` 5. Now the ejabberd internal web server provides QR codes of any given JID. Try visiting an URL like `http://localhost:5280/qrcode/anyusername/somedomain/` +## Elixir module in ejabberd-contrib -# Elixir module in ejabberd-contrib - -Using [ejabberd-contrib](https://docs.ejabberd.im/developer/extending-ejabberd/modules/#ejabberd-contrib) -it's possible to install additional ejabberd modules -without compiling ejabberd, or requiring ejabberd source code. +Using [ejabberd-contrib](modules.md#ejabberd-contrib) it's possible to install additional ejabberd modules without compiling ejabberd, or requiring ejabberd source code. This is useful if you install ejabberd using binary installers or a container image. -And it's possible to write a custom module and [Add your module] -(https://docs.ejabberd.im/developer/extending-ejabberd/modules/#add-your-module) -to an existing ejabberd installation... +And it's possible to write a custom module and [Add your module](modules.md#add-your-module) to an existing ejabberd installation... -Let's write a new ejabberd module in elixir, compile and install in an existing -ejabberd deployment without requiring its source code. -This example module adds a simple section listing PIDs -in the users page in ejabberd WebAdmin. +Let's write a new ejabberd module in elixir, compile and install in an existing ejabberd deployment without requiring its source code. +This example module adds a simple section listing PIDs in the users page in ejabberd WebAdmin. 1. First, create this path - ~~~ bash + ``` sh $HOME/.ejabberd-modules/sources/mod_webadmin_pid/lib/ - ~~~ + ``` -2. and copy the [mod_webadmin_pid.ex](#mod-webadmin-pid-ex) source code to: +2. and copy the [mod_webadmin_pid.ex](#mod_webadmin_pidex) source code to: - ~~~ bash + ``` sh $HOME/.ejabberd-modules/sources/mod_webadmin_pid/lib/mod_webadmin_pid.ex - ~~~ + ``` 3. Create a specification file in YAML format as `mod_webadmin_pid.spec` (see examples from ejabberd-contrib). So, create the file - ~~~ bash + ``` sh $HOME/.ejabberd-modules/sources/mod_webadmin_pid/mod_webadmin_pid.spec - ~~~ + ``` with this content: - ~~~ yaml + ``` yaml summary: "Display PIDs in User page in Web Admin" - ~~~ + ``` -4. From that point you should see it as available module: +4. From that point you should see it as available module: - ~~~ bash + ``` sh ejabberdctl modules_available mod_webadmin_pid Display PIDs in User page in Web Admin - ~~~ + ``` 5. Now you can compile and install that module: - ~~~ bash + ``` sh ejabberdctl module_install mod_webadmin_pid - ~~~ + ``` 6. Enable the module in `ejabberd.yml`: - ~~~ yaml + ``` yaml modules: 'Elixir.ModWebAdminPid': {} - ~~~ + ``` -8. When restarting ejabberd, it will show in the logs: +7. When restarting ejabberd, it will show in the logs: - ~~~ + ``` erl 2022-07-06 13:14:35.363081+02:00 [info] Starting ejabberd module WebAdminPid - ~~~ + ``` -9. Finally, go to ejabberd WebAdmin -> Virtual Hosts -> your vhost -> Users -> +8. Finally, go to ejabberd WebAdmin -> Virtual Hosts -> your vhost -> Users -> some online user -> and there will be a new section "PIDs". +## Record definition -# Record definition +To use an erlang record defined in ejabberd's header file, use Elixir's [Record](https://hexdocs.pm/elixir/Record.html) to extract the fields and define an Elixir record with its usage macros. -To use an erlang record defined in ejabberd's header file, -use Elixir's [Record](https://hexdocs.pm/elixir/Record.html) -to extract the fields and define an Elixir record with its usage macros. +For example, add this to the beginning of [mod_presence_demo.ex](https://github.com/processone/ejabberd/blob/master/lib/mod_presence_demo.ex): -For example, add this to the beginning of -[mod_presence_demo.ex](https://github.com/processone/ejabberd/blob/master/lib/mod_presence_demo.ex): +``` elixir +require Record -```elixir - require Record - - Record.defrecord(:presence, - Record.extract(:presence, from_lib: "xmpp/include/xmpp.hrl")) +Record.defrecord(:presence, + Record.extract(:presence, from_lib: "xmpp/include/xmpp.hrl")) ``` -Later you can use those macros, named like your record, -see the [examples](https://hexdocs.pm/elixir/Record.html#defrecord/3-examples). +Later you can use those macros, named like your record, see the [examples](https://hexdocs.pm/elixir/Record.html#defrecord/3-examples). -In our example, let's improve the `on_presence` function -and use the `presence` macros to get the `to` field: +In our example, let's improve the `on_presence` function and use the `presence` macros to get the `to` field: -```elixir - def on_presence(_user, _server, _resource, packet) do - to_jid = presence(packet, :to) - to_str = :jid.to_string(to_jid) - info('Received presence for #{to_str}:~n~p', [packet]) - :none - end +``` elixir +def on_presence(_user, _server, _resource, packet) do + to_jid = presence(packet, :to) + to_str = :jid.to_string(to_jid) + info('Received presence for #{to_str}:~n~p', [packet]) + :none +end ``` -# `mod_qrcode.ex` +## `mod_qrcode.ex` Example ejabberd module written in elixir: -```elixir +``` elixir title="mod_qrcode.ex" defmodule ModQrcode do use Ejabberd.Module @@ -472,11 +443,11 @@ defmodule ModQrcode do end ``` -# `mod_webadmin_pid.ex` +## `mod_webadmin_pid.ex` Example ejabberd module written in elixir: -```elixir +``` elixir title="mod_webadmin_pid.ex" defmodule ModWebAdminPid do use Ejabberd.Module diff --git a/content/developer/extending-ejabberd/images/create_node.png b/content/developer/extending-ejabberd/images/create_node.png new file mode 100644 index 00000000..5ce60754 Binary files /dev/null and b/content/developer/extending-ejabberd/images/create_node.png differ diff --git a/content/developer/extending-ejabberd/images/delete_item.png b/content/developer/extending-ejabberd/images/delete_item.png new file mode 100644 index 00000000..cc81b484 Binary files /dev/null and b/content/developer/extending-ejabberd/images/delete_item.png differ diff --git a/content/developer/extending-ejabberd/images/delete_node.png b/content/developer/extending-ejabberd/images/delete_node.png new file mode 100644 index 00000000..234920e3 Binary files /dev/null and b/content/developer/extending-ejabberd/images/delete_node.png differ diff --git a/content/developer/extending-ejabberd/images/ejabberd_internals.pdf b/content/developer/extending-ejabberd/images/ejabberd_internals.pdf new file mode 100644 index 00000000..5f6918ab Binary files /dev/null and b/content/developer/extending-ejabberd/images/ejabberd_internals.pdf differ diff --git a/content/developer/extending-ejabberd/images/ejabberd_internals.png b/content/developer/extending-ejabberd/images/ejabberd_internals.png new file mode 100644 index 00000000..50d0f7b0 Binary files /dev/null and b/content/developer/extending-ejabberd/images/ejabberd_internals.png differ diff --git a/content/developer/extending-ejabberd/images/ejabberd_large_scale.png b/content/developer/extending-ejabberd/images/ejabberd_large_scale.png new file mode 100644 index 00000000..a9cabeb0 Binary files /dev/null and b/content/developer/extending-ejabberd/images/ejabberd_large_scale.png differ diff --git a/content/developer/extending-ejabberd/images/get_item.png b/content/developer/extending-ejabberd/images/get_item.png new file mode 100644 index 00000000..414301f1 Binary files /dev/null and b/content/developer/extending-ejabberd/images/get_item.png differ diff --git a/content/developer/extending-ejabberd/images/publish_item.png b/content/developer/extending-ejabberd/images/publish_item.png new file mode 100644 index 00000000..1f31860a Binary files /dev/null and b/content/developer/extending-ejabberd/images/publish_item.png differ diff --git a/content/developer/extending-ejabberd/images/purge_node.png b/content/developer/extending-ejabberd/images/purge_node.png new file mode 100644 index 00000000..09348602 Binary files /dev/null and b/content/developer/extending-ejabberd/images/purge_node.png differ diff --git a/content/developer/extending-ejabberd/images/stanza-flow.png b/content/developer/extending-ejabberd/images/stanza-flow.png new file mode 100644 index 00000000..554e33d9 Binary files /dev/null and b/content/developer/extending-ejabberd/images/stanza-flow.png differ diff --git a/content/developer/extending-ejabberd/images/subscribe.png b/content/developer/extending-ejabberd/images/subscribe.png new file mode 100644 index 00000000..62f9c8c6 Binary files /dev/null and b/content/developer/extending-ejabberd/images/subscribe.png differ diff --git a/content/developer/extending-ejabberd/images/unsubscribe.png b/content/developer/extending-ejabberd/images/unsubscribe.png new file mode 100644 index 00000000..482804d3 Binary files /dev/null and b/content/developer/extending-ejabberd/images/unsubscribe.png differ diff --git a/content/developer/extending-ejabberd/index.md b/content/developer/extending-ejabberd/index.md old mode 100755 new mode 100644 index e4410975..b62654cb --- a/content/developer/extending-ejabberd/index.md +++ b/content/developer/extending-ejabberd/index.md @@ -1,7 +1,3 @@ ---- -title: Extending ejabberd -menu: Extending ejabberd -order: 50 ---- +# Extending ejabberd This section will help you learn how to develop ejabberd module to customize it to your own needs. diff --git a/content/developer/extending-ejabberd/localization.md b/content/developer/extending-ejabberd/localization.md old mode 100755 new mode 100644 index 6cdcd9cc..3752d07e --- a/content/developer/extending-ejabberd/localization.md +++ b/content/developer/extending-ejabberd/localization.md @@ -1,28 +1,14 @@ ---- -title: Internationalization and Localization -menu: Localization ---- +# Internationalization and Localization The source code of `ejabberd` supports localization: -all built-in modules support the `xml:lang` attribute inside IQ queries, -and the Web Admin supports the `Accept-Language` HTTP header. +all built-in modules support the `xml:lang` attribute inside IQ queries, and the Web Admin supports the `Accept-Language` HTTP header. There are two ways to improve the translation of a language: -- Edit the corresponding .po file in -[ejabberd-po git repository](https://github.com/processone/ejabberd-po) -with a gettext-compatible -program (Poedit, KBabel, Lokalize, ...). -Then submit a Pull Request. +- Edit the corresponding .po file in [ejabberd-po git repository](https://github.com/processone/ejabberd-po) with a gettext-compatible program (Poedit, KBabel, Lokalize, ...). Then submit a Pull Request. -- Using the -[ejabberd-po Weblate](https://hosted.weblate.org/projects/ejabberd/ejabberd-po/) -online service. +- Using the [ejabberd-po Weblate](https://hosted.weblate.org/projects/ejabberd/ejabberd-po/) online service. -Once the translators have improved the `po` files, -you can run `make translations`. -With that command, the translatable -strings are extracted from source code to generate the file -`ejabberd.pot`. This file is merged with each .po file to produce -updated .po files. Finally those .po files are exported to .msg files, -that have a format easily readable by `ejabberd`. +Once the translators have improved the `po` files, you can run `make translations`. +With that command, the translatable strings are extracted from source code to generate the file `ejabberd.pot`. +This file is merged with each .po file to produce updated .po files. Finally those .po files are exported to .msg files, that have a format easily readable by `ejabberd`. diff --git a/content/developer/extending-ejabberd/modules.md b/content/developer/extending-ejabberd/modules.md old mode 100755 new mode 100644 index 89ca0fde..a1d74f0d --- a/content/developer/extending-ejabberd/modules.md +++ b/content/developer/extending-ejabberd/modules.md @@ -1,55 +1,38 @@ ---- -title: ejabberd Modules Development -menu: Modules Dev -toc: true ---- +# ejabberd Modules Development -# Introduction +## Introduction -ejabberd is based on a modular architecture that makes it highly -customizable and infinitely extensible. +ejabberd is based on a modular architecture that makes it highly customizable and infinitely extensible. Here is an overview of ejabberd internal architecture: -[![][image-1]](/static/images/architect/ejabberd_internals.pdf) +![image1](./images/ejabberd_internals.png) -[*Click for large size PDF*](/static/images/architect/ejabberd_internals.pdf) +## What is a module ? -# What is a module ? +Outside of a few infrastructure core components most of ejabberd features are developed as modules. Modules are used to extend the features of ejabberd (plugins). -Outside of a few infrastructure core components most of ejabberd -features are developed as modules. Modules are used to extend the -features of ejabberd (plugins). +## How to write a custom module ? -# How to write a custom module ? +Ejabberd comes with a lot of modules, but sometimes you may need an unsupported feature from the official sources or maybe you need to write your own custom implementation for your very special needs. -Ejabberd comes with a lot of modules, but sometimes you may need an -unsupported feature from the official sources or maybe you need to -write your own custom implementation for your very special needs. +Each modules is written in either Erlang or Elixir. To use them, you typically declare them in ejabberd configuration file. That's also the place where you can configure the module, by passing supported options to overload its default behaviour. -Each modules is written in either Erlang or Elixir. To use them, you -typically declare them in ejabberd configuration file. That's also the -place where you can configure the module, by passing supported options -to overload its default behaviour. +On ejabberd launch, the server will start all the declared modules. You can start (or stop) them manually from Erlang shell as well. -On ejabberd launch, the server will start all the declared -modules. You can start (or stop) them manually from Erlang shell as -well. +As a convention, module names starts with "mod_", but you can actually call them as you want. -As a convention, module names starts with "mod_", but you can actually -call them as you want. - -# The `gen_mod` behaviour +## The `gen_mod` behaviour All ejabberd modules are implementing the `gen_mod` behaviour. It means that a module must provide the following API: -~~~ erlang +``` erlang start(Host, Opts) -> ok stop(Host) -> ok depends(Host, Opts) -> [] mod_options(Host) -> [] -~~~ +``` Parameters are: @@ -63,13 +46,13 @@ stop time of the server. `Opts` is a lists of options as defined in the configuration file for the module. They can be retrieved with the `gen_mod:get_opt/3` -function. +function. -# mod_hello_world +## mod_hello_world The following code shows the simplest possible module. -~~~ erlang +``` erlang title="mod_hello_world.erl" -module(mod_hello_world). -behaviour(gen_mod). @@ -100,49 +83,44 @@ mod_options(_Host) -> mod_doc() -> #{desc => ?T("This is an example module.")}. -~~~ +``` Now you have two ways to compile and install the module: If you compiled ejabberd from source code, you can copy that source code file with all the other ejabberd source code files, so it will be compiled and installed with them. If you installed some compiled ejabberd package, you can create your own module dir, see -[Managing Your Own Modules](/developer/extending-ejabberd/modules/#managing-your-own-modules). +[Add Your Module](#add-your-module). You can enable your new module by adding it in the ejabberd config file. -Adding the following -snippet in the config file will integrate the module in ejabberd -module lifecycle management. It means the module will be started at -ejabberd launch and stopped during ejabberd shutdown process: +Adding the following snippet in the config file will integrate the module in ejabberd module lifecycle management. It means the module will be started at ejabberd launch and stopped during ejabberd shutdown process: -~~~ yaml +``` yaml modules: ... mod_hello_world: {} -~~~ +``` -Or you can start / stop it manually by typing the following commands -in an Erlang shell running ejabberd: +Or you can start / stop it manually by typing the following commands in an Erlang shell running ejabberd: * To manually start your module: - ~~~ erlang -gen_mod:start_module(<<"localhost">>, mod_hello_world, []). -~~~ + ``` erlang + gen_mod:start_module(<<"localhost">>, mod_hello_world, []). + ``` * To manually stop your module: - ~~~ erlang -gen_mod:stop_module(<<"localhost">>, mod_hello_world). -~~~ + ``` erlang + gen_mod:stop_module(<<"localhost">>, mod_hello_world). + ``` -When the module is started, either on ejabberd start or manually, you -should see the following message in ejabberd log file: +When the module is started, either on ejabberd start or manually, you should see the following message in ejabberd log file: -~~~ python +``` python 19:13:29.717 [info] Hello, ejabberd world! -~~~ +``` -# ejabberd-contrib +## ejabberd-contrib ejabberd is able to fetch module sources by itself, compile with correct flags and install in a local repository, without any external dependencies. You do not @@ -153,7 +131,7 @@ It contains most used contributions and also can link to any other external repository. This works with ejabberd modules written in Erlang and will also support new Elixir modules. -# Basic usage +## Basic usage As a user, this is how it works: @@ -162,13 +140,13 @@ As a user, this is how it works: You may want to repeat this command before you need installing a new module or an attended server upgrade. - ~~~ bash + ``` sh ejabberdctl modules_update_specs - ~~~ + ``` 2. Then you can list available modules: - ~~~ bash + ``` sh ejabberdctl modules_available ... mod_admin_extra Additional ejabberd commands @@ -176,105 +154,105 @@ As a user, this is how it works: mod_cron Execute scheduled commands mod_log_chat Logging chat messages in text files ... - ~~~ + ``` 3. Let’s install `mod_cron` from ejabberd-contrib repository: - ~~~ bash + ``` sh ejabberdctl module_install mod_cron ok - ~~~ + ``` 4. You can check anytime what modules are installed: - ~~~ bash + ``` sh ejabberdctl modules_installed mod_cron - ~~~ + ``` 5. An example default configuration is installed, and will be read by ejabberd when it starts. You can find that small configuration in: - ~~~ + ``` sh $HOME/.ejabberd-modules/mod_cron/conf/mod_cron.yml - ~~~ + ``` 6. And finally, you can remove the module: - ~~~ bash + ``` sh ejabberdctl module_uninstall mod_cron ok - ~~~ + ``` -# Add your module +## Add your module If you install ejabberd using the official ProcessOne installer, it includes everything needed to build ejabberd modules on its own. 1. First, create this path - ~~~ bash + ``` sh $HOME/.ejabberd-modules/sources/mod_hello_world/src/ - ~~~ + ``` 2. and copy your source code to this location: - ~~~ bash + ``` sh $HOME/.ejabberd-modules/sources/mod_hello_world/src/mod_hello_world.erl - ~~~ + ``` 3. Create a specification file in YAML format as mod_hello_world.spec (see examples from ejabberd-contrib). So, create the file - ~~~ bash + ``` sh $HOME/.ejabberd-modules/sources/mod_hello_world/mod_hello_world.spec - ~~~ + ``` with this content: - ~~~ yaml + ``` yaml title="mod_hello_world.spec" summary: "Hello World example module" - ~~~ + ``` -4. From that point you should see it as available module: +4. From that point you should see it as available module: - ~~~ bash + ``` sh ejabberdctl modules_available mod_hello_world Hello World example module - ~~~ + ``` 5. Now you can install and uninstall that module like any other, as described in the previous section. -6. If you plan to publish your module, you should check if your module +6. If you plan to publish your module, you should check if your module follows the policy and if it compiles correctly: - ~~~ bash + ``` sh ejabberdctl module_check mod_mysupermodule ok - ~~~ + ``` - if all is OK, your’re done ! Else, just follow the warning/error messages to fix the issues. + If all is OK, your’re done ! Else, just follow the warning/error messages to fix the issues. You may consider publishing your module as a tgz/zip archive or git repository, and send your spec file for integration in ejabberd-contrib repository. ejabberd-contrib will only host a copy of your spec file and does not need your code to make it available to all ejabberd users. -# Your module with Docker +## Your module with Docker If you installed ejabberd using the Docker image, these specific instructions allow you to use your module with your Docker image: 1. Create a local directory for the contributed modules: - ~~~ bash + ``` sh mkdir docker-modules - ~~~ + ``` 2. Then create the directory structure for your custom module: - ~~~ bash + ``` sh cd docker-modules mkdir -p sources/mod_hello_world/ @@ -287,17 +265,17 @@ allow you to use your module with your Docker image: echo -e "modules:\n mod_hello_world: {}" > sources/mod_hello_world/conf/mod_hello_world.yml cd .. - ~~~ + ``` 3. Grant ownership of that directory to the UID that ejabberd will use inside the Docker image: - ~~~ bash + ``` sh sudo chown 9000 -R docker-modules/ - ~~~ + ``` 4. Start ejabberd in Docker: - ~~~ bash + ``` sh sudo docker run \ --name hellotest \ -d \ @@ -305,26 +283,26 @@ allow you to use your module with your Docker image: -p 5222:5222 \ -p 5280:5280 \ ejabberd/ecs - ~~~ + ``` 5. Check the module is available for installing, and then install it: - ~~~ bash + ``` sh sudo docker exec -it hellotest bin/ejabberdctl modules_available mod_hello_world [] sudo docker exec -it hellotest bin/ejabberdctl module_install mod_hello_world - ~~~ + ``` 6. If the module works correctly, you will see the Hello string in the ejabberd logs when it starts: - ~~~ bash + ``` sh sudo docker exec -it hellotest grep Hello logs/ejabberd.log 2020-10-06 13:40:13.154335+00:00 [info] <0.492.0>@mod_hello_world:start/2:15 Hello, ejabberd world! - ~~~ + ``` -# Status +## Status Please note this is provided as a beta version. We want the work in progress to be released early to gather feedback from developers and users. @@ -337,7 +315,7 @@ However, our plan is to keep iterating on the tool and to make our best to make installation as easy as possible and avoid need to change main configuration: ejabberd should be able to include module configuration snippets on the fly in a near future. -# Next steps +## Next steps From there, you know how to package a module to integrate it inside ejabberd environment. Packaging a module allows you to: @@ -349,10 +327,8 @@ ejabberd environment. Packaging a module allows you to: Now, to do useful stuff, you need to integrate with ejabberd data flow. You have two mechanisms available from ejabberd modules: -* [Events and Hooks](/developer/guide/#hooks): This is to handle internal ejabberd triggers and +* [Events and Hooks](../guide.md#hooks): This is to handle internal ejabberd triggers and subscribe to them to perform actions or provide data. -* [IQ Handlers](/developer/guide/#iq-handlers): This is a way to register ejabberd module to handle +* [IQ Handlers](../guide.md#iq_handlers): This is a way to register ejabberd module to handle XMPP Info Queries. This is the XMPP way to provide new services. - -[image-1]: /static/images/architect/ejabberd_internals.png diff --git a/content/developer/extending-ejabberd/pubsub.md b/content/developer/extending-ejabberd/pubsub.md old mode 100755 new mode 100644 index 7968a722..66348bec --- a/content/developer/extending-ejabberd/pubsub.md +++ b/content/developer/extending-ejabberd/pubsub.md @@ -1,14 +1,9 @@ ---- -title: PubSub Plugin Development -menu: PubSub Dev -toc: true ---- +# PubSub overview This document describes ejabberd's PubSub architecture to understand how to write custom plugins. -# PubSub overview - [`XEP-0060`](https://xmpp.org/extensions/xep-0060.html) (PubSub) is more than 100 pages of specifications, with 12 very detailed use cases with many possibles options and possible situations: + - Subscribe - Unsubscribe - Configure subscription @@ -24,135 +19,163 @@ This document describes ejabberd's PubSub architecture to understand how to writ [`XEP-0163`](https://xmpp.org/extensions/xep-0163.html) (PEP) is based on PubSub XEP-0248 (deprecated) for Collection Nodes and uses generic PubSub functionality, specified in XEP-0060. -# History +## History Initial implementation made by Aleksey Shchepin, ability to organise nodes in a tree added by Christophe Romain in 2007. First attempt to create a flexible API for plugins started in 2007, and improved until 2015. -# Implementation +## Implementation PubSub service comes in several parts: + - A poll of iq handlers handled by ejabberd router - A sending process - A core router to perform high level actions for every use case - Plugins to handle nodes, affiliations/subscriptions, and items at lower level and interface with data backend -## Nodetree plugins +### Nodetree plugins + They handles storage and organisation of PubSub nodes. Called on get, create and delete node. Default implementation includes three plugins: + - tree: (default) both internal and odbc backend. - virtual: no backend, no configurable nodes. - dag: handles [`XEP-0248`](https://xmpp.org/extensions/xep-0248.html). If all nodes shares same configuration, I/O on pubsub_node can be avoided using virtual nodetree. -## Node plugins +### Node plugins + They handle affiliations, subscriptions and items. They provide default node configuration and features. Called on every pubsub use cases. Each plugin is responsible of checks to handle all possibles cases and reply action result to PubSub engine to let it handle the routing. The most common plugins available in default installation are: + - flat: (default) all nodes are in a flat namespace, there are no parent/child nodes - hometree: all nodes are organized as in a filesystem under /home/hostname/user/... - pep: handles [`XEP-0163`](https://xmpp.org/extensions/xep-0163.html) - dag: handles [`XEP-0248`](https://xmpp.org/extensions/xep-0248.html). - public, private, ... which are derivate of flat, with different default node configuration. -### `node_flat` +#### `node_flat` + `node_flat` is the default plugin, without node hierarchy, which handles standard PubSub case. The default node configuration with this plugin is: - [{deliver_payloads, true}, - {notify_config, false}, - {notify_delete, false}, - {notify_retract, true}, - {purge_offline, false}, - {persist_items, true}, - {max_items, 10}, - {subscribe, true}, - {access_model, open}, - {roster_groups_allowed, []}, - {publish_model, publishers}, - {notification_type, headline}, - {max_payload_size, 60000}, - {send_last_published_item, on_sub_and_presence}, - {deliver_notifications, true}, - {presence_based_delivery, false}]. - -### node_hometree +``` erlang +[{deliver_payloads, true}, + {notify_config, false}, + {notify_delete, false}, + {notify_retract, true}, + {purge_offline, false}, + {persist_items, true}, + {max_items, 10}, + {subscribe, true}, + {access_model, open}, + {roster_groups_allowed, []}, + {publish_model, publishers}, + {notification_type, headline}, + {max_payload_size, 60000}, + {send_last_published_item, on_sub_and_presence}, + {deliver_notifications, true}, + {presence_based_delivery, false}]. +``` + +#### node_hometree + node_hometree use exact same features as flat plugin, but organise nodes in a tree following same scheme as path in filesystem. Every user can create nodes in its own home. Each node can contain items and/or sub-nodes. Example: - /home/user - /home/domain/user - /home/domain/user/my_node - /home/domain/user/my_node/child_node +``` sh +/home/user +/home/domain/user +/home/domain/user/my_node +/home/domain/user/my_node/child_node +``` + +#### node_pep -### node_pep node_pep handles XEP-0163: Personal Eventing Protocol It do not persist items, just keeping last item in memory cache. Node names are raw namespace attached to a given bare JID. Every user can have its own node with a common namespace sharing with others. -### node_dag +#### node_dag + node_dag handles XEP-0248: PubSub Collection Nodes Contribution from Brian Cully. Every node takes places in a tree and is either a collection node (have only sub-nodes) or a leaf node (contains only items). No restriction on the tree structure -# Plugin design +## Plugin design + Due to complexity of XEP-0060, PubSub engine do successive calls to nodetree and node plugins in order to check validity, perform corresponding action and return result or appropriate error to users. Plugin design follows this requirement and divide actions by type of data to allow transient backend implementation without any PubSub engine change. -## Create Node -![Create Node](/static/images/pubsub/create_node.png) +### Create Node + +![Create Node](./images/create_node.png) + +### Delete Node + +![Delete Node](./images/delete_node.png) + +### Subscribe + +![Subscribe](./images/subscribe.png) + +### Unsubscribe -## Delete Node -![Delete Node](/static/images/pubsub/delete_node.png) +![Unsubscribe](./images/unsubscribe.png) -## Subscribe -![Subscribe](/static/images/pubsub/subscribe.png) +### Publish item -## Unsubscribe -![Unsubscribe](/static/images/pubsub/unsubscribe.png) +![Publish Item](./images/publish_item.png) -## Publish item -![Publish Item](/static/images/pubsub/publish_item.png) +### Delete item -## Delete item -![Delete Item](/static/images/pubsub/delete_item.png) +![Delete Item](./images/delete_item.png) -## Purge Node -![Purge Node](/static/images/pubsub/purge_node.png) +### Purge Node -## Get item -![Get Item](/static/images/pubsub/get_item.png) +![Purge Node](./images/purge_node.png) + +### Get item + +![Get Item](./images/get_item.png) + +## Available backends -# Available backends Flat, hometree and PEP supports mnesia and SQL backends. Any derivated plugin can support the same (public, private, club, buddy...). Adding backend does not require any PubSub engine change. Plugin just need to comply API. Business Edition also supports optimized ets and mdb. -# Customisation +## Customisation + To write your own plugin, you need to implement needed functions: - [init/3, terminate/2, options/0, features/0, - create_node_permission/6, create_node/2, delete_node/1, - purge_node/2, subscribe_node/8, unsubscribe_node/4, - publish_item/6, delete_item/4, remove_extra_items/3, - get_entity_affiliations/2, get_node_affiliations/1, - get_affiliation/2, set_affiliation/3, - get_entity_subscriptions/2, get_node_subscriptions/1, - get_subscriptions/2, set_subscriptions/4, - get_pending_nodes/2, get_states/1, get_state/2, - set_state/1, get_items/7, get_items/3, get_item/7, - get_item/2, set_item/1, get_item_name/3, node_to_path/1, - path_to_node/1] +``` erlang +[init/3, terminate/2, options/0, features/0, + create_node_permission/6, create_node/2, delete_node/1, + purge_node/2, subscribe_node/8, unsubscribe_node/4, + publish_item/6, delete_item/4, remove_extra_items/3, + get_entity_affiliations/2, get_node_affiliations/1, + get_affiliation/2, set_affiliation/3, + get_entity_subscriptions/2, get_node_subscriptions/1, + get_subscriptions/2, set_subscriptions/4, + get_pending_nodes/2, get_states/1, get_state/2, + set_state/1, get_items/7, get_items/3, get_item/7, + get_item/2, set_item/1, get_item_name/3, node_to_path/1, + path_to_node/1] +``` Generic function must call their corresponding partner in `node_flat`. Simple plugin would just call `node_flat` and override some defaults such as: + - options/0 and features/0 to match your needs. This triggers the way PubSub controls calls to your plugins. - create_node_permission/6 for example to check an LDAP directory against an access flag - Write your own tests on publish or create node, forbids explicit access to items, etc... -# Clustering +## Clustering + ejabberd's implementation tends to cover most generic and standard uses. It's good for common use, but far from optimal for edges or specific cases. Nodes, affiliations, subscriptions and items are stored in a replicated database. Each ejabberd node have access to all the data. diff --git a/content/developer/extending-ejabberd/stanza-routing.md b/content/developer/extending-ejabberd/stanza-routing.md old mode 100755 new mode 100644 index ffbe7190..9f06f869 --- a/content/developer/extending-ejabberd/stanza-routing.md +++ b/content/developer/extending-ejabberd/stanza-routing.md @@ -1,9 +1,6 @@ ---- -title: ejabberd Stanza Routing -menu: Stanza Routing ---- +# ejabberd Stanza Routing -# Message Routing +## Message Routing In case of a message sent from User A to User B, both of whom are served by the same domain, the flow of the message through the system @@ -21,15 +18,15 @@ is as follows: do to next. It is easier to understand by looking at an example of actual routing table content: - ~~~ erlang - (ejabberd@localhost)2> ets:tab2list(route). - [{route,<<"pubsub.localhost">>, - {apply_fun,#Fun}}, + ``` erlang + (ejabberd@localhost)2> ets:tab2list(route). + [{route,<<"pubsub.localhost">>, + {apply_fun,#Fun}}, {route,<<"muc.localhost">>, - {apply_fun,#Fun}}, + {apply_fun,#Fun}}, {route,<<"localhost">>,{apply,ejabberd_local,route}}] - ~~~ - + ``` + In that case, user is local so we need to route to same domain (in our case localhost). We then can see that we have to call `ejabberd_local:route` to route the message to local user. As both @@ -58,6 +55,4 @@ is as follows: Here is a broader diagram, including server-to-server routing: -![][image-1] - -[image-1]: /static/images/developer/stanza-flow.png +![image](./images/stanza-flow.png) diff --git a/content/developer/extending-ejabberd/testing.md b/content/developer/extending-ejabberd/testing.md index a960f00b..05135c33 100644 --- a/content/developer/extending-ejabberd/testing.md +++ b/content/developer/extending-ejabberd/testing.md @@ -1,15 +1,11 @@ ---- -title: ejabberd Test Suites -menu: Testing -toc: true ---- +# ejabberd Test Suites ejabberd comes with a comprehensive test suite to cover various part of the software platform. -# XMPP end-to-end protocol test suite +## XMPP end-to-end protocol test suite -## Running ejabberd test suite +### Running ejabberd test suite This test suite is a set of end-2-end integration tests that act like XMPP clients connecting with the server and is testing ejabberd at the protocol @@ -33,7 +29,7 @@ run. Current `CT_BACKENDS` values: **Note:** You must build ejabberd with proper backend support for the tests to work. If the tests fail and you aren't sure why, check the -[`configure` build options](/admin/installation/#configure) +[`configure` build options](../../admin/install/source.md#configure) to make sure ejabberd is compiled with adequate backend support. **Note:** these tests are e2e tests that operate a full ejabberd instance. So @@ -62,32 +58,32 @@ on a specific backend, skipping the generic `no_db` tests. Some example commands for running the XMPP end-to-end test suite using rebar and [rebar3 ct](https://rebar3.org/docs/testing/ct/): -~~~ bash +``` sh CT_BACKENDS=mnesia rebar ct suites=ejabberd CT_BACKENDS=mnesia rebar ct suites=ejabberd groups=mnesia CT_BACKENDS=mnesia rebar ct suites=ejabberd groups=generic CT_BACKENDS=mnesia rebar3 ct --suite=test/ejabberd_SUITE --group=offline_flex,offline_send_all CT_BACKENDS=redis rebar3 ct --suite=test/ejabberd_SUITE --group=offline_flex,offline_send_all -~~~ +``` If you have every backend configured, you can run all the tests with: -~~~ bash +``` sh make test -~~~ +``` -## Test suite conventions +### Test suite conventions The records used in test suite are autogenerated and come from `tools/xmpp_codec.hrl`. This is handy to match packets/results against expected values. -# Dependency tests +## Dependency tests ejabberd depends on a lot of dependent modules. The dependencies can be tested independently by checking them out and running their test suites directly. -# Build test status +## Build test status We run tests for ejabberd and dependencies automatically via Github Actions. We have a Dashboard available on Github to check the overall test status for all diff --git a/content/developer/guide.md b/content/developer/guide.md old mode 100755 new mode 100644 index b7d13a74..51d8e418 --- a/content/developer/guide.md +++ b/content/developer/guide.md @@ -1,11 +1,6 @@ ---- -title: ejabberd developer guide -toc: true -menu: Internals -order: 96 ---- +# ejabberd developer guide -# Introduction +## Introduction `ejabberd` is a *free and open source* instant messaging server written in [`Erlang/OTP`](https://erlang.org/). @@ -19,7 +14,7 @@ server. `ejabberd` is suitable for small deployments, whether they need to be *scalable* or not, as well as extremely big deployments. -## Goals +### Goals This guide is a brief explanation of ejabberd internals. It is not intended to be a comprehensive ejabberd's internal API documentation. @@ -30,7 +25,7 @@ the code and ignore irrelevant ones. Note that there is absolutely no need to know every line of code of ejabberd, but some parts are crucial to understand. -## Requirements +### Requirements In order to read and understand the guide you must be pretty fluent with Erlang programming language and understand basics of the XMPP protocol: @@ -39,12 +34,12 @@ it's assumed that you're familiar with such terms as `xml stream`, `stanza`, `c2s`, `s2s` and so on. If you see these words for the first time in your life you're unlikely to understand the guide. -## Version +### Version The guide describes ejabberd 17.03. Previous and next versions can differ drastically from the one described herein. -# Coding style convention +## Coding style convention > **NOTE**: this section is only relevant for ejabberd contributors. If > you're hacking ejabberd for internal needs, you are free to choose @@ -61,8 +56,7 @@ doesn't like them. The typical coding style rules found violated in contributors' code are: -- [100 column per -line](https://github.com/inaka/erlang_guidelines/blob/master/README.md#100-column-per-line): +- [100 column per line](https://github.com/inaka/erlang_guidelines/blob/master/README.md#100-column-per-line): in fact we have defined 80 columns as a soft and 100 columns as a hard limit, which means most of your lines should be no longer than 80 characters and the rest must never be longer than 100 characters. @@ -82,7 +76,7 @@ indentation style (that is the standard indentation style for Erlang programs). If you're not using Emacs for ejabberd development, indent the code using it first before making a PR/commit. -# Start-up procedure +## Start-up procedure ejabberd is written as a standard OTP application, so the startup module can be found in `src/ejabberd.app.src` or, if ejabberd is @@ -102,7 +96,7 @@ with supervisor childspecs). Once `ejabberd_sup` is started, ejabberd application is considered to be started. -# Core +## Core The ejabberd core is not well-defined. Moreover, the described core layers are pure abstraction grouping several modules together by some @@ -140,7 +134,7 @@ shapers do not apply for outgoing data). Once `xmlel{}` packet is constructed by `ejabberd_receiver.erl` it's passed to `XMPP Stream Layer`. -## XMPP Stream Layer +### XMPP Stream Layer `XMPP Stream Layer` is represented by `xmpp_stream_in.erl` and `xmpp_stream_out.erl` modules. An instance (i.e. a process) of @@ -153,7 +147,7 @@ following: [xmpp](https://github.com/processone/xmpp) library from/to internal structures (records) defined in [xmpp_codec.hrl](https://github.com/processone/xmpp/blob/master/include/xmpp_codec.hrl). -- Performs negotiation of _inbound_ XMPP streams +- Performs negotiation of *inbound* XMPP streams - Performs STARTTLS negotiation (if needed) - Performs compression negotiation (if needed) - Performs SASL authentication @@ -171,7 +165,7 @@ callback modules, i.e. the modules of `xmpp_stream_in` behaviour: `ejabberd_c2s.erl`, `ejabberd_s2s_in.erl` or `ejabberd_service.erl`, depending on the stream namespace. -`xmpp_stream_out.erl` does the same but for _outbound_ XMPP streams. +`xmpp_stream_out.erl` does the same but for *outbound* XMPP streams. The only its callback module is `ejabberd_s2s_out.erl`. > **NOTE**: `xmpp_stream_in.erl` shares the same process and state with @@ -181,7 +175,7 @@ The only its callback module is `ejabberd_s2s_out.erl`. > `xmpp_stream_out.erl` and `ejabberd_s2s_out.erl`. The state is > represented by a `map()` in both cases. -### ejabberd_c2s, ejabberd_s2s_in and ejabberd_service +#### ejabberd_c2s, ejabberd_s2s_in and ejabberd_service These are modules of `xmpp_stream_in` behaviour. The only purpose of these modules is to provide callback functions for `xmpp_stream_in.erl` @@ -197,9 +191,9 @@ Roughly, they represent an intermediate (or "glue") code between `ejabberd_s2s_out.erl` is described [elsewhere](#ejabberd_s2s-and-ejabberd_s2s_out) -## Routing Layer +### Routing Layer -### ejabberd_router +#### ejabberd_router `ejabberd_router.erl` module is the main dispatcher of XMPP stanzas. @@ -212,18 +206,18 @@ packets or any other Erlang terms through `ejabberd_router`. The only valid routes are: -- _local_ route: stanzas of this route type are destined to the local +- *local* route: stanzas of this route type are destined to the local server itself, i.e. stanzas with `to` attribute in the form of `domain.com` or `domain.com/resource`, where `domain.com` is a virtual host serviced by ejabberd. `ejabberd_router` passes such stanzas to `ejabberd_local.erl` module via `ejabberd_local:route/1` function call. -- _session manager_ route: stanzas of this route type are destined to +- *session manager* route: stanzas of this route type are destined to local users, i.e. stanzas with `to` attribute in the form of `user@domain.com` or `user@domain.com/resource` where `domain.com` is a virtual host serviced by ejabberd. `ejabberd_router` passes such stanzas to `ejabberd_sm.erl` module via `ejabberd_sm:route/1` function call. -- _registered_ route: if a stanza is not destined to local virtual +- *registered* route: if a stanza is not destined to local virtual host, ejabberd first checks if there is a "registered" route for the stanza, i.e. a domain registered via `ejabberd_router:register_route/2` function. For doing this it looks up the routing table and if there is @@ -231,7 +225,7 @@ a process `Pid` registered on this domain, ejabberd routes the stanza as `Pid ! {route, Stanza}`. The routing table is backend-dependent and is implemented in the corresponding backend module such as `ejabberd_router_mnesia.erl`. -- _s2s_ route: if a stanza is neither destined to local virtual host +- *s2s* route: if a stanza is neither destined to local virtual host nor to registered route, `ejabberd_router` passes it to `ejabberd_s2s.erl` module via `ejabberd_s2s:route/1` function call. @@ -239,7 +233,7 @@ Mentioned modules are explained in more details in the following sections. You're encouraged to inspect exported functions of `ejabberd_router.erl`, because most likely you will use some of them. -### ejabberd_local +#### ejabberd_local `ejabberd_local.erl` handles stanzas destined to the local server itself. For `#message{}` and `#presence{}` it only calls hooks, while @@ -254,7 +248,7 @@ responses for them. This is implemented in `ejabberd_local:route_iq/2,3` functions. This is also the most notable function of the module. Calling to other functions is not recommended. -### ejabberd_sm +#### ejabberd_sm `ejabberd_sm.erl` handles stanzas destined to local users. For `#message{}`, `#presence{}` and full-JID `#iq{}` it looks up its @@ -281,7 +275,7 @@ The most notable functions of the module are: - `get_user_ip/3` - `is_existing_resource/3` -### route-registered processes +#### route-registered processes Any process can register a route to itself. It's done by calling to `ejabberd_router:route/2` function. Note that a route should be @@ -297,7 +291,7 @@ messages in the form of `{route, Stanza}`. Refer to the code of `mod_muc.erl` or `ejabberd_service.erl` for an example of a route-registered process. -### ejabberd_s2s and ejabberd_s2s_out +#### ejabberd_s2s and ejabberd_s2s_out If a stanza is destined neither to local virtual host not to a route-registered process, it's passed to `ejabberd_s2s.erl` module via @@ -306,10 +300,10 @@ look up the internal table (currently it's `s2s` Mnesia table) for the `ejabberd_s2s_out` process and, if found, passes the stanza to this process or, otherwise, will start new `ejabberd_s2s_out` process. -`ejabberd_s2s_out.erl` handles _outbound_ XMPP S2S streams. This is the +`ejabberd_s2s_out.erl` handles *outbound* XMPP S2S streams. This is the only callback module of `xmpp_stream_out` behaviour. -# Adding new functionality +## Adding new functionality There are two common ways to add new functionality to ejabberd: @@ -324,7 +318,7 @@ replies for them), use [IQ handlers](#iq-handlers) passing through all layers or want to "listen" for some internal events (like ejabberd configuration change), use [hooks](#hooks). -## IQ Handlers +### IQ Handlers An `IQ Handler` is a function processing an IQ stanza (internally represented as `#iq{}` record). There are two types of IQ handlers: @@ -332,19 +326,21 @@ represented as `#iq{}` record). There are two types of IQ handlers: - `local` IQ handler is a function processing IQs coming from `ejabberd_local`, that is, an IQ destined to the local server itself as -described in [ejabberd_local](#ejabberd-local). +described in [ejabberd_local](#ejabberd_local). - `sm` IQ handler is a function processing IQs coming from `ejabberd_sm`, that is, a bare-JID IQ destined to a local user as -described in [ejabberd_sm](#ejabberd-sm). +described in [ejabberd_sm](#ejabberd_sm). An IQ handler is registered as: -```erlang + +``` erlang gen_iq_handler:add_iq_handler(Type :: ejabberd_local | ejabberd_sm, Host :: binary(), Namespace :: binary(), Module :: module(), Function :: atom()) -> ok ``` + where: - `Type` is `ejabberd_local` for `local` handlers or `ejabberd_sm` for @@ -363,14 +359,16 @@ further processing stops. > `xmpp:get_to(IQ)` always return `#jid{}` and never `undefined`. If a handler is no longer needed it should be unregistered as: -```erlang + +``` erlang gen_iq_handler:remove_iq_handler(Type :: ejabberd_local | ejabberd_sm, Host :: binary(), Namespace :: binary()) -> ok ``` + with the same meaning of the arguments. -## Hooks +### Hooks When ejabberd is processing an arbitrary event (incoming IQ, outgoing presence, configuration change, etc), it is convenient to consider some @@ -394,7 +392,7 @@ argument to the "hooked" functions, thus, the function from C2SState})`, the function from `mod_privacy.erl` will be called as `mod_privacy:user_send_packet({Stanza, C2SState})` and so on. -There are two types of hooks: _with_ an accumulator and _without_ an +There are two types of hooks: *with* an accumulator and *without* an accumulator. - a hook with an accumulator, as its name suggests, accumulates some @@ -414,7 +412,7 @@ latter case, evaluation of next functions in the associated list is not performed. An example of hooks without accumulator are: `config_reloaded`, `component_init` and so on. -Both types of hooks have _local_ or _global_ scope. +Both types of hooks have *local* or *global* scope. - a hook with local scope is associated with particular virtual host and is run only when an event is matching this host. Most of the hooks @@ -425,20 +423,22 @@ scope. A function gets associated with a local hook as follows (the type of a hook doesn't matter): -```erlang + +``` erlang ejabberd_hooks:add(Hook :: atom(), Host :: binary(), Module :: module(), Function :: atom(), Seq :: integer() -> ok ``` + where: - `Hook` is a hook name - `Host` is a virtual host - `Seq` is a sequence number. This number defines position of the function in the list to maintain execution order. Functions with lower -sequence number are executed _before_ those with bigger sequence +sequence number are executed *before* those with bigger sequence number. For functions with the same sequence number the order is unspecified. A function associated with an accumulating hook is called as `Module:Function(Acc, Arg1, Arg2, ...)` where `Acc` is an @@ -454,12 +454,14 @@ Arg2, ...)`. All returning values except `stop` are ignored. A function for a global hook gets associated as follows (the type of a hook doesn't matter): -```erlang + +``` erlang ejabberd_hooks:add(Hook :: atom(), Module :: module(), Function :: atom(), Seq :: integer()) -> ok ``` + with the same meaning of the arguments. Note that `Host` argument is omitted in this case. @@ -488,24 +490,27 @@ check hook correctness and find mishooked functions. The script also generates a module `src/hooks_type_test.erl` from where you can learn about existing hooks and check execution order. You can place your code inside `src` directory (if any), and run: -``` -$ make hooks + +``` sh +make hooks ``` -# Modules +## Modules -## gen_mod behaviour +### gen_mod behaviour As you might know, ejabberd is a modular software. The best method to add new functionality to it is to write a new module. For doing this one should create an Erlang module of `gen_mod` behaviour: -```erlang + +``` erlang %% file mod_foo.erl -module(mod_foo). ... -behaviour(gen_mod). ... ``` + Several callbacks should be defined in the module: - `Module:start(Host, Opts)` where `Host` is a virtual host where the @@ -536,7 +541,7 @@ configuration options of `Module`. The function has the same meaning as `Module:opt_type/1` callback described in [Configuration validation](#validation) section. -## Stateful modules +### Stateful modules While some modules don't need to maintain an internal state ("stateless" modules), others are required to do this ("stateful" @@ -570,24 +575,28 @@ implement it as a `gen_server` process. But make sure you're not calling `ets:new/2` several times for several virtual hosts (`badarg` will be raised in this case). E.g., the following code is *incorrect*: -```erlang + +``` erlang start(Host, Opts) -> ... ets:new(some_table, named_table, ...]), ... ``` + The correct code will look something like that: -```erlang + +``` erlang start(Host, Opts) -> ... try ets:new(some_table, [named_table, ...]) catch _:badarg -> ok end, ... ``` + There is a plenty of examples of modules: pick up any file starting with `mod_` inside `src` directory. -## gen_mod module +### gen_mod module Module `gen_mod.erl` has various useful functions to work with modules, the most notable are: @@ -600,13 +609,13 @@ a given virtual host - `get_module_opt/4,5`: the same as above, but an option is referenced by a virtual host and a module. -# Configuration +## Configuration ejabberd has quite powerful configuration processor - `ejabberd_config.erl`. It performs configuration file parsing and validation. -## Validation +### Validation In order to validate options `ejabberd_config` has to install feedback with the rest of the code. For doing this, it provides @@ -619,7 +628,7 @@ the option. The validating function must return any new value for the option (whether it's modified or not) or should crash if the value doesn't match expected format. Here is an example: -```erlang +``` erlang %% file: some.erl -module(some). -behaviour(ejabberd_config). @@ -642,22 +651,24 @@ opt_type(_) -> > corresponding subsection of the `modules` section of a configuration > file). -## Fetching options +### Fetching options The most notable function of the module is: -```erlang + +``` erlang get_option(Option :: atom() | {atom(), binary() | global}, ValidatingFun :: fun(), Default :: term()) -> Value :: term(). ``` + The function is used to get a value `Value` of a configuration option `Option`. The `ValidatingFun` is a validating function described in the previous section and `Default` is the default value if the option is not defined in the config. -# Using XMPP library +## Using XMPP library -## xmpp module +### xmpp module Prior to version 16.12, ejabberd used to operate with `#xmlel{}` packets directly: [fast_xml](https://github.com/processone/fast_xml) @@ -695,7 +706,7 @@ taming `fast_xml` library *how* to parse. > directly: use functions from `xmpp.erl` module. The same is true for > header files: do **NOT** include `xmpp_codec.hrl` -- include `xmpp.hrl` instead -### XMPP codec +#### XMPP codec Once a raw XML packet is parsed by `ejabberd_receiver.erl` into `#xmlel{}` record, it's passed to `xmpp_stream_in.erl` module, where decoding of `#xmlel{}` into @@ -703,7 +714,8 @@ it's passed to `xmpp_stream_in.erl` module, where decoding of `#xmlel{}` into is performed (refer to [XMPP Stream Layer](#xmpp-stream-layer) section for details). At that level "lazy" decoding is applied: only top-level element is decoded. For example, an `xmlel()` packet -```erlang + +``` erlang #xmlel{name = <<"message">>, attrs = [{<<"type">>,<<"chat">>}], children = [#xmlel{name = <<"composing">>, @@ -711,8 +723,10 @@ For example, an `xmlel()` packet <<"http://jabber.org/protocol/chatstates">>}], children = []}]} ``` + is decoded into the following `xmpp_element()`: -```erlang + +``` erlang #message{id = <<>>,type = chat,lang = <<>>,from = undefined, to = undefined,subject = [],body = [],thread = undefined, sub_els = [#xmlel{name = <<"composing">>, @@ -721,13 +735,16 @@ is decoded into the following `xmpp_element()`: children = []}], meta = ``` + Note that the sub-element is still in `xmlel()` format. This "semi-decoded" packet is then passed upstream (at the [Routing Layer](#routing-layer)). Thus, a programmer should explicitly decode sub-elements if needed. To accomplish this one can use the following function: -```erlang + +``` erlang xmpp:decode(El :: xmlel(), Namespace :: binary(), [Option]) -> xmpp_element()` ``` + where the only supported `Option` is `ignore_els`: with this option lazy decoding is performed. By default, full decoding is applied, i.e. all known sub-elements get decoded. `Namespace` is a "top-level" namespace: it should be provided only if @@ -742,7 +759,8 @@ Both functions might **fail** with `{xmpp_codec, Why}` exception. The value of ` can be used to format the failure reason into human readable description using `xmpp:format_error/1` function, e.g., using sub-element from example `#message{}` above, we can write: -```erlang + +``` erlang try xmpp:decode(El) of #chatstate{} = ChatState -> process_chatstate(ChatState) catch _:{xmpp_codec, Why} -> @@ -750,10 +768,13 @@ catch _:{xmpp_codec, Why} -> ?ERROR_MSG("failed to decode element: ~s", [Txt]) end ``` + To apply reverse operation use `xmpp:encode/2` functions: -```erlang + +``` erlang xmpp:encode(Pkt :: xmpp_element(), Namespace :: binary()) -> El :: xmlel() ``` + There is also `xmpp:encode(Pkt :: xmpp_element()) -> El :: xmlel()` function which is a short-hand for `xmpp:encode(Pkt, <<>>)`. @@ -762,7 +783,8 @@ is a short-hand for `xmpp:encode(Pkt, <<>>)`. to include `<<"xmlns">>` attribute into resulting `#xmlel{}` element or not -- if the `Pkt` is within the same `Namespace`, `<<"xmlns">>` attribute will be omitted in the result. For example: -```erlang + +``` erlang > rr(xmpp). ... > Msg. @@ -786,6 +808,7 @@ omitted in the result. For example: <<"http://jabber.org/protocol/chatstates">>}], children = []}]} ``` + > **NOTE**: `xmpp:encode/1,2` functions would never fail as long as the > provided input is a valid `xmpp_element()` with valid values of its record > fields. Use dialyzer checks of your code for validation. @@ -798,21 +821,24 @@ omitted in the result. For example: Luckily, there is a helper function for sub-elements decoding, described in the next section and in a lot of cases it's more convenient to use it. -### Getting sub-elements +#### Getting sub-elements Once a programmer gets a stanza in `xmpp_element()` format, (s)he might want to get its subelement. To accomplish this the following function can be used: -```erlang + +``` erlang xmpp:get_subtag(Stanza :: stanza(), Tag :: xmpp_element()) -> Pkt :: xmpp_element() | false ``` + This function finds a `Tag` by its well-known record inside sub-elements of the `Stanza`. It automatically performs decoding (if needed) and returns either found `xmpp_element()` or `false` if no elements have matched. Note that the function doesn't fail if some of sub-elements are invalid. Example: -```erlang + +``` erlang > rr(xmpp). ... > Msg. @@ -831,13 +857,13 @@ false false ``` -### Setting and removing sub-elements +#### Setting and removing sub-elements In order to inject a sub-element into or delete one from arbitrary `stanza()` one can use `xmpp:set_subtag/2` and `xmpp:remove_subtag/2` respectively. -### from and to +#### from and to Every `stanza()` element has `from` and `to` record fields. In order to get/set them one can manipulate with these record fields directly, e.g. @@ -851,7 +877,7 @@ more convenient in the current situation. > [XMPP Stream Layer](#xmpp-stream-layer), thus, it is safe to assume > that the fields always possess valid `#jid{}` values. -### Metadata +#### Metadata Every `stanza()` element has `meta` field represented as a `map()`. It's useful when there is a need to attach some metadata to the stanza @@ -862,7 +888,7 @@ or use `xmpp:get_meta/1,2,3`, `xmpp:set_meta/2`, `xmpp:put_meta/3`, `xmpp:update_meta/3` and `xmpp:del_meta/2` functions, which is almost always more convenient (except pattern matching). -### Text elements +#### Text elements Some `xmpp_element()`s has fields defined in `[#text{}]` format. The example is `#message.body` and `#presence.status` fields. To avoid writing a lot @@ -871,7 +897,7 @@ convert some binary text written in some language into `[#text{}]` term, or `xmpp:get_text/1,2` to extract binary text from the `[#text{}]` element by a language. -### Generating errors +#### Generating errors In order to generate stanza errors or stream errors `xmpp:err_/0,2` or `xmpp:serr_*/0,2` can be used respectively, such as @@ -879,7 +905,7 @@ or `xmpp:serr_*/0,2` can be used respectively, such as If a stanza should be bounced back with an error, `xmpp:make_error/2` function can be used -### Namespaces +#### Namespaces There are many predefined macros for XML namespaces in [ns.hrl](https://github.com/processone/xmpp/blob/master/include/ns.hrl). @@ -888,7 +914,8 @@ in `xmpp.hrl`. A function `xmpp:get_ns/1` can be used to retrieve a namespace from `xmpp_element()` or from `xmlel()` directly: -```erlang + +``` erlang > rr(xmpp). ... > xmpp:get_ns(#message{}). @@ -897,7 +924,7 @@ from `xmpp_element()` or from `xmlel()` directly: <<"jabber:client">>. ``` -## jid module +### jid module `jid.erl` module provides functions to work with XMPP addresses (aka "JIDs"). There are two common types of internal representation of JIDs: @@ -929,51 +956,51 @@ Inspect exported functions of [jid.erl](https://github.com/processone/xmpp/blob/master/src/jid.erl) for more details. -# External Authentication +## External Authentication You can configure ejabberd to use as authentication method an external script, as described in the Administrator section: -[External Script](/admin/configuration/authentication/#external-script). +[External Script](../admin/configuration/authentication.md#external-script). Let's see the interface between ejabberd and your script, and several example scripts. There are also several old [example scripts](https://ejabberd.im/extauth). -## Extauth Interface +### Extauth Interface The external authentication script follows the [Erlang port driver API](https://erlang.org/doc/tutorial/c_portdriver.html). That script is supposed to do these actions, in an infinite loop: -- read from stdin: AABBBBBBBBB..... +- read from stdin: AABBBBBBBBB..... - - A: 2 bytes of length data (a short in network byte order) + - A: 2 bytes of length data (a short in network byte order) - - B: a string of length found in A that contains operation in + - B: a string of length found in A that contains operation in plain text operation are as follows: - - auth:User:Server:Password (check if a username/password pair + - auth:User:Server:Password (check if a username/password pair is correct) - - isuser:User:Server (check if it’s a valid user) + - isuser:User:Server (check if it’s a valid user) - - setpass:User:Server:Password (set user’s password) + - setpass:User:Server:Password (set user’s password) - - tryregister:User:Server:Password (try to register an + - tryregister:User:Server:Password (try to register an account) - - removeuser:User:Server (remove this account) + - removeuser:User:Server (remove this account) - - removeuser3:User:Server:Password (remove this account if the + - removeuser3:User:Server:Password (remove this account if the password is correct) -- write to stdout: AABB +- write to stdout: AABB - - A: the number 2 (coded as a short, which is bytes length of + - A: the number 2 (coded as a short, which is bytes length of following result) - - B: the result code (coded as a short), should be 1 for + - B: the result code (coded as a short), should be 1 for success/valid, or 0 for failure/invalid As you noticed, the `:` character is used to separate the fields. @@ -981,20 +1008,20 @@ This is possible because the User and Server fields can't contain the `:` charac and Password can have that character, but is always the last field. So it is always possible to parse the input characters unambiguously. -## Perl Example Script +### Perl Example Script This is a simple example Perl script; for example if the file is copied to the path `/etc/ejabberd/check_pass_null.pl` then configure ejabberd like this: -```yaml +``` yaml auth_method: [external] extauth_program: /etc/ejabberd/check_pass_null.pl ``` Content of `check_pass_null.pl`: -```perl +``` perl #!/usr/bin/perl use Unix::Syslog qw(:macros :subs); @@ -1024,15 +1051,15 @@ while(1) SWITCH: { - $op eq 'auth' and do - { + $op eq 'auth' and do + { $result = 1; - },last SWITCH; + },last SWITCH; - $op eq 'setpass' and do - { + $op eq 'setpass' and do + { $result = 1; - },last SWITCH; + },last SWITCH; $op eq 'isuser' and do { @@ -1067,59 +1094,60 @@ closelog; Example Python script: - #!/usr/bin/python - - import sys - import struct - - def read_from_stdin(bytes): - if hasattr(sys.stdin, 'buffer'): - return sys.stdin.buffer.read(bytes) - else: - return sys.stdin.read(bytes) - - def read(): - (pkt_size,) = struct.unpack('>H', read_from_stdin(2)) - pkt = sys.stdin.read(pkt_size) - cmd = pkt.split(':')[0] - if cmd == 'auth': - u, s, p = pkt.split(':', 3)[1:] - if u == "wrong": - write(False) - else: - write(True) - elif cmd == 'isuser': - u, s = pkt.split(':', 2)[1:] - if u == "wrong": - write(False) - else: - write(True) - elif cmd == 'setpass': - u, s, p = pkt.split(':', 3)[1:] - write(True) - elif cmd == 'tryregister': - u, s, p = pkt.split(':', 3)[1:] - write(True) - elif cmd == 'removeuser': - u, s = pkt.split(':', 2)[1:] - write(True) - elif cmd == 'removeuser3': - u, s, p = pkt.split(':', 3)[1:] - write(True) +``` python +#!/usr/bin/python + +import sys +import struct + +def read_from_stdin(bytes): + if hasattr(sys.stdin, 'buffer'): + return sys.stdin.buffer.read(bytes) + else: + return sys.stdin.read(bytes) + +def read(): + (pkt_size,) = struct.unpack('>H', read_from_stdin(2)) + pkt = sys.stdin.read(pkt_size) + cmd = pkt.split(':')[0] + if cmd == 'auth': + u, s, p = pkt.split(':', 3)[1:] + if u == "wrong": + write(False) else: + write(True) + elif cmd == 'isuser': + u, s = pkt.split(':', 2)[1:] + if u == "wrong": write(False) - read() - - def write(result): - if result: - sys.stdout.write('\x00\x02\x00\x01') else: - sys.stdout.write('\x00\x02\x00\x00') - sys.stdout.flush() - - if __name__ == "__main__": - try: - read() - except struct.error: - pass - + write(True) + elif cmd == 'setpass': + u, s, p = pkt.split(':', 3)[1:] + write(True) + elif cmd == 'tryregister': + u, s, p = pkt.split(':', 3)[1:] + write(True) + elif cmd == 'removeuser': + u, s = pkt.split(':', 2)[1:] + write(True) + elif cmd == 'removeuser3': + u, s, p = pkt.split(':', 3)[1:] + write(True) + else: + write(False) + read() + +def write(result): + if result: + sys.stdout.write('\x00\x02\x00\x01') + else: + sys.stdout.write('\x00\x02\x00\x00') + sys.stdout.flush() + +if __name__ == "__main__": + try: + read() + except struct.error: + pass +``` diff --git a/content/developer/hosts.md b/content/developer/hosts.md old mode 100755 new mode 100644 index ed36573f..d37d4dff --- a/content/developer/hosts.md +++ b/content/developer/hosts.md @@ -1,27 +1,17 @@ ---- -title: Understanding ejabberd hosts -menu: Hosts -order: 80 ---- +# Understanding ejabberd hosts -The host parameter is very commonly used through ejabberd code -base. It is very important to understand what it means and how it is -used. +The host parameter is very commonly used through ejabberd code base. It is very important to understand what it means and how it is used. -# Component subdomains +## Component subdomains Most XMPP service are reference as subdomain of the main XMPP domain. For example, Multi User Chat or Publish-Subscribe are available as subdomains of the main XMPP domain served by an installation. -You can also plug external components to an ejabberd server. External -components will have their own subdomain as well and will be -exchanging data with ejabberd using a simplified XML stream. +You can also plug external components to an ejabberd server. External components will have their own subdomain as well and will be exchanging data with ejabberd using a simplified XML stream. -Components can be written in any programming language. ejabberd -supports -[XEP-0114: Jabber Component Protocol](https://xmpp.org/extensions/xep-0114.html). +Components can be written in any programming language. ejabberd supports [XEP-0114: Jabber Component Protocol](https://xmpp.org/extensions/xep-0114.html). Note the external component have limited rights on the XMPP server. As such, it is less powerful than an ejabberd module written @@ -29,7 +19,7 @@ in Erlang or Elixir. Some proposed XMPP extensions, like [Privilege Entities](https://xmpp.org/extensions/xep-0356.html), may grant more privileges in the future to external components. -# Virtual hosts +## Virtual hosts ejabberd fully support virtual hosting. It means that the same ejabberd cluster can provide the service for multiple user bases using diff --git a/content/developer/index.md b/content/developer/index.md old mode 100755 new mode 100644 index 26a670d6..a4001148 --- a/content/developer/index.md +++ b/content/developer/index.md @@ -1,25 +1,16 @@ ---- -title: ejabberd for Developers -menu: For Developers -order: 30 -toc: true ---- +# ejabberd for Developers -As a developer, you can customize ejabberd to design almost every type -of XMPP related type of solutions. +As a developer, you can customize ejabberd to design almost every type of XMPP related type of solutions. -As a starting point, we recommend that you get extremely familiar with -both the core XMPP protocol itself and its extensions. +As a starting point, we recommend that you get extremely familiar with both the core XMPP protocol itself and its extensions. -From that, once you understand well XMPP, you can tame ejabberd to -build your dream messaging system. +From that, once you understand well XMPP, you can tame ejabberd to build your dream messaging system. -# Getting started +## Getting started -## Source code +### Source code -ejabberd source is available on Github: -[ejabberd](https://github.com/processone/ejabberd) +ejabberd source is available on Github: [ejabberd](https://github.com/processone/ejabberd) You will need to get familiar with it to start learning about ejabberd module writing. The first place to start? You should read the @@ -32,20 +23,19 @@ available from [ejabberd-contribs](https://github.com/processone/ejabberd-contrib) repository. -For a complete overview of ejabberd source code and its dependencies, please refer to [ejabberd and related repositories](repositories/) +For a complete overview of ejabberd source code and its dependencies, please refer to [ejabberd and related repositories](./repositories.md) -## Development Environment +### Development Environment The first step to develop for ejabberd is to install and configure your development environment: -* Check the [Source Code Installation](/admin/installation/#source-code) section +* Check the [Source Code Installation](../admin/install/source.md) section * If using Emacs, install [erlang-mode](https://www.erlang.org/doc/apps/tools/erlang_mode_chapter.html) in your operating system -* If using OSX, check the [OSX development environment](install-osx/) section -* For Visual Studio Code and alternatives, check the [Developing ejabberd with VSCode](vscode/) section +* If using OSX, check the [OSX development environment](./install-osx.md) section +* For Visual Studio Code and alternatives, check the [Developing ejabberd with VSCode](./vscode.md) section -# Customizing ejabberd - -* [ejabberd development guide](guide/) -* [ejabberd modules development](extending-ejabberd/modules/) +## Customizing ejabberd +* [ejabberd development guide](./guide.md) +* [ejabberd modules development](./extending-ejabberd/modules.md) diff --git a/content/developer/install-osx.md b/content/developer/install-osx.md old mode 100755 new mode 100644 index 06bdd79b..6b2680a8 --- a/content/developer/install-osx.md +++ b/content/developer/install-osx.md @@ -1,13 +1,9 @@ ---- -title: Installing ejabberd development environment on OSX -menu: OSX Install -order: 150 ---- +# Installing ejabberd development environment on OSX This short guide will show you how to compile ejabberd from source code on Mac OS X, and get users chatting right away. -# Before you start +## Before you start ejabberd is supported on Mac OS X 10.6.8 and later. Before you can compile and run ejabberd, you also need the following to be installed @@ -20,7 +16,7 @@ on your system: * Erlang/OTP 19.1 or higher. We recommend using Erlang 21.2. * Autotools -# Homebrew +## Homebrew An easy way to install some of the dependencies is by using a package manager, such as [Homebrew](https://brew.sh/) – the Homebrew commands @@ -41,46 +37,49 @@ are provided here: You can install everything with a single command: - - brew install erlang elixir openssl expat libyaml libiconv libgd sqlite rebar rebar3 automake autoconf +``` sh +brew install erlang elixir openssl expat libyaml libiconv libgd sqlite rebar rebar3 automake autoconf +``` -# Installation +## Installation To build and install ejabberd from source code, do the following: -1. Clone the Git repository:
 `git clone git@github.com:processone/ejabberd.git` +1. Clone the Git repository: `git clone git@github.com:processone/ejabberd.git` 2. Go to your ejabberd build directory: `cd ejabberd` 3. Run the following commands, assuming you want to install your ejabberd deployment into your home directory: - chmod +x autogen.sh - ./autogen.sh - export LDFLAGS="-L/usr/local/opt/openssl/lib -L/usr/local/lib -L/usr/local/opt/expat/lib" - export CFLAGS="-I/usr/local/opt/openssl/include/ -I/usr/local/include -I/usr/local/opt/expat/include" - export CPPFLAGS="-I/usr/local/opt/openssl/include/ -I/usr/local/include -I/usr/local/opt/expat/include" - ./configure --prefix=$HOME/my-ejabberd --enable-sqlite - make && make install + ``` sh + chmod +x autogen.sh + ./autogen.sh + export LDFLAGS="-L/usr/local/opt/openssl/lib -L/usr/local/lib -L/usr/local/opt/expat/lib" + export CFLAGS="-I/usr/local/opt/openssl/include/ -I/usr/local/include -I/usr/local/opt/expat/include" + export CPPFLAGS="-I/usr/local/opt/openssl/include/ -I/usr/local/include -I/usr/local/opt/expat/include" + ./configure --prefix=$HOME/my-ejabberd --enable-sqlite + make && make install + ``` Note that the previous command reference the previously installed dependencies from [Homebrew](https://brew.sh/). -# Running ejabberd +## Running ejabberd -* From your ejabberd build directory, go to the installation directory: 
`cd $HOME/my-ejabberd` -* To start the ejabberd server, run the following command: 
`sbin/ejabberdctl start` -* To verify that ejabberd is running, enter the following:
 `sbin/ejabberdctl status` +* From your ejabberd build directory, go to the installation directory: `cd $HOME/my-ejabberd` +* To start the ejabberd server, run the following command: `sbin/ejabberdctl start` +* To verify that ejabberd is running, enter the following: `sbin/ejabberdctl status` If the server is running, response should be as follow: - ``` + ``` sh $ sbin/ejabberdctl status The node ejabberd@localhost is started with status: started ejabberd 14.12.40 is running in that node - ``` + ``` -* To connect to the ejabberd console after starting the server: 
`sbin/ejabberdctl debug` -* Alternatively, you can also run the server in interactive mode:
 `sbin/ejabberdctl live` +* To connect to the ejabberd console after starting the server: `sbin/ejabberdctl debug` +* Alternatively, you can also run the server in interactive mode: `sbin/ejabberdctl live` -# Registering a user +## Registering a user The default XMPP domain served by ejabberd right after the build is `localhost`. This is different from the IP address, DNS name of the @@ -89,17 +88,17 @@ running on your machine with `localhost` XMPP domain, by using your computer IP address or DNS name. This can prove handy in development phase to get more testers. -## Adium +### Adium -Adium is a popular XMPP client on OSX. You can use it +Adium is a popular XMPP client on OSX. You can use it 1. Launch Adium. If the Adium Setup Assistant opens, close it. 2. In the **Adium** menu, select **Preferences**, and then select the **Accounts** tab. 3. Click the **+** button and select **XMPP (Jabber)**. 4. Enter a Jabber ID (for example, “user1@localhost”) and password, and then click **Register New Account**. 5. In the **Server** field, enter the following: - * Users registering on the computer on which ejabberd is running: `localhost` - * Users registering from a different computer: the ejabberd server’s IP address + * Users registering on the computer on which ejabberd is running: `localhost` + * Users registering from a different computer: the ejabberd server’s IP address 6. Click **Request New Account**. After registration, the user will connect automatically. @@ -108,15 +107,15 @@ Registered users wishing to add an existing account to Adium should enter the ejabberd server’s IP address in the **Connect Server** field on the **Options** tab. -## Command line +### Command line -You can register a user with the `ejabberdctl` utility: +You can register a user with the `ejabberdctl` utility: `ejabberdctl register user domain password` -For example: +For example: `ejabberdctl register user1 localhost myp4ssw0rd` -# Domains +## Domains To use your system’s domain name instead of localhost, edit the following ejabberd configuration file: @@ -128,13 +127,15 @@ obsolete format for configuration file. You can ignore the and focus on the new and more user friendly Yaml format. Find the line listing the hosts: -``` + +``` sh hosts: - "localhost" ``` Replace `localhost` with your XMPP domain name, for example: -``` + +``` sh hosts: - "example.org" ``` @@ -144,16 +145,16 @@ A user’s Jabber ID will then use the domain instead of localhost, for example: `user1@example.org` You can also configure multiple (virtual) domains for one server: -``` + +``` sh hosts: - "example1.org" - "example2.org" ``` -# Get chatting! +## Get chatting Users that are registered on your server can now add their accounts in a chat application like Adium (specifying either the server’s IP address or domain name), add each other as contacts, and start chatting. - diff --git a/content/developer/ios/getting-started-xmppframework.md b/content/developer/ios/getting-started-xmppframework.md deleted file mode 100755 index e733580a..00000000 --- a/content/developer/ios/getting-started-xmppframework.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect: /developer/xmpp-clients-bots/ios/getting-started-xmppframework/ ---- - diff --git a/content/developer/ios/index.md b/content/developer/ios/index.md deleted file mode 100755 index 65d08b2b..00000000 --- a/content/developer/ios/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect: /developer/xmpp-clients-bots/ios/index/ ---- - diff --git a/content/developer/localization.md b/content/developer/localization.md deleted file mode 100755 index acd6e53e..00000000 --- a/content/developer/localization.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect: /developer/extending-ejabberd/localization/ ---- - diff --git a/content/developer/modules.md b/content/developer/modules.md deleted file mode 100755 index 5387be4c..00000000 --- a/content/developer/modules.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect: /developer/extending-ejabberd/modules/ ---- - diff --git a/content/developer/proposed-extensions/index.md b/content/developer/proposed-extensions/index.md deleted file mode 100755 index d5c8419d..00000000 --- a/content/developer/proposed-extensions/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect: /developer/xmpp-clients-bots/extensions/ ---- - diff --git a/content/developer/proposed-extensions/muc-sub.md b/content/developer/proposed-extensions/muc-sub.md deleted file mode 100755 index 75ece66d..00000000 --- a/content/developer/proposed-extensions/muc-sub.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect: /developer/xmpp-clients-bots/extensions/muc-sub/ ---- - diff --git a/content/developer/pubsub.md b/content/developer/pubsub.md deleted file mode 100755 index 17add414..00000000 --- a/content/developer/pubsub.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect: /developer/extending-ejabberd/pubsub/ ---- - diff --git a/content/developer/repositories.md b/content/developer/repositories.md old mode 100755 new mode 100644 index 109d4e2f..b0e092e6 --- a/content/developer/repositories.md +++ b/content/developer/repositories.md @@ -1,117 +1,60 @@ ---- -title: Understanding ejabberd and its dependencies -menu: Repositories -order: 180 ---- - -We wanted to make sure that ejabberd is modular and that parts that -can be of interest for other Erlang projects can be reused. - -Not only we are massive open source contributors to Erlang community -and ecosystem, but we are also trying to help even more by reviewing -your pull requests. Do not hesitate to submit some on any of the many -repositories mentioned here. - -# ejabberd dependencies - -ejabberd code based is split among several repositories so effectively -ejabberd code is much more than what is in its primary repository. - -## Required dependencies - -The main ejabberd repository is -[processone/ejabberd](https://github.com/processone/ejabberd) - -There is hundreds of forks, but we actively maintain ejabberd to make -it the most reliable and up to date version. This is thus your best -starting point. - -When you build ejabberd yourself, the build chain will download a few -Erlang dependencies: - -* [processone/cache_tab](https://github.com/processone/cache_tab): - Flexible in-memory Erlang caching module. -* [processone/iconv](https://github.com/processone/iconv): Native - iconv driver for Erlang. This is use for fast character encoding - conversion. -* [processone/fast_xml](https://github.com/processone/fast_xml): - Fast native Expat based Erlang XML parsing library. XML is the - core of XMPP so we needed to provide the fast and more robust XML - parsing stack as possible. It means that if you are looking for a - great XML parser, reusing p1_xml is probably a great idea. -* [processone/stringprep](https://github.com/processone/stringprep): - Fast and efficient Erlang Stringprep native driver. Stringprep is - heavily used in XMPP to define encoding rules of various XMPP - objects. -* [processone/fast_yaml](https://github.com/processone/fast_yaml): - Native Erlang interface to libyaml, for fast robust YAML parsing. - This is needed by our new config file format. -* [processone/ezlib](https://github.com/processone/ezlib): - Native zlib driver for Erlang. Used for fast / efficient stream - compression. -* [processone/fast_tls](https://github.com/processone/fast_tls): - Erlang native driver for TLS / SSL. It is build for performance - and is more scalable that Erlang SSL driver. If your Erlang server - is handling heavy load and is using TLS, we strongly recommend you - check / compare with this driver. -* [processone/esip](https://github.com/processone/esip): - ProcessOne SIP protocol support to add SIP-based voice capabilities - to ejabberd. -* [processone/stun](https://github.com/processone/stun): - Implementation of - [Session Traversal Utilities for NAT](https://en.wikipedia.org/wiki/STUN). It - is used for XMPP and SIP media capabilities, to help client discover - their visible IP address and allow them to get in touch through - NAT. This is basically useful for voice and file transfers. -* [processone/p1_utils](https://github.com/processone/p1_utils): - This is extra Erlang modules developed for ejabberd but that can - be useful in other Erlang applications. -* [processone/p1_logger](https://github.com/processone/p1_logger): - Logger wrapper to allow selecting your preferred logger at build - time. +# Understanding ejabberd and its dependencies + +We wanted to make sure that ejabberd is modular and that parts that can be of interest for other Erlang projects can be reused. + +Not only we are massive open source contributors to Erlang community and ecosystem, but we are also trying to help even more by reviewing your pull requests. Do not hesitate to submit some on any of the many repositories mentioned here. + +## ejabberd dependencies + +ejabberd code based is split among several repositories so effectively ejabberd code is much more than what is in its primary repository. + +### Required dependencies + +The main ejabberd repository is [processone/ejabberd](https://github.com/processone/ejabberd) + +There is hundreds of forks, but we actively maintain ejabberd to make it the most reliable and up to date version. This is thus your best starting point. + +When you build ejabberd yourself, the build chain will download a few Erlang dependencies: + +* [processone/cache_tab](https://github.com/processone/cache_tab): Flexible in-memory Erlang caching module. +* [processone/iconv](https://github.com/processone/iconv): Native iconv driver for Erlang. This is use for fast character encoding conversion. +* [processone/fast_xml](https://github.com/processone/fast_xml): Fast native Expat based Erlang XML parsing library. XML is the core of XMPP so we needed to provide the fast and more robust XML parsing stack as possible. It means that if you are looking for a great XML parser, reusing p1_xml is probably a great idea. +* [processone/stringprep](https://github.com/processone/stringprep): Fast and efficient Erlang Stringprep native driver. Stringprep is heavily used in XMPP to define encoding rules of various XMPP objects. +* [processone/fast_yaml](https://github.com/processone/fast_yaml): Native Erlang interface to libyaml, for fast robust YAML parsing. This is needed by our new config file format. +* [processone/ezlib](https://github.com/processone/ezlib): Native zlib driver for Erlang. Used for fast / efficient stream compression. +* [processone/fast_tls](https://github.com/processone/fast_tls): Erlang native driver for TLS / SSL. It is build for performance and is more scalable that Erlang SSL driver. If your Erlang server is handling heavy load and is using TLS, we strongly recommend you check / compare with this driver. +* [processone/esip](https://github.com/processone/esip): ProcessOne SIP protocol support to add SIP-based voice capabilities to ejabberd. +* [processone/stun](https://github.com/processone/stun): Implementation of [Session Traversal Utilities for NAT](https://en.wikipedia.org/wiki/STUN). It is used for XMPP and SIP media capabilities, to help client discover their visible IP address and allow them to get in touch through NAT. This is basically useful for voice and file transfers. +* [processone/p1_utils](https://github.com/processone/p1_utils): This is extra Erlang modules developed for ejabberd but that can be useful in other Erlang applications. +* [processone/p1_logger](https://github.com/processone/p1_logger): Logger wrapper to allow selecting your preferred logger at build time. * [basho/lager](https://github.com/basho/lager): Erlang logger module. -* [DeadZen/goldrush](https://github.com/DeadZen/goldrush): Small - Erlang app that provides fast event stream processing. It is used by - lager. -* [vaxelfel/eHyperLogLog](https://github.com/vaxelfel/eHyperLogLog): - HyperLogLog, a distinct values estimator, in Erlang. Used for - analytics. +* [DeadZen/goldrush](https://github.com/DeadZen/goldrush): Small Erlang app that provides fast event stream processing. It is used by lager. +* [vaxelfel/eHyperLogLog](https://github.com/vaxelfel/eHyperLogLog): HyperLogLog, a distinct values estimator, in Erlang. Used for analytics. -## Optional dependencies +### Optional dependencies -Then, we use a few other dependent repositories that may be used if you -have enabled support in the configure script. +Then, we use a few other dependent repositories that may be used if you have enabled support in the configure script. Here are the dependencies for relational database support: -* [processone/mysql](https://github.com/processone/mysql): Pure Erlang - MySQL driver. -* [processone/pgsql](https://github.com/processone/pgsql): Pure Erlang - PostgreSQL driver +* [processone/mysql](https://github.com/processone/mysql): Pure Erlang MySQL driver. +* [processone/pgsql](https://github.com/processone/pgsql): Pure Erlang PostgreSQL driver Here are the dependencies for Elixir support: -* [elixir-lang/elixir](https://github.com/elixir-lang/elixir): Used to - write ejabberd modules in Elixir programming language. -* [yrashk/rebar_elixir_plugin](https://github.com/yrashk/rebar_elixir_plugin): - Plugin for rebar build tool to support Elixir modules compilation. +* [elixir-lang/elixir](https://github.com/elixir-lang/elixir): Used to write ejabberd modules in Elixir programming language. +* [yrashk/rebar_elixir_plugin](https://github.com/yrashk/rebar_elixir_plugin): Plugin for rebar build tool to support Elixir modules compilation. -After you have build ejabberd from source, you will find all the -dependencies downloaded and build in the _deps_ directory. +After you have build ejabberd from source, you will find all the dependencies downloaded and build in the _deps_ directory. -As you see, there is much more Erlang code produce at ProcessOne and -contributed to the Erlang community than just ejabberd repository. +As you see, there is much more Erlang code produce at ProcessOne and contributed to the Erlang community than just ejabberd repository. -# ejabberd contributions +## ejabberd contributions -This is not dependencies, but simply modules that you may find nice to -add to your ejabberd deployment. +This is not dependencies, but simply modules that you may find nice to add to your ejabberd deployment. -We attempted to gather some of the more useful ejabberd modules in a -contribution repository to ease discovery. +We attempted to gather some of the more useful ejabberd modules in a contribution repository to ease discovery. -This repository is available on Github: -[ejabberd-contribs](https://github.com/processone/ejabberd-contrib) +This repository is available on Github: [ejabberd-contribs](https://github.com/processone/ejabberd-contrib) -We are thinking about a better approach for ejabberd contributions -discovery. More on that soon. +We are thinking about a better approach for ejabberd contributions discovery. More on that soon. diff --git a/content/developer/sql-schema.md b/content/developer/sql-schema.md old mode 100755 new mode 100644 index 6b44303f..cb5a1d00 --- a/content/developer/sql-schema.md +++ b/content/developer/sql-schema.md @@ -1,11 +1,4 @@ ---- -title: ejabberd SQL Database Schema -toc: true -menu: SQL Schema -order: 190 ---- - -> This section describes ejabberd SQL database schema of most recent version. If you are using an old ejabberd release, please refer to the corresponding archived version of this page in the [Archive](/archive/). +# ejabberd SQL Database Schema We present the tables that might be in use, depending on your server configuration, together with a short explanation of the fields involved and their intended use. Tables are presented roughly grouped by related functionality. @@ -20,9 +13,9 @@ Latest version of database schema are available in [ejabberd Github repository]( schema need testing / feedback and possibly improvement from SQL Server users. -# Authentication +## Authentication -## Table `users` +### Table `users` Contains the information required to authenticate users. @@ -32,7 +25,6 @@ Contains the information required to authenticate users. | password | string | User password, can be hashed | | created_at | timestamp | When the user account was created | - The password are hashed if you use SCRAM authentication. In that case the next fields are also defined | Field | Type | Usage | @@ -41,28 +33,26 @@ The password are hashed if you use SCRAM authentication. In that case the next f | salt | string | support for salted passwords | | iterationcount | integer | support for salted passwords | +## Rosters -# Rosters - -## Table `rosterusers` +### Table `rosterusers` This is a quite complex table, used as a store for a quite complex protocol that is the one defined to manage rosters and subscriptions on [rfc6121](https://tools.ietf.org/html/rfc6121). In the common case of two users adding each other as contacts, entries in the roster table follows a series of steps - as they moves from a subscription request to the final approval and bi-directional subscription being established. + as they moves from a subscription request to the final approval and bi-directional subscription being established. This process can be initiated either by the user, or by the (possible remote) peer. Also need to account for the case where the user, or the contact, might not be online at the moment of the subscription request is made. -Steps are further complicated by the fact that entries in the roster aren't required to have corresponding subscriptions. -For details of the meaning of the different fields, refer to [the protocol itself](https://tools.ietf.org/html/rfc6121#section-2), as these are mostly a direct mapping of it. - +Steps are further complicated by the fact that entries in the roster aren't required to have corresponding subscriptions. +For details of the meaning of the different fields, refer to [the protocol itself](https://tools.ietf.org/html/rfc6121#section-2), as these are mostly a direct mapping of it. + Note: If you manage users contacts from outside the roster workflow of XMPP (for example your site backends perform the linking between users), it is likely that you only need to care about the username, jid and nick fields, and set the subscription field to be always 'B' for a mutual link between users. - | Field | Type | Usage | | -------------------- | ---------------- | --------------------------------------------------------------------------------------- | | username | string | User | @@ -76,22 +66,18 @@ users), it is likely that you only need to care about the username, jid and ni | type | string | "item" | | created_at | timestamp | Creation date of this roster entry | +### Table `rostergroups` +### Table `sr_group` +### Table `sr_user` -## Table `rostergroups` +## Messages -## Table `sr_group` +### Table `spool` -## Table `sr_user` - - - -# Messages - -## Table `spool` -Messages sent to users that are offline are stored in this table. -Do not confuse this with general message archiving: messages are only temporarily stored in this table, removed as soon as the target user +Messages sent to users that are offline are stored in this table. +Do not confuse this with general message archiving: messages are only temporarily stored in this table, removed as soon as the target user is back online and the pending messages delivered to it. | Field | Type | Usage | @@ -103,8 +89,7 @@ is back online and the pending messages delivered to it. The seq field is used for sorting, and to easily identify a particular user message. - -## Table `privacy_list_data` +### Table `privacy_list_data` The table is used to store privacy rules. @@ -113,17 +98,18 @@ privacy lists. For more details, please read [XEP-0016: Privacy Lists, Syntax and Semantics](https://xmpp.org/extensions/xep-0016.html#protocol-syntax). Here is an example packet coming from privacy list specification: - - - [] - [] - [] - [] - +``` xml + + [] + [] + [] + [] + +``` The table fields are defined as follow: @@ -140,11 +126,10 @@ The table fields are defined as follow: | match\_presence\_in | boolean (0 or 1) | If true (1), means inbound presence packets type will be matched by rule. | | match\_presence\_out | boolean (0 or 1) | If true (1), means outbound packets type will be matched by rule. | +## Multiuser Chat Rooms +### Table `muc_room` -# Multiuser Chat Rooms - -## Table `muc_room` It is used to store *persistent* rooms, that is, rooms that must be automatically started with the server. | Field | Type | Usage | @@ -154,12 +139,12 @@ It is used to store *persistent* rooms, that is, rooms that must be automaticall | opts | string | Room options, encoded as erlang terms | | created_at | timestamp | Creation date | -The opts field is legible, but not mean to be modified directly. It contents depends on the implementation of mod_muc. +The opts field is legible, but not mean to be modified directly. It contents depends on the implementation of mod_muc. It contains the room configuration and affiliations. +### Table `muc_registered` -## Table `muc_registered` -Contains a map of user to nicknames. When a user register a nickname with the conference module, that nick is reserved and can't be used by +Contains a map of user to nicknames. When a user register a nickname with the conference module, that nick is reserved and can't be used by anyone else, in any room from that conference host. | Field | Type | Usage | @@ -169,8 +154,8 @@ anyone else, in any room from that conference host. | nick | string | Room options, encoded as erlang terms | | created_at | timestamp | Creation date | +### Table `room_history` -## Table `room_history` In ejabberd Business Edition, this table is used if persistent room history is enabled. If so, recent room history is saved to the DB before ejabberd is stopped, allowing the recent history to survive server restarts. @@ -184,7 +169,8 @@ allowing the recent history to survive server restarts. | created_at | timestamp | Creation date | | size | integer | Size in bytes of the xml packet | -## Table `muc_online_room` +### Table `muc_online_room` + This table is used to store rooms that actually exists in the memory of the server. | Field | Type | Usage | @@ -194,7 +180,8 @@ This table is used to store rooms that actually exists in the memory of the serv | node | string | Erlang node where the room is | | pid | string | Pid of the thread running the room | -## Table `muc_online_users` +### Table `muc_online_users` + This table is used to store MucSub subscriptions. | Field | Type | Usage | @@ -206,7 +193,8 @@ This table is used to store MucSub subscriptions. | host | string | Hostname of the conference component | | node | string | Erlang node | -## Table `muc_room_subscribers` +### Table `muc_room_subscribers` + This table is used to store MucSub subscriptions. | Field | Type | Usage | @@ -218,13 +206,11 @@ This table is used to store MucSub subscriptions. | nodes | string | MucSub nodes | | created_at | timestamp | Creation date | +## VCard -# VCard - -## Table `vcard` +### Table `vcard` -The table is used to store raw vCard content for delivery of the vCard -"as is". +The table is used to store raw vCard content for delivery of the vCard "as is". The table fields are defined as follow: @@ -234,7 +220,7 @@ The table fields are defined as follow: | vcard | text | Raw Vcard | | created_at | timestamp | Record creation date | -## Table `vcard_search` +### Table `vcard_search` The table is used to store vCard index on a few of the Vcard field used for vCard search in users directory. @@ -271,10 +257,11 @@ The table fields are defined as follow: | orgunit | string | Raw organisation department name for display | | lorgunit | string | Lowercase organisation department for search | -# Others +## Others -## Table `last` -This table is used to store the last time the user was seen online. +### Table `last` + +This table is used to store the last time the user was seen online. It is defined as follow: | Field | Type | Usage | @@ -283,11 +270,10 @@ It is defined as follow: | seconds | string | Timestamp for the last time the user was seen online | | state | string | Why user got disconnected. Usually is empty | -Note that the table is *not* updated while the user has the session open. - +Note that the table is *not* updated while the user has the session open. +### Table `caps_features` -## Table `caps_features` Ejabberd uses this table to keep a list of the entity capabilities discovered. | Field | Type | Usage | @@ -297,10 +283,11 @@ Ejabberd uses this table to keep a list of the entity capabilities discovered. | feature | string | Entity feature | | created_at | timestamp | Creation date | -The subnode field correspond to the 'ver' ("verification string") of XEP-0115. +The subnode field correspond to the 'ver' ("verification string") of XEP-0115. There is one entry in this table for each feature advertised by the given (node,subnode) pair. -## Table `private_storage` +### Table `private_storage` + Used for user private data storage. | Field | Type | Usage | @@ -309,4 +296,3 @@ Used for user private data storage. | namespace | string | XEP-0049 namespace of the stored data | | data | string | Raw xml | | created_at | timestamp | Creation date | - diff --git a/content/developer/stanza-routing.md b/content/developer/stanza-routing.md deleted file mode 100755 index 87224fe1..00000000 --- a/content/developer/stanza-routing.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect: /developer/extending-ejabberd/stanza-routing/ ---- - diff --git a/content/developer/testing.md b/content/developer/testing.md deleted file mode 100755 index 599edec9..00000000 --- a/content/developer/testing.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect: /developer/extending-ejabberd/testing/ ---- - diff --git a/content/developer/vscode.md b/content/developer/vscode.md index 420c6b02..b0ebb77c 100644 --- a/content/developer/vscode.md +++ b/content/developer/vscode.md @@ -1,27 +1,18 @@ ---- -title: Developing ejabberd with VSCode -menu: VSCode -order: 230 -toc: true ---- +# Developing ejabberd with VSCode -The ejabberd git repository includes basic configuration and a few -scripts to get started with VSCode, since ejabberd 23.01. + -There are several VSCode alternatives for ejabberd development: +The ejabberd git repository includes basic configuration and a few +scripts to get started with ejabberd development using Visual Studio Code. -* [Visual Studio Code](#visual-studio-code) desktop app – - local development with no dependencies -* [VSCodium](#vscodium) desktop app – - local development installing dependencies -* [Coder's code-server](#coder-s-code-server) container image – - local or remote development -* [GitHub Codespaces](#github-codespaces) service – - quick and short remote development +There are several Visual Studio Code flavours suitable for ejabberd development: +* [Visual Studio Code](#visual-studio-code) desktop app – local development with no dependencies +* [VSCodium](#vscodium) desktop app – local development installing dependencies +* [Coder's code-server](#coders-code-server) container image – local or remote development +* [GitHub Codespaces](#github-codespaces) service – quick and short remote development -Visual Studio Code ------------------- +## Visual Studio Code The official [Visual Studio Code](https://code.visualstudio.com/) installers provided by Microsoft can use the official marketplace. @@ -38,9 +29,7 @@ clone the ejabberd git repository locally, let it install the Dev Container extension, then let it reopen the path inside the devcontainer. - -VSCodium --------- +## VSCodium [VSCodium](https://github.com/VSCodium/vscodium) provides Free/Libre Open Source Software Binaries of VSCode. @@ -56,9 +45,7 @@ Once installed: open your local ejabberd git clone. It's highly recommended to go the EXTENSIONS tab and install the [Erlang LS extension](https://github.com/erlang-ls/vscode). - -Coder's code-server -------------------- +## Coder's code-server An easy, zero-cost, way to use VSCode in a web browser is through the ejabberd's code-server container image. @@ -68,7 +55,8 @@ Erlang/OTP, Elixir, and all the required libraries. Download and start the container, and provide as volume the path of your local ejabberd git clone: -``` + +``` sh docker run \ --name coder \ -it \ @@ -76,13 +64,12 @@ docker run \ -v $(pwd)/ejabberd:/workspaces/ejabberd \ ghcr.io/processone/code-server ``` + Now open in your web browser: `http://0.0.0.0:5208/` The next time it can be started with `docker start -i coder` - -GitHub Codespaces ------------------ +## GitHub Codespaces The ejabberd git repository contains default configuration to use it in the GitHub Codespaces service. @@ -93,13 +80,11 @@ and later requires a subscription. To start using it: -1. Go to https://github.com/codespaces +1. Go to 2. Click "New codespace" 3. Select ejabberd repository, desired branch, click "Create codespace" - -Basic Usage ------------ +## Basic Usage Once you have VSCode running and ejabberd git repository opened, open some erlang file, so Erlang LS extension gets started, @@ -108,14 +93,12 @@ The first time it will take some time to compile, be patient. Now you can: -- In RUN click `▷ Relive` to compile and start ejabberd -- In EXPLORER open any source code, and add a breakpoint -- In TERMINAL you can call: `ejabberdctl register admin localhost somepass` -- In PORTS you can view the addresses you can use to connect to the running ejabberd +* In RUN click `▷ Relive` to compile and start ejabberd +* In EXPLORER open any source code, and add a breakpoint +* In TERMINAL you can call: `ejabberdctl register admin localhost somepass` +* In PORTS you can view the addresses you can use to connect to the running ejabberd The ejabberd configuration file is in `_build/relive/conf/ejabberd.yml`. You can connect to ejabberd using a XMPP client using HTTPS BOSH or WS on port 5443. Webadmin is on port 5280, if it complains 404, add `admin/` to the URL. - - diff --git a/content/developer/xmpp-clients-bots/extensions/index.md b/content/developer/xmpp-clients-bots/extensions/index.md deleted file mode 100755 index 41b4682b..00000000 --- a/content/developer/xmpp-clients-bots/extensions/index.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: XMPP Extensions -menu: Extensions -order: 10 ---- - -Here is a section gathering proposed XMPP extensions: - -- [Muc Sub](muc-sub/): Extension to ease use of MUC on mobile by mixing Multi-User Chat with Subscription approach. -- [Simplified Roster Versioning](roster-versioning/): ejabberd implements a simplified roster versioning approach, - compliant with roster versioning as defined in [XEP-0237](roster-versioning/). diff --git a/content/developer/xmpp-clients-bots/extensions/muc-sub.md b/content/developer/xmpp-clients-bots/extensions/muc-sub.md old mode 100755 new mode 100644 index b9aa88a1..07d5360e --- a/content/developer/xmpp-clients-bots/extensions/muc-sub.md +++ b/content/developer/xmpp-clients-bots/extensions/muc-sub.md @@ -1,9 +1,6 @@ ---- -title: MucSub: Multi-User Chat Subscriptions -toc: true ---- +# MucSub: Multi-User Chat Subscriptions -# Motivation +## Motivation In XMPP, Multi-User Chat rooms design rely on presence. To participate in a MUC room, you need to send a presence to the room. When you get @@ -78,7 +75,7 @@ The goal is to learn from real life working implementation to help feeding MIX with feedback from the field, without having to reinvent a complete new protocol. -# General principle +## General principle The core idea is to expose MUC rooms as PubSub nodes and to introduce the concept of MUC rooms subscribers. @@ -89,25 +86,25 @@ participant in the room. It means that a user can receive messages without having to send presence to the room. In that sense, "joining the room" in XEP-0045 becomes more "Being available in the MUC room". -# Discovering support +## Discovering support -## Discovering support on MUC service +### Discovering support on MUC service You can check if MUC/Sub feature is available on MUC service by sending Disco Info IQ: -~~~ xml +``` xml -~~~ +``` MUC service will show a feature of type 'urn:xmpp:mucsub:0' to the response if the feature is supported and enabled: -~~~ xml +``` xml -~~~ +``` -## Discovering support on a specific MUC +### Discovering support on a specific MUC A user can discover support for MUC/Sub feature on a MUC room as follow: -~~~ xml +``` xml -~~~ +``` A conference MUST add 'urn:xmpp:mucsub:0' to the response if the feature is supported and enabled: -~~~ xml +``` xml -~~~ +``` -# Option MUC room support for subscriptions +## Option MUC room support for subscriptions Even if MUC room supports MUC/Sub feature, it MAY be explicitly enabled or disabled thanks to a new configuration option: - Allow subscription: Users can subscribe to MUC/Sub events. -# Subscriber role +## Subscriber role Until a subscriber is not joined a conference (see [Joining a MUC Room](#joining-a-muc-room)), a subscriber role MUST be 'none'. When a subscriber is joined a conference its role is changed according to [XEP-0045](https://xmpp.org/extensions/xep-0045.html) rules, that is, it becomes either 'visitor', 'participant' or 'moderator'. -# Subscribing to MUC/Sub events +## Subscribing to MUC/Sub events User can subscribe to the following events, by subscribing to specific nodes: @@ -186,7 +183,7 @@ nodes: Example: User Subscribes to MUC/Sub events -~~~ xml +``` xml -~~~ +``` If user is allowed to subscribe, server replies with success. The password attribute can be provided when subscribing to a password-protected room. Example: Server replies with success -~~~ xml +``` xml -~~~ +``` Subscription is associated with a nick. It will implicitly register the nick. Server should otherwise make sure that subscription match the @@ -229,7 +226,7 @@ MUST be sent with a different nick or nodes information. Example: User changes subscription data -~~~ xml +``` xml -~~~ +``` A room moderator can subscribe another user to MUC Room events by providing the user JID as an attribute in the `` element. Example: Room moderator subscribes another user -~~~ xml +``` xml -~~~ +``` -# Unsubscribing from a MUC Room +## Unsubscribing from a MUC Room At any time a user can unsubscribe from MUC Room events. Example: User unsubscribes from a MUC Room -~~~ xml +``` xml -~~~ +``` Example: A MUC Room responds to unsubscribe request -~~~ xml +``` xml -~~~ +``` A room moderator can unsubscribe another room user from MUC Room events by providing the user JID as an attribute in the `` element. Example: Room moderator unsubscribes another room user -~~~ xml +``` xml -~~~ +``` -# Subscriber actions +## Subscriber actions If not stated otherwise in this document, a subscriber MUST perform any actions in the conference as described in [XEP-0045](https://xmpp.org/extensions/xep-0045.html). For example, @@ -315,21 +312,21 @@ and so on. Here are a few examples: -## Sending a message +### Sending a message Sending a message is like sending a standard groupchat message in MUC room: -~~~ xml +``` xml Test -~~~ +``` No need to join it after you connect. As a subscriber, you can send messages at any time. -## Joining a MUC Room +### Joining a MUC Room If a user wants to be present in the room, they just have to join the room as defined in XEP-0045. @@ -345,12 +342,12 @@ MUST switch to a regular groupchat protocol (as described in [XEP-0045](https://xmpp.org/extensions/xep-0045.html)) until a subscriber leaves. -# Receiving events +## Receiving events Here is as an example message received by a subscriber when a message is posted to a MUC room when subscriber is subscribed to node urn:xmpp:mucsub:nodes:messages: -~~~ xml +``` xml @@ -372,12 +369,12 @@ when subscriber is subscribed to node urn:xmpp:mucsub:nodes:messages: -~~~ +``` Presence changes in the MUC room are received wrapped in the same way by subscribers which subscribed to node urn:xmpp:mucsub:nodes:presence: -~~~ xml +``` xml @@ -396,13 +393,13 @@ subscribers which subscribed to node urn:xmpp:mucsub:nodes:presence: -~~~ +``` If subscriber is subscribed to node urn:xmpp:mucsub:nodes:subscribers, message will ne sent for every mucsub subscription change. When a user becomes a subscriber: -~~~ xml +``` xml @@ -415,9 +412,11 @@ When a user becomes a subscriber: -~~~ +``` + When a user lost its subscription: -~~~ xml + +``` xml @@ -430,30 +429,30 @@ When a user lost its subscription: -~~~ +``` Note: Sometimes jid in subscribe/unsubscribe event may be missing if room is set to anonymous and user is not moderator. -# Getting List of subscribed rooms +## Getting List of subscribed rooms A user can query the MUC service to get their list of subscriptions. Example: User asks for subscriptions list -~~~ xml +``` xml -~~~ +``` Example: Server replies with subscriptions list -~~~ xml +``` xml -~~~ +``` -# Getting list of subscribers of a room +## Getting list of subscribers of a room A subscriber or room moderator can get the list of subscribers by sending `` request directly to the room JID. Example: Asks for subscribers list -~~~ xml +``` xml -~~~ +``` Example: Server replies with subscribers list -~~~ xml +``` xml -~~~ +``` -# Compliance with existing MUC clients +## Compliance with existing MUC clients MUC/Sub approach is compliant with existing MUC service and MUC clients. MUC clients compliant with XEP-0045 will receive messages @@ -527,14 +526,14 @@ However, a server could choose to send presence on behalf of subscribers when a user joins the room (in the XEP-0045 sense) so that the subscriber will be shown in MUC roster of legacy clients. -# Synchronization of MUC messages: Leveraging MAM support +## Synchronization of MUC messages: Leveraging MAM support To be friendly with mobile, the MAM service should allow a user to connect and easily resync their history for all MUC subscriptions. For details about MAM, see [XEP-0313 Message Archive Management](https://xmpp.org/extensions/xep-0313.html) and your software's documentation, for instance -[ejabberd's mod_mam](/admin/configuration/modules/#mod-mam). +[ejabberd's mod_mam](../../../admin/configuration/modules.md#mod_mam). Thanks to ability to get the list of all the existing subscription, client can get a starting point to interact with MAM service to resync history and @@ -552,7 +551,7 @@ You would only need to query MUC for MAM for rooms for which you do not use MucS with MucSub you will be "delivered" each message (in that case, each message is added your MAM archive). -# Push support compliance +## Push support compliance Subscriptions are compliant with push mechanism. It is supported out of the box when using ProcessOne p1:push implementation (deployed on ejabberd diff --git a/content/developer/xmpp-clients-bots/extensions/roster-versioning.md b/content/developer/xmpp-clients-bots/extensions/roster-versioning.md old mode 100755 new mode 100644 index 1d95d62f..959e8e61 --- a/content/developer/xmpp-clients-bots/extensions/roster-versioning.md +++ b/content/developer/xmpp-clients-bots/extensions/roster-versioning.md @@ -1,20 +1,14 @@ ---- -title: Roster versioning -toc: true ---- +# Roster versioning Roster versioning as implemented currently by ejabberd is a simplified approach to roster versioning. -This is an all-or-nothing approach that does not support the granular diff as explained in -[RFC-6121](https://tools.ietf.org/html/rfc6121#section-2.6). +This is an all-or-nothing approach that does not support the granular diff as explained in [RFC-6121](https://tools.ietf.org/html/rfc6121#section-2.6). -Our implementation conforms to [version 0.6 of XEP-0237](https://xmpp.org/extensions/attic/xep-0237-0.6.html#example-3), -sending the full roster in case of change or empty result if the roster did not change. +Our implementation conforms to [version 0.6 of XEP-0237](https://xmpp.org/extensions/attic/xep-0237-0.6.html#example-3), sending the full roster in case of change or empty result if the roster did not change. -As a result, as a client developer, when implementing support for roster versioning, you should expect both the -traditional form for returning the roster, with version (iq result) and the incremental roster changes (iq set). +As a result, as a client developer, when implementing support for roster versioning, you should expect both the traditional form for returning the roster, with version (iq result) and the incremental roster changes (iq set). -## Example +### Example As a summary, here is how you should expect it to work. @@ -47,10 +41,10 @@ In return, you get a full roster with the current version: - Test - -... - + Test + + ... +
``` @@ -68,5 +62,4 @@ If client send a roster query with reference version it received get an empty iq ``` -If client send roster query with any other reference version, it will receive the full roster again in the roster iq -result. +If client send roster query with any other reference version, it will receive the full roster again in the roster iq result. diff --git a/content/developer/xmpp-clients-bots/index.md b/content/developer/xmpp-clients-bots/index.md old mode 100755 new mode 100644 index 95a0100e..d1908bee --- a/content/developer/xmpp-clients-bots/index.md +++ b/content/developer/xmpp-clients-bots/index.md @@ -1,14 +1,17 @@ ---- -title: XMPP clients & bots -menu: XMPP clients & bots -order: 240 ---- +# XMPP clients & bots As an XMPP developer, you will have to learn the basic of the XMPP protocol to developer clients and bots. This section is here to help you get started in writing XMPP powered software. -* [Proposed Extensions](/developer/xmpp-clients-bots/extensions/) +## XMPP Extensions -* [iOS Development](/developer/xmpp-clients-bots/ios/) +Here is a section gathering proposed XMPP extensions: + +- [Muc Sub](extensions/muc-sub.md): Extension to ease use of MUC on mobile by mixing Multi-User Chat with Subscription approach. +- [Simplified Roster Versioning](extensions/roster-versioning.md): ejabberd implements a simplified roster versioning approach, compliant with roster versioning as defined in [XEP-0237](extensions/roster-versioning.md). + +## XMPP Development + +- [iOS Development](ios/getting-started-xmppframework.md): Getting started with XMPPFramework on iOS. diff --git a/content/developer/xmpp-clients-bots/ios/getting-started-xmppframework.md b/content/developer/xmpp-clients-bots/ios/getting-started-xmppframework.md old mode 100755 new mode 100644 index 0f0129eb..ffc90749 --- a/content/developer/xmpp-clients-bots/ios/getting-started-xmppframework.md +++ b/content/developer/xmpp-clients-bots/ios/getting-started-xmppframework.md @@ -1,6 +1,17 @@ ---- -title: Getting Started with XMPPFramework ---- +# Getting Started with XMPPFramework + +## Introduction + +XMPP development on smartphone has always been challenging given the +constraints on mobile platform. + +This area will help you understand the challenges and help you get +started with XMPP development on Apple iOS platform. + +The main library to support XMPP on iOS is +[XMPPFramework](https://github.com/robbiehanson/XMPPFramework). + +## XMPPFramework XMPPFramework is a large framework relying on several dependencies. The easiest way to get started is to use Cocoapods to @@ -14,17 +25,17 @@ Here are the steps needed to get started: 2. If you do not yet have a `Podfile`, create it if `pod init` command from the project root directory. - + 3. Edit your `Podfile` to use XMPPFramework as a target. It may looks like: - ~~~ ruby + ``` ruby platform :ios, '6.0' use_frameworks! target 'projectname' do pod 'XMPPFramework' end - ~~~ + ``` 4. Run `pod install` command. It should download, install and configure three pods. @@ -32,7 +43,6 @@ Here are the steps needed to get started: 5. Open your XCode project with the newly created workspace file instead of the project file. This is required by Cocoapods so that you can use the installed Pods. - + 6. At this stage, you should be able to build your project successfully with the XMPP framework setup. - diff --git a/content/developer/xmpp-clients-bots/ios/index.md b/content/developer/xmpp-clients-bots/ios/index.md deleted file mode 100755 index fefceb47..00000000 --- a/content/developer/xmpp-clients-bots/ios/index.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -title: XMPP Development on iOS -menu: iOS Development -order: 20 ---- - -XMPP development on smartphone has always been challenging given the -constraints on mobile platform. - -This area will help you understand the challenges and help you get -started with XMPP development on Apple iOS platform. - -The main library to support XMPP on iOS is -[XMPPFramework](https://github.com/robbiehanson/XMPPFramework). - -Here is a few topics that you may find useful: - -- [Getting started with XMPPFramework](getting-started-xmppframework/): - This page will help you setup your first iOS XMPPFramework based - project. - - diff --git a/content/developer/xmpp-clients-bots/proposed-extensions/index.md b/content/developer/xmpp-clients-bots/proposed-extensions/index.md deleted file mode 100755 index 8324e2c3..00000000 --- a/content/developer/xmpp-clients-bots/proposed-extensions/index.md +++ /dev/null @@ -1,3 +0,0 @@ ---- -redirect: /developer/xmpp-clients-bots/extensions/ ---- diff --git a/content/developer/xmpp-clients-bots/proposed-extensions/muc-sub.md b/content/developer/xmpp-clients-bots/proposed-extensions/muc-sub.md deleted file mode 100755 index 05a4d05c..00000000 --- a/content/developer/xmpp-clients-bots/proposed-extensions/muc-sub.md +++ /dev/null @@ -1,3 +0,0 @@ ---- -redirect: /developer/xmpp-clients-bots/extensions/muc-sub/ ---- diff --git a/content/ejabberd-faq/index.md b/content/ejabberd-faq/index.md old mode 100755 new mode 100644 index 5fbf7cbb..57fecea5 --- a/content/ejabberd-faq/index.md +++ b/content/ejabberd-faq/index.md @@ -1,13 +1,8 @@ ---- -title: ejabberd Frequently Asked Questions (FAQ) -toc: true -menu: FAQ -order: 60 ---- +# Frequently Asked Questions -# Development process +## Development process -## Why is there a commercial version of ejabberd? +### Why is there a commercial version of ejabberd? Different needs for different users. Corporations and large scale deployments are very different from smaller deployments and community projects. @@ -34,11 +29,10 @@ a limited time (See next section). So, even if you are not using our business edition, this is a great benefit for you as a user of the community edition and the reason you have seen so many improvements since 2002. Thanks to our business -edition customers, ejabberd project itself is a [major contributor to -Erlang and Elixir community](/developer/repositories/). +edition customers, ejabberd project itself is a [major contributor to Erlang and Elixir community](../developer/repositories.md). -## Does ProcessOne voluntarily hold some code in ejabberd community to push toward the business edition? +### Does ProcessOne voluntarily hold some code in ejabberd community to push toward the business edition? No. We never do that and have no plan doing so with the code we produce and we own. @@ -60,7 +54,7 @@ edition and the users of the community edition: - This is fair for the community as the community edition users know they will benefit from new extremely advanced features in a relatively near future. - For example, [websocket module](/admin/configuration/listen/#ejabberd-http-ws) was contributed to + For example, [websocket module](../admin/configuration/listen.md/#ejabberd_http_ws) was contributed to ejabberd community as part of this process. This is the model we have found to be fair to our broader user base and @@ -69,9 +63,9 @@ lets us produce an amazing code base that benefits all our users. This dual model is the core strength of our approach and our secret sauce to make sure everyone benefits. -# Performance +## Performance -## Is ejabberd the most scalable version? +### Is ejabberd the most scalable version? Yes. Definitely. Despite claims that there is small change you can make to make it more scalable, we already performed the changes during @@ -97,7 +91,7 @@ you can handle tens of millions of users on ejabberd systems. As a reference, you should read the following blog post: [ejabberd Massive Scalability: 1 Node — 2+ Million Concurrent Users](https://www.process-one.net/blog/ejabberd-massive-scalability-1node-2-million-concurrent-users/) -## What are the tips to optimize performance? +### What are the tips to optimize performance? Optimisation of XMPP servers performance, including ejabberd, is highly dependent on the use case. You really need to find your @@ -116,9 +110,9 @@ version. Each release of Erlang comes with more optimisation regarding locks, especially on SMP servers, and using the latest Erlang version can also help tremendously. -# Erlang support +## Erlang support -## Is ejabberd conforming to the best Erlang practices? +### Is ejabberd conforming to the best Erlang practices? Yes. Our build system is primarily based on rebar. However, as we are multiplatform and need to run in many various environments, we rely on a diff --git a/content/get-started/index.md b/content/get-started/index.md old mode 100755 new mode 100644 index 7e1ff05f..1b15f3a9 --- a/content/get-started/index.md +++ b/content/get-started/index.md @@ -1,75 +1,50 @@ ---- -title: Getting started with ejabberd -menu: Get Started -categories: ecs -toc: true -order: 10 ---- - -- [Quick Start with Binary Installers](/admin/installation/) – recommended when starting development on localhost - - [Install on Linux using RUN](/admin/installation/#linux-run-installer) - - [Install on Linux using DEB or RPM](/admin/installation/#linux-deb-and-rpm-installers) - - [Install on Windows using Docker](/admin/installation/#docker-image) - - [Install on macOS using Homebrew](/admin/installation/#homebrew) -- [Install from Source Code](/admin/installation/#source-code) – recommended for advanced users -- [Install with Operating System specific packages](/admin/installation/#operating-system-packages) – recommended for sysops -- [Next Steps](/admin/installation/#next-steps) – for example, register users and create admin accounts - -# Overview - -ejabberd is the de facto XMPP server in the world. The fact that it is -used to power the largest deployments in the world should not -intimidate you. ejabberd is equally suitable for small instances. - -ejabberd has been designed from the ground-up, since 2002 for robust, -enterprise deployment. The goal has always been to shoot for the moon -and this is what made it a long-lasting success. - -ejabberd is specifically designed for enterprise purposes: it is -fault-tolerant, can utilise the resources of multiple clustered -machines, and can easily scale when more capacity is required (by just -adding a box/VM). - -Designed at a moment when clients were mostly desktops that -only supported a kind of HTTP polling call BOSH, the project -managed to adapt to recent changes by introducing support for -WebSockets, BOSH improvements, and a solid mobile stack. - -It was developed at a time when XMPP was still known as -"Jabber", but quickly adopted an evolution process in order to support -the various versions of XMPP RFCs. It now encourages innovation and -experimentation by supporting most, if not all, extensions produced by -the XSF. - -ejabberd relies on a dynamic community all over the world. To get an idea of -existing contributions, you can check -[ejabberd main repository](https://www.github.com/processone/ejabberd) -or the repository containing a great amount of -[contributed extensions](https://github.com/processone/ejabberd-contrib). - -This is possible thanks to a modular architecture based on a core -router and an extremely powerful plugin mechanism that is getting -richer every day. +# Getting started 👋 + +## Meet **ejabberd**, your superpowerful messaging framework + +This web site is dedicated to help you use and develop for ejabberd XMPP messaging server. + +ejabberd has been in development since 2002 and is used all over the world to power the largest XMPP deployments. +This project is so versatile that you can deploy it and customize it for very large scale, no matter what your use case is. + +This incredible power comes with a price. You need to learn how to leverage it. +Fortunately, the goal of this website is to get you started on your path to mastery. +Whether you are a sysadmin, an architect, a developer planning to extend it, or even a simple XMPP user, we have something for you here. + +## Overview + +ejabberd is the de facto XMPP server in the world. The fact that it is used to power the largest deployments in the world should not intimidate you. ejabberd is equally suitable for small instances. + +ejabberd has been designed from the ground-up, since 2002 for robust, enterprise deployment. The goal has always been to shoot for the moon and this is what made it a long-lasting success. + +ejabberd is specifically designed for enterprise purposes: it is fault-tolerant, can utilise the resources of multiple clustered machines, and can easily scale when more capacity is required (by just adding a box/VM). + +Designed at a moment when clients were mostly desktops that only supported a kind of HTTP polling call BOSH, the project managed to adapt to recent changes by introducing support for WebSockets, BOSH improvements, and a solid mobile stack. + +It was developed at a time when XMPP was still known as "Jabber", but quickly adopted an evolution process in order to support the various versions of XMPP RFCs. +It now encourages innovation and experimentation by supporting most, if not all, extensions produced by the XSF. + +ejabberd relies on a dynamic community all over the world. To get an idea of existing contributions, you can check [ejabberd main repository](https://www.github.com/processone/ejabberd) +or the repository containing a great amount of [contributed extensions](https://github.com/processone/ejabberd-contrib). + +This is possible thanks to a modular architecture based on a core router and an extremely powerful plugin mechanism that is getting richer every day. Welcome to the beginning of your journey of ejabberd mastery! -# Options to use ejabberd +## Options to use ejabberd -ejabberd can be used in different ways. The most common one is to use -ejabberd Community Edition. This is the standard Open Source version -that everyone loves: highly scalable and flexible. +ejabberd can be used in different ways. The most common one is to use ejabberd Community Edition. This is the standard Open Source version that everyone loves: highly scalable and flexible. -Fortunately, if you need more than just the ejabberd platform -software, ProcessOne can help you with a commercial -offering. Commercial offering come in two type of packaging: +Fortunately, if you need more than just the ejabberd platform software, [ProcessOne](https://process-one.net) can help you with a commercial offering. Commercial offering come in two type of packaging: -- ejabberd Business Edition, including features for large companies +- **ejabberd Business Edition**, including features for large companies (enhanced geodistributed companies and mobile support to develop own, rich clients) and world-class support, that can please even the most demanding businesses, with 24/7 options. -- ejabberd SaaS being a way to access and benefit of all the features + +- [Fluux.io](https://fluux.io) being a way to access and benefit of all the features of ejabberd Business Edition at an attractive and scalable - price. ejabberd SaaS allows you to keep control of your data thanks + price. Fluux.io allows you to keep control of your data thanks to integration API you can implement on your backend to become a data provider for ejabberd SaaS. @@ -77,12 +52,12 @@ Whatever approach you choose, you can hardly make the wrong choice with ejabberd! In every case you can easily integrate ejabberd with your existing application using: -* [REST API](/developer/ejabberd-api/) and ejabberdctl command-line tool -* Mobile libraries for iOS: [XMPPFramework](https://github.com/robbiehanson/XMPPFramework), [Jayme REST API](https://github.com/inaka/Jayme) -* Mobile libraries for Android: [Smack](https://github.com/igniterealtime/Smack), [Retrofit](https://github.com/square/retrofit) -* Web library with WebSocket support and fallback to BOSH: [Strophe](https://strophe.im/) +- [REST API](../developer/ejabberd-api/index.md) and ejabberdctl command-line tool +- Mobile libraries for iOS: [XMPPFramework](https://github.com/robbiehanson/XMPPFramework), [Jayme REST API](https://github.com/inaka/Jayme) +- Mobile libraries for Android: [Smack](https://github.com/igniterealtime/Smack), [Retrofit](https://github.com/square/retrofit) +- Web library with WebSocket support and fallback to BOSH: [Strophe](https://strophe.im/) -# Architecture of an ejabberd service +## Architecture of an ejabberd service ejabberd brings configurability, scalability and fault-tolerance to the core feature of XMPP – routing messages. @@ -90,20 +65,20 @@ the core feature of XMPP – routing messages. Its architecture is based on a set of pluggable modules that enable different features, including: -* One-to-one messaging -* Store-and-forward (offline messages) -* Contact list (roster) and presence -* Groupchat: MUC (Multi-User Chat) -* Messaging archiving with Message Archive Management (MAM) -* User presence extension: Personal Event Protocol (PEP) and typing indicator -* Privacy settings, through privacy list and simple blocking extensions -* User profile with vCards -* Full feature web support, with BOSH and websockets -* Stream management for message reliability on mobile (aka XEP-0198) -* Message Delivery Receipts (aka XEP-184) -* Last activity -* Metrics and full command-line administration -* and many many more. +- One-to-one messaging +- Store-and-forward (offline messages) +- Contact list (roster) and presence +- Groupchat: MUC (Multi-User Chat) +- Messaging archiving with Message Archive Management (MAM) +- User presence extension: Personal Event Protocol (PEP) and typing indicator +- Privacy settings, through privacy list and simple blocking extensions +- User profile with vCards +- Full feature web support, with BOSH and websockets +- Stream management for message reliability on mobile (aka XEP-0198) +- Message Delivery Receipts (aka XEP-184) +- Last activity +- Metrics and full command-line administration +- and many many more. The full list of supported protocol and extensions is available on [Protocols Supported by ejabberd](https://www.process-one.net/en/ejabberd/protocols/) @@ -123,7 +98,7 @@ like MySQL or PostgreSQL And of course, thanks to its API, ejabberd can be customised to work with a database chosen by the customer. -# Deploying and managing an ejabberd service +## Deploying and managing an ejabberd service ejabberd can be deployed for a number of scenarios fitting end-user / developer / customer needs. The default installation setup consists of @@ -147,10 +122,10 @@ deployment. With such a deployment you can load balance the traffic to your cluster node using one of the following solution: -* traditional TCP/IP load balancer (beware of the cost of your +- traditional TCP/IP load balancer (beware of the cost of your solution, typical XMPP connections are persistent). -* DNS load balancing. -* Custom approach that requires client cooperation. +- DNS load balancing. +- Custom approach that requires client cooperation. If deployed on a 16 GB RAM machine with at least 4 cores, a single ejabberd node can typically handle 200-300 K online users. This setup @@ -188,7 +163,7 @@ the service. This is a life saver for your uptime. Welcome to the benefit of Erlang hot-code swapping! -# ejabberd is more than XMPP +## ejabberd is more than XMPP Thanks to the modular architecture of ejabberd, the platform is becoming a core component for messaging applications. @@ -201,18 +176,18 @@ video files for example). As such, ejabberd support: -* Jingle, XMPP based voice protocol -* SIP (Session Initiation Protocol): Yes, you can pass SIP calls using ejabberd :) -* ICE (Interactive Connectivity Establishment: A Protocol for Network +- Jingle, XMPP based voice protocol +- SIP (Session Initiation Protocol): Yes, you can pass SIP calls using ejabberd :) +- ICE (Interactive Connectivity Establishment: A Protocol for Network Address Translator (NAT) Traversal) -* STUN -* TURN -* Proxy65 media relay +- STUN +- TURN +- Proxy65 media relay This makes ejabberd the best XMPP server to support SIP and WebRTC based communication tools. -# Helping us in the development process +## Helping us in the development process With thousands of more or less official forks, the core ejabberd team, supported by ProcessOne, is constantly monitoring and reviewing @@ -222,5 +197,5 @@ choice in term of scalability, robustness and manageability. The best way to start developing for ejabberd is to clone, watch and star the [project](https://www.github.com/processone/ejabberd), to get -in touch on our developer chatroom (ejabberd@conference.process-one.net) or +in touch on our developer chatroom () or to join [ejabberd community on StackOverflow](https://stackoverflow.com/questions/tagged/ejabberd?sort=newest). diff --git a/content/index.md b/content/index.md index b100693f..e7df8fad 100755 --- a/content/index.md +++ b/content/index.md @@ -1,47 +1,4 @@ --- -title: Welcome to ejabberd, your superpowerful messaging framework -bodyclass: homepage +title: " " +template: home.html --- - -This web site is dedicated to help you use and develop for ejabberd -XMPP messaging server. - -ejabberd has been in development since 2002 and is used all over the -world to power the largest XMPP deployments. This project is so -versatile that you can deploy it and customize it for very large -scale, no matter what your use case is. - -This incredible power comes with a price. You need to learn how to -leverage it. Fortunately, the goal of this website is to get you -started on your path to mastery. Whether you are a sysadmin, an -architect, a developer planning to extend it, or even a simple XMPP -user, we have something for you here. - - diff --git a/content/livebooks/ejabberd-developer-livebook.livemd b/content/livebooks/ejabberd-developer-livebook.livemd new file mode 100644 index 00000000..a02ae751 --- /dev/null +++ b/content/livebooks/ejabberd-developer-livebook.livemd @@ -0,0 +1,250 @@ +# The ejabberd Developer Livebook + +```elixir +filename = "ejabberd.yml" + +if File.exists?(filename) do + Mix.install([ + {:ejabberd, "~> 24.2"}, + {:kino, "~> 0.12.3"} + ]) +else + url = "https://raw.githubusercontent.com/processone/ejabberd/master/ejabberd.yml.example" + + Mix.install([:req]) && + File.write!( + filename, + String.replace(Req.get!(url).body, "starttls_required: true", "") + ) + + IO.puts("ejabberd.yml downloaded correctly, click 'Reconnect and setup' to download ejabberd.") +end +``` + +## Setup ejabberd inside livebook + +This Livebook will download, compile and install ejabberd: + +1. If you want to use a specific `ejabberd.yml` configuration file, copy it to your Livebook folder. + +2. On top of this page, click `Setup`. + +3. If `ejabberd.yml` is not found, it will be downloaded from ejabberd git repository. + +4. Click `Reconnect and setup` to download ejabberd and all its dependencies. It will be compiled and started... it may take a pair of minutes. + +Alternatively, if you already have ejabberd installed and running in your system, you can [connect livebook to your ejabberd node](#connect-livebook-to-your-ejabberd-node) + +## Execute some Erlang code + +Now that Livebook is connected a running ejabberd node, you can run Erlang and Elixir code from this page directly in your node. + +For example, to run some erlang code, put your mouse over the new lines and click on `Evaluate`: + +```erlang +ejabberd_admin:registered_vhosts(). +``` + +Let's define the details of an account, we will later register it. You may change those values: + +```erlang +Username = <<"user1">>, +Server = <<"localhost">>, +Password = <<"somepass123">>, +{Username, Server, Password}. +``` + +Now let's execute an Erlang function to register the account: + +```erlang +ejabberd_auth:try_register(Username, Server, Password). +``` + +Let's check the account was registered: + +```erlang +ejabberd_auth:get_users(<<"localhost">>). +``` + +And is the account's password the one we introduced? + +```erlang +Password == ejabberd_auth:get_password(Username, Server). +``` + +Ok, enough for now, let's remove the account: + +```erlang +ejabberd_auth:remove_user(Username, Server). +``` + +## Execute some Elixir code + +The same code of the previous section can be executed using Elixir: + +```elixir +:ejabberd_admin.registered_vhosts() +``` + +```elixir +username = <<"user1">> +server = <<"localhost">> +password = <<"somepass123">> +{username, server, password} +``` + +```elixir +:ejabberd_auth.try_register(username, server, password) +``` + +```elixir +:ejabberd_auth.get_users(server) +``` + +```elixir +password == :ejabberd_auth.get_password(username, server) +``` + +```elixir +:ejabberd_auth.remove_user(username, server) +``` + +## Run API commands + +Let's run some ejabberd [API commands](https://docs.ejabberd.im/developer/ejabberd-api/) using the ejabberd_ctl frontend (there is is also [mod_http_api](https://docs.ejabberd.im/admin/configuration/modules/#mod_http_api) and [ejabberd_xmlrpc](https://docs.ejabberd.im/admin/configuration/listen/#ejabberd-xmlrpc)). + +For example, the [status](https://docs.ejabberd.im/developer/ejabberd-api/admin-api/#status) API command: + +```erlang +ejabberd_ctl:process(["status"]). +``` + +How to register an account using ejabberd_ctl to call the API command + +```elixir +command = ~c"register" +:ejabberd_ctl.process([command, username, server, password]) +``` + +If you have ejabberd installed in the the system, and the `ejabberdctl` command-line script is available in your PATH, then you could also try to execute with: + +```erlang +os:cmd("ejabberdctl status"). +``` + +```elixir +:os.cmd(~c"ejabberdctl status") +``` + +## Draw process structure + +Let's view the ejabberd process tree: + +```elixir +Kino.Process.render_app_tree(:ejabberd, direction: :left_right) +``` + +Let's view the erlang processes that handle XMPP client connections. If this graph is empty, login to ejabberd with a client and reevaluate this code: + +```elixir +Kino.Process.render_sup_tree(:ejabberd_c2s_sup, direction: :left_right) +``` + +And some information about the erlang process that handles the XMPP client session: + +```elixir +[resource] = :ejabberd_sm.get_user_resources(username, server) +Elixir.Process.info(:ejabberd_sm.get_session_pid(username, server, resource)) +``` + +## Connect Livebook to your ejabberd node + +By default this livebook downloads, compiles and starts ejabberd by [setting up ejabberd sinde livebook](#setup-ejabberd-inside-livebook). If you already have ejabberd installed and would like to connect this livebook to your existing ejabberd node, follow those steps: + + + +### Get erlang node name + +To connect Livebook to your running ejabberd node, you must know its erlang node name and its cookie. + +The erlang node name is by default `ejabberd@localhost`. You can check this in many places, for example: + +* Using `ejabberdctl status`: + +```sh +$ ejabberdctl status +The node ejabberd@localhost is started with status: started +ejabberd 24.2.52 is running in that node +``` + +* In the `ejabberd.log` file, which contains a line like: + +```sh +2024-03-26 13:18:35.019288+01:00 [info] <0.216.0>@ejabberd_app:start/2:63 +ejabberd 24.2.52 is started in the node ejabberd@localhost in 0.91s +``` + + + +### Setup ejabberd node + +A Livebook can only connect to an Erlang node that has Elixir support. So, make sure you install not only Erlang, but also Elixir. + +When compiling ejabberd, make sure to enable Elixir support. It should get enabled by default, but you can ensure this: either by `./configure --with-rebar=mix` or by `./configure --enable-elixir`. + +Then start ejabberd with IEx shell: `ejabberdctl iexlive` + + + +### Get erlang cookie + +The erlang cookie is a random string of capital letters required to connect to an existing erlang node. + +You can get it in a running node, simply call: + + + +```elixir +:erlang.get_cookie() +:XQFOPGGPSNEZNUWKRZJU +``` + + + +### Connect this livebook to your ejabberd node + +Now that you have ejabberd running, and you know the information required to connect to it: + +1. go to Livebook +2. in the left side bar, click the `Runtime settings` icon, or press `sr` keyboard shortcut +3. click the `Configure` button +4. click the `Attached node` button +5. introduce the erlang node name (`ejabberd@localhost`) and cookie (`XQFOPGGPSNEZNUWKRZJU`) of your ejabberd node +6. click the `Connect` button (it may say `Reconnect`) +7. If it connected successfully, it will now show memory consumption of that node + + + +### Test the connection + +Now that Livebook is connected to your running ejabberd node, you can run Erlang and Elixir code from this page directly in your node. + +For example, to run some erlang code, put your mouse over the new lines and click on `Evaluate`: + +```erlang +ejabberd_admin:registered_vhosts(). +``` + +The same code can be executed using Elixir: + +```elixir +:ejabberd_admin.registered_vhosts() +``` + +## Stop ejabberd + +Let' stop ejabberd insie livebook + +```elixir +:ejabberd.stop() +``` diff --git a/content/livebooks/ejabberd-developer-livebook.md b/content/livebooks/ejabberd-developer-livebook.md new file mode 100644 index 00000000..29ad6831 --- /dev/null +++ b/content/livebooks/ejabberd-developer-livebook.md @@ -0,0 +1,261 @@ +# The ejabberd Developer Livebook + + + + +!!! info + This page is designed to run interactively using [Livebook](https://livebook.dev/). + Of course, you could simply reproduce the instructions manually yourself. + But, if possible, install Livebook in your machine and get the full experience + clicking on the button: + + [![Run in Livebook](https://livebook.dev/badge/v1/blue.svg)](https://livebook.dev/run?url=https%3A%2F%2Fdocs.ejabberd.im%2Flivebooks%2Fejabberd-developer-livebook.livemd) + +```elixir +filename = "ejabberd.yml" + +if File.exists?(filename) do + Mix.install([ + {:ejabberd, "~> 24.2"}, + {:kino, "~> 0.12.3"} + ]) +else + url = "https://raw.githubusercontent.com/processone/ejabberd/master/ejabberd.yml.example" + + Mix.install([:req]) && + File.write!( + filename, + String.replace(Req.get!(url).body, "starttls_required: true", "") + ) + + IO.puts("ejabberd.yml downloaded correctly, click 'Reconnect and setup' to download ejabberd.") +end +``` + +## Setup ejabberd inside livebook + +This Livebook will download, compile and install ejabberd: + +1. If you want to use a specific `ejabberd.yml` configuration file, copy it to your Livebook folder. + +2. On top of this page, click `Setup`. + +3. If `ejabberd.yml` is not found, it will be downloaded from ejabberd git repository. + +4. Click `Reconnect and setup` to download ejabberd and all its dependencies. It will be compiled and started... it may take a pair of minutes. + +Alternatively, if you already have ejabberd installed and running in your system, you can [connect livebook to your ejabberd node](#connect-livebook-to-your-ejabberd-node) + +## Execute some Erlang code + +Now that Livebook is connected a running ejabberd node, you can run Erlang and Elixir code from this page directly in your node. + +For example, to run some erlang code, put your mouse over the new lines and click on `Evaluate`: + +```erlang +ejabberd_admin:registered_vhosts(). +``` + +Let's define the details of an account, we will later register it. You may change those values: + +```erlang +Username = <<"user1">>, +Server = <<"localhost">>, +Password = <<"somepass123">>, +{Username, Server, Password}. +``` + +Now let's execute an Erlang function to register the account: + +```erlang +ejabberd_auth:try_register(Username, Server, Password). +``` + +Let's check the account was registered: + +```erlang +ejabberd_auth:get_users(<<"localhost">>). +``` + +And is the account's password the one we introduced? + +```erlang +Password == ejabberd_auth:get_password(Username, Server). +``` + +Ok, enough for now, let's remove the account: + +```erlang +ejabberd_auth:remove_user(Username, Server). +``` + +## Execute some Elixir code + +The same code of the previous section can be executed using Elixir: + +```elixir +:ejabberd_admin.registered_vhosts() +``` + +```elixir +username = <<"user1">> +server = <<"localhost">> +password = <<"somepass123">> +{username, server, password} +``` + +```elixir +:ejabberd_auth.try_register(username, server, password) +``` + +```elixir +:ejabberd_auth.get_users(server) +``` + +```elixir +password == :ejabberd_auth.get_password(username, server) +``` + +```elixir +:ejabberd_auth.remove_user(username, server) +``` + +## Run API commands + +Let's run some ejabberd [API commands](https://docs.ejabberd.im/developer/ejabberd-api/) using the ejabberd_ctl frontend (there is is also [mod_http_api](https://docs.ejabberd.im/admin/configuration/modules/#mod_http_api) and [ejabberd_xmlrpc](https://docs.ejabberd.im/admin/configuration/listen/#ejabberd-xmlrpc)). + +For example, the [status](https://docs.ejabberd.im/developer/ejabberd-api/admin-api/#status) API command: + +```erlang +ejabberd_ctl:process(["status"]). +``` + +How to register an account using ejabberd_ctl to call the API command + +```elixir +command = ~c"register" +:ejabberd_ctl.process([command, username, server, password]) +``` + +If you have ejabberd installed in the the system, and the `ejabberdctl` command-line script is available in your PATH, then you could also try to execute with: + +```erlang +os:cmd("ejabberdctl status"). +``` + +```elixir +:os.cmd(~c"ejabberdctl status") +``` + +## Draw process structure + +Let's view the ejabberd process tree: + +```elixir +Kino.Process.render_app_tree(:ejabberd, direction: :left_right) +``` + +Let's view the erlang processes that handle XMPP client connections. If this graph is empty, login to ejabberd with a client and reevaluate this code: + +```elixir +Kino.Process.render_sup_tree(:ejabberd_c2s_sup, direction: :left_right) +``` + +And some information about the erlang process that handles the XMPP client session: + +```elixir +[resource] = :ejabberd_sm.get_user_resources(username, server) +Elixir.Process.info(:ejabberd_sm.get_session_pid(username, server, resource)) +``` + +## Connect Livebook to your ejabberd node + +By default this livebook downloads, compiles and starts ejabberd by [setting up ejabberd sinde livebook](#setup-ejabberd-inside-livebook). If you already have ejabberd installed and would like to connect this livebook to your existing ejabberd node, follow those steps: + + + +### Get erlang node name + +To connect Livebook to your running ejabberd node, you must know its erlang node name and its cookie. + +The erlang node name is by default `ejabberd@localhost`. You can check this in many places, for example: + +* Using `ejabberdctl status`: + +```sh +$ ejabberdctl status +The node ejabberd@localhost is started with status: started +ejabberd 24.2.52 is running in that node +``` + +* In the `ejabberd.log` file, which contains a line like: + +```sh +2024-03-26 13:18:35.019288+01:00 [info] <0.216.0>@ejabberd_app:start/2:63 +ejabberd 24.2.52 is started in the node ejabberd@localhost in 0.91s +``` + + + +### Setup ejabberd node + +A Livebook can only connect to an Erlang node that has Elixir support. So, make sure you install not only Erlang, but also Elixir. + +When compiling ejabberd, make sure to enable Elixir support. It should get enabled by default, but you can ensure this: either by `./configure --with-rebar=mix` or by `./configure --enable-elixir`. + +Then start ejabberd with IEx shell: `ejabberdctl iexlive` + + + +### Get erlang cookie + +The erlang cookie is a random string of capital letters required to connect to an existing erlang node. + +You can get it in a running node, simply call: + + + +```elixir +:erlang.get_cookie() +:XQFOPGGPSNEZNUWKRZJU +``` + + + +### Connect this livebook to your ejabberd node + +Now that you have ejabberd running, and you know the information required to connect to it: + +1. go to Livebook +2. in the left side bar, click the `Runtime settings` icon, or press `sr` keyboard shortcut +3. click the `Configure` button +4. click the `Attached node` button +5. introduce the erlang node name (`ejabberd@localhost`) and cookie (`XQFOPGGPSNEZNUWKRZJU`) of your ejabberd node +6. click the `Connect` button (it may say `Reconnect`) +7. If it connected successfully, it will now show memory consumption of that node + + + +### Test the connection + +Now that Livebook is connected to your running ejabberd node, you can run Erlang and Elixir code from this page directly in your node. + +For example, to run some erlang code, put your mouse over the new lines and click on `Evaluate`: + +```erlang +ejabberd_admin:registered_vhosts(). +``` + +The same code can be executed using Elixir: + +```elixir +:ejabberd_admin.registered_vhosts() +``` + +## Stop ejabberd + +Let' stop ejabberd insie livebook + +```elixir +:ejabberd.stop() +``` diff --git a/content/livebooks/markdown_head.txt b/content/livebooks/markdown_head.txt new file mode 100644 index 00000000..66c4e348 --- /dev/null +++ b/content/livebooks/markdown_head.txt @@ -0,0 +1,11 @@ + + + +!!! info + This page is designed to run interactively using [Livebook](https://livebook.dev/). + Of course, you could simply reproduce the instructions manually yourself. + But, if possible, install Livebook in your machine and get the full experience + clicking on the button: + + [![Run in Livebook](https://livebook.dev/badge/v1/blue.svg)](https://livebook.dev/run?url=https%3A%2F%2Fprocessone.github.io%2Fmkdocs%2Flivebooks%2FNAME) + diff --git a/content/roadmap.md b/content/roadmap.md deleted file mode 100644 index 3b23d63a..00000000 --- a/content/roadmap.md +++ /dev/null @@ -1,431 +0,0 @@ ---- -title: ejabberd Roadmap -menu: Roadmap -order: 70 -toc: true ---- - -# In the Works - -* Nothing to mention here right now - -# Planned - -* **Set as default automatic SQL schema update** - - Automatic SQL schema update was included as a beta-testing feature in ejabberd 23.10 - (see the [feature announcement](https://www.process-one.net/blog/automatic-schema-update-in-ejabberd/)), - and it will become the default - -* **Remove support for Rebar2** - - ejabberd includes many tweaks to support rebar3 and rebar2. - By removing support for rebar2, we could simplify rebar.config and other files a lot. - But more importantly, dependencies would not need to be updated just because - other dependencies are updated: Rebar2 requires exact version numbers to be provided, - [Rebar3 doesn't require that](https://rebar3.org/docs/configuration/dependencies/#dependency-version-handling), - and [neither does Mix](https://hexdocs.pm/elixir/Version.html#module-requirements). - -# Released - -## 2024 - -- [24.02](https://www.process-one.net/blog/ejabberd-24-02/) - * [Matrix gateway](https://docs.ejabberd.im/admin/configuration/modules/#mod-matrix-gw) - * [RFC 9266 Channel Bindings for TLS 1.3](https://www.rfc-editor.org/rfc/rfc9266) - * [XEP-0386: Bind 2](https://xmpp.org/extensions/xep-0386.html) - * [XEP-0388: Extensible SASL Profile (SASL2)](https://xmpp.org/extensions/xep-0388.html) - * [XEP-0424: Message Retraction](https://xmpp.org/extensions/xep-0424.html) - * [XEP-0440: SASL Channel-Binding Type Capability](https://xmpp.org/extensions/xep-0440.html) - * [XEP-0474: SASL SCRAM Downgrade Protection](https://xmpp.org/extensions/xep-0474.html) - * [XEP-0480: SASL Upgrade Tasks](https://xmpp.org/extensions/xep-0480.html) - * [Automatic SQL schema](https://www.process-one.net/blog/automatic-schema-update-in-ejabberd/) creation and update - * Commands [API versioning](https://github.com/processone/ejabberd/pull/4118) - * Support Elixir 1.16 and Erlang/OTP 27.0-rc1 - -## 2023 - -- [23.10](https://www.process-one.net/blog/ejabberd-23-10/) - * Support for [XEP-0402: PEP Native Bookmarks](https://xmpp.org/extensions/xep-0402.html) - * Support for [XEP-0421: Occupant Id](https://xmpp.org/extensions/xep-0421.html) - * MySQL Performance enhancements - -- [23.04](https://www.process-one.net/blog/ejabberd-23-04/) - * [`mod_mam`](https://docs.ejabberd.im/admin/configuration/modules/#mod-mam) support for [XEP-0425: Message Moderation](https://xmpp.org/extensions/xep-0425.html) - * New [`mod_muc_rtbl`](https://docs.ejabberd.im/admin/configuration/modules/#mod-muc-rtbl): [Real-Time Block List](https://xmppbl.org/) for MUC rooms - * Binaries use [Erlang/OTP](https://www.erlang.org/) 25.3, and changes in containers - -- [23.01](https://www.process-one.net/blog/ejabberd-23-01/) - * New [`mod_mqtt_bridge`](https://docs.ejabberd.im/admin/configuration/modules/#mod-mqtt-bridge): MQTT bridge - -## 2022 - -- [22.10](https://www.process-one.net/blog/ejabberd-22-10/) - * Improved [MIX](https://xmpp.org/extensions/xep-0369.html) support - * Improved SQL reconnection Mechanism - * Better burst traffix handling - -- [22.05](https://www.process-one.net/blog/ejabberd-22-05/) - * Improved MQTT, MUC and [ConverseJS](https://conversejs.org/) integration - * New installers and container image - * Support for [Erlang/OTP](https://www.erlang.org/) 25 - -## 2021 - -- [21.12](https://www.process-one.net/blog/ejabberd-21-12/) - * New [`mod_conversejs`](http://localhost:8091/admin/configuration/modules/#mod-conversejs): built-in [ConverseJS](https://conversejs.org/) web client - * Support for [MUC Hats](https://xmpp.org/extensions/xep-0317.html) extension - * PubSub, [MucSub](https://docs.ejabberd.im/developer/xmpp-clients-bots/extensions/muc-sub/) and [Multicast](https://xmpp.org/extensions/xep-0033.html) improvements - -- [21.07](https://www.process-one.net/blog/ejabberd-22-07/) - * Improved database and caching for shared rosters - * Broader multicast support for MUC - * Improved rebar3 and Elixir support - -- [21.04](https://www.process-one.net/blog/ejabberd-22-04/) - * Full support for [Erlang/OTP 24](https://www.erlang.org/) and rebar3 - * New API commands - * New CAPTCHA script - -- [21.01](https://www.process-one.net/blog/ejabberd-22-01/) - * Systemd watchdog support - * STUN improvements - -## 2020 - -- [20.12](https://www.process-one.net/blog/ejabberd-20-12/) - * Extended SCRAM-SHA support - * Microsoft ODBC Driver support - -- [20.07](https://www.process-one.net/blog/ejabberd-20-07/) - * Support for Unix Domain Sockets - * [Erlang/OTP 23](https://www.erlang.org/) compatibility - -- [20.04](https://www.process-one.net/blog/ejabberd-20-04/) - * New [`mod_stun_disco`](https://docs.ejabberd.im/admin/configuration/modules/#mod-stun-disco): support [XEP-0215](https://xmpp.org/extensions/xep-0215.html) including Audio/Video calls - * Improved MS SQL support - -- [20.03](https://www.process-one.net/blog/ejabberd-20-03/) - * [SSL connection](https://docs.ejabberd.im/admin/configuration/database/#sql-with-ssl-connection) to MySQL - * Improved performance of `mod_shared_roster` - -- [20.02](https://www.process-one.net/blog/ejabberd-20-02/) - * Improved compatibility with CockroachDB - * Emoji storage in MSSQL - -- [20.01](https://www.process-one.net/blog/ejabberd-20-01/) - * [OAuth support](https://docs.ejabberd.im/developer/ejabberd-api/oauth/) for [ejabberd's MQTT](https://docs.ejabberd.im/admin/guide/mqtt/) - * New OTP 22 event logger - * New [config parser](https://docs.ejabberd.im/admin/configuration/file-format/) & validator - -## 2019 - -- [19.09](https://www.process-one.net/blog/ejabberd-19-09/) - * Significant improvements in ACME support: ACME v2 - * Erlang/OTP 19.3 is required - -- [19.08](https://www.process-one.net/blog/ejabberd-19-08/) - * New JWT (JSON Web Token) authentication - * New configuration validator, yconf - * Improved MUC scalability - * Removed Riak support - -- [19.05](https://www.process-one.net/blog/ejabberd-19-05/) - * MQTT over WebSocket - * Improved MucSub - * Erlang/OTP 19.1 is required - -- [19.02](https://www.process-one.net/blog/ejabberd-19-02/) - * MQTT Support - * MIX improvements - -## 2018 - -- [18.12](https://www.process-one.net/blog/ejabberd-18-12/) - * XML Compression in message archive storage - * PROXY protocol support versions 1 and 2 - * MUC Self-Ping server optimisation (XEP-0410) - * Bookmarks Conversion (XEP-0411) - -- [18.09](https://www.process-one.net/blog/ejabberd-18-09/) - * Default configuration file simplification - * Improved logging - * OpenSSL 1.1.1 support - * Modular ejabberd core - -- [18.06](https://www.process-one.net/blog/ejabberd-18-06/) - * Stop ejabberd initialization on invalid/unknown options - * Support SASL PLAIN - * Drop support of mod_irc - -- [18.04](https://www.process-one.net/blog/ejabberd-18-04/) - -- [18.03](https://www.process-one.net/blog/ejabberd-18-03/) - * New SQL schemas with server_host - -- [18.01](https://www.process-one.net/blog/ejabberd-18-01/) - -## 2017 - -- [17.12](https://www.process-one.net/blog/ejabberd-17-12/) - * SNI (Server Name Indication) for inbound connections - * Rewrite ejabberd system monitor - * Support PubSub v1.14 and OMEMO - -- [17.11](https://www.process-one.net/blog/ejabberd-17-11/) - * ACME Support - * Introduce ‘certfiles’ global option - * PubSub improved, and SQL storage - -- [17.09](https://www.process-one.net/blog/ejabberd-17-09/) - * New mod_avatar - * SRV for XMPP over TLS - -- [17.08](https://www.process-one.net/blog/ejabberd-17-08/) - * XEP-0357: Push Notifications - * Modular cluster with cluster_backend - -- [17.07](https://www.process-one.net/blog/ejabberd-17-07/) - -- [17.06](https://www.process-one.net/blog/ejabberd-17-06/) - * New Caching system - * Extended Riak support - * Certificate manager - -- [17.04](https://www.process-one.net/blog/ejabberd-17-04/) - -- [17.03](https://www.process-one.net/blog/ejabberd-17-03/) - * Modular code - * Dynamic configuration reload - * mod_blockstrangers for spam protection - * S2S dialback - -- [17.01](https://www.process-one.net/blog/ejabberd-17-01/) - * PostgreSQL SSL support - -## 2016 - -- [16.12](https://www.process-one.net/blog/ejabberd-16-12/) - * New BOSH module - * New Commands API permissions framework - * XMPP packet handling using dedicated `xmpp` erlang library - * New [ejaberd/mix Docker container](https://www.process-one.net/blog/ejabberd-development-with-docker/) - -- [16.09](https://www.process-one.net/blog/ejabberd-16-09/) - * Support for Elixir configuration file - * XEP-0355 Namespace Delegation - * XEP-0356 Privileged Entity - -- [16.08](https://www.process-one.net/blog/ejabberd-16-08/) - * New [MUC/Sub](https://www.process-one.net/blog/xmpp-mobile-groupchat-introducing-muc-subscription/) - * Improved Elixir support - * Major clean-up and improvement on OAuth ReST API - -- [16.06](https://www.process-one.net/blog/ejabberd-16-06/) - * New ACL (Access Control List) infrastructure - -- [16.04](https://www.process-one.net/blog/ejabberd-16-04/) - -- [16.03](https://www.process-one.net/blog/ejabberd-16-03/) - * Experimental support for [MIX (Mediated Information eXchange)](https://www.process-one.net/blog/experimental-mix-support-for-group-conversations-added-to-ejabberd/) - * Erlang/OTP 17.5 required - -- [16.02](https://www.process-one.net/blog/ejabberd-16-02/) - * XEP-0013 Flexible Offline Message Retrieval - * Improved Message Archive Management (MAM) - * Published [ejabberd on hex.pm](https://hex.pm/packages/ejabberd) - * Faster and more memory efficient XML parsing and TLS encryption. - * Stream compression after SASL - * Migration script from Prosody - -- [16.01](https://www.process-one.net/blog/ejabberd-16-01/) - -## 2015 - -- [15.11](https://www.process-one.net/blog/ejabberd-15-11/) - * Improved `join_cluster` and `leave_cluster` - -- [15.10](https://www.process-one.net/blog/ejabberd-15-10/) - * New mod_http_upload with support for [XEP-0363 HTTP File Upload](https://xmpp.org/extensions/xep-0363.html) - * Added support for [Grapherl](https://www.process-one.net/blog/grapherl-google-summer-of-code-metrics-for-ejabberd/) - -- [15.09](https://www.process-one.net/blog/ejabberd-15-09/) - * OAuth 2.0 delegation framework - * Preliminary OAuth and HTTP based ejabberd API - * X-AUTH2 authentication mechanism - -- [15.07](https://www.process-one.net/blog/ejabberd-15-07/) - -- [15.06](https://www.process-one.net/blog/ejabberd-15-06/) - * New mod_mam with [XEP-0313 Message Archive Management](https://xmpp.org/extensions/xep-0313.html) - * Configuration checking on launch - * Added Windows 7/8 installers, RPM and DEB packages - * Document protocol support and version inside each module - -- [15.04](https://www.process-one.net/blog/ejabberd-15-04/) - * Added mod_admin_extra and mod_muc_admin - * Added XEP-0033 Extended Stanza Addressing - * Support to [embed ejabberd in an Elixir app](https://www.process-one.net/blog/embedding-ejabberd-into-an-elixir-phoenix-web-application/) - * Erlang/OTP R16B03-1 is required - -- [15.03](https://www.process-one.net/blog/ejabberd-15-03/) - * Added support for WebSocket - * Customizable session backends - * SCRAM support for SQL authentication backend - -- [15.02](https://www.process-one.net/blog/ejabberd-community-15-02/) - * Added [Elixir support](https://www.process-one.net/blog/ejabberd-joins-the-elixir-revolution/) - * New command to reload configuration withour restart - * [New documentation site published](https://www.process-one.net/blog/ejabberd-new-documentation-site-a-community-effort/): [docs.ejabberd.im/](https://docs.ejabberd.im/) - * Bug tracker [moves from JIRA to GitHub Issues](https://www.process-one.net/blog/revamped-ejabberd-im-website-logo/) - -- [Revamped ejabberd website, new logo, new development process](https://www.process-one.net/blog/revamped-ejabberd-im-website-logo/) and bugtracking migrated from JIRA to GitHub - -## 2014 - -- [14.12](https://www.process-one.net/blog/ejabberd-community-14-12/) - * New mod_client_state with XEP-0352: Client State Indication - * New mod_fail2ban - -- [14.07](https://www.process-one.net/blog/ejabberd-community-14-07/) - * SIP Outbound (RFC 5626) - -- [14.05](https://www.process-one.net/blog/ejabberd-community-14-05/) - * RFC-3261 SIP proxy/registrar - * RFC-5766 TURN: Traversal Using Relays around NAT - * XEP-0198 Stream Management - * XEP-0321 Remote Roster Management - * Several improvements regarding encryption - * New Bash completion script for ejabberdctl - -## 2013 - -- [13.12](https://www.process-one.net/blog/ejabberd-community-13-12/) - * New OpenSSL ciphers option in c2s, s2s and s2s_out - * ejabberd_xmlrpc included - -- [13.10](https://www.process-one.net/blog/ejabberd-community-13-10/) - * [ejabberd configuration file in YAML format](https://www.process-one.net/blog/switch-ejabberd-configuration-to-yaml/) - * Log files are created using Lager - * Rebar2 is used to manage dependencies - * Erlang/OTP R15 is required - -- [13.03-beta1](https://www.process-one.net/blog/ejabberd-community-server-13-03-is-launched-in-beta/) ([announcement](https://web.archive.org/web/20220908092839/http://lists.jabber.ru/pipermail/ejabberd/2013-March/007974.html)) - * Binarize and indent code - * New versioning scheme - -## 2012 - -- [2.1.11](https://www.process-one.net/blog/ann-bugfix-release-ejabberd-2-1-11/) - * Added ODBC support for several modules - -## 2011 - -- [2.1.10](https://www.process-one.net/blog/new_releases_ejabberd_2110_and_exmpp_099/) - -- [2.1.9](https://www.process-one.net/blog/new_releases_ejabberd_219_300-alpha-4_and_exmpp_098/) - * New SASL SCRAM-SHA-1 authentication mechanism - -## 2010 - -- [2.1.6](https://www.process-one.net/blog/ejabberd_216_release/) - * mod_register: New captcha_protected option to require CAPTCHA - * Support PostgreSQL 9.0 ( - -- October: the source code repository and the bug tracker were finally moved to GitHub - -- [2.1.5](https://www.process-one.net/blog/ejabberd_215_and_exmpp_095_bugfix_releases/) - -- [2.1.4](https://www.process-one.net/blog/ejabberd_214_and_exmpp_094_bugfix_releases/) - * Full support for XEP-0115 Entity Capabilities v1.5 - -- [2.1.2](https://www.process-one.net/blog/ann_ejabberd_212_bugfix_release/) - -## 2009 - -- [2.1.1](https://www.process-one.net/blog/ann_ejabberd_211_bugfix_release/) - -- [2.1.0](https://www.process-one.net/blog/ejabberd_210_finally_released/) - * LDAPS support - * STUN server - * New XEPs supported: XMPP Ping, Roster Versioning, [Import/Export Format](https://www.process-one.net/blog/ejabberd_migration_kit/) - * Erlang/OTP R13 is supported - -## 2007 - -- [1.1.4](https://www.process-one.net/blog/ejabberd_114_released/) - -- [1.1.3](https://web.archive.org/web/20220124230040/http://lists.jabber.ru/pipermail/ejabberd/2007-February/002440.html) - -## 2006 - -- [1.1.2](https://web.archive.org/web/20061206003138/http://www.process-one.net/en/projects/ejabberd/releases/release_1.1.2.html) ([announcement](https://web.archive.org/web/20220124221010/http://lists.jabber.ru/pipermail/ejabberd/2006-September/002209.html)) - * LDAP improvements - * Microsoft SQL supported - * New Windows installer - -- [1.1.1](https://web.archive.org/web/20060617072935/http://ejabberd.jabber.ru/ejabberd-1.1.1) ([announcement](https://web.archive.org/web/20220127211621/http://lists.jabber.ru/pipermail/ejabberd/2006-April/001751.html)) - * Erlang/OTP R9C-2 required - -- [1.1.0](https://web.archive.org/web/20060624222148/http://www.process-one.net/en/projects/ejabberd/releases/release_1.1.0.html) ([announcement](https://web.archive.org/web/20220127203655/http://lists.jabber.ru/pipermail/ejabberd/2006-April/001726.html)) - * JEP-0050: Ad-Hoc Commands - * JEP-0138: Stream Compression - * JEP-0175: SASL anonymous - * Native MySQL support - * MUC improvement: Chatroom logging - -## 2005 - -- [1.0.0](https://web.archive.org/web/20060613001514/http://www.process-one.net/en/projects/ejabberd/releases/release_1.0.0.html) ([announcement](https://web.archive.org/web/20220120011006/http://lists.jabber.ru/pipermail/ejabberd/2005-December/001481.html)) - * S2S encryption: STARTTLS + SASL_EXTERNAL and STARTTLS + Dialback - * Different certificates can be defined for each virtual host. - * Support for vCard storage in ODBC - * New tool to convert Mnesia to ODBC - * Native PostgreSQL support - -- [0.9.8](https://web.archive.org/web/20060706014203/http://www.process-one.net/en/projects/ejabberd/releases/release_0.9.8.html) ([announcement](https://web.archive.org/web/20220118153712/http://lists.jabber.ru/pipermail/ejabberd/2005-August/001278.html)) - * Enhanced virtual hosting - * Enhanced PubSub - -- [0.9.1](https://web.archive.org/web/20060706014255/http://www.process-one.net/en/projects/ejabberd/releases/release_0.9.1.html) ([announcement](https://web.archive.org/web/20220116215413/http://lists.jabber.ru/pipermail/ejabberd/2005-May/001101.html)) - -- [0.9](https://web.archive.org/web/20060613001412/http://www.process-one.net/en/projects/ejabberd/releases/release_0.9.html) ([announcement](https://web.archive.org/web/20220125230349/http://lists.jabber.ru/pipermail/ejabberd/2005-April/000987.html)) - * Added support for virtual hosts - * New mod_shared_roster - * Added PostgreSQL support - -- February: source code moved from SVN to Git, and the [bug tracker from Bugzilla to JIRA](https://www.process-one.net/blog/ejabberd_bug_tracker_open_for_registration/) - -- Beginning of 2005, source code moved from JabberStudio CVS to ProcessOne SVN - -## 2004 - -- October: website moved from JabberStudio to [ejabberd.jabber.ru](https://web.archive.org/web/20050730000817/http://ejabberd.jabber.ru/), and the bug tracker to Jabber.ru’s Bugzilla - -- [0.7.5](https://web.archive.org/web/20220128023940/http://lists.jabber.ru/pipermail/ejabberd/2004-October/000337.html) - * Support for STARTTLS with C2S connections - * Support for authentification via external script - * Added module which implement JUD and vCard services using LDAP - * Improvements in web-based administration interface (user creation/removal, roster and offline queue management) - * Support for message expiration (JEP-0023) - * Support for HTTPS in web interface - -- [0.7](https://web.archive.org/web/20220122152308/http://lists.jabber.ru/pipermail/ejabberd/2004-July/000129.html) - * Support for LDAP authentification - * Support for HTTP Polling - * Support for web-based administration interface - * Added command-line administration utility "ejabberdctl" - * Support for history management in MUC rooms - -## 2003 - -- 16th November, [0.5](https://web.archive.org/web/20211208160408/http://lists.jabber.ru/pipermail/ejabberd/2003-November/000052.html) - * First release - -- January, initial documentation in LaTeX: [Ejabberd Installation and Operation Guide](https://web.archive.org/web/20030409163941/http://ejabberd.jabberstudio.org/guide.html) - -## 2002 - -- 18th November, [first commit](https://github.com/processone/ejabberd/commit/e0b348319ad6902ffcbb663e81c29b229c551b61) to CVS - -- 16th November, first erlang modules written diff --git a/content/roadmap/index.md b/content/roadmap/index.md new file mode 100644 index 00000000..cc96dcee --- /dev/null +++ b/content/roadmap/index.md @@ -0,0 +1,445 @@ +--- +hide: + - navigation +--- + +# ejabberd Roadmap + +## In the Works + +## Planned + +- **Remove support for Rebar2** + + ejabberd includes many tweaks to support rebar3 and rebar2. By removing support for rebar2, we could simplify rebar.config and other files a lot. + But more importantly, dependencies would not need to be updated just because other dependencies are updated: Rebar2 requires exact version numbers to be provided, [Rebar3 doesn't require that](https://rebar3.org/docs/configuration/dependencies/#dependency-version-handling), and [neither does Mix](https://hexdocs.pm/elixir/Version.html#module-requirements). + +## Released + +### 2024 + +- [24.06](https://www.process-one.net/blog/ejabberd-24-06/) + - Reworked the [ejabberd Docs](https://docs.ejabberd.im/) and moved to MkDocs+Material + - [Automatic SQL schema](https://www.process-one.net/blog/automatic-schema-update-in-ejabberd/) is now enabled by default + - Improved the ejabberd WebAdmin with support to use API commands + - Support for UNIX Socket Domain in MySQL and PostgreSQL + - Support Elixir 1.17 and Erlang/OTP 27.0 + +- [24.02](https://www.process-one.net/blog/ejabberd-24-02/) + - [Matrix gateway](../admin/configuration/modules.md/#mod_matrix_gw) + - [RFC 9266 Channel Bindings for TLS 1.3](https://www.rfc-editor.org/rfc/rfc9266) + - [XEP-0386: Bind 2](https://xmpp.org/extensions/xep-0386.html) + - [XEP-0388: Extensible SASL Profile (SASL2)](https://xmpp.org/extensions/xep-0388.html) + - [XEP-0424: Message Retraction](https://xmpp.org/extensions/xep-0424.html) + - [XEP-0440: SASL Channel-Binding Type Capability](https://xmpp.org/extensions/xep-0440.html) + - [XEP-0474: SASL SCRAM Downgrade Protection](https://xmpp.org/extensions/xep-0474.html) + - [XEP-0480: SASL Upgrade Tasks](https://xmpp.org/extensions/xep-0480.html) + - [Automatic SQL schema creation and update](https://www.process-one.net/blog/automatic-schema-update-in-ejabberd/) + - Commands [API versioning](https://github.com/processone/ejabberd/pull/4118) + - Support Elixir 1.16 and Erlang/OTP 27.0-rc1 + +### 2023 + +- [23.10](https://www.process-one.net/blog/ejabberd-23-10/) + - Support for [XEP-0402: PEP Native Bookmarks](https://xmpp.org/extensions/xep-0402.html) + - Support for [XEP-0421: Occupant Id](https://xmpp.org/extensions/xep-0421.html) + - MySQL Performance enhancements + +- [23.04](https://www.process-one.net/blog/ejabberd-23-04/) + - [`mod_mam`](../admin/configuration/modules.md#mod_mam) support for [XEP-0425: Message Moderation](https://xmpp.org/extensions/xep-0425.html) + - New [`mod_muc_rtbl`](../admin/configuration/modules.md#mod_muc_rtbl): [Real-Time Block List](https://xmppbl.org/) for MUC rooms + - Binaries use [Erlang/OTP](https://www.erlang.org/) 25.3, and changes in containers + +- [23.01](https://www.process-one.net/blog/ejabberd-23-01/) + - New [`mod_mqtt_bridge`](../admin/configuration/modules.md#mod_mqtt_bridge): MQTT bridge + +### 2022 + +- [22.10](https://www.process-one.net/blog/ejabberd-22-10/) + - Improved [MIX](https://xmpp.org/extensions/xep-0369.html) support + - Improved SQL reconnection Mechanism + - Better burst traffix handling + +- [22.05](https://www.process-one.net/blog/ejabberd-22-05/) + - Improved MQTT, MUC and [ConverseJS](https://conversejs.org/) integration + - New installers and container image + - Support for [Erlang/OTP](https://www.erlang.org/) 25 + +### 2021 + +- [21.12](https://www.process-one.net/blog/ejabberd-21-12/) + - New [`mod_conversejs`](../admin/configuration/modules.md#mod_conversejs): built-in [ConverseJS](https://conversejs.org/) web client + - Support for [MUC Hats](https://xmpp.org/extensions/xep-0317.html) extension + - PubSub, [MucSub](../developer/xmpp-clients-bots/extensions/muc-sub.md) and [Multicast](https://xmpp.org/extensions/xep-0033.html) improvements + +* [21.07](https://www.process-one.net/blog/ejabberd-21-07/) + * Improved database and caching for shared rosters + * Broader multicast support for MUC + * Improved rebar3 and Elixir support + +* [21.04](https://www.process-one.net/blog/ejabberd-21-04/) + * Full support for [Erlang/OTP 24](https://www.erlang.org/) and rebar3 + * New API commands + * New CAPTCHA script + +* [21.01](https://www.process-one.net/blog/ejabberd-21-01/) + * Systemd watchdog support + * STUN improvements + +### 2020 + +* [20.12](https://www.process-one.net/blog/ejabberd-20-12/) + * Extended SCRAM-SHA support + * Microsoft ODBC Driver support + +* [20.07](https://www.process-one.net/blog/ejabberd-20-07/) + * Support for Unix Domain Sockets + * [Erlang/OTP 23](https://www.erlang.org/) compatibility + +* [20.04](https://www.process-one.net/blog/ejabberd-20-04/) + * New [`mod_stun_disco`](../admin/configuration/modules.md#mod_stun_disco): support [XEP-0215](https://xmpp.org/extensions/xep-0215.html) including Audio/Video calls + * Improved MS SQL support + +* [20.03](https://www.process-one.net/blog/ejabberd-20-03/) + * [SSL connection](../admin/configuration/database.md#sql-with-ssl-connection) to MySQL + * Improved performance of `mod_shared_roster` + +* [20.02](https://www.process-one.net/blog/ejabberd-20-02/) + * Improved compatibility with CockroachDB + * Emoji storage in MSSQL + +* [20.01](https://www.process-one.net/blog/ejabberd-20-01/) + * [OAuth support](../developer/ejabberd-api/oauth.md) for [ejabberd's MQTT](../admin/guide/mqtt/index.md) + * New OTP 22 event logger + * New [config parser](../admin/configuration/file-format.md) & validator + +### 2019 + +* [19.09](https://www.process-one.net/blog/ejabberd-19-09/) + * Significant improvements in ACME support: ACME v2 + * Erlang/OTP 19.3 is required + +* [19.08](https://www.process-one.net/blog/ejabberd-19-08/) + * New JWT (JSON Web Token) authentication + * New configuration validator, yconf + * Improved MUC scalability + * Removed Riak support + +* [19.05](https://www.process-one.net/blog/ejabberd-19-05/) + * MQTT over WebSocket + * Improved MucSub + * Erlang/OTP 19.1 is required + +* [19.02](https://www.process-one.net/blog/ejabberd-19-02/) + * MQTT Support + * MIX improvements + +### 2018 + +* [18.12](https://www.process-one.net/blog/ejabberd-18-12/) + * XML Compression in message archive storage + * PROXY protocol support versions 1 and 2 + * MUC Self-Ping server optimisation (XEP-0410) + * Bookmarks Conversion (XEP-0411) + +* [18.09](https://www.process-one.net/blog/ejabberd-18-09/) + * Default configuration file simplification + * Improved logging + * OpenSSL 1.1.1 support + * Modular ejabberd core + +* [18.06](https://www.process-one.net/blog/ejabberd-18-06/) + * Stop ejabberd initialization on invalid/unknown options + * Support SASL PLAIN + * Drop support of mod_irc + +* [18.04](https://www.process-one.net/blog/ejabberd-18-04/) + +* [18.03](https://www.process-one.net/blog/ejabberd-18-03/) + * New SQL schemas with server_host + +* [18.01](https://www.process-one.net/blog/ejabberd-18-01/) + +### 2017 + +* [17.12](https://www.process-one.net/blog/ejabberd-17-12/) + * SNI (Server Name Indication) for inbound connections + * Rewrite ejabberd system monitor + * Support PubSub v1.14 and OMEMO + +* [17.11](https://www.process-one.net/blog/ejabberd-17-11/) + * ACME Support + * Introduce ‘certfiles’ global option + * PubSub improved, and SQL storage + +* [17.09](https://www.process-one.net/blog/ejabberd-17-09/) + * New mod_avatar + * SRV for XMPP over TLS + +* [17.08](https://www.process-one.net/blog/ejabberd-17-08/) + * XEP-0357: Push Notifications + * Modular cluster with cluster_backend + +* [17.07](https://www.process-one.net/blog/ejabberd-17-07/) + +* [17.06](https://www.process-one.net/blog/ejabberd-17-06/) + * New Caching system + * Extended Riak support + * Certificate manager + +* [17.04](https://www.process-one.net/blog/ejabberd-17-04/) + +* [17.03](https://www.process-one.net/blog/ejabberd-17-03/) + * Modular code + * Dynamic configuration reload + * mod_blockstrangers for spam protection + * S2S dialback + +* [17.01](https://www.process-one.net/blog/ejabberd-17-01/) + * PostgreSQL SSL support + +### 2016 + +* [16.12](https://www.process-one.net/blog/ejabberd-16-12/) + * New BOSH module + * New Commands API permissions framework + * XMPP packet handling using dedicated `xmpp` erlang library + * New [ejaberd/mix Docker container](https://www.process-one.net/blog/ejabberd-development-with-docker/) + +* [16.09](https://www.process-one.net/blog/ejabberd-16-09/) + * Support for Elixir configuration file + * XEP-0355 Namespace Delegation + * XEP-0356 Privileged Entity + +* [16.08](https://www.process-one.net/blog/ejabberd-16-08/) + * New [MUC/Sub](https://www.process-one.net/blog/xmpp-mobile-groupchat-introducing-muc-subscription/) + * Improved Elixir support + * Major clean-up and improvement on OAuth ReST API + +* [16.06](https://www.process-one.net/blog/ejabberd-16-06/) + * New ACL (Access Control List) infrastructure + +* [16.04](https://www.process-one.net/blog/ejabberd-16-04/) + +* [16.03](https://www.process-one.net/blog/ejabberd-16-03/) + * Experimental support for [MIX (Mediated Information eXchange)](https://www.process-one.net/blog/experimental-mix-support-for-group-conversations-added-to-ejabberd/) + * Erlang/OTP 17.5 required + +* [16.02](https://www.process-one.net/blog/ejabberd-16-02/) + * XEP-0013 Flexible Offline Message Retrieval + * Improved Message Archive Management (MAM) + * Published [ejabberd on hex.pm](https://hex.pm/packages/ejabberd) + * Faster and more memory efficient XML parsing and TLS encryption. + * Stream compression after SASL + * Migration script from Prosody + +* [16.01](https://www.process-one.net/blog/ejabberd-16-01/) + +### 2015 + +* [15.11](https://www.process-one.net/blog/ejabberd-15-11/) + * Improved `join_cluster` and `leave_cluster` + +* [15.10](https://www.process-one.net/blog/ejabberd-15-10/) + * New mod_http_upload with support for [XEP-0363 HTTP File Upload](https://xmpp.org/extensions/xep-0363.html) + * Added support for [Grapherl](https://www.process-one.net/blog/grapherl-google-summer-of-code-metrics-for-ejabberd/) + +* [15.09](https://www.process-one.net/blog/ejabberd-15-09/) + * OAuth 2.0 delegation framework + * Preliminary OAuth and HTTP based ejabberd API + * X-AUTH2 authentication mechanism + +* [15.07](https://www.process-one.net/blog/ejabberd-15-07/) + +* [15.06](https://www.process-one.net/blog/ejabberd-15-06/) + * New mod_mam with [XEP-0313 Message Archive Management](https://xmpp.org/extensions/xep-0313.html) + * Configuration checking on launch + * Added Windows 7/8 installers, RPM and DEB packages + * Document protocol support and version inside each module + +* [15.04](https://www.process-one.net/blog/ejabberd-15-04/) + * Added mod_admin_extra and mod_muc_admin + * Added XEP-0033 Extended Stanza Addressing + * Support to [embed ejabberd in an Elixir app](https://www.process-one.net/blog/embedding-ejabberd-into-an-elixir-phoenix-web-application/) + * Erlang/OTP R16B03-1 is required + +* [15.03](https://www.process-one.net/blog/ejabberd-15-03/) + * Added support for WebSocket + * Customizable session backends + * SCRAM support for SQL authentication backend + * Documentation was [converted from LaTeX to Markdown](https://www.process-one.net/blog/ejabberd-new-documentation-site-a-community-effort/) and published in [docs.ejabberd.im/](https://docs.ejabberd.im/) + +* [15.02](https://www.process-one.net/blog/ejabberd-community-15-02/) + * Added [Elixir support](https://www.process-one.net/blog/ejabberd-joins-the-elixir-revolution/) + * New command to reload configuration withour restart + * Bug tracker [moves from JIRA to GitHub Issues](https://www.process-one.net/blog/revamped-ejabberd-im-website-logo/) + +* [Revamped ejabberd website, new logo, new development process](https://www.process-one.net/blog/revamped-ejabberd-im-website-logo/) and bugtracking migrated from JIRA to GitHub + +### 2014 + +* [14.12](https://www.process-one.net/blog/ejabberd-community-14-12/) + * New mod_client_state with XEP-0352: Client State Indication + * New mod_fail2ban + +* [14.07](https://www.process-one.net/blog/ejabberd-community-14-07/) + * SIP Outbound (RFC 5626) + +* [14.05](https://www.process-one.net/blog/ejabberd-community-14-05/) + * RFC-3261 SIP proxy/registrar + * RFC-5766 TURN: Traversal Using Relays around NAT + * XEP-0198 Stream Management + * XEP-0321 Remote Roster Management + * Several improvements regarding encryption + * New Bash completion script for ejabberdctl + +### 2013 + +* [13.12](https://www.process-one.net/blog/ejabberd-community-13-12/) + * New OpenSSL ciphers option in c2s, s2s and s2s_out + * ejabberd_xmlrpc included + +* [13.10](https://www.process-one.net/blog/ejabberd-community-13-10/) + * [ejabberd configuration file in YAML format](https://www.process-one.net/blog/switch-ejabberd-configuration-to-yaml/) + * Log files are created using Lager + * Rebar2 is used to manage dependencies + * Erlang/OTP R15 is required + +* [13.03-beta1](https://www.process-one.net/blog/ejabberd-community-server-13-03-is-launched-in-beta/) ([announcement](http://lists.jabber.ru/pipermail/ejabberd/2013-March/007974.html)) + * Binarize and indent code + * New versioning scheme + +### 2012 + +* [2.1.11](https://www.process-one.net/blog/ann-bugfix-release-ejabberd-2-1-11/) + * Added ODBC support for several modules + +### 2011 + +* [2.1.10](https://www.process-one.net/blog/new_releases_ejabberd_2110_and_exmpp_099/) + +* [2.1.9](https://www.process-one.net/blog/new_releases_ejabberd_219_300-alpha-4_and_exmpp_098/) + * New SASL SCRAM-SHA-1 authentication mechanism + +### 2010 + +* [2.1.6](https://www.process-one.net/blog/ejabberd_216_release/) + * mod_register: New captcha_protected option to require CAPTCHA + * Support PostgreSQL 9.0 + +* October: the source code repository and the bug tracker were finally moved to GitHub + +* [2.1.5](https://www.process-one.net/blog/ejabberd_215_and_exmpp_095_bugfix_releases/) + +* [2.1.4](https://www.process-one.net/blog/ejabberd_214_and_exmpp_094_bugfix_releases/) + * Full support for XEP-0115 Entity Capabilities v1.5 + +* [2.1.2](https://www.process-one.net/blog/ann_ejabberd_212_bugfix_release/) + +### 2009 + +* [2.1.1](https://www.process-one.net/blog/ann_ejabberd_211_bugfix_release/) + +* [2.1.0](https://www.process-one.net/blog/ejabberd_210_finally_released/) + * LDAPS support + * STUN server + * New XEPs supported: XMPP Ping, Roster Versioning, [Import/Export Format](https://www.process-one.net/blog/ejabberd_migration_kit/) + * Erlang/OTP R13 is supported + +* [2.0.5](https://web.archive.org/web/20131101194253/https://www.process-one.net/en/ejabberd/release_notes/release_note_ejabberd_2.0.5/) ([announcement](https://www.process-one.net/blog/ejabberd_205_has_been_released/)) + +* [2.0.4](https://web.archive.org/web/20131101194253/https://www.process-one.net/en/ejabberd/release_notes/release_note_ejabberd_2.0.4/) ([announcement](https://www.process-one.net/blog/ejabberd_204_has_been_released/)) + +* [2.0.3](https://web.archive.org/web/20131101194253/https://www.process-one.net/en/ejabberd/release_notes/release_note_ejabberd_2.0.3/) ([announcement](https://www.process-one.net/blog/ejabberd_203_has_been_released/)) + +### 2008 + +* [2.0.2](https://web.archive.org/web/20131101194253/https://www.process-one.net/en/ejabberd/release_notes/release_note_ejabberd_202/) ([announcement](https://www.process-one.net/blog/ejabberd_202/)) + +* [2.0.1](http://www.process-one.net/en/ejabberd/release_notes/release_note_ejabberd_201) ([announcement](https://www.process-one.net/blog/ejabberd_201/)) + +* [2.0.0](https://web.archive.org/web/20131101194253/https://www.process-one.net/en/ejabberd/release_notes/release_note_ejabberd_200/) ([announcement](https://www.process-one.net/blog/ejabberd_200/)) + * New front-end and back-end cluster architecture + * Complete rewrite of the PubSub module + * New Proxy65 file transfer proxy + * BOSH support + * Many more improvements + +### 2007 + +* [1.1.4](https://www.process-one.net/blog/ejabberd_114_released/) + +* [1.1.3](https://web.archive.org/web/20220124230040/http://lists.jabber.ru/pipermail/ejabberd/2007-February/002440.html) + +### 2006 + +* [1.1.2](https://web.archive.org/web/20061206003138/http://www.process-one.net/en/projects/ejabberd/releases/release_1.1.2.html) ([announcement](https://web.archive.org/web/20220124221010/http://lists.jabber.ru/pipermail/ejabberd/2006-September/002209.html)) + * LDAP improvements + * Microsoft SQL supported + * New Windows installer + +* [1.1.1](https://web.archive.org/web/20060617072935/http://ejabberd.jabber.ru/ejabberd-1.1.1) ([announcement](https://web.archive.org/web/20220127211621/http://lists.jabber.ru/pipermail/ejabberd/2006-April/001751.html)) + * Erlang/OTP R9C-2 required + +* [1.1.0](https://web.archive.org/web/20060624222148/http://www.process-one.net/en/projects/ejabberd/releases/release_1.1.0.html) ([announcement](https://web.archive.org/web/20220127203655/http://lists.jabber.ru/pipermail/ejabberd/2006-April/001726.html)) + * JEP-0050: Ad-Hoc Commands + * JEP-0138: Stream Compression + * JEP-0175: SASL anonymous + * Native MySQL support + * MUC improvement: Chatroom logging + +### 2005 + +* [1.0.0](https://web.archive.org/web/20060613001514/http://www.process-one.net/en/projects/ejabberd/releases/release_1.0.0.html) ([announcement](https://web.archive.org/web/20220120011006/http://lists.jabber.ru/pipermail/ejabberd/2005-December/001481.html)) + * S2S encryption: STARTTLS + SASL_EXTERNAL and STARTTLS + Dialback + * Different certificates can be defined for each virtual host. + * Support for vCard storage in ODBC + * New tool to convert Mnesia to ODBC + * Native PostgreSQL support + +* [0.9.8](https://web.archive.org/web/20060706014203/http://www.process-one.net/en/projects/ejabberd/releases/release_0.9.8.html) ([announcement](https://web.archive.org/web/20220118153712/http://lists.jabber.ru/pipermail/ejabberd/2005-August/001278.html)) + * Enhanced virtual hosting + * Enhanced PubSub + +* [0.9.1](https://web.archive.org/web/20060706014255/http://www.process-one.net/en/projects/ejabberd/releases/release_0.9.1.html) ([announcement](https://web.archive.org/web/20220116215413/http://lists.jabber.ru/pipermail/ejabberd/2005-May/001101.html)) + +* [0.9](https://web.archive.org/web/20060613001412/http://www.process-one.net/en/projects/ejabberd/releases/release_0.9.html) ([announcement](https://web.archive.org/web/20220125230349/http://lists.jabber.ru/pipermail/ejabberd/2005-April/000987.html)) + * Added support for virtual hosts + * New mod_shared_roster + * Added PostgreSQL support + +* February: source code moved from SVN to Git, and the [bug tracker from Bugzilla to JIRA](https://www.process-one.net/blog/ejabberd_bug_tracker_open_for_registration/) + +* Beginning of 2005, source code moved from JabberStudio CVS to ProcessOne SVN + +### 2004 + +* October: website moved from JabberStudio to [ejabberd.jabber.ru](https://web.archive.org/web/20050730000817/http://ejabberd.jabber.ru/), and the bug tracker to Jabber.ru’s Bugzilla + +* [0.7.5](https://web.archive.org/web/20220128023940/http://lists.jabber.ru/pipermail/ejabberd/2004-October/000337.html) + * Support for STARTTLS with C2S connections + * Support for authentification via external script + * Added module which implement JUD and vCard services using LDAP + * Improvements in web-based administration interface (user creation/removal, roster and offline queue management) + * Support for message expiration (JEP-0023) + * Support for HTTPS in web interface + +* [0.7](https://web.archive.org/web/20220122152308/http://lists.jabber.ru/pipermail/ejabberd/2004-July/000129.html) + * Support for LDAP authentification + * Support for HTTP Polling + * Support for web-based administration interface + * Added command-line administration utility "ejabberdctl" + * Support for history management in MUC rooms + +### 2003 + +* 16th November, [0.5](https://web.archive.org/web/20211208160408/http://lists.jabber.ru/pipermail/ejabberd/2003-November/000052.html) + * First release + +* January, initial documentation in LaTeX: [Ejabberd Installation and Operation Guide](https://web.archive.org/web/20030409163941/http://ejabberd.jabberstudio.org/guide.html) + +### 2002 + +* 18th November, [first commit](https://github.com/processone/ejabberd/commit/e0b348319ad6902ffcbb663e81c29b229c551b61) to CVS + +* 16th November, first erlang modules written diff --git a/content/tutorials/ideas.md b/content/tutorials/ideas.md deleted file mode 100755 index 4fffceed..00000000 --- a/content/tutorials/ideas.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -title: Upcoming tutorial ideas ---- - -# Tutorial review process - -This page gathers tutorial ideas. -We should ensure tutorials are accurate and up to date by having peer review. - -I propose on each tutorial page to add in meta data: -* Original Author and original date -* Last reviewer and last review date - -# Upcoming tutorial ideas - -Volunteers ? - -* Configuring ejabberd with MySQL - -* Configuring ejabberd with Postgres - -* Using Lager backend to centralize log cluster storage - -Inspiration: -https://stackoverflow.com/questions/35940281/store-ejabberd-cluster-log-at-same-location diff --git a/content/tutorials/index.md b/content/tutorials/index.md old mode 100755 new mode 100644 index e53159cf..8b9b84c2 --- a/content/tutorials/index.md +++ b/content/tutorials/index.md @@ -1,13 +1,8 @@ ---- -title: ejabberd and XMPP tutorials -menu: Tutorials -order: 40 -toc: true ---- +# ejabberd and XMPP tutorials -*Learning ejabberd and XMPP through videos and hands-on tutorials* +Learning ejabberd and XMPP through videos and hands-on tutorials. -# Text tutorials +## Text tutorials In the [ProcessOne's blog Tutorial tag](https://www.process-one.net/blog/tag/tutorial/) you will find tutorials about: @@ -36,228 +31,59 @@ you will find tutorials about: In the so-called [ejabberd book](https://www.ejabberd.im/book/index.html) there are also [old archived ejabberd tutorials](https://www.ejabberd.im/tutorials/). -# Architecture - -
-
- - XMPP Academy #1 - -
-
-

Understanding ejabberd SaaS architecture

-

Excerpt from XMPP Academy #1 starting at 1m33s.

-
-
- -
-
- - XMPP Academy #2 - -
- -
- -
-
- - XMPP Academy #2 - -
-
-

ejabberd backends architecture

-

Excerpt from XMPP Academy #2 starting at 14m00s.

-
-
- -
-
- - XMPP Academy #2 - -
-
-

What are ejabberd session backends and how to use them to scale?

-

Excerpt from XMPP Academy #2 starting at 19m42s.

-
-
- - -# XMPP on mobile devices (smartphones) - -
-
- - XMPP Academy #1 - -
- -
- -
-
- - XMPP Academy #3 - -
- -
- -
-
- - XMPP Academy #3 - -
- -
- -
-
- - XMPP Academy #2 - -
-
-

What are message carbons and how do they work?

-

Excerpt from XMPP Academy #2 starting at 27m30s.

-
-
- -
-
- - XMPP Academy #2 - -
-
-

Demo: learning message carbons with Psi XMPP console

-

Excerpt from XMPP Academy #2 starting at 29m51s.

-
-
- - -# XMPP for the Web - -
-
- - XMPP Academy #1 - -
-
-

ejabberd roadmap: announcing OAuth2 support

-

Excerpt from XMPP Academy #1 starting at 27m43s.

-
-
- -
-
- - XMPP Academy #3 - -
-
-

What is the impact of Websocket on Web chat performance?

-

Excerpt from XMPP Academy #3 starting at 25m02s.

-
-
- - -# Multi-User Chat - -
-
- -
-
-

Why do avatars / carbons not work in MUC rooms? What is special about MUC rooms?

-

Excerpt from XMPP Academy #2 starting at 34m15s.

-
-
- - - - - - -# Developer tools and techniques - -
-
- - XMPP Academy #3 - -
-
-

What are the typical tools for quick XMPP prototyping?

-

Excerpt from XMPP Academy #3 starting at 27m45s.

-
-
- - -# ejabberd and XMPP server-side implementation - -
-
- - XMPP Academy #1 - -
-
-

How does ejabberd internally store messages which are not yet delivered?

-

Excerpt from XMPP Academy #1 starting at 22m42s.

-
-
- -
-
- - XMPP Academy #1 - -
-
-

How are privacy lists managed in ejabberd?

-

Excerpt from XMPP Academy #1 starting at 25m54s.

-
-
- -
-
- - XMPP Academy #3 - -
-
-

Why do we seem to find duplicate in Message Archive Management backend?

-

Excerpt from XMPP Academy #3 starting at 32m20s.

-
-
+## Architecture +* [Understanding ejabberd SaaS architecture](https://youtu.be/-dqQfCpw98E?t=1m33s) + > Excerpt from XMPP Academy #1 starting at 1m33s. + +* [What are ejabberd backends? What backends are available in ejabberd and how do they work?](https://youtu.be/SbpFgdryyIA?t=2m05s) + > Excerpt from XMPP Academy #2 starting at 2m05s. + +* [ejabberd backends architecture](https://youtu.be/SbpFgdryyIA?t=14m00s) + > Excerpt from XMPP Academy #2 starting at 14m00s. + +* [What are ejabberd session backends and how to use them to scale?](https://youtu.be/SbpFgdryyIA?t=19m42s) + > Excerpt from XMPP Academy #2 starting at 19m42s. + +## XMPP on mobile devices (smartphones) + +* [Mobile XMPP support on ejabberd SaaS and Business Edition: Standby, push and detached modes](https://youtu.be/-dqQfCpw98E?t=16m44s) + > Excerpt from XMPP Academy #1 starting at 16m44s. + +* [How does Apple and Google Push support work on ejabberd SaaS and ejabberd Business Edition?](https://youtu.be/LToKLTf-N_E?t=1m20s) + > Excerpt from XMPP Academy #3 starting at 1m20s. + +* [What is the relationship between ejabberd Push support and XEP-0357: Push Notifications?](https://youtu.be/LToKLTf-N_E?t=22m34s) + > Excerpt from XMPP Academy #3 starting at 22m34s. + +* [What are message carbons and how do they work?](https://youtu.be/SbpFgdryyIA?t=27m30s) + > Excerpt from XMPP Academy #2 starting at 27m30s. + +* [Demo: learning message carbons with Psi XMPP console](https://youtu.be/SbpFgdryyIA?t=29m51s) + > Excerpt from XMPP Academy #2 starting at 29m51s. + +## XMPP for the Web + +* [ejabberd roadmap: announcing OAuth2 support](https://youtu.be/-dqQfCpw98E?t=27m43s) + > Excerpt from XMPP Academy #1 starting at 27m43s. + +* [What is the impact of Websocket on Web chat performance?](https://youtu.be/LToKLTf-N_E?t=25m02s) + > Excerpt from XMPP Academy #3 starting at 25m02s. + +## Multi-User Chat + +* [Why do avatars / carbons not work in MUC rooms? What is special about MUC rooms?](https://youtu.be/SbpFgdryyIA?t=34m15s) + > Excerpt from XMPP Academy #2 starting at 34m15s. + +## Developer tools and techniques + +* [What are the typical tools for quick XMPP prototyping?](https://youtu.be/LToKLTf-N_E?t=27m45s) + +## ejabberd and XMPP server-side implementation + +* [How does ejabberd internally store messages which are not yet delivered?](https://youtu.be/-dqQfCpw98E?t=22m42s) + +* [How are privacy lists managed in ejabberd?](https://youtu.be/-dqQfCpw98E?t=25m54s) + +* [Why do we seem to find duplicate in Message Archive Management backend?](https://youtu.be/LToKLTf-N_E?t=32m20s) + > Excerpt from XMPP Academy #3 starting at 32m20s. diff --git a/content/tutorials/mix-010.md b/content/tutorials/mix-010.md old mode 100755 new mode 100644 index 84221dae..a476d078 --- a/content/tutorials/mix-010.md +++ b/content/tutorials/mix-010.md @@ -1,8 +1,4 @@ ---- -title: Getting Started with MIX -menu: MIX -toc: true ---- +# Getting started with MIX MIX stands for Mediated Information eXchange and defined in MIX-CORE ([XEP-0369](https://xmpp.org/extensions/xep-0369.html)), @@ -38,71 +34,67 @@ Here is a short walk through what can already be done. Also note that the specification can (and will) change significantly before it becomes stable. These examples are based on [XEP-0369 v0.1](https://xmpp.org/extensions/attic/xep-0369-0.1.html). -# Configuration +## Configuration Configuration is simple: * Install a recent ejabberd version (19.02 or newer) * You need to add -[mod_mix](/admin/configuration/modules/#mod-mix) -and [mod_mix_pam](/admin/configuration/modules/#mod-mix-pam) +[mod_mix](../admin/configuration/modules.md/#mod_mix) +and [mod_mix_pam](../admin/configuration/modules.md/#mod_mix_pam) in ejabberd configuration, modules section: - ~~~ yaml - modules: - ... - mod_mix: {} - mod_mix_pam: {} - ~~~ + ``` yaml + modules: + mod_mix: {} + mod_mix_pam: {} + ``` * Make sure you have PubSub enabled. Default configuration is fine: - ~~~ yaml - modules: - ... - mod_pubsub: - access_createnode: pubsub_createnode - plugins: - - "flat" - - "pep" - ~~~ + ``` yaml + modules: + mod_pubsub: + access_createnode: pubsub_createnode + plugins: + - "flat" + - "pep" + ``` * The examples assume you have this virtual host: - ~~~ yaml - hosts: - ... - - shakespeare.example - ~~~ + ``` yaml + hosts: + - shakespeare.example + ``` -# Usage +## Usage There is no client supporting MIX yet so here is how it works directly at XMPP stream level. Here are real-life examples from playing with our MIX implementation: -## Creating a MIX Channel - +### Creating a MIX Channel First of all, create a new MIX channel following [7.3.2 Creating a Channel](https://xmpp.org/extensions/xep-0369.html#usecase-admin-create): -~~~ xml +``` xml -~~~ +``` -## Joining a MIX Channel +### Joining a MIX Channel Now tell your server that you want your account to join that MIX channel, using [MIX-PAM: 2.7 Joining a Channel](https://xmpp.org/extensions/xep-0405.html#usecase-user-join): -~~~ xml +``` xml @@ -118,11 +110,11 @@ Now tell your server that you want your account to join that MIX channel, using -~~~ +``` You receive IQ that confirms success: -~~~ xml +``` xml -~~~ +``` Subscribers on the participants node for that channel will also receive the new list of participants (so, including ourselves in that case): -~~~ xml +``` xml @@ -157,14 +149,14 @@ case): -~~~ +``` -## Setting a nick +### Setting a nick You may want to set a nick for this channel (see [7.1.4 Setting a Nick](https://xmpp.org/extensions/xep-0369.html#usecase-setting-nick)): -~~~ xml +``` xml @@ -172,47 +164,47 @@ You may want to set a nick for this channel (see thirdwitch -~~~ +``` Note: Support for MIX nickname registration is not implemented in ejabberd. -## Sending and receiving messages +### Sending and receiving messages You can now start chatting with your peers, by publishing on the message node (see [7.1.6 Sending a Message](https://xmpp.org/extensions/xep-0369.html#usecase-user-message)): -~~~ xml +``` xml Harpier cries: 'tis time, 'tis time. -~~~ +``` The message is received by all subscribers on the message node on that MIX channel: -~~~ xml +``` xml + to='hag77@shakespeare.example' + from='coven@mix.shakespeare.example/19be8c262ed618e078b7' + type='groupchat' + id='1625493702877370'> thirdwitch hag66@shakespeare.example Harpier cries: 'tis time, 'tis time. -~~~ +``` -## Querying participants list +### Querying participants list A participant can always get list of participants with a PubSub query on node items for the channel (see [6.6 Determining the Participants in a Channel](https://xmpp.org/extensions/xep-0369.html#find-channel-participants)): -~~~ xml +``` xml @@ -220,11 +212,11 @@ on node items for the channel -~~~ +``` The channel will reply with list of participants: -~~~ xml +``` xml + jid='hag66@shakespeare.example' + xmlns='urn:xmpp:mix:core:0'/> + xmlns='urn:xmpp:mix:core:0'/> -~~~ +``` -# Caveats +## Caveats At the moment it is unclear from XEP-0369 example how you match a message you receive to a participant. We are going to improve our @@ -264,7 +256,7 @@ services. The work is still an experiment to progress on the specifications by offering client developers to give real life feedback on a reference implementation of the current specification. -# Conclusion +## Conclusion We are only at the beginning of MIX. However, we are excited to have reached a point where it is already usable in some cases. diff --git a/content/tutorials/muc-vcard.md b/content/tutorials/muc-vcard.md old mode 100755 new mode 100644 index 0fe9f2b7..78c3a175 --- a/content/tutorials/muc-vcard.md +++ b/content/tutorials/muc-vcard.md @@ -1,12 +1,10 @@ ---- -title: Setting vCards / Avatars for MUC rooms ---- +# Setting vCards / Avatars for MUC rooms ejabberd supports the ability to set vCard for MUC rooms. One of the most common use case is to be able to define an avatar for your own MUC room. -# How does it work? +## How does it work? To be allowed to set vCard for a given room, you need to be owner of that room. @@ -18,14 +16,14 @@ it on XMPP stream. If you want to convert it manually from command line, you can use `base64` tool. For example: -~~~ bash +``` sh base64 muc_logo.png > muc_logo.b64 -~~~ +``` However, when coding the client, you can more likely directly do the proper image base64 encoding in your code. -# Setting up MUC vCard +## Setting up MUC vCard To set the MUC vCard, you can send a vcard-temp set request, as defined in @@ -33,7 +31,7 @@ defined in directly addressed to your MUC room. For example, assuming my room id is `test@conference.localhost`: -~~~ xml +``` xml @@ -46,7 +44,7 @@ iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6 -~~~ +``` Please, note that you have to set the mime type of the image properly to help the client displaying it. @@ -55,19 +53,19 @@ You can of course add other fields to the vCard if needed. After that IQ `set` stanza, the server will reply with success: -~~~ xml +``` xml -~~~ +``` The MUC room also broadcasts a notification about non-privacy related configuration change to users that are currently in the room: -~~~ xml +``` xml -~~~ +``` -# Retrieving a MUC room vCard +## Retrieving a MUC room vCard Any user can retrieve the MUC vCard but sending a vcard-temp get IQ to the room itself: -~~~ xml +``` xml -~~~ +``` Server will reply by sending back the vCard: -~~~ xml +``` xml -~~~ +``` diff --git a/content/tutorials/mysql.md b/content/tutorials/mysql.md old mode 100755 new mode 100644 index a0f998dc..dc24d381 --- a/content/tutorials/mysql.md +++ b/content/tutorials/mysql.md @@ -1,14 +1,10 @@ ---- -title: Using ejabberd with MySQL -menu: MySQL -toc: true ---- +# Using ejabberd with MySQL ejabberd is bundled with a native Erlang driver to use MySQL as a backend for persistent storage. Using MySQL as backend is thus extremely straightforward. -# ejabberd installation +## ejabberd installation ejabberd packages and binary installers contain all the modules needed to connect to your MySQL server. You have no extra module to install @@ -18,17 +14,17 @@ If you are building ejabberd from source, make sure that you configure ejabberd to include MySQL module. It can be done by passing option `--enable-mysql` to `configure` script. For example: -~~~ bash +``` sh cd ejabberd-source ./configure --enable-mysql -~~~ +``` -# MySQL installation +## MySQL installation You need a MySQL server that you can point your ejabberd configuration to. The database does not have to be on the same server than ejabberd. -## Requirements +### Requirements ejabberd uses FULLTEXT indexes with InnoDB. Thus, you need MySQL 5.6 or greater to use with ejabberd. @@ -37,7 +33,7 @@ MySQL 5.6 or greater to use with ejabberd. can try using older 5.5 version. You may need to adapt MySQL database schema to cope with those older MySQL versions. -## MySQL on Linux +### MySQL on Linux This documentation will not get into the details of making MySQL running on Linux for production. It is dependent on Linux distribution @@ -45,7 +41,7 @@ and system administrators preferences and habits. It is also well documented, so it should not be an issue. -## Amazon RDS compliance +### Amazon RDS compliance ejabberd is fully compliant with [MySQL on Amazon RDS](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_MySQL.html). @@ -53,7 +49,7 @@ ejabberd is fully compliant with You just need to make sure to use MySQL version 5.6 or greater when you create your database. -## MySQL on OSX with Homebrew +### MySQL on OSX with Homebrew For testing / development, it is common to start experimenting with MySQL with [Homebrew installation](https://brew.sh/). @@ -62,87 +58,83 @@ Here is how to get started to help with setup up environment. With Homebrew properly installed, you can use the following command to install MySQL: -~~~ bash +``` sh brew install mysql -~~~ +``` You can then follow instruction to finish the installation, for example by running `mysql_secure_installation`. You can manually start server with: -~~~ bash +``` sh mysql.server start -~~~ +``` To connect to your local MySQL server using `mysql` command-line, assuming you kept the default set up, use: -~~~ bash +``` sh mysql -uroot -~~~ +``` To stop it, use: -~~~ bash +``` sh mysql.server stop -~~~ +``` -## MySQL on Windows with Bash +### MySQL on Windows with Bash On Windows you can install MySQL easily like on Linux using Ubuntu Bash: -~~~ bash +``` sh sudo apt-get install mysql-server-5.6 -~~~ +``` After configuration, you can start MySQL with: -~~~ bash +``` sh sudo /etc/init.d/mysql start -~~~ +``` You can connect on the database with your created admin password: -~~~ bash +``` sh mysql -uroot -ppassword -~~~ +``` -# MySQL database creation +## MySQL database creation -## Create ejabberd user and database +### Create ejabberd user and database MySQL admins should use this procedure and grant rights to a dedicated `ejabberd` user (replace password with your desired password): -~~~ bash +``` sh echo "GRANT ALL ON ejabberd.* TO 'ejabberd'@'localhost' IDENTIFIED BY 'password';" | mysql -h localhost -u root -~~~ +``` You can then create a dedicated `ejabberd` database (use password created earlier): -~~~ bash +``` sh echo "CREATE DATABASE ejabberd;" | mysql -h localhost -u ejabberd -p -~~~ +``` You should now be able to connect to `ejabberd` database with user `ejabberd` (use password defined on GRANT command): -~~~ bash +``` sh mysql -h localhost -u ejabberd -p -D ejabberd Welcome to the MySQL monitor. Commands end with ; or \g. @@ -158,23 +150,24 @@ owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> -~~~ +``` -## Decide which SQL schema to use +### Decide which SQL schema to use Read carefully the -[Default and New Schemas](/admin/configuration/database/#default-and-new-schemas) +[Default and New Schemas](../admin/configuration/database.md/#default-and-new-schemas) section and decide which schema is preferable in your case: the default or the new schema. Then modify the `ejabberd.yml` configuration file to setup your desired option value: -~~~ yaml +``` yaml new_sql_schema: true -~~~ +``` -## Use automatic schema update +### Use automatic schema update -Since ejabberd 23.10, ejabberd can take care to create the tables automatically +Since ejabberd [23.10](../archive/23.10/index.md), +ejabberd can take care to create the tables automatically the first time it starts with an empty database, and also takes care to update the database schema when you upgrade ejabberd to a newer version. @@ -182,20 +175,20 @@ That feature works both for default and new SQL schema, for MySQL, PostgreSQL an To enable automatic database schema creation and update, simply add in your `ejabberd.yml` configuration file: -~~~ yaml +``` yaml update_sql_schema: true -~~~ +``` In that case, you don't need to load the database schema manually: no need to read the next section. -## Load database schema manually +### Load database schema manually MySQL default schema is defined in a file called `mysql.sql`, and the new schema is `mysql.new.sql`. Some tables of the schema are described in: -[ejabberd SQL database schema documentation](/developer/sql-schema/). +[ejabberd SQL database schema documentation](../developer/sql-schema.md/). Those schema files can be found: @@ -206,13 +199,13 @@ Those schema files can be found: Load the schema in your `ejabberd` database with the command: -~~~ bash +``` sh mysql -h localhost -D ejabberd -u ejabberd -p < mysql.sql -~~~ +``` To make sure all looks fine, you can show the list of SQL tables: -~~~ bash +``` sh echo "SHOW TABLES;" | mysql -h localhost -D ejabberd -u ejabberd -p --table mysql: [Warning] Using a password on the command line interface can be insecure. @@ -248,17 +241,17 @@ mysql: [Warning] Using a password on the command line interface can be insecure. | vcard_search | | vcard_xupdate | +-------------------------+ -~~~ +``` Your database is now ready to connect with ejabberd. -# ejabberd configuration +## ejabberd configuration -## Setup MySQL connection +### Setup MySQL connection In `ejabberd.yml`, define your database parameters: -~~~ yaml +``` yaml sql_type: mysql sql_server: "localhost" sql_database: "ejabberd" @@ -266,11 +259,11 @@ sql_username: "ejabberd" sql_password: "password" ## If you want to specify the port: sql_port: 3306 -~~~ +``` Those parameters are mandatory if you want to use MySQL with ejabberd. -## Authentication use MySQL +### Authentication use MySQL If you decide to store user password in ejabberd, you need to tell ejabberd to use MySQL instead of internal database for authentication. @@ -278,9 +271,9 @@ ejabberd to use MySQL instead of internal database for authentication. You thus need to change ejabberd configuration `auth_method` to replace `internal` authentication with `sql`: -~~~ yaml +``` yaml auth_method: sql -~~~ +``` If you restart ejabberd, it should connect to your database for authentication. In case it does not work as expected, check your @@ -289,15 +282,15 @@ config file syntax and log files (`ejabberd.log`, `error.log`, For example, you can create a user in database with `ejabberdctl`: -~~~ bash +``` sh /sbin/ejabberdctl register "testuser" "localhost" "passw0rd" User testuser@localhost successfully registered -~~~ +``` You should now be able to connect XMPP users based on MySQL user base. -## Modules use MySQL +### Modules use MySQL At this stage, only the authentication / user base has been moved to MySQL. For data managed by modules, ejabberd still uses the Mnesia internal @@ -308,25 +301,23 @@ For each modules that support SQL backend, you can pass option done on a module by module basis. For example, if you want to store contact list in MySQL, you can do: -~~~ yaml +``` yaml modules: - ... mod_roster: db_type: sql - ... -~~~ +``` However, if you want to use MySQL for all modules that support MySQL, you can simply use global option `default_db: sql`: -~~~ yaml +``` yaml default_db: sql -~~~ +``` **Note:** even if you move all the persistent data you can to MySQL, Mnesia will still be started and used to manage clustering. -# Migrating data from internal to MySQL +## Migrating data from internal to MySQL To migrate your data, once you have setup your sql service, you can move most of the data to your database. @@ -348,9 +339,9 @@ When you are ready, you can: 1. Connect to a running ejabberd: - ~~~ bash - ./ejabberdctl debug - ~~~ + ``` sh + ./ejabberdctl debug + ``` 2. Alternatively, use `ejabberdctl live` to launch ejabberd with an Erlang shell attached. @@ -359,17 +350,17 @@ shell. First parameter is the XMPP domain name you want to migrate (i.e `localhost`). Second parameter `sql` tells ejabberd to export to configured MySQL database. For example: - ~~~ erlang - ejd2sql:export(<<"localhost">>, sql). - ~~~ + ``` erlang + ejd2sql:export(<<"localhost">>, sql). + ``` You should be set now. -# Converting database from default to new schema +## Converting database from default to new schema -Please check the section [Default and New Schemas](/admin/configuration/database/#default-and-new-schemas). +Please check the section [Default and New Schemas](../admin/configuration/database.md/#default-and-new-schemas). -# Getting further +## Getting further To get further you can read the ejabberd Configuration section about -[Databases](/admin/configuration/database/). +[Databases](../admin/configuration/database.md). diff --git a/content/use-cases/index.md b/content/use-cases/index.md index 17d39b6b..eaada89a 100644 --- a/content/use-cases/index.md +++ b/content/use-cases/index.md @@ -1,14 +1,11 @@ ---- -title: ejabberd Use Cases -menu: Use Cases -order: 50 -toc: true ---- +# ejabberd Use Cases ejabberd is very versatile and is a solid choice to build messaging services across a large number of industries: -# Mobile messaging +## ejabberd + +### Mobile messaging ejabberd's massive scalability makes it the most solid choice as the backbone for a very large number of mobile messaging services. @@ -23,7 +20,7 @@ This includes: * Versapp * [Whatsapp](http://highscalability.com/blog/2014/2/26/the-whatsapp-architecture-facebook-bought-for-19-billion.html) -# Gaming +### Gaming * [Electronic Arts](https://www.ea.com/) * [FACEIT](https://www.faceit.com/) @@ -32,20 +29,20 @@ This includes: * [Nokia nGage](https://en.wikipedia.org/wiki/N-Gage_(service)) * [Riot Games (League of Legends)](http://highscalability.com/blog/2014/10/13/how-league-of-legends-scaled-chat-to-70-million-players-it-t.html) -# Voice and video messaging +### Voice and video messaging * [Nimbuzz](https://en.wikipedia.org/wiki/Nimbuzz) * [ooVoo](https://www.oovoo.com/) * [Sipphone](https://www.process-one.net/resources/case_studies/ProcessOne_SIP_Phone_Case_Study_v3.pdf) * WowApp -# Internet of Things +### Internet of Things * AeroFS * IMA Teleassistance * [Nabaztag](https://en.wikipedia.org/wiki/Nabaztag) (Violet, Mindscape, then Aldebaran Robotics) -# Telecom / Hosting +### Telecom / Hosting * [Fastmail](https://blog.fastmail.com/2011/08/24/new-xmppjabber-server/) * GMX @@ -53,18 +50,18 @@ This includes: * Orange * [SAPO - Portugal Telecom](https://www.process-one.net/resources/case_studies/ProcessOne_SAPO_Case_Study_v7.pdf) -# Customer chat / CRM +### Customer chat / CRM * CoBrowser.net: [Coder Interview](https://www.process-one.net/blog/code-as-craft-interview-cobrowser-net/). * iAdvize * [LiveHelpercChat](https://livehelperchat.com): [Blog post: Full XMPP chat support for ejabberd](https://livehelperchat.com/full-xmpp-chat-support-for-ejabberd-423a.html) -# Media +### Media * [AFP](https://www.afp.com/en/) * [BBC](https://www.process-one.net/resources/case_studies/ProcessOne_BBC_Case_Study_v2.pdf) -# Social media +### Social media * [Facebook](https://www.quora.com/Why-was-Erlang-chosen-for-use-in-Facebook-chat) * Nasza Klasa (NKTalk messenger) @@ -72,32 +69,65 @@ This includes: * [Sify](http://highscalability.com/blog/2010/5/10/sifycom-architecture-a-portal-at-3900-requests-per-second.html) * [Tuenti](https://en.wikipedia.org/wiki/Tuenti) -# Sport +### Sport * [Major League of Baseball (MLB)](https://www.process-one.net/resources/case_studies/ProcessOne_ML_Baseball_Case_Study_v5.pdf) -# Education +### Education * Apollo group * Laureate -# Push alerts +### Push alerts * [Nokia push notifications](https://www.process-one.net/blog/sea_beyond_2011_talk_7_jukka_alakontiola_on_nokia_push_notifications/) * [Notify.me](http://highscalability.com/blog/2008/10/27/notifyme-architecture-synchronicity-kills.html) -# Dating +### Dating * Grindr * [Meetic](https://www.meetic.com/) -# Community sites +### Community sites * Jabber.at * Talkr.im -# Want to get added on this page ? +## XMPP Use Cases + +[XMPP](https://xmpp.org) is a very versatile protocol designed to +address many use cases of modern real-time messaging needs. However, it +is also a very large protocol and it is difficult to understand at +first sight all the use cases that XMPP adequately addresses. + +This page is gathering XMPP specifications that make XMPP a good fit +for a given use case of industry. + +### Realtime web + +XMPP was designed before the advent of realtime web. However, it +managed to adapt thanks to the following specifications: + +* XMPP PubSub is defined in + [XEP-0060](https://xmpp.org/extensions/xep-0060.html). This is a + very powerful mechanism that defines channel based communication on + top of the XMPP protocol itself. A server can handle millions of + channels, called Pubsub nodes. Users interested in specific channels + can subscribe to nodes. When data needs to be send to a given + channel, authorized publishers can send data to that node. The XMPP + server will then broadcast the content to all subscribers. This is + very adequate for realtime web as it allows you to broadcast + relevant events to web pages. + +* WebSocket: XMPP over WebSocket is defined in + [RFC 7395](https://tools.ietf.org/html/rfc7395). It is more + efficient and more scalable than XMPP for web's previous + specifications called + [BOSH](https://xmpp.org/extensions/xep-0124.html). WebSocket being a + true bidirectional channel, it allows lower latency messaging and is + very reliable. Note that BOSH can still be used transparently along + with WebSocket to support old web browsers. -This list is a work in progress. +**Use cases**: News, interactive web page, web chat, web games. -[Contact us](https://www.process-one.net/en/company/contact/) ! +**Supported by ejabberd**: Yes. diff --git a/content/user/index.md b/content/user/index.md deleted file mode 100755 index a42b7811..00000000 --- a/content/user/index.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: ejabberd for Users ---- - -As a messaging system, you probably wonder what ejabberd can help you -with. - -This section is here to give your pointers to understand what is XMPP -and how you can leverage it using ejabberd. - -The best place to get started is to read -[XSF's clients](https://xmpp.org/xmpp-software/clients/). diff --git a/content/xmpp/index.md b/content/xmpp/index.md deleted file mode 100755 index ebdc3342..00000000 --- a/content/xmpp/index.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: XMPP use cases ---- - -# XMPP use cases - -[XMPP](https://xmpp.org) is a very versatile protocol designed to -address many use cases of modern real-time messaging needs. However, it -is also a very large protocol and it is difficult to understand at -first sight all the use cases that XMPP adequately addresses. - -This page is gathering XMPP specifications that make XMPP a good fit -for a given use case of industry. - -## Realtime web - -XMPP was designed before the advent of realtime web. However, it -managed to adapt thanks to the following specifications: - -* XMPP PubSub is defined in - [XEP-0060](https://xmpp.org/extensions/xep-0060.html). This is a - very powerful mechanism that defines channel based communication on - top of the XMPP protocol itself. A server can handle millions of - channels, called Pubsub nodes. Users interested in specific channels - can subscribe to nodes. When data needs to be send to a given - channel, authorized publishers can send data to that node. The XMPP - server will then broadcast the content to all subscribers. This is - very adequate for realtime web as it allows you to broadcast - relevant events to web pages. - -* WebSocket: XMPP over WebSocket is defined in - [RFC 7395](https://tools.ietf.org/html/rfc7395). It is more - efficient and more scalable than XMPP for web's previous - specifications called - [BOSH](https://xmpp.org/extensions/xep-0124.html). WebSocket being a - true bidirectional channel, it allows lower latency messaging and is - very reliable. Note that BOSH can still be used transparently along - with WebSocket to support old web browsers. - -**Use cases**: News, interactive web page, web chat, web games. - -**Supported by ejabberd**: Yes. - diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 00000000..85978a19 --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,424 @@ + +#' general +# + +site_name: ejabberd Docs +site_url: https://docs.ejabberd.im + +repo_url: https://github.com/processone/ejabberd +repo_name: processone/ejabberd +edit_uri: https://github.com/processone/docs.ejabberd.im/edit/master/content + +copyright: | + Copyright © 2008 - 2024 ProcessOne + +docs_dir: content + +#. +#' extra +# + +extra: + status: # https://squidfunk.github.io/mkdocs-material/reference/#setting-the-page-status + new: New pag added + ebe: Exclusive to eBE customers + saas: Exclusive to SaaS customers + generator: true # MkDocs footer notice + social: + - icon: fontawesome/brands/github + link: https://github.com/processone/ejabberd + name: GitHub + - icon: fontawesome/brands/docker + link: https://github.com/processone/docker-ejabberd/ + name: Docker Registry + - icon: fontawesome/brands/mastodon + link: https://social.process-one.net/@ejabberd + name: Mastodon + - icon: fontawesome/regular/heart + link: https://process-one.net + name: ProcessOne Website + #version: + # provider: mike + #analytics: + # feedback: + # title: Was this page helpful? + # ratings: + # - icon: material/emoticon-happy-outline + # name: This page was helpful. + # data: 1 + # note: >- + # Thanks for your feedback! + # - icon: material/emoticon-sad-outline + # name: This page could be improved. + # data: 0 + # note: >- + # Thanks for your feedback! Can you please fill + # an issue + # explaining how this page could get improved? + +#extra_javascript: + #- "assets/js/feedback.js" + +extra_css: + - "assets/css/mdversion.css" + - "assets/css/notes.css" + - "assets/css/status.css" + - "assets/css/headers-underline.css" + +#. +#' markdown and hooks +# + +markdown_extensions: + - md_in_html + - toc: + toc_depth: 3 + permalink: true # add permalink to headers + title: " " + - admonition + - pymdownx.details + - pymdownx.highlight: + anchor_linenums: true + line_spans: __span + pygments_lang_class: true + - pymdownx.inlinehilite + - pymdownx.snippets + - pymdownx.superfences + - pymdownx.emoji: + emoji_generator: !!python/name:material.extensions.emoji.to_svg + emoji_index: !!python/name:material.extensions.emoji.twemoji + +hooks: + - add_old_ids.py + - shortcodes.py + +#. +#' plugins +# + +plugins: + #- git-committers: + # repository: processone/mkdocs + # branch: main + - htmlproofer: + enabled: !ENV [TEST, false] + validate_external_urls: !ENV [TEST_EXTERNAL, false] + raise_error_after_finish: true + skip_downloads: true + ignore_urls: + - 'ejabberd-docs-*' + - 'mailto:*' + - 'xmpp:*' + - 'https://www.faceit.com/' + - offline: + enabled: !ENV [OFFLINE, false] + - redirects: + redirect_maps: + 'admin/installation.md': 'admin/install/index.md' + - search + #- social + - with-pdf: + author: " " + copyright: Copyright © 2008 - 2024 ProcessOne + cover: true + cover_subtitle: ejabberd Community Server + #cover_logo: assets/img/logo-docs.png + ordered_chapter_level: 0 + excludes_children: + - 'developer/ejabberd-api/admin-api.md' + exclude_pages: + - 'archive/' + output_path: ../content/ejabberd-docs.pdf + enabled_if_env: WITH_PDF + show_anchors: false + verbose: false + +#. +#' theme +# + +theme: + name: material + custom_dir: overrides + logo: assets/img/logo-docs.png + favicon: assets/img/favicon.ico + icon: + repo: fontawesome/brands/github # Header git icon + admonition: + tip: simple/riseup + success: material/elevation-rise + + palette: + # Dark Mode + - scheme: default + toggle: + icon: material/weather-night + name: Switch to dark mode + primary: blue + # Light Mode + - scheme: slate + toggle: + icon: material/weather-sunny + name: Switch to light mode + primary: blue + + features: + - navigation.tabs + - navigation.tabs.sticky + #- navigation.sections + #- navigation.expand + #- navigation.path # Insiders Feature - Show the current path in the navigation (breadcrumbs) + #- navigation.prune + - navigation.indexes + - toc.follow + #- toc.integrate + - navigation.top + - navigation.instant # https://squidfunk.github.io/mkdocs-material/setup/setting-up-navigation/?h=navigation+sections#instant-loading + - navigation.instant.progress # https://squidfunk.github.io/mkdocs-material/setup/setting-up-navigation/?h=navigation+sections#progress-indicator + - navigation.tracking # address bar is automatically updated with the active anchor + - navigation.footer # Previous/Next buttons in footer + - search.suggest + - search.highlight + - content.tabs.link + - content.code.annotate + - content.code.copy + - content.action.edit # Button "Edit on GitHub" + - content.action.view # Button "View on GitHub" + +#. +#' nav +# + +nav: + - Overview: + - get-started/index.md + - Features: admin/introduction.md + - FAQ: ejabberd-faq/index.md + - Use Cases: use-cases/index.md + - License: COPYING.md + - Quickstart: README-GIT.md + - Install: + - admin/install/index.md + - Containers: admin/install/container/index.md + - " ejabberd Container": CONTAINER.md + - " ecs Container": README-ECS.md + - Binary Installers: admin/install/binary-installer.md + - Operating System Package: admin/install/os-package.md + - Compile Source Code: admin/install/source.md + - Homebrew: admin/install/homebrew.md + - Mac OSX: developer/install-osx.md + - admin/install/next-steps.md + - Configure: + - admin/configuration/index.md + - File Format: admin/configuration/file-format.md + - Basic Configuration: admin/configuration/basic.md + - Authentication: admin/configuration/authentication.md + - Databases: admin/configuration/database.md + - LDAP: admin/configuration/ldap.md + - Listen Modules: admin/configuration/listen.md + - Listen Options: admin/configuration/listen-options.md + - Top-Level Options: admin/configuration/toplevel.md + - Modules Options: admin/configuration/modules.md + - Advanced: + - admin/guide/index.md + - Architecture: developer/extending-ejabberd/architecture.md + - Clustering: admin/guide/clustering.md + - Managing: admin/guide/managing.md + - Security: admin/guide/security.md + - Troubleshooting: admin/guide/troubleshooting.md + - Upgrade: admin/upgrade/index.md + - Tutorials: tutorials/index.md + - " MIX tutorial": tutorials/mix-010.md + - " MQTT tutorial": admin/guide/mqtt/index.md + - " MUC vCards": tutorials/muc-vcard.md + - " MySQL tutorial": tutorials/mysql.md + - Development: + - developer/index.md + - "Developer Guide": developer/guide.md + - " Pubsub Dev": developer/extending-ejabberd/pubsub.md + - " Simplified Roster Versioning": developer/xmpp-clients-bots/extensions/roster-versioning.md + - " Stanza Routing": developer/extending-ejabberd/stanza-routing.md + - " SQL Schema": developer/sql-schema.md + - Contributions: admin/contrib/index.md + - " Contributing": contributing/index.md + - " Contributor Convenant": contributing/CODE_OF_CONDUCT.md + - " Contributors": contributing/CONTRIBUTORS.md + - Dependencies: developer/repositories.md + - Docs: README-DOCS.md + - Elixir Dev: developer/extending-ejabberd/elixir.md + - Livebook: livebooks/ejabberd-developer-livebook.md + - Localization: developer/extending-ejabberd/localization.md + - Modules Dev: developer/extending-ejabberd/modules.md + - MUC/Sub Extension: developer/xmpp-clients-bots/extensions/muc-sub.md + - Testing: developer/extending-ejabberd/testing.md + - VSCode: developer/vscode.md + - XMPPFramework (iOS): developer/xmpp-clients-bots/ios/getting-started-xmppframework.md + - API: + - developer/ejabberd-api/index.md + - API Reference: developer/ejabberd-api/admin-api.md + - API Tags: developer/ejabberd-api/admin-tags.md + - Simple Configuration: developer/ejabberd-api/simple-configuration.md + - Permissions: developer/ejabberd-api/permissions.md + - OAuth Support: developer/ejabberd-api/oauth.md + - Commands: developer/ejabberd-api/commands.md + - Versioning: developer/ejabberd-api/api_versioning.md + - Archive: + - archive/index.md + - "24.02": + - archive/24.02/index.md + - archive/24.02/admin-api.md + - archive/24.02/admin-tags.md + - archive/24.02/listen.md + - archive/24.02/listen-options.md + - archive/24.02/modules.md + - archive/24.02/toplevel.md + - archive/24.02/upgrade.md + - "23.10": + - archive/23.10/index.md + - archive/23.10/admin-api.md + - archive/23.10/admin-tags.md + - archive/23.10/listen.md + - archive/23.10/listen-options.md + - archive/23.10/modules.md + - archive/23.10/toplevel.md + - archive/23.10/upgrade.md + - "23.04": + - archive/23.04/index.md + - archive/23.04/admin-api.md + - archive/23.04/listen.md + - archive/23.04/listen-options.md + - archive/23.04/modules.md + - archive/23.04/toplevel.md + - archive/23.04/upgrade.md + - "23.01": + - archive/23.01/index.md + - archive/23.01/admin-api.md + - archive/23.01/listen.md + - archive/23.01/listen-options.md + - archive/23.01/modules.md + - archive/23.01/toplevel.md + - archive/23.01/upgrade.md + - "22.10": + - archive/22.10/index.md + - archive/22.10/admin-api.md + - archive/22.10/listen.md + - archive/22.10/listen-options.md + - archive/22.10/modules.md + - archive/22.10/toplevel.md + - archive/22.10/upgrade.md + - "22.05": + - archive/22.05/index.md + - archive/22.05/admin-api.md + - archive/22.05/listen.md + - archive/22.05/listen-options.md + - archive/22.05/modules.md + - archive/22.05/toplevel.md + - archive/22.05/upgrade.md + - "21.12": + - archive/21.12/index.md + - archive/21.12/admin-api.md + - archive/21.12/listen.md + - archive/21.12/listen-options.md + - archive/21.12/modules.md + - archive/21.12/toplevel.md + - archive/21.12/upgrade.md + - "21.07": + - archive/21.07/index.md + - archive/21.07/admin-api.md + - archive/21.07/listen.md + - archive/21.07/listen-options.md + - archive/21.07/modules.md + - archive/21.07/toplevel.md + - archive/21.07/upgrade.md + - "21.04": + - archive/21.04/index.md + - archive/21.04/admin-api.md + - archive/21.04/listen.md + - archive/21.04/listen-options.md + - archive/21.04/modules.md + - archive/21.04/toplevel.md + - archive/21.04/upgrade.md + - "21.01": + - archive/21.01/index.md + - archive/21.01/admin-api.md + - archive/21.01/listen.md + - archive/21.01/listen-options.md + - archive/21.01/modules.md + - archive/21.01/toplevel.md + - "20.12": + - archive/20.12/index.md + - archive/20.12/admin-api.md + - archive/20.12/listen.md + - archive/20.12/listen-options.md + - archive/20.12/modules.md + - archive/20.12/toplevel.md + - "20.07": + - archive/20.07/index.md + - archive/20.07/admin-api.md + - archive/20.07/listen.md + - archive/20.07/listen-options.md + - archive/20.07/modules.md + - archive/20.07/toplevel.md + - "20.04": + - archive/20.04/index.md + - archive/20.04/admin-api.md + - archive/20.04/listen.md + - archive/20.04/listen-options.md + - archive/20.04/modules.md + - archive/20.04/toplevel.md + - "20.03": + - archive/20.03/index.md + - "20.02": + - archive/20.02/index.md + - "20.01": + - archive/20.01/index.md + - archive/20.01/upgrade.md + - "Older releases": + - archive/older-releases/from_19.05_to_19.08.md + - archive/older-releases/from_19.02_to_19.05.md + - archive/older-releases/from_18.12_to_19.02.md + - archive/older-releases/from_18.09_to_18.12.md + - archive/older-releases/from_18.06_to_18.09.md + - archive/older-releases/from_18.04_to_18.06.md + - archive/older-releases/from_18.03_to_18.04.md + - archive/older-releases/from_18.01_to_18.03.md + - archive/older-releases/from_17.11_to_18.01.md + - archive/older-releases/from_17.09_to_17.11.md + - archive/older-releases/from_17.06_to_17.09.md + - archive/older-releases/from_17.03_to_17.06.md + - archive/older-releases/from_16.08_to_17.03.md + - archive/older-releases/from_16.06_to_16.08.md + - archive/older-releases/from_16.04_to_16.06.md + - archive/older-releases/from_16.03_to_16.04.md + - archive/older-releases/from_16.02_to_16.03.md + - archive/older-releases/from_15.11_to_16.02.md + - archive/older-releases/from_2.1.1x_to_16.02.md + - Configure 20.03: archive/old.md + - ChangeLog: CHANGELOG.md + - Roadmap: + - roadmap/index.md + +not_in_nav: | + index.md + admin/upgrade/from*.md + admin/ejabberdctl/index.md + admin/guide/index.md + admin/index.md + admin/configuration/old.md + admin/ejabberdctl/muc-admin.md + admin/guide/unattended.md + admin/guide/xep/index.md + README-HUB.md + developer/extending-ejabberd/index.md + developer/hosts.md + developer/xmpp-clients-bots/index.md + +# admin/ejabberdctl/index.md # just a list of subsections +# admin/guide/index.md # just a list of subsections +# admin/index.md # just a list of subsections +# admin/configuration/old.md # archived in April 2020, only relevant for ejabberd older than 20.01 +# admin/ejabberdctl/muc-admin.md # seems obsolete, as nowadays we have full API section +# admin/guide/unattended.md # seems obsolete, as it documents Bitrock installers +# admin/guide/xep/index.md # seems mostly useless nowadays + +# vim: foldmarker=#',#. foldmethod=marker: diff --git a/overrides/assets/stylesheets/custom.css b/overrides/assets/stylesheets/custom.css new file mode 100644 index 00000000..2e608097 --- /dev/null +++ b/overrides/assets/stylesheets/custom.css @@ -0,0 +1,373 @@ +.md-typeset .twitter { + color: #00acee +} + +.md-typeset .mdx-video { + width: auto +} + +.md-typeset .mdx-video__inner { + height: 0; + padding-bottom: 56.138%; + position: relative; + width: 100% +} + +.md-typeset .mdx-video iframe { + border: none; + height: 100%; + left: 0; + overflow: hidden; + position: absolute; + top: 0; + width: 100% +} + +.md-typeset .mdx-heart { + animation: heart 1s infinite +} + +.md-typeset .mdx-insiders { + color: #e91e63 +} + +.md-typeset .mdx-switch button { + cursor: pointer; + transition: opacity .25s +} + +.md-typeset .mdx-switch button:focus, +.md-typeset .mdx-switch button:hover { + opacity: .75 +} + +.md-typeset .mdx-switch button>code { + background-color: var(--md-primary-fg-color); + color: var(--md-primary-bg-color); + display: block +} + +.md-typeset .mdx-deprecated { + opacity: .5; + transition: opacity .25s +} + +.md-typeset .mdx-deprecated:focus-within, +.md-typeset .mdx-deprecated:hover { + opacity: 1 +} + +.md-typeset .mdx-columns ol, +.md-typeset .mdx-columns ul { + column-count: 2 +} + +@media screen and (max-width:29.9375em) { + + .md-typeset .mdx-columns ol, + .md-typeset .mdx-columns ul { + columns: initial + } +} + +.md-typeset .mdx-columns li { + break-inside: avoid +} + +.md-typeset .mdx-author { + display: flex; + font-size: .68rem +} + +.md-typeset .mdx-author img { + border-radius: 100%; + height: 2rem +} + +.md-typeset .mdx-author p:first-child { + flex-shrink: 0; + margin-right: .8rem +} + +.md-typeset .mdx-author p>span { + display: block +} + +.md-banner a, +.md-banner a:focus, +.md-banner a:hover { + color: currentcolor +} + +.md-banner strong { + white-space: nowrap +} + +[dir=ltr] .md-banner .twitter { + margin-left: .2em +} + +[dir=rtl] .md-banner .twitter { + margin-right: .2em +} + +.mdx-container { + background: url("data:image/svg+xml;utf8,") no-repeat bottom, linear-gradient(to bottom, var(--md-primary-fg-color), #005eff 99%, var(--md-default-bg-color) 99%); + padding-top: 1rem +} + +[data-md-color-scheme=slate] .mdx-container { + background: url("data:image/svg+xml;utf8,") no-repeat bottom, linear-gradient(to bottom, var(--md-primary-fg-color), #005eff 99%, var(--md-default-bg-color) 99%) +} + +.mdx-hero { + color: var(--md-primary-bg-color); + margin: 0 .8rem +} + +.mdx-hero h1 { + color: currentcolor; + font-weight: 700; + margin-bottom: 1rem +} + +@media screen and (max-width:29.9375em) { + .mdx-hero h1 { + font-size: 1.4rem + } +} + +.mdx-hero__content { + padding-bottom: 6rem +} + +@media screen and (min-width:60em) { + .mdx-hero { + align-items: stretch; + display: flex + } + + .mdx-hero__content { + margin-top: 3.5rem; + max-width: 19rem; + padding-bottom: 14vw + } + + .mdx-hero__image { + order: 1; + transform: translateX(4rem); + width: 38rem + } +} + +@media screen and (min-width:76.25em) { + .mdx-hero__image { + transform: translateX(8rem) + } +} + +.mdx-hero .md-button { + color: var(--md-primary-bg-color); + margin-right: .5rem; + margin-top: .5rem +} + +.mdx-hero .md-button:focus, +.mdx-hero .md-button:hover { + background-color: var(--md-accent-fg-color); + border-color: var(--md-accent-fg-color); + color: var(--md-accent-bg-color) +} + +.mdx-hero .md-button--primary { + background-color: var(--md-primary-bg-color); + border-color: var(--md-primary-bg-color); + color: #2977ff +} + +.md-typeset .mdx-iconsearch { + background-color: var(--md-default-bg-color); + border-radius: .1rem; + box-shadow: var(--md-shadow-z1); + position: relative; + transition: box-shadow 125ms +} + +.md-typeset .mdx-iconsearch:focus-within, +.md-typeset .mdx-iconsearch:hover { + box-shadow: var(--md-shadow-z2) +} + +.md-typeset .mdx-iconsearch .md-input { + background: var(--md-default-bg-color); + box-shadow: none +} + +[data-md-color-scheme=slate] .md-typeset .mdx-iconsearch .md-input { + background: var(--md-code-bg-color) +} + +.md-typeset .mdx-iconsearch-result { + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + max-height: 50vh; + overflow-y: auto; + scrollbar-color: var(--md-default-fg-color--lighter) #0000; + scrollbar-width: thin; + touch-action: pan-y +} + +.md-tooltip .md-typeset .mdx-iconsearch-result { + max-height: 10.25rem +} + +.md-typeset .mdx-iconsearch-result::-webkit-scrollbar { + height: .2rem; + width: .2rem +} + +.md-typeset .mdx-iconsearch-result::-webkit-scrollbar-thumb { + background-color: var(--md-default-fg-color--lighter) +} + +.md-typeset .mdx-iconsearch-result::-webkit-scrollbar-thumb:hover { + background-color: var(--md-accent-fg-color) +} + +.md-typeset .mdx-iconsearch-result__meta { + color: var(--md-default-fg-color--lighter); + font-size: .64rem; + position: absolute; + right: .6rem; + top: .4rem +} + +[dir=ltr] .md-typeset .mdx-iconsearch-result__list { + margin-left: 0 +} + +[dir=rtl] .md-typeset .mdx-iconsearch-result__list { + margin-right: 0 +} + +.md-typeset .mdx-iconsearch-result__list { + list-style: none; + margin: 0; + padding: 0 +} + +[dir=ltr] .md-typeset .mdx-iconsearch-result__item { + margin-left: 0 +} + +[dir=rtl] .md-typeset .mdx-iconsearch-result__item { + margin-right: 0 +} + +.md-typeset .mdx-iconsearch-result__item { + border-bottom: .05rem solid var(--md-default-fg-color--lightest); + margin: 0; + padding: .2rem .6rem +} + +.md-typeset .mdx-iconsearch-result__item:last-child { + border-bottom: none +} + +.md-typeset .mdx-iconsearch-result__item>* { + margin-right: .6rem +} + +.md-typeset .mdx-iconsearch-result__item img { + height: .9rem; + width: .9rem +} + +[data-md-color-scheme=slate] .md-typeset .mdx-iconsearch-result__item img[src*=squidfunk] { + filter: invert(1) +} + +.md-typeset .mdx-premium p { + margin: 2em 0; + text-align: center +} + +.md-typeset .mdx-premium img { + height: 3.25rem +} + +.md-typeset .mdx-premium p:last-child { + display: flex; + flex-wrap: wrap; + justify-content: center +} + +.md-typeset .mdx-premium p:last-child>a { + display: block; + flex-shrink: 0 +} + +.md-typeset .mdx-sponsorship__list { + margin: 2em 0 +} + +.md-typeset .mdx-sponsorship__list:after { + clear: both; + content: ""; + display: block +} + +[dir=ltr] .md-typeset .mdx-sponsorship__item { + float: left +} + +[dir=rtl] .md-typeset .mdx-sponsorship__item { + float: right +} + +.md-typeset .mdx-sponsorship__item { + border-radius: 100%; + display: block; + height: 1.6rem; + margin: .2rem; + overflow: hidden; + transform: scale(1); + transition: color 125ms, transform 125ms; + width: 1.6rem +} + +.md-typeset .mdx-sponsorship__item:focus, +.md-typeset .mdx-sponsorship__item:hover { + transform: scale(1.1) +} + +.md-typeset .mdx-sponsorship__item:focus img, +.md-typeset .mdx-sponsorship__item:hover img { + filter: grayscale(0) +} + +.md-typeset .mdx-sponsorship__item--private { + background: var(--md-default-fg-color--lightest); + color: var(--md-default-fg-color--lighter); + font-size: .6rem; + font-weight: 700; + line-height: 1.6rem; + text-align: center +} + +.md-typeset .mdx-sponsorship__item img { + display: block; + filter: grayscale(100%) opacity(75%); + height: auto; + transition: filter 125ms; + width: 100% +} + +.md-typeset .mdx-sponsorship-button { + font-weight: 400 +} + +.md-typeset .mdx-sponsorship-count, +.md-typeset .mdx-sponsorship-total { + font-weight: 700 +} \ No newline at end of file diff --git a/overrides/assets/stylesheets/home.css b/overrides/assets/stylesheets/home.css new file mode 100644 index 00000000..c006451b --- /dev/null +++ b/overrides/assets/stylesheets/home.css @@ -0,0 +1,487 @@ +.mdx-parallax { + height: 100vh; + margin-top: -2.4rem; + overflow-x: hidden; + overflow-y: auto; + overscroll-behavior-y: none; + perspective: var(--md-parallax-perspective); + scroll-behavior: smooth; + width: 100vw +} + +.mdx-parallax__group { + background-color: var(--md-default-bg-color); + color: var(--md-typeset-color); + display: block; + position: relative; + transform-style: preserve-3d +} + +.mdx-parallax__group:first-child { + background-color: initial; + contain: strict; + height: 140vh +} + +.safari .mdx-parallax__group:first-child { + contain: none +} + +@media (min-width:125vh) { + .mdx-parallax__group:first-child { + height: 120vw + } +} + +@media (min-width:137.5vh) { + .mdx-parallax__group:first-child { + height: 125vw + } +} + +@media (min-width:150vh) { + .mdx-parallax__group:first-child { + height: 130vw + } +} + +@media (min-width:162.5vh) { + .mdx-parallax__group:first-child { + height: 135vw + } +} + +@media (min-width:175vh) { + .mdx-parallax__group:first-child { + height: 140vw + } +} + +@media (min-width:187.5vh) { + .mdx-parallax__group:first-child { + height: 145vw + } +} + +@media (min-width:200vh) { + .mdx-parallax__group:first-child { + height: 150vw + } +} + +.mdx-parallax__group:last-child { + background-color: var(--md-default-bg-color) +} + +.mdx-parallax__layer { + height: max(120vh, 100vw); + pointer-events: none; + position: absolute; + top: 0; + transform: translateZ(calc(var(--md-parallax-perspective)*var(--md-parallax-depth)*-1)) scale(calc(var(--md-parallax-depth) + 1)); + transform-origin: 50vw 50vh; + width: 100vw; + z-index: calc(10 - var(--md-parallax-depth, 0)) +} + +.mdx-parallax__image { + display: block; + height: 100%; + object-fit: cover; + object-position: var(--md-image-position, 50%); + position: absolute; + width: 100%; + z-index: -1 +} + +.mdx-parallax__blend { + background-image: linear-gradient(to bottom, #0000, var(--md-default-bg-color)); + bottom: 0; + height: min(100vh, 100vw); + top: auto +} + +.mdx-content__column:last-child { + margin-top: 2.4rem +} + +.mdx-content__column p:last-child { + margin-bottom: 0 +} + +@media screen and (min-width:60em) { + .mdx-content__inner { + display: flex; + flex-wrap: nowrap; + gap: 6.4rem + } + + .mdx-content__column { + margin-top: 0 + } + + .mdx-content__column:first-child { + flex: 2 0 + } + + .mdx-content__column:last-child { + flex: 1 0; + margin-top: 0 + } +} + +.mdx-connect { + display: block; + transition: transform .75s cubic-bezier(.075, .85, .175, 1) 125ms, opacity .75s 125ms +} + +.js .mdx-connect[hidden] { + opacity: 0; + transform: translateY(1.6rem) +} + +.mdx-connect .mdx-connect__link { + color: var(--md-default-fg-color); + display: block +} + +.mdx-connect .mdx-connect__link span { + margin-right: .2rem +} + +.mdx-expect { + margin: 2.4rem 0 +} + +.mdx-expect__list { + display: flex; + flex-flow: row wrap; + gap: 1.6rem; + padding: 0 +} + +.mdx-expect__item { + display: flex; + flex: 1 0 48%; + gap: .6rem; + margin: 0; + transition: transform .75s cubic-bezier(.075, .85, .175, 1), opacity .75s +} + +.mdx-expect__item:first-child { + transition-delay: .2s +} + +.mdx-expect__item:nth-child(2) { + transition-delay: 275ms +} + +.mdx-expect__item:nth-child(3) { + transition-delay: .35s +} + +.mdx-expect__item:nth-child(4) { + transition-delay: 425ms +} + +.mdx-expect__item:nth-child(5) { + transition-delay: .5s +} + +.mdx-expect__item:nth-child(6) { + transition-delay: 575ms +} + +.js .mdx-expect__item[hidden] { + opacity: 0; + transform: translate(-.8rem, .4rem) +} + +.js .mdx-expect__item[hidden]:nth-child(2n) { + transform: translate(.8rem, .4rem) +} + +.mdx-expect__icon { + fill: currentcolor; + background-color: var(--md-default-fg-color--lightest); + border-radius: 100%; + flex-shrink: 0; + height: 2.2rem; + padding: .4rem; + width: 2.2rem +} + +.mdx-expect__description>:last-child { + margin-bottom: 0 +} + +@media screen and (max-width:76.1875em) { + .mdx-expect__description>:last-child { + margin-left: -2.8rem + } +} + +.mdx-hero__scrollwrap { + height: 100vh; + margin-bottom: -100vh; + position: -webkit-sticky; + position: sticky; + top: 0; + z-index: 9 +} + +.mdx-hero__inner { + bottom: 3.2rem; + display: block; + position: absolute; + transition: transform .4s cubic-bezier(.1, .7, .1, 1), opacity .25s; + width: 100% +} + +@media screen and (max-width:44.9375em) { + .mdx-hero__inner { + bottom: 6.4rem + } +} + +.mdx-hero__teaser { + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + color: var(--md-primary-bg-color); + margin: 0 .8rem; + max-width: 24rem +} + +.mdx-hero__teaser h1 { + color: inherit; + font-weight: 700; + margin-bottom: 0 +} + +.mdx-hero__teaser :not(.md-button) { + text-shadow: 0 0 .2rem #211d2dcc +} + +.mdx-hero .mdx-hero__attribution { + background-color: var(--md-default-bg-color--light); + border-radius: .1rem; + bottom: -2.4rem; + color: var(--md-default-fg-color); + font-size: .5rem; + padding: .1rem .4rem; + position: absolute; + right: .8rem; + transition: color 125ms, background-color 125ms +} + +.mdx-hero .mdx-hero__attribution:-webkit-any(:focus, :hover) { + background-color: var(--md-accent-fg-color); + color: var(--md-accent-bg-color) +} + +.mdx-hero .mdx-hero__attribution:-moz-any(:focus, :hover) { + background-color: var(--md-accent-fg-color); + color: var(--md-accent-bg-color) +} + +.mdx-hero .mdx-hero__attribution:is(:focus, :hover) { + background-color: var(--md-accent-fg-color); + color: var(--md-accent-bg-color) +} + +.mdx-hero__more { + bottom: -2.4rem; + display: block; + left: 50%; + margin-left: -.6rem; + pointer-events: none; + position: absolute; + text-align: center +} + +.mdx-hero__more svg { + fill: #fff; + height: 1.2rem; + width: 1.2rem +} + +.mdx-spotlight { + margin: 2em 0 +} + +.mdx-spotlight__feature { + display: flex; + flex: 1 0 48%; + flex-flow: row nowrap; + gap: 3.2rem; + margin: 0 0 3.2rem +} + +@media screen and (max-width:59.9375em) { + .mdx-spotlight__feature { + flex-direction: column; + gap: 0 + } +} + +@media screen and (min-width:60em) { + .mdx-spotlight__feature:nth-child(odd) { + flex-direction: row-reverse + } +} + +.mdx-spotlight__feature:last-child { + margin-bottom: 1em +} + +.mdx-spotlight__feature>a { + display: block; + flex-shrink: 0; + transition: transform .5s cubic-bezier(.075, .85, .175, 1) +} + +@media screen and (max-width:59.9375em) { + .mdx-spotlight__feature>a { + margin-left: auto; + margin-right: auto + } +} + +.mdx-spotlight__feature>a:hover { + transform: scale(1.025) +} + +.mdx-spotlight__feature a>img { + border-radius: .2rem; + box-shadow: var(--md-shadow-z2); + display: block; + height: auto; + max-width: 100%; + width: 25rem +} + +.mdx-spotlight__feature a>img, +.mdx-spotlight__feature figcaption { + transition: transform .75s cubic-bezier(.075, .85, .175, 1) 125ms, opacity .75s 125ms +} + +.mdx-spotlight__feature figcaption { + margin-top: .8rem +} + +.js .mdx-spotlight__feature[hidden]>a>img { + opacity: 0; + transform: translateY(1.6rem) +} + +.js .mdx-spotlight__feature[hidden]>figcaption { + opacity: 0; + transform: translateX(1.6rem) +} + +.js .mdx-spotlight__feature[hidden]:nth-child(2n)>figcaption { + transform: translateX(-1.6rem) +} + +.mdx-trust { + display: block; + max-width: 40rem; + transition: transform .75s cubic-bezier(.075, .85, .175, 1) 125ms, opacity .75s 125ms +} + +.js .mdx-trust[hidden] { + opacity: 0; + transform: translateY(1.6rem) +} + +.mdx-users { + display: flex; + gap: 3.2rem; + margin: 2.4rem 0 +} + +@media screen and (max-width:59.9375em) { + .mdx-users { + flex-direction: column + } +} + +.mdx-users__testimonial { + display: flex; + flex: 1; + flex-direction: column; + gap: 1.2rem; + margin: 0; + text-align: center +} + +.mdx-users__testimonial:first-child { + transition-delay: .2s +} + +.mdx-users__testimonial:nth-child(2) { + transition-delay: 275ms +} + +.mdx-users__testimonial:nth-child(3) { + transition-delay: .35s +} + +.mdx-users__testimonial img { + border-radius: 5rem; + height: auto; + margin-left: auto; + margin-right: auto; + width: 10rem +} + +.mdx-users__testimonial figcaption, +.mdx-users__testimonial img { + transition: transform .75s cubic-bezier(.075, .85, .175, 1), opacity .75s; + transition-delay: inherit +} + +.mdx-users__testimonial figcaption { + display: block +} + +.mdx-users__testimonial hr { + margin-left: auto; + margin-right: auto; + width: 5rem +} + +.mdx-users__testimonial cite { + display: block; + -webkit-hyphens: auto; + hyphens: auto; + text-align: justify +} + +.js .mdx-users__testimonial[hidden] img { + opacity: 0; + transform: scale(.75) +} + +.js .mdx-users__testimonial[hidden] figcaption { + opacity: 0; + transform: translateY(1.6rem) +} + +@media screen and (min-width:60em) { + .md-sidebar--secondary { + display: none + } +} + +@media screen and (min-width:76.25em) { + .md-sidebar--primary { + display: none + } +} + +.md-tabs { + background-color: initial; + position: absolute; + top: 2.4rem +} \ No newline at end of file diff --git a/overrides/home.html b/overrides/home.html new file mode 100644 index 00000000..8c5d1e7e --- /dev/null +++ b/overrides/home.html @@ -0,0 +1,276 @@ +{% extends "main.html" %} + +{% block tabs %} {{ super() }} + + + + +
+
+
+
+
+ +
+
+ ejabberd Docs +

Dive into a wealth of knowledge to master all aspects of ejabberd Community Server. + From setup to optimization, discover everything you need to know about configuring and deploying your + messaging server. +

+ Get Started + What's new? +

+

+ ejabberd is an open-source, robust, scalable and + extensible realtime + platform built using Erlang/OTP, that includes XMPP Server, + MQTT Broker and SIP Service. +

+
+
+
+
+ +
+
+
+
+
    +
  • +
    + earth +
    +
    +

    Overview

    +

    Get an Overview of ejabberd, + its features, + some big use cases, + its license, + and finally enter a Quickstart

    +
    +
  • + +
  • +
    + folder-download-outline +
    +
    +

    Install

    +

    You have many ways to install ejabberd: + using containers, + binary installers, ... + or compile it yourself from the source code. +

    +
    +
  • + +
  • +
    + tune-vertical +
    +
    +

    Configure

    +

    Once you have ejabberd up and running, it's time to configure to + suit your needs, + like setting up + authentication, + databases, + ldap. + Then setup listeners, + top-level and + modules options. +

    +
    +
  • +
  • +
    + hammer-screwdriver +
    +
    +

    Advanced

    +

    Some time happy with it, and it's time to dive into advanced administration + features like + clustering, + managing, + security, + upgrading to a new release. + Check also the tutorials. +

    +
    +
  • +
  • +
    + sprout-outline +
    +
    +

    Development

    +

    The development section includes details about ejabberd architecture, and how to + extend it in various forms.

    +
    +
  • +
  • +
    + connection +
    +
    +

    API

    +

    ejabberd provides a comprehensive ReST API, check its + API Reference + Tags, + and learn how to configure it. +

    +
    +
  • +
  • +
    + map-search-outline +
    +
    +

    Archive and Roadmap

    +

    View the archived documentation of previous ejabberd releases, and the plans for the future.

    +
    +
  • +
  • +
    + book-open-variant-outline +
    +
    +

    Offline / Portable Documentation

    +

    In addition to view this site online, you can download it as a pdf + and as a static site in zip. +

    +
    +
  • +
+
+
+
+
+
+ +
+
+ +{% endblock %} + +{% block footer %} +{{ super() }} +{% endblock %} diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..baecdf6a --- /dev/null +++ b/requirements.txt @@ -0,0 +1,6 @@ +mkdocs +mkdocs-htmlproofer-plugin +mkdocs-material +mkdocs-redirects +mkdocs-with-pdf +pymdown-extensions diff --git a/shortcodes.py b/shortcodes.py new file mode 100644 index 00000000..4328a5ea --- /dev/null +++ b/shortcodes.py @@ -0,0 +1,80 @@ +## File coopied from +## https://github.com/squidfunk/mkdocs-material/tree/master/material/overrides/hooks + +# Copyright (c) 2016-2024 Martin Donath + +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. + +from __future__ import annotations + +import posixpath +import re + +from mkdocs.config.defaults import MkDocsConfig +from mkdocs.structure.files import File, Files +from mkdocs.structure.pages import Page +from re import Match + +# ----------------------------------------------------------------------------- +# Hooks +# ----------------------------------------------------------------------------- + +# @todo +def on_page_markdown( + markdown: str, *, page: Page, config: MkDocsConfig, files: Files +): + + # Replace callback + def replace(match: Match): + type, args = match.groups() + args = args.strip() + if type == "version": + return _badge_for_version(args, page, files) + + # Otherwise, raise an error + raise RuntimeError(f"Unknown shortcode: {type}") + + # Find and replace all external asset URLs in current page + return re.sub( + r"", + replace, markdown, flags = re.I | re.M + ) + +# Create badge +def _badge(icon: str, text: str = "", type: str = ""): + classes = f"mdx-badge mdx-badge--{type}" if type else "mdx-badge" + return "".join([ + f"", + *([f"{icon}"] if icon else []), + f" ", + *([f"{text}"] if text else []), + f"", + ]) + +# Create badge for version +def _badge_for_version(text: str, page: Page, files: Files): + spec = text + path = f"changelog/index.md#{spec}" + + # Return badge + icon = "material-tag-outline" + return _badge( + icon = f":{icon}:", + text = f"{text}" if spec else "" + )