# Installing Discourse With N8N using Caddy in same cloud server (Hetzner Cloud)

**URL:** https://meta.discourse.org/t/installing-discourse-with-n8n-using-caddy-in-same-cloud-server-hetzner-cloud/267709
**Category:** Self-hosting
**Tags:** unsupported-install
**Created:** [June 8, 2023, 6:49pm UTC](https://meta.discourse.org/t/installing-discourse-with-n8n-using-caddy-in-same-cloud-server-hetzner-cloud/267709 "2023-06-08T18:49:02Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![ARHAEEM](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arhaeem/32/310459_2.png) [@ARHAEEM](https://meta.discourse.org/u/ARHAEEM)
#### Post date: [June 8, 2023, 6:49pm UTC](https://meta.discourse.org/t/installing-discourse-with-n8n-using-caddy-in-same-cloud-server-hetzner-cloud/267709/1 "2023-06-08T18:49:03Z")

</div>

**Hello Discourse family,**

Maybe this is an unusual way, but I ran a server with Hetzner and discovered Discourse, which I planned to use after upgrading my server from cax11 to cax21 64x (4 cores, 8gb). I used the [official tutorial](https://docs.n8n.io/hosting/installation/server-setups/hetzner/) to install N8N with Caddy and everything went smoothly.

However, when trying to install Discourse, I encountered some problems. Despite searching for solutions since yesterday, I have been unable to get it running.

I came across this [thread](https://meta.discourse.org/t/use-caddy-instead-of-ngnix-as-your-reverse-proxy/54716) about Caddy where they suggested using `unix:/sock/nginx.http.sock` or the `port method`, but neither option worked for me.

**Here are my last settings:**

I copied the standalone file and edited it as follows in /git/discourse/containers/app.yml

```plaintext
templates:
  - templates/postgres.template.yml
  - templates/redis.template.yml
  - templates/web.template.yml
  - templates/web.ratelimited.template.yml
  - templates/web.socketed.template.yml
expose: null
params:
  db_default_text_search_config: pg_catalog.english
env:
  LC_ALL: en_US.UTF-8
  LANG: en_US.UTF-8
  LANGUAGE: en_US.UTF-8
  DISCOURSE_HOSTNAME: for ****** net
  DISCOURSE_DEVELOPER_EMAILS: ad ******* net
  DISCOURSE_SMTP_ADDRESS: smtp-relay.sendinblue.com
  DISCOURSE_SMTP_USER_NAME: ad ******* ee
  DISCOURSE_SMTP_PASSWORD: x ***************** z8GTVA
volumes:
  - volume:
      host: /git/discourse/shared/standalone
      guest: /shared
  - volume:
      host: /git/discourse/shared/standalone/log/git-log
      guest: /git/log
hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - git clone https://github.com/discourse/docker_manager.git
run:
  - exec: echo "Beginning of custom commands"
  - exec: echo "End of custom commands"

```

**And for the `/root/n8n-docker-caddy/caddy_config/Caddyfile`:**

```plaintext
n8n.example.net {
    reverse_proxy n8n-docker-caddy-n8n-1:5678 {
        flush_interval -1
    }
}

forum.example.net {
    reverse_proxy unix//git/discourse/shared/standalone/nginx.http.sock
    import cloudflare
}

```

**And for the `/root/n8n-docker-caddy/docker-compose.yml`:**

```plaintext
---
version: "3.7"
services:
  caddy:
    image: caddy:latest
    restart: unless-stopped
    ports:
      - 80:80
      - 443:443
    volumes:
      - ${DATA_FOLDER}/caddy_data:/data
      - ${DATA_FOLDER}/caddy_config:/config
      - ${DATA_FOLDER}/caddy_config/Caddyfile:/etc/caddy/Caddyfile
  n8n:
    image: n8nio/n8n
    restart: always
    ports:
      - 5678:5678
    environment:
      - N8N_BASIC_AUTH_ACTIVE=true
      - N8N_BASIC_AUTH_USER
      - N8N_BASIC_AUTH_PASSWORD
      - N8N_HOST=${SUBDOMAIN}.${DOMAIN_NAME}
      - N8N_PORT=5678
      - N8N_PROTOCOL=https
      - NODE_ENV=production
      - WEBHOOK_URL=https://${SUBDOMAIN}.${DOMAIN_NAME}/
      - GENERIC_TIMEZONE=${GENERIC_TIMEZONE}
    volumes:
      - ${DATA_FOLDER}/local_files:/files
      - ${DATA_FOLDER}/.n8n:/home/node/.n8n
  discourse:
    image: local_discourse/app
    restart: always
    ports:
      - 3001:80
    volumes:
      - /git/discourse/shared:/shared
volumes:
  caddy_data:
    external: true
  caddy_config: null

```

**Docker PS status:**

 ![cmd_wXVhHsvrQS](https://global.discourse-cdn.com/meta/original/4X/1/b/9/1b9e2bbd87a3467d1d5fa1761b32301a03c25ab3.png)

“If no one catches my issue, I’m thinking of removing the whole server and reinstalling it from the beginning. I just want to make sure that both n8n and Docker work properly. Please guide me to the right documentation if you know of any that can help with this.”

---

<div class="post-metadata">

### Author: ![ARHAEEM](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arhaeem/32/310459_2.png) [@ARHAEEM](https://meta.discourse.org/u/ARHAEEM)
#### Post date: [June 10, 2023, 10:49pm UTC](https://meta.discourse.org/t/installing-discourse-with-n8n-using-caddy-in-same-cloud-server-hetzner-cloud/267709/2 "2023-06-10T22:49:44Z")

</div>

I created the same help request on the Caddy Discourse site: [Installing Discourse With Caddy (Docker Compose) (hetzner Cloud) - Help - Caddy Community](https://caddy.community/t/installing-discourse-with-caddy-docker-compose-hetzner-cloud/20174). I will post an update here as soon as I find a solution.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [July 10, 2023, 10:50pm UTC](https://meta.discourse.org/t/installing-discourse-with-n8n-using-caddy-in-same-cloud-server-hetzner-cloud/267709/3 "2023-07-10T22:50:10Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
