Etherpad: Difference between revisions
Initial |
formatted |
||
Line 1: | Line 1: | ||
= Why Etherpad = | |||
Return to [[server-guides|Server Guides]] | |||
Etherpad is a highly customizable open-source online editor providing real-time collaborative editing. While it is not end-to-end encrypted, owning the infrastructure provides a great solution for everyday collaboration and is an excellent alternative to common services. | |||
For a more advanced and secure option, [https://cryptpad.org/ Cryptpad] offers additional features and more than just a Wordpad-style service. | |||
< | == Install Code == | ||
The following code sets up Etherpad: | |||
# Setting up the environment | |||
# Installing Etherpad | |||
# Configuring a read database (MariaDB) instead of the development db | |||
# Establishing SSL | |||
''' Read Me''': | |||
The script will prompt for the domain, subdomain, and SQL password. For security purposes, the SQL password will not display as you type. | |||
<pre> | |||
#!/bin/bash | |||
# source: https://hub.docker.com/r/etherpad/etherpad | |||
user_prompts(){ | user_prompts(){ | ||
echo "domain: " | echo "domain: " | ||
read -r domain | read -r domain | ||
echo "sub-domain: " | echo "sub-domain: " | ||
Line 41: | Line 52: | ||
} | } | ||
setup_git(){ | setup_git(){ | ||
#assume location is /opt/etherpad | # assume location is /opt/etherpad | ||
#running install commands as newly created etherpad user | # running install commands as newly created etherpad user | ||
sudo -H -u etherpad bash -c cd /opt/etherpad || exit | sudo -H -u etherpad bash -c "cd /opt/etherpad || exit" | ||
sudo -H -u etherpad bash -c curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash - | sudo -H -u etherpad bash -c "curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -" | ||
sudo -H -u etherpad bash -c git clone --branch master https://github.com/ether/etherpad-lite.git | sudo -H -u etherpad bash -c "git clone --branch master https://github.com/ether/etherpad-lite.git" | ||
sudo -H -u etherpad bash -c cd etherpad-lite || exit | sudo -H -u etherpad bash -c "cd etherpad-lite || exit" | ||
sudo -H -u etherpad bash -c src/bin/run.sh | sudo -H -u etherpad bash -c "src/bin/run.sh" | ||
# create etherpad as a service | # create etherpad as a service | ||
echo "[Unit] | echo "[Unit] | ||
Line 73: | Line 84: | ||
sudo mariadb -e "CREATE DATABASE $sql_db_name DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;" | sudo mariadb -e "CREATE DATABASE $sql_db_name DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;" | ||
sudo mariadb -e "CREATE USER '$sql_user'@'localhost' identified by '$sql_password';" | sudo mariadb -e "CREATE USER '$sql_user'@'localhost' identified by '$sql_password';" | ||
sudo mariadb -e "GRANT ALL PRIVILEGES ON $sql_db_name. | sudo mariadb -e "GRANT ALL PRIVILEGES ON $sql_db_name.* TO '$sql_user'@'localhost' IDENTIFIED BY '$sql_password';" | ||
##FIXME remove dirty db | ##FIXME: remove dirty db | ||
#sed -i '/"dbType"/i \/ | #sed -i '/"dbType"/i \/' settings.json | ||
##FIXME: configure settings | |||
##FIXME configure settings | |||
# "dbType" : "mysql", | # "dbType" : "mysql", | ||
# "dbSettings" : { | # "dbSettings" : { | ||
Line 83: | Line 93: | ||
# "host": "localhost", | # "host": "localhost", | ||
# "port": 3306, | # "port": 3306, | ||
# "password": " | # "password": "$sql_password", | ||
# "database": " | # "database": "$sql_db_name", | ||
# "charset": "utf8mb4" | # "charset": "utf8mb4" | ||
# }, | # }, | ||
Line 113: | Line 123: | ||
systemctl start etherpad | systemctl start etherpad | ||
} | } | ||
main</ | main | ||
</pre> | |||
For further information, visit the official [https://etherpad.org/ Etherpad site] or [https://hub.docker.com/r/etherpad/etherpad Docker Hub for Etherpad]. | |||
[[Category:Server Guides]] | |||
[[Category:Collaboration Tools]] | |||
[[Category:Open Source]] | |||
[[Category:Etherpad]] |