diff --git a/content/en/docs/install/fresh.md b/content/en/docs/install/fresh.md index 89ed076bd2216f394e66dac01ae6eda839309790..57f000f45cee6fbca73e398d8bf41bd74d09d68a 100644 --- a/content/en/docs/install/fresh.md +++ b/content/en/docs/install/fresh.md @@ -263,6 +263,81 @@ running. See [Misskey's instructions](https://misskey-hub.net/en/docs/admin/nginx.html) +### HAProxy +> 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: + +```yml + ...[your docker config]... + labels: + - "traefik.http.routers.sharkey.rule=Host(`myShark.ey`)" + - "traefik.http.services.sharkey.loadbalancer.server.port=3000" + - "traefik.http.routers.sharkey.tls=true" + - "traefik.http.routers.sharkey.tls.certresolver=myResolver" + ...[your docker config]... +``` + +#### Dynamic Config +insert this into your dynamic config: + +```yml +http: + routers: + sharkey: + entryPoints: ["web", "webSecure"] + rule: "Host(`myshark.ey`)" + service: "sharkey-be" + tls: + certresolver: myResolver + + services: + sharkey-be: + loadBalancer: + servers: + - url: "http://<ip>:3000" +``` + +### Caddy +> Heads up - Sharkey doesn't officially support Caddy, but you can still find community support for it within the discord. + +In your Caddyfile, insert the following instructions. Note that ``<>`` denotes a required option, and ``[]`` is optional to have in your config. + +```Caddyfile +<myshark.ey> +reverse_proxy [ip]:3000 +``` + ## Update Sharkey ### With Docker