settings.json.j2 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559
  1. /**
  2. * THIS IS THE SETTINGS FILE THAT IS COPIED INSIDE THE DOCKER CONTAINER.
  3. *
  4. * By default, some runtime customizations are supported (see the
  5. * documentation).
  6. *
  7. * If you need more control, edit this file and rebuild the container.
  8. */
  9. /*
  10. * This file must be valid JSON. But comments are allowed
  11. *
  12. * Please edit settings.json, not settings.json.template
  13. *
  14. * Please note that starting from Etherpad 1.6.0 you can store DB credentials in
  15. * a separate file (credentials.json).
  16. *
  17. *
  18. * ENVIRONMENT VARIABLE SUBSTITUTION
  19. * =================================
  20. *
  21. * All the configuration values can be read from environment variables using the
  22. * syntax "${ENV_VAR}" or "${ENV_VAR:default_value}".
  23. *
  24. * This is useful, for example, when running in a Docker container.
  25. *
  26. * EXAMPLE:
  27. * "port": "${PORT:9001}"
  28. * "minify": "${MINIFY}"
  29. * "skinName": "${SKIN_NAME:colibris}"
  30. *
  31. * Would read the configuration values for those items from the environment
  32. * variables PORT, MINIFY and SKIN_NAME.
  33. *
  34. * If PORT and SKIN_NAME variables were not defined, the default values 9001 and
  35. * "colibris" would be used.
  36. * The configuration value "minify", on the other hand, does not have a
  37. * designated default value. Thus, if the environment variable MINIFY were
  38. * undefined, "minify" would be null.
  39. *
  40. * REMARKS:
  41. * 1) please note that variable substitution always needs to be quoted.
  42. *
  43. * "port": 9001, <-- Literal values. When not using
  44. * "minify": false substitution, only strings must be
  45. * "skinName": "colibris" quoted. Booleans and numbers must not.
  46. *
  47. * "port": "${PORT:9001}" <-- CORRECT: if you want to use a variable
  48. * "minify": "${MINIFY:true}" substitution, put quotes around its name,
  49. * "skinName": "${SKIN_NAME}" even if the required value is a number or
  50. * a boolean.
  51. * Etherpad will take care of rewriting it
  52. * to the proper type if necessary.
  53. *
  54. * "port": ${PORT:9001} <-- ERROR: this is not valid json. Quotes
  55. * "minify": ${MINIFY} around variable names are missing.
  56. * "skinName": ${SKIN_NAME}
  57. *
  58. * 2) Beware of undefined variables and default values: nulls and empty strings
  59. * are different!
  60. *
  61. * This is particularly important for user's passwords (see the relevant
  62. * section):
  63. *
  64. * "password": "${PASSW}" // if PASSW is not defined would result in password === null
  65. * "password": "${PASSW:}" // if PASSW is not defined would result in password === ''
  66. *
  67. * If you want to use an empty value (null) as default value for a variable,
  68. * simply do not set it, without putting any colons: "${ABIWORD}".
  69. *
  70. * 3) if you want to use newlines in the default value of a string parameter,
  71. * use "\n" as usual.
  72. *
  73. * "defaultPadText" : "${DEFAULT_PAD_TEXT}Line 1\nLine 2"
  74. */
  75. {
  76. /*
  77. * Name your instance!
  78. */
  79. "title": "{{title}}",
  80. /*
  81. * favicon default name
  82. * alternatively, set up a fully specified Url to your own favicon
  83. */
  84. "favicon": "{{favicon}}",
  85. /*
  86. * Skin name.
  87. *
  88. * Its value has to be an existing directory under src/static/skins.
  89. * You can write your own, or use one of the included ones:
  90. *
  91. * - "no-skin": an empty skin (default). This yields the unmodified,
  92. * traditional Etherpad theme.
  93. * - "colibris": the new experimental skin (since Etherpad 1.8), candidate to
  94. * become the default in Etherpad 2.0
  95. */
  96. "skinName": "colibris",
  97. /*
  98. * Skin Variants
  99. *
  100. * Use the UI skin variants builder at /p/test#skinvariantsbuilder
  101. *
  102. * For the colibris skin only, you can choose how to render the three main
  103. * containers:
  104. * - toolbar (top menu with icons)
  105. * - editor (containing the text of the pad)
  106. * - background (area outside of editor, mostly visible when using page style)
  107. *
  108. * For each of the 3 containers you can choose 4 color combinations:
  109. * super-light, light, dark, super-dark.
  110. *
  111. * For example, to make the toolbar dark, you will include "dark-toolbar" into
  112. * skinVariants.
  113. *
  114. * You can provide multiple skin variants separated by spaces. Default
  115. * skinVariant is "super-light-toolbar super-light-editor light-background".
  116. *
  117. * For the editor container, you can also make it full width by adding
  118. * "full-width-editor" variant (by default editor is rendered as a page, with
  119. * a max-width of 900px).
  120. */
  121. "skinVariants": "dark-toolbar super-light-editor super-dark-background",
  122. /*
  123. * IP and port which Etherpad should bind at.
  124. *
  125. * Binding to a Unix socket is also supported: just use an empty string for
  126. * the ip, and put the full path to the socket in the port parameter.
  127. *
  128. * EXAMPLE USING UNIX SOCKET:
  129. * "ip": "", // <-- has to be an empty string
  130. * "port" : "/somepath/etherpad.socket", // <-- path to a Unix socket
  131. */
  132. "ip": "{{listen_ip}}",
  133. "port": "{{listen_port}}",
  134. /*
  135. * Option to hide/show the settings.json in admin page.
  136. *
  137. * Default option is set to true
  138. */
  139. "showSettingsInAdminPage": true,
  140. /*
  141. * Node native SSL support
  142. *
  143. * This is disabled by default.
  144. * Make sure to have the minimum and correct file access permissions set so
  145. * that the Etherpad server can access them
  146. */
  147. /*
  148. "ssl" : {
  149. "key" : "/path-to-your/epl-server.key",
  150. "cert" : "/path-to-your/epl-server.crt",
  151. "ca": ["/path-to-your/epl-intermediate-cert1.crt", "/path-to-your/epl-intermediate-cert2.crt"]
  152. },
  153. */
  154. /*
  155. * The type of the database.
  156. *
  157. * You can choose between many DB drivers, for example: dirty, postgres,
  158. * sqlite, mysql.
  159. *
  160. * You shouldn't use "dirty" for for anything else than testing or
  161. * development.
  162. *
  163. *
  164. * Database specific settings are dependent on dbType, and go in dbSettings.
  165. * Remember that since Etherpad 1.6.0 you can also store these informations in
  166. * credentials.json.
  167. *
  168. * For a complete list of the supported drivers, please refer to:
  169. * https://www.npmjs.com/package/ueberdb2
  170. */
  171. "dbType": "postgres",
  172. "dbSettings": {
  173. "host": "/var/run/postgresql",
  174. "database": "etherpad",
  175. "user": "etherpad",
  176. "password": "{{database_password}}",
  177. "charset": "utf8mb4"
  178. },
  179. /**
  180. * The default text of a pad
  181. */
  182. "defaultPadText" : "{{pad_default_text|replace("\n","\\n")}}",
  183. /*
  184. * Default Pad behavior.
  185. *
  186. * Change them if you want to override.
  187. */
  188. "padOptions": {
  189. "noColors": false,
  190. "showControls": true,
  191. "showChat": true,
  192. "showLineNumbers": true,
  193. "useMonospaceFont": true,
  194. "userName": false,
  195. "userColor": false,
  196. "rtl": false,
  197. "alwaysShowChat": false,
  198. "chatAndUsers": false,
  199. "lang": "{{pad_lang}}"
  200. },
  201. /*
  202. * Pad Shortcut Keys
  203. */
  204. "padShortcutEnabled" : {
  205. "altF9": true, /* focus on the File Menu and/or editbar */
  206. "altC": true, /* focus on the Chat window */
  207. "cmdShift2": true, /* shows a gritter popup showing a line author */
  208. "delete": true,
  209. "return": true,
  210. "esc": true, /* in mozilla versions 14-19 avoid reconnecting pad */
  211. "cmdS": true, /* save a revision */
  212. "tab": true, /* indent */
  213. "cmdZ": true, /* undo/redo */
  214. "cmdY": true, /* redo */
  215. "cmdI": true, /* italic */
  216. "cmdB": true, /* bold */
  217. "cmdU": true, /* underline */
  218. "cmd5": true, /* strike through */
  219. "cmdShiftL": true, /* unordered list */
  220. "cmdShiftN": true, /* ordered list */
  221. "cmdShift1": true, /* ordered list */
  222. "cmdShiftC": true, /* clear authorship */
  223. "cmdH": true, /* backspace */
  224. "ctrlHome": true, /* scroll to top of pad */
  225. "pageUp": true,
  226. "pageDown": true
  227. },
  228. /*
  229. * Should we suppress errors from being visible in the default Pad Text?
  230. */
  231. "suppressErrorsInPadText": true,
  232. /*
  233. * If this option is enabled, a user must have a session to access pads.
  234. * This effectively allows only group pads to be accessed.
  235. */
  236. "requireSession": false,
  237. /*
  238. * Users may edit pads but not create new ones.
  239. *
  240. * Pad creation is only via the API.
  241. * This applies both to group pads and regular pads.
  242. */
  243. "editOnly": false,
  244. /*
  245. * If set to true, those users who have a valid session will automatically be
  246. * granted access to password protected pads.
  247. */
  248. "sessionNoPassword": false,
  249. /*
  250. * If true, all css & js will be minified before sending to the client.
  251. *
  252. * This will improve the loading performance massively, but makes it difficult
  253. * to debug the javascript/css
  254. */
  255. "minify": true,
  256. /*
  257. * How long may clients use served javascript code (in seconds)?
  258. *
  259. * Not setting this may cause problems during deployment.
  260. * Set to 0 to disable caching.
  261. */
  262. "maxAge": 21600, // 60 * 60 * 6 = 6 hours
  263. /*
  264. * Absolute path to the Abiword executable.
  265. *
  266. * Abiword is needed to get advanced import/export features of pads. Setting
  267. * it to null disables Abiword and will only allow plain text and HTML
  268. * import/exports.
  269. */
  270. "abiword": null,
  271. /*
  272. * This is the absolute path to the soffice executable.
  273. *
  274. * LibreOffice can be used in lieu of Abiword to export pads.
  275. * Setting it to null disables LibreOffice exporting.
  276. */
  277. "soffice": "/usr/bin/soffice",
  278. /*
  279. * Path to the Tidy executable.
  280. *
  281. * Tidy is used to improve the quality of exported pads.
  282. * Setting it to null disables Tidy.
  283. */
  284. "tidyHtml": "/usr/bin/tidy",
  285. /*
  286. * Allow import of file types other than the supported ones:
  287. * txt, doc, docx, rtf, odt, html & htm
  288. */
  289. "allowUnknownFileEnds": true,
  290. /*
  291. * This setting is used if you require authentication of all users.
  292. *
  293. * Note: "/admin" always requires authentication.
  294. */
  295. "requireAuthentication": false,
  296. /*
  297. * Require authorization by a module, or a user with is_admin set, see below.
  298. */
  299. "requireAuthorization": false,
  300. /*
  301. * When you use NGINX or another proxy/load-balancer set this to true.
  302. *
  303. * This is especially necessary when the reverse proxy performs SSL
  304. * termination, otherwise the cookies will not have the "secure" flag.
  305. *
  306. * The other effect will be that the logs will contain the real client's IP,
  307. * instead of the reverse proxy's IP.
  308. */
  309. "trustProxy": true,
  310. /*
  311. * Privacy: disable IP logging
  312. */
  313. "disableIPlogging": true,
  314. /*
  315. * Time (in seconds) to automatically reconnect pad when a "Force reconnect"
  316. * message is shown to user.
  317. *
  318. * Set to 0 to disable automatic reconnection.
  319. */
  320. "automaticReconnectionTimeout": 2,
  321. /*
  322. * By default, when caret is moved out of viewport, it scrolls the minimum
  323. * height needed to make this line visible.
  324. */
  325. "scrollWhenFocusLineIsOutOfViewport": {
  326. /*
  327. * Percentage of viewport height to be additionally scrolled.
  328. *
  329. * E.g.: use "percentage.editionAboveViewport": 0.5, to place caret line in
  330. * the middle of viewport, when user edits a line above of the
  331. * viewport
  332. *
  333. * Set to 0 to disable extra scrolling
  334. */
  335. "percentage": {
  336. "editionAboveViewport": 0.2,
  337. "editionBelowViewport": 0.2
  338. },
  339. /*
  340. * Time (in milliseconds) used to animate the scroll transition.
  341. * Set to 0 to disable animation
  342. */
  343. "duration": 200,
  344. /*
  345. * Flag to control if it should scroll when user places the caret in the
  346. * last line of the viewport
  347. */
  348. "scrollWhenCaretIsInTheLastLineOfViewport": true,
  349. /*
  350. * Percentage of viewport height to be additionally scrolled when user
  351. * presses arrow up in the line of the top of the viewport.
  352. *
  353. * Set to 0 to let the scroll to be handled as default by Etherpad
  354. */
  355. "percentageToScrollWhenUserPressesArrowUp": 0
  356. },
  357. /*
  358. * Users for basic authentication.
  359. *
  360. * is_admin = true gives access to /admin.
  361. * If you do not uncomment this, /admin will not be available!
  362. *
  363. * WARNING: passwords should not be stored in plaintext in this file.
  364. * If you want to mitigate this, please install ep_hash_auth and
  365. * follow the section "secure your installation" in README.md
  366. */
  367. "users": {
  368. "admin": {
  369. // 1) "password" can be replaced with "hash" if you install ep_hash_auth
  370. // 2) please note that if password is null, the user will not be created
  371. "password": "{{pad_admin_password}}",
  372. "is_admin": true
  373. },
  374. },
  375. /*
  376. * Restrict socket.io transport methods
  377. */
  378. "socketTransportProtocols" : ["xhr-polling", "jsonp-polling", "htmlfile"],
  379. /*
  380. * Allow Load Testing tools to hit the Etherpad Instance.
  381. *
  382. * WARNING: this will disable security on the instance.
  383. */
  384. "loadTest": false,
  385. /*
  386. * Disable indentation on new line when previous line ends with some special
  387. * chars (':', '[', '(', '{')
  388. */
  389. /*
  390. "indentationOnNewLine": false,
  391. */
  392. /*
  393. * From Etherpad 1.8.3 onwards, import and export of pads is always rate
  394. * limited.
  395. *
  396. * The default is to allow at most 10 requests per IP in a 90 seconds window.
  397. * After that the import/export request is rejected.
  398. *
  399. * See https://github.com/nfriedly/express-rate-limit for more options
  400. */
  401. "importExportRateLimiting": {
  402. // duration of the rate limit window (milliseconds)
  403. "windowMs": 90000,
  404. // maximum number of requests per IP to allow during the rate limit window
  405. "max": 10
  406. },
  407. /*
  408. * From Etherpad 1.8.3 onwards, the maximum allowed size for a single imported
  409. * file is always bounded.
  410. *
  411. * File size is specified in bytes. Default is 50 MB.
  412. */
  413. "importMaxFileSize": 52428800, // 50 * 1024 * 1024
  414. /*
  415. * Toolbar buttons configuration.
  416. *
  417. * Uncomment to customize.
  418. */
  419. /*
  420. "toolbar": {
  421. "left": [
  422. ["bold", "italic", "underline", "strikethrough"],
  423. ["orderedlist", "unorderedlist", "indent", "outdent"],
  424. ["undo", "redo"],
  425. ["clearauthorship"]
  426. ],
  427. "right": [
  428. ["importexport", "timeslider", "savedrevision"],
  429. ["settings", "embed"],
  430. ["showusers"]
  431. ],
  432. "timeslider": [
  433. ["timeslider_export", "timeslider_returnToPad"]
  434. ]
  435. },
  436. */
  437. /*
  438. * Expose Etherpad version in the web interface and in the Server http header.
  439. *
  440. * Do not enable on production machines.
  441. */
  442. "exposeVersion": false,
  443. /*
  444. * The log level we are using.
  445. *
  446. * Valid values: DEBUG, INFO, WARN, ERROR
  447. */
  448. "loglevel": "{{log_level}}",
  449. /*
  450. * Logging configuration. See log4js documentation for further information:
  451. * https://github.com/nomiddlename/log4js-node
  452. *
  453. * You can add as many appenders as you want here.
  454. */
  455. "logconfig" :
  456. { "appenders": [
  457. { "type": "console"
  458. //, "category": "access"// only logs pad access
  459. }
  460. /*
  461. , { "type": "file"
  462. , "filename": "your-log-file-here.log"
  463. , "maxLogSize": 1024
  464. , "backups": 3 // how many log files there're gonna be at max
  465. //, "category": "test" // only log a specific category
  466. }
  467. */
  468. /*
  469. , { "type": "logLevelFilter"
  470. , "level": "warn" // filters out all log messages that have a lower level than "error"
  471. , "appender":
  472. { Use whatever appender you want here }
  473. }
  474. */
  475. /*
  476. , { "type": "logLevelFilter"
  477. , "level": "error" // filters out all log messages that have a lower level than "error"
  478. , "appender":
  479. { "type": "smtp"
  480. , "subject": "An error occurred in your EPL instance!"
  481. , "recipients": "bar@blurdybloop.com, baz@blurdybloop.com"
  482. , "sendInterval": 300 // 60 * 5 = 5 minutes -- will buffer log messages; set to 0 to send a mail for every message
  483. , "transport": "SMTP", "SMTP": { // see https://github.com/andris9/Nodemailer#possible-transport-methods
  484. "host": "smtp.example.com", "port": 465,
  485. "secureConnection": true,
  486. "auth": {
  487. "user": "foo@example.com",
  488. "pass": "bar_foo"
  489. }
  490. }
  491. }
  492. }
  493. */
  494. ]
  495. },
  496. "ep_delete_after_delay_lite": {
  497. "delay": 86400, // one day, in seconds
  498. "loop": true,
  499. "loopDelay": 3600, // one hour, in seconds
  500. "deleteAtStart": true,
  501. "text": "{{pad_default_text|replace("\n","\\n")}}"
  502. },
  503. "ep_toc": {
  504. "disable_by_default": true
  505. }
  506. }