Nextcloud Talk HPB Multi-tenant Setup – Configuration for Multiple Subdomains

I’m running a multi-tenant Nextcloud instance where each client has their own subdomain:

  • client1.example.com
  • client2.example.com
  • client3.example.com

Current Setup:

  • HPB (High Performance Backend) deployed at: https://signal.example.com
  • Works perfectly when NC_DOMAIN is set to a single domain (e.g., client1.example.com).

Problem:

When I try to configure multiple domains in NC_DOMAIN like:

  • NC_DOMAIN=client1.example.com,client2.example.com,client3.example.com
  • OR using a wildcard: NC_DOMAIN=*.example.com

The HPB fails to connect with the following errors:
:cross_mark: Bad hostname (subdomain)
:cross_mark: Cannot connect to server

Questions:

  1. How should HPB be configured to support multiple subdomains?
  2. What is the correct format for NC_DOMAIN when using multiple domains? (Comma-separated? Wildcard?)
  3. Does *.example.com wildcard syntax work in NC_DOMAIN?
  4. Do I need separate HPB instances per domain, or is a shared HPB possible?

Additional Info:

  • Nextcloud version: [Your Version]
  • HPB setup: [Docker/Manual?]
  • Reverse proxy/load balancer in use? (e.g., Nginx, Apache, Cloudflare)

Any help, examples, or references would be greatly appreciated! :folded_hands:

Hey @gokul, if you’re referring to this setup example;

you could try something like this for a multi-tenant setup.

HPB for Talk in Nextcloud with Docker, multi-tenant setup example with docker

`name: 'hpb'

services:

  nc-talk-1:
    container_name: nc_talk_1
    image: ghcr.io/nextcloud-releases/aio-talk:latest
    init: true
    ports:
      - 3478:3478/tcp
      - 3478:3478/udp
      - 8181:8081/tcp
    environment:
      - NC_DOMAIN=cloud.domain1.tld
      - TALK_HOST=signal1.somedomain.tld
      - TURN_SECRET=secret
      - SIGNALING_SECRET=secret
      - TZ=Pacific/Auckland
      - TALK_PORT=3478
      - INTERNAL_SECRET=secret
    restart: unless-stopped

  nc-talk-2:
    container_name: nc_talk_2
        image: ghcr.io/nextcloud-releases/aio-talk:latest
    init: true
    ports:
      - 3479:3478/tcp
      - 3479:3478/udp
      - 8281:8081/tcp
    environment:
      - NC_DOMAIN=cloud.domain2.tld
      - TALK_HOST=signal2.somedomain.tld
      - TURN_SECRET=secret
      - SIGNALING_SECRET=secret
      - TZ=Europe/Berlin
      - TALK_PORT=3478
      - INTERNAL_SECRET=secret
    restart: unless-stopped

Hi,

Thanks for the suggestion — I’ve already tried using NC_DOMAIN=client1.example.com, and it works fine for a single domain. However, the proposed solution of running one HPB instance per domain is not scalable for our use case.

We’re running a multi-tenant Nextcloud deployment where each client has their own subdomain, and the number of clients is growing. Maintaining a separate HPB container for every subdomain quickly becomes unmanageable and resource-heavy.

What we need is a scalable setup with:

  • One shared HPB instance
  • Support for multiple subdomains
  • Possibly through wildcard domain support (e.g., *.example.com)
  • Or at least relaxed hostname validation in HPB or an official method to proxy all requests properly

Please let me know if:

  • There is an official or unofficial workaround for this
  • Wildcard support is on the roadmap
  • Disabling or customizing the hostname check is safe and recommended in production

We’re happy to explore reverse proxy-based solutions or even patching if required, but official support for multi-subdomain HPB would make scaling much smoother.

Thanks!
Gokul

I’m not aware of an official workaround for this (talking about aio-talk).
But you can workaround by creating your own start.sh with multiple backends. Just add your backends to it and use this modified start.sh as entrypoint of your container.

If you are using a modified entrypoint, you’ll probably need to add supervisord CMD to your docker run too.

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