No description
  • JavaScript 70.3%
  • Shell 18.2%
  • Dockerfile 8.4%
  • Makefile 3.1%
Find a file
Nathan Price 2075704e74
All checks were successful
/ build-and-push-image (push) Successful in 11m31s
simplify more
2026-01-07 20:53:50 -05:00
.forgejo/workflows refactor build-push.yml to use ubuntu-latest runner and remove development build step 2026-01-07 17:50:44 -05:00
.vscode init 2026-01-07 17:49:21 -05:00
example-config simplify more 2026-01-07 20:53:50 -05:00
.dockerignore update ignores 2025-08-17 18:15:00 -04:00
.gitignore update ignores 2025-08-17 18:15:00 -04:00
Dockerfile simplify more 2026-01-07 20:53:50 -05:00
entrypoint.sh simplify more 2026-01-07 20:53:50 -05:00
LICENSE add og license file 2025-08-16 22:04:09 -04:00
Makefile tell make to use bash 2025-08-17 18:23:27 -04:00
README.md simplify more 2026-01-07 20:53:50 -05:00
setup.sh simplify more 2026-01-07 20:53:50 -05:00

CryptPad Docker

CryptPad in Docker - designed to run behind a reverse proxy.

Architecture

Single Docker container running CryptPad Node.js application on port 3000.

  • Ports: 3000 (HTTP), 3003 (WebSocket)
  • User: Runs as cryptpad (UID 4001, GID 4001)

Quick Start

1. Run Setup Script

git clone https://code.modernleft.org/gravityfargo/cryptpad-aio-docker.git
cd cryptpad-aio-docker
chmod +x setup.sh
./setup.sh MAIN_DOMAIN SANDBOX_DOMAIN

Parameters:

  • MAIN_DOMAIN - Main domain for CryptPad (required)
  • SANDBOX_DOMAIN - Sandbox domain for security isolation (required)
  • PROXY_URL - (Optional) IP for nginx set_real_ip_from, defaults to 0.0.0.0
  • API_DOMAIN - (Optional) API domain, defaults to MAIN_DOMAIN
  • FILES_DOMAIN - (Optional) Files domain, defaults to MAIN_DOMAIN
  • INSTALL_ONLYOFFICE - (Optional) Install OnlyOffice, defaults to "no"

2. Start the Container

docker compose -f cryptpad/docker-compose.yml up -d

3. First Time Setup

Build Static Assets:

docker exec -it cryptpad npm run build

Customize Application Config

# Copy default config and set permissions
docker exec cryptpad cp /cryptpad/customize.dist/application_config.js /cryptpad/customize/application_config.js
sudo chown :$(whoami) cryptpad/data/customize/application_config.js
sudo chmod g+w cryptpad/data/customize/application_config.js

# Edit the file as needed
vim cryptpad/data/customize/application_config.js

# Restart to apply
docker compose -f cryptpad/docker-compose.yml restart

Add SSO Plugin (Optional):

docker exec cryptpad git clone https://github.com/cryptpad/sso/ lib/plugins/sso
docker exec -w /cryptpad/lib/plugins/sso cryptpad git checkout 0.4.0
docker compose -f cryptpad/docker-compose.yml restart

4. Create Admin Account

Watch logs:

docker logs --follow cryptpad

then go to as shown in the logs, e.g.: http://cryptpad.example.com/install/......

Visit your CryptPad instance and create your first admin account.

Configuration

Environment Variables

Variable Description Default
CPAD_MAIN_DOMAIN Main CryptPad domain (required)
CPAD_SANDBOX_DOMAIN Sandbox domain for isolation (required)
CPAD_INSTALL_ONLYOFFICE Install OnlyOffice integration no

Set in cryptpad/docker-compose.yml after running setup.sh.

Development

Build and test locally:

make build
TAG="local-latest" ./setup.sh dev.local dev-sandbox.local
docker compose -f cryptpad/docker-compose.yml up -d

# Clean up
make clean

The interface will be available at http://localhost:3000/.

Youll need to setup a ssl reverse proxy to test full functionality.

Volumes

Data is stored in ./cryptpad/data/:

  • blob/ - Uploaded files
  • block/ - User credentials
  • customize/ - Custom configuration
  • data/ - CryptPad runtime data
  • files/ - Document storage (datastore)

Ports

  • 3000 - HTTP server
  • 3003 - WebSocket server

License

CryptPad is licensed under AGPL-3.0-or-later.