Blame

34401d Ralph Thesen 2023-11-18 14:40:43
Added documentation for configuring An Otter Wiki
1
# Configuration
2
4c6b41 Ralph Thesen 2023-12-04 13:05:43
Added link to the installaton guide.
3
The [[Installation Guide|Installation]] can be found [[here|Installation]].
4
34401d Ralph Thesen 2023-11-18 14:40:43
Added documentation for configuring An Otter Wiki
5
An Otter Wiki is configured in the application via the <i class="fas fa-cogs"></i>
5819b3 Ralph Thesen 2024-09-03 23:00:52
added documentation about the priorities of the settings sources This was discussed in https://github.com/redimp/otterwiki/issues/135
6
**Settings** interface as admin user. Alternatively you configure the variables via the
7
`settings.cfg` or via environment variables.
8
9
*Please note:* What is set in the config file `settings.cfg` will be overwritten first
10
by the environment variables if they are set and second by the settings configured
11
via the settings interface, which are stored in the database. In brief: `Settings Interface > Environment Variables > settings.cfg`.
34401d Ralph Thesen 2023-11-18 14:40:43
Added documentation for configuring An Otter Wiki
12
40563c Ivan Novohatski 2026-02-03 12:09:51
added missing vars, updated structure
13
### Application Preferences
34401d Ralph Thesen 2023-11-18 14:40:43
Added documentation for configuring An Otter Wiki
14
d2f41d Ralph Thesen 2026-08-30 13:40:56
Document actual defaults in the configuration tables
15
| Variable | Default | Example | Description |
16
|--------------------|---------|----------------|----------------------------------------------|
17
| `SITE_NAME` | `'An Otter Wiki'` | `'Otterwiki'` | The `SITE_NAME` displayed on every page and email |
18
| `SERVER_NAME` | `''` | `'wiki.domain.tld'` | Set this to the domain running the wiki. In general it's advisable to be set, behind a well configured reverse proxy this is optional. Used for generating external URLs. |
19
| `SITE_LOGO` | `''` | `'/Home/a/logo.png'` | Customize navbar logo url (can be a page attachment) |
20
| `SITE_DESCRIPTION` | `''` | <code>'A minimalistic wiki powered by<br/> python, markdown and git.'</code> | The default description used in `<meta>` tags |
21
| `SITE_ICON` | `''` | `'/Home/a/favicon-32x32.png'` | Configure via an url to the image that is displayed as favicon (tab icon, URL icon, bookmark icon). This can be an attachment |
22
| `SITE_LANG` | `'en'` | `'de'` | Configures the lang attribute of the `<html>` lang used in the wiki |
23
| `ROBOTS_TXT` | `'allow'` | `'disallow'` | Configures how the wiki indicates to visiting robots whether they are allowed to crawl the content, could be `allow` or `disallow` |
24
| `HOME_PAGE` | `''` | `'My/Page'` | Configures which page is displayed when visiting the root URL (`/`), leave empty for default (`Home`) or define any page path, including special pages that start with `/-/` |
25
| `HIDE_LOGO` | `False` | `True` | Hides or shows An Otter Wiki logo in the sidebar |
34401d Ralph Thesen 2023-11-18 14:40:43
Added documentation for configuring An Otter Wiki
26
7eb36f Ralph Thesen 2026-02-22 19:01:28
added SERVER_NAME
27
34401d Ralph Thesen 2023-11-18 14:40:43
Added documentation for configuring An Otter Wiki
28
### Permission configuration
29
d2f41d Ralph Thesen 2026-08-30 13:40:56
Document actual defaults in the configuration tables
30
| Variable | Default | Description |
34401d Ralph Thesen 2023-11-18 14:40:43
Added documentation for configuring An Otter Wiki
31
|------------------|-----------------|----------------------------------------------|
d2f41d Ralph Thesen 2026-08-30 13:40:56
Document actual defaults in the configuration tables
32
| `READ_ACCESS` | `'ANONYMOUS'` | Read access to wiki pages and attachments, one of `'ANONYMOUS'`, `'REGISTERED'` or `'APPROVED'` |
33
| `WRITE_ACCESS` | `'ANONYMOUS'` | Write access to wiki pages, one of `'ANONYMOUS'`, `'REGISTERED'` or `'APPROVED'` |
34
| `ATTACHMENT_ACCESS` | `'ANONYMOUS'` | Write access to attachments, one of `'ANONYMOUS'`, `'REGISTERED'` or `'APPROVED'` |
f02b8f Ralph Thesen 2024-03-23 17:44:24
Updated configuration: added DISABLE_REGISTRATION, SIDEBAR_MENUTREE_*, AUTH_METHOD, COMMIT_MESSAGE, RETAIN_PAGE_NAME_CASE, GIT_WEB_SERVER
35
| `DISABLE_REGISTRATION` | `False` | With `DISABLE_REGISTRATION=True` new users can not sign-up for a new account |
d2f41d Ralph Thesen 2026-08-30 13:40:56
Document actual defaults in the configuration tables
36
| `AUTO_APPROVAL` | `True` | With `AUTO_APPROVAL=True` users are approved on registration |
34401d Ralph Thesen 2023-11-18 14:40:43
Added documentation for configuring An Otter Wiki
37
| `EMAIL_NEEDS_CONFIRMATION` | `True` | With `EMAIL_NEEDS_CONFIRMATION=True` users have to confirm their email address |
d2f41d Ralph Thesen 2026-08-30 13:40:56
Document actual defaults in the configuration tables
38
| `NOTIFY_ADMINS_ON_REGISTER` | `False` | Notify admins if a new user is registered |
843154 Otterwiki Robot 2026-03-15 17:19:26
Updated docs for sidebar config
39
| `NOTIFY_USER_ON_APPROVAL` | `False` | Send a notification mail to users when their account has been approved by an admin |
34401d Ralph Thesen 2023-11-18 14:40:43
Added documentation for configuring An Otter Wiki
40
41
There are four types of users in the Otterwiki: `ANONYMOUS` are non logged in users.
42
Users that registered via email and are logged in are `REGISTERED`, users approved via
43
the settings menu by an admin are `APPROVED`. In addition to the `APPROVED` flag the `ADMIN`
44
flag can be set. Users with the `ADMIN` flag can edit (and approve) other users. The first registered user is flagged as admin.
45
f02b8f Ralph Thesen 2024-03-23 17:44:24
Updated configuration: added DISABLE_REGISTRATION, SIDEBAR_MENUTREE_*, AUTH_METHOD, COMMIT_MESSAGE, RETAIN_PAGE_NAME_CASE, GIT_WEB_SERVER
46
47
### Sidebar Preferences
48
d2f41d Ralph Thesen 2026-08-30 13:40:56
Document actual defaults in the configuration tables
49
| Variable | Default | Description |
f02b8f Ralph Thesen 2024-03-23 17:44:24
Updated configuration: added DISABLE_REGISTRATION, SIDEBAR_MENUTREE_*, AUTH_METHOD, COMMIT_MESSAGE, RETAIN_PAGE_NAME_CASE, GIT_WEB_SERVER
50
| ----------------------- | ---------- | -------------- |
843154 Otterwiki Robot 2026-03-15 17:19:26
Updated docs for sidebar config
51
| `SIDEBAR_MENUTREE_MODE` | `'SORTED'` | Mode of the sidebar page index, see below. |
52
| `SIDEBAR_MENUTREE_MAXDEPTH` | `''` | Limit the depth of the pages displayed to any number; leave empty for unlimited. |
53
| `SIDEBAR_MENUTREE_FOCUS` | `'SUBTREE'` | Set to `'SUBTREE'` to focus the page index on the current subtree, or `'OFF'` to always display all pages. |
54
| `SIDEBAR_MENUTREE_IGNORE_CASE` | `False` | Set to `True` to sort pages case-insensitively. Only takes effect when `RETAIN_PAGE_NAME_CASE` is enabled. |
55
| `SIDEBAR_SHORTCUTS` | `'home pageindex createpage'` | Space-separated list of shortcuts shown in the sidebar. Available values: `home`, `pageindex`, `changelog`, `createpage`. Shortcuts not listed remain accessible via the `⋮` menu. |
f02b8f Ralph Thesen 2024-03-23 17:44:24
Updated configuration: added DISABLE_REGISTRATION, SIDEBAR_MENUTREE_*, AUTH_METHOD, COMMIT_MESSAGE, RETAIN_PAGE_NAME_CASE, GIT_WEB_SERVER
56
57
For `SIDEBAR_MENUTREE_MODE` pick one of
58
843154 Otterwiki Robot 2026-03-15 17:19:26
Updated docs for sidebar config
59
- `''` (empty) page index not displayed
60
- `SORTED` directories and pages, sorted
61
- `DIRECTORIES_GROUPED` directories and pages, with directories grouped first
62
- `DIRECTORIES_ONLY` list directories only
f02b8f Ralph Thesen 2024-03-23 17:44:24
Updated configuration: added DISABLE_REGISTRATION, SIDEBAR_MENUTREE_*, AUTH_METHOD, COMMIT_MESSAGE, RETAIN_PAGE_NAME_CASE, GIT_WEB_SERVER
63
64
### Content and Editing Preferences
65
d2f41d Ralph Thesen 2026-08-30 13:40:56
Document actual defaults in the configuration tables
66
| Variable | Default | Description |
f02b8f Ralph Thesen 2024-03-23 17:44:24
Updated configuration: added DISABLE_REGISTRATION, SIDEBAR_MENUTREE_*, AUTH_METHOD, COMMIT_MESSAGE, RETAIN_PAGE_NAME_CASE, GIT_WEB_SERVER
67
| ----------------------- | ---------- | -------------- |
7222e8 Otterwiki Robot 2026-03-15 17:19:57
Updated settings for the commit message
68
| `COMMIT_MESSAGE` | `'REQUIRED'` | Controls commit message behaviour: `'REQUIRED'` forces the user to enter one, `'OPTIONAL'` allows empty messages, `'DISABLED'` always uses the default commit message without prompting |
69
| `DEFAULT_COMMIT_MESSAGE` | `''` | Default commit message used when `COMMIT_MESSAGE` is `'DISABLED'` or left empty when `'OPTIONAL'`. Supports `strftime` [format codes](https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes); additionally `%P` is replaced with the page name. |
40563c Ivan Novohatski 2026-02-03 12:09:51
added missing vars, updated structure
70
| `RETAIN_PAGE_NAME_CASE` | `False` | Set to `True` to retain case of the page name in the filename used for storing the page |
71
| `TREAT_UNDERSCORE_AS_SPACE_FOR_TITLES` | `False` | Set to `True` to replace underscores (`_`) with spaces in page titles, breadcrumbs, and page index |
d83b44 Ralph Thesen 2026-08-30 13:41:12
Escape pipes in the WIKILINK_STYLE table cell
72
| `WIKILINK_STYLE` | `''` | Set to `'LINKTITLE'` for `[[WikiPage\|Text to display]]` format, leave empty for `[[Text to display\|WikiPage]]` format (default) |
0ec9a7 Otterwiki Robot 2026-03-15 17:21:05
Fixed typos
73
| `MAX_FORM_MEMORY_SIZE` | `1000000` | The maximum size of a submitted form, see the [Flask documentation](https://flask.palletsprojects.com/en/stable/config/#MAX_FORM_MEMORY_SIZE). Increase this if you have really large pages to edit and save. |
f02b8f Ralph Thesen 2024-03-23 17:44:24
Updated configuration: added DISABLE_REGISTRATION, SIDEBAR_MENUTREE_*, AUTH_METHOD, COMMIT_MESSAGE, RETAIN_PAGE_NAME_CASE, GIT_WEB_SERVER
74
40563c Ivan Novohatski 2026-02-03 12:09:51
added missing vars, updated structure
75
### Repository Management
76
e8f97a Ivan Novohatski 2026-02-03 17:26:45
added link to a new repomgmt guide
77
For a detailed guide on **Repository Management** settings, please follow this link: [[Repository Management|Configuration/Repository Management]]
78
d2f41d Ralph Thesen 2026-08-30 13:40:56
Document actual defaults in the configuration tables
79
| Variable | Default | Example | Description |
80
| ---------------- | ------- | ---------- | -------------- |
81
| `GIT_WEB_SERVER` | `False` | `True` | Set to to `True` to allow cloning the wiki via git+http(s) |
82
| `GIT_REMOTE_PUSH_ENABLED` | `False` | `True` | Set to `True` to enable automatic pushing to an SSH remote whenever the wiki changes |
83
| `GIT_REMOTE_PUSH_URL` | `''` | `'git@github.com:user/wiki.git'` | The SSH remote the wiki is pushed to |
84
| `GIT_REMOTE_PUSH_PRIVATE_KEY` | `''` | `'-----BEGIN OPENSSH ...'` | The SSH private key used when pushing. Leave empty if authorization is handled externally |
d7030f Ralph Thesen 2026-10-04 09:50:09
Add GIT_REMOTE_*_PRIVATE_KEY_FILE to configuration
85
| `GIT_REMOTE_PUSH_PRIVATE_KEY_FILE` | `''` | `'/run/secrets/wiki_ssh_key'` | Path to a file containing the SSH private key used when pushing, e.g. a docker secret. Ignored if `GIT_REMOTE_PUSH_PRIVATE_KEY` is set |
d2f41d Ralph Thesen 2026-08-30 13:40:56
Document actual defaults in the configuration tables
86
| `GIT_REMOTE_PULL_ENABLED` | `False` | `True` | Set to `True` to enable pulling from an SSH remote, triggered via a webhook |
87
| `GIT_REMOTE_PULL_URL` | `''` | `'git@github.com:user/wiki.git'` | The SSH remote the wiki pulls from |
88
| `GIT_REMOTE_PULL_PRIVATE_KEY` | `''` | `'-----BEGIN OPENSSH ...'` | The SSH private key used when pulling. Leave empty if authorization is handled externally |
d7030f Ralph Thesen 2026-10-04 09:50:09
Add GIT_REMOTE_*_PRIVATE_KEY_FILE to configuration
89
| `GIT_REMOTE_PULL_PRIVATE_KEY_FILE` | `''` | `'/run/secrets/wiki_ssh_key'` | Path to a file containing the SSH private key used when pulling, e.g. a docker secret. Ignored if `GIT_REMOTE_PULL_PRIVATE_KEY` is set |
d2f41d Ralph Thesen 2026-08-30 13:40:56
Document actual defaults in the configuration tables
90
| `GIT_REMOTE_PULL_URL_SECURE` | `False` | `True` | Set to `True` to derive the pull webhook URL from the `SECRET_KEY`. Recommended, the default `False` only exists for backwards compatibility with webhook URLs generated by older releases |
40563c Ivan Novohatski 2026-02-03 12:09:51
added missing vars, updated structure
91
64e436 Otterwiki Robot 2026-03-30 23:04:03
added SECURITY_HEADERS documentation
92
### Security
93
d2f41d Ralph Thesen 2026-08-30 13:40:56
Document actual defaults in the configuration tables
94
| Variable | Default | Description |
64e436 Otterwiki Robot 2026-03-30 23:04:03
added SECURITY_HEADERS documentation
95
|--------------------|----------|----------------------------------------------|
96
| `SECURITY_HEADERS` | `True` | When enabled (default), the following HTTP response headers are set on every response: `X-Content-Type-Options: nosniff`, `X-Frame-Options: SAMEORIGIN`, `Referrer-Policy: same-origin`. Set to `False` if you need to embed the wiki in an iframe on a different origin or if your reverse proxy already sets these headers. |
c45756 Otterwiki Robot 2026-04-01 22:44:33
Documented WTF_CSRF_ENABLED and WTF_CSRF_TIME_LIMIT
97
| `WTF_CSRF_ENABLED` | `True` | When enabled (default), all state-changing (POST) requests are protected with CSRF tokens. This prevents cross-site request forgery attacks. Set to `False` to disable CSRF protection (not recommended). |
98
| `WTF_CSRF_TIME_LIMIT` | `86400` | Time limit in seconds for CSRF tokens to be valid. Defaults to `86400` (24 hours). If users report form submission errors after leaving pages open for extended periods, consider increasing this value. |
64e436 Otterwiki Robot 2026-03-30 23:04:03
added SECURITY_HEADERS documentation
99
34401d Ralph Thesen 2023-11-18 14:40:43
Added documentation for configuring An Otter Wiki
100
### Mail configuration
101
beb69b Ralph Thesen 2026-01-28 22:08:09
updated link to Flask-Mail
102
An Otter Wiki is using [Flask-Mail](https://flask-mail.readthedocs.io/en/latest/).
34401d Ralph Thesen 2023-11-18 14:40:43
Added documentation for configuring An Otter Wiki
103
d2f41d Ralph Thesen 2026-08-30 13:40:56
Document actual defaults in the configuration tables
104
| Variable | Default | Example | Description |
105
|------------------|---------|-----------------|----------------------------------------------|
106
| `MAIL_DEFAULT_SENDER` | `'otterwiki@YOUR.ORGANIZATION.TLD'` | `'otterwiki@example.com'` | The sender address of all mails |
107
| `MAIL_SERVER` | `''` | `'smtp.googlemail.com'` | The smtp server address |
108
| `MAIL_PORT` | `''` | `465` | The smtp server port |
109
| `MAIL_USERNAME` | `''` | `'USERNAME'` | Username for the mail account |
110
| `MAIL_PASSWORD` | `''` | `'PASSWORD'` | Password for the mail account |
111
| `MAIL_USE_TLS` | `False` | `True` | Use TLS encryption |
112
| `MAIL_USE_SSL` | `False` | `True` | Use SSL encryption |
34401d Ralph Thesen 2023-11-18 14:40:43
Added documentation for configuring An Otter Wiki
113
f02b8f Ralph Thesen 2024-03-23 17:44:24
Updated configuration: added DISABLE_REGISTRATION, SIDEBAR_MENUTREE_*, AUTH_METHOD, COMMIT_MESSAGE, RETAIN_PAGE_NAME_CASE, GIT_WEB_SERVER
114
### Authentication configuration
115
d2f41d Ralph Thesen 2026-08-30 13:40:56
Document actual defaults in the configuration tables
116
| Variable | Default | Example | Description |
117
|------------------|---------|----------------|----------------------------------------------|
118
| `AUTH_METHOD` | `''` | `'PROXY_HEADER'` | An empty value (or `'SIMPLE'`) uses the local database, see below. |
f02b8f Ralph Thesen 2024-03-23 17:44:24
Updated configuration: added DISABLE_REGISTRATION, SIDEBAR_MENUTREE_*, AUTH_METHOD, COMMIT_MESSAGE, RETAIN_PAGE_NAME_CASE, GIT_WEB_SERVER
119
120
Per default an Otter Wiki uses a local database for storing authentication information.
121
122
#### Authentication with `PROXY_HEADER`s
123
be6dea Getslow6 2026-07-14 10:18:05
Update PROXY_HEADER authentication documentation Clarify the expected headers for PROXY_HEADER authentication and provide details on permissions and role-based permissions.
124
With `AUTH_METHOD='PROXY_HEADER'` an Otter Wiki expects forwarded authentication headers to authenticate the user.
f02b8f Ralph Thesen 2024-03-23 17:44:24
Updated configuration: added DISABLE_REGISTRATION, SIDEBAR_MENUTREE_*, AUTH_METHOD, COMMIT_MESSAGE, RETAIN_PAGE_NAME_CASE, GIT_WEB_SERVER
125
be6dea Getslow6 2026-07-14 10:18:05
Update PROXY_HEADER authentication documentation Clarify the expected headers for PROXY_HEADER authentication and provide details on permissions and role-based permissions.
126
By default an Otter Wiki expects the headers
f02b8f Ralph Thesen 2024-03-23 17:44:24
Updated configuration: added DISABLE_REGISTRATION, SIDEBAR_MENUTREE_*, AUTH_METHOD, COMMIT_MESSAGE, RETAIN_PAGE_NAME_CASE, GIT_WEB_SERVER
127
- `x-otterwiki-name`
128
- `x-otterwiki-email`
129
- `x-otterwiki-permissions`
130
131
to be set by the proxy service using forward authentication.
be6dea Getslow6 2026-07-14 10:18:05
Update PROXY_HEADER authentication documentation Clarify the expected headers for PROXY_HEADER authentication and provide details on permissions and role-based permissions.
132
The headers `x-otterwiki-name` and `x-otterwiki-email` are used for receiving author information and `x-otterwiki-permissions` a comma separated list of permissions.
f02b8f Ralph Thesen 2024-03-23 17:44:24
Updated configuration: added DISABLE_REGISTRATION, SIDEBAR_MENUTREE_*, AUTH_METHOD, COMMIT_MESSAGE, RETAIN_PAGE_NAME_CASE, GIT_WEB_SERVER
133
9eb258 Otterwiki Robot 2026-03-15 17:21:35
more detailed infos about AUTH_METHOD='PROXY_HEADER'
134
The header names can be customized via the following variables:
135
be6dea Getslow6 2026-07-14 10:18:05
Update PROXY_HEADER authentication documentation Clarify the expected headers for PROXY_HEADER authentication and provide details on permissions and role-based permissions.
136
| Variable | Default | Description |
137
|-----------------------------|------------------------------|------------------------------------------------------|
138
| `AUTH_HEADERS_USERNAME` | `'x-otterwiki-name'` | Header carrying the authenticated user's name |
139
| `AUTH_HEADERS_EMAIL` | `'x-otterwiki-email'` | Header carrying the authenticated user's email |
9eb258 Otterwiki Robot 2026-03-15 17:21:35
more detailed infos about AUTH_METHOD='PROXY_HEADER'
140
| `AUTH_HEADERS_PERMISSIONS` | `'x-otterwiki-permissions'` | Header carrying the authenticated user's permissions |
141
be6dea Getslow6 2026-07-14 10:18:05
Update PROXY_HEADER authentication documentation Clarify the expected headers for PROXY_HEADER authentication and provide details on permissions and role-based permissions.
142
143
By default, the permissions that are accepted in the header `'x-otterwiki-permissions'` are: `READ`, `WRITE`, `UPLOAD` and `ADMIN`.
144
It is possible to use role-based permissions instead by overriding the following variables:
145
146
| Variable | Default | Description |
147
|---------------------|------------|------------------------------------------------------------------------|
148
| `AUTH_ROLES_READ` | `'READ'` | Comma separated list of roles that should have the `READ` permission |
149
| `AUTH_ROLES_WRITE` | `'WRITE'` | Comma separated list of roles that should have the `WRITE` permission |
150
| `AUTH_ROLES_UPLOAD` | `'UPLOAD'` | Comma separated list of roles that should have the `UPLOAD` permission |
151
| `AUTH_ROLES_ADMIN` | `'ADMIN'` | Comma separated list of roles that should have the `ADMIN` permission |
152
f02b8f Ralph Thesen 2024-03-23 17:44:24
Updated configuration: added DISABLE_REGISTRATION, SIDEBAR_MENUTREE_*, AUTH_METHOD, COMMIT_MESSAGE, RETAIN_PAGE_NAME_CASE, GIT_WEB_SERVER
153
A simplified proof of concept can be found on github: [otterwiki/docs/auth_examples/header-auth](https://github.com/redimp/otterwiki/tree/main/docs/auth_examples/header-auth).
154
34401d Ralph Thesen 2023-11-18 14:40:43
Added documentation for configuring An Otter Wiki
155
### Advanced configuration
156
157
This applies only when you create the `settings.cfg` manually. Create your
158
`settings.cfg` based upon the `settings.cfg.skeleton` and set the
159
variables fitting to your environment.
160
d2f41d Ralph Thesen 2026-08-30 13:40:56
Document actual defaults in the configuration tables
161
| Variable | Default | Example | Description |
162
|------------------|---------|-----------------|----------------------------------------------|
163
| `SECRET_KEY` | `'CHANGE ME'` | `'a random string of at least 16 characters'` | Choose a random string that is used to encrypt user session data |
164
| `REPOSITORY` | `''` | `'/path/to/the/repository/root'` | The absolute path to the repository storing the wiki pages |
165
| `SQLALCHEMY_DATABASE_URI` | `'sqlite:///:memory:'` | `'sqlite:////path/to/the/sqlite/file'` | The absolute path to the database storing the user credentials |
166
| `LOG_LEVEL` | `'INFO'` | `'DEBUG'` | Set the log level to one of `'DEBUG'`, `'INFO'`, `'WARNING'`, `'ERROR'`. |
167
| `ADMIN_USER_EMAIL` | `''` | `'admin@example.com'` | If set, only the user with this email address will be granted admin privileges on sign-up. |
168
| `RENDERER_HTML_ALLOWLIST` | `''` | `'iframe,section'` | Comma-separated list of additional HTML tags allowed in rendered Markdown. Leave empty to use the default allowlist. |
34401d Ralph Thesen 2023-11-18 14:40:43
Added documentation for configuring An Otter Wiki
169
170
For the `SQLALCHEMY_DATABASE_URI` see <https://flask-sqlalchemy.palletsprojects.com/en/2.x/config/#connection-uri-format>.
171
421730 Ralph Thesen 2025-06-26 08:48:51
How to configure the user/UID running the docker process
172
#### User UID running docker process
173
174
Per default in both the default and the `-slim` image the process running An Otter Wiki (and accessing the files in repository) is running with `uid=33`.
175
176
##### UID in the default image
177
178
To change this when using the default image, please configure the environment variables `PUID` and `PGID`. For example to run as user with `uid=1000 gid=1000` use this `compose.yaml`:
179
180
```yaml
181
services:
182
otterwiki:
183
image: redimp/otterwiki:2
184
restart: unless-stopped
be1525 valankar 2025-08-06 08:32:11
Update configuration.md When using env, I get: validating /home/valankar/otterwiki/docker-compose.yaml: services.otterwiki additional properties 'env' not allowed Change to environment.
185
environment:
421730 Ralph Thesen 2025-06-26 08:48:51
How to configure the user/UID running the docker process
186
PUID: 1000
905b1a valankar 2025-08-06 08:39:35
Update configuration.md Update correct environment variable for GID.
187
PGID: 1000
421730 Ralph Thesen 2025-06-26 08:48:51
How to configure the user/UID running the docker process
188
ports:
189
- 8080:80
190
volumes:
191
- ./app-data:/app-data
192
```
193
194
##### USER in the `-slim` image
195
196
The `-slim` image is running as unpriviliged user must therefore be configured differently: In the way docker intended, with configuring the [user](https://docs.docker.com/reference/compose-file/services/#user). For example to run as user with `uid=1000 gid=1000` use this `compose.yaml`:
197
198
```yaml
199
services:
200
otterwiki:
201
image: redimp/otterwiki:2-slim
202
restart: unless-stopped
203
user: 1000:1000
204
ports:
205
- 8080:8080
206
volumes:
207
- ./app-data:/app-data
208
```
209
210
Make sure that the configured `uid:gid` has read- and write permissions to volume mounted as `/app-data`.
211
34401d Ralph Thesen 2023-11-18 14:40:43
Added documentation for configuring An Otter Wiki
212
### Reverse Proxy and IPs
213
33bd57 deseven 2025-12-23 16:17:54
added headers to all reverse proxy configs, updated configuration section
214
Running the docker container behind a reverse proxy will show only the IP of the reverse proxy in the log files. With setting `REAL_IP_FROM` to the ip address or network of the reverse proxy, the IPs of the connection clients will be logged.
34401d Ralph Thesen 2023-11-18 14:40:43
Added documentation for configuring An Otter Wiki
215
33bd57 deseven 2025-12-23 16:17:54
added headers to all reverse proxy configs, updated configuration section
216
| Variable | Example | Description |
217
|------------------|-------------------|----------------------------------------------|
218
| `REAL_IP_FROM` | `'172.20.0.0/24'` | Configure wiki to respect `X-Real-IP` header in the requests coming from this IP or network. |