From 1ca484f90d9d6fb54a87fa9a187c2f6b0251ba85 Mon Sep 17 00:00:00 2001
From: Paul Robertson <me@perobertson.com>
Date: Wed, 26 Jun 2024 22:08:18 -0400
Subject: [PATCH] explain how to configure conduwuit

---
 docs/SUMMARY.md       |  3 ++-
 docs/configuration.md | 18 ++++++++++++++++++
 2 files changed, 20 insertions(+), 1 deletion(-)
 create mode 100644 docs/configuration.md

diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md
index fcd8f898d..868810f6f 100644
--- a/docs/SUMMARY.md
+++ b/docs/SUMMARY.md
@@ -2,7 +2,8 @@ # Summary
 
 - [Introduction](introduction.md)
 - [Differences from upstream Conduit](differences.md)
-- [Example configuration](configuration/examples.md)
+- [Configuration](configuration.md)
+    - [Examples](configuration/examples.md)
 - [Deploying](deploying.md)
     - [Generic](deploying/generic.md)
     - [NixOS](deploying/nixos.md)
diff --git a/docs/configuration.md b/docs/configuration.md
new file mode 100644
index 000000000..8b3fec8a3
--- /dev/null
+++ b/docs/configuration.md
@@ -0,0 +1,18 @@
+# Configuration
+
+This chapter describes various ways to configure conduwuit.
+
+## Basics
+
+Conduwuit uses a config file for the majority of the settings. Please refer to the
+[example config file](./configuration/examples.md#example-configuration) for all of those settings.
+The config file to use can either be specified on the command line when running conduwuit by specifying the
+`-c`, `--config` flag. Alternatively, you can use the environment variable `CONDUWUIT_CONFIG` to specify the config
+file to used.
+
+## Environment variables
+
+All of the settings that are found in the config file can be specified by using environment variables.
+The environment variable names should be all caps and prefixed with `CONDUWUIT_`.
+For example, if the setting you are changing is `max_request_size`, then the environment variable to set is
+`CONDUWUIT_MAX_REQUEST_SIZE`.
-- 
GitLab