]> Untitled Git - lemmy.git/blob - docs/src/administration_configuration.md
ce9dc2ba835cf600abcf01607378766ff02b59fc
[lemmy.git] / docs / src / administration_configuration.md
1 # Configuration
2
3 The configuration is based on the file
4 [defaults.hjson](https://yerbamate.dev/LemmyNet/lemmy/src/branch/main/server/config/defaults.hjson).
5 This file also contains documentation for all the available options. To override the defaults, you
6 can copy the options you want to change into your local `config.hjson` file.
7
8 To use a different `config.hjson` location than the current directory, set the environment variable `LEMMY_CONFIG_LOCATION`. Make sure you copy the `defaults.hjson` if you do this, otherwise you will be missing settings.
9
10 Additionally, you can override any config files with environment variables. These have the same
11 name as the config options, and are prefixed with `LEMMY_`. For example, you can override the
12 `database.password` with `LEMMY_DATABASE__POOL_SIZE=10`.
13
14 An additional option `LEMMY_DATABASE_URL` is available, which can be used with a PostgreSQL
15 connection string like `postgres://lemmy:password@lemmy_db:5432/lemmy`, passing all connection
16 details at once.
17
18 If the Docker container is not used, manually create the database specified above by running the
19 following commands:
20
21 ```bash
22 cd server
23 ./db-init.sh
24 ```