2020-08-03 11:44:59 -04:00
# Managing frontends
2020-10-21 13:42:21 -04:00
=== "OTP"
```sh
2021-06-14 18:27:29 -04:00
./bin/pleroma_ctl frontend install < frontend > [--ref < ref > ] [--file < file > ] [--build-url < build-url > ] [--path < path > ] [--build-dir < build-dir > ] [--primary] [--admin]
./bin/pleroma_ctl frontend enable < frontend > [--ref < ref > ] [--file < file > ] [--build-url < build-url > ] [--path < path > ] [--build-dir < build-dir > ] [--primary] [--admin]
2020-10-21 13:42:21 -04:00
```
=== "From Source"
```sh
2021-06-14 18:27:29 -04:00
mix pleroma.frontend install < frontend > [--ref < ref > ] [--file < file > ] [--build-url < build-url > ] [--path < path > ] [--build-dir < build-dir > ] [--primary] [--admin]
mix pleroma.frontend enable < frontend > [--ref < ref > ] [--file < file > ] [--build-url < build-url > ] [--path < path > ] [--build-dir < build-dir > ] [--primary] [--admin]
2020-10-21 13:42:21 -04:00
```
2020-08-03 11:44:59 -04:00
Frontend can be installed either from local zip file, or automatically downloaded from the web.
2020-10-21 13:42:21 -04:00
You can give all the options directly on the command line, but missing information will be filled out by looking at the data configured under `frontends.available` in the config files.
Currently, known `<frontend>` values are:
2020-08-03 11:44:59 -04:00
- [admin-fe ](https://git.pleroma.social/pleroma/admin-fe )
- [kenoma ](http://git.pleroma.social/lambadalambda/kenoma )
- [pleroma-fe ](http://git.pleroma.social/pleroma/pleroma-fe )
- [fedi-fe ](https://git.pleroma.social/pleroma/fedi-fe )
- [soapbox-fe ](https://gitlab.com/soapbox-pub/soapbox-fe )
You can still install frontends that are not configured, see below.
## Example installations for a known frontend
For a frontend configured under the `available` key, it's enough to install it by name.
2020-10-21 13:42:21 -04:00
=== "OTP"
```sh
./bin/pleroma_ctl frontend install pleroma
```
=== "From Source"
2020-08-07 11:04:44 -04:00
2020-10-21 13:42:21 -04:00
```sh
mix pleroma.frontend install pleroma
```
2020-08-03 11:44:59 -04:00
2020-10-21 13:42:21 -04:00
This will download the latest build for the pre-configured `ref` and install it. It can then be configured as the one of the served frontends in the config file (see `primary` or `admin` ).
2020-08-03 11:44:59 -04:00
2020-10-21 13:42:21 -04:00
You can override any of the details. To install a pleroma build from a different URL, you could do this:
2020-08-03 11:44:59 -04:00
2020-10-21 13:42:21 -04:00
=== "OTP"
2020-08-07 11:04:44 -04:00
2020-10-21 13:42:21 -04:00
```sh
./bin/pleroma_ctl frontend install pleroma --ref 2hu_edition --build-url https://example.org/raymoo.zip
```
=== "From Source"
```sh
mix pleroma.frontend install pleroma --ref 2hu_edition --build-url https://example.org/raymoo.zip
```
2020-08-03 11:44:59 -04:00
Similarly, you can also install from a local zip file.
2020-10-21 13:42:21 -04:00
=== "OTP"
```sh
./bin/pleroma_ctl frontend install pleroma --ref mybuild --file ~/Downloads/doomfe.zip
```
2020-08-07 11:04:44 -04:00
2020-10-21 13:42:21 -04:00
=== "From Source"
2020-08-03 11:44:59 -04:00
2020-10-21 13:42:21 -04:00
```sh
mix pleroma.frontend install pleroma --ref mybuild --file ~/Downloads/doomfe.zip
```
2020-08-03 11:44:59 -04:00
2020-10-21 13:42:21 -04:00
The resulting frontend will always be installed into a folder of this template: `${instance_static}/frontends/${name}/${ref}` .
Careful: This folder will be completely replaced on installation.
2020-08-03 11:44:59 -04:00
## Example installation for an unknown frontend
2020-10-21 13:42:21 -04:00
The installation process is the same, but you will have to give all the needed options on the command line. For example:
=== "OTP"
```sh
./bin/pleroma_ctl frontend install gensokyo --ref master --build-url https://gensokyo.2hu/builds/marisa.zip
```
2020-08-03 11:44:59 -04:00
2020-10-21 13:42:21 -04:00
=== "From Source"
2020-08-07 11:04:44 -04:00
2020-10-21 13:42:21 -04:00
```sh
mix pleroma.frontend install gensokyo --ref master --build-url https://gensokyo.2hu/builds/marisa.zip
```
2020-08-03 11:50:53 -04:00
2020-10-21 13:42:21 -04:00
If you don't have a zip file but just want to install a frontend from a local path, you can simply copy the files over a folder of this template: `${instance_static}/frontends/${name}/${ref}` .
2020-08-03 11:50:53 -04:00
2021-06-14 18:27:29 -04:00
## Enabling a frontend
Once installed, a frontend can be enabled with the `enable` command:
=== "OTP"
```sh
./bin/pleroma_ctl frontend enable gensokyo --primary
```
=== "From Source"
```sh
mix pleroma.frontend enable gensokyo --primary
```