# Rocketchat extremely slow when running through Nginx/Caddy

**URL:** https://forums.rocket.chat/t/rocketchat-extremely-slow-when-running-through-nginx-caddy/6118
**Category:** Community Support
**Created:** [March 18, 2020, 12:56am UTC](https://forums.rocket.chat/t/rocketchat-extremely-slow-when-running-through-nginx-caddy/6118 "2020-03-18T00:56:23Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![magnusi](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/magnusi/32/1584_2.png) [@magnusi](https://forums.rocket.chat/u/magnusi)
#### Post date: [March 18, 2020, 12:56am UTC](https://forums.rocket.chat/t/rocketchat-extremely-slow-when-running-through-nginx-caddy/6118/1 "2020-03-18T00:56:23Z")

</div>

### Description

Hello, it appears that when I run rocketchat through a reverse proxy (to enable SSL), the website loads extremely slowly. Please compare:

[https://study.gjk.cat](https://study.gjk.cat)  
[http://study.magnusi.tech:3000](http://study.magnusi.tech:3000)

Regular HTTP & No Proxy is quite fast. I don’t know what’s causing it, please advise. I tried both nginx and caddy, currently using caddy with this config:

```auto
*:80 {
	gzip
	root /usr/share/caddy
}

study.gjk.cat {
	proxy / 127.0.0.1:3000 {
		header_upstream X-Forwarded-Proto {scheme}
		header_upstream X-Forwarded-For {host}
		header_upstream Host {host}
		websocket
	}
}

import conf.d/*.conf

```

And RocketChat is running with these variables:

```auto
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/0/bus
EDITOR=nano
HOME=/root
LANG=en_US.UTF-8
LOGNAME=root
MAIL=/var/spool/mail/root
MONGO_OPLOG_URL=mongodb://localhost:27017/local?replSet=rs01
MONGO_URL=mongodb://localhost:27017/rocketchat
PATH=/root/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
PWD=/usr/share/rocketchat-server
SHELL=/usr/bin/fish
SHLVL=1
STARSHIP_SHELL=fish
TERM=xterm-256color
XDG_RUNTIME_DIR=/run/user/0
XDG_SESSION_CLASS=user
XDG_SESSION_ID=22
XDG_SESSION_TYPE=tty
ROOT_URL=https://style.gjk.cat
NODE_ENV=production
PORT=3000

```

### Server Setup Information

- Version of Rocket.Chat Server: 3.0.4
- Operating System: Arch Linux
- Deployment Method: AUR Package
- Number of Running Instances: 1
- DB Replicaset Oplog: enabled per tutorial
- NodeJS Version: 12.16.1
- MongoDB Version: 4.2.3
- Proxy: nginx/caddy
- Firewalls involved: none

---

<div class="post-metadata">

### Author: ![magnusi](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/magnusi/32/1584_2.png) [@magnusi](https://forums.rocket.chat/u/magnusi)
#### Post date: [March 18, 2020, 10:55am UTC](https://forums.rocket.chat/t/rocketchat-extremely-slow-when-running-through-nginx-caddy/6118/2 "2020-03-18T10:55:32Z")

</div>

I resolved the issue. Apparently, nginx didn’t actually stop when stopping the service, so Caddy wouldn’t launch and nginx would still be extremely slow.

Issue was resolved by killing nginx, reconfiguring caddy and using caddy
