How do I setup the WebSocket server for Whiteboard real-time collaboration?

I’m running Nextcloud Hub 10 on a VM running Rocky Linux 9. How would I go about installing and configuring the WebSocket server for the Whiteboard for this install? I’m confused by the documentation as it seems to assume that Nextcloud is running on a docker image or maybe I’m missing something there.

I’ve got an OnlyOffice server running as a separate VM, and don’t really want keep the number of support servers (OnlyOffice, HPB, etc) to a minimum.

What would be the best option for me to get this up and running?

1 Like

The easiest way is to run the Whiteboard Docker container on the same server where Nextcloud is installed. Nextcloud doesn’t need to be running in Docker for this to work.

Found my notes on the topic. I’m running Nextcloud on an Ubuntu server, a classic LAMP installation without Docker.

Install Docker:

curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh ./get-docker.sh

Open a root shell:

sudo -i

Create a directory:

mkdir /opt/docker-compose

Create .env file:

echo "WBSECRET=$(openssl rand -hex 32)" >> /opt/docker-compose/.env

Create compose.yaml:

nano /opt/docker-compose/compose.yaml
services:
    whiteboard:
        container_name: whiteboard
        image: ghcr.io/nextcloud-releases/whiteboard:release
        restart: unless-stopped
        environment:
            - STORAGE_STRATEGY=lru
            - NEXTCLOUD_URL=https://cloud.domain.tld
            - JWT_SECRET_KEY=${WBSECRET}
        ports:
            - 127.0.0.1:3002:3002

Pull the Image and start the container:

cd /opt/docker-compose && docker compose up -d

Add the following to the Apache VirtualHost that serves Nextcloud:
(Click here for Apache < 2.4.47 or NGINX)

ProxyPass /whiteboard http://127.0.0.1:3002 upgrade=websocket

Enable modules:

a2enmod proxy
a2enmod proxy_http
a2enmod proxy_wstunnel

Restart Apache

systemctl restart apache2

Install the Whiteboard app either via WebUI or via occ command:

sudo -u www-data php /var/wwww/nextcloud/occ app:install whiteboard

Configure the Whiteboard app either via occ commands…

sudo -u www-data php /var/www/nextcloud/occ config:app:set whiteboard collabBackendUrl --value="https://cloud.domain.tld/whiteboard"
sudo -u www-data php /var/www/nextcloud/occ config:app:set whiteboard jwt_secret_key --value="$(grep '^WBSECRET=' /opt/docker-compose/.env | cut -d '=' -f2-)"

…or via WebUI:

Whiteboard server URL:

https://cloud.domain.tld/whiteboard

Shared Secret:

The WBSECRET from the .env file:

grep '^WBSECRET=' /opt/docker-compose/.env | cut -d '=' -f2-
1 Like

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