Set Up AEM Dispatcher on Local

Mayur Satav
3 min readJul 10, 2024

--

Setting up a local dispatcher environment is essential for testing and development. This guide will walk you through the process step-by-step.

1. Setup AEM Author and Publisher Instances

Ensure you have both AEM Author and Publisher instances set up and running. You can download the AEM Quickstart jar from Adobe and start the instances by running the jar file with the appropriate run modes. visit

2. Update the localhost in Your /etc/hosts File

Open your /etc/hosts file and add the following entry to map localhost to your desired hostname:

127.0.0.1    www.mysite.com

3. Install Docker

Download and install Docker from Docker’s official website. Follow the installation instructions for your operating system.

or

Use brew

brew install --cask docker

4. Download Dispatcher Tools

  1. Download the Dispatcher SDK for your operating system from Adobe’s software distribution site.

5. Extract Dispatcher SDK

Download the appropriate Dispatcher SDK for your operating system from Adobe’s software distribution site. If you are using macOS, extract the aem-sdk-dispatcher-tools-x.x.xxx-unix.sh file.

For Windows, extract the aem-sdk-dispatcher-tools-x.x.xxx-windows.zip file.

6. Start Docker

Ensure Docker is running. You can do this by launching Docker Desktop and waiting for it to indicate that Docker is running.

7. Run the Dispatcher

Navigate to the extracted dispatcher folder. Open a terminal in that folder and run the following command:

For macOS:

$ ./bin/docker_run_hot_reload.sh <src-folder> <aem-publish-host>:<aem-publish-port> <dispatcher-port>

For Windows:

$ bin\docker_run <src-folder> <aem-publish-host>:<aem-publish-port> <dispatcher-port>

Parameters:

  • <src-folder>: The path to your project dispatcher src folder.
  • <aem-publish-host>: The host of your AEM publish instance (e.g., host.docker.internal).
  • <aem-publish-port>: The port of your AEM publish instance (e.g., 4503).
  • <dispatcher-port>: The port you want to run the dispatcher on (e.g., 8080).

Example

./bin/docker_run_hot_reload.sh /Users/username/Desktop/myproject/mysite/src host.docker.internal:4503 8080

This command will start the dispatcher on port 8080.

8.Validate Your Dispatcher

You can validate your dispatcher setup by running the following command:

./bin/validate.sh ./src

This will ensure your dispatcher configuration is correct.

Conclusion

By following these steps, you should have a local dispatcher environment up and running, allowing you to test and validate your AEM setup efficiently. If you encounter any issues, refer to the official Adobe documentation or reach out to the community for support.

Happy developing!

--

--

Mayur Satav

Hello! welcome to my homepage! My name is Mayur Satav and I am a Senior Developer. I am an accomplished coder and programmer. Visit www.mayursatav.in