No description
- JavaScript 70.3%
- Shell 18.2%
- Dockerfile 8.4%
- Makefile 3.1%
|
All checks were successful
/ build-and-push-image (push) Successful in 11m31s
|
||
|---|---|---|
| .forgejo/workflows | ||
| .vscode | ||
| example-config | ||
| .dockerignore | ||
| .gitignore | ||
| Dockerfile | ||
| entrypoint.sh | ||
| LICENSE | ||
| Makefile | ||
| README.md | ||
| setup.sh | ||
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 nginxset_real_ip_from, defaults to 0.0.0.0API_DOMAIN- (Optional) API domain, defaults to MAIN_DOMAINFILES_DOMAIN- (Optional) Files domain, defaults to MAIN_DOMAININSTALL_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 filesblock/- User credentialscustomize/- Custom configurationdata/- CryptPad runtime datafiles/- Document storage (datastore)
Ports
- 3000 - HTTP server
- 3003 - WebSocket server
License
CryptPad is licensed under AGPL-3.0-or-later.