https://www.activepieces.com logo
Having some trouble getting my self
# 🐶|general
h
Having some trouble getting my self hosted AP to recieve messages from Slack. Not sure whether the Front End has something to do with it. I've tried using a cloudflare tunnel without success and ngrok seems to be out of my league to figure out and setup. Anyone get this working with a simple dynamic DNS and port forward rules? I'm not sure what ports I should be directing to the AP docker container besides the configured webui port. The logs show it's listening to port 3000 which I gather is from Slack. Any help would be appreciated.
a
h
Thanks for that link. I just went through setting it up. I am having issues getting past setting up the webhook url, specifically the "challenge" response. Your URL didn't respond with the value of the challenge parameter. The logs of the apps show its receiving the request, but it doesnt have a response for "challenge". {"type":"TypeError","message":"Cannot read properties of undefined (reading 'challenge')","stack":"TypeError: Cannot read properties of undefined (reading 'challenge')\n at Object.parseAndReply (/usr/src/app/packages/pieces/community/slack/src/index.ts:133:30)\n at Object. (/usr/src/app/packages/server/api/src/app/trigger/app-event-routing/app-event-routing.module.ts:91:68)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)"},"msg":"Cannot read properties of undefined (reading 'challenge')"}
a
hmmm
there is a front end url env variable
did you set it up ?
h
Yes. I'm using a cloudflare tunnel. its HTTP pointing to port 8594 which is the webui. the cloudflare URL is specific for the AP port
a
just a second
this is in dev mode
or are you in a self hosted instance ?
h
self hosted
"http://url/api/v1/app-events/slack" This is the Slack url .. The Front end URL should be what exactly? just the url? or with the "api/v1/app-events/slack" added to it?
AP_APP_WEBHOOK_SECRETS={"@activepieces/piece-slack": {"webhookSecret": "xxxxxxxxxxxxxx"}} I added this variable to the docker instance XXX=my secret key
OK, so I just used my current IP and created a port forward rule and it works. So it must be cloudflare or the configuration. But Im still not able to get the test triggers to see the test messages being posted on slack
d
@hypnosis4u2nv This usually isn’t a front-end issue. Slack needs to reach a public HTTPS endpoint, so a simple dynamic DNS + port forwarding won’t work unless you also have a valid SSL certificate exposed to the internet. If your app logs show it’s listening on port 3000, that’s the internal container port. You need to expose that port externally over HTTPS, not just forward it on your router. Slack will refuse plain HTTP. If ngrok feels heavy, the simplest path is: run the container behind a reverse proxy (Caddy or Nginx) point your domain (dynamic DNS is fine) to your public IP terminate SSL at the proxy and forward HTTPS → container:3000 Without HTTPS + a publicly reachable URL, Slack events won’t hit your app, regardless of port forwarding.
h
So this is where I was confused. The logs show it listening on port 3000 although it's on via HTTP, not HTTPS. Secondly, I didn't find any documents about the slack specific listening port. I have another docker listening in on the same port, so if I just add a different host port for port 3000 in the docker container that should work I'm assuming. My next question would be whether a cloudflare route via my tunnel would work if I set it to HTTPS to that port I'm directing to port 3000 and turn off TLS verify? Or a simple router port forward? Does it need SSL to run?
d
@hypnosis4u2nv Good questions, this is the core confusion point 👍 Slack does not care what internal port your app listens on (3000 is totally fine). What it does care about is how it reaches it. A simple router port-forward will not work unless the endpoint is publicly reachable over HTTPS with a valid cert. Slack will refuse HTTP, self-signed certs, or anything non-TLS. Cloudflare Tunnel will work, and it’s actually the easiest option here. You don’t need to expose ports on your router at all. Just point the tunnel to http://localhost:3000 and let Cloudflare terminate HTTPS for you. You do not need to disable TLS verification — Slack talks to Cloudflare over HTTPS, Cloudflare talks to your container over HTTP. Changing the host port in Docker is fine for avoiding conflicts, but it doesn’t solve the Slack issue by itself. The missing piece is public HTTPS, not the port number. So short answer: Internal HTTP on port 3000 \ Cloudflare Tunnel with HTTPS Plain port forwarding / HTTP No SSL at the edge
h
I tried all the above without success. I installed nginx and I've spent alot of hours trying to get it working, watched alot of videos and researched many of my problems and this just isn't working for me. Unraid Nginx installed. Ports 80,81,443 assigned to different ports. Pfsense setup port forwarding on WAN interface, Destination WAN for Http and Https and redirected to NGINX ip and respective ports for 80 and 443. Cloudflare Token created for all zones and dns edit. Created a CNAME for activepieces webGUI. Created a Let's Encrypt certificate for my domain with wild card *.mydomain.com and entered the cloudflare token in the SSL. Created a Proxy Host pointing to that created CNAME domain for activepieces, directing to the internal ip and port via Http. Enabled SSL, HTTP/2, and HSTS and for subs using that created certificate. Web browser goes to http via that domain and returns a NET:ERR_CERT_AUTHORITY_INVALID So far I can't get a simple docker container web UI to pull up via https. The instructions for getting this to work are simple enough, but why aren't they working? Ugh.
I I was able to get NGINX working without creating DNS entries on Cloudflare and port forwarding, I'm just using the tunnel I created and using the published application routes. Nginx now creates HTTPS for those routes and Im able to access the webpages for them. I am still unble to get the AP self hosted instance to receive stack messages. I have the front end pointing to the h//tps://activepieces.mydomain.com. The Slack API set to that front end UR is successfully passing the event requests with the included (/api/v1/app-events/slack - this isnt added to my AP Frontend url). So I'm confused as to what I need to change to get this working.