Introducing the “OpenEMR Static Binary Forge”: GitHub - Jmevorach/openemr-static-binary-forge: Tools to build self-contained OpenEMR static binaries.
I was able to turn OpenEMR into a binary I can run on Apple Silicon (specifically an M5 but should work on any Apple Silicon). I don’t have access to an Intel based Mac but if I did I should hypothetically be able to produce an Intel Mac build.
The process produces two binaries and a PHAR file. One is the PHP CLI which we use to extract the PHAR file at runtime (so we can serve static files) and the other is a binary containing OpenEMR and the PHP interpreter compiled with the extensions needed to run OpenEMR.
The total compiled contents should be <710 MB (and there should be lots of room to greatly reduce the file size of these contents in future iterations)
To build your own static binary of OpenEMR that runs on Apple Silicon …
./mac_os/build-macos.sh
Afterwards, to serve OpenEMR using the PHP development web server (note: this is purely for demonstration purposes and something else like a well configured Apache web-server should be used in production) that’s also bundled into the binary with OpenEMR:
./mac_os/run-web-server.sh 8080
Then navigate to localhost:8080 and you’ll see …
The next thing I’m planning to investigate is using Docker to make amd64 and arm64 builds. Would gladly welcome anyone who wanted to work with me on this and/or PRs to the repo!

