> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lynkz.elipseday.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Troubleshooting Your Lynkz Setup and Configuration

> Diagnose and fix common Lynkz problems including PIN lockouts, magic link failures, missing environment variables, and Firestore permission errors.

If something isn't working as expected in Lynkz, these common issues and solutions should help you get back on track.

<AccordionGroup>
  <Accordion title="Magic link email not arriving">
    * Check that `RESEND_API_KEY` is set in your Vercel environment variables.
    * On Resend's free tier, you can only send to the email address registered on your Resend account. To send to any address, verify a custom domain at [resend.com/domains](https://resend.com/domains) and set `RESEND_FROM_DOMAIN`.
    * Make sure you've added a recovery email in **Settings → PIN recovery email** — without one, the magic link flow cannot send you anything.
    * Check your spam or junk folder in case the email was filtered.
  </Accordion>

  <Accordion title="Locked out after failed PIN attempts">
    * IP lockouts last 24 hours — wait and try again once the period has elapsed.
    * If you have a recovery email set, use the **"Forgot PIN?"** flow on the login screen to receive a magic link and regain access immediately.
    * Without a recovery email, there is no bypass. Your only option is to create a new page with a different username.
  </Accordion>

  <Accordion title="Firestore permission denied errors">
    * Verify your Firestore rules are published. Go to **Firebase Console → Firestore → Rules** and confirm the rules match those in the [Firestore Rules](/security/firestore-rules) guide, then click **Publish**.
    * Confirm all `NEXT_PUBLIC_FIREBASE_*` variables are set correctly in your `.env.local` file — a missing or misspelled variable will prevent the client SDK from connecting to the right project.
  </Accordion>

  <Accordion title="Environment variables not taking effect after deploy">
    In Vercel, adding or changing environment variables does not automatically apply to your running deployment. After adding or updating any variable in the Vercel dashboard, trigger a new deployment for the changes to take effect.
  </Accordion>

  <Accordion title="Service account key errors">
    * `FIREBASE_SERVICE_ACCOUNT_KEY` must be the **full JSON string** copied from your downloaded service account file — not a file path.
    * Never commit this value to your repository. Set it only as a Vercel environment variable in the dashboard.
  </Accordion>

  <Accordion title="Links not showing on the public page">
    * Check whether the link has a schedule configured. Links with a start or end datetime are hidden automatically when viewed outside that window.
  </Accordion>

  <Accordion title="Page not found at your domain">
    * Confirm that `NEXT_PUBLIC_APP_URL` is set to your production URL in your Vercel environment variables.
    * If you're using a custom domain, make sure it is pointed to the correct Vercel deployment and that the domain is fully propagated.
  </Accordion>
</AccordionGroup>

<Note>
  If your issue isn't listed here, open an issue on [GitHub](https://github.com/harshilarora250/lynkz/issues).
</Note>
