For professional versions of Windows see this article. Make sure to reboot afterwards!
For Windows 7/10 Home:
Download and install Windows Server 2003 Resource Kit Tools. Ignore any incompatibility warning during installation.
Open cmd or PowerShell as an administrator.
ntrights -u %USERNAME% +r SeLockMemoryPrivilege where %USERNAME% is the user that will be running the program.
Warning: Do not download ntrights.exe from any other site other than the offical Microsoft download page.
If you set up the user rights properly (see above), and your system has 4-8GB of RAM (50%+ use), there is a significant chance that there simply won’t be a large enough chunk of contiguous memory because Windows is fairly bad at mitigating memory fragmentation.
If that happens, disable all auto-starting applications and run the miner after a reboot.
Download and install this runtime package from Microsoft. Warning: Do NOT use “missing dll” sites - dll’s are exe files with another name, and it is a fairly safe bet that any dll on a shady site like that will be trojaned. Please download offical runtimes from Microsoft above.
On Linux you will need to configure large page support and increase your memlock limit (
Never put settings directly into
/etc/security/limits.conf as those are system defaults and can be replaced in upgrades, and custom settings in that file are deprecated in all distros since at least wheezy/trusty (has been illegal in RedHat based distros for longer than that), and will be even more deprecated with systemd (it no longer even reads sysctl.conf, ONLY sysctl.d files, for example - there is a link to the old
/etc/sysctl.conf for backward compatibility but that can go away at any time). Also adding to
/etc/rc.local is extra incorrect, systemd does not even use that file anymore (once the sysvinit compatibility layer is gone, rc.local will no longer work).
To check current settings, run
/sbin/sysctl vm.nr_hugepages ; ulimit -l as whatever user you will run
xmr-stak as (example shows bad/low sample defaults):
$ /sbin/sysctl vm.nr_hugepages ; ulimit -l vm.nr_hugepages = 0 16
To set large page support, add the following lines to
You WILL need to run
sudo sysctl --system for these settings to take effect on your system (or reboot). In some cases (many threads, very large CPU, etc) you may need more than 128 (try 256 if there are still complaints from thread inits)
To increase the memlock (ulimit -l), add following lines to
* - memlock 262144 root - memlock 262144
You WILL need to log out and log back in for these settings to take effect on your user (no need to reboot, just relogin in your session). Recheck after completing these steps to validate:
$ /sbin/sysctl vm.nr_hugepages ; ulimit -l vm.nr_hugepages = 128 262144
You can also do it Windows-style and simply run-as-root, but this is NOT recommended for security reasons. Also running as root does not properly get around the
ulimit -l being large enough (and limits
* does not apply to
root either, it must be specified explicitly).
This typically means you are trying to run it on a CPU that does not have AES. This only happens on older version of miner, new version gives better error message (but still wont’ work since your CPU doesn’t support the required instructions).
Some virus protection software flags the miner binary as malware. This is a false positive — the software does not contain any malware (and since it is open source, you can verify that yourself!) If your antivirus software flags xmr-stak, it will likely move it to its quarantine area. You may have to whitelist xmr-stak in your antivirus.
If the miner is compiled for Monero and Aeon than you can change
currencyin the config or
xmr-stak --helpto see all supported currencies and algorithms
Set the value
If your coin you want to mine is not listed please check the documentation of the coin and try to find out if
cryptonight-lite is the used algorithm.
Select one of these generic coin algorithms.
g++: internal compiler error: Killed (program cc1plus) is probably related to not enough RAM to compile. 1 Gb RAM should be enough (it is on clean Ubuntu 16.04).