1 # default Caddyfile config for Pleroma
3 # Simple installation instructions:
4 # 1. Replace 'example.tld' with your instance's domain wherever it appears.
5 # 2. Copy this section into your Caddyfile and restart Caddy.
8 log /var/log/caddy/pleroma_access.log
9 errors /var/log/caddy/pleroma_error.log
13 proxy / localhost:4000 {
19 # Remove the rest of the lines in here, if you want to support older devices
21 ciphers ECDHE-ECDSA-WITH-CHACHA20-POLY1305 ECDHE-RSA-WITH-CHACHA20-POLY1305 ECDHE-ECDSA-AES256-GCM-SHA384 ECDHE-RSA-AES256-GCM-SHA384 ECDHE-ECDSA-AES128-GCM-SHA256 ECDHE-RSA-AES128-GCM-SHA256
25 X-XSS-Protection "1; mode=block"
26 X-Frame-Options "DENY"
27 X-Content-Type-Options "nosniff"
28 Referrer-Policy "same-origin"
29 Strict-Transport-Security "max-age=31536000; includeSubDomains;"
30 Expect-CT "enforce, max-age=2592000"
31 Content-Security-Policy "default-src 'none'; base-uri 'self'; form-action 'self'; frame-ancestors 'none'; img-src 'self' data: https:; media-src 'self' https:; style-src 'self' 'unsafe-inline'; font-src 'self'; script-src 'self'; connect-src 'self' wss://{host}; upgrade-insecure-requests;"
34 # If you do not want remote frontends to be able to access your Pleroma backend server, remove these lines.
35 # If you want to allow all origins access, remove the origin lines.
36 # To use this directive, you need the http.cors plugin for Caddy.
38 origin https://halcyon.example.tld
39 origin https://pinafore.example.tld
40 methods POST,PUT,DELETE,GET,PATCH,OPTIONS
41 allowed_headers Authorization,Content-Type,Idempotency-Key
42 exposed_headers Link,X-RateLimit-Reset,X-RateLimit-Limit,X-RateLimit-Remaining,X-Request-Id
44 # Stop removing lines here.
46 # If you do not want to use the mediaproxy function, remove these lines.
47 # To use this directive, you need the http.cache plugin for Caddy.
52 # Stop removing lines here.