1 # Shaarli configuration
3 Once your Shaarli instance is installed, the file `data/config.json.php` is generated:
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
10 **Do not edit configuration options in index.php! Your changes would be lost.**
14 Some settings can be configured directly from a web browser by accesing the `Tools` menu. Values are read/written to/from the configuration file.
16 ![](https://i.imgur.com/boaaibC.png)
20 - **host**: LDAP host used for user authentication
21 - **dn**: user DN template (`sprintf` format, `%s` being replaced by user login)
23 ## Configuration file example
30 "hash": "<password hash>",
31 "salt": "<password salt>"
35 "session_protection_disabled": false,
41 "allowed_protocols": [
49 "config": "data\/config.php",
50 "datastore": "data\/datastore.php",
51 "ban_file": "data\/ipbans.php",
52 "updates": "data\/updates.txt",
53 "log": "data\/log.txt",
54 "update_check": "data\/lastupdatecheck.txt",
55 "raintpl_tmp": "tmp\/",
56 "raintpl_tpl": "tpl\/",
57 "thumbnails_cache": "cache",
58 "page_cache": "pagecache"
61 "check_updates": true,
62 "rss_permalinks": true,
64 "default_private_links": true,
65 "enable_thumbnails": true,
66 "enable_localcache": true,
67 "check_updates_branch": "stable",
68 "check_updates_interval": 86400,
74 "timezone": "Europe\/Paris",
75 "title": "My Shaarli",
83 "hide_public_links": false,
84 "hide_timestamps": false,
85 "open_shaarli": false,
94 "timezone": "Europe\/Paris",
98 "check_updates": true,
99 "check_updates_branch": "stable",
100 "check_updates_interval": 86400
103 "rss_permalinks": true,
107 "default_private_links": true,
108 "hide_public_links": false,
109 "force_login": false,
110 "hide_timestamps": false,
111 "remember_user_default": true
114 "enable_thumbnails": true,
115 "enable_localcache": true
118 "WALLABAG_URL": "http://demo.wallabag.org",
119 "WALLABAG_VERSION": "1"
125 "demo": "plugins/demo_plugin/languages/"
129 "host": "ldap://localhost",
130 "dn": "uid=%s,ou=people,dc=example,dc=org"
139 _These settings should not be edited_
141 - **login**: Login username.
142 - **hash**: Generated password hash.
143 - **salt**: Password salt.
147 - **title**: Shaarli's instance title.
148 - **header_link**: Link to the homepage.
149 - **links_per_page**: Number of Shaares displayed per page.
150 - **timezone**: See [the list of supported timezones](http://php.net/manual/en/timezones.php).
151 - **enabled_plugins**: List of enabled plugins.
152 - **default_note_title**: Default title of a new note.
153 - **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.
157 - **session_protection_disabled**: Disable session cookie hijacking protection (not recommended).
158 It might be useful if your IP adress often changes.
159 - **ban_after**: Failed login attempts before being IP banned.
160 - **ban_duration**: IP ban duration in seconds.
161 - **open_shaarli**: Anyone can add a new Shaare while logged out if enabled.
162 - **trusted_proxies**: List of trusted IP which won't be banned after failed login attemps. Useful if Shaarli is behind a reverse proxy.
163 - **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"]`).
167 - **data_dir**: Data directory.
168 - **datastore**: Shaarli's Shaares database file path.
169 - **history**: Shaarli's operation history file path.
170 - **updates**: File path for the ran updates file.
171 - **log**: Log file path.
172 - **update_check**: Last update check file path.
173 - **raintpl_tpl**: Templates directory.
174 - **raintpl_tmp**: Template engine cache directory.
175 - **thumbnails_cache**: Thumbnails cache directory.
176 - **page_cache**: Shaarli's internal cache directory.
177 - **ban_file**: Banned IP file path.
181 - **language**: translation language (also see [Translations](Translations))
182 - **auto** (default): The translation language is chosen from the browser locale.
183 It means that the language can be different for 2 different visitors depending on their locale.
184 - **en**: Use the English translation.
185 - **fr**: Use the French translation.
187 - **auto** or **php** (default): Use the PHP implementation of gettext (slower)
188 - **gettext**: Use PHP builtin gettext extension
189 (faster, but requires `php-gettext` to be installed and to reload the web server on update)
190 - **extension**: Translation extensions for custom themes or plugins.
191 Must be an associative array: `translation domain => translation path`.
195 - **check_updates**: Enable or disable update check to the git repository.
196 - **check_updates_branch**: Git branch used to check updates (e.g. `stable` or `master`).
197 - **check_updates_interval**: Look for new version every N seconds (default: every day).
201 - **default_private_links**: Check the private checkbox by default for every new Shaare.
202 - **hide_public_links**: All Shaares are hidden while logged out.
203 - **force_login**: if **hide_public_links** and this are set to `true`, all anonymous users are redirected to the login page.
204 - **hide_timestamps**: Timestamps are hidden.
205 - **remember_user_default**: Default state of the login page's *remember me* checkbox
206 - `true`: checked by default, `false`: unchecked by default
210 - **rss_permalinks**: Enable this to redirect RSS links to Shaarli's permalinks instead of shaared URL.
211 - **show_atom**: Display ATOM feed button.
215 - **enable_thumbnails**: Enable or disable thumbnail display.
216 - **enable_localcache**: Enable or disable local cache.
218 ## Plugins configuration
220 See [Plugins](Plugins.md)