logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://anongit.hacktivis.me/git/pleroma.git/

relayd.conf (3499B)


  1. #
  2. # Default relayd.conf file for Pleroma on OpenBSD
  3. # Simple installation instructions:
  4. # 1. Place in /etc
  5. # 2. Replace <ipaddr> with your public IPv4 address
  6. # 3. If using IPv6, uncomment IPv6 lines and replace <ip6addr> with your public IPv6 address
  7. # 4. Replace all occurrences of example.tld with your instance's domain
  8. # 5. Check file using 'doas relayd -n'
  9. # 6. Reload/start relayd
  10. # # doas rcctl enable relayd
  11. # # doas rcctl start relayd
  12. #
  13. ext_inet="<ipaddr>"
  14. #ext_inet6="<ip6addr>"
  15. table <pleroma_server> { 127.0.0.1 }
  16. # Uncomment when you want to serve other services than Pleroma.
  17. # In this example tables are used only as way to differentiate between Pleroma and other services.
  18. # Feel free to rename "httpd_server" everywhere to fit your setup.
  19. #table <httpd_server> { 127.0.0.1 }
  20. http protocol pleroma { # Protocol for upstream Pleroma server
  21. #tcp { nodelay, sack, socket buffer 65536, backlog 128 } # Uncomment and adjust as you see fit
  22. tls ciphers "ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4"
  23. tls ecdhe "X25519,P-256,P-384,secp521r1" # relayd default+secp521r1
  24. return error
  25. # When serving multiple services with different certificates, specify multiple "tls keypair" keywords
  26. # and add forwards to those services before the block keyword near the bottom of the protocol and relay configurations.
  27. # The string in quotes must match the fullchain certificate file created by acme-client without the extension.
  28. # For example:
  29. # tls keypair "pleroma.example.tld"
  30. # tls keypair "example.tld"
  31. tls keypair "example.tld"
  32. match request header append "X-Forwarded-For" value "$REMOTE_ADDR"
  33. match request header append "Connection" value "upgrade"
  34. # When hosting Pleroma on a subdomain, replace example.tld accordingly (not the base domain).
  35. # From the above example, "example.tld" should be replaced with "pleroma.example.tld" instead.
  36. pass request quick header "Host" value "example.tld" forward to <pleroma_server>
  37. # Uncomment when serving media uploads on a different (sub)domain.
  38. # Keep media proxy disabled, as it will NOT work under relayd/httpd. If you want to also setup media proxy, use nginx instead.
  39. #pass request quick header "Host" value "media.example.tld" forward to <pleroma_server>
  40. # When serving multiple services, add the forwards here.
  41. # Example:
  42. #pass request quick header "Host" value "example.tld" forward to <httpd_server>
  43. block
  44. }
  45. relay wwwtls {
  46. listen on $ext_inet port https tls # Comment to disable listening on IPv4
  47. protocol pleroma
  48. forward to <pleroma_server> port 4000 check tcp timeout 500 # Adjust timeout accordingly when relayd returns 502 while Pleroma is running without problems.
  49. # When serving multiple services, add the forwards here.
  50. # Example:
  51. #forward to <httpd_server> port 8080
  52. }
  53. # Uncomment relay block to enable IPv6
  54. #relay wwwtls6 {
  55. # listen on $ext_inet6 port https tls
  56. # protocol pleroma
  57. # forward to <pleroma_server> port 4000 check tcp timeout 500 # Adjust timeout accordingly when relayd returns 502 while Pleroma is running without problems.
  58. # # When serving multiple services, add the forwards here.
  59. # # Example:
  60. # #forward to <httpd_server> port 8080
  61. #}