Etherpad

A modern really-real-time collaborative document editor.

Access Etherpad

  • User interface: https://<SERVER_IP>
  • Admin interface: https://<SERVER_IP>/admin
  • Admin credentials: Username admin, password stored in .env เช่น ADMIN_PASSWORD

Add Users via Admin Settings

1. Visit: https://<SERVER_IP>/admin

2. Go to Settings.

3. A JSON configuration file will be displayed.

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. Add a new user (follow valid JSON syntax):

  "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. Click Save Settings.

7. Click Restart Etherpad.

ไฟล์และไดเร็กทอรีที่สำคัญ

  • ขั้นตอนการติดตั้งแอปพลิเคชัน: /root/etherpad
  • ไฟล์ Docker Compose: /root/etherpad/docker-compose.yml
  • ตัวแปรสภาพแวดล้อม: /root/etherpad/.env
  • PostgreSQL database data: /var/lib/docker/volumes/etherpad_postgres_data/_data
  • Etherpad runtime data: /var/lib/docker/volumes/etherpad_etherpad-var/_data
  • Plugins directory: /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

Follow Etherpad logs:

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. แทนที่เส้นทาง SSL ในไฟล์การตั้งค่า Nginx:

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 is served behind an Nginx reverse proxy for SSL termination and improved security.
  • A self-signed certificate may trigger browser warnings; this is expected unless Let’s Encrypt is used.
  • Some browsers may display errors or cause Etherpad to function incorrectly.
  • Etherpad has been tested and confirmed working on Firefox, which is recommended for best compatibility.

รายละเอียดการสมัคร