Reference

Configuration

Every environment variable, what it controls and what happens without it.

On this page

The environment file#

Copy .env.example to .env.local for local work. On a host, set the same names in its environment settings.

.env.local
NEXT_PUBLIC_SUI_NETWORK="testnet"
NEXT_PUBLIC_SUI_RPC_URL="https://fullnode.testnet.sui.io:443"
NEXT_PUBLIC_FLOE_PACKAGE_ID="0x…"
NEXT_PUBLIC_GOOGLE_CLIENT_ID="….apps.googleusercontent.com"
NEXT_PUBLIC_ENOKI_API_KEY="enoki_public_…"

# Server only
ENOKI_SECRET_KEY="enoki_private_…"
COINGECKO_API_KEY=""

Public variables#

These are compiled into the browser code, so anyone can read them.

VariableDescriptionIf missing
NEXT_PUBLIC_SUI_NETWORKmainnet, or anything else for testnetTestnet
NEXT_PUBLIC_SUI_RPC_URLSui full node endpoint, with gRPCThe public full node for the network
NEXT_PUBLIC_FLOE_PACKAGE_IDThe published package IDLinks can’t be created, claimed or refunded
NEXT_PUBLIC_GOOGLE_CLIENT_IDGoogle OAuth web client IDLogin and claiming are off
NEXT_PUBLIC_ENOKI_API_KEYEnoki public key, with zkLogin onLogin and claiming are off
NEXT_PUBLIC_WALRUS_PUBLISHERWhere gifts are stored. Separate several with commas, in the order to try.Public publishers on testnet. No gifts on mainnet.
NEXT_PUBLIC_WALRUS_AGGREGATORWhere gifts are read. Separate several with commas.A public aggregator on testnet. No gifts on mainnet.
NEXT_PUBLIC_APP_URLThe site’s address, for link previews, robots.txt and the sitemaphttps://floeonsui.vercel.app
NEXT_PUBLIC_CONTACT_EMAILA monitored address, shown in the footer, policies and docsPeople are sent to public GitHub issues

Server variables#

VariableDescriptionIf missing
ENOKI_SECRET_KEYEnoki private key, with sponsored transactions on/api/claim answers 503
COINGECKO_API_KEYFree CoinGecko demo keyPrices work at a lower rate limit

Notes#

  • devnet is not supported. The app treats every value except mainnet as testnet.
  • Claim links don’t use NEXT_PUBLIC_APP_URL. They use the address the sender is on.
  • The GraphQL endpoint follows the network and can’t be set separately.
  • Changing the network or package ID starts a new, empty link history in each browser. The old one is kept under its own name.

Settings in code#

These are in src/lib/chain/config.ts.

NameValueChange it when
LINK_DURATION_MS14 daysYou want links to last longer, up to 365 days
COIN_TYPESSUI and $LOFIYou add a token. It must use nine decimals.
WATER_TREASURYThe contract’s treasuryYou publish a contract with a different address. They must match.

Some interface text and the terms mention 14 days, so update those too.