Skip to content

Source Installation

First, clone the repository:

git clone https://github.com/arpanrec/foyer.git

If pnpm is not installed, install it:

npm install -g pnpm

Then install dependencies and build the production bundle:

pnpm install
pnpm build

If this is your first time starting, copy the src/skeleton directory to config/ to populate initial example config files.

Finally, run the server:

FOYER_ALLOWED_HOSTS=foyer.arpanrec.com:1234 pnpm start

When updating Foyer versions, rebuild the production bundle by repeating the steps above.

See FOYER_ALLOWED_HOSTS for more information on this environment variable.

Custom base path

To serve Foyer under a sub-path such as /foyer (see FOYER_BASE_PATH), set FOYER_BASE_PATH for both the build and the server. pnpm start reads the Next.js config again at startup, so the two values must match:

FOYER_BASE_PATH=/foyer pnpm build
FOYER_BASE_PATH=/foyer FOYER_ALLOWED_HOSTS=foyer.arpanrec.com:1234 pnpm start

The development server takes it too: FOYER_BASE_PATH=/foyer pnpm dev.