aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc/md/Shaarli-configuration.md
diff options
context:
space:
mode:
authornodiscc <nodiscc@gmail.com>2020-05-16 12:54:51 +0200
committernodiscc <nodiscc@gmail.com>2020-09-12 14:31:45 +0200
commit91a21c272960889afd4eaa431a3d29b7785b6efc (patch)
tree26e3ba62319964c5fd48d93fdfe47813d5dc9bf5 /doc/md/Shaarli-configuration.md
parent6128ab6a55430a2b705be31ff417c0c552a0db1f (diff)
downloadShaarli-91a21c272960889afd4eaa431a3d29b7785b6efc.tar.gz
Shaarli-91a21c272960889afd4eaa431a3d29b7785b6efc.tar.zst
Shaarli-91a21c272960889afd4eaa431a3d29b7785b6efc.zip
**General rewording, proof-reading, deduplication, shortening, reordering, simplification, cleanup/formatting/standardization**
- standardize page names, rework documentation structure, update TOC - use same example paths everywhere - level 1 titles on all pages - fix broken links - .md suffix on all page links (works both from readthedocs and github repository views) **Server:** A full and concise installation guide with examples is a frequent request. The documentation should provide such a guide for basic installation needs, while explaining alternative/advanced configuration at the end. Links to reference guides and documentation should be used more frequently to avoid recommending an outdated or excessively complex configuration. - server: move most server-related info to server-configuration.md, cleanup/shorten - server: update list of php dependencies/libraries, link to composer.json - server: installation: support 3 install methods (from release zip, from sources, using docker) - server: installation: use rsync instead of mv as mv results will change depending of taget directory already existing or not - server: add example/basic usage of certbot - server, upgrade, installation: update file permissions setup, use sudo for upgrade operations in webserver document root - server: apache: add comments to configuration, fix and factorize file permissions setup, set cache-control header, deny access to dotfiles, add missing apache config steps, add http->https redirect example - server: nginx: refactor nginx configuration, add comments, DO log access to denied/protected files - server: add links to MDN for x-forwarded-* http headers explanation, cleanup/clarify robots.txt and crawlers section - server: bump file upload size limit to 100MB we have reports of bookmark exports weighing +40MB - i have a 13MB one here - server: simplify phpinfo documentation - server: move backup and restore information to dedicated page - docker: move all docker docs to Docker.md, simplify/ docker setup, add docker-compose.yml example, replace docker-101 with docker cheatsheet - troubleshooting: move all troubleshooting documentation to troubleshooting.md **Usage:** - index: add getting started section on index page - features/usage: move all usage-related documentation to usage.md, add links from the main feature list to corresponding usage docs, clarify/reword features list - shaarli configuration: add note about configuring from web interface **Removed:** - remove obsolete/orphan images - remove obsolete shaarchiver example - remove outdated "decode datastore content" snippet **Development:** - development: move development-related docs (static analysis, CI, unit tests, 3rd party libs, link structure/directory, guidelines, security....) to dev/ directory - development: Merge several pages to development.md - **Breaking change?:** remove mentions of 'stable' branch, switch to new branch/release model (master=latest commit, release=latest tag) - **Breaking change?:** refer to base sharing unit as "Shaare" everywhere (TODO: reflect changes in the code?) doc: update featues list/link to usage.md for details - development: directory structure: add note about required file permissions - .travis-ci.yml: add comments - .htaccess: add comment
Diffstat (limited to 'doc/md/Shaarli-configuration.md')
-rw-r--r--doc/md/Shaarli-configuration.md213
1 files changed, 93 insertions, 120 deletions
diff --git a/doc/md/Shaarli-configuration.md b/doc/md/Shaarli-configuration.md
index 2462e20e..e93ee245 100644
--- a/doc/md/Shaarli-configuration.md
+++ b/doc/md/Shaarli-configuration.md
@@ -1,126 +1,19 @@
1## Foreword 1# Shaarli configuration
2
3**Do not edit configuration options in index.php! Your changes would be lost.**
4 2
5Once your Shaarli instance is installed, the file `data/config.json.php` is generated: 3Once your Shaarli instance is installed, the file `data/config.json.php` is generated:
6* it contains all settings in JSON format, and can be edited to customize values
7* it defines which [plugins](Plugin-System) are enabled
8* its values override those defined in `index.php`
9* it is wrap in a PHP comment to prevent anyone accessing it, regardless of server configuration
10
11## File and directory permissions
12
13The server process running Shaarli must have:
14
15- `read` access to the following resources:
16 - PHP scripts: `index.php`, `application/*.php`, `plugins/*.php`
17 - 3rd party PHP and Javascript libraries: `inc/*.php`, `inc/*.js`
18 - static assets:
19 - CSS stylesheets: `inc/*.css`
20 - `images/*`
21 - RainTPL templates: `tpl/*.html`
22- `read`, `write` and `execution` access to the following directories:
23 - `cache` - thumbnail cache
24 - `data` - link data store, configuration options
25 - `pagecache` - Atom/RSS feed cache
26 - `tmp` - RainTPL page cache
27
28On a Linux distribution:
29
30- the web server user will likely be `www` or `http` (for Apache2)
31- it will be a member of a group of the same name: `www:www`, `http:http`
32- to give it access to Shaarli, either:
33 - unzip Shaarli in the default web server location (usually `/var/www/`) and set the web server user as the owner
34 - put users in the same group as the web server, and set the appropriate access rights
35- if you have a domain / subdomain to serve Shaarli, [configure the server](Server-configuration) accordingly
36
37## Configuration
38
39In `data/config.json.php`.
40
41See also [Plugin System](Plugin-System).
42
43### Credentials
44
45_These settings should not be edited_
46
47- **login**: Login username.
48- **hash**: Generated password hash.
49- **salt**: Password salt.
50
51### General
52
53- **title**: Shaarli's instance title.
54- **header_link**: Link to the homepage.
55- **links_per_page**: Number of shaares displayed per page.
56- **timezone**: See [the list of supported timezones](http://php.net/manual/en/timezones.php).
57- **enabled_plugins**: List of enabled plugins.
58- **default_note_title**: Default title of a new note.
59- **retrieve_description** (boolean): If set to true, for every new links Shaarli will try
60to retrieve the description and keywords from the HTML meta tags.
61
62### Security
63
64- **session_protection_disabled**: Disable session cookie hijacking protection (not recommended).
65 It might be useful if your IP adress often changes.
66- **ban_after**: Failed login attempts before being IP banned.
67- **ban_duration**: IP ban duration in seconds.
68- **open_shaarli**: Anyone can add a new link while logged out if enabled.
69- **trusted_proxies**: List of trusted IP which won't be banned after failed login attemps. Useful if Shaarli is behind a reverse proxy.
70- **allowed_protocols**: List of allowed protocols in shaare URLs or markdown-rendered descriptions. Useful if you want to store `javascript:` links (bookmarklets) in Shaarli (default: `["ftp", "ftps", "magnet"]`).
71
72### Resources
73
74- **data_dir**: Data directory.
75- **datastore**: Shaarli's links database file path.
76- **history**: Shaarli's operation history file path.
77- **updates**: File path for the ran updates file.
78- **log**: Log file path.
79- **update_check**: Last update check file path.
80- **raintpl_tpl**: Templates directory.
81- **raintpl_tmp**: Template engine cache directory.
82- **thumbnails_cache**: Thumbnails cache directory.
83- **page_cache**: Shaarli's internal cache directory.
84- **ban_file**: Banned IP file path.
85 4
86### Translation 5- it contains all settings in JSON format, and can be edited to customize values
6- it defines which [plugins](Plugins.md) are enabled
7- its values override those defined in `index.php`
8- it is wrapped in a PHP comment so that its contents are never served by the web server, regardless of configuration
87 9
88- **language**: translation language (also see [Translations](Translations)) 10**Do not edit configuration options in index.php! Your changes would be lost.**
89 - **auto** (default): The translation language is chosen from the browser locale.
90 It means that the language can be different for 2 different visitors depending on their locale.
91 - **en**: Use the English translation.
92 - **fr**: Use the French translation.
93- **mode**:
94 - **auto** or **php** (default): Use the PHP implementation of gettext (slower)
95 - **gettext**: Use PHP builtin gettext extension
96 (faster, but requires `php-gettext` to be installed and to reload the web server on update)
97- **extension**: Translation extensions for custom themes or plugins.
98Must be an associative array: `translation domain => translation path`.
99
100### Updates
101
102- **check_updates**: Enable or disable update check to the git repository.
103- **check_updates_branch**: Git branch used to check updates (e.g. `stable` or `master`).
104- **check_updates_interval**: Look for new version every N seconds (default: every day).
105
106### Privacy
107
108- **default_private_links**: Check the private checkbox by default for every new link.
109- **hide_public_links**: All links are hidden while logged out.
110- **force_login**: if **hide_public_links** and this are set to `true`, all anonymous users are redirected to the login page.
111- **hide_timestamps**: Timestamps are hidden.
112- **remember_user_default**: Default state of the login page's *remember me* checkbox
113 - `true`: checked by default, `false`: unchecked by default
114
115### Feed
116 11
117- **rss_permalinks**: Enable this to redirect RSS links to Shaarli's permalinks instead of shaared URL. 12## Tools menu
118- **show_atom**: Display ATOM feed button.
119 13
120### Thumbnail 14Some settings can be configured directly from a web browser by accesing the `Tools` menu. Values are read/written to/from the configuration file.
121 15
122- **enable_thumbnails**: Enable or disable thumbnail display. 16![](https://i.imgur.com/boaaibC.png)
123- **enable_localcache**: Enable or disable local cache.
124 17
125### LDAP 18### LDAP
126 19
@@ -236,9 +129,89 @@ Must be an associative array: `translation domain => translation path`.
236} ?> 129} ?>
237``` 130```
238 131
239## Additional configuration 132## Settings
133
134### Credentials
135
136_These settings should not be edited_
137
138- **login**: Login username.
139- **hash**: Generated password hash.
140- **salt**: Password salt.
141
142### General
143
144- **title**: Shaarli's instance title.
145- **header_link**: Link to the homepage.
146- **links_per_page**: Number of Shaares displayed per page.
147- **timezone**: See [the list of supported timezones](http://php.net/manual/en/timezones.php).
148- **enabled_plugins**: List of enabled plugins.
149- **default_note_title**: Default title of a new note.
150- **retrieve_description** (boolean): If set to true, for every new Shaare Shaarli will try to retrieve the description and keywords from the HTML meta tags.
151
152### Security
153
154- **session_protection_disabled**: Disable session cookie hijacking protection (not recommended).
155 It might be useful if your IP adress often changes.
156- **ban_after**: Failed login attempts before being IP banned.
157- **ban_duration**: IP ban duration in seconds.
158- **open_shaarli**: Anyone can add a new Shaare while logged out if enabled.
159- **trusted_proxies**: List of trusted IP which won't be banned after failed login attemps. Useful if Shaarli is behind a reverse proxy.
160- **allowed_protocols**: List of allowed protocols in shaare URLs or markdown-rendered descriptions. Useful if you want to store `javascript:` links (bookmarklets) in Shaarli (default: `["ftp", "ftps", "magnet"]`).
161
162### Resources
163
164- **data_dir**: Data directory.
165- **datastore**: Shaarli's Shaares database file path.
166- **history**: Shaarli's operation history file path.
167- **updates**: File path for the ran updates file.
168- **log**: Log file path.
169- **update_check**: Last update check file path.
170- **raintpl_tpl**: Templates directory.
171- **raintpl_tmp**: Template engine cache directory.
172- **thumbnails_cache**: Thumbnails cache directory.
173- **page_cache**: Shaarli's internal cache directory.
174- **ban_file**: Banned IP file path.
175
176### Translation
177
178- **language**: translation language (also see [Translations](Translations))
179 - **auto** (default): The translation language is chosen from the browser locale.
180 It means that the language can be different for 2 different visitors depending on their locale.
181 - **en**: Use the English translation.
182 - **fr**: Use the French translation.
183- **mode**:
184 - **auto** or **php** (default): Use the PHP implementation of gettext (slower)
185 - **gettext**: Use PHP builtin gettext extension
186 (faster, but requires `php-gettext` to be installed and to reload the web server on update)
187- **extension**: Translation extensions for custom themes or plugins.
188Must be an associative array: `translation domain => translation path`.
189
190### Updates
191
192- **check_updates**: Enable or disable update check to the git repository.
193- **check_updates_branch**: Git branch used to check updates (e.g. `stable` or `master`).
194- **check_updates_interval**: Look for new version every N seconds (default: every day).
195
196### Privacy
197
198- **default_private_links**: Check the private checkbox by default for every new Shaare.
199- **hide_public_links**: All Shaares are hidden while logged out.
200- **force_login**: if **hide_public_links** and this are set to `true`, all anonymous users are redirected to the login page.
201- **hide_timestamps**: Timestamps are hidden.
202- **remember_user_default**: Default state of the login page's *remember me* checkbox
203 - `true`: checked by default, `false`: unchecked by default
204
205### Feed
206
207- **rss_permalinks**: Enable this to redirect RSS links to Shaarli's permalinks instead of shaared URL.
208- **show_atom**: Display ATOM feed button.
209
210### Thumbnail
211
212- **enable_thumbnails**: Enable or disable thumbnail display.
213- **enable_localcache**: Enable or disable local cache.
240 214
241The `playvideos` plugin may require that you adapt your server's 215## Plugins configuration
242[Content Security Policy](https://github.com/shaarli/Shaarli/blob/master/plugins/playvideos/README.md#troubleshooting)
243configuration to work properly.
244 216
217See [Plugins](Plugins.md) \ No newline at end of file