2020-02-06 16:26:11 +00:00
|
|
|
# Configuration
|
|
|
|
|
2020-06-26 17:16:41 +00:00
|
|
|
The configuration is based on the file
|
2020-07-14 17:30:36 +00:00
|
|
|
[defaults.hjson](https://yerbamate.dev/LemmyNet/lemmy/src/branch/main/server/config/defaults.hjson).
|
2020-06-26 17:16:41 +00:00
|
|
|
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.
|
2019-12-31 14:31:34 +00:00
|
|
|
|
2020-07-13 15:33:48 +00:00
|
|
|
To use a different `config.hjson` location than the current directory, set the environment variable `LEMMY_CONFIG_LOCATION`.
|
|
|
|
|
2020-06-26 17:16:41 +00:00
|
|
|
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
|
2020-07-06 15:39:31 +00:00
|
|
|
`database.password` with `LEMMY_DATABASE__POOL_SIZE=10`.
|
2019-12-31 14:31:34 +00:00
|
|
|
|
2020-06-26 17:16:41 +00:00
|
|
|
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.
|
2020-02-06 20:26:01 +00:00
|
|
|
|
2020-06-26 17:16:41 +00:00
|
|
|
If the Docker container is not used, manually create the database specified above by running the
|
|
|
|
following commands:
|
2020-02-06 20:26:01 +00:00
|
|
|
|
|
|
|
```bash
|
|
|
|
cd server
|
|
|
|
./db-init.sh
|
|
|
|
```
|