إيثرباد

محرر مستندات تعاوني حديث يعمل في الوقت الفعلي.

الوصول إلى إيثرباد

  • واجهة المستخدم: https://<SERVER_IP>
  • واجهة الإدارة: https://<SERVER_IP>/admin
  • بيانات اعتماد المسؤول: اسم المستخدم admin، كلمة المرور مخزنة في .env كما 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. استبدل مسارات 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 من خلال خادم وكيل عكسي Nginx لإنهاء SSL وتحسين الأمان.
  • قد تؤدي الشهادة الموقعة ذاتيًا إلى ظهور تحذيرات من المتصفح؛ وهذا أمر متوقع ما لم يتم استخدام Let's Encrypt.
  • قد تعرض بعض المتصفحات أخطاءً أو تتسبب في عمل برنامج Etherpad بشكل غير صحيح.
  • تم اختبار برنامج Etherpad والتأكد من أنه يعمل على متصفح Firefox، وهو ما يُنصح به للحصول على أفضل توافق.

تفاصيل الطلب