Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7693439
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T21:05:20+00:00 2026-05-31T21:05:20+00:00

I am having trouble setting up ejabberd to use PostgreSQL. My environment is OSX

  • 0

I am having trouble setting up ejabberd to use PostgreSQL. My environment is OSX for development and a Debian server for production.

The OSX story goes as follows:
ejabberd is compiled from source with odbc support. erlang is installed through macports.
First problem I encountered was the psql modules for erlang. In the docs it’s mentioned to compile them from a non-existing svn location. I copied from the binary installation the relevant .beam to my ejabberd lib which seems to work fine.

My ejabberd configuration is deliberately minimal and at the moment only does authentication through odbc with the native pgsql driver. However, while ejabberd starts cleanly it never actually creates the table structure. In processone’s repo there is pg.sql but with a big warning about it being obsolete and mentioning that the tables will be created automatically. How and when does that happen? I can verify that for instance trying to authenticate does send queries to postgresql, but since there are no tables there, it errors out…

ejabberd config follows:

{loglevel, 4}.

{hosts, ["localhost"]}.

{listen,
  [

  {{5222, {127, 0, 0, 1}}, ejabberd_c2s, [
      {access, c2s},
      {shaper, c2s_shaper},
      {max_stanza_size, 65536}
           ]},

  {{5269, {127, 0, 0, 1}}, ejabberd_s2s_in, [
         {shaper, s2s_shaper},
         {max_stanza_size, 131072}
        ]},

  {{5280, {127, 0, 0, 1}}, ejabberd_http, [
       http_bind,
       web_admin
      ]}

 ]}.

{odbc_server, {pgsql, "localhost", "ejabberd", "ejabberd", "ejabberd"}}.

{auth_method, [odbc]}.

{shaper, normal, {maxrate, 1000}}.
{shaper, fast, {maxrate, 50000}}.

{host_config, "localhost", [{acl, admin, {user, "admin", "localhost"}}]}.

{acl, local, {user_regexp, ""}}.

{access, max_user_sessions, [{10, all}]}.

{access, local, [{allow, local}]}.

{access, c2s, [{deny, blocked},
         {allow, all}]}.

{access, c2s_shaper, [{none, admin},
          {normal, all}]}.

{access, s2s_shaper, [{fast, all}]}.

{access, announce, [{allow, admin}]}.

{access, configure, [{allow, admin}]}.

{access, muc_admin, [{allow, admin}]}.

{access, muc, [{allow, all}]}.
{access, muc_create, [{allow, local}]}.

{access, register, [{allow, all}]}.

{access, pubsub_createnode, [{allow, local}]}.


{language, "en"}.

{modules,
 [
  {mod_adhoc,    []},
  {mod_announce, [{access, announce}]},
  {mod_caps,     []},
  {mod_configure,[]},
  {mod_disco,    []},
  {mod_http_bind,[]},
  {mod_last,     []},
  {mod_offline,  []},
  {mod_privacy,  []},
  {mod_private,  []},
  {mod_pubsub,   [
      {access_createnode, pubsub_createnode},
      {ignore_pep_from_offline, false},
      {last_item_cache, false},
      {nodetree, "dag"},
      {plugins, ["dag", "flat", "hometree", "pep"]},
      {max_items_node, 1000}
     ]},
  {mod_register, [
      {welcome_message, {"Welcome!",
             "Welcome to localhost Jabber server."}},
      {access, register}
     ]},
  {mod_roster,   []},
  {mod_shared_roster,[]},
  {mod_time,     []},
  {mod_vcard,    []},
  {mod_version,  []}
 ]}.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T21:05:21+00:00Added an answer on May 31, 2026 at 9:05 pm

    Right, this is mostly for documentation after I figured this out eventually… Hopefully it’s useful for others with similar trouble. It applies for ejabberd 2.1.*, certainly not for the 3 series.

    1. I had to use PostgreSQL < 9.0, in particular I used 8.4. This is because quotes are escaped as \' by ejabberd which does not go well in the 9.* series of PostgreSQL.
    2. You need to have subversion and erlang-tools installed for the next step.
    3. You get the drivers for pgsql from http://svn.process-one.net/ejabberd-modules/pgsql/trunk/
      Compile and copy to path/lib/ejabberd/ebin
    4. You create the db and import this file to create the table structure. Ignore that the file says it’s obsolete, ejabberd does not create the structure for you.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having trouble setting up a clean development environment with all the web sites
I'm having trouble setting up a new server using Moonshine and Capistrano. It seems
I am having trouble setting the type of a String, it goes like public
I'm having trouble setting fixed widths on columns which use colspan . It seems
I am having trouble setting up this Dynamic Linq Library so i can use
I am having trouble setting the path to jquery in an mvc app. In
We're having trouble setting window captions using cyrillic or japanese characters. We either see
I am having trouble setting my ContentProperty to Text. The error I am given
I'm having trouble setting up my svn. I used apt-get install subversion to install
I'm having trouble setting the command-line arguments in Eclipse. I've searched around the Internet

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.