native-executables.md
February 13, 2026 · View on GitHub
Running Native Executables
RESTHeart is available as native executables for multiple platforms. These binaries offer faster startup and lower memory usage compared to the Java version.
Download
Native executables are available in the project releases:
restheart-darwin-amd64- For Intel-based Macsrestheart-darwin-arm64- For Apple Silicon Macs (M1/M2/M3)restheart-linux-amd64- For 64-bit Linux systemsrestheart-windows-amd64.exe- For 64-bit Windows systems
Platform-Specific Instructions
macOS (both Intel and Apple Silicon)
-
Download the appropriate file for your system:
- Intel Mac:
restheart-darwin-amd64 - Apple Silicon Mac:
restheart-darwin-arm64
- Intel Mac:
-
Open Terminal and navigate to the download location:
cd /path/to/download/folder -
Make the file executable:
chmod +x restheart-darwin-amd64 # or restheart-darwin-arm64 -
Run the executable:
./restheart-darwin-amd64 # or ./restheart-darwin-arm64
⚠️ Note about macOS Security: The first time you run the executable, macOS might show a security warning stating "Apple cannot check app for malicious software". You have two options:
-
Option 1: Right-click (or Control+click) on the file in Finder and select "Open". When prompted, click "Open" again.
-
Option 2: Remove the quarantine attribute using Terminal:
xattr -d com.apple.quarantine restheart-darwin-amd64 # or restheart-darwin-arm64
This will allow you to run the application without security warnings.
Linux
-
Download the Linux executable:
wget https://github.com/SoftInstigate/restheart/releases/download/latest/restheart-linux-amd64 -
Make it executable:
chmod +x restheart-linux-amd64 -
Run the executable:
./restheart-linux-amd64
Windows
-
Download the Windows executable (
restheart-windows-amd64.exe). -
Open Command Prompt or PowerShell and navigate to the download location:
cd C:\path\to\download\folder -
Run the executable:
restheart-windows-amd64.exe
⚠️ Note about Windows Security: If Windows SmartScreen blocks the execution, you can click "More info" and then "Run anyway" if you trust the source.
Configuration
The native executables use the same configuration approach as the Java version.
Common Command-Line Options
The native executables support the same command-line options as the Java version:
# Start with a specific config file
./restheart-[platform] /path/to/config.yml
# Override configuration properties
./restheart-[platform] --mongo-uri=mongodb://localhost
# Get help
./restheart-[platform] --help
Installing as a Service
⚠️ Note: these configurations are provided as examples you need to check and adapt by yourself.
Linux (systemd)
-
Create a systemd service file:
sudo nano /etc/systemd/system/restheart.service -
Add the following content (adjust paths as needed):
[Unit] Description=RESTHeart MongoDB REST API After=network.target [Service] Type=simple User=restheart ExecStart=/opt/restheart/restheart-linux-amd64 /opt/restheart/etc/restheart.yml Restart=on-failure [Install] WantedBy=multi-user.target -
Enable and start the service:
sudo systemctl enable restheart sudo systemctl start restheart
macOS (launchd)
-
Create a launch daemon plist file:
sudo nano /Library/LaunchDaemons/com.softinstigate.restheart.plist -
Add the following content (adjust paths as needed):
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>com.softinstigate.restheart</string> <key>ProgramArguments</key> <array> <string>/opt/restheart/restheart-darwin-amd64</string> <string>/opt/restheart/etc/restheart.yml</string> </array> <key>RunAtLoad</key> <true/> <key>KeepAlive</key> <true/> </dict> </plist> -
Load the service:
sudo launchctl load /Library/LaunchDaemons/com.softinstigate.restheart.plist
Windows (as a service)
-
Open Command Prompt as Administrator and run:
nssm install RESTHeart -
In the GUI that appears:
- Set the "Path" to the location of your executable
- Set "Startup directory" to the folder containing the executable
- Add any arguments (e.g., path to config file)
- Configure other options as needed
- Click "Install service"
-
Start the service:
net start RESTHeart