50% 折扣 全部方案,限时优惠。起价 $2.48/mo
以太网垫

以太网垫

Etherpad 是一个实时协作文档编辑器。 Google 文档替代纯文本,包含版本历史记录、在线聊天和修订版本差异。开源,用于维基百科、Mozilla 和欧盟委员会。参考实时文本协作服务器。

版本

最新的

操作系统

Ubuntu Server 24.04 LTS

最低 RAM

2 GB

IP 类型

IPV4

访问以太网板

  • 用户界面: https://<SERVER_IP>
  • 管理界面: https://<SERVER_IP>/admin
  • 管理员凭据:用户名 admin,密码存储在 .env as ADMIN_PASSWORD

通过管理设置添加用户

1. 访问: https://<SERVER_IP>/admin

2. 前往“设置”。

3. 将显示 JSON 配置文件。

4. 找到 users 部分:

  "users": {
    "admin": {
      // 1) "password" can be replaced with "hash" if you install ep_hash_auth
      // 2) please note that if password is null, the user will not be created
      "password": "${ADMIN_PASSWORD:null}",
      "is_admin": true
    },
    "user": {
      // 1) "password" can be replaced with "hash" if you install ep_hash_auth
      // 2) please note that if password is null, the user will not be created
      "password": "test",
      "is_admin": false
    }
  },

5. 添加新用户(遵循有效的 JSON 语法):

  "users": {
    "admin": {
      // 1) "password" can be replaced with "hash" if you install ep_hash_auth
      // 2) please note that if password is null, the user will not be created
      "password": "${ADMIN_PASSWORD:null}",
      "is_admin": true
    },
    "user": {
      // 1) "password" can be replaced with "hash" if you install ep_hash_auth
      // 2) please note that if password is null, the user will not be created
      "password": "test",
      "is_admin": false
    },
    "newuser": {
      "password": "strongpassword",
      "is_admin": false
    }
  },

6. 单击保存设置。

7. 单击重新启动 Etherpad。

重要文件与目录

  • 应用程序安装: /root/etherpad
  • Docker Compose 文件: /root/etherpad/docker-compose.yml
  • 环境变量: /root/etherpad/.env
  • PostgreSQL 数据库数据: /var/lib/docker/volumes/etherpad_postgres_data/_data
  • Etherpad 运行时数据: /var/lib/docker/volumes/etherpad_etherpad-var/_data
  • 插件目录: /var/lib/docker/volumes/etherpad_plugins/_data
  • Nginx 配置: /etc/nginx/sites-available/etherpad
  • SSL 证书: /etc/nginx/ssl/

服务管理

列出容器:

docker ps

重启容器:

docker compose -f /root/etherpad/docker-compose.yml restart

关注 Etherpad 日志:

docker compose -f /root/etherpad/docker-compose.yml logs -f

重新启动 Nginx:

systemctl restart nginx

为域名启用 SSL

1. 将域名解析到服务器 IP。

2. 编辑 Nginx 配置,把两处 server_name <IP>; 替换为你的域名(<your-domain>)在 HTTP(端口 80)和 HTTPS(端口 443)两个块中都替换:

vim /etc/nginx/sites-available/etherpad

3. 安装 Certbot:

apt install -y certbot python3-certbot-nginx

4. 运行以下命令生成有效的 Let's Encrypt 证书:

certbot certonly --nginx --non-interactive --agree-tos --email [email protected] -d yourdomain.com

5. 替换 Nginx 配置中的 SSL 路径:

vim /etc/apache2/sites-available/etherpad
# Before:
    # ssl_certificate /etc/nginx/ssl/fullchain.pem;
    # ssl_certificate_key /etc/nginx/ssl/privkey.pem;
# After:
    # ssl_certificate /etc/letsencrypt/live/yourdomain.com/fullchain.pem;
    # ssl_certificate_key /etc/letsencrypt/live/yourdomain.com/privkey.pem;

6. 重启 Nginx 以应用更改:

systemctl restart nginx

7. 打开浏览器,访问: https://yourdomain.com

笔记

  • Etherpad 在 Nginx 反向代理后面提供服务,以实现 SSL 终止并提高安全性。
  • 自签名证书可能会触发浏览器警告;除非使用 Let’s Encrypt,否则这是预期的。
  • 某些浏览器可能会显示错误或导致 Etherpad 无法正常工作。
  • Etherpad 已经过测试并确认可以在 Firefox 上运行,建议使用它以获得最佳兼容性。

立即部署 Etherpad。 起价 $2.48/月。