conf.sample.php 10 KB

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