Skip to content
Back

endpoint variable

  • 0
  • Self Hosted
  • Sites
  • Web
trashcoder
29 Oct, 2025, 16:02

Appwrite Sites passes e.g. APPWRITE_SITE_API_ENDPOINT to the site, but i need this variable in Next.js in my Client-Side-Page. How can i pass it? Next.js only passes variables to frontend when it starts with NEXT_PUBLIC.

TL;DR
Developers need to access the APPWRITE_SITE_API_ENDPOINT variable in Next.js on the client-side page. To achieve this, prepend the variable with NEXT_PUBLIC_ in order to pass it to the frontend.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more