Running Discourse with Caddy Server

Guys,

Just made this how to at Discourse forums, mostly based in the example file found on caddy examples.

After having a lot of users with problematic installs due to bad configured nginx, I think caddy will make people lives easier.

Any feedback on the guide?

4 Likes

Thanks! Your guide is more comprehensive than the one I put in the examples repo – that one might be a little simpler since Caddy doesn’t have to go in a container.

Anyway, Caddy and Discourse play well together. I hope it will make things easier for people!

1 Like

Pretty much exactly how I did it myself. Nice!

@matt - Caddy doesn’t have to go in a Docker container with this setup either, per se, you just proxy to unix:/var/discourse/shared/standalone/nginx.http.sock instead.

2 Likes

I used my nginx as proxy so my app.yml contains

templates:
  - "templates/postgres.template.yml"
  - "templates/redis.template.yml"
  - "templates/web.template.yml"
  - "templates/web.ratelimited.template.yml"
## Uncomment these two lines if you wish to add Lets Encrypt (https)
#  - "templates/web.ssl.template.yml"
#  - "templates/web.letsencrypt.ssl.template.yml"

expose:
        - "8989:80" 

And my caddyfile contains:

community.domain {
         proxy / 127.0.0.1:8989 {
                 transparent
         }
 }

maybe this usercase can be mentioned too :slight_smile:

2 Likes