Add docs for pl-fe installation

Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
nicole mikołajczyk
2025-11-22 23:24:02 +01:00
parent 1d1d4c8f7e
commit ab913f1fb5
5 changed files with 122 additions and 0 deletions

1
docs/building.md Normal file
View File

@ -0,0 +1 @@
# Building pl-fe

View File

@ -0,0 +1,56 @@
# Installing pl-fe as Iceshrimp.NET frontend
Iceshrimp.NET does not have built-in support for alternative frontends. However, there are ways to use `pl-fe` as the frontend for Iceshrimp.NET by rerouting specific requests using a reverse proxy like Nginx.
While this is the only way to use some of Iceshrimp.NET-specific features with `pl-fe`, because of Iceshrimp.NET CORS configuration, remember that it doesn't have full feature parity with the default Iceshrimp.NET frontend. You might prefer using `pl-fe` [in standalone mode](./standalone.md) instead.
## Example Nginx configuration
```nginx
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
map "$http_accept,$http_content_type" $maybe_activitypub {
default @plfe;
"~application/json" @shrimp;
"~application/activity\+json" @shrimp;
"~application/ld\+json" @shrimp;
"~application/ld\+json; *profile=\"https://www.w3.org/ns/activitystreams\"" @shrimp;
}
server {
server_name iceshrimp.example.com;
root /var/www/;
location ~ ^/(Components|openapi|scalar|swagger|css|_content|js|files|avatars|banners|api|inbox|oauth|admin|manifest.json|nodeinfo|.well-known|@(.+)$|[a-zA-Z0-9.]+.css$) {
try_files /dev/null @shrimp;
}
location / {
try_files $uri $maybe_activitypub;
}
location ~ ^/(users|notes|threads|inbox|emoji|@(.+)) {
try_files /dev/null $maybe_activitypub;
}
location @plfe {
try_files /index.html /dev/null;
}
location @shrimp {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
listen 443 ssl;
}
```

9
docs/installing/mitra.md Normal file
View File

@ -0,0 +1,9 @@
# Installing pl-fe as Mitra frontend
Installing `pl-fe` as a frontend for Mitra is no different from installing the default Mitra Web frontend. Just extract the `pl-fe` files into the directory specified in `config.yaml` under `web_client_dir`, by default `/usr/share/mitra/www`.
```sh
curl -O https://pl.mkljczk.pl/pl-fe.zip
unzip pl-fe.zip -d /usr/share/mitra/www
rm pl-fe.zip
```

View File

@ -0,0 +1,40 @@
# Installing pl-fe as Pleroma/Akkoma frontend
## Installation in instance static directory
The most straightforward way to install `pl-fe` as a frontend for Pleroma or Akkoma is to simply download it and place its files in the `/instance/static` directory of your Pleroma/Akkoma installation (usually `/opt/pleroma/instance/static` or `/opt/akkoma/instance/static`, accordingly).
```sh
curl -O https://pl.mkljczk.pl/pl-fe.zip
unzip pl-fe.zip -d /opt/pleroma/instance/static/
rm pl-fe.zip
```
## Installation via Pleroma/Akkoma frontend management
It is also possible to use the Pleroma frontend management tool. You can find more information about it in the [Pleroma documentation](https://docs.pleroma.social/backend/administration/frontends-management/). On Pleroma, you can use either the PleromaFE built-in admin dashboard or the older AdminFE to install `pl-fe` and set it as the server frontend. You don't have to provide any URL. It's right there in Pleroma.
On Akkoma, however, there is no `pl-fe` in the default available frontends list ([yet?](https://akkoma.dev/AkkomaGang/akkoma/pulls/945)). You can still install it, but you need to explicitly provide the URL to `pl-fe`. To install it from CLI, use:
### OTP
```sh
./bin/pleroma_ctl frontend install pl-fe --ref develop --build-url https://pl.mkljczk.pl/pl-fe.zip
```
### From Source
```sh
mix pleroma.frontend install pl-fe --ref develop --build-url https://pl.mkljczk.pl/pl-fe.zip
```
It is now possible to set `pl-fe` as the primary frontend in the configuration file or via AdminFE:
```elixir
config :pleroma, :frontends,
primary: %{
"name" => "pl-fe",
"ref" => "develop"
},
...
```
On Akkoma, it is also possible for individual users to select their preferred frontend to `pl-fe` by visiting `/akkoma/frontend` page on their Akkoma instance.

View File

@ -0,0 +1,16 @@
# Standalone pl-fe installation
To install `pl-fe` in standalone mode, allowing to sign in to any instance implementing Mastodon client API, you only need a static web server to serve the files. As usual on single page applications with client-side routing, the server must be configured to fallback to `index.html` for non-matching routes.
## Example Caddy configuration
```caddy
pl-fe.example.com {
root * /var/www/pl-fe
encode
try_files {path} /index.html
file_server
}
```
This assumes you're serving `pl-fe` under the pl-fe.example.com domain and the `pl-fe` files are located in `/var/www/pl-fe`. You can download `pl-fe` from `https://pl.mkljczk.pl/pl-fe.zip` or [build it from source](../building.md).