# Can't enable https with snap caddy on virtual server

**URL:** <https://forums.rocket.chat/t/cant-enable-https-with-snap-caddy-on-virtual-server/9328>\
**Category:** Community Support\
**Created:** [November 14, 2020, 11:43pm UTC](https://forums.rocket.chat/t/cant-enable-https-with-snap-caddy-on-virtual-server/9328 "2020-11-14T23:43:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![angryoracle](https://avatars.discourse-cdn.com/v4/letter/a/7bcc69/32.png) [@angryoracle](https://forums.rocket.chat/u/angryoracle)\
**Post date:** [November 14, 2020, 11:43pm UTC](https://forums.rocket.chat/t/cant-enable-https-with-snap-caddy-on-virtual-server/9328/1 "2020-11-14T23:43:32Z")

</div>

I’m following [these instructions to install rocket.chat in a free Oracle server](https://blogs.oracle.com/developers/team-chat-for-free-with-rocketchat-on-the-oracle-cloud) but I’m stuck at the step where I’m meant to enable https for caddy/rocket.chat:

```
$ sudo snap set rocketchat-server https=enable
error: cannot perform the following tasks:
- Run configure hook of "rocketchat-server" snap (run hook "configure": Error: Your public IP doesn't match the one resolved for caddy-url, disabling https ...)

```

After looking around I’ve found other [similar posts](https://forums.rocket.chat/t/snap-caddy-https/2957) where the [suggested solution is to verify that the output of some commands show the public IP](https://forums.rocket.chat/t/snap-caddy-https/2957/5). The `dig` command runs fine for me:

```
$ dig batslaves.duckdns.org |grep -A1 ";; ANSWER SECTION:" |tail -1 | awk '{print $5}'
130.61.250.165

```

You can easily verify that with `$ ping batslaves.duckdns.org`. The problem seems that the snap hook [validates the IP using ipinfo.io](https://forums.rocket.chat/t/run-https-using-certificates-from-local-ca/6604/3). Well, here’s what that service gives me:

```
$ curl ipinfo.io/ip
<!DOCTYPE html>
<html lang=en>
  <meta charset=utf-8>
  <meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">
  <title>Error 403 (Forbidden)!!1</title>
  <style>
    *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px}
  </style>
  <a href=//www.google.com/><span id=logo aria-label=Google></span></a>
  <p><b>403.</b> <ins>That’s an error.</ins>
  <p>Access is forbidden. <ins>That’s all we know.</ins>

```

So it seems I’m SOL since [ipinfo.io](http://ipinfo.io) is not willing to work. Is there any possibility of forcing that https setting without going the full manual installation/configuration? I have also `links` installed and I can easily browse to any other website on the net, but I can verify visually [ipinfo.io](http://ipinfo.io) simply does not like the Oracle VPS IP.

---

<div class="post-metadata">

**Author:** ![jseong](https://avatars.discourse-cdn.com/v4/letter/j/a87d85/32.png) [@jseong](https://forums.rocket.chat/u/jseong)\
**Post date:** [February 25, 2021, 8:14am UTC](https://forums.rocket.chat/t/cant-enable-https-with-snap-caddy-on-virtual-server/9328/2 "2021-02-25T08:14:27Z")

</div>

Had a similar issue and adding this file fixed it for me

nano /var/snap/rocketchat-server/current/Caddyfile

[https://whateveryourname.com](https://whateveryourname.com)  
proxy / localhost:3000 {  
websocket  
transparent  
}

Save and try enabling again.
