---
title: "Next.js for Acquia: Setting up CMS"
date: "2022-10-14T13:36:57+00:00"
summary:
image:
type: "article"
url: "/acquia-cloud-platform/help/89236-nextjs-acquia-setting-cms"
id: "2b161171-6ca0-49bf-806d-e0c9cf08ecad"
---

Table of contents will be added

Goal
----

Setup Acquia CMS for working with the Next.js

Prerequisites
-------------

*   You should have a local Drupal development environment (e.g. brew or lando/ddev/docksal)
    
*   Composer should be installed
    

Overview
--------

This is the first in a 3 part tutorial series in how to get started with Next.js and Acquia CMS. Next.js is an adaptable JavaScript framework, built on top of React.js, with great support, stability, performance and security features. We partnered with [Chapter 3](https://www.chapterthree.com/), maintainers of [Next.js for Drupal](https://next-drupal.org/), to build [Next.js for Acquia CMS](https://github.com/acquia/next-acms): a Next.js starter kit for [Acquia CMS](https://www.acquia.com/products/drupal-cloud/acquia-cms).

This tutorial will show you how to set Acquia CMS to work with our starter kit

1.  Create Acquia CMS project
    -------------------------
    
    Start by creating a new Acquia CMS project:
    
    _(If you have an existing Acquia CMS project, you can skip this step)_
    
    Note
    
    The acms:install command is apart of the Acquia CMS 2.0 starter kit installation method. It replaces traditional Drupal installation profiles with a wizard that integrates with composer to install only the project dependencies you need.
    
    In the starter kit wizard, select `acquia_cms_headless` as the starter kit.
    
    Warning
    
    We also recommend you install the demo content. This way it will be easier to see content coming through the Next.js site later.
    
2.  Login to Acquia CMS
    -------------------
    
    During the acms:install process, the starter kit will use a drush command called site:install. This will output to the console your admin username (admin) and password (which is randomly generated).
    
    Find these in the console output and use them to visit your site in a browser and login. If you can't find the credentials, you can reset your password using drush also:
    
         drush -l  uli
    
3.  Enable the Next.js starter kit
    ------------------------------
    
    From the drop down admin menu, hover over the **Tour** link and select "**Get started**". This will take you to the CMS Dashboard. This is a dashboard for quickly being able to configure your site on Acquia CMS.
    
    ![CMS Dashboard interface with navigation icons and setup instructions. A "Get started" button is highlighted with a green checkmark.](https://acquia.widen.net/content/c0c9f399-91d1-48c0-9be0-9a911c7930fd/web/url_b8dfab5d5748a07b33a0f05b7f6aa37f.png)
    
    In the CMS Dashboard, expand the **Headless** accordion section and select the **Next.js starter kit** option and hit **Save**.
    
    ![Options for enabling Next.js starter kit or Headless mode in Drupal settings, with "Save" and "Ignore" buttons.](https://acquia.widen.net/content/afd4fe67-c985-4457-995a-ce8b115bd005/web/url_3130f2dfa3cfe63617a61a0113ae8f27.webp)
    
    When you hit save, Acquia CMS takes the following steps for you:
    
    1.  Create a role and user
    2.  Ensure Simple OAuth SSL keys are generated and setup
    3.  Ensure an OAuth client (consumer) is setup for Next.js with generated secret
    4.  Create a Next.js site that will resolve to `http://localhost:3000` with a generated preview secret.
    5.  Configure Next.js preview to use the content types shipped with Acquia CMS.
    
    You will see a status message in the UI that will show you your environmental variables for your Node application when you build on the [Acquia CMS starter kit for Next.js](https://dev.acquia.com/tutorial/nextjs-acquia-nextjs-startkit-acquia-cms).
    
    ![CMS dashboard displaying environment variables for Next.js application setup, with a status message confirming Acquia CMS Next.js starter kit activation.](https://acquia.widen.net/content/28b4a88f-7134-45c3-8142-3ef5bc724566/web/url_501bf5a5e13d2a38b12ec6295634e682.png)
    
4.  Copy environment variables
    --------------------------
    
    Lastly, copy the credentials from the status message. Perhaps save them somewhere ready for your Next.js application setup.
    
    Warning
    
    Warning - The secret generated in this message cannot be retrieved again as it is stored as an encrypted value. If you lose this secret, you'll need to regenerate it again from the Consumer edit page.
    

Congratulations 🎉
------------------

You now have an Acquia CMS instance ready for integration with Next.js. So what's next?

Continue the tutorial series and checkout [how to setup the Next.js starter kit](https://dev.acquia.com/tutorial/nextjs-acquia-nextjs-startkit-acquia-cms).

Additional Resources
--------------------

*   [Next.js on Acquia: Next.js startkit for Acquia CMS](/tutorial/nextjs-acquia-nextjs-startkit-acquia-cms)
*   [Next.js on Acquia: Customizing content types](/tutorial/nextjs-acquia-customizing-content-types)
*   [Acquia CMS on Github](https://github.com/acquia/acquia_cms)
*   [Next.js for Acquia CMS starter kit](https://github.com/acquia/next-acms)
*   [Acquia CMS Headless Documentation](/node/56700)