开源一体化协作平台Colanode

发布于:2025-07-17 ⋅ 阅读:(11) ⋅ 点赞:(0)

在这里插入图片描述

简介

什么是 Colanode ?

Colanode 是一个开源的、以本地为中心的协作工作空间,旨在提供一个替代 SlackNotion 的平台,让用户完全掌控自己的数据。它采用本地优先方法设计,可帮助团队在线或离线沟通、组织和管理项目。可以获得现代协作工具的灵活性,以及拥有数据带来的安心。

主要特点

  1. 实时聊天:提供即时消息功能,方便团队沟通。
  2. 丰富文本页面:支持文档、维基和笔记的创建,类似于 Notion 的编辑器。
  3. 可定制数据库:允许组织信息,使用自定义字段和动态视图(如表格、看板、日历)。
  4. 文件管理:在安全的工作空间内轻松存储、共享和管理文件。
  5. 本地优先工作流:所有更改首先保存到本地 SQLite 数据库,然后同步到服务器,即使在离线状态下也能继续工作。
  6. 并发编辑:使用 CRDT 技术支持实时协作,允许多人同时编辑同一条目。

应用场景

  • 团队协作:适合团队管理项目、进行沟通和共享文件。
  • 个人工作空间:为个人用户提供一个私密的笔记和任务管理工具。
  • 自托管解决方案:用户可以选择自托管 Colanode,完全掌控数据隐私。
  • 小型项目管理:适合小型项目或初创公司快速搭建协作平台。

准备

如果像往常一样采用 http://群晖IP:4330 访问网页端,会显示下面这样的页面

因为 Colanode 使用了 Origin Private File System (OPFS) 存储方案。就是浏览器给每个网站提供的一个私有的、高性能的本地磁盘空间。你可以把它想象成一个内置在浏览器里的、每个网站专属的“虚拟硬盘”。网站可以在这个“硬盘”里存取文件,速度很快,而且不会被其他网站或用户直接访问到,非常安全。

但为了安全起见,Origin Private File System (OPFS) 以及其所属的 File System API 通常要求页面在安全的上下文 (Secure Context) 中运行,这基本上意味着必须使用 HTTPS 协议。

反向代理

准备好两个子域名。

域名 局域网地址 备注
css.laosu.tech http://192.168.0.197:4331 colanode_server 的访问地址
csc.laosu.tech http://192.168.0.197:4330 colanode_web 的访问地址

没有什么特殊设置,所以就不放图了

安装

在群晖上以 Docker 方式安装。

本文写作时, ghcr.io/colanode/server:latest 版本对应为 0.2.5

ghcr.io/colanode/web:latest 版本对应为 0.2.5

采用 docker-compose 安装,将下面的内容保存为 docker-compose.yml 文件

version: '3.8'

services:
  postgres:
    image: pgvector/pgvector:pg17
    container_name: colanode_postgres
    restart: always
    environment:
      POSTGRES_USER: colanode_user
      POSTGRES_PASSWORD: postgrespass123
      POSTGRES_DB: colanode_db
    volumes:
      - ./postgres_data:/var/lib/postgresql/data
    # ports:
    #  - '5432:5432'

  valkey:
    image: valkey/valkey:8.1
    container_name: colanode_valkey
    restart: always
    command: ['valkey-server', '--requirepass', 'your_valkey_password']
    volumes:
      - ./valkey_data:/data
    # ports:
    #   - '6379:6379'

  minio:
    image: minio/minio:RELEASE.2025-04-08T15-41-24Z
    container_name: colanode_minio
    restart: always
    environment:
      MINIO_ROOT_USER: minioadmin
      MINIO_ROOT_PASSWORD: your_minio_password
      MINIO_BROWSER: 'on'
      MINIO_DOMAIN: minio
      MINIO_ADDRESS: ':9000'
      MINIO_CONSOLE_ADDRESS: ':9001'
    volumes:
      - ./minio_data:/data
    # ports:
    #   - '9000:9000'
    #   - '9001:9001'
    entrypoint: sh
    command: -c 'mkdir -p /data/colanode-avatars /data/colanode-files && minio server /data --address ":9000" --console-address ":9001"'
    
  # ---------------------------------------------------------------
  # Optional SMTP Server (Mailpit) for Local Email Testing
  # ---------------------------------------------------------------
  # This service runs Mailpit, a local SMTP testing tool.
  # If you want to test how emails are sent in the 'server' service,
  # you can uncomment the 'smtp' service block and configure the
  # SMTP_ENABLED variable to 'true' in the 'server' service environment
  # variables.
  #
  # Access the Mailpit UI at http://localhost:8025
  # ---------------------------------------------------------------
  # smtp:
  #  image: axllent/mailpit:v1.24.1
  #  container_name: colanode_smtp
  #  restart: always
  #  ports:
  #    - '1025:1025' # SMTP IN (Connect server service to this port)
  #    - '8025:8025' # Web UI
  #  networks:
  #    - colanode_network

  server:
    image: ghcr.io/colanode/server:latest
    container_name: colanode_server
    restart: always
    depends_on:
      - postgres
      - valkey
      - minio
      # - smtp # Optional
    environment:
      # ───────────────────────────────────────────────────────────────
      # General Node/Server Config
      # ───────────────────────────────────────────────────────────────
      NODE_ENV: production

      # The server requires a name and avatar URL which will be displayed in the desktop app login screen.
      SERVER_NAME: 'Colanode Local'
      SERVER_AVATAR: ''
      # Possible values for SERVER_MODE: 'standalone', 'cluster'
      SERVER_MODE: 'standalone'

      # Optional custom path prefix for the server.
      # Add a plain text without any slashes. For example if you set 'colanode'
      # the URL 'https://localhost:3000/config' will be: 'https://localhost:3000/colanode/config'
      # SERVER_PATH_PREFIX: 'colanode'

      # Optional CORS Configuration. By default the server is accessible from 'http://localhost:4000'.
      # You can change this to allow custom origins (use comma to separate multiple origins) or '*' to allow all origins.
      SERVER_CORS_ORIGIN: 'https://csc.laosu.tech'
      SERVER_CORS_MAX_AGE: '7200'

      # ───────────────────────────────────────────────────────────────
      # Account Configuration
      # ───────────────────────────────────────────────────────────────
      # Possible values for ACCOUNT_VERIFICATION_TYPE: 'automatic', 'manual', 'email'
      ACCOUNT_VERIFICATION_TYPE: 'automatic'
      ACCOUNT_OTP_TIMEOUT: '600' # in seconds

      # If you want to enable Google login, you need to set the following variables:
      # ACCOUNT_GOOGLE_ENABLED: 'true'
      # ACCOUNT_GOOGLE_CLIENT_ID: 'your_google_client_id'
      # ACCOUNT_GOOGLE_CLIENT_SECRET: 'your_google_client_secret'

      # ───────────────────────────────────────────────────────────────
      # User Configuration
      # ───────────────────────────────────────────────────────────────
      USER_STORAGE_LIMIT: '10737418240' # 10 GB
      USER_MAX_FILE_SIZE: '104857600' # 100 MB

      # ───────────────────────────────────────────────────────────────
      # PostgreSQL Configuration
      # ───────────────────────────────────────────────────────────────
      # The server expects a PostgreSQL database with the pgvector extension installed.
      POSTGRES_URL: 'postgres://colanode_user:postgrespass123@postgres:5432/colanode_db'

      # Optional variables for SSL connection to the database
      # POSTGRES_SSL_REJECT_UNAUTHORIZED: 'false'
      # POSTGRES_SSL_CA: ''
      # POSTGRES_SSL_KEY: ''
      # POSTGRES_SSL_CERT: ''

      # ───────────────────────────────────────────────────────────────
      # Redis Configuration
      # ───────────────────────────────────────────────────────────────
      REDIS_URL: 'redis://:your_valkey_password@valkey:6379/0'
      REDIS_DB: '0'
      # Optional variables:
      REDIS_JOBS_QUEUE_NAME: 'jobs'
      REDIS_JOBS_QUEUE_PREFIX: 'colanode'
      REDIS_EVENTS_CHANNEL: 'events'

      # ───────────────────────────────────────────────────────────────
      # S3 configuration for files.
      # In the future we will support other storage providers.
      # ───────────────────────────────────────────────────────────────
      STORAGE_S3_ENDPOINT: 'http://minio:9000'
      STORAGE_S3_ACCESS_KEY: 'minioadmin'
      STORAGE_S3_SECRET_KEY: 'your_minio_password'
      STORAGE_S3_BUCKET: 'colanode'
      STORAGE_S3_REGION: 'us-east-1'
      STORAGE_S3_FORCE_PATH_STYLE: 'true'

      # ───────────────────────────────────────────────────────────────
      # SMTP configuration
      # ---------------------------------------------------------------
      # We leave the SMTP configuration disabled by default.
      # ---------------------------------------------------------------
      SMTP_ENABLED: 'false'
      # ---------------------------------------------------------------
      # If using the local Mailpit service (defined above), use:
      # SMTP_ENABLED: 'true'
      # SMTP_HOST: 'smtp'
      # SMTP_PORT: '1025'
      # SMTP_USER: ''
      # SMTP_PASSWORD: ''
      # SMTP_EMAIL_FROM: 'your_email@example.com'
      # SMTP_EMAIL_FROM_NAME: 'Colanode'
      # ---------------------------------------------------------------
      # If using a real SMTP provider, update these:
      # SMTP_ENABLED: 'true'
      # SMTP_HOST: 'your_smtp_provider_host'
      # SMTP_PORT: '587' # Or 465, etc.
      # SMTP_USER: 'your_smtp_username'
      # SMTP_PASSWORD: 'your_smtp_password'
      # SMTP_EMAIL_FROM: 'your_email@example.com'
      # SMTP_EMAIL_FROM_NAME: 'Colanode'
      # ---------------------------------------------------------------

      # ───────────────────────────────────────────────────────────────
      # AI Configuration
      # ---------------------------------------------------------------
      # The AI integration is in experimental mode yet and we don't
      # recommend using it.
      # ---------------------------------------------------------------
      AI_ENABLED: 'false'
      # ───────────────────────────────────────────────────────────────

    ports:
      - '4331:3000'

  web:
    image: ghcr.io/colanode/web:latest
    container_name: colanode_web
    restart: always
    ports:
      - '4330:80'

关于各容器环境变量的简单说明

  • Postgres 容器环境变量
环境变量 描述
POSTGRES_USER PostgreSQL 数据库的用户名,默认为 colanode_user
POSTGRES_PASSWORD PostgreSQL 数据库用户的密码,默认为 postgrespass123
POSTGRES_DB 默认创建的数据库名称,默认为 colanode_db
  • Valkey 容器环境变量
环境变量 描述
--requirepass Valkey 服务器的访问密码,需自定义,如 your_valkey_password
  • Minio 容器环境变量
环境变量 描述
MINIO_ROOT_USER Minio 管理员的用户名,默认为 minioadmin
MINIO_ROOT_PASSWORD Minio 管理员的密码,需自定义,如 your_minio_password
MINIO_BROWSER 启用 Minio 浏览器界面,设为 'on'
MINIO_DOMAIN Minio 的域名,默认为 minio
MINIO_ADDRESS Minio 监听的地址和端口,默认为 ':9000'
MINIO_CONSOLE_ADDRESS Minio 控制台监听的地址和端口,默认为 ':9001'
  • Server 容器环境变量
环境变量 描述
NODE_ENV 设置运行环境,通常为 production
SERVER_NAME 服务器名称,显示在桌面应用的登录界面,如 'Colanode Local'
SERVER_AVATAR 服务器的头像 URL,默认为空。
SERVER_MODE 服务器模式,可能值为 'standalone''cluster'
SERVER_CORS_ORIGIN 允许的 CORS 来源,使用逗号分隔多个来源)或使用“*”以允许所有来源。
SERVER_CORS_MAX_AGE CORS 预检请求的有效期,单位为秒,默认为 '7200'
ACCOUNT_VERIFICATION_TYPE 账户验证类型,可能值为 'automatic''manual''email'
ACCOUNT_OTP_TIMEOUT OTP 超时时间,单位为秒,默认为 '600'
USER_STORAGE_LIMIT 用户存储限制,默认为 10 GB(10737418240 字节)。
USER_MAX_FILE_SIZE 用户最大文件大小,默认为 100 MB(104857600 字节)。
POSTGRES_URL PostgreSQL 数据库连接字符串,格式为 postgres://<user>:<password>@<host>:<port>/<dbname>
REDIS_URL Redis 连接字符串,格式为 redis://<password>@<host>:<port>/0
REDIS_DB Redis 数据库,默认为 '0'
STORAGE_S3_ENDPOINT S3 兼容存储的端点 URL,默认为 http://minio:9000
STORAGE_S3_ACCESS_KEY S3 访问密钥,默认为 minioadmin
STORAGE_S3_SECRET_KEY S3 秘密访问密钥,需自定义,如 your_minio_password
STORAGE_S3_BUCKET S3 存储桶名称,默认为 colanode
STORAGE_S3_REGION S3 存储区域,默认为 us-east-1
STORAGE_S3_FORCE_PATH_STYLE 强制使用路径样式,默认为 'true'
SMTP_ENABLED 启用 SMTP 配置,默认为 'false'
AI_ENABLED 启用 AI 集成,默认为 'false'

然后执行下面的命令

# 新建文件夹 colanode 和 子目录
mkdir -p /volume1/docker/colanode/{minio_data,postgres_data,valkey_data}

# 进入 colanode 目录
cd /volume1/docker/colanode

# 将 docker-compose.yml 放入当前目录

# 一键启动
docker-compose up -d 

运行

在浏览器中输入服务端地址: https://css.laosu.tech,复制下来,一会儿客户端设置会用到

在浏览器中输入客户端地址: https://csc.laosu.tech

Add new server

填入服务器地址,点 Create

添加完成后,下拉列表中会多出一个 Colanode Local

选择我们自己的服务器后,就可以注册账号了

注册成功后的主界面

接下来就可以建 spacepagechannel

除了网页版之外还支持多个操作系统的桌面客户端

使用比较简单,可以看看官方的动图

参考文档

colanode/colanode: Open-source and local-first Slack and Notion alternative that puts you in control of your data
地址:https://github.com/colanode/colanode

Colanode - Open-source & local-first Slack and Notion alternative
地址:https://colanode.com/


网站公告

今日签到

点亮在社区的每一天
去签到