Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ matrix.server1.example.org -> IP of your server
chat.server1.example.org -> IP of your server
peertube.server1.example.org -> IP of your server
social.server1.example.org -> IP of your server
cryptpad.server1.example.org -> IP of your server
sandbox.server1.example.org -> IP of your server
server1.example.org -> IP of your server
```

Expand Down
13 changes: 13 additions & 0 deletions conf/caddy/Caddyfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,19 @@ peertube.{$DWEB_DOMAIN}, https://peertube.{$DWEB_DOMAIN} {
reverse_proxy http://peertube-back:9000
}

(cryptpadheaders) {
header {
Strict-Transport-Security "max-age=63072000; includeSubDomains" always
}
}
cryptpad.{$DWEB_DOMAIN}, sandbox.{$DWEB_DOMAIN} {
reverse_proxy cryptpad:3000 {
header_up Host {upstream_hostport}
header_up Connection upgrade
}
import cryptpadheaders
}

social.{$DWEB_DOMAIN}, http://social.{$DWEB_ONION} {

root * /srv/mastodon/public
Expand Down
33 changes: 33 additions & 0 deletions conf/compose/cryptpad.docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
networks:
cryptpad:
services:
cryptpad:
image: "cryptpad/cryptpad:latest"
hostname: cryptpad

environment:
- CPAD_MAIN_DOMAIN=https://cryptpad.${DWEB_DOMAIN}
- CPAD_SANDBOX_DOMAIN=https://sandbox.${DWEB_DOMAIN}
- CPAD_CONF=/cryptpad/config/config.js

# Read and accept the license before uncommenting the following line:
# https://github.com/ONLYOFFICE/web-apps/blob/master/LICENSE.txt
- CPAD_INSTALL_ONLYOFFICE=yes

volumes:
- ../cryptpad/data/blob:/cryptpad/blob
- ../cryptpad/data/block:/cryptpad/block
- ../cryptpad/customize:/cryptpad/customize
- ../cryptpad/data/data:/cryptpad/data
- ../cryptpad/data/files:/cryptpad/datastore
- ../cryptpad/onlyoffice-dist:/cryptpad/www/common/onlyoffice/dist
- ../cryptpad/onlyoffice-conf:/cryptpad/onlyoffice-conf

networks:
- cryptpad

ulimits:
nofile:
soft: 1000000
hard: 1000000
2 changes: 2 additions & 0 deletions conf/compose/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ networks:
internal: true
peertube:
internal: true
cryptpad:
volumes:
caddy_data:
caddy_config:
Expand All @@ -30,6 +31,7 @@ services:
- synapse
- element
- peertube
- cryptpad
ports:
- target: 80
published: 80
Expand Down
Empty file added conf/cryptpad/.gitkeep
Empty file.
18 changes: 17 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,12 @@ peertube_config () {

}

cryptpad_config () {
mkdir -p $DCOMMS_DIR/conf/cryptpad/data/{blob,block,data,files} $DCOMMS_DIR/conf/cryptpad/customize $DCOMMS_DIR/conf/cryptpad/onlyoffice-dist $DCOMMS_DIR/conf/cryptpad/onlyoffice-conf
sudo chown -R 4001:4001 $DCOMMS_DIR/conf/cryptpad/*

}

mau_config () {
printf "${YELLOW}## Generating mau bot config${NC}\n"
docker run --rm --mount type=bind,src=$(readlink -f $DCOMMS_DIR/conf/mau),dst=/data dock.mau.dev/maubot/maubot:v0.3.1 1>&2 >/dev/null
Expand Down Expand Up @@ -225,7 +231,8 @@ main() {
"2" "Ceno Bridge" ON \
"3" "Maubot" OFF \
"4" "Mastodon" OFF \
"5" "Peertube" OFF 3>&1 1>&2 2>&3)
"5" "Peertube" OFF \
"6" "Cryptpad" OFF 3>&1 1>&2 2>&3)

if [ -z "$CHOICES" ]; then
echo "No option was selected (user hit Cancel or unselected all options)"
Expand Down Expand Up @@ -261,6 +268,11 @@ main() {
PEERTUBE=true
DNS_RECORD="${DNS_RECORD}Peertube $(dig +short "peertube.$DWEB_DOMAIN")\n"
;;
"6")
COMPOSE_FILES+="-f ./conf/compose/cryptpad.docker-compose.yml "
CRYPTPAD=true
DNS_RECORD="${DNS_RECORD}Cryptpad $(dig +short "cryptpad.$DWEB_DOMAIN")\n"
;;
*)
echo "Unsupported item $CHOICE!" >&2
exit 1
Expand Down Expand Up @@ -330,6 +342,10 @@ main() {
if [[ "${PEERTUBE}" == true ]]; then
peertube_config
fi
if [[ "${CRYPTPAD}" == true ]]; then
cryptpad_config
fi

echo "sudo DWEB_ONION=$DWEB_ONION DWEB_DOMAIN=$DWEB_DOMAIN DWEB_FRIENDLY_DOMAIN=$DWEB_FRIENDLY_DOMAIN docker compose $COMPOSE_FILES up -d" >> $DCOMMS_DIR/run.sh
chmod +x $DCOMMS_DIR/run.sh
printf "${GREEN} dComms succesfully installed! Start your services by running 'run.sh' in $DCOMMS_DIR.${NC}\n"
Expand Down