cryptpad/documentation

Update Docker installation documentation due to 502 Bad Gateway Error with custom config.js

Closed this issue · 0 comments

Description

The user needs to create their own Config.js file from the example but doing so will create a 502 Bad Gateway error.
This is because of the need to add a user as an admin and you can only do so by creating a config.js file. However when you create this file it is more than just adding your main domain and sandbox domains.
See the Dockerfile that replaces httpAddress: '::' to '0.0.0.0' and installMethod: 'unspecified' to 'docker'

Steps to reproduce

  1. git clone https://github.com/cryptpad/cryptpad.git cryptpad
  2. docker build -t cryptpad/cryptpad:version-5.5.0 .
  3. mkdir -p ./data/blob ./data/block ./customize ./data/data ./data/files
  4. sudo chown -R 4001:4001 data customize
  5. Modify the docker-compose.yml file
  6. Add your two domains to CPAD_MAIN_DOMAIN and CPAD_SANDBOX_DOMAIN
  7. Adjust your NGINX proxy as necessary (I use SWAG, its easy)
  8. docker-compose up -d
  9. Create a user, retried the public key
  10. docker-compose down
  11. Copy the config.example.js to config.js
  12. map the config.js in docker-compose.yml - - ./config/config.js:/cryptpad/config/config.js
  13. docker-compose up -d
  14. 502 Bad Gateway

Relevant logs

There aren't any logs that are produced from this, which is why it took me hours to figure this out.

Expected behavior

The Docker Install Instructions just need to include the steps up to the point of getting a user's public key input into their custom config.js file.

cp ./config/config.example.js ./config/config.js
change the following:
httpUnsafeOrigin: < your primary domain >
httpSafeOrigin: < secondary or subdomain >
httpAddress: 0.0.0.0
installMethod: 'docker',
In the docker-compose.yml file map the config.js
volumes:

  • ./config/config.js:cryptpad/config/config.js

What opreating system are you using?

Other

What browsers are you seeing the problem on?

Google Chrome

Extensions

N/A

Version

5.5.0