First
[anni] / docs / installation_1 / openbsd / relayd.conf
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 IPv6i, uncomment IPv6 lines and replace <ip6addr> with your public IPv6 address
7 # 4. Check file using 'doas relayd -n'
8 # 5. Reload/start relayd
9 #      # doas rcctl enable relayd
10 #      # doas rcctl start relayd
11 #
12
13 ext_inet="<ipaddr>"
14 #ext_inet6="<ip6addr>"
15
16 table <pleroma_server> { 127.0.0.1 }
17 table <httpd_server> { 127.0.0.1 }
18
19 http protocol plerup { # Protocol for upstream pleroma server
20     #tcp { nodelay, sack, socket buffer 65536, backlog 128 } # Uncomment and adjust as you see fit
21     tls ciphers "ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA0-POLY1305"
22     tls ecdhe secp384r1
23
24     # Forward some paths to the local server (as pleroma won't respond to them as you might want)
25     pass request quick path "/robots.txt" forward to <httpd_server>
26
27     # Append a bunch of headers
28     match request header append "X-Forwarded-For" value "$REMOTE_ADDR" # This two header and the next one are not strictl required by pleroma but adding them won't hurt
29     match request header append "X-Forwarded-By" value "$SERVER_ADDR:$SERVER_PORT"
30
31     match request header append "Connection" value "upgrade"
32
33 }
34
35 relay wwwtls {
36     listen on $ext_inet port https tls # Comment to disable listening on IPv4
37 #    listen on $ext_inet6 port https tls # Comment to disable listening on IPv6
38
39     protocol plerup
40
41     forward to <pleroma_server> port 4000 check http "/" code 200
42     forward to <httpd_server> port 80 check http "/robots.txt" code 200
43 }
44