Access Etherpad
- User interface:
https://<SERVER_IP> - Admin interface:
https://<SERVER_IP>/admin - 管理员凭据:用户名
admin, password stored in.envasADMIN_PASSWORD
通过管理员设置添加用户
1. Visit: https://<SERVER_IP>/admin
2. Go to Settings.
3. 页面将显示一个 JSON 配置文件。
4. Locate the users section:
"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」。
重要文件与目录
- Application installation:
/root/etherpad - Docker Compose 文件:
/root/etherpad/docker-compose.yml - Environment variables:
/root/etherpad/.env - PostgreSQL 数据库数据:
/var/lib/docker/volumes/etherpad_postgres_data/_data - Etherpad 运行时数据:
/var/lib/docker/volumes/etherpad_etherpad-var/_data - Plugins directory:
/var/lib/docker/volumes/etherpad_plugins/_data - Nginx configuration:
/etc/nginx/sites-available/etherpad - SSL certificates:
/etc/nginx/ssl/
Service Management
List containers:
docker ps
Restart containers:
docker compose -f /root/etherpad/docker-compose.yml restart
查看 Etherpad 日志:
docker compose -f /root/etherpad/docker-compose.yml logs -f
Restart 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. Install 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
Notes
- Etherpad 通过 Nginx 反向代理提供服务,用于 SSL 终止和安全加固。
- 自签名证书可能触发浏览器警告,这是正常现象,除非使用了 Let's Encrypt 证书。
- 部分浏览器可能显示错误,或导致 Etherpad 运行异常。
- Etherpad 已在 Firefox 上经过测试并确认可正常使用,推荐使用 Firefox 以获得最佳兼容性。