Complete Step-by-Step Guide to Setting Up a Local AEM Environment

aem

This guide walks you through how to set up a full local AEM environment, including:

Author (4502) + Publish (4503) + Dispatcher (8080)


Goal Overview

ComponentLocationPort
AuthorYour local machine:4502
PublishYour local machine:4503
DispatcherLocal Apache Server:8080

1. Install Java & AEM SDK

A. Java 11

AEM requires Java 11 (not Java 17!).

bashCopyEditjava -version
# If Java 11 is not installed, install AdoptOpenJDK 11 or Temurin 11

B. AEM SDK (Author & Publish .jar)

Download from Adobe (requires partner or enterprise access).
Typical file names:

  • aem-sdk-quickstart-author-p4502.jar
  • aem-sdk-quickstart-publish-p4503.jar

Place the files into two separate folders:

bashCopyEdit/aem-dev/
├── author/
│   └── aem-author-p4502.jar
├── publish/
│   └── aem-publish-p4503.jar

C. Start the Instances for the First Time

bashCopyEdit# Start Author
cd author
java -jar aem-author-p4502.jar

# Start Publish
cd ../publish
java -jar aem-publish-p4503.jar

On first run, it will unzip crx-quickstart and initialize the repository.


2. Change Default Password (admin / admin)

Access:

  • Author: http://localhost:4502
  • Publish: http://localhost:4503

→ Make sure to change the password to avoid security warnings.


3. Setup Dispatcher (Apache HTTP + Dispatcher Module)

A. Install Apache HTTP Server (if not already)

  • Mac: brew install httpd
  • Linux: sudo apt install apache2
  • Windows: Use WAMP/XAMPP or Docker (recommended)

B. Copy dispatcher-sdk Folder from AEM SDK Zip

Inside the AEM SDK provided by Adobe, you’ll find:

cssCopyEditdispatcher-sdk/
├── src/
│   ├── conf.d/
│   ├── conf.dispatcher.d/

Copy the entire dispatcher-sdk/ folder to use as your local workspace.

C. Run Dispatcher via Docker (Recommended)

Adobe supports running Dispatcher in Docker for easier setup:

bashCopyEditcd dispatcher-sdk
docker-compose up

→ Apache will be available at http://localhost:8080 by default.


4. Configure dispatcher.any

Edit the file: dispatcher-sdk/src/conf.dispatcher.d/dispatcher.any

apacheCopyEdit/renders {
  /0001 {
    /hostname "localhost"
    /port "4503"
  }
}

→ This forwards requests from Dispatcher to the local AEM Publish instance.


5. Verify the Setup

URLFunction
http://localhost:4502AEM Author UI
http://localhost:4503AEM Publish UI
http://localhost:8080/content/...Dispatcher proxy to Publish

  • To enable auto-caching: Define rules under the /cache section
  • To expose APIs (Servlets): Configure the /filter allow list
  • To debug Dispatcher: Check logs at dispatcher-sdk/logs/

Summary

TaskAction Command/Note
Run AEM Authorjava -jar aem-author-p4502.jar
Run AEM Publishjava -jar aem-publish-p4503.jar
Setup Dispatcher (8080)Use SDK + Docker or Apache HTTP server locally
Configure Dispatcher TargetEdit dispatcher.any for hostname + port
Test AccessVisit http://localhost:8080/content/wknd.html

Leave a Reply

Your email address will not be published. Required fields are marked *