Cubed Docs
Getting started

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/cubedtheme

You are in the right folder if ls (or dir on Windows) shows package.json.

Install the dependencies

bun install

A couple of minutes the first time. It creates a node_modules folder.

Create your settings file

cp .env.example .env.local

On Windows PowerShell:

Copy-Item .env.example .env.local

Open .env.local in any text editor and fill it in:

.env.local
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_remember

Full 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 seed

This one command does three things in your Supabase project:

  1. creates all the tables
  2. loads the default content — footer, about text, languages, currencies
  3. 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.

Start it

bun run dev

Open http://localhost:3000. Your Tebex categories and packages should be there.

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

CommandWhat it does
bun run devDevelopment server with live reload, on port 3000
bun run buildProduction build — run this before deploying to catch errors
bun run startServe a completed build
bun run seedCreate the tables, default content and admin user (first run only)
bun run checkLint, type-check and build in one go
bun run generate:typesRegenerate 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.

On this page