- own domain associated with the A/AAA record in DNS,
- open port 443 on the server,
- docker and docker-compose.
Clone repository to your working directory. I prefer /srv to this.
cd /srv
git clone https://github.com/rvva/rocket.chat-caddy
Go to rocket-chat working directory and edit docker-compose.yml with your favorite text editor.
vim /srv/rocket.chat-caddy/rocket.chat/docker-compose.yml
Editing variables is not required - it is optional.
Run docker compose inside rocket.chat working directory:
cd /srv/rocket.chat-caddy/rocket.chat/
docker-compose up --build -d
Go to caddy working directory and edit Caddyfile.
vim /srv/rocket.chat-caddy/caddy/Caddyfile
Things you need to edit:
- email [email protected] to your valid email,
- mydomain.pl to your domain for rocket.chat,
- reverse_proxy 192.168.0.22:3000 point your local machine address (port 3000 is default for rocket.chat). You can check your local ip adress by command
hostname -I | awk '{ print $1 }'
Another example:
{
# Global options block. Entirely optional, https is on by default
# Optional email key for lets encrypt
email [email protected]
# Optional staging lets encrypt for testing. Comment out for production.
# acme_ca https://acme-staging-v02.api.letsencrypt.org/directory
}
chat.red.com {
reverse_proxy 10.0.44.1:3000
# If you want to use self signed certifiacate insted Let's Encrypt uncomment section tls inernal
# tls internal
}
If you want to use self signed certifiacate insted Let's Encrypt uncomment section tls inernal in Caddyfile.
Run docker compose inside caddy working directory:
cd /srv/rocket.chat-caddy/caddy/
docker-compose up --build -d
If you want to change Caddyfile configuration while caddy is running you need to reload configuration. You can use for that caddy-reload.sh which is stored in caddy working direcory or command :
docker exec -it caddy caddy reload --config /etc/caddy/Caddyfile
Remember logs are your friends. Check them if there are any problems.
docker logs -f caddy
docker logs -f rockerchat-www
docker logs -f rockerchat-db