Skip to content

Your First Base

By the end of this chapter you have an account, you understand why the first account is powerful, and a base of your own exists next to the sample one NocoDB gives you.

The first account is the super admin

Open the web app and the very first screen is a sign-up form. Whoever signs up first becomes the super admin — the account that owns the whole installation, above every workspace and base. The lab did it through the API (transcript t03); the form in the browser asks for exactly the same two things:

curl -X POST http://localhost:18104/api/v1/auth/user/signup \
  -d '{"email":"admin@example.org","password":"..."}'

Two things happen at once. You get a token — a signed pass the API checks on every later call, sent in the xc-auth header — and NocoDB creates a Default Workspace and a sample base called Getting Started, with a small Features table in it. Ask the server who you are and it confirms the rank:

curl http://localhost:18104/api/v1/auth/user/me \
  -H "xc-auth: <your token>"
{"email":"admin@example.org",
 "roles":{"org-level-creator":true,"super":true}}

Guard that first account accordingly: its password is the keys to every base the server will ever hold. Later accounts are ordinary until someone with power shares something with them — chapter 10 shows a second user signing up, receiving nothing, and being granted exactly one base at exactly the viewer level.

One practical note for the browser route: after the first account exists, the sign-up form remains available to new users by default, but a new account on its own sees no bases at all. Being on the server and being in a base are separate facts, and roles are what bridge them.

Making a base

In the web app: New Base, give it a name, done. The lab's call shows what the app does under the glass — and one wrinkle worth knowing if you ever script this. Creating a base through the API needs the workspace's id in the request; without it the server refuses with a plain forbidden error, because a base must live somewhere:

curl -X POST http://localhost:18104/api/v2/meta/bases \
  -H "xc-auth: <your token>" \
  -d '{"title":"Workshop Inventory",
       "fk_workspace_id":"w4z33lph"}'
{"id":"p0zm64c9rokjyih","title":"Workshop Inventory", ...}

The id it returns — a short string of letters and digits — is how the API names the base forever after. The lab base, Workshop Inventory, is where the rest of this guide happens: a small inventory of household things (Items) and the places they are kept (Locations). Its tables arrive empty of everything but their shape; giving a table its shape is chapter 5, and putting things in it is chapter 6.

The sample Getting Started base can be explored, renamed or deleted freely; it is a real base in every way, and deleting it harms nothing. This guide leaves it in place, because chapter 13 will open the database file and point at its table as evidence.