AMPS on Apple Silicon: Running a Development Instance

Apple ARM chips (M-series) are getting increasingly popular among developers, and that includes people that work with AMPS. While all the AMPS client libraries have full support of MacOS (both x86_64 and aarm64), AMPS Server is a Linux x86_64 software, so it cannot run natively on Mac.

If you have no other option but to use your new M-series Mac to run an AMPS instance, we've assembled a quick guide on how to do it. Please keep in mind that this solution is not suitable for production or testing as its performance is not at all representative of a properly set up VM/Server hardware.

In order to run AMPS Server on Apple Silicon, we'll be using Docker with a container runtime provided by the Colima project. We'd assume that you have the HomeBrew package manager installed.

First, install Docker, if you haven't already: https://docs.docker.com/desktop/install/mac-install/

The next step is to install Colima:

brew install colima

This is available on GitHub at https://github.com/abiosoft/colima as well.

Now, start Colima with amd64 emulation:

colima start -f --cpu 4 --memory 16 --disk 50 --arch x86_64

Notice that this starts a very small system, and doesn't detach Colima so you can easily see what it's doing / restart it as needed.

Then, wait for Colima to start, which is a fairly long process.

Now we're ready for the Docker part. Obtain a Dockerfile from here: https://support.crankuptheamps.com/hc/en-us/articles/360047510833-How-do-I-run-AMPS-in-a-Docker-container-

This link points to another FAQ article that explains how to run AMPS in a Docker container -- it provides an example Dockerfile and also comes with a very basic AMPS configuration file -- feel free to modify it as needed.

Build the Docker image using the docker file:

docker build .

Start the image, mapping the ports you want to talk to:

docker run -p 8085:8085 -p 9007:9007 <image id> 

Ports typically include AMPS transports and the Admin API port.

That's it! You can now run AMPS server on a M-series Apple computer. For more information about using AMPS in a Docker container please refer to the corresponding FAQ article -- and as usual, if you still have questions, don't hesitate to reach out our support.

As mentioned above, testing in the 60East labs indicates that the above emulation can have significantly lower performance as compared to a virtual machine (in a hosting environment such as VMWare Workstation or VirtualBox) or a native operating system install on identical hardware. Any metrics from the above development environment may be misleading due to differences in Apple Silicon Docker performance.

Last updated