> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dify.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Collaborate with Teammates

> Edit workflows with workspace members in real time and discuss design decisions through in-canvas comments

Building a workflow sometimes takes more than one person: a prompt engineer tuning instructions, a domain expert validating logic, a reviewer flagging edge cases.

Rather than taking turns, you can edit the same workflow alongside other workspace members and leave comments directly on the canvas, so the discussion stays with the work.

<Tip>
  Comments and collaborator cursors can be hidden from the zoom menu in the bottom-right corner of the canvas.

  <Frame>
    <img src="https://mintcdn.com/dify-6c0370d8/xGr6gOhRwlVIl2gB/images/use-dify/workflow/hide-comments-collaborator-cursor.png?fit=max&auto=format&n=xGr6gOhRwlVIl2gB&q=85&s=fe7a744f62bb732c9f4598d6195251d8" alt="Hide Comments and Collaborator Cursors" width="1830" height="744" data-path="images/use-dify/workflow/hide-comments-collaborator-cursor.png" />
  </Frame>
</Tip>

## Real-Time Editing

Workspace members with editor permissions or above can edit the same workflow simultaneously. When two members change the same element at the same time, the last edit wins.

## Comments

Right-click an empty area of the canvas and select **Add Comment** to leave a note. To drop multiple comments in a row, press `C` to enter comment mode. Comments persist across workflow versions.

If you @mention a workspace member in a comment, they'll receive an email notification.

Anyone with access to the app can read comments; adding, editing, or resolving requires editor permissions or above.

## Deployment Requirements

Collaboration runs over WebSocket, alongside the main API. The bundled Docker Compose stack ships this enabled, but production deployments behind a custom domain or reverse proxy need to confirm a few settings:

* `ENABLE_COLLABORATION_MODE` is `true` (the master switch for simultaneous editing, comments, and @mentions).
* `SERVER_WORKER_CLASS` is `geventwebsocket.gunicorn.workers.GeventWebSocketWorker` on the WebSocket worker (the bundled `api_websocket` service sets this).
* `NEXT_PUBLIC_SOCKET_URL` points to a WebSocket URL the browser can reach, for example `wss://dify.example.com`. The default `ws://localhost` only works for local access to the bundled nginx.
* The `collaboration` profile stays in `COMPOSE_PROFILES` so the dedicated WebSocket service runs.

If you front Dify with your own reverse proxy, forward `Upgrade` and `Connection` headers on `/socket.io/`. Running multiple API replicas requires sticky sessions.

See [Environment Variables](/en/self-host/deploy/configuration/environments#enable_collaboration_mode) for the full reference.
