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 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 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
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
:
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
:
---
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:
“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.”