To prepare your environment for development, simply run:
make setup
This will automatically:
- Install the Root CA certificate for HTTPS (MacOS or Linux)
- Add all required DNS entries from the project's hosts file to your
/etc/hosts
You will be prompted for your administrator password (sudo) if necessary.
Manual Setup (Advanced)
If you need to run steps individually, use the following commands:
make apply-hosts
Checks each entry in the project's hosts
file and adds only those missing to /etc/hosts
.
make install-root-ca
Installs the Root CA certificate for HTTPS. For MacOS, uses the security
command. For Linux, copies the certificate and runs update-ca-certificates
. For other systems, follow manual instructions.
Chrome on Linux doesn't get the CA certificate from the OS global repository. To add it manually follow the following instructions:
- Go to Chrome Settings/Privacy and Security
- Click Security and scroll down to "Manage Certificates"
- In Local Certificates, click Custom and next to Trusted Certificates click Import
- Import
/traefik/certs/ca/rootCA.crt
The compose runs only synapse and element by default, so you can run rocket.chat via localhost development mode:
docker compose up
By passing the profile flag you can spin up a rocket.chat container included
docker compose --profile rc1 up
By passing the profile all
it will spin up 2 rocket.chat instances and a second synapse hs2
docker compose --profile all up
- rc1 -> Spins up traefik, element, hs1 and rc1
- rc2 -> Spins up traefik, element, hs1 and rc2
- hs2 -> Spins up traefik, element, hs1 and hs2
- all -> Spins up traefik, element, hs1, hs2, rc1 and rc2
Multiples profiles can be passed like
docker compose --profile rc1 --profile hs2 up
Rocket.Chat will spin up with an administrator user configured with username admin
and password admin
Synapse will spin up with an administrator user configured with username admin
and password admin
It's possible to copy the .env.example
to .env
and include the certificates and matrix signing key to
configure the services on startup.
Go to https://element
While use system CA for MacOS is not supported on NodeJS, it's necessary to manually point it to the extra certificate.
Run make setup
or make export-ca-cert
to add the CA path to the NodeJS Env Var.
Or manually export the Env Var from this repository and use the same shell to run meteor:
export NODE_EXTRA_CA_CERTS="$(PWD)/traefik/certs/ca/rootCA.crt"
Then it's possible to access it via https://rc.host
which points to the host's machine port 3000
On MacOS use mkcert
brew install mkcert
mkcert -install
cd traefik/certs
mkcert newdomain
make clean-all
Or use make
to see other commands