move to 2.5.5
[anni] / docs / administration / CLI_tasks / frontend.md
1 # Managing frontends
2
3 === "OTP"
4
5     ```sh
6     ./bin/pleroma_ctl frontend install <frontend> [--ref <ref>] [--file <file>] [--build-url <build-url>] [--path <path>] [--build-dir <build-dir>]
7     ```
8
9 === "From Source"
10
11     ```sh
12     mix pleroma.frontend install <frontend> [--ref <ref>] [--file <file>] [--build-url <build-url>] [--path <path>] [--build-dir <build-dir>]
13     ```
14
15 Frontend can be installed either from local zip file, or automatically downloaded from the web.
16
17 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.
18
19 Currently, known `<frontend>` values are:
20
21 - [admin-fe](https://git.pleroma.social/pleroma/admin-fe)
22 - [kenoma](http://git.pleroma.social/lambadalambda/kenoma)
23 - [pleroma-fe](http://git.pleroma.social/pleroma/pleroma-fe)
24 - [fedi-fe](https://git.pleroma.social/pleroma/fedi-fe)
25 - [soapbox](https://gitlab.com/soapbox-pub/soapbox)
26
27 You can still install frontends that are not configured, see below.
28
29 ## Example installations for a known frontend
30
31 For a frontend configured under the `available` key, it's enough to install it by name.
32
33 === "OTP"
34
35     ```sh
36     ./bin/pleroma_ctl frontend install pleroma
37     ```
38
39 === "From Source"
40
41     ```sh
42     mix pleroma.frontend install pleroma
43     ```
44
45 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`).
46
47 You can override any of the details. To install a pleroma build from a different URL, you could do this:
48
49 === "OTP"
50
51     ```sh
52     ./bin/pleroma_ctl frontend install pleroma --ref 2hu_edition --build-url https://example.org/raymoo.zip
53     ```
54
55 === "From Source"
56
57     ```sh
58     mix pleroma.frontend install pleroma --ref 2hu_edition --build-url https://example.org/raymoo.zip
59     ```
60
61 Similarly, you can also install from a local zip file.
62
63 === "OTP"
64
65     ```sh
66     ./bin/pleroma_ctl frontend install pleroma --ref mybuild --file ~/Downloads/doomfe.zip
67     ```
68
69 === "From Source"
70
71     ```sh
72     mix pleroma.frontend install pleroma --ref mybuild --file ~/Downloads/doomfe.zip
73     ```
74
75 The resulting frontend will always be installed into a folder of this template: `${instance_static}/frontends/${name}/${ref}`.
76
77 Careful: This folder will be completely replaced on installation.
78
79 ## Example installation for an unknown frontend
80
81 The installation process is the same, but you will have to give all the needed options on the command line. For example:
82
83 === "OTP"
84
85     ```sh
86     ./bin/pleroma_ctl frontend install gensokyo --ref master --build-url https://gensokyo.2hu/builds/marisa.zip
87     ```
88
89 === "From Source"
90
91     ```sh
92     mix pleroma.frontend install gensokyo --ref master --build-url https://gensokyo.2hu/builds/marisa.zip
93     ```
94
95 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}`.
96