# Adding SSL support / Tutorial for this

**URL:** <https://forums.rocket.chat/t/adding-ssl-support-tutorial-for-this/16362>\
**Category:** Community Support\
**Created:** [March 28, 2023, 10:13pm UTC](https://forums.rocket.chat/t/adding-ssl-support-tutorial-for-this/16362 "2023-03-28T22:13:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![macmirscho](https://avatars.discourse-cdn.com/v4/letter/m/258eb7/32.png) [@macmirscho](https://forums.rocket.chat/u/macmirscho)\
**Post date:** [March 28, 2023, 10:13pm UTC](https://forums.rocket.chat/t/adding-ssl-support-tutorial-for-this/16362/1 "2023-03-28T22:13:43Z")

</div>

Hi folks,

I am totally new to this rocket chat thing.

What have I done?

Installed Ubuntu Server (22.04LTS) as virtual machine inside of a domain. The machine isn’t added to the domain yet. However, I set a A record on the DNS service in windows server, to access the server via name.

What is actually working:

I can access rocket chat over IP `(http://xxx.xxx.xxx.xxx:3000)`.  
I can access rocket chat over domain `(http://chat.domain.com:3000)`.

I have seen caddy and my thought was: Create idea!

I followed this “guide”:

> **[Auto SSL with Snaps](https://docs.rocket.chat/deploy/prepare-for-your-deployment/rapid-deployment-methods/snaps/auto-ssl-with-snaps)**

I have seen this

> **[Automatic HTTPS - Caddy Documentation](https://caddyserver.com/docs/automatic-https)**
>
> Caddy is a powerful, enterprise-ready, open source web server with automatic HTTPS written in Go

too.

But nothing works.

I am confused.

I have seen a lot of “tutorials” where was written: “The caddyfile should look like this or this”. In my case…These files where totally blank.

The one which you can access via nano caddyfile in the home directory and the one, which is in /var/snap/rocketchat-server/current.

Is this normal?

Now my questions:

Where can I configure that rocket chat works with the URL `chat.domain.com` instead of `chat.domain.com:3000`?

Which caddyfile of the two has to be configured?

What is the configuration?

Actually I have written there:

```auto
https://chat.domain.com
tls self_signed
localhost:3000 {
websocket
transparent
}

```

Where can I implement my own SSL certificate? I have a wildcard certificate for the domain.

The last question is not important.

More important is to get this thing flying with https.

Many thanks in advance!

---

<div class="post-metadata">

**Author:** ![debdut.chakraborty](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/debdut.chakraborty/32/2900_2.png) [@debdut.chakraborty](https://forums.rocket.chat/u/debdut.chakraborty)\
**Post date:** [April 1, 2023, 8:19am UTC](https://forums.rocket.chat/t/adding-ssl-support-tutorial-for-this/16362/2 "2023-04-01T08:19:34Z")

</div>

Hi @macmirscho , indeed this documentation is missing, but this might actually need a snap upgrade to work.

Ftr, the caddyfile should be in /var/snap/rocketchat-server/current/Caddyfile.

There is no way to configure cert storage at the moment. I’ll add a task and see if we can prioritize next week 🙂

Thanks again !

---

<div class="post-metadata">

**Author:** ![macmirscho](https://avatars.discourse-cdn.com/v4/letter/m/258eb7/32.png) [@macmirscho](https://forums.rocket.chat/u/macmirscho)\
**Post date:** [April 21, 2023, 2:21pm UTC](https://forums.rocket.chat/t/adding-ssl-support-tutorial-for-this/16362/3 "2023-04-21T14:21:19Z")

</div>

Hi @debdut.chakraborty !

Thanks for the reply.

I wrote this in the caddy forum, too. There they said, it’s an old caddy configuration previous version 2.x.

But, where can I find an example for a caddy v2. config? I can’t find anything.
