Install and seed
Install the theme, fill in your keys, and create your database tables and admin login. Done once, whatever you deploy to.
This page is the base setup. Every deployment guide refers back to it instead of repeating it, because seeding is a one-off against your Supabase project — not something you redo per server.
Doing it on your own computer first takes ten minutes and proves your keys work before you pay for hosting.
Your database is remote, so it does not matter where you run these commands from. Your laptop, a VPS or a game panel all reach the same Supabase project.
Before you start
You need Node.js 24+ and Bun, your two Tebex keys, and a Supabase project.
Steps
Get the files onto your computer
Unzip the theme you purchased into a folder, then open a terminal inside that folder.
cd ~/Downloads/cubedthemeYou are in the right folder if ls (or dir on Windows) shows package.json.
Install the dependencies
bun installA couple of minutes the first time. It creates a node_modules folder.
Create your settings file
cp .env.example .env.localOn Windows PowerShell:
Copy-Item .env.example .env.localOpen .env.local in any text editor and fill it in:
TEBEX_TOKEN=your_headless_store_token
SERVER_SECRET=your_game_server_secret
NEXT_PUBLIC_SITE_URL=http://localhost:3000
PAYLOAD_SECRET=paste_a_64_character_random_string
DATABASE_URI=postgresql://postgres.yourref:yourpassword@aws-0-region.pooler.supabase.com:5432/postgres
SUPABASE_URL=https://yourref.supabase.co
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key
SEED_ADMIN_EMAIL=you@example.com
SEED_ADMIN_PASSWORD=choose_something_you_will_rememberFull reference: Environment variables.
While running locally, NEXT_PUBLIC_SITE_URL must be http://localhost:3000.
Putting your live domain here makes the basket reject your own requests.
Seed the database
bun run seedThis one command does three things in your Supabase project:
- creates all the tables
- loads the default content — footer, about text, languages, currencies
- creates your admin account from
SEED_ADMIN_EMAIL/SEED_ADMIN_PASSWORD
You should see Created admin user: … followed by Seed complete.
Run this from a normal shell, without NODE_ENV=production set. The tables are
only created outside production mode. If you skip seeding and start the site in
production, it boots against an empty database and there is no account to log in
with.
It is safe to re-run — it will not duplicate your admin user. But do not re-run it after you have customised your content: it overwrites the default content back to factory settings.
Log in to the admin panel
Open http://localhost:3000/admin and sign in with the email and password from step 3.
Change the password now if you used the defaults admin@example.com /
changeme123 — they are printed in the theme's example file, so they are effectively
public.
This is where you change everything: Admin panel guide.
That is the setup done
Because your content and uploads live in Supabase, nothing here needs to be carried to your server. Deploying is just running the same code somewhere else with the same environment variables.
Pick a host: Deployment.
Useful commands
| Command | What it does |
|---|---|
bun run dev | Development server with live reload, on port 3000 |
bun run build | Production build — run this before deploying to catch errors |
bun run start | Serve a completed build |
bun run seed | Create the tables, default content and admin user (first run only) |
bun run check | Lint, type-check and build in one go |
bun run generate:types | Regenerate TypeScript types after changing admin panel fields |
npm works for install, build and start. Bun is required for seed — see
Requirements.
If something goes wrong
More in Troubleshooting.