Public demo¶
A public demo lets people try GoHead without installing it: they open the admin UI, sign in with an account shown on the login page, and look at everything. GoHead's demo mode keeps them from breaking it, and puts the content back every night.
Demo mode¶
demo:
enabled: true # GOHEAD_DEMO_ENABLED
username: demo # GOHEAD_DEMO_USERNAME
password: try-gohead-demo # GOHEAD_DEMO_PASSWORD
reset_at: "03:00" # GOHEAD_DEMO_RESET_AT: daily, UTC ("off": never)
snapshot: "" # GOHEAD_DEMO_SNAPSHOT: default <database file>.demo-snapshot
At start, GoHead creates the visitors' account with the demo role, and the login page
offers Sign in to the demo. Visitors:
- see the whole admin: content, the content model, agents and their runs, connected apps, approvals (including calls to connected apps), webhooks, users and API tokens. Never a secret, and never an email address: GoHead replaces them in everything the demo account reads, since your public site's forms collect some. Webhook and connection URLs show their host only;
- create and edit drafts in draft-and-publish collections. They cannot publish, delete, or change single types and collections without drafts, which the public site shows at once;
- try agents with Test run: runs read content and call the model, and report the changes they would make. They call no connected app, not even read-only tools;
- cannot change anything else: settings, the content model, agents, users, tokens, connections, webhooks; they cannot upload files, and calls to connected apps waiting for approval are yours to approve.
A banner tells them, and the server refuses the rest with 403. Each visitor (by IP) may
make 60 changes and 10 test runs an hour, with requests of 16 KB at most (8 KB for a test
run).
Other than email addresses, visitors read what your site's forms collect: names, talk proposals, feedback. Say so on the forms of a public demo.
Every day at reset_at, GoHead puts back what visitors change as it was in the
snapshot, in one transaction: entries and their history, proposals, agent runs. What only
you change is kept: accounts, API tokens, roles, webhooks, connections, agents and the content
model. Take the snapshot once your demo is set up, as an admin:
curl -X POST $GOHEAD/admin/demo/snapshot -H "$AUTH" # save the database as it is now
curl -X POST $GOHEAD/admin/demo/reset -H "$AUTH" # go back to it now
curl $GOHEAD/admin/demo -H "$AUTH" # settings, snapshot time, next reset
Demo mode needs SQLite (gohead standalone): the reset copies SQLite tables. Uploaded files
are not part of the snapshot, which is fine since visitors cannot upload. After an upgrade
that adds a migration, the reset refuses to run until you take a new snapshot (the log says
so). Taking a snapshot also gives the demo role write access to the draft-and-publish
collections you added since GoHead started.
Visitors use your model
Agents run on your LLM key whenever visitors create entries or start test runs. Use a
small model, give every agent limits, and set a monthly budget with your provider.
The GoHead demo on Render¶
deploy/demo/render.yaml
deploys a complete demo in your Render account, for about $14 a month:
- gohead-demo: GoHead in demo mode (
gohead standalone, SQLite on a 1 GB disk), built from the latest commit ofmaster(GOHEAD_VERSION=edge), withgpt-4o-minifor agents; -
gohead-demo-site: the conference starter, which reads from GoHead over Render's private network.
-
In the Render dashboard, choose New → Blueprint, connect
gohead-cms/gohead(or your fork), and set the Blueprint path todeploy/demo/render.yaml. - Fill in your admin account (
GOHEAD_ADMIN_EMAIL,GOHEAD_ADMIN_PASSWORD, 12 characters or more) and your OpenAI key (GOHEAD_LLM_API_KEY). Leave the site's tokens empty for now. Click Deploy Blueprint. -
Once gohead-demo is live, set up its content from your machine, in a clone of the repository. In
templates/nextjs-conference, create.env.local:GOHEAD_URL=https://gohead-demo.onrender.com # gohead-demo's URL GOHEAD_USERNAME=admin GOHEAD_PASSWORD=<your admin password> GOHEAD_REVALIDATE_URL=https://gohead-demo-site.onrender.com/api/revalidate # Optional: an agent that opens a GitHub issue for each talk proposal. GOHEAD_DEMO_GITHUB_TOKEN=github_pat_… # fine-grained, Issues: read and write, one repository GOHEAD_DEMO_GITHUB_REPO=you/gohead-demo-issuesThen run:
The first two load the starter's content model, sample content, roles, tokens, webhook and agents. The last one adds the GitHub connection and its agent, takes the snapshot, and prints six settings. 4. Paste them into gohead-demo-site → Environment, and deploy the site again.
The site is at https://gohead-demo-site.onrender.com, and the admin UI at
https://gohead-demo.onrender.com. Try it as a visitor would: send a talk proposal from the
site's call for papers, then sign in to the demo. proposal-triage has scored it, and, with
GitHub connected, cfp-to-github has a call waiting on the Approvals page. Sign in as
yourself to approve it, and the issue appears in your repository.
Keeping it up to date¶
The demo is not rebuilt when GoHead changes. To show the latest commit, deploy both services again (Manual Deploy → Clear build cache & deploy for GoHead). When the new version changes the starter's content model or agents, run step 3 again: it keeps what exists, adds what is new and takes a new snapshot.