···126126127127Two ways (choose one):
128128129129-1. (Recommended) Go to [Releases](https://github.com/cheeaun/phanpy/releases) and download the latest `phanpy-dist.zip`. It's pre-built so don't need to run any install/build commands. Extract it. Serve the folder of extracted files.
130130-2. Download or `git clone` this repository. Build it by running `npm run build` (after `npm install`). Serve the `dist` folder.
129129+### Easy way
130130+131131+Go to [Releases](https://github.com/cheeaun/phanpy/releases) and download the latest `phanpy-dist.zip` or `phanpy-dist.tar.gz`. It's pre-built so don't need to run any install/build commands. Extract it. Serve the folder of extracted files.
132132+133133+### Custom-build way
134134+135135+Download or `git clone` this repository. Build it by running `npm run build` (after `npm install`). Serve the `dist` folder.
136136+137137+Customization can be done by passing environment variables to the build command. Examples:
138138+139139+```bash
140140+PHANPY_APP_TITLE="Phanpy Dev" \
141141+ PHANPY_WEBSITE="https://dev.phanpy.social" \
142142+ npm run build
143143+```
144144+145145+```bash
146146+PHANPY_DEFAULT_INSTANCE=hachyderm.io \
147147+ PHANPY_DEFAULT_INSTANCE_REGISTRATION_URL=https://hachyderm.io/auth/sign_up \
148148+ PHANPY_PRIVACY_POLICY_URL=https://hachyderm.io/privacy-policy \
149149+ npm run build
150150+```
151151+152152+It's also possible to set them in the `.env` file.
153153+154154+Available variables:
131155132132-Try search for "how to self-host static sites" as there are many ways to do it.
156156+- `PHANPY_APP_TITLE` (optional, default: `Phanpy`) affects:
157157+ - Web page title, shown in the browser window or tab title
158158+ - App title, when installed as PWA, shown in the Home screen, macOS dock, Windows taskbar, etc
159159+ - OpenGraph card title, when shared on social networks
160160+ - Client name, when [registering the app for authentication](https://docs.joinmastodon.org/client/token/#app) and shown as client used on posts in some apps/clients
161161+- `PHANPY_WEBSITE` (optional but recommended, default: `https://phanpy.social`) affects:
162162+ - Canonical URL of the website
163163+ - OpenGraph card URL, when shared on social networks
164164+ - Root path for the OpenGraph card image
165165+ - Client URL, when [registering the app for authentication](https://docs.joinmastodon.org/client/token/#app) and shown as client used on posts in some apps/clients
166166+- `PHANPY_DEFAULT_INSTANCE` (optional, no defaults):
167167+ - e.g. 'mastodon.social', without `https://`
168168+ - Default instance for log-in
169169+ - When logging in, the user will be redirected instantly to the instance's authentication page instead of having to manually type the instance URL and submit
170170+- `PHANPY_DEFAULT_INSTANCE_REGISTRATION_URL` (optional, no defaults):
171171+ - URL of the instance registration page
172172+ - E.g. `https://mastodon.social/auth/sign_up`
173173+- `PHANPY_PRIVACY_POLICY_URL` (optional, default to official instance's privacy policy):
174174+ - URL of the privacy policy page
175175+ - May specify the instance's own privacy policy
176176+- `PHANPY_LINGVA_INSTANCES` (optional, space-separated list, default: `lingva.phanpy.social [...hard-coded list of fallback instances]`):
177177+ - Specify a space-separated list of instances. First will be used as default before falling back to the subsequent instances. If there's only 1 instance, means no fallback.
178178+ - May specify a self-hosted Lingva instance, powered by either [lingva-translate](https://github.com/thedaviddelta/lingva-translate) or [lingva-api](https://github.com/cheeaun/lingva-api)
179179+ - List of fallback instances hard-coded in `/.env`
180180+ - [↗️ List of lingva-translate instances](https://github.com/thedaviddelta/lingva-translate?tab=readme-ov-file#instances)
181181+182182+### Static site hosting
183183+184184+Try online search for "how to self-host static sites" as there are many ways to do it.
185185+186186+#### Lingva-translate or lingva-api hosting
187187+188188+See documentation for [lingva-translate](https://github.com/thedaviddelta/lingva-translate) or [lingva-api](https://github.com/cheeaun/lingva-api).
133189134190## Community deployments
135191