conf.sample.php 10 KB

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