conf.sample.php 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. ;<?php http_response_code(403); /*
  2. ; config file for PrivateBin
  3. ;
  4. ; An explanation of each setting can be find online at https://github.com/PrivateBin/PrivateBin/wiki/Configuration.
  5. [main]
  6. ; (optional) set a project name to be displayed on the website
  7. ; name = "PrivateBin"
  8. ; The full URL, with the domain name and directories that point to the
  9. ; PrivateBin files, including an ending slash (/). This URL is essential to
  10. ; allow Opengraph images to be displayed on social networks.
  11. ; basepath = "https://privatebin.example.com/"
  12. ; enable or disable the discussion feature, defaults to true
  13. discussion = true
  14. ; preselect the discussion feature, defaults to false
  15. opendiscussion = false
  16. ; enable or disable the display of dates & times in the comments, defaults to true
  17. ; Note that internally the creation time will still get tracked in order to sort
  18. ; the comments by creation time, but you can choose not to display them.
  19. ; discussiondatedisplay = false
  20. ; enable or disable the password feature, defaults to true
  21. password = true
  22. ; enable or disable the file upload feature, defaults to false
  23. fileupload = false
  24. ; preselect the burn-after-reading feature, defaults to false
  25. burnafterreadingselected = false
  26. ; which display mode to preselect by default, defaults to "plaintext"
  27. ; make sure the value exists in [formatter_options]
  28. defaultformatter = "plaintext"
  29. ; (optional) set a syntax highlighting theme, as found in css/prettify/
  30. ; syntaxhighlightingtheme = "sons-of-obsidian"
  31. ; size limit per paste or comment in bytes, defaults to 10 Mebibytes
  32. sizelimit = 10485760
  33. ; by default PrivateBin use "bootstrap" template (tpl/bootstrap.php).
  34. ; Optionally you can enable the template selection menu, which uses
  35. ; a session cookie to store the choice until the browser is closed.
  36. templateselection = false
  37. ; List of available for selection templates when "templateselection" option is enabled
  38. availabletemplates[] = "bootstrap"
  39. availabletemplates[] = "bootstrap-page"
  40. availabletemplates[] = "bootstrap-dark"
  41. availabletemplates[] = "bootstrap-dark-page"
  42. availabletemplates[] = "bootstrap-compact"
  43. availabletemplates[] = "bootstrap-compact-page"
  44. availabletemplates[] = "bootstrap5"
  45. availabletemplates[] = "page"
  46. ; set the template your installs defaults to, defaults to "bootstrap" (tpl/bootstrap.php), also
  47. ; available are "page" (tpl/page.php), the classic ZeroBin style and several
  48. ; bootstrap variants: "bootstrap-dark", "bootstrap-compact", "bootstrap-page",
  49. ; which can be combined with "-dark" and "-compact" for "bootstrap-dark-page",
  50. ; "bootstrap-compact-page" and finally "bootstrap5" (tpl/bootstrap5.php) - previews at:
  51. ; https://privatebin.info/screenshots.html
  52. ; template = "bootstrap"
  53. ; (optional) info text to display
  54. ; use single, instead of double quotes for HTML attributes
  55. ;info = "More information on the <a href='https://privatebin.info/'>project page</a>."
  56. ; (optional) notice to display
  57. ; notice = "Note: This is a test service: Data may be deleted anytime. Kittens will die if you abuse this service."
  58. ; by default PrivateBin will guess the visitors language based on the browsers
  59. ; settings. Optionally you can enable the language selection menu, which uses
  60. ; a session cookie to store the choice until the browser is closed.
  61. languageselection = false
  62. ; set the language your installs defaults to, defaults to English
  63. ; if this is set and language selection is disabled, this will be the only language
  64. ; languagedefault = "en"
  65. ; (optional) URL shortener address to offer after a new paste is created.
  66. ; It is suggested to only use this with self-hosted shorteners as this will leak
  67. ; the pastes encryption key.
  68. ; urlshortener = "https://shortener.example.com/api?link="
  69. ; (optional) Let users create a QR code for sharing the paste URL with one click.
  70. ; It works both when a new paste is created and when you view a paste.
  71. ; qrcode = true
  72. ; (optional) Let users send an email sharing the paste URL with one click.
  73. ; It works both when a new paste is created and when you view a paste.
  74. ; email = true
  75. ; (optional) IP based icons are a weak mechanism to detect if a comment was from
  76. ; a different user when the same username was used in a comment. It might get
  77. ; used to get the IP of a comment poster if the server salt is leaked and a
  78. ; SHA512 HMAC rainbow table is generated for all (relevant) IPs.
  79. ; Can be set to one these values:
  80. ; "none" / "identicon" (default) / "jdenticon" / "vizhash".
  81. ; icon = "none"
  82. ; Content Security Policy headers allow a website to restrict what sources are
  83. ; allowed to be accessed in its context. You need to change this if you added
  84. ; custom scripts from third-party domains to your templates, e.g. tracking
  85. ; scripts or run your site behind certain DDoS-protection services.
  86. ; Check the documentation at https://content-security-policy.com/
  87. ; Notes:
  88. ; - If you use any bootstrap theme, you can remove the allow-popups from the
  89. ; sandbox restrictions.
  90. ; - If you use the bootstrap5 theme, you must change default-src to 'self' to
  91. ; enable display of the svg icons
  92. ; - By default this disallows to load images from third-party servers, e.g. when
  93. ; they are embedded in pastes. If you wish to allow that, you can adjust the
  94. ; policy here. See https://github.com/PrivateBin/PrivateBin/wiki/FAQ#why-does-not-it-load-embedded-images
  95. ; for details.
  96. ; - The 'wasm-unsafe-eval' is used to enable webassembly support (used for zlib
  97. ; compression). You can remove it if compression doesn't need to be supported.
  98. ; - The 'unsafe-inline' style-src is used by Chrome when displaying PDF previews
  99. ; and can be omitted if attachment upload is disabled (which is the default).
  100. ; See https://issues.chromium.org/issues/343754409
  101. ; - To allow displaying PDF previews in Firefox or Chrome, sandboxing must also
  102. ; get turned off. The following CSP allows PDF previews:
  103. ; cspheader = "default-src 'none'; base-uri 'self'; form-action 'none'; manifest-src 'self'; connect-src * blob:; script-src 'self' 'wasm-unsafe-eval'; style-src 'self' 'unsafe-inline'; font-src 'self'; frame-ancestors 'none'; frame-src blob:; img-src 'self' data: blob:; media-src blob:; object-src blob:"
  104. ;
  105. ; The recommended and default used CSP is:
  106. ; cspheader = "default-src 'none'; base-uri 'self'; form-action 'none'; manifest-src 'self'; connect-src * blob:; script-src 'self' 'wasm-unsafe-eval'; style-src 'self'; font-src 'self'; frame-ancestors 'none'; frame-src blob:; img-src 'self' data: blob:; media-src blob:; object-src blob:; sandbox allow-same-origin allow-scripts allow-forms allow-popups allow-modals allow-downloads"
  107. ; stay compatible with PrivateBin Alpha 0.19, less secure
  108. ; if enabled will use base64.js version 1.7 instead of 2.1.9 and sha1 instead of
  109. ; sha256 in HMAC for the deletion token
  110. ; zerobincompatibility = false
  111. ; Enable or disable the warning message when the site is served over an insecure
  112. ; connection (insecure HTTP instead of HTTPS), defaults to true.
  113. ; Secure transport methods like Tor and I2P domains are automatically whitelisted.
  114. ; It is **strongly discouraged** to disable this.
  115. ; See https://github.com/PrivateBin/PrivateBin/wiki/FAQ#why-does-it-show-me-an-error-about-an-insecure-connection for more information.
  116. ; httpwarning = true
  117. ; Pick compression algorithm or disable it. Only applies to pastes/comments
  118. ; created after changing the setting.
  119. ; Can be set to one these values: "none" / "zlib" (default).
  120. ; compression = "zlib"
  121. [expire]
  122. ; expire value that is selected per default
  123. ; make sure the value exists in [expire_options]
  124. default = "1week"
  125. [expire_options]
  126. ; Set each one of these to the number of seconds in the expiration period,
  127. ; or 0 if it should never expire
  128. 5min = 300
  129. 10min = 600
  130. 1hour = 3600
  131. 1day = 86400
  132. 1week = 604800
  133. ; Well this is not *exactly* one month, it's 30 days:
  134. 1month = 2592000
  135. 1year = 31536000
  136. never = 0
  137. [formatter_options]
  138. ; Set available formatters, their order and their labels
  139. plaintext = "Plain Text"
  140. syntaxhighlighting = "Source Code"
  141. markdown = "Markdown"
  142. [traffic]
  143. ; time limit between calls from the same IP address in seconds
  144. ; Set this to 0 to disable rate limiting.
  145. limit = 10
  146. ; (optional) Set IPs addresses (v4 or v6) or subnets (CIDR) which are exempted
  147. ; from the rate-limit. Invalid IPs will be ignored. If multiple values are to
  148. ; be exempted, the list needs to be comma separated. Leave unset to disable
  149. ; exemptions.
  150. ; exempted = "1.2.3.4,10.10.10/24"
  151. ; (optional) If you want only some source IP addresses (v4 or v6) or subnets
  152. ; (CIDR) to be allowed to create pastes, set these here. Invalid IPs will be
  153. ; ignored. If multiple values are to be exempted, the list needs to be comma
  154. ; separated. Leave unset to allow anyone to create pastes.
  155. ; creators = "1.2.3.4,10.10.10/24"
  156. ; (optional) if your website runs behind a reverse proxy or load balancer,
  157. ; set the HTTP header containing the visitors IP address, i.e. X_FORWARDED_FOR
  158. ; header = "X_FORWARDED_FOR"
  159. [purge]
  160. ; minimum time limit between two purgings of expired pastes, it is only
  161. ; triggered when pastes are created
  162. ; Set this to 0 to run a purge every time a paste is created.
  163. limit = 300
  164. ; maximum amount of expired pastes to delete in one purge
  165. ; Set this to 0 to disable purging. Set it higher, if you are running a large
  166. ; site
  167. batchsize = 10
  168. [model]
  169. ; name of data model class to load and directory for storage
  170. ; the default model "Filesystem" stores everything in the filesystem
  171. class = Filesystem
  172. [model_options]
  173. dir = PATH "data"
  174. ;[model]
  175. ; example of a Google Cloud Storage configuration
  176. ;class = GoogleCloudStorage
  177. ;[model_options]
  178. ;bucket = "my-private-bin"
  179. ;prefix = "pastes"
  180. ;uniformacl = false
  181. ;[model]
  182. ; example of DB configuration for MySQL
  183. ;class = Database
  184. ;[model_options]
  185. ;dsn = "mysql:host=localhost;dbname=privatebin;charset=UTF8"
  186. ;tbl = "privatebin_" ; table prefix
  187. ;usr = "privatebin"
  188. ;pwd = "Z3r0P4ss"
  189. ;opt[12] = true ; PDO::ATTR_PERSISTENT
  190. ;[model]
  191. ; example of DB configuration for SQLite
  192. ;class = Database
  193. ;[model_options]
  194. ;dsn = "sqlite:" PATH "data/db.sq3"
  195. ;usr = null
  196. ;pwd = null
  197. ;opt[12] = true ; PDO::ATTR_PERSISTENT
  198. ;[model]
  199. ; example of DB configuration for PostgreSQL
  200. ;class = Database
  201. ;[model_options]
  202. ;dsn = "pgsql:host=localhost;dbname=privatebin"
  203. ;tbl = "privatebin_" ; table prefix
  204. ;usr = "privatebin"
  205. ;pwd = "Z3r0P4ss"
  206. ;opt[12] = true ; PDO::ATTR_PERSISTENT
  207. ;[model]
  208. ; example of S3 configuration for Rados gateway / CEPH
  209. ;class = S3Storage
  210. ;[model_options]
  211. ;region = ""
  212. ;version = "2006-03-01"
  213. ;endpoint = "https://s3.my-ceph.invalid"
  214. ;use_path_style_endpoint = true
  215. ;bucket = "my-bucket"
  216. ;accesskey = "my-rados-user"
  217. ;secretkey = "my-rados-pass"
  218. ;[model]
  219. ; example of S3 configuration for AWS
  220. ;class = S3Storage
  221. ;[model_options]
  222. ;region = "eu-central-1"
  223. ;version = "latest"
  224. ;bucket = "my-bucket"
  225. ;accesskey = "access key id"
  226. ;secretkey = "secret access key"
  227. ;[model]
  228. ; example of S3 configuration for AWS using its SDK default credential provider chain
  229. ; if relying on environment variables, the AWS SDK will look for the following:
  230. ; - AWS_ACCESS_KEY_ID
  231. ; - AWS_SECRET_ACCESS_KEY
  232. ; - AWS_SESSION_TOKEN (if needed)
  233. ; for more details, see https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/guide_credentials.html#default-credential-chain
  234. ;class = S3Storage
  235. ;[model_options]
  236. ;region = "eu-central-1"
  237. ;version = "latest"
  238. ;bucket = "my-bucket"
  239. ;[yourls]
  240. ; When using YOURLS as a "urlshortener" config item:
  241. ; - By default, "urlshortener" will point to the YOURLS API URL, with or without
  242. ; credentials, and will be visible in public on the PrivateBin web page.
  243. ; Only use this if you allow short URL creation without credentials.
  244. ; - Alternatively, using the parameters in this section ("signature" and
  245. ; "apiurl"), "urlshortener" needs to point to the base URL of your PrivateBin
  246. ; instance with "?shortenviayourls&link=" appended. For example:
  247. ; urlshortener = "${basepath}?shortenviayourls&link="
  248. ; This URL will in turn call YOURLS on the server side, using the URL from
  249. ; "apiurl" and the "access signature" from the "signature" parameters below.
  250. ; (optional) the "signature" (access key) issued by YOURLS for the using account
  251. ; signature = ""
  252. ; (optional) the URL of the YOURLS API, called to shorten a PrivateBin URL
  253. ; apiurl = "https://yourls.example.com/yourls-api.php"
  254. ;[sri]
  255. ; Subresource integrity (SRI) hashes used in template files. Uncomment and set
  256. ; these for all js files used. See:
  257. ; https://github.com/PrivateBin/PrivateBin/wiki/FAQ#user-content-how-to-make-privatebin-work-when-i-have-changed-some-javascript-files
  258. ;js/privatebin.js = "sha512-[…]"