People have choices. We should offer people the ability to take a look at the different options, instead of just pointing them to the Nginx setup from Misskey.
> Heads up - Sharkey doesn't officially support HAProxy, but you can still find community support for it within the discord.
Add these lines to your frontend:
```haproxy
acl sharkey hdr(Host) -i myshark.ey
use_backend sharkey-be if sharkey
```
And these to your backend:
```haproxy
backend sharkey-be
http-reuse aggressive
option forwarded
option forwardfor
mode http
option redispatch
timeout queue 15s
http-request set-header X-Real-IP %[src]
http-request set-header X-Forwarded-Proto https
server sharkey-server <ip>:3000 check observe layer7 error-limit 10 on-error mark-down inter 2s rise 10 slowstart 10s
```
Check out Latte Macchiato's [guide](https://blog.lattemacchiato.dev/how-to-make-your-fedi-instance-performance-not-suck/) to making your fedi instance suck for more optimization tricks with HAProxy.
### Traefik
> Heads up - Sharkey doesn't officially support Traefik, but you can still find community support for it within the discord.
Our configs will make the assumptions that sharkey is listening to port `3000`, your https(443) entrypoint is called ``webSecure`` and that you have a certificate resolver ready called ``myResolver``. Change these as necessary. Remember to change ``myshark.ey`` to your instances domain name.
#### Docker Labels
Append these labels to your sharkey service in docker-compose.yml: