Read the signin env variables from server props
diff --git a/.github/workflows/build-frontend.yaml b/.github/workflows/build-frontend.yaml
index 282cd6fd83..33b8fa1c10 100644
--- a/.github/workflows/build-frontend.yaml
+++ b/.github/workflows/build-frontend.yaml
@@ -11,15 +11,6 @@ on:
       - website/**
   workflow_call:
 
-env:
-  NEXT_PUBLIC_BACKEND_URL: ${{ vars.WEB_NEXT_PUBLIC_BACKEND_URL }}
-  NEXT_PUBLIC_CLOUDFLARE_CAPTCHA_SITE_KEY:
-    ${{ secrets.WEB_NEXT_PUBLIC_CLOUDFLARE_CAPTCHA_SITE_KEY }}
-  NEXT_PUBLIC_ENABLE_EMAIL_SIGNIN:
-    ${{ vars.WEB_NEXT_PUBLIC_ENABLE_EMAIL_SIGNIN }}
-  NEXT_PUBLIC_ENABLE_EMAIL_SIGNIN_CAPTCHA:
-    ${{ vars.WEB_NEXT_PUBLIC_ENABLE_EMAIL_SIGNIN_CAPTCHA }}
-
 jobs:
   build-frontend:
     runs-on: ubuntu-latest
@@ -33,8 +24,6 @@ jobs:
           node-version: 16.x
           cache: "npm"
           cache-dependency-path: website/package-lock.json
-      - name: Show environment variables
-        run: echo "NEXT_PUBLIC_BACKEND_URL=$NEXT_PUBLIC_BACKEND_URL, NEXT_PUBLIC_ENABLE_EMAIL_SIGNIN=$NEXT_PUBLIC_ENABLE_EMAIL_SIGNIN, NEXT_PUBLIC_ENABLE_EMAIL_SIGNIN_CAPTCHA=$NEXT_PUBLIC_ENABLE_EMAIL_SIGNIN_CAPTCHA"
       - run: npm ci
       - run: npx prisma generate
       - run: npm run build
diff --git a/ansible/deploy-to-node.yaml b/ansible/deploy-to-node.yaml
index 43c777000b..5887df677e 100644
--- a/ansible/deploy-to-node.yaml
+++ b/ansible/deploy-to-node.yaml
@@ -199,18 +199,16 @@
           NEXTAUTH_URL:
             "{{ 'https://open-assistant.io/' if stack_name == 'production' else
             ('https://web.' + stack_name + '.open-assistant.io/') }}"
-          NEXT_PUBLIC_BACKEND_URL:
-            "{{ lookup('ansible.builtin.env', 'WEB_NEXT_PUBLIC_BACKEND_URL') }}"
-          NEXT_PUBLIC_CLOUDFLARE_CAPTCHA_SITE_KEY:
+          CLOUDFLARE_CAPTCHA_SITE_KEY:
             "{{ lookup('ansible.builtin.env',
             'WEB_NEXT_PUBLIC_CLOUDFLARE_CAPTCHA_SITE_KEY') }}"
           CLOUDFLARE_CAPTCHA_SECRET_KEY:
             "{{ lookup('ansible.builtin.env',
             'WEB_CLOUDFLARE_CAPTCHA_SECRET_KEY') }}"
-          NEXT_PUBLIC_ENABLE_EMAIL_SIGNIN_CAPTCHA:
+          ENABLE_EMAIL_SIGNIN_CAPTCHA:
             "{{ lookup('ansible.builtin.env',
             'WEB_NEXT_PUBLIC_ENABLE_EMAIL_SIGNIN_CAPTCHA') }}"
-          NEXT_PUBLIC_ENABLE_EMAIL_SIGNIN:
+          ENABLE_EMAIL_SIGNIN:
             "{{ lookup('ansible.builtin.env',
             'WEB_NEXT_PUBLIC_ENABLE_EMAIL_SIGNIN') }}"
           MAINTENANCE_MODE:
diff --git a/docker-compose.yaml b/docker-compose.yaml
index 91725ce5f2..4b578aaaa5 100644
--- a/docker-compose.yaml
+++ b/docker-compose.yaml
@@ -114,6 +114,8 @@ services:
       context: .
     image: oasst-web
     environment:
+      - CLOUDFLARE_CAPTCHA_SECRET_KEY=1x0000000000000000000000000000000AA
+      - CLOUDFARE_CAPTCHA_SITE_KEY=1x00000000000000000000AA
       - DATABASE_URL=postgres://postgres:postgres@webdb/oasst_web
       - FASTAPI_URL=http://backend:8080
       - FASTAPI_KEY=1234
@@ -121,12 +123,10 @@ services:
       - EMAIL_SERVER_HOST=maildev
       - EMAIL_SERVER_PORT=1025
       - EMAIL_FROM=info@example.com
+      - ENABLE_EMAIL_SIGNIN=true
+      - ENABLE_EMAIL_SIGNIN_CAPTCHA=false
       - NEXTAUTH_URL=http://localhost:3000
       - DEBUG_LOGIN=true
-      - NEXT_PUBLIC_CLOUDFARE_CAPTCHA_SITE_KEY=1x00000000000000000000AA
-      - CLOUDFLARE_CAPTCHA_SECRET_KEY=1x0000000000000000000000000000000AA
-      - NEXT_PUBLIC_ENABLE_EMAIL_SIGNIN_CAPTCHA=true
-      - NEXT_PUBLIC_ENABLE_EMAIL_SIGNIN=true
     depends_on:
       webdb:
         condition: service_healthy
diff --git a/website/.env b/website/.env
index 6c95c9a51a..3b59e931f1 100644
--- a/website/.env
+++ b/website/.env
@@ -8,9 +8,6 @@ DATABASE_URL=postgres://postgres:postgres@localhost:5433/oasst_web
 FASTAPI_URL=http://localhost:8080
 FASTAPI_KEY=1234
 
-# Used to expose the backend url to the clientside javascript
-NEXT_PUBLIC_BACKEND_URL=$FASTAPI_URL
-
 # A dev Auth Secret.  Can be exposed if we never use this publicly.
 NEXTAUTH_SECRET=O/M2uIbGj+lDD2oyNa8ax4jEOJqCPJzO53UbWShmq98=
 
diff --git a/website/src/components/CloudflareCaptcha.tsx b/website/src/components/CloudflareCaptcha.tsx
index 550e7e25d0..e945ba5927 100644
--- a/website/src/components/CloudflareCaptcha.tsx
+++ b/website/src/components/CloudflareCaptcha.tsx
@@ -2,13 +2,14 @@ import { useColorMode } from "@chakra-ui/react";
 import { Turnstile, TurnstileInstance, TurnstileProps } from "@marsidev/react-turnstile";
 import { forwardRef } from "react";
 
-export const CloudFlareCaptcha = forwardRef<TurnstileInstance, Omit<TurnstileProps, "siteKey">>((props, ref) => {
+export const CloudFlareCaptcha = forwardRef<TurnstileInstance, TurnstileProps>((props, ref) => {
+  const { siteKey, ...restProps } = props;
   const { colorMode } = useColorMode();
   return (
     <Turnstile
       ref={ref}
-      {...props}
-      siteKey={process.env.NEXT_PUBLIC_CLOUDFLARE_CAPTCHA_SITE_KEY}
+      {...restProps}
+      siteKey={siteKey}
       options={{
         theme: colorMode,
         ...props.options,
diff --git a/website/src/pages/auth/signin.tsx b/website/src/pages/auth/signin.tsx
index d66ff60c25..3fde23901c 100644
--- a/website/src/pages/auth/signin.tsx
+++ b/website/src/pages/auth/signin.tsx
@@ -50,9 +50,12 @@ const errorMessages: Record<SignInErrorTypes, string> = {
 
 interface SigninProps {
   providers: Record<BuiltInProviderType, ClientSafeProvider>;
+  enableEmailSignin: boolean;
+  enableEmailSigninCaptcha: boolean;
+  cloudflareCaptchaSiteKey: string;
 }
 
-function Signin({ providers }: SigninProps) {
+function Signin({ providers, enableEmailSignin, enableEmailSigninCaptcha, cloudflareCaptchaSiteKey }: SigninProps) {
   const router = useRouter();
   const { discord, email, github, credentials } = providers;
   const [error, setError] = useState("");
@@ -81,8 +84,12 @@ function Signin({ providers }: SigninProps) {
       <AuthLayout>
         <Stack spacing="2">
           {credentials && <DebugSigninForm providerId={credentials.id} bgColorClass={bgColorClass} />}
-          {email && boolean(process.env.NEXT_PUBLIC_ENABLE_EMAIL_SIGNIN) && (
-            <EmailSignInForm providerId={email.id}></EmailSignInForm>
+          {email && enableEmailSignin && (
+            <EmailSignInForm
+              providerId={email.id}
+              enableEmailSigninCaptcha={enableEmailSigninCaptcha}
+              cloudflareCaptchaSiteKey={cloudflareCaptchaSiteKey}
+            />
           )}
           {discord && (
             <Button
@@ -148,9 +155,15 @@ Signin.getLayout = (page: ReactNode) => (
 
 export default Signin;
 
-const emailSigninCaptcha = boolean(process.env.NEXT_PUBLIC_ENABLE_EMAIL_SIGNIN_CAPTCHA);
-
-const EmailSignInForm = ({ providerId }: { providerId: string }) => {
+const EmailSignInForm = ({
+  providerId,
+  enableEmailSigninCaptcha,
+  cloudflareCaptchaSiteKey,
+}: {
+  providerId: string;
+  enableEmailSigninCaptcha: boolean;
+  cloudflareCaptchaSiteKey: string;
+}) => {
   const { register, handleSubmit } = useForm<{ email: string }>();
   const captcha = useRef<TurnstileInstance>(null);
   const [captchaSuccess, setCaptchaSuccess] = useState(false);
@@ -172,8 +185,9 @@ const EmailSignInForm = ({ providerId }: { providerId: string }) => {
           placeholder="Email Address"
           {...register("email")}
         />
-        {emailSigninCaptcha && (
+        {enableEmailSigninCaptcha && (
           <CloudFlareCaptcha
+            siteKey={cloudflareCaptchaSiteKey}
             options={{ size: "invisible" }}
             ref={captcha}
             onSuccess={() => setCaptchaSuccess(true)}
@@ -183,7 +197,7 @@ const EmailSignInForm = ({ providerId }: { providerId: string }) => {
           data-cy="signin-email-button"
           leftIcon={<Mail />}
           mt="4"
-          disabled={!captchaSuccess && emailSigninCaptcha}
+          disabled={!captchaSuccess && enableEmailSigninCaptcha}
         >
           Continue with Email
         </SigninButton>
@@ -244,9 +258,15 @@ const DebugSigninForm = ({ providerId, bgColorClass }: { providerId: string; bgC
 
 export const getServerSideProps: GetServerSideProps<SigninProps> = async ({ locale }) => {
   const providers = await getProviders();
+  const enableEmailSignin = boolean(process.env.ENABLE_EMAIL_SIGNIN);
+  const enableEmailSigninCaptcha = boolean(process.env.ENABLE_EMAIL_SIGNIN_CAPTCHA);
+  const cloudflareCaptchaSiteKey = process.env.CLOUDFLARE_CAPTCHA_SITE_KEY;
   return {
     props: {
       providers,
+      enableEmailSignin,
+      enableEmailSigninCaptcha,
+      cloudflareCaptchaSiteKey,
       ...(await serverSideTranslations(locale, ["common"])),
     },
   };

This is to ensure we always use the runtime variable instead of the build time variable.