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>
6
**Settings** menu
7
as admin user. Alternatively you configure the variables via the
8
`settings.cfg`, see below. The docker image respects the environment variables and
9
configures the `settings.cfg` accordingly.
10
11
### Branding
12
13
| Variable | Example | Description |
14
|------------------|-----------------|----------------------------------------------|
15
| `SITE_NAME` | `'Otterwiki'` | The `SITE_NAME` displayed on every page and email |
16
| `SITE_LOGO` | `'/Home/a/logo.png'` | Customize navbar logo url (can be a page attachment) |
17
| `SITE_DESCRIPTION` | `'A minimalistic wiki powered by python, markdown and git.'` | The default description used in `<meta>` tags |
18
| `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 |
19
20
21
### Permission configuration
22
23
| Variable | Example | Description |
24
|------------------|-----------------|----------------------------------------------|
25
| `READ_ACCESS` | `'ANONYMOUS'` | Read access to wiki pages and attachments |
26
| `WRITE_ACCESS` | `'REGISTERED'` | Write access to wiki pages |
27
| `ATTACHMENT_ACCESS` | `'APPROVED'` | Write acccess to attachments |
28
| `AUTO_APPROVAL` | `False` | With `AUTO_APPROVAL=True` users are approved on registration |
29
| `EMAIL_NEEDS_CONFIRMATION` | `True` | With `EMAIL_NEEDS_CONFIRMATION=True` users have to confirm their email address |
30
| `NOTIFY_ADMINS_ON_REGISTER` | `True` | Notify admins if a new user is registered |
31
32
There are four types of users in the Otterwiki: `ANONYMOUS` are non logged in users.
33
Users that registered via email and are logged in are `REGISTERED`, users approved via
34
the settings menu by an admin are `APPROVED`. In addition to the `APPROVED` flag the `ADMIN`
35
flag can be set. Users with the `ADMIN` flag can edit (and approve) other users. The first registered user is flagged as admin.
36
37
### Mail configuration
38
39
An Otter Wiki is using [Flask-Mail](https://pythonhosted.org/Flask-Mail/).
40
41
| Variable | Example | Description |
42
|------------------|-----------------|----------------------------------------------|
43
| `MAIL_DEFAULT_SENDER` | `'otterwiki@example.com'` | The sender address of all mails |
44
| `MAIL_SERVER` | `'smtp.googlemail.com'` | The smtp server address |
45
| `MAIL_PORT` | `465` | The smtp server port |
46
| `MAIL_USERNAME` | `'USERNAME'` | Username for the mail account |
47
| `MAIL_PASSWORD` | `'PASSWORD'` | Password for the mail account |
48
| `MAIL_USE_TLS` | `False` | Use TLS encrytion |
49
| `MAIL_USE_SSL` | `True` | Use SSL encryption |
50
51
### Advanced configuration
52
53
This applies only when you create the `settings.cfg` manually. Create your
54
`settings.cfg` based upon the `settings.cfg.skeleton` and set the
55
variables fitting to your environment.
56
57
| Variable | Example | Description |
58
|------------------|-----------------|----------------------------------------------|
59
| `SECRET_KEY` | `'CHANGE ME'` | Choose a random string that is used to encrypt user session data |
60
| `REPOSITORY` | `'/path/to/the/repository/root'` | The absolute path to the repository storing the wiki pages |
61
| `SQLALCHEMY_DATABASE_URI` | `'sqlite:////path/to/the/sqlite/file'` | The absolute path to the database storing the user credentials |
62
63
For the `SQLALCHEMY_DATABASE_URI` see <https://flask-sqlalchemy.palletsprojects.com/en/2.x/config/#connection-uri-format>.
64
65
### Reverse Proxy and IPs
66
67
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 of the reverse proxy, the IPs of the connection clients will be logged.
68
69
| Variable | Example | Description |
70
|------------------|------------------|----------------------------------------------|
71
| `REAL_IP_FROM` | `'10.0.0.0/8'` | Configure nginx to respect `real_ip_header`, see <http://nginx.org/en/docs/http/ngx_http_realip_module.html> |