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

**URL:** <https://help.nextcloud.com/t/how-do-i-setup-the-websocket-server-for-whiteboard-real-time-collaboration/229171>\
**Category:** ℹ️ Support\
**Tags:** whiteboard-app, onlyoffice, nc31\
**Created:** [July 23, 2025, 1:14pm UTC](https://help.nextcloud.com/t/how-do-i-setup-the-websocket-server-for-whiteboard-real-time-collaboration/229171 "2025-07-23T13:14:51Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![bb77](https://help.nextcloud.com/letter_avatar/bb77/32/5_5575768a8748004e209b776fc1b2916d.png) [@bb77](https://help.nextcloud.com/u/bb77)\
**Post date:** [July 24, 2025, 2:13pm UTC](https://help.nextcloud.com/t/how-do-i-setup-the-websocket-server-for-whiteboard-real-time-collaboration/229171/3 "2025-07-24T14:13:06Z")

</div>

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

Install Docker:

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

```

Open a root shell:

```auto
sudo -i

```

Create a directory:

```auto
mkdir /opt/docker-compose

```

Create `.env` file:

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

```

Create `compose.yaml`:

```auto
nano /opt/docker-compose/compose.yaml

```

```auto
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:

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

```

Add the following to the Apache VirtualHost that serves Nextcloud:  
(Click [here](https://github.com/nextcloud/whiteboard#reverse-proxy-configuration) for Apache \< 2.4.47 or NGINX)

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

```

Enable modules:

```auto
a2enmod proxy
a2enmod proxy_http
a2enmod proxy_wstunnel

```

Restart Apache

```auto
systemctl restart apache2

```

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

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

```

Configure the Whiteboard app either via `occ` commands…

```auto
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:

```auto
https://cloud.domain.tld/whiteboard

```

Shared Secret:

The `WBSECRET` from the `.env` file:

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

```

---

_[View the full topic](https://help.nextcloud.com/t/how-do-i-setup-the-websocket-server-for-whiteboard-real-time-collaboration/229171)._
