Compare commits
11 Commits
1020168077
...
master
Author | SHA1 | Date | |
---|---|---|---|
7fefa364a3 | |||
e54a3045dc | |||
e45e308e8e | |||
8ed9555262 | |||
52657a71af | |||
fa0cbc561b | |||
ea629fd5a1 | |||
56df88d4f5 | |||
f21dfa6edc | |||
7bf365d747 | |||
21dbbe20f1 |
34
README.OnlyOffice
Normal file
34
README.OnlyOffice
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
# ---
|
||||||
|
# OnlyOffice is now a separate module
|
||||||
|
#
|
||||||
|
# OnlyOffice applications (Sheets, Document, Presentation) are not bundled with CryptPad
|
||||||
|
# anymore. You can install/update them by running the installation script we provide:
|
||||||
|
# ---
|
||||||
|
|
||||||
|
cryptpad_user=cryptpad
|
||||||
|
|
||||||
|
|
||||||
|
# - Stop cryptpad
|
||||||
|
# -
|
||||||
|
systemctl stop cryptpad
|
||||||
|
|
||||||
|
|
||||||
|
# Stop iptables firewall
|
||||||
|
#
|
||||||
|
ipt-firewall-server flush
|
||||||
|
ip6t-firewall-server flush
|
||||||
|
|
||||||
|
|
||||||
|
# Login as CryptPad user
|
||||||
|
#
|
||||||
|
su - ${cryptpad_user}
|
||||||
|
cd cryptpad
|
||||||
|
|
||||||
|
# Install OnlyOffice
|
||||||
|
#
|
||||||
|
# ./install-onlyoffice.sh
|
||||||
|
# # press q to close the license screen
|
||||||
|
# # and Y ⏎ to accept the OnlyOffice license
|
||||||
|
#
|
||||||
|
./install-onlyoffice.sh
|
||||||
|
|
@ -2,8 +2,59 @@
|
|||||||
# Copy existing user data to new pad
|
# Copy existing user data to new pad
|
||||||
# =================
|
# =================
|
||||||
|
|
||||||
|
cryptpad_user=cryptpad
|
||||||
|
|
||||||
backup_date="2022-09-22-1001"
|
# Stop cryptpad service
|
||||||
|
#
|
||||||
|
systemctl stop cryptpad.service
|
||||||
|
|
||||||
|
|
||||||
cp -a /var/www/cryptpad.BAK.${backup_date}/{blob,blobstage,block,datastore} /var/www/cryptpad/
|
# login as cryptpad user
|
||||||
|
#
|
||||||
|
su - ${cryptpad_user}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
backup_date="2023-12-12-1442"
|
||||||
|
|
||||||
|
|
||||||
|
# Backup current installation
|
||||||
|
#
|
||||||
|
cp -a cryptpad cryptpad.CURRENT
|
||||||
|
|
||||||
|
|
||||||
|
# Copy configuration file
|
||||||
|
#
|
||||||
|
cp cryptpad.BAK.${backup_date}/config/config.js cryptpad/config/config.js
|
||||||
|
|
||||||
|
# Instanzkonfiguration
|
||||||
|
#
|
||||||
|
# Note:
|
||||||
|
# some settings cannot be changed once user accounts have been created.
|
||||||
|
#
|
||||||
|
cp cryptpad.BAK.${backup_date}/customize/application_config.js cryptpad/customize/application_config.js
|
||||||
|
|
||||||
|
|
||||||
|
# Copy user data
|
||||||
|
#
|
||||||
|
#for i in blob blobstage block datastore ; do
|
||||||
|
for i in data datastore block blob ; do
|
||||||
|
|
||||||
|
echo""
|
||||||
|
echo -e " Syncing directory '${i}'.."
|
||||||
|
rsync -a --delete /var/www/cryptpad/cryptpad.BAK.${backup_date}/$i /var/www/cryptpad/cryptpad/
|
||||||
|
chown cryptpad:cryptpad /var/www/cryptpad/cryptpad/$i
|
||||||
|
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
# logoff from cryptpad user
|
||||||
|
#
|
||||||
|
exit
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Start cryptpad service
|
||||||
|
#
|
||||||
|
systemctl start cryptpad.service
|
||||||
|
|
||||||
|
120
README.install
120
README.install
@ -3,7 +3,7 @@
|
|||||||
# =================
|
# =================
|
||||||
|
|
||||||
# - See:
|
# - See:
|
||||||
# - https://blog.cavebeat.org/2017/07/cryptpad-installation-on-debian-stretch/
|
# - https://docs.cryptpad.org/en/admin_guide/installation.html
|
||||||
# -
|
# -
|
||||||
# - See also:
|
# - See also:
|
||||||
# - git repository: https://github.com/xwiki-labs/cryptpad
|
# - git repository: https://github.com/xwiki-labs/cryptpad
|
||||||
@ -13,6 +13,9 @@
|
|||||||
cryptpad_url=cpad-01.oopen.de
|
cryptpad_url=cpad-01.oopen.de
|
||||||
cryptpad_url=o13-pad.oopen.de
|
cryptpad_url=o13-pad.oopen.de
|
||||||
cryptpad_url=o13-cryptpad.oopen.de
|
cryptpad_url=o13-cryptpad.oopen.de
|
||||||
|
cryptpad_url=pad.ra-kanzlei-kiel.de
|
||||||
|
cryptpad_url=crpad.fluechtlingsrat-berlin.de
|
||||||
|
|
||||||
|
|
||||||
# bei vorgeschalteter authentifizierung funktioniert
|
# bei vorgeschalteter authentifizierung funktioniert
|
||||||
# eine *extra* sandbox url nicht. in diesem falle die gleiche
|
# eine *extra* sandbox url nicht. in diesem falle die gleiche
|
||||||
@ -23,6 +26,8 @@ cryptpad_sandbox_url="$cryptpad_url"
|
|||||||
cryptpad_sandbox_url="cpadsb-01.oopen.de"
|
cryptpad_sandbox_url="cpadsb-01.oopen.de"
|
||||||
cryptpad_sandbox_url="o13-padsb.oopen.de"
|
cryptpad_sandbox_url="o13-padsb.oopen.de"
|
||||||
cryptpad_sandbox_url="o13-cryptpadsb.oopen.de"
|
cryptpad_sandbox_url="o13-cryptpadsb.oopen.de"
|
||||||
|
cryptpad_sandbox_url="sandbox.pad.ra-kanzlei-kiel.de"
|
||||||
|
cryptpad_sandbox_url="cpadsb.fluechtlingsrat-berlin.de"
|
||||||
|
|
||||||
vhost_config_file="${cryptpad_url}.conf"
|
vhost_config_file="${cryptpad_url}.conf"
|
||||||
|
|
||||||
@ -51,6 +56,24 @@ adduser --gid $cryptpad_uid --uid $cryptpad_uid --home $cryptpad_home_dir $crypt
|
|||||||
|
|
||||||
su - ${cryptpad_user}
|
su - ${cryptpad_user}
|
||||||
|
|
||||||
|
cryptpad_base_dir=/var/www/cryptpad
|
||||||
|
cryptpad_home_dir="${cryptpad_base_dir}"
|
||||||
|
cryptpad_install_dir="${cryptpad_home_dir}/cryptpad"
|
||||||
|
|
||||||
|
cryptpad_url=cpad-01.oopen.de
|
||||||
|
cryptpad_url=o13-pad.oopen.de
|
||||||
|
cryptpad_url=o13-cryptpad.oopen.de
|
||||||
|
cryptpad_url=pad.ra-kanzlei-kiel.de
|
||||||
|
cryptpad_url=crpad.fluechtlingsrat-berlin.de
|
||||||
|
|
||||||
|
|
||||||
|
cryptpad_sandbox_url="cpadsb-01.oopen.de"
|
||||||
|
cryptpad_sandbox_url="o13-padsb.oopen.de"
|
||||||
|
cryptpad_sandbox_url="o13-cryptpadsb.oopen.de"
|
||||||
|
cryptpad_sandbox_url="sandbox.pad.ra-kanzlei-kiel.de"
|
||||||
|
cryptpad_sandbox_url="cpadsb.fluechtlingsrat-berlin.de"
|
||||||
|
|
||||||
|
|
||||||
cd ${cryptpad_home_dir}
|
cd ${cryptpad_home_dir}
|
||||||
|
|
||||||
|
|
||||||
@ -65,6 +88,19 @@ git clone https://github.com/cryptpad/cryptpad.git ${cryptpad_install_dir}
|
|||||||
|
|
||||||
cd ${cryptpad_install_dir}
|
cd ${cryptpad_install_dir}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# !!! NOTE
|
||||||
|
#
|
||||||
|
# Switch of IPv4 and IPv6 firewall
|
||||||
|
# ================================
|
||||||
|
#
|
||||||
|
# You will run into connection limit if the setting is too sensitive
|
||||||
|
#
|
||||||
|
# !!! NOTE
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# - Complete Installation of cryptpad
|
# - Complete Installation of cryptpad
|
||||||
# -
|
# -
|
||||||
npm ci
|
npm ci
|
||||||
@ -79,12 +115,21 @@ npm ci
|
|||||||
# #
|
# #
|
||||||
# npm audit fix
|
# npm audit fix
|
||||||
#
|
#
|
||||||
npm fund
|
#npm fund
|
||||||
npm audit fix
|
#npm audit fix
|
||||||
|
|
||||||
npm run install:components
|
npm run install:components
|
||||||
|
|
||||||
|
|
||||||
|
# Build static pages & Open Graph metadata
|
||||||
|
#
|
||||||
|
# To build some of CryptPad static pages & enable social media link previews,
|
||||||
|
# run the following command:
|
||||||
|
#
|
||||||
|
npm run build
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# ---
|
# ---
|
||||||
# - Configure CryptPad
|
# - Configure CryptPad
|
||||||
# ---
|
# ---
|
||||||
@ -131,6 +176,48 @@ fi
|
|||||||
# -
|
# -
|
||||||
perl -i -n -p -e"s#(\s*)(/*\s*)(defaultStorageLimit:.*)#\1//\3\n\1defaultStorageLimit: 250 * 1024 * 1024,#" ${cryptpad_install_dir}/config/config.js
|
perl -i -n -p -e"s#(\s*)(/*\s*)(defaultStorageLimit:.*)#\1//\3\n\1defaultStorageLimit: 250 * 1024 * 1024,#" ${cryptpad_install_dir}/config/config.js
|
||||||
|
|
||||||
|
|
||||||
|
# - Instance customization
|
||||||
|
# -
|
||||||
|
# - The functionality as well as the look-and-feel of an instance can be customized
|
||||||
|
# - by creating a customize folder and copying assets to be customized (images,
|
||||||
|
# - stylesheets, page templates, etc) from customize.dist into it. If a file exists
|
||||||
|
# -in customize, it will be served to users instead of its namesake in customize.dist.
|
||||||
|
# -
|
||||||
|
# - The purpose of the customize directory is to make it easier to upgrade CryptPad
|
||||||
|
# - while maintaining customizations in place. Occasionally, a major new version may
|
||||||
|
# - introduce breaking changes or require adjustments in the customizations.
|
||||||
|
# - Administrators with customized instances are therefore encouraged to read
|
||||||
|
# - instructions carefully before each upgrade.
|
||||||
|
# -
|
||||||
|
mkdir -p ${cryptpad_install_dir}/cryptpad/customize
|
||||||
|
|
||||||
|
# - Application config
|
||||||
|
# -
|
||||||
|
# - A wide range of settings are available in www/common/application_config_internal.js.
|
||||||
|
# - To modify them:
|
||||||
|
# -
|
||||||
|
# - 1. Make a copy of customize.dist/application_config.js in the customize folder.
|
||||||
|
# -
|
||||||
|
# - 2. Copy the default value(s) to modify from www/common/application_config_internal.js
|
||||||
|
# - into customize/application_config.js.
|
||||||
|
# -
|
||||||
|
cp ${cryptpad_install_dir}/customize.dist/application_config.js ${cryptpad_install_dir}/customize/
|
||||||
|
|
||||||
|
|
||||||
|
# - Restricting guest access
|
||||||
|
# -
|
||||||
|
# - To disable unregistered use of CryptPad, add the following to
|
||||||
|
# - customize/application_config.js:
|
||||||
|
# -
|
||||||
|
# - AppConfig.registeredOnlyTypes = AppConfig.availablePadTypes;
|
||||||
|
|
||||||
|
# ---
|
||||||
|
# - for further configurations see:
|
||||||
|
# - https://docs.cryptpad.org/en/admin_guide/customization.html#application-config
|
||||||
|
# ---
|
||||||
|
|
||||||
|
|
||||||
# - Customizing CryptPad
|
# - Customizing CryptPad
|
||||||
# -
|
# -
|
||||||
# - In order allow a variety of features to be changed and to allow site-specific
|
# - In order allow a variety of features to be changed and to allow site-specific
|
||||||
@ -145,22 +232,20 @@ perl -i -n -p -e"s#(\s*)(/*\s*)(defaultStorageLimit:.*)#\1//\3\n\1defaultStorage
|
|||||||
# - '/customize.dist/' to '/customize' and then edit it there, this way you will
|
# - '/customize.dist/' to '/customize' and then edit it there, this way you will
|
||||||
# - still be able to pull from (and make pull requests to (!) the git repository.
|
# - still be able to pull from (and make pull requests to (!) the git repository.
|
||||||
# -
|
# -
|
||||||
cp -a /var/www/cryptpad/customize.dist /var/www/cryptpad/customize
|
#cp -a ${cryptpad_install_dir}/customize.dist ${cryptpad_install_dir}/cryptpad/customize
|
||||||
|
|
||||||
# - Copy 'favicon.ico' to '/var/www/cryptpad/customize/main-favicon.png'
|
|
||||||
# -
|
|
||||||
#cp ~chris/favicon.ico /var/www/cryptpad/customize/main-favicon.png
|
|
||||||
#cp ~chris/favicon.ico /var/www/cryptpad/customize.dist/
|
|
||||||
#chown www-data:www-data /var/www/cryptpad/customize/main-favicon.png
|
|
||||||
#chown www-data:www-data /var/www/cryptpad/customize.dist/favicon.ico
|
|
||||||
|
|
||||||
|
|
||||||
# Build static pages & Open Graph metadata
|
# Install OnlyOffice - OnlyOffice is now a separate module
|
||||||
#
|
#
|
||||||
# To build some of CryptPad static pages & enable social media link previews,
|
# OnlyOffice applications (Sheets, Document, Presentation) are not bundled with CryptPad
|
||||||
# run the following command:
|
# anymore. You can install/update them by running the installation script we provide:
|
||||||
#
|
#
|
||||||
npm run build
|
# ./install-onlyoffice.sh
|
||||||
|
# # press q to close the license screen
|
||||||
|
# # and Y ⏎ to accept the OnlyOffice license
|
||||||
|
#
|
||||||
|
./install-onlyoffice.sh
|
||||||
|
|
||||||
|
|
||||||
# Exit from cryptpad user
|
# Exit from cryptpad user
|
||||||
#
|
#
|
||||||
@ -359,6 +444,11 @@ server {
|
|||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
ln -s ../sites-available/${vhost_config_file} /etc/nginx/sites-enabled/${vhost_config_file}
|
||||||
|
|
||||||
|
nginx -t
|
||||||
|
systemctl restart nginx
|
||||||
|
|
||||||
|
|
||||||
# ---
|
# ---
|
||||||
# Basic Check of your configuration:
|
# Basic Check of your configuration:
|
||||||
|
@ -3,44 +3,68 @@
|
|||||||
# - Upgrading CryptPad
|
# - Upgrading CryptPad
|
||||||
# ====================
|
# ====================
|
||||||
|
|
||||||
|
# see: https://docs.cryptpad.org/en/admin_guide/maintenance.html#upgrading-cryptpad
|
||||||
|
|
||||||
# - Note!
|
# - Note!
|
||||||
# -
|
# -
|
||||||
# - Always read the release notes before upgrading, as there may be changes
|
# - Always read the release notes before upgrading, as there may be changes
|
||||||
# - that require special consideration.
|
# - that require special consideration.
|
||||||
|
|
||||||
|
|
||||||
|
cryptpad_user=cryptpad
|
||||||
|
|
||||||
|
|
||||||
# - Stop cryptpad
|
# - Stop cryptpad
|
||||||
# -
|
# -
|
||||||
systemctl stop cryptpad
|
systemctl stop cryptpad
|
||||||
|
|
||||||
|
|
||||||
|
# Stop iptables firewall
|
||||||
|
#
|
||||||
|
ipt-firewall-server flush
|
||||||
|
ip6t-firewall-server flush
|
||||||
|
|
||||||
|
|
||||||
|
# Login as CryptPad user
|
||||||
|
#
|
||||||
|
su - ${cryptpad_user}
|
||||||
|
|
||||||
|
|
||||||
# - Backup existing installation
|
# - Backup existing installation
|
||||||
# -
|
# -
|
||||||
cp -a /var/www/cryptpad /var/www/cryptpad.BAK.$(date +%Y-%m-%d-%H%M)
|
cp -a cryptpad cryptpad.BAK.$(date +%Y-%m-%d-%H%M)
|
||||||
|
|
||||||
|
|
||||||
# - Change into installation directory
|
# - Change into installation directory
|
||||||
# -
|
# -
|
||||||
cd /var/www/cryptpad
|
cd cryptpad
|
||||||
|
|
||||||
# - Update Git repository
|
# - Update Git repository
|
||||||
# -
|
# -
|
||||||
su www-data -s /bin/bash -c "git pull"
|
git pull
|
||||||
|
npm update
|
||||||
|
npm run install:components
|
||||||
|
|
||||||
# - Update 'npm'
|
|
||||||
# -
|
|
||||||
su www-data -s /bin/bash -c "npm update"
|
|
||||||
|
|
||||||
# - Update 'bower'
|
# OnlyOffice is now a separate module
|
||||||
# -
|
#
|
||||||
su www-data -s /bin/bash -c "bower update"
|
# OnlyOffice applications (Sheets, Document, Presentation) are not bundled with CryptPad
|
||||||
|
# anymore. You can install/update them by running the installation script we provide:
|
||||||
|
#
|
||||||
|
# ./install-onlyoffice.sh
|
||||||
|
# # press q to close the license screen
|
||||||
|
# # and Y ⏎ to accept the OnlyOffice license
|
||||||
|
#
|
||||||
|
./install-onlyoffice.sh
|
||||||
|
|
||||||
# - Maybe more updates
|
|
||||||
# -
|
exit
|
||||||
╭─────────────────────────────────────╮
|
|
||||||
│ │
|
|
||||||
│ Update available 1.8.4 → 1.8.8 │
|
# Restart firewll
|
||||||
│ Run npm i -g bower to update │
|
#
|
||||||
│ │
|
ipt-firewall-server
|
||||||
╰─────────────────────────────────────╯
|
ip6t-firewall-server
|
||||||
|
|
||||||
|
|
||||||
# - Start cryptpad
|
# - Start cryptpad
|
||||||
|
49
README.upgrade.00
Normal file
49
README.upgrade.00
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
|
||||||
|
# ====================
|
||||||
|
# - Upgrading CryptPad
|
||||||
|
# ====================
|
||||||
|
|
||||||
|
# - Note!
|
||||||
|
# -
|
||||||
|
# - Always read the release notes before upgrading, as there may be changes
|
||||||
|
# - that require special consideration.
|
||||||
|
|
||||||
|
# - Stop cryptpad
|
||||||
|
# -
|
||||||
|
systemctl stop cryptpad
|
||||||
|
|
||||||
|
|
||||||
|
# - Backup existing installation
|
||||||
|
# -
|
||||||
|
cp -a /var/www/cryptpad /var/www/cryptpad.BAK.$(date +%Y-%m-%d-%H%M)
|
||||||
|
|
||||||
|
# - Change into installation directory
|
||||||
|
# -
|
||||||
|
cd /var/www/cryptpad
|
||||||
|
|
||||||
|
# - Update Git repository
|
||||||
|
# -
|
||||||
|
su www-data -s /bin/bash -c "git pull"
|
||||||
|
|
||||||
|
# - Update 'npm'
|
||||||
|
# -
|
||||||
|
su www-data -s /bin/bash -c "npm update"
|
||||||
|
|
||||||
|
# - Update 'bower'
|
||||||
|
# -
|
||||||
|
su www-data -s /bin/bash -c "bower update"
|
||||||
|
|
||||||
|
# - Maybe more updates
|
||||||
|
# -
|
||||||
|
╭─────────────────────────────────────╮
|
||||||
|
│ │
|
||||||
|
│ Update available 1.8.4 → 1.8.8 │
|
||||||
|
│ Run npm i -g bower to update │
|
||||||
|
│ │
|
||||||
|
╰─────────────────────────────────────╯
|
||||||
|
|
||||||
|
|
||||||
|
# - Start cryptpad
|
||||||
|
# -
|
||||||
|
systemctl start cryptpad
|
||||||
|
|
Reference in New Issue
Block a user