Jitsi Meet Caddy Config Error!

1. The problem I’m having:

I am facing issue with Jitsi Meet while trying to reverse proxy my Jitsi Meet Docker Installation with Caddy.

2. Error messages and/or full log output:

My Jitsi Meet setup is running in the following domain

meet.finitetouchstudio.com

If anyone tries to open up a new meeting it will show an error pointing out -

Error - You have been disconnected. You May want to check your network connection.

Now I am sure that I made a mistake in my caddy config and which I cannot seem to figure out. All of the Jitsi Meet Containers are running without any error.

3. Caddy version:

v2.8.4 h1
/1nl4V4bxBrYoSoab7rL9BMYNk=

4. How I installed and ran Caddy:

Installed Caddy from Caddy Repository via apt

a. System environment:

OS: Ubuntu in digital ocean droplet

Relevant services: Caddy, Docker

Reverse proxy services for FrankenWP, phpMyAdmin, Ghost, Portainer, Rocket.Chat, and Jitsi Meet.

b. Command:

sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
sudo apt update
sudo apt install caddy -y

c. Service/unit/compose file:

My Docker Compose File (Removed the long list of environments for easier visibility) -

services:
    # Frontend
    web:
        image: jitsi/web:${JITSI_IMAGE_VERSION:-stable-9779}
        restart: ${RESTART_POLICY:-unless-stopped}
        ports:
            - '${HTTP_PORT}:80'
            - '${HTTPS_PORT}:443'
        volumes:
            - ${CONFIG}/web:/config:Z
            - ${CONFIG}/web/crontabs:/var/spool/cron/crontabs:Z
            - ${CONFIG}/transcripts:/usr/share/jitsi-meet/transcripts:Z
            - ${CONFIG}/web/load-test:/usr/share/jitsi-meet/load-test:Z
        labels:
            service: "jitsi-web"
        environment:

        networks:
            meet.jitsi:
        depends_on:
            - jvb

    # XMPP server
    prosody:
        image: jitsi/prosody:${JITSI_IMAGE_VERSION:-stable-9779}
        restart: ${RESTART_POLICY:-unless-stopped}
        expose:
            - '${XMPP_PORT:-5222}'
            - '${PROSODY_S2S_PORT:-5269}'
            - '5347'
            - '${PROSODY_HTTP_PORT:-5280}'
        labels:
            service: "jitsi-prosody"
        volumes:
            - ${CONFIG}/prosody/config:/config:Z
            - ${CONFIG}/prosody/prosody-plugins-custom:/prosody-plugins-custom:Z
        environment:

        networks:
            meet.jitsi:
                aliases:
                    - ${XMPP_SERVER:-xmpp.meet.jitsi}

    # Focus component
    jicofo:
        image: jitsi/jicofo:${JITSI_IMAGE_VERSION:-stable-9779}
        restart: ${RESTART_POLICY:-unless-stopped}
        ports:
            - '127.0.0.1:${JICOFO_REST_PORT:-8111}:8111'
        volumes:
            - ${CONFIG}/jicofo:/config:Z
        labels:
            service: "jitsi-jicofo"
        environment:

        depends_on:
            - prosody
        networks:
            meet.jitsi:

    # Video bridge
    jvb:
        image: jitsi/jvb:${JITSI_IMAGE_VERSION:-stable-9779}
        restart: ${RESTART_POLICY:-unless-stopped}
        ports:
            - '${JVB_PORT:-10002}:${JVB_PORT:-10002}/udp'
            - '127.0.0.1:${JVB_COLIBRI_PORT:-8222}:8222'
        volumes:
            - ${CONFIG}/jvb:/config:Z
        labels:
            service: "jitsi-jvb"
        environment:
                    depends_on:
            - prosody
        networks:
            meet.jitsi:

d. My complete Caddy config:

meet.finitetouchstudio.com {
# Proxy for /xmpp-websocket with WebSocket support
handle_path /xmpp-websocket* {
    reverse_proxy localhost:8111
}

# Proxy for /colibri-ws with WebSocket support
handle_path /colibri-ws* {
    reverse_proxy localhost:8222
}

# Default proxy for the root path
    reverse_proxy localhost:8000
}


5. Links to relevant resources:

Here is the link to installation guide that I am following (They have a demo Ngnix Config) -

A demo Nginx Config :

location /xmpp-websocket {
    proxy_pass http://localhost:8000/xmpp-websocket;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
}

location /colibri-ws {
    proxy_pass http://localhost:8080/colibri-ws;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
}

location / {
    proxy_pass http://localhost:8000/;
    proxy_http_version 1.1;
}

Any feedback or suggestion is appreciated.

You might want handle, not handle_path, I assume. Using handle_path strips the matched path prefix from the request. I assume the upstream might expect the path to be kept (e.g. the nginx config strips it then re-adds it… redundant).

1 Like

Thanks, it finally worked. Will try to post with my config in Showcase.
Thank you so much for your help.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.