LIVEReading: Run a Self-Hosted CMS with Auto-Generated APIs in MinutesTotal time: 12 minSteps: 7Worked first time: 78% LIVEReading: Run a Self-Hosted CMS with Auto-Generated APIs in MinutesTotal time: 12 minSteps: 7Worked first time: 78%
CBW
Run a Self-Hosted CMS with Auto-Generated APIs in Minutes
Mediumgithub.com/strapi/strapi2026-06-17

Run a Self-Hosted CMS with Auto-Generated APIs in Minutes

Strapi gives you a visual content editor plus instant REST and GraphQL APIs — no coding required. Spin it up locally in under 10 minutes.

// Build stats

  • Total time12 min
  • Number of steps7
  • DifficultyMedium
  • Worked first time78%
// Before you start

What you need

  • Node.js 18 or 20 installed (nodejs.org — download the LTS version)
  • npm included with Node.js (no separate install needed)
  • A terminal app (Terminal on Mac, Command Prompt or PowerShell on Windows)
  • At least 1 GB of free disk space
  • A modern browser (Chrome, Firefox, Edge)
01
Step 1 of 7

Check your Node.js version

1 min

Strapi requires Node.js version 18 or 20. This command prints your current version so you know you are good to go before installing anything.

Terminal · mac
$ node --version
What you should see
v18.x.x or v20.x.x (any patch version is fine)
This might happen

You see v16, v21, or 'node is not recognized'

Go to nodejs.org, download the LTS installer, run it, then open a fresh terminal and try again.

02
Step 2 of 7

Create a new Strapi project

3-5 min

This single command downloads Strapi, creates a folder called 'my-project', and sets up a working CMS with a SQLite database (no database server needed). It will ask a few questions — press Enter to accept the defaults each time. The download is roughly 200 MB so give it a moment.

Terminal · mac
$ npx create-strapi@latest my-project
What you should see
A series of prompts, then: 'Your application was created at my-project'. The terminal may ask if you want to log in to Strapi Cloud — type 'n' and press Enter to skip.
This might happen

The command hangs or you see 'EACCES permission denied'

On Mac/Linux run: sudo npx create-strapi@latest my-project and enter your system password when prompted.

03
Step 3 of 7

Start the Strapi server

2 min

Move into your new project folder and start the development server. Strapi will build its admin panel the first time — this takes about 60 seconds. After that it opens automatically in your browser.

Terminal · mac
$ cd my-project && npm run develop
What you should see
You will see build progress lines, then: 'Welcome back!' or a browser tab opens at http://localhost:1337/admin
This might happen

Port 1337 is already in use — you see 'EADDRINUSE'

Stop whatever is using port 1337, or open package.json in the my-project folder and add PORT=1338 to a .env file, then restart.

04
Step 4 of 7

Create your admin account

1 min

The first time you open the admin panel, Strapi asks you to register an admin user. Fill in your name, email, and a password. This account lives only on your local machine — nothing is sent to Strapi's servers.

Terminal · mac
$ Open http://localhost:1337/admin in your browser
What you should see
A registration form with fields for First name, Last name, Email, and Password.
05
Step 5 of 7

Build your first content type

3 min

Inside the admin panel, click 'Content-Type Builder' in the left sidebar, then 'Create new collection type'. Give it a name like 'Article', add fields (Text, Rich Text, Date, etc.) by clicking the field buttons, then click 'Save'. Strapi restarts automatically and your new API endpoint is live.

Terminal · mac
$ No terminal command needed — use the visual editor in the browser at http://localhost:1337/admin
What you should see
After saving, the server restarts and your new type appears under 'Content Manager' in the sidebar.
This might happen

The server does not restart after saving a content type

Go back to your terminal and press Ctrl+C to stop the server, then run 'npm run develop' again.

06
Step 6 of 7

Make your API publicly accessible

1 min

By default Strapi locks every API endpoint. To test it in a browser or tool like Postman, go to Settings → Roles → Public, find your content type, tick 'find' and 'findOne', then click Save. Now anyone can read your content via the API.

Terminal · mac
$ In the admin panel: Settings → Roles → Public → tick 'find' for your content type → Save
What you should see
A green 'Saved' toast notification appears at the top of the screen.
07
Step 7 of 7

Test your live API endpoint

1 min

Paste this URL into your browser (replace 'articles' with the plural name of your content type). You will see a JSON response — that is your content API, ready to connect to any website, app, or tool.

Terminal · mac
$ http://localhost:1337/api/articles
What you should see
A JSON object like: {"data": [], "meta": {"pagination": {...}}} — empty at first until you add content in the Content Manager.
// Status

cooked. baked. worked.

A locally running headless CMS at localhost:1337 with a visual editor for managing content and a live REST API endpoint you can query from any frontend or tool.

// the honest bit

The honest part

Strapi is genuinely powerful but it is built for developers first. The visual content editor and API work great without coding, but customizing the admin panel, adding plugins, or connecting a real database (PostgreSQL, MySQL) requires editing config files and some comfort with the terminal. The SQLite database used here is fine for testing but not recommended for production. Deploying to a live server adds real complexity — consider Strapi Cloud (paid) if you want a managed option without DevOps.