summaryrefslogtreecommitdiffstats
path: root/docs/src/administration_configuration.md
blob: cc4c568987a4d0b309d9ed8cf0eb9a66937f4316 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Configuration

The configuration is based on the file
[defaults.hjson](https://yerbamate.dev/LemmyNet/lemmy/src/branch/master/server/config/defaults.hjson).
This file also contains documentation for all the available options. To override the defaults, you
can copy the options you want to change into your local `config.hjson` file.

To use a different `config.hjson` location than the current directory, set the environment variable `LEMMY_CONFIG_LOCATION`.

Additionally, you can override any config files with environment variables. These have the same
name as the config options, and are prefixed with `LEMMY_`. For example, you can override the
`database.password` with `LEMMY_DATABASE__POOL_SIZE=10`.

An additional option `LEMMY_DATABASE_URL` is available, which can be used with a PostgreSQL
connection string like `postgres://lemmy:password@lemmy_db:5432/lemmy`, passing all connection
details at once.

If the Docker container is not used, manually create the database specified above by running the
following commands:

```bash
cd server
./db-init.sh
```