Skip to content

Instantly share code, notes, and snippets.

@cjus
Last active May 12, 2025 02:27
Show Gist options
  • Save cjus/bf6ddd360b695a043cb7a4e476cf6e1f to your computer and use it in GitHub Desktop.
Save cjus/bf6ddd360b695a043cb7a4e476cf6e1f to your computer and use it in GitHub Desktop.
Running multiple Moose projects

The Moose CLI is designed to run a single instance of the Moose stack locally. Running multiple Moose projects simultaneously on the same machine leads to port conflicts, as each instance tries to bind to the same default ports. This issue doesn’t arise when using separate machines, virtual machines, or container orchestrators like Docker, Kubernetes, Amazon ECS, or EKS.

However, with a few adjustments, you can run multiple Moose projects locally—and even enable them to communicate with each other if needed.

Each project includes a moose.config.toml file, which defines port mappings for the Moose stack’s services. To avoid conflicts, simply modify these port assignments for each project instance.

For example, suppose the default config includes:

[http_server_config]
host = "localhost"
port = 4000
management_port = 5000

If you duplicate a Moose project into another folder, update its config to use a different port range—say, increment each port by 100:

[http_server_config]
host = "localhost"
port = 4100
management_port = 5100

Repeat this process for each additional project to ensure all ports are unique.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment