Skip to content

Commit 4c19331

Browse files
committed
[680] Document all available environment variables
1 parent fe3d3e4 commit 4c19331

3 files changed

Lines changed: 104 additions & 52 deletions

File tree

backend/.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v2.0-alpha.15.0-webui679
1+
v2.0-alpha.15.0-webui680

docs/getting_started/docker/compose.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,6 @@ _TZ Identifier_ column for a reference list.
6363

6464
6. Uncomment these lines as needed __if__ you want the TitlecardMaker container
6565
to be dependant upon these services (for a cleaner boot).
66+
67+
For a full list of supported `TCM_*` and other environment variables, see
68+
[User Guide — Environment Variables](../user_guide/index.md#environment-variables).

docs/user_guide/index.md

Lines changed: 100 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ your version of TCM.
9191
# etc.
9292
environment:
9393
- TZ=America/Los_Angeles
94-
- TCM_LOG_STDOUT=WARNING
94+
- TCM_CONSOLE_LOG_LEVEL=WARNING
9595
# etc.
9696
```
9797

@@ -101,7 +101,7 @@ your version of TCM.
101101
run command, like so:
102102

103103
```bash
104-
-e TZ=America/Los_Angeles -e TCM_LOG_STDOUT=WARNING
104+
-e TZ=America/Los_Angeles -e TCM_CONSOLE_LOG_LEVEL=WARNING
105105
```
106106

107107
=== ":material-language-python: Non-Docker"
@@ -111,79 +111,128 @@ your version of TCM.
111111

112112
```ini title=".env"
113113
TZ=America/Los_Angeles
114-
TCM_LOG_STDOUT=WARNING
114+
TCM_CONSOLE_LOG_LEVEL=WARNING
115115
```
116116

117-
While a vast majority of TCM's behavior can be adjusted within the UI, there are
118-
a few options which can only be adjusted with environment variables. These are
119-
described below:
117+
All configuration that can be set via environment variables uses the `TCM_` prefix.
118+
Variables are read from the process environment and, when present, from a `.env` file
119+
in the application root. The following reference documents every available variable.
120120

121-
`TCM_BACKUP_RETENTION`
121+
### Application & runtime
122122

123-
: How long to keep old backups before deleting them. This is an integer number
124-
of days. The default is `21`.
123+
`TCM_IS_DOCKER`
125124

126-
`TCM_IM_DOCKER`
125+
: Set to `TRUE` when TCM is running inside Docker (e.g. for paths and behavior).
126+
Usually set by the image; you typically do not need to set this yourself.
127127

128-
: Name of a standalone Docker container to execute ImageMagick commands
129-
within. This is only required if TCM is __not__ executing within Docker, but
130-
ImageMagick is. This is unspecified by default.
128+
`TCM_TESTING`
131129

132-
`TCM_LOG`
130+
: Set to `TRUE` to enable testing mode. Default is `FALSE`.
133131

134-
: _This has been deprecated in place of `TCM_LOG_STDOUT`._
132+
### Authentication
135133

136-
`TCM_LOG_STDOUT`
134+
`TCM_DISABLE_AUTH`
137135

138-
: The minimum log level for the standard (console) output. Log messages at a
139-
level _lower_ than this will not be transmitted. This can be either `TRACE`,
140-
`DEBUG`, `INFO`, `WARNING`, `ERROR`, or `CRITICAL`. The default is `INFO`.
136+
: When set to `TRUE`, authentication is disabled and existing users are removed.
137+
Only read at startup. For details, see [Connections — Forgotten login](./connections.md#forgotten-login).
138+
Default is `FALSE`.
141139

142-
`TCM_LOG_FILE`
140+
`TCM_AUTH_EXPIRATION_DAYS`
143141

144-
: The minimum log level for the logging file output. Log messages at a level
145-
_lower_ than this will not be written to any log files. This can be either
146-
`TRACE`, `DEBUG`, `INFO`, `WARNING`, `ERROR`, or `CRITICAL`. The default is
147-
`TRACE` and it is __not recommended__ to change this, as it can make it much
148-
more difficult to diagnose or debug issues.
142+
: Number of days authentication tokens remain valid. Integer between 1 and 120.
143+
Default is `7`.
149144

150-
`TCM_LOG_WEBSOCKET`
145+
`TCM_CRYPTO_ALGORITHM`
151146

152-
: The minimum log level for live messages which appear in the UI (toggled
153-
[here](./settings.md#display-live-log-messages)). Log messages at a level
154-
_lower_ than this will not be displayed in the UI. This can be either
155-
`TRACE`, `DEBUG`, `INFO`, `WARNING`, `ERROR`, or `CRITICAL`. The default is
156-
`INFO`.
147+
: Algorithm used for token signing. Default is `HS256`.
157148

158-
`TCM_LOG_RETENTION`
149+
### Backups
159150

160-
: How long to keep log files before they are deleted. This can be any human-
161-
readable duration - e.g. `2 days`, `3 weeks`, etc. The default is `7 days`.
151+
`TCM_BACKUP_RETENTION_DAYS`
162152

163-
`TCM_NEW_SERIES_VIEW`
153+
: Number of days to keep backups before they are deleted. Integer ≥ 1.
154+
Default is `21`.
164155

165-
: _As of `v2.0-alpha.10.0`, this setting is no longer requires as the "old"
166-
Series view has been removed._
156+
`TCM_BACKUP_DT_FORMAT`
167157

168-
`TCM_PLEX_LOGGING`
158+
: Strftime-style format for backup folder names. Default is `%Y-%m-%d_%H-%M-%S`.
169159

170-
: Set to `TRUE` to reroute all Plex API log messages to TCM's internal logging
171-
mechanism. Plex can be fine-tuned, see [below](#plex-variables).
160+
### Logging
172161

173-
`TZ`
162+
`TCM_CONSOLE_LOG_LEVEL`
174163

175-
: The timezone which is used for all local time reporting (most notably
176-
logging). To determine your timezone, a full list is available
177-
[here](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). You
178-
will want to take note of the text in the _TZ Identifer_ column. The default
179-
is `UTC`.
164+
: Minimum log level for console (stdout) output. One of: `TRACE`, `DEBUG`, `INFO`,
165+
`WARNING`, `ERROR`, `CRITICAL`. Default is `INFO`.
180166

181-
`TCM_DISABLE_AUTH`
167+
`TCM_DATABASE_LOG_LEVEL`
168+
169+
: Minimum log level for messages stored in the logging database. Same level
170+
options as above. Default is `TRACE`; changing this can make debugging harder.
171+
172+
`TCM_WEBSOCKET_LOG_LEVEL`
173+
174+
: Minimum log level for live log messages in the UI (see
175+
[Settings — Display live log messages](./settings.md#display-live-log-messages)).
176+
Same level options as above. Default is `INFO`.
177+
178+
`TCM_CONSOLE_LOG_WIDTH`
179+
180+
: Width of console log output in characters. Integer ≥ 40, or leave unset for
181+
automatic width.
182+
183+
`TCM_INTERCEPT_PLEX_LOGS`
184+
185+
: Set to `TRUE` to send Plex API log messages through TCM’s logging. Default is
186+
`FALSE`. For more Plex options, see [Plex variables](#plex-variables).
187+
188+
`TCM_PACKAGE_LOGGING`
189+
190+
: Comma-separated list of package names whose loggers should be intercepted by
191+
TCM’s logging. Empty by default.
192+
193+
`TCM_LOG_RETENTION_DAYS`
194+
195+
: Number of days to keep log files before deletion. Integer ≥ 1. Default is `7`.
196+
197+
### Data retention
198+
199+
`TCM_UNSYNCED_SERIES_RETENTION_DAYS`
200+
201+
: Number of days to keep series that have not been synced. Integer ≥ 1.
202+
Default is `10`.
203+
204+
### Integrations & card types
205+
206+
`TCM_SONARR_REQUEST_TIMEOUT`
207+
208+
: Sonarr request timeout in seconds. Integer between 10 and 10000. Default is `500`.
209+
210+
`TCM_CARD_TYPE_REPOSITORY`
211+
212+
: Base URL of the card type repository (e.g. GitHub raw URL). Default points to
213+
the official TitleCardMaker/CardTypes repository branch for your version.
214+
215+
`TCM_IMAGEMAGICK_CONTAINER`
216+
217+
: Name or ID of a Docker container used to run ImageMagick commands. Use when
218+
TCM runs on the host but ImageMagick runs in a container. Unset by default.
219+
220+
### ImageMagick (optional)
221+
222+
`TCM_IM_PATH`
223+
224+
: Path to the ImageMagick executable (e.g. `convert` or `magick`) when not
225+
using the default on `PATH` or a Docker container. Can also be set via
226+
[Settings](./settings.md). Unset by default.
227+
228+
### Timezone
229+
230+
`TZ`
182231

183-
: Whether to reset and disable authentication access to the TCM UI. This is
184-
only read when TCM first boots, and if set to `TRUE` then your previously
185-
established username and password will be deleted. For more details, see
186-
[here](./connections.md#forgotten-login). This is unspecified by default.
232+
: Timezone used for local time (e.g. in logs and UI). Standard timezone name
233+
(e.g. `America/Los_Angeles`). A list is available
234+
[here](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). If unset,
235+
the system local timezone is used, or `UTC` as fallback.
187236

188237
### Plex Variables
189238

0 commit comments

Comments
 (0)