The Lounge - self-hosted web IRC client

The Lounge is a self-hosted web IRC client.

Follow this guide to integrate it in your Docker Swarm mode cluster deployed as described in with a global Traefik HTTPS proxy.


  • Connect via SSH to a Docker Swarm manager node.

  • Create an environment variable with the domain where you want to access your instance, e.g.:

  • Make sure that your DNS records point that domain (e.g. to one of the IPs of the Docker Swarm mode cluster.

  • Get the Swarm node ID of this node (or any other node) and store it in an environment variable:

export NODE_ID=$(docker info -f '{{.Swarm.NodeID}}')
  • Create a tag in this node, so that the data used by The Lounge is always deployed to the same node and uses the existing volume:
docker node update --label-add thelounge.thelounge-data=true $NODE_ID

Create the Docker Compose file

  • Download the file thelounge.yml:
curl -L -o thelounge.yml
  • ...or create it manually, for example, using nano:
nano thelounge.yml
  • And copy the contents inside:
version: '3.3'

    image: thelounge/thelounge:latest
      - thelounge-data:/var/opt/thelounge
      - traefik-public
          - node.labels.thelounge.thelounge-data == true
        - traefik.enable=true
        - traefik.constraint-label=traefik-public
        - traefik.http.routers.thelounge-http.rule=Host(`${DOMAIN?Variable not set}`)
        - traefik.http.routers.thelounge-http.entrypoints=http
        - traefik.http.routers.thelounge-http.middlewares=https-redirect
        - traefik.http.routers.thelounge-https.rule=Host(`${DOMAIN?Variable not set}`)
        - traefik.http.routers.thelounge-https.entrypoints=https
        - traefik.http.routers.thelounge-https.tls=true
        - traefik.http.routers.thelounge-https.tls.certresolver=le

    external: true



This is just a standard Docker Compose file.

It's common to name the file docker-compose.yml or something like docker-compose.thelounge.yml.

Here it's named just thelounge.yml for brevity.

Deploy it

Deploy the stack with:

docker stack deploy -c thelounge.yml thelounge

It will use the environment variables you created above.

Check it

  • Check if the stack was deployed with:
docker stack ps thelounge

It will output something like:

ID             NAME               IMAGE                         NODE               DESIRED STATE    CURRENT STATE          ERROR   PORT
kxdsp9f1nuil   thelounge_app.1    thelounge/thelounge:latest    Running          Running 7 seconds ago
  • You can check the logs with:
docker service logs thelounge_app might see a message like:    | 2019-05-12 09:58:42 [INFO] Configuration file created at /var/opt/thelounge/config.js.    | 2019-05-12 09:58:43 [INFO] The Lounge v3.0.1 (Node.js 10.15.1 on linux x64)    | 2019-05-12 09:58:43 [INFO] Configuration file: /var/opt/thelounge/config.js    | 2019-05-12 09:58:43 [INFO] Available at http://:::9000/ in private mode    | 2019-05-12 09:58:43 [INFO] New VAPID key pair has been generated for use with push subscription.    | 2019-05-12 09:58:43 [INFO] There are currently no users. Create one with thelounge add <name>.

Create a user

  • Now, to create a user, enter into a bash session inside the running container, type:
docker exec -it thelounge_app

and hit Tab to get autocompletion, then type bash. It would look something like:

docker exec -it thelounge_app.1.kxdsp9f1nuilj0vclhhfuc4ho bash

Then hit Enter, you will be in a bash session inside the running container.

You will see a prompt like:

  • Now create the user, if the user is named admin, it would be something like:
thelounge add admin
  • You will see a prompt for a password. Enter your password and hit Enter.
  • It will ask you if you want to save, hit Enter again and the user will be created.

Login and configure

Now you can open the URL in your browser, e.g.:

Use the user and password you just created and finish configuring it in the web browser.