To create your first Strapi project on a brand new MacBook with no prior coding experience, follow these detailed steps:
1. Open Terminal#
- Click the “Launchpad” (rocket icon) in your Dock, type “Terminal”, and press Enter.
2. Install Homebrew#
Paste this command into Terminal and press Enter:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Follow the on-screen instructions. You may be asked for your Mac password (type it and press Enter; you won’t see the characters).
3. Install Node.js (version 20)#
brew install node@20
Add Node.js 20 to your path:
echo 'export PATH="/opt/homebrew/opt/node@20/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
Check installation:
node -v
You should see something like v20.x.x.
4. Install Git#
brew install git
5. (Optional) Install Yarn#
npm install --global yarn
6. Create Your Strapi Project#
npx create-strapi@latest my-strapi-project
- Follow the interactive setup:
- Select “Login/Sign up” and press Enter.
- A browser will open; log in with GitHub (create an account if needed).
- Confirm the code matches, then click “Confirm” and “Continue with GitHub”.
- Once you see “Congratulations, you’re all set!”, close the browser and return to Terminal.
- For the next questions, press Enter to accept defaults (unless you want to customize).
- For the database, press Enter to use the default (SQLite).
7. Start the Strapi Server#
cd my-strapi-project
yarn develop
- Your browser will open the Strapi admin panel.
- Register your first admin user (choose a name, email, and password).
8. Managing the Server#
- To stop the server: Press
Ctrl + Cin Terminal. - To start it again later:
cd my-strapi-project
yarn develop
Troubleshooting#
- If you see errors about “better-sqlite3” and you used pnpm, add this to your
package.json:
"pnpm": {
"onlyBuiltDependencies": ["better-sqlite3"]
}
- If you get permission errors, try restarting Terminal or your Mac.
For more details and screenshots, see the Strapi Quick Start Guide and CLI Installation Guide.
You are now ready to start building with Strapi!