aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc/html/Shaarli-configuration/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/html/Shaarli-configuration/index.html')
-rw-r--r--doc/html/Shaarli-configuration/index.html551
1 files changed, 551 insertions, 0 deletions
diff --git a/doc/html/Shaarli-configuration/index.html b/doc/html/Shaarli-configuration/index.html
new file mode 100644
index 00000000..4e556061
--- /dev/null
+++ b/doc/html/Shaarli-configuration/index.html
@@ -0,0 +1,551 @@
1<!DOCTYPE html>
2<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
3<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
4<head>
5 <meta charset="utf-8">
6 <meta http-equiv="X-UA-Compatible" content="IE=edge">
7 <meta name="viewport" content="width=device-width, initial-scale=1.0">
8
9
10 <link rel="shortcut icon" href="../img/favicon.ico">
11 <title>Shaarli configuration - Shaarli Documentation</title>
12 <link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>
13
14 <link rel="stylesheet" href="../css/theme.css" type="text/css" />
15 <link rel="stylesheet" href="../css/theme_extra.css" type="text/css" />
16 <link rel="stylesheet" href="../css/highlight.css">
17 <link href="../github-markdown.css" rel="stylesheet">
18
19 <script>
20 // Current page data
21 var mkdocs_page_name = "Shaarli configuration";
22 var mkdocs_page_input_path = "Shaarli-configuration.md";
23 var mkdocs_page_url = "/Shaarli-configuration/";
24 </script>
25
26 <script src="../js/jquery-2.1.1.min.js"></script>
27 <script src="../js/modernizr-2.8.3.min.js"></script>
28 <script type="text/javascript" src="../js/highlight.pack.js"></script>
29
30</head>
31
32<body class="wy-body-for-nav" role="document">
33
34 <div class="wy-grid-for-nav">
35
36
37 <nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
38 <div class="wy-side-nav-search">
39 <a href=".." class="icon icon-home"> Shaarli Documentation</a>
40 <div role="search">
41 <form id ="rtd-search-form" class="wy-form" action="../search.html" method="get">
42 <input type="text" name="q" placeholder="Search docs" />
43 </form>
44</div>
45 </div>
46
47 <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
48 <ul class="current">
49
50
51 <li class="toctree-l1">
52
53 <a class="" href="..">Home</a>
54 </li>
55
56 <li class="toctree-l1">
57
58 <span class="caption-text">Setup</span>
59 <ul class="subnav">
60 <li class="">
61
62 <a class="" href="../Download-and-Installation/">Download and Installation</a>
63 </li>
64 <li class="">
65
66 <a class="" href="../Upgrade-and-migration/">Upgrade and migration</a>
67 </li>
68 <li class="">
69
70 <a class="" href="../Server-requirements/">Server requirements</a>
71 </li>
72 <li class="">
73
74 <a class="" href="../Server-configuration/">Server configuration</a>
75 </li>
76 <li class="">
77
78 <a class="" href="../Server-security/">Server security</a>
79 </li>
80 <li class=" current">
81
82 <a class="current" href="./">Shaarli configuration</a>
83 <ul class="subnav">
84
85 <li class="toctree-l3"><a href="#foreword">Foreword</a></li>
86
87
88 <li class="toctree-l3"><a href="#file-and-directory-permissions">File and directory permissions</a></li>
89
90
91 <li class="toctree-l3"><a href="#configuration">Configuration</a></li>
92
93 <ul>
94
95 <li><a class="toctree-l4" href="#credentials">Credentials</a></li>
96
97 <li><a class="toctree-l4" href="#general">General</a></li>
98
99 <li><a class="toctree-l4" href="#security">Security</a></li>
100
101 <li><a class="toctree-l4" href="#resources">Resources</a></li>
102
103 <li><a class="toctree-l4" href="#updates">Updates</a></li>
104
105 <li><a class="toctree-l4" href="#privacy">Privacy</a></li>
106
107 <li><a class="toctree-l4" href="#feed">Feed</a></li>
108
109 <li><a class="toctree-l4" href="#thumbnail">Thumbnail</a></li>
110
111 <li><a class="toctree-l4" href="#redirector">Redirector</a></li>
112
113 </ul>
114
115
116 <li class="toctree-l3"><a href="#configuration-file-example">Configuration file example</a></li>
117
118
119 <li class="toctree-l3"><a href="#additional-configuration">Additional configuration</a></li>
120
121
122 </ul>
123 </li>
124 <li class="">
125
126 <a class="" href="../Plugins/">Plugins</a>
127 </li>
128 </ul>
129 </li>
130
131 <li class="toctree-l1">
132
133 <span class="caption-text">Docker</span>
134 <ul class="subnav">
135 <li class="">
136
137 <a class="" href="../Docker-101/">Docker 101</a>
138 </li>
139 <li class="">
140
141 <a class="" href="../Shaarli-images/">Shaarli images</a>
142 </li>
143 <li class="">
144
145 <a class="" href="../Reverse-proxy-configuration/">Reverse proxy configuration</a>
146 </li>
147 <li class="">
148
149 <a class="" href="../Docker-resources/">Docker resources</a>
150 </li>
151 </ul>
152 </li>
153
154 <li class="toctree-l1">
155
156 <span class="caption-text">Usage</span>
157 <ul class="subnav">
158 <li class="">
159
160 <a class="" href="../Features/">Features</a>
161 </li>
162 <li class="">
163
164 <a class="" href="../Bookmarklet/">Bookmarklet</a>
165 </li>
166 <li class="">
167
168 <a class="" href="../Browsing-and-searching/">Browsing and searching</a>
169 </li>
170 <li class="">
171
172 <a class="" href="../Firefox-share/">Firefox share</a>
173 </li>
174 <li class="">
175
176 <a class="" href="../RSS-feeds/">RSS feeds</a>
177 </li>
178 <li class="">
179
180 <a class="" href="../REST-API/">REST API</a>
181 </li>
182 </ul>
183 </li>
184
185 <li class="toctree-l1">
186
187 <span class="caption-text">How To</span>
188 <ul class="subnav">
189 <li class="">
190
191 <a class="" href="../Backup,-restore,-import-and-export/">Backup, restore, import and export</a>
192 </li>
193 <li class="">
194
195 <a class="" href="../Various-hacks/">Various hacks</a>
196 </li>
197 </ul>
198 </li>
199
200 <li class="toctree-l1">
201
202 <a class="" href="../Troubleshooting/">Troubleshooting</a>
203 </li>
204
205 <li class="toctree-l1">
206
207 <span class="caption-text">Development</span>
208 <ul class="subnav">
209 <li class="">
210
211 <a class="" href="../Development-guidelines/">Development guidelines</a>
212 </li>
213 <li class="">
214
215 <a class="" href="../Continuous-integration-tools/">Continuous integration tools</a>
216 </li>
217 <li class="">
218
219 <a class="" href="../GnuPG-signature/">GnuPG signature</a>
220 </li>
221 <li class="">
222
223 <a class="" href="../Coding-guidelines/">Coding guidelines</a>
224 </li>
225 <li class="">
226
227 <a class="" href="../Directory-structure/">Directory structure</a>
228 </li>
229 <li class="">
230
231 <a class="" href="../3rd-party-libraries/">3rd party libraries</a>
232 </li>
233 <li class="">
234
235 <a class="" href="../Plugin-System/">Plugin System</a>
236 </li>
237 <li class="">
238
239 <a class="" href="../Release-Shaarli/">Release Shaarli</a>
240 </li>
241 <li class="">
242
243 <a class="" href="../Versioning-and-Branches/">Versioning and Branches</a>
244 </li>
245 <li class="">
246
247 <a class="" href="../Security/">Security</a>
248 </li>
249 <li class="">
250
251 <a class="" href="../Static-analysis/">Static analysis</a>
252 </li>
253 <li class="">
254
255 <a class="" href="../Theming/">Theming</a>
256 </li>
257 <li class="">
258
259 <a class="" href="../Unit-tests/">Unit tests</a>
260 </li>
261 </ul>
262 </li>
263
264 <li class="toctree-l1">
265
266 <span class="caption-text">About</span>
267 <ul class="subnav">
268 <li class="">
269
270 <a class="" href="../FAQ/">FAQ</a>
271 </li>
272 <li class="">
273
274 <a class="" href="../Community-&-Related-software/">Community & Related software</a>
275 </li>
276 </ul>
277 </li>
278
279 </ul>
280 </div>
281 &nbsp;
282 </nav>
283
284 <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
285
286
287 <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
288 <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
289 <a href="..">Shaarli Documentation</a>
290 </nav>
291
292
293 <div class="wy-nav-content">
294 <div class="rst-content">
295 <div role="navigation" aria-label="breadcrumbs navigation">
296 <ul class="wy-breadcrumbs">
297 <li><a href="..">Docs</a> &raquo;</li>
298
299
300
301 <li>Setup &raquo;</li>
302
303
304
305 <li>Shaarli configuration</li>
306 <li class="wy-breadcrumbs-aside">
307
308 <a href="https://github.com/shaarli/Shaarli/edit/master/docs/Shaarli-configuration.md"
309 class="icon icon-github"> Edit on GitHub</a>
310
311 </li>
312 </ul>
313 <hr/>
314</div>
315 <div role="main">
316 <div class="section">
317
318 <h2 id="foreword">Foreword</h2>
319<p><strong>Do not edit configuration options in index.php! Your changes would be lost.</strong> </p>
320<p>Once your Shaarli instance is installed, the file <code>data/config.json.php</code> is generated:
321<em> it contains all settings in JSON format, and can be edited to customize values
322</em> it defines which <a href="../Plugin-System">plugins</a> are enabled<a href="../.html"></a>
323<em> its values override those defined in <code>index.php</code>
324</em> it is wrap in a PHP comment to prevent anyone accessing it, regardless of server configuration</p>
325<h2 id="file-and-directory-permissions">File and directory permissions</h2>
326<p>The server process running Shaarli must have:
327- <code>read</code> access to the following resources:
328 - PHP scripts: <code>index.php</code>, <code>application/*.php</code>, <code>plugins/*.php</code>
329 - 3rd party PHP and Javascript libraries: <code>inc/*.php</code>, <code>inc/*.js</code>
330 - static assets:
331 - CSS stylesheets: <code>inc/*.css</code>
332 - <code>images/*</code>
333 - RainTPL templates: <code>tpl/*.html</code>
334- <code>read</code>, <code>write</code> and <code>execution</code> access to the following directories:
335 - <code>cache</code> - thumbnail cache
336 - <code>data</code> - link data store, configuration options
337 - <code>pagecache</code> - Atom/RSS feed cache
338 - <code>tmp</code> - RainTPL page cache</p>
339<p>On a Linux distribution:
340- the web server user will likely be <code>www</code> or <code>http</code> (for Apache2)
341- it will be a member of a group of the same name: <code>www:www</code>, <code>http:http</code>
342- to give it access to Shaarli, either:
343 - unzip Shaarli in the default web server location (usually <code>/var/www/</code>) and set the web server user as the owner
344 - put users in the same group as the web server, and set the appropriate access rights
345- if you have a domain / subdomain to serve Shaarli, <a href="../Server-configuration">configure the server</a> accordingly<a href="../.html"></a></p>
346<h2 id="configuration">Configuration</h2>
347<p>In <code>data/config.json.php</code>.</p>
348<p>See also <a href="../Plugin-System.html">Plugin System</a>.</p>
349<h3 id="credentials">Credentials</h3>
350<blockquote>
351<p>You shouldn't edit those.</p>
352</blockquote>
353<p><strong>login</strong>: Login username.<br />
354<strong>hash</strong>: Generated password hash.<br />
355<strong>salt</strong>: Password salt.</p>
356<h3 id="general">General</h3>
357<p><strong>title</strong>: Shaarli's instance title.<br />
358<strong>header_link</strong>: Link to the homepage.<br />
359<strong>links_per_page</strong>: Number of shaares displayed per page.<br />
360<strong>timezone</strong>: See <a href="http://php.net/manual/en/timezones.php">the list of supported timezones</a>.<br />
361<strong>enabled_plugins</strong>: List of enabled plugins.</p>
362<h3 id="security">Security</h3>
363<p><strong>session_protection_disabled</strong>: Disable session cookie hijacking protection (not recommended).
364It might be useful if your IP adress often changes.<br />
365<strong>ban_after</strong>: Failed login attempts before being IP banned.<br />
366<strong>ban_duration</strong>: IP ban duration in seconds.<br />
367<strong>open_shaarli</strong>: Anyone can add a new link while logged out if enabled.<br />
368<strong>trusted_proxies</strong>: List of trusted IP which won't be banned after failed login attemps. Useful if Shaarli is behind a reverse proxy.<br />
369<strong>allowed_protocols</strong>: List of allowed protocols in shaare URLs or markdown-rendered descriptions. Useful if you want to store <code>javascript:</code> links (bookmarklets) in Shaarli (default: <code>["ftp", "ftps", "magnet"]</code>).</p>
370<h3 id="resources">Resources</h3>
371<p><strong>data_dir</strong>: Data directory.<br />
372<strong>datastore</strong>: Shaarli's links database file path.<br />
373<strong>history</strong>: Shaarli's operation history file path.
374<strong>updates</strong>: File path for the ran updates file.<br />
375<strong>log</strong>: Log file path.<br />
376<strong>update_check</strong>: Last update check file path.<br />
377<strong>raintpl_tpl</strong>: Templates directory.<br />
378<strong>raintpl_tmp</strong>: Template engine cache directory.<br />
379<strong>thumbnails_cache</strong>: Thumbnails cache directory.<br />
380<strong>page_cache</strong>: Shaarli's internal cache directory.<br />
381<strong>ban_file</strong>: Banned IP file path.</p>
382<h3 id="updates">Updates</h3>
383<p><strong>check_updates</strong>: Enable or disable update check to the git repository.<br />
384<strong>check_updates_branch</strong>: Git branch used to check updates (e.g. <code>stable</code> or <code>master</code>).<br />
385<strong>check_updates_interval</strong>: Look for new version every N seconds (default: every day).</p>
386<h3 id="privacy">Privacy</h3>
387<p><strong>default_private_links</strong>: Check the private checkbox by default for every new link.<br />
388<strong>hide_public_links</strong>: All links are hidden while logged out.<br />
389<strong>hide_timestamps</strong>: Timestamps are hidden.</p>
390<h3 id="feed">Feed</h3>
391<p><strong>rss_permalinks</strong>: Enable this to redirect RSS links to Shaarli's permalinks instead of shaared URL.<br />
392<strong>show_atom</strong>: Display ATOM feed button.</p>
393<h3 id="thumbnail">Thumbnail</h3>
394<p><strong>enable_thumbnails</strong>: Enable or disable thumbnail display.<br />
395<strong>enable_localcache</strong>: Enable or disable local cache.</p>
396<h3 id="redirector">Redirector</h3>
397<p><strong>url</strong>: Redirector URL, such as <code>anonym.to</code>.<br />
398<strong>encode_url</strong>: Enable this if the redirector needs encoded URL to work properly.</p>
399<h2 id="configuration-file-example">Configuration file example</h2>
400<pre><code class="json">&lt;?php /*
401{
402 &quot;credentials&quot;: {
403 &quot;login&quot;: &quot;&lt;login&gt;&quot;,
404 &quot;hash&quot;: &quot;&lt;password hash&gt;&quot;,
405 &quot;salt&quot;: &quot;&lt;password salt&gt;&quot;
406 },
407 &quot;security&quot;: {
408 &quot;ban_after&quot;: 4,
409 &quot;session_protection_disabled&quot;: false,
410 &quot;ban_duration&quot;: 1800,
411 &quot;trusted_proxies&quot;: [
412 &quot;1.2.3.4&quot;,
413 &quot;5.6.7.8&quot;
414 ],
415 &quot;allowed_protocols&quot;: [
416 &quot;ftp&quot;,
417 &quot;ftps&quot;,
418 &quot;magnet&quot;
419 ]
420 },
421 &quot;resources&quot;: {
422 &quot;data_dir&quot;: &quot;data&quot;,
423 &quot;config&quot;: &quot;data\/config.php&quot;,
424 &quot;datastore&quot;: &quot;data\/datastore.php&quot;,
425 &quot;ban_file&quot;: &quot;data\/ipbans.php&quot;,
426 &quot;updates&quot;: &quot;data\/updates.txt&quot;,
427 &quot;log&quot;: &quot;data\/log.txt&quot;,
428 &quot;update_check&quot;: &quot;data\/lastupdatecheck.txt&quot;,
429 &quot;raintpl_tmp&quot;: &quot;tmp\/&quot;,
430 &quot;raintpl_tpl&quot;: &quot;tpl\/&quot;,
431 &quot;thumbnails_cache&quot;: &quot;cache&quot;,
432 &quot;page_cache&quot;: &quot;pagecache&quot;
433 },
434 &quot;general&quot;: {
435 &quot;check_updates&quot;: true,
436 &quot;rss_permalinks&quot;: true,
437 &quot;links_per_page&quot;: 20,
438 &quot;default_private_links&quot;: true,
439 &quot;enable_thumbnails&quot;: true,
440 &quot;enable_localcache&quot;: true,
441 &quot;check_updates_branch&quot;: &quot;stable&quot;,
442 &quot;check_updates_interval&quot;: 86400,
443 &quot;enabled_plugins&quot;: [
444 &quot;markdown&quot;,
445 &quot;wallabag&quot;,
446 &quot;archiveorg&quot;
447 ],
448 &quot;timezone&quot;: &quot;Europe\/Paris&quot;,
449 &quot;title&quot;: &quot;My Shaarli&quot;,
450 &quot;header_link&quot;: &quot;?&quot;
451 },
452 &quot;extras&quot;: {
453 &quot;show_atom&quot;: false,
454 &quot;hide_public_links&quot;: false,
455 &quot;hide_timestamps&quot;: false,
456 &quot;open_shaarli&quot;: false,
457 &quot;redirector&quot;: &quot;http://anonym.to/?&quot;,
458 &quot;redirector_encode_url&quot;: false
459 },
460 &quot;general&quot;: {
461 &quot;header_link&quot;: &quot;?&quot;,
462 &quot;links_per_page&quot;: 20,
463 &quot;enabled_plugins&quot;: [
464 &quot;markdown&quot;,
465 &quot;wallabag&quot;
466 ],
467 &quot;timezone&quot;: &quot;Europe\/Paris&quot;,
468 &quot;title&quot;: &quot;My Shaarli&quot;
469 },
470 &quot;updates&quot;: {
471 &quot;check_updates&quot;: true,
472 &quot;check_updates_branch&quot;: &quot;stable&quot;,
473 &quot;check_updates_interval&quot;: 86400
474 },
475 &quot;feed&quot;: {
476 &quot;rss_permalinks&quot;: true,
477 &quot;show_atom&quot;: false
478 },
479 &quot;privacy&quot;: {
480 &quot;default_private_links&quot;: true,
481 &quot;hide_public_links&quot;: false,
482 &quot;hide_timestamps&quot;: false
483 },
484 &quot;thumbnail&quot;: {
485 &quot;enable_thumbnails&quot;: true,
486 &quot;enable_localcache&quot;: true
487 },
488 &quot;redirector&quot;: {
489 &quot;url&quot;: &quot;http://anonym.to/?&quot;,
490 &quot;encode_url&quot;: false
491 },
492 &quot;plugins&quot;: {
493 &quot;WALLABAG_URL&quot;: &quot;http://demo.wallabag.org&quot;,
494 &quot;WALLABAG_VERSION&quot;: &quot;1&quot;
495 }
496} ?&gt;
497</code></pre>
498
499<h2 id="additional-configuration">Additional configuration</h2>
500<p>The playvideos plugin may require that you adapt your server's
501<a href="https://github.com/shaarli/Shaarli/blob/master/plugins/playvideos/README.md#troubleshooting">Content Security Policy</a>
502configuration to work properly.<a href="../.html"></a></p>
503
504 </div>
505 </div>
506 <footer>
507
508 <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
509
510 <a href="../Plugins/" class="btn btn-neutral float-right" title="Plugins">Next <span class="icon icon-circle-arrow-right"></span></a>
511
512
513 <a href="../Server-security/" class="btn btn-neutral" title="Server security"><span class="icon icon-circle-arrow-left"></span> Previous</a>
514
515 </div>
516
517
518 <hr/>
519
520 <div role="contentinfo">
521 <!-- Copyright etc -->
522
523 </div>
524
525 Built with <a href="http://www.mkdocs.org">MkDocs</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
526</footer>
527
528 </div>
529 </div>
530
531 </section>
532
533 </div>
534
535 <div class="rst-versions" role="note" style="cursor: pointer">
536 <span class="rst-current-version" data-toggle="rst-current-version">
537
538 <a href="https://github.com/shaarli/Shaarli" class="fa fa-github" style="float: left; color: #fcfcfc"> GitHub</a>
539
540
541 <span><a href="../Server-security/" style="color: #fcfcfc;">&laquo; Previous</a></span>
542
543
544 <span style="margin-left: 15px"><a href="../Plugins/" style="color: #fcfcfc">Next &raquo;</a></span>
545
546 </span>
547</div>
548 <script src="../js/theme.js"></script>
549
550</body>
551</html>