2024.9.1 (#38)

- Update to version 2024.9.1
- Applied styling guide

Co-authored-by: meaz <meaz@disroot.org>
Reviewed-on: #38
Reviewed-by: meaz <meaz@no-reply@disroot.org>
Co-authored-by: muppeth <muppeth@disroot.org>
Co-committed-by: muppeth <muppeth@disroot.org>
This commit is contained in:
muppeth 2024-12-03 21:13:13 +01:00 committed by muppeth
parent 9fa1cf0292
commit 896043539c
16 changed files with 299 additions and 273 deletions

6
.ansible-lint Normal file
View file

@ -0,0 +1,6 @@
skip_list:
- fqcn-builtins
- fqcn[action]
- fqcn[action-core]
- fqcn[canonical]
- name[casing]

View file

@ -1,10 +1,11 @@
---
- hosts: cryptpad
- name: 'Cryptpad playbook'
hosts: 'cryptpad'
roles:
- nginx
- node
- cryptpad
- 'nginx'
- 'node'
- 'cryptpad'
vars_files:
- ../defaults/main.yml

View file

@ -1,88 +1,87 @@
---
cryptpad_extra_files_path: '../customize'
cryptpad_logo_name: 'logo.svg'
cryptpad_user: 'cryptpad'
cryptpad_group: 'cryptpad'
cryptpad_pkg:
- git
- rdfind # needed by install-onlyoffice.sh to save ~650MB of disk space
- git
- rdfind # needed by install-onlyoffice.sh to save ~650MB of disk space
# Nodejs
node_version: '16'
cryptpad_path: '/var/www/cryptpad'
cryptpad_version: "2024.9.0"
cryptpad_version: "2024.9.1"
# Config.js
cryptpad_httpUnsafeOrigin: "https://cryptpad.example.org"
cryptpad_httpSafeOrigin: ''
cryptpad_httpAddress: "::"
cryptpad_httpPort: "3000"
#cryptpad_httpSafePort: "3001" #uncomment if you use non-default port
cryptpad_websocketPort: "3003"
cryptpad_maxWorkers: "4"
cryptpad_logIP: "false"
cryptpad_adminKeys:
- "[cryptpad-user1@my.awesome.website/eglegkejfizu#otoUFng55s64Are856URjvAHGGv-89=]"
- "[cryptpad-user2@my.awesome.website/jA-9c5iNuG7SyxzGCjwJXVnk5NPfAOO8fQuQ0dC83RE=]"
cryptpad_adminEmail: "i.did.not.read.my.config@cryptpad.fr"
cryptpad_removeDonateButton: "false"
cryptpad_blockDailyCheck: "true"
cryptpad_defaultStorageLimit: "50 * 1024 * 1024" # 50 MB
cryptpad_inactiveTime: "90" # in days
cryptpad_archiveRetentionTime: "15" # in days
cryptpad_accountRetentionTime: "365" # in days
cryptpad_disableIntegratedEviction: "true"
cryptpad_maxUploadSize: "20 * 1024 * 1024" # 20 MB
cryptpad_premiumUploadSize: "100 * 1024 * 1024" # 100 MB
cryptpad_filePath: "./datastore/"
cryptpad_archivePath: "./data/archive"
cryptpad_pinPath: "./data/pins"
cryptpad_taskPath: "./data/tasks"
cryptpad_blockPath: "./block"
cryptpad_blobPath: "./blob"
cryptpad_blobStagingPath: "./data/blobstage"
cryptpad_decreePath: "./data/decrees"
cryptpad_logPath: "./data/logs"
cryptpad_logToStdout: "false"
cryptpad_logLevel: "info"
cryptpad_logFeedback: "false"
cryptpad_http_unsafe_origin: "https://cryptpad.example.org"
cryptpad_http_safe_origin: ''
cryptpad_http_address: "::"
cryptpad_http_port: "3000"
# cryptpad_httpSafePort: "3001" #uncomment if you use non-default port
cryptpad_websocket_port: "3003"
cryptpad_max_workers: "4"
cryptpad_log_ip: "false"
cryptpad_admin_keys:
- "[cryptpad-user1@my.awesome.website/eglegkejfizu#otoUFng55s64Are856URjvAHGGv-89=]"
- "[cryptpad-user2@my.awesome.website/jA-9c5iNuG7SyxzGCjwJXVnk5NPfAOO8fQuQ0dC83RE=]"
cryptpad_admin_email: "i.did.not.read.my.config@cryptpad.fr"
cryptpad_remove_donate_button: "false"
cryptpad_block_daily_check: "true"
cryptpad_default_storage_limit: "50 * 1024 * 1024" # 50 MB
cryptpad_inactive_time: "90" # in days
cryptpad_archive_retention_time: "15" # in days
cryptpad_account_retention_time: "365" # in days
cryptpad_disable_integrated_eviction: "true"
cryptpad_max_upload_size: "20 * 1024 * 1024" # 20 MB
cryptpad_premium_upload_size: "100 * 1024 * 1024" # 100 MB
cryptpad_file_path: "./datastore/"
cryptpad_archive_path: "./data/archive"
cryptpad_pin_path: "./data/pins"
cryptpad_task_path: "./data/tasks"
cryptpad_block_path: "./block"
cryptpad_blob_path: "./blob"
cryptpad_blob_staging_path: "./data/blobstage"
cryptpad_decree_path: "./data/decrees"
cryptpad_log_path: "./data/logs"
cryptpad_log_to_stdout: "false"
cryptpad_log_level: "info"
cryptpad_log_feedback: "false"
cryptpad_verbose: "false"
cryptpad_otpSessionExpiration: "7*24"
cryptpad_enforceMFA: "false"
cryptpad_otp_session_expiration: "7*24"
cryptpad_enforce_mfa: "false"
cryptpad_LimitNOFILE: "1000000"
cryptpad_limit_nofile: "1000000"
# Appication_config_internal.js
cryptpad_AppConfig_imprint: 'false'
cryptpad_AppConfig_privacy: 'false'
cryptpad_AppConfig_terms: 'false'
cryptpad_AppConfig_status: 'false'
cryptpad_app_config_imprint: 'false'
cryptpad_app_config_privacy: 'false'
cryptpad_app_config_terms: 'false'
cryptpad_app_config_status: 'false'
#nginx
# nginx
nginx_default_vhost: 'cryptpad'
nginx_www_dir: '/var/www/'
ssl_src_path: '/etc/letsencrypt/live'
nginx_gen_dh: 'true'
nginx_vhosts:
- name: 'cryptpad.example.org'
template: 'cryptpad'
proto: 'https'
listen: '443'
http2: true
root: 'cryptpad'
use_access_log: 'true'
use_error_log: 'true'
nginx_error_log_level: 'warn'
header_csp: 'none'
header_cto: 'none'
state: 'enable'
letsencrypt: 'false'
selfsigned: 'true'
ssl_name: 'cryptpad.example.org'
proxy_pass: 'localhost'
- name: 'cryptpad.example.org'
template: 'cryptpad'
proto: 'https'
listen: '443'
http2: true
root: 'cryptpad'
use_access_log: 'true'
use_error_log: 'true'
nginx_error_log_level: 'warn'
header_csp: 'none'
header_cto: 'none'
state: 'enable'
letsencrypt: 'false'
selfsigned: 'true'
ssl_name: 'cryptpad.example.org'
proxy_pass: 'localhost'

View file

@ -1,6 +1,6 @@
---
- name: restart cryptpad
- name: 'Restart cryptpad'
service:
name: cryptpad
state: restarted
name: 'cryptpad'
state: 'restarted'

View file

@ -1,11 +1,12 @@
---
- name: "[Check] - Check what cryptpad version is already installed"
shell:
cmd: grep -m 1 version {{ cryptpad_path }}/package-lock.json | awk -F\" '{print $4}'
register: cryptpad_version_installed
command:
cmd: bash -c "grep -m 1 version {{ cryptpad_path }}/package-lock.json | awk -F'\"' '{print $4}'"
#grep -m 1 version {{ cryptpad_path }}/package-lock.json | awk -F\" '{print $4}'
register: 'cryptpad_version_installed'
- name: "[Check] - node_modules folder exists"
- name: '[Check] - node_modules folder exists'
stat:
path: "{{ cryptpad_path }}/node_modules"
register: node_modules_folder
path: '{{ cryptpad_path }}/node_modules'
register: 'node_modules_folder'

View file

@ -1,65 +1,74 @@
---
- name: "[Config] - Deploy cryptpad configuration"
- name: '[Config] - Deploy cryptpad configuration'
template:
src: config/config.js.j2
dest: "{{ cryptpad_path }}/config/config.js"
owner: "{{ cryptpad_user }}"
group: "{{ cryptpad_group }}"
mode: 0755
become: yes
become_user: "{{ cryptpad_user }}"
notify: restart cryptpad
tags: customize
src: 'config/config.js.j2'
dest: '{{ cryptpad_path }}/config/config.js'
owner: '{{ cryptpad_user }}'
group: '{{ cryptpad_group }}'
mode: '0755'
become: true
become_user: '{{ cryptpad_user }}'
notify: 'Restart cryptpad'
tags:
- 'customize'
- name: "[Config] - Create customize folder"
- name: '[Config] - Create customize folder'
file:
path: "{{ cryptpad_path }}/customize/"
path: '{{ cryptpad_path }}/customize/'
state: 'directory'
owner: '{{ cryptpad_user }}'
group: '{{ cryptpad_group }}'
become: yes
become_user: "{{ cryptpad_user }}"
tags: customize
mode: '0744'
become: true
become_user: '{{ cryptpad_user }}'
tags:
- 'customize'
- name: "[Config] - Deploy customize folder"
- name: '[Config] - Deploy customize folder'
copy:
src: '{{ cryptpad_extra_files_path }}/'
dest: "{{ cryptpad_path }}/customize/"
owner: "{{ cryptpad_user }}"
group: "{{ cryptpad_group }}"
mode: 0755
become: yes
become_user: "{{ cryptpad_user }}"
notify: restart cryptpad
tags: customize
dest: '{{ cryptpad_path }}/customize/'
owner: '{{ cryptpad_user }}'
group: '{{ cryptpad_group }}'
mode: '0744'
become: true
become_user: '{{ cryptpad_user }}'
notify:
- 'Restart cryptpad'
tags:
- 'customize'
- name: "[Config] - Deploy cryptpad application configuration"
- name: '[Config] - Deploy cryptpad application configuration'
template:
src: customize/application_config.js.j2
dest: "{{ cryptpad_path }}/customize/application_config.js"
owner: "{{ cryptpad_user }}"
group: "{{ cryptpad_group }}"
mode: 0755
become: yes
become_user: "{{ cryptpad_user }}"
notify: restart cryptpad
tags: customize
src: 'customize/application_config.js.j2'
dest: '{{ cryptpad_path }}/customize/application_config.js'
owner: '{{ cryptpad_user }}'
group: '{{ cryptpad_group }}'
mode: '0755'
become: true
become_user: '{{ cryptpad_user }}'
notify:
- 'Restart cryptpad'
tags:
- 'customize'
- name: "[Config] - Generate static pages"
shell:
cmd: "npm run build"
- name: '[Config] - Generate static pages'
command:
cmd: 'npm run build'
args:
chdir: "{{ cryptpad_path }}"
become: yes
become_user: "{{ cryptpad_user }}"
tags: customize
chdir: '{{ cryptpad_path }}'
become: true
become_user: '{{ cryptpad_user }}'
tags:
- 'customize'
- name: "[Config] - Copy logo"
- name: '[Config] - Copy logo'
copy:
src: '{{ cryptpad_extra_files_path }}/{{ cryptpad_logo_name }}'
dest: "{{ cryptpad_path }}/customize/CryptPad_logo_hero.svg"
owner: "{{ cryptpad_user }}"
group: "{{ cryptpad_group }}"
become: yes
become_user: "{{ cryptpad_user }}"
src: '{{ cryptpad_extra_files_path }}/{{ cryptpad_logo_name }}'
dest: '{{ cryptpad_path }}/customize/CryptPad_logo_hero.svg'
owner: '{{ cryptpad_user }}'
group: '{{ cryptpad_group }}'
mode: '0744'
become: true
become_user: '{{ cryptpad_user }}'

View file

@ -2,25 +2,27 @@
- name: '[GIT] - Clone git repo'
git:
repo: https://github.com/xwiki-labs/cryptpad.git
repo: 'https://github.com/xwiki-labs/cryptpad.git'
dest: '{{ cryptpad_path }}'
force: true
version: "{{ cryptpad_version}}"
version: '{{ cryptpad_version }}'
become: true
become_user: "{{ cryptpad_user }}"
register: result
become_user: '{{ cryptpad_user }}'
register: 'result'
retries: 3
delay: 15
until: result is not failed
until: 'result is not failed'
- name: '[GIT] - Clone Cryptpad-Sodium plugin'
git:
repo: https://github.com/cryptpad/cryptpad-sodium-plugin
repo: 'https://github.com/cryptpad/cryptpad-sodium-plugin'
dest: '{{ cryptpad_path }}/lib/plugins/sodium'
version: 'main'
force: true
update: true
become: true
become_user: '{{ cryptpad_user }}'
register: result
register: 'result'
retries: 3
delay: 15
until: result is not failed
until: 'result is not failed'

View file

@ -1,37 +1,41 @@
---
- name: "[Install] - Download all dependencies"
shell:
cmd: "npm install"
- name: '[Install] - Download all dependencies'
command:
cmd: 'npm install'
args:
chdir: "{{ cryptpad_path }}"
become: yes
become_user: "{{ cryptpad_user }}"
notify: restart cryptpad
chdir: '{{ cryptpad_path }}'
become: true
become_user: '{{ cryptpad_user }}'
notify:
- 'Restart cryptpad'
- name: "[Install] - Copy client-side dependencies"
shell:
cmd: "npm run install:components"
- name: '[Install] - Copy client-side dependencies'
command:
cmd: 'npm run install:components'
args:
chdir: "{{ cryptpad_path }}"
become: yes
become_user: "{{ cryptpad_user }}"
notify: restart cryptpad
chdir: '{{ cryptpad_path }}'
become: true
become_user: '{{ cryptpad_user }}'
notify:
- 'Restart cryptpad'
- name: "[Install] - Install onlyoffice"
shell:
cmd: "./install-onlyoffice.sh --accept-license"
- name: '[Install] - Install onlyoffice'
command:
cmd: './install-onlyoffice.sh --accept-license'
args:
chdir: "{{ cryptpad_path }}"
become: yes
become_user: "{{ cryptpad_user }}"
notify: restart cryptpad
chdir: '{{ cryptpad_path }}'
become: true
become_user: '{{ cryptpad_user }}'
notify:
- 'Restart cryptpad'
- name: '[Install] - Install Cryptad sodium plugin'
shell:
command:
cmd: 'npm ci'
args:
chdir: '{{ cryptpad_path }}/lib/plugins/sodium'
become: true
become_user: '{{ cryptpad_user }}'
notify: restart cryptpad
notify:
- 'Restart cryptpad'

View file

@ -1,7 +1,6 @@
---
- name: "[Dependencies] - Install Dependencies"
- name: '[Dependencies] - Install Dependencies'
apt:
name: "{{ cryptpad_pkg }}"
update_cache: yes
state: latest
name: '{{ cryptpad_pkg }}'
update_cache: true

View file

@ -1,28 +1,29 @@
---
- name: Check version installed
include_tasks: check.yml
- name: 'Check version installed'
include_tasks: 'check.yml'
- name: Create user
include_tasks: user.yml
- name: 'Create user'
include_tasks: 'user.yml'
- name: Install dependencies
include_tasks: installdeps.yml
- name: 'Install dependencies'
include_tasks: 'installdeps.yml'
- name: Clone git repo
include_tasks: git.yml
- name: 'Clone git repo'
include_tasks: 'git.yml'
- name: Install cryptpad
include_tasks: install.yml
- name: 'Install cryptpad'
include_tasks: 'install.yml'
when: not node_modules_folder.stat.exists
- name: Deploy config
include_tasks: config.yml
tags: customize
- name: 'Deploy config'
include_tasks: 'config.yml'
tags:
- 'customize'
- name: Systemd
include_tasks: systemd.yml
- name: 'Systemd'
include_tasks: 'systemd.yml'
- name: Update cryptpad
include_tasks: update.yml
when: (cryptpad_version not in cryptpad_version_installed.stdout) and (node_modules_folder.stat.exists)
- name: 'Update cryptpad'
include_tasks: 'update.yml'
when: (cryptpad_version not in cryptpad_version_installed.stdout) and (node_modules_folder.stat.exists)

View file

@ -1,24 +1,24 @@
---
- name: "[SYSTEMD] - Deploy Systemd config"
- name: '[SYSTEMD] - Deploy Systemd config'
template:
src: etc/systemd/system/cryptpad.service.j2
dest: /etc/systemd/system/cryptpad.service
owner: root
group: root
mode: 0644
register: cryptpad
src: 'etc/systemd/system/cryptpad.service.j2'
dest: '/etc/systemd/system/cryptpad.service'
owner: 'root'
group: 'root'
mode: '0644'
register: 'cryptpad'
- name: "[SYSTEMD] - Enable systemd"
- name: '[SYSTEMD] - Enable systemd'
service:
name: cryptpad
enabled: yes
state: started
name: 'cryptpad'
enabled: true
state: 'started'
notify:
restart cryptpad
- 'Restart cryptpad'
- name: "[SYSTEMD] - Daemon-reload"
- name: '[SYSTEMD] - Daemon-reload'
systemd:
daemon_reload: yes
name: cryptpad
daemon_reload: true
name: 'cryptpad'
when: cryptpad.changed

View file

@ -1,58 +1,62 @@
---
- name: "[Update] - Stop Cryptpad"
- name: '[Update] - Stop Cryptpad'
service:
name: cryptpad
state: stopped
name: 'cryptpad'
state: 'stopped'
- name: "[Update] - Download all dependencies"
shell:
cmd: "npm ci"
- name: '[Update] - Download all dependencies'
command:
cmd: 'npm ci'
args:
chdir: "{{ cryptpad_path }}"
become: yes
become_user: "{{ cryptpad_user }}"
notify: restart cryptpad
chdir: '{{ cryptpad_path }}'
become: true
become_user: '{{ cryptpad_user }}'
notify:
- 'Restart cryptpad'
- name: "[Update] - Copy client-side dependencies"
shell:
cmd: "npm run install:components"
- name: '[Update] - Copy client-side dependencies'
command:
cmd: 'npm run install:components'
args:
chdir: "{{ cryptpad_path }}"
become: yes
become_user: "{{ cryptpad_user }}"
notify: restart cryptpad
chdir: '{{ cryptpad_path }}'
become: true
become_user: '{{ cryptpad_user }}'
notify:
- 'Restart cryptpad'
- name: "[Update] - Install onlyoffice"
shell:
cmd: "./install-onlyoffice.sh --accept-license"
- name: '[Update] - Install onlyoffice'
command:
cmd: './install-onlyoffice.sh --accept-license'
args:
chdir: "{{ cryptpad_path }}"
become: yes
become_user: "{{ cryptpad_user }}"
notify: restart cryptpad
chdir: '{{ cryptpad_path }}'
become: true
become_user: '{{ cryptpad_user }}'
notify:
- 'Restart cryptpad'
- name: "[Update] - Generate static pages"
shell:
cmd: "npm run build"
- name: '[Update] - Generate static pages'
command:
cmd: 'npm run build'
args:
chdir: "{{ cryptpad_path }}"
become: yes
become_user: "{{ cryptpad_user }}"
chdir: '{{ cryptpad_path }}'
become: true
become_user: '{{ cryptpad_user }}'
- name: "[Update] - Generate static pages"
shell:
cmd: "npm run build"
- name: '[Update] - Generate static pages'
command:
cmd: 'npm run build'
args:
chdir: "{{ cryptpad_path }}"
become: yes
become_user: "{{ cryptpad_user }}"
chdir: '{{ cryptpad_path }}'
become: true
become_user: '{{ cryptpad_user }}'
- name: '[Install] - Install Cryptad sodium plugin'
shell:
command:
cmd: 'npm ci'
args:
chdir: '{{ cryptpad_path }}/lib/plugins/sodium'
become: true
become_user: '{{ cryptpad_user }}'
notify: restart cryptpad
notify:
- 'Restart cryptpad'

View file

@ -1,17 +1,17 @@
---
- name: "[USER] - Add group"
- name: '[USER] - Add group'
group:
name: '{{ cryptpad_group }}'
state: present
state: 'present'
- name: "[USER] - Add user cryptpad"
- name: '[USER] - Add user cryptpad'
user:
name: '{{ cryptpad_user }}'
shell: /bin/bash
shell: '/bin/bash'
group: '{{ cryptpad_group }}'
#home: '{{ cryptpad_path }}'
state: present
# home: '{{ cryptpad_path }}'
state: 'present'
- name: '[USER] - Change ownership to cryptpad user'
file:
@ -19,4 +19,4 @@
owner: '{{ cryptpad_user }}'
group: '{{ cryptpad_group }}'
state: directory
recurse: yes
recurse: true

View file

@ -48,7 +48,7 @@ module.exports = {
* cryptpad/docs/example.nginx.conf (see the $main_domain variable)
*
*/
httpUnsafeOrigin: '{{ cryptpad_httpUnsafeOrigin }}',
httpUnsafeOrigin: '{{ cryptpad_http_unsafe_origin }}',
/* httpSafeOrigin is the URL that is used for the 'sandbox' described above.
* If you're testing or developing with CryptPad on your local machine then
@ -69,7 +69,7 @@ module.exports = {
*
* CUSTOMIZE AND UNCOMMENT THIS FOR PRODUCTION INSTALLATIONS.
*/
httpSafeOrigin: "{{ cryptpad_httpSafeOrigin }}",
httpSafeOrigin: "{{ cryptpad_http_safe_origin }}",
/* httpAddress specifies the address on which the nodejs server
* should be accessible. By default it will listen on localhost
@ -77,7 +77,7 @@ module.exports = {
* a specific address, specify it here. e.g '192.168.0.1'
*
*/
httpAddress: '{{ cryptpad_httpAddress }}',
httpAddress: '{{ cryptpad_http_address }}',
/* httpPort specifies on which port the nodejs server should listen.
* By default it will serve content over port 3000, which is suitable
@ -85,7 +85,7 @@ module.exports = {
* which will proxy websocket traffic to your node server.
*
*/
httpPort: {{ cryptpad_httpPort }},
httpPort: {{ cryptpad_http_port }},
/* httpSafePort purpose is to emulate another origin for the sandbox when
* you don't have two domains at hand (i.e. when httpSafeOrigin not defined).
@ -109,7 +109,7 @@ module.exports = {
* to this port.
*
*/
websocketPort: {{ cryptpad_websocketPort }},
websocketPort: {{ cryptpad_websocket_port }},
/* CryptPad will launch a child process for every core available
* in order to perform CPU-intensive tasks in parallel.
@ -117,7 +117,7 @@ module.exports = {
* or you may want to limit how much computing power CryptPad can take.
* If so, set 'maxWorkers' to a positive integer.
*/
maxWorkers: {{ cryptpad_maxWorkers }},
maxWorkers: {{ cryptpad_max_workers }},
/* =====================
* Sessions
@ -131,7 +131,7 @@ module.exports = {
*
* defaults to 7 days
*/
otpSessionExpiration: {{ cryptpad_otpSessionExpiration }}, // hours
otpSessionExpiration: {{ cryptpad_otp_session_expiration }}, // hours
/* Registered users can be forced to protect their account
* with a Multi-factor Authentication (MFA) tool like a TOTP
@ -139,7 +139,7 @@ module.exports = {
*
* defaults to false
*/
enforceMFA: {{ cryptpad_enforceMFA }},
enforceMFA: {{ cryptpad_enforce_mfa }},
/* =====================
* Privacy
@ -154,7 +154,7 @@ module.exports = {
*
* defaults to false
*/
//logIP: {{ cryptpad_logIP }},
//logIP: {{ cryptpad_log_ip }},
/* =====================
* Admin
@ -173,7 +173,7 @@ module.exports = {
*
*/
adminKeys: [
{% for item in cryptpad_adminKeys %}
{% for item in cryptpad_admin_keys %}
"{{ item }}",
{% endfor %}
],
@ -201,12 +201,12 @@ module.exports = {
* You can disable any solicitations for donations by setting 'removeDonateButton' to true,
* but we'd appreciate it if you didn't!
*/
removeDonateButton: {{ cryptpad_removeDonateButton }},
removeDonateButton: {{ cryptpad_remove_donate_button }},
/* CryptPad will display a point of contact for your instance on its contact page
* (/contact.html) if you provide it below.
*/
adminEmail: '{{ cryptpad_adminEmail }}',
adminEmail: '{{ cryptpad_admin_email }}',
/*
* By default, CryptPad contacts one of our servers once a day.
@ -216,7 +216,7 @@ module.exports = {
*
* If you want to block this check-in and remain set 'blockDailyCheck' to true.
*/
blockDailyCheck: {{ cryptpad_blockDailyCheck }},
blockDailyCheck: {{ cryptpad_block_daily_check }},
/*
* By default users get 50MB of storage by registering on an instance.
@ -224,7 +224,7 @@ module.exports = {
*
* hint: 50MB is 50 * 1024 * 1024
*/
defaultStorageLimit: {{ cryptpad_defaultStorageLimit }},
defaultStorageLimit: {{ cryptpad_default_storage_limit }},
/* =====================
@ -239,7 +239,7 @@ module.exports = {
*
* defaults to 90 days if nothing is provided
*/
inactiveTime: {{ cryptpad_inactiveTime }}, // days
inactiveTime: {{ cryptpad_inactive_time }}, // days
/* CryptPad archives some data instead of deleting it outright.
* This archived data still takes up space and so you'll probably still want to
@ -254,7 +254,7 @@ module.exports = {
*
* defaults to 15 days if nothing is provided
*/
archiveRetentionTime: {{ cryptpad_archiveRetentionTime }},
archiveRetentionTime: {{ cryptpad_archive_retention_time }},
/* It's possible to configure your instance to remove data
* stored on behalf of inactive accounts. Set 'accountRetentionTime'
@ -264,7 +264,7 @@ module.exports = {
* Leave this value commented out to preserve all data stored
* by user accounts regardless of inactivity.
*/
accountRetentionTime: {{ cryptpad_accountRetentionTime }},
accountRetentionTime: {{ cryptpad_account_retention_time }},
/* Starting with CryptPad 3.23.0, the server automatically runs
* the script responsible for removing inactive data according to
@ -272,7 +272,7 @@ module.exports = {
* if you prefer not to remove inactive data, or if you prefer to
* do so manually using `scripts/evict-inactive.js`.
*/
disableIntegratedEviction: {{ cryptpad_disableIntegratedEviction }},
disableIntegratedEviction: {{ cryptpad_disable_integrated_eviction }},
/* Max Upload Size (bytes)
@ -280,14 +280,14 @@ module.exports = {
* anything larger than this size will be rejected
* defaults to 20MB if no value is provided
*/
maxUploadSize: {{ cryptpad_maxUploadSize }},
maxUploadSize: {{ cryptpad_max_upload_size }},
/* Users with premium accounts (those with a plan included in their customLimit)
* can benefit from an increased upload size limit. By default they are restricted to the same
* upload size as any other registered user.
*
*/
premiumUploadSize: {{ cryptpad_premiumUploadSize }},
premiumUploadSize: {{ cryptpad_premium_upload_size }},
/* =====================
* DATABASE VOLUMES
@ -298,7 +298,7 @@ module.exports = {
* Specify a directory where files should be stored.
* It will be created automatically if it does not already exist.
*/
filePath: '{{ cryptpad_filePath }}',
filePath: '{{ cryptpad_file_path }}',
/* CryptPad offers the ability to archive data for a configurable period
* before deleting it, allowing a means of recovering data in the event
@ -307,41 +307,41 @@ module.exports = {
* To set the location of this archive directory to a custom value, change
* the path below:
*/
archivePath: '{{ cryptpad_archivePath }}',
archivePath: '{{ cryptpad_archive_path }}',
/* CryptPad allows logged in users to request that particular documents be
* stored by the server indefinitely. This is called 'pinning'.
* Pin requests are stored in a pin-store. The location of this store is
* defined here.
*/
pinPath: '{{ cryptpad_pinPath }}',
pinPath: '{{ cryptpad_pin_path }}',
/* if you would like the list of scheduled tasks to be stored in
a custom location, change the path below:
*/
taskPath: '{{ cryptpad_taskPath }}',
taskPath: '{{ cryptpad_task_path }}',
/* if you would like users' authenticated blocks to be stored in
a custom location, change the path below:
*/
blockPath: '{{ cryptpad_blockPath }}',
blockPath: '{{ cryptpad_block_path }}',
/* CryptPad allows logged in users to upload encrypted files. Files/blobs
* are stored in a 'blob-store'. Set its location here.
*/
blobPath: '{{ cryptpad_blobPath }}',
blobPath: '{{ cryptpad_blob_path }}',
/* CryptPad stores incomplete blobs in a 'staging' area until they are
* fully uploaded. Set its location here.
*/
blobStagingPath: '{{ cryptpad_blobStagingPath }}',
blobStagingPath: '{{ cryptpad_blob_staging_path }}',
decreePath: '{{ cryptpad_decreePath }}',
decreePath: '{{ cryptpad_decree_path }}',
/* CryptPad supports logging events directly to the disk in a 'logs' directory
* Set its location here, or set it to false (or nothing) if you'd rather not log
*/
logPath: '{{ cryptpad_logPath }}',
logPath: '{{ cryptpad_log_path }}',
/* =====================
* Debugging
@ -350,7 +350,7 @@ module.exports = {
/* CryptPad can log activity to stdout
* This may be useful for debugging
*/
logToStdout: {{ cryptpad_logToStdout }},
logToStdout: {{ cryptpad_log_to_stdout }},
/* CryptPad can be configured to log more or less
* the various settings are listed below by order of importance
@ -363,7 +363,7 @@ module.exports = {
*
* This will affect both logging to the console and the disk.
*/
logLevel: '{{ cryptpad_logLevel }}',
logLevel: '{{ cryptpad_log_level }}',
/* clients can use the /settings/ app to opt out of usage feedback
* which informs the server of things like how much each app is being
@ -375,7 +375,7 @@ module.exports = {
* You will need to set your logLevel to include 'feedback'. Set this
* to false if you'd like to exclude feedback from your logs.
*/
logFeedback: {{ cryptpad_logFeedback }},
logFeedback: {{ cryptpad_log_feedback }},
/* CryptPad supports verbose logging
* (false by default)

View file

@ -22,24 +22,24 @@ define(['/common/application_config_internal.js'], function (AppConfig) {
* footer. Since this is different for each individual or organization there is
* no default value.
*/
AppConfig.imprint = '{{ cryptpad_AppConfig_imprint }}';
AppConfig.imprint = '{{ cryptpad_app_config_imprint }}';
/* You can display a link to your own privacy policy in the static pages footer.
* Since this is different for each individual or organization there is no default value.
*/
AppConfig.privacy = '{{ cryptpad_AppConfig_privacy }}';
AppConfig.privacy = '{{ cryptpad_app_config_privacy }}';
/* You can display a link to your instances's terms of service in the static pages footer.
* A default is included for backwards compatibility, but we recommend replacing this
* with your own terms.
*/
AppConfig.terms = '{{ cryptpad_AppConfig_terms }}';
AppConfig.terms = '{{ cryptpad_app_config_terms }}';
/* If you have a status page for your instance, you may use the setting belox
*
* See the comments above for a description of possible configurations.
*/
AppConfig.status = '{{ cryptpad_AppConfig_status }}';
AppConfig.status = '{{ cryptpad_app_config_status }}';
return AppConfig;
});

View file

@ -20,7 +20,7 @@ Environment='PWD="{{ cryptpad_path }}"'
# systemd sets the open file limit to 4000 unless you override it
# cryptpad stores its data with the filesystem, so you should increase this to match the value of `ulimit -n`
# or risk EMFILE errors.
LimitNOFILE={{ cryptpad_LimitNOFILE }}
LimitNOFILE={{ cryptpad_limit_nofile }}
# hardening directives as per https://www.freedesktop.org/software/systemd/man/systemd.exec.html
# check those with systemd-analyze security cryptpad.service for more information