Run Netlify CMS Admin Locally
A quick breakdown of how to run your Netlify CMS admin on your local machine.
Let's cover how to run the Netlify CMS on your local machine. This write-up assumes you've already Netlify CMS in your project. After setup, you should have an admin folder containing an index.html
and config.yml
file. If not, go ahead and add those. See the documentation for more info.
The config.yml
file is used to set up the fields and properties needed for the dashboard.
The /admin
route is the public path that allows access to the dashboard on your website, but it can only be accessed when the site is live.
Here's an example of the folder structure:
/admin
config.yml
index.html
To access the Netlify CMS admin on your local machine, follow these steps:
Add
local_backend: true
in theconfig.yml
file in the admin folder.Run
npx netlify-cms-proxy-server
from the root directory of your repository. The proxy server will run on a different port, typically port8081
.Now, go to whatever route is running your website locally and go to
/admin
. So, if your app runs on port3000
for example, you can access your admin atlocalhost:3000/admin
Happy blogging!