This example configuration can be used as a starting point for configuring your own Indiekit server.
This example assumes that you want to:
- host your content on GitHub
- publish your website using Jekyll
- syndicate content to a Mastodon server
- Node.js v24.17 or later
Copy .env.example to .env and replace the values with your own:
cp .env.example .env
The following variables are read by the configuration file:
PUBLICATION_URLGITHUB_USERGITHUB_REPOGITHUB_BRANCHMASTODON_URLMASTODON_USER
Some values shouldn’t be made public, or included in your configuration file. Instead, they should be saved as environment variables that can only be seen by you and your server:
GITHUB_TOKENMASTODON_ACCESS_TOKENMONGO_URLPASSWORD_SECRETSECRET
PASSWORD_SECRET can only be generated once your server is running, so leave it blank to begin with:
- ensure
SECRETis set, then start the server - visit
/auth/new-password - enter the password you want to use and click ‘Generate password secret’
- copy the value shown, save it as
PASSWORD_SECRET, and restart the server
Once you have updated .env with your own values, install dependencies and start the server:
npm install
npm startYour server will be available at http://localhost:3000.
Note
A MongoDB database is optional. Without one, you can still publish posts, but viewing, editing, deleting and restoring previously published posts, syndicating posts, and managing uploaded media files will be unavailable.
If you want to deploy your server using Docker, the following files are provided as a starting point:
.dockerignoredocker-compose.ymlDockerfile
If you are using Docker Compose, the MONGO_URL environment variable does not need to be set. The following environment variables should be provided instead:
MONGO_INITDB_ROOT_USERNAMEMONGO_INITDB_ROOT_PASSWORD
To start both the server and its database:
docker compose up --buildClick the button to use this configuration as the basis of a new service deployed with Railway: