#what are all these keys?
14 messages · Page 1 of 1 (latest)
Hi @uneven zodiac. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
Based on the provided knowledge sources, I can explain the keys you've mentioned:
-
CONVEX_DEPLOYMENT: This is the name of your development deployment where your functions are pushed to and served from during local development. It's stored in the.env.localfile and used by commands likenpx convex devProduction > Project Configuration (https://docs.convex.dev/production/project-configuration). -
EXPO_PUBLIC_CONVEX_URL: This is the URL of your Convex deployment that your client app connects to. It's specific to each developer and should be different for each one Discord support thread: Use personal dev deployment instead of other team members. (https://discord.com/channels/1019350475847499849/1247541897967177779). -
EXPO_PUBLIC_CONVEX_SITE: While not explicitly explained in the provided sources, this likely refers to the site URL of your Convex deployment, similar to theCONVEX_SITE_URLsystem environment variable Production > Environment Variables > System environment variables (https://docs.convex.dev/production/environment-variables#system-environment-variables). -
AUTH_RESEND_KEY: This is an API key for the Resend email service, used when configuring email authentication with Convex Auth > Config > OTPs (https://labs.convex.dev/auth/config/otps).
For app builds, the key needed depends on your setup:
- For local development, you need
CONVEX_DEPLOYMENTand the URL of your dev deployment (which could beEXPO_PUBLIC_CONVEX_URLin your case) Production > Project Configuration (https://docs.convex.dev/production/project-configuration).
-
For production deployments, you typically need a
CONVEX_DEPLOY_KEY(not listed in your question) and the deployment URL variable configured in your CI environment Production > Project Configuration (https://docs.convex.dev/production/project-configuration). -
If you're using authentication features, you might also need keys like
AUTH_RESEND_KEYdepending on your authentication setup Auth > Config > Magic Links > Setup (https://labs.convex.dev/auth/config/email#setup).
Remember to set these environment variables appropriately for your development and production environments.
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
@uneven zodiac Kapa.ai is still learning and improving, please let me know how I did by reacting below.
@muted estuary for an expo app with eas builds, I just need the EXPO_PUBLIC_CONVEX_URL, EXPO_PUBLIC_CONVEX_SITE, and AUTH_RESEND_KEY
Let me check the knowledge base for you again. One moment! :books:
Based on the information provided in the knowledge sources, I can't definitively confirm that those are the only keys you need for an Expo app with EAS builds. However, I can provide some insights based on the available information:
-
EXPO_PUBLIC_CONVEX_URL: This is indeed necessary for your client app to connect to your Convex deployment Discord support thread: Use personal dev deployment instead of other team members. (https://discord.com/channels/1019350475847499849/1247541897967177779). -
EXPO_PUBLIC_CONVEX_SITE: While this isn't explicitly mentioned in the provided sources for Expo apps, it might be related to theSITE_URLenvironment variable, which is sometimes required for authentication in React Native apps Discord support thread: Convex Auth Missing SITE_URL in Expo App (https://discord.com/channels/1019350475847499849/1287155640594071583). -
AUTH_RESEND_KEY: This is necessary if you're using Resend for email authentication Auth > Config > OTPs (https://labs.convex.dev/auth/config/otps).
However, it's important to note that the exact keys needed can depend on your specific setup and the features you're using. For example:
-
If you're using authentication, you might need additional keys like
JWKSandJWT_PRIVATE_KEYDiscord support thread: Convex Auth Missing SITE_URL in Expo App (https://discord.com/channels/1019350475847499849/1287155640594071583). -
The
CONVEX_DEPLOYMENTkey, while not mentioned in your list, is often used for local development Discord support thread: Use personal dev deployment instead of other team members. (https://discord.com/channels/1019350475847499849/1247541897967177779).
For the most accurate information about the keys needed for your specific Expo app with EAS builds, I recommend consulting the Convex documentation or reaching out to Convex support directly, as the provided knowledge sources don't give a complete picture for this specific use case.
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
@uneven zodiac Kapa.ai is still learning and improving, please let me know how I did by reacting below.
@muted estuary How do I CLI set an env variable for production vs dev? currently it's jsut going to dev.
Let me check the knowledge base for you again. One moment! :books:
To set environment variables for production versus development using the Convex CLI, you can use different commands depending on which environment you're targeting. Here's how you can do it:
-
For development (dev) environment:
npx convex env set <name> <value> -
For production environment:
npx convex env set --prod <name> <value>
The --prod flag is used to specify that you want to set the environment variable for the production deployment.
You can also list, get, and remove environment variables using similar commands:
npx convex env list
npx convex env get <name>
npx convex env remove <name>
These commands will work for the development environment by default. To perform these actions for the production environment, add the --prod flag.
It's important to note that Convex maintains separate environment variables for development and production deployments. This allows you to have different configurations for each environment CLI > Develop > Read and write environment variables (https://docs.convex.dev/cli#read-and-write-environment-variables).
If you're finding that your commands are only affecting the dev environment, make sure you're using the --prod flag when you want to target the production deployment.
Additionally, you can use the Convex dashboard to manage environment variables for both development and production environments. You can access the dashboard using:
npx convex dashboard
This will open the dashboard where you can set, view, and manage environment variables for both environments Discord support thread: Unable to push deployment config to ... > Answers (https://discord.com/channels/1019350475847499849/1253496491226697798).