[GH-ISSUE #904] Support .env.local #8493

Closed
opened 2026-04-13 03:34:24 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @daveycodez on GitHub (Dec 16, 2024).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/904

Is this suited for github?

  • Yes, this is suited for github

To Reproduce

vercel pull env .env.local

Current vs. Expected behavior

:( took me a while to figure out why my DB wasn't connecting. It's a pain to have to do cp .env.local to .env

What version of Better Auth are you using?

Latest

Provide environment information

NextJS + Kysely + NeonDialect

Which area(s) are affected? (Select all that apply)

Package

Auth config (if applicable)

import { betterAuth } from "better-auth"
import { NeonDialect } from "kysely-neon"

export const auth = betterAuth({
    database: {
        dialect: new NeonDialect({
            connectionString: process.env.DATABASE_URL,
        }),
        type: "postgres"
    },
    emailAndPassword: { enabled: true }
})

Additional context

No response

Originally created by @daveycodez on GitHub (Dec 16, 2024). Original GitHub issue: https://github.com/better-auth/better-auth/issues/904 ### Is this suited for github? - [ ] Yes, this is suited for github ### To Reproduce vercel pull env .env.local ### Current vs. Expected behavior :( took me a while to figure out why my DB wasn't connecting. It's a pain to have to do cp .env.local to .env ### What version of Better Auth are you using? Latest ### Provide environment information ```bash NextJS + Kysely + NeonDialect ``` ### Which area(s) are affected? (Select all that apply) Package ### Auth config (if applicable) ```typescript import { betterAuth } from "better-auth" import { NeonDialect } from "kysely-neon" export const auth = betterAuth({ database: { dialect: new NeonDialect({ connectionString: process.env.DATABASE_URL, }), type: "postgres" }, emailAndPassword: { enabled: true } }) ``` ### Additional context _No response_
GiteaMirror added the lockedbug labels 2026-04-13 03:34:24 -05:00
Author
Owner

@daveycodez commented on GitHub (Dec 16, 2024):

Well if I migrate away from using .env.local entirely things seem fine, I guess I'm old school. I do think having a --env option would be useful though, or at least some warnings if you don't find it.

I'm able to just do vervel env pull .env now instead of having 2

<!-- gh-comment-id:2546433843 --> @daveycodez commented on GitHub (Dec 16, 2024): Well if I migrate away from using .env.local entirely things seem fine, I guess I'm old school. I do think having a --env option would be useful though, or at least some warnings if you don't find it. I'm able to just do vervel env pull .env now instead of having 2
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#8493