Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ejabberd docker with Tailscale + serve.json #119

Open
A4alli opened this issue Dec 25, 2024 · 1 comment
Open

ejabberd docker with Tailscale + serve.json #119

A4alli opened this issue Dec 25, 2024 · 1 comment

Comments

@A4alli
Copy link

A4alli commented Dec 25, 2024

hello ejabberd Dev and community. I managed to run ejabberd docker with Tailscale. I can login to admin portal page but cannot connect to the server with conversations app. here are the compose.yml and serve.json. I know I have missed things which I need a guidance KINDLY

compose.yml

services:
  xmpp-tailscale:
    image: tailscale/tailscale:latest
    container_name: xmpp-tailscale
    cap_add:
      - NET_ADMIN
    hostname: chat
    environment:
      - TS_AUTHKEY=xyz
      - TS_AUTH_ONCE=true
      - TS_SERVE_CONFIG=/config/serve.json
      - TS_STATE_DIR=/var/lib/tailscale
      - TS_CERT_DOMAIN=chat.forest-gentoo.ts.net
    networks:
      - xmpp
    restart: always
    volumes:
      - xmpp-tailscale-data:/var/lib/tailscale
      - ./serve_config/tailscale:/config

  xmpp-server:
    image: ejabberd/ecs
    container_name: xmpp-server
    volumes:
      - './ejabberd.yml:/home/ejabberd/conf/ejabberd.yml'
    restart: always
    ports:
      - 5443:5443
      - 5280:5280
    networks:
      - xmpp
    depends_on:
      - xmpp-tailscale

networks:
  xmpp:

volumes:
  xmpp-tailscale-data:

serve.json

{
  "TCP": {
    "5443": {
      "HTTPS": true
    },
    "5280": {
      "HTTPS": true
    }
  },
  "Web": {
    "${TS_CERT_DOMAIN}:5443": {
      "Handlers": {
        "/": {
          "Proxy": "http://xmpp-server:5443"
        }
      }
    }
  }
}

kindly need suggestion

@badlop
Copy link
Member

badlop commented Dec 30, 2024

Conversations is a XMPP client that connects to the server using the C2S standard port, that is 5222, see firewall settings. This is also mentioned in the ecs documentation and in the minimal example compose file.

You should expose 5222.

Additionally, if you want your ejabberd server to communicate with other XMPP servers, then you should expose also the 5269 port.

Once you get it working, try the ejabberd's WebAdmin in port 5443. If that works correctly for you, probably you can remove the port 5280, as that one usually has encryption disabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants