pl-fe on Iceshrimp.NET using Caddy#
This is a caddyfile that can be used to configure pl-fe against the Iceshrimp.NET fediverse server.
The way it is configured here, all json, ld and activity requests (POST and GET) are passed through to the regular Iceshrimp.NET backend, whereas other requests done from a browser are served pl-fe.
There are some exceptions to this, namely routes that are required for the frontend to properly work, as well as federation.
For example, the /inbox for the instance, all API routes, /oauth, and /nodeinfo and /.well-known are all always passed to the backend.
Refer to the Caddyfile for reference.
Recommendations#
This configuration cannot expose /mod, /queue, /admin and other important routes used for maintaining the instance, and also replaces the default frontend. Sometimes this is undesirable, as such it's recommended to:
- Have a 2nd (sub)domain
- Point said (sub)domain at your instance's IP Address(es)
- reverse-proxy it accordingly
- Configure
AdditionalDomainsoption in Iceshrimp.NET's configuration to allow your subdomain
This way you can access the original frontend, admin dash, queue dash and moderation tools from that (sub)domain.
Rationale here is that all the admin resources aren't served from one path, same for the CSS for the oAuth page, but oAuth at least continues to work without the CSS.
Configuration#
To use this, get the latest version of pl-fe according to their upstream instructions, then include stuff from the caddyfile by adding the template, then using import pl-fe on your instance.
For example, after importing the relevant snippet, do the following to have it be applied to your instance:
fedi.example.com {
import pl-fe
reverse_proxy :3000
}