-
Contains a working better-auth port for solid js for both convex http and convex client. See signin.tsx, handler, and all the files under the directory
src/components/auth-provider
-
Contains a working example showcasing full text search. See here
-
Contains a working example showcasing Real-time chat with live database updates. See here
-
Contains a working example showcasing Realtime File Uploads. See here
Self Hosting convex on Dokploy is as follows:
-
Download the compose file from this url
-
On the
Environment
tab add the urls as below:# URL of the Convex API as accessed by the client/frontend. CONVEX_CLOUD_ORIGIN='https://api.my-domain.com' # URL of Convex HTTP actions as accessed by the client/frontend. CONVEX_SITE_ORIGIN='https://my-domain.com' # URL of the Convex API as accessed by the dashboard (browser). NEXT_PUBLIC_DEPLOYMENT_URL='https://dash.my-domain.com'
-
Run deploy on the dokploy
General
tab. -
Once the deployment is complete go to the domains tab and add the
NEXT_PUBLIC_DEPLOYMENT_URL='https://dash.my-domain.com'
as below:
and theCONVEX_CLOUD_ORIGIN='https://api.my-domain.com'
as below:
-
On the okploy
General
tab run reload to populate the deployment urls. -
SSH into your VPS and identify the backend docker container and run the following commands:
docker exec -it [your-backend-container-name] sh # then ./generate_admin_key.sh
copy the full key including the
convex-self-hosted|
part and go to the dns dash.my-domain.com and add the api dns to the deployment url and the key we just generated to the password and click login. -
Generate any project and add the following to a
env.local
:CONVEX_SELF_HOSTED_URL='https://api.my-domain.com' CONVEX_SELF_HOSTED_ADMIN_KEY='<your admin key>'
and run
npx convex dev
And thats it ! you've setup a project with convex and dokploy
Set the following as your build command:
VERCEL="" bunx convex deploy --cmd "VERCEL=true vinxi build" --cmd-url-env-var-name VITE_CONVEX_URL
and the following environment variables:
CONVEX_SELF_HOSTED_URL='https://api.my-domain.com'
CONVEX_SELF_HOSTED_ADMIN_KEY='your key'
VITE_CONVEX_SITE_URL='https://site.my-domain.com'
Then deploy
The steps should be the same as vercel but with the NETLIFY arguments
Select nixpacks as the build deployment then add the following env file:
NIXPACKS_BUILD_CMD='bunx convex deploy --cmd-url-env-var-name VITE_CONVEX_URL --cmd 'vinxi build''
CONVEX_SELF_HOSTED_URL='https://api.my-domain.com'
CONVEX_SELF_HOSTED_ADMIN_KEY='your key'
VITE_CONVEX_SITE_URL='https://site.my-domain.com'
Mixed Content: The page at https://api.my-domain.com' was loaded over HTTPS, but requested an insecure resource 'http://api.my-domain.com/api/check_admin_key'. This request has been blocked; the content must be served over HTTPS.
Ensure you are using https not http or serve the backend with https explicitly