Uzyskaj dostęp do Etherpada
- Interfejs użytkownika:
https://<SERVER_IP> - Interfejs administratora:
https://<SERVER_IP>/admin - Poświadczenia administratora: Nazwa użytkownika
admin, hasło zapisane w.envasADMIN_PASSWORD
Dodaj użytkowników za pomocą ustawień administratora
1. Odwiedź: https://<SERVER_IP>/admin
2. Przejdź do Ustawień.
3. Wyświetlony zostanie plik konfiguracyjny JSON.
4. Zlokalizuj users sekcja:
"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. Dodaj nowego użytkownika (postępuj zgodnie ze składnią 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. Kliknij opcję Zapisz ustawienia.
7. Kliknij opcję Uruchom ponownie Etherpad.
Ważne pliki i katalogi
- Instalacja aplikacji:
/root/etherpad - Plik Docker Compose:
/root/etherpad/docker-compose.yml - Zmienne środowiskowe:
/root/etherpad/.env - Dane bazy danych PostgreSQL:
/var/lib/docker/volumes/etherpad_postgres_data/_data - Dane wykonawcze Etherpada:
/var/lib/docker/volumes/etherpad_etherpad-var/_data - Katalog wtyczek:
/var/lib/docker/volumes/etherpad_plugins/_data - Konfiguracja Nginxa:
/etc/nginx/sites-available/etherpad - Certyfikaty SSL:
/etc/nginx/ssl/
Zarządzanie usługami
Lista kontenerów:
docker ps
Uruchom ponownie kontenery:
docker compose -f /root/etherpad/docker-compose.yml restart
Śledź dzienniki Etherpad:
docker compose -f /root/etherpad/docker-compose.yml logs -f
Uruchom ponownie Nginxa:
systemctl restart nginx
Włączanie SSL z domeną
1. Skieruj swoją domenę na IP serwera.
2. Edytuj konfigurację Nginx i zamień oba server_name <IP>; z Twoją domeną (<your-domain>) dla bloków HTTP (port 80) i HTTPS (port 443):
vim /etc/nginx/sites-available/etherpad
3. Zainstaluj Certbot:
apt install -y certbot python3-certbot-nginx
4. Uruchom poniższe polecenie, aby wygenerować ważny certyfikat Let’s Encrypt:
certbot certonly --nginx --non-interactive --agree-tos --email [email protected] -d yourdomain.com
5. Zamień ścieżki SSL w konfiguracji 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. Zrestartuj Nginx, aby zastosować zmiany:
systemctl restart nginx
7. Otwórz przeglądarkę i odwiedź: https://yourdomain.com
Notatki
- Etherpad jest obsługiwany za odwrotnym proxy Nginx w celu zakończenia protokołu SSL i poprawy bezpieczeństwa.
- Certyfikat z podpisem własnym może wywołać ostrzeżenia przeglądarki; jest to oczekiwane, chyba że używany jest Let's Encrypt.
- Niektóre przeglądarki mogą wyświetlać błędy lub powodować nieprawidłowe działanie Etherpada.
- Etherpad został przetestowany i potwierdzono, że działa w przeglądarce Firefox, która jest zalecana w celu zapewnienia najlepszej kompatybilności.