Launch Nicely
👋 hello all
just moved https://www.launchnicely.com to tanstack start + convex + better-auth stack now
all hosted on hetzner vps via coolify 🔥
13 Replies
raw-harlequin•3mo ago
Out of curiosity, how was your experience integrating Better Auth with Convex?
Did you use any of these?
https://convex-better-auth.netlify.app
https://www.better-auth-kit.com/docs/adapters/convex
Convex + Better Auth
Typesafe, secure auth for Convex apps with Better Auth
grumpy-cyan•3mo ago
It was a breeze, works really well. I use the official one from the first link
stormy-gold•3mo ago
@Oren do you also self host convex?
grumpy-cyan•3mo ago
Yes everything
stormy-gold•3mo ago
Do you perhaps have any instructions to do so? Even the hosting of the tantack.
Can"t find a good instruction sadly
optimistic-gold•3mo ago
is this opensource?
grumpy-cyan•3mo ago
yes convex is fully opensource, but my project isn't
I can document the steps to host convex on coolify, it is pretty easy with docker and for the tanstack start it doesn't need any config just build + run with node via nixpacks (coolify provides that)
You can also take a look at guides here: https://github.com/get-convex/convex-backend/tree/main/self-hosted
or one click railway template I created https://railway.com/template/OKpPqB
xenial-black•3mo ago
@Oren how do you deployed to coolify? I`m getting 404 not found on my server
grumpy-cyan•3mo ago
I don't use the template I think its outdated here is the docker compose I use for backend:
services:
backend:
image: 'ghcr.io/get-convex/convex-backend:latest'
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=${CONVEX_CLOUD_ORIGIN:-}'
- 'CONVEX_SITE_ORIGIN=${CONVEX_SITE_ORIGIN:-}'
- 'DATABASE_URL=${DATABASE_URL:-}'
- 'DISABLE_BEACON=${DISABLE_BEACON:-}'
- 'REDACT_LOGS_TO_CLIENT=${REDACT_LOGS_TO_CLIENT:-}'
- 'DO_NOT_REQUIRE_SSL=${DO_NOT_REQUIRE_SSL:-}'
- 'POSTGRES_URL=${POSTGRES_URL:-}'
- 'MYSQL_URL=${MYSQL_URL:-}'
- 'RUST_LOG=${RUST_LOG:-info}'
- 'RUST_BACKTRACE=${RUST_BACKTRACE:-}'
- 'AWS_REGION=${AWS_REGION:-}'
- 'AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID:-}'
- 'AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY:-}'
- 'AWS_SESSION_TOKEN=${AWS_SESSION_TOKEN:-}'
- 'S3_STORAGE_EXPORTS_BUCKET=${S3_STORAGE_EXPORTS_BUCKET:-}'
- 'S3_STORAGE_SNAPSHOT_IMPORTS_BUCKET=${S3_STORAGE_SNAPSHOT_IMPORTS_BUCKET:-}'
- 'S3_STORAGE_MODULES_BUCKET=${S3_STORAGE_MODULES_BUCKET:-}'
- 'S3_STORAGE_FILES_BUCKET=${S3_STORAGE_FILES_BUCKET:-}'
- 'S3_STORAGE_SEARCH_BUCKET=${S3_STORAGE_SEARCH_BUCKET:-}'
- 'S3_ENDPOINT_URL=${S3_ENDPOINT_URL:-}'
healthcheck:
test: 'curl -f http://127.0.0.1:3210/version'
interval: 5s
start_period: 5s
and set the domains for it as
https://api.yourdomain.com:3210, https://http.yourdomain.com:3211
and the compose for dashboard:
services:
dashboard:
image: 'ghcr.io/get-convex/convex-dashboard:c1a7ac393888d743e704de56cf569a154b4526d4'
environment:
- 'NEXT_PUBLIC_DEPLOYMENT_URL=${NEXT_PUBLIC_DEPLOYMENT_URL:-}'
healthcheck:
test: 'wget -qO- http://127.0.0.1:6791/'
interval: 5s
start_period: 5s
domain
https://dashboard.yourdomain.com:6791
you can deploy dashboard only once and connect to as many as backends as you want
the dashboard can connects to them using api url and specific admin key per backend
example env variables for backends
ACTIONS_USER_TIMEOUT_SECS=60
AWS_SESSION_TOKEN=
CONVEX_CLOUD_ORIGIN=https://api.yourdomain.com
CONVEX_RELEASE_VERSION_DEV=
CONVEX_SITE_ORIGIN=https://http.yourdomain.com
DATABASE_URL=
POSTGRES_URL=postgresql://<POSTGRES DB INTERNAL URL IF YOU WANT TO USE IT>
DISABLE_BEACON=true
DO_NOT_REQUIRE_SSL=true
INSTANCE_NAME=convex_self_hosted
INSTANCE_SECRET=
MYSQL_URL=
NEXT_PUBLIC_DEPLOYMENT_URL=https://api.yourdomain.com
REDACT_LOGS_TO_CLIENT=true
RUST_BACKTRACE=
RUST_LOG=info
S3_ENDPOINT_URL=
S3_STORAGE_EXPORTS_BUCKET=
S3_STORAGE_FILES_BUCKET=
S3_STORAGE_MODULES_BUCKET=
S3_STORAGE_SEARCH_BUCKET=
S3_STORAGE_SNAPSHOT_IMPORTS_BUCKET=
AWS_ACCESS_KEY_ID=
AWS_REGION=
AWS_SECRET_ACCESS_KEY=
grumpy-cyan•3mo ago
if you want backups you can also deploy this
https://github.com/orenaksakal/convex-self-hosted-backups
GitHub
GitHub - orenaksakal/convex-self-hosted-backups
Contribute to orenaksakal/convex-self-hosted-backups development by creating an account on GitHub.
stormy-gold•3mo ago
thank you! gonna have a look into it later
flat-fuchsia•3mo ago
May I ask why you chose Start over just using the Router when using convex
grumpy-cyan•3mo ago
I initially used tanstack router in astro app for app pages but switched to start after devinxi as it is easier to stick to one solution for ssr / public pages