Austin
Austin•2mo ago

HTTP

Hi all - I am so excited to get to play with self-hosted Convex. Long story short, I have a self-hosted Convex running on my laptop alongside my vite app - everything works great. When I deploy the same code to our web server (using Cloudflare tunnel - two different domains point to 3210, and 3211 respectrively (convex-be.subdomain.com (3210), convex-be-functions.subdomain.com (3211)) - it seems like I am not able to get the functions working correctly. This is most evident by convex-auth not working. The description of an issue reported a few days ago sounded similar as it related to https... is it accurate to say that proxying https to http on port 3211 doesn't work at the moment? Just to be clear - not complaining - I am an awe of the engineering behind this project - just wondering if I should chill out for a bit or keep trying different configs. 🙂
5 Replies
ballingt
ballingt•2mo ago
Can you not call HTTP functions at all, or is it just Convex Auth things that aren't working?
Austin
AustinOP•2mo ago
@ballingt - that seems right... here's my docker compose file with some hardcoded values:
services:
backend:
image: ghcr.io/get-convex/convex-backend:4499dd4fd7f2148687a7774599c613d052950f46
ports:
- "${PORT:-3210}:3210"
- "${SITE_PROXY_PORT:-3211}:3211"
volumes:
- data:/convex/data
environment:
- INSTANCE_NAME=${INSTANCE_NAME:-}
- INSTANCE_SECRET=${INSTANCE_SECRET:-}
- CONVEX_RELEASE_VERSION_DEV=${CONVEX_RELEASE_VERSION_DEV:-}
- ACTIONS_USER_TIMEOUT_SECS=${ACTIONS_USER_TIMEOUT_SECS:-}
- CONVEX_CLOUD_ORIGIN=http://100.65.244.49:3210
- CONVEX_SITE_ORIGIN=http://100.65.244.49:3211
- DATABASE_URL=${DATABASE_URL:-}
- DISABLE_BEACON=${DISABLE_BEACON:-}
- REDACT_LOGS_TO_CLIENT=${REDACT_LOGS_TO_CLIENT:-}
- RUST_LOG=${RUST_LOG:-}
- RUST_BACKTRACE=${RUST_BACKTRACE:-}
healthcheck:
test: curl -f http://localhost:3210/version
interval: 5s
start_period: 5s

dashboard:
image: ghcr.io/get-convex/convex-dashboard:4499dd4fd7f2148687a7774599c613d052950f46
ports:
- "${DASHBOARD_PORT:-6791}:6791"
environment:
- NEXT_PUBLIC_DEPLOYMENT_URL=http://100.65.244.49:3210
depends_on:
backend:
condition: service_healthy

volumes:
data:
services:
backend:
image: ghcr.io/get-convex/convex-backend:4499dd4fd7f2148687a7774599c613d052950f46
ports:
- "${PORT:-3210}:3210"
- "${SITE_PROXY_PORT:-3211}:3211"
volumes:
- data:/convex/data
environment:
- INSTANCE_NAME=${INSTANCE_NAME:-}
- INSTANCE_SECRET=${INSTANCE_SECRET:-}
- CONVEX_RELEASE_VERSION_DEV=${CONVEX_RELEASE_VERSION_DEV:-}
- ACTIONS_USER_TIMEOUT_SECS=${ACTIONS_USER_TIMEOUT_SECS:-}
- CONVEX_CLOUD_ORIGIN=http://100.65.244.49:3210
- CONVEX_SITE_ORIGIN=http://100.65.244.49:3211
- DATABASE_URL=${DATABASE_URL:-}
- DISABLE_BEACON=${DISABLE_BEACON:-}
- REDACT_LOGS_TO_CLIENT=${REDACT_LOGS_TO_CLIENT:-}
- RUST_LOG=${RUST_LOG:-}
- RUST_BACKTRACE=${RUST_BACKTRACE:-}
healthcheck:
test: curl -f http://localhost:3210/version
interval: 5s
start_period: 5s

dashboard:
image: ghcr.io/get-convex/convex-dashboard:4499dd4fd7f2148687a7774599c613d052950f46
ports:
- "${DASHBOARD_PORT:-6791}:6791"
environment:
- NEXT_PUBLIC_DEPLOYMENT_URL=http://100.65.244.49:3210
depends_on:
backend:
condition: service_healthy

volumes:
data:
If I were to replace those values with the cloudflare tunnel versions - the 3210 endpoint will continue to work but the http functions would not. Rather than getting a "No matching routes found" by navigating to the endpoint in my browser, I'd get an error. This ends up making auth not work, but would also break other http functions if I had any defined in my project,
Emma
Emma•2mo ago
This is a known issue we are working on fixing! I’ll keep you updated
Austin
AustinOP•2mo ago
Thank you @Emma !! Really love that you all are supporting self-hosted options.
Emma
Emma•2mo ago
would you be able to try with version 3565c8be03a443fbfee8574733a0e8ab52ee25ae? I think http actions should be available at 3210/http or 3211. Can you see if they work with either?

Did you find this page helpful?