Skip to content

RocketChat/matrix-homeserver-local

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project Setup (Recommended)

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)

Manual Setup (Advanced)

If you need to run steps individually, use the following commands:

Add DNS lookup to /etc/hosts

make apply-hosts

Checks each entry in the project's hosts file and adds only those missing to /etc/hosts.

Install Root CA

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.

Adding CA cert into Chrome on Linux

Chrome on Linux doesn't get the CA certificate from the OS global repository. To add it manually follow the following instructions:

  1. Go to Chrome Settings/Privacy and Security
  2. Click Security and scroll down to "Manage Certificates"
  3. In Local Certificates, click Custom and next to Trusted Certificates click Import
  4. Import /traefik/certs/ca/rootCA.crt

Run docker compose

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

Profiles

  • 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 initial users

Rocket.Chat will spin up with an administrator user configured with username admin and password admin

Synapse initial users

Synapse will spin up with an administrator user configured with username admin and password admin

.env file

It's possible to copy the .env.example to .env and include the certificates and matrix signing key to configure the services on startup.

Accessing Element

Go to https://element

Running Rocket.Chat locally

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

Generating new certificates

On MacOS use mkcert

brew install mkcert
mkcert -install
cd traefik/certs
mkcert newdomain

Cleaning up all data from containers

make clean-all

Or use make to see other commands

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •