conf.sample.php 10 KB

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