This is an old revision of the document!

Python KMS Server

The Windows KMS server has really annoying limits in which you have to have a minimum number of clients. For small networks, this is irritating since you have to run a bunch of otherwise-unnecessary systems to keep the KMS server happy. (or, in our case, the activation can randomly stop working if we have systems which are used very rarely.)

Anyway, someone has reverse-engineered the KMS server and written a clone in Python. This can be easily run under Linux, which is much easier to maintain and doesn't have these stupid limitations. While this could theoretically allow piracy, we do have a legal license for the copies of Windows being used.

  • Minimal install of Debian Jessie
  • aptitude install python git
  • cd /opt
    git clone
  • echo 'kms:x:501:65534::/nonexistent:/bin/false' >> /etc/passwd
    echo 'kms:*:16342:0:99999:7:::' >> /etc/shadow
  • echo '[Unit]' > /etc/systemd/system/py-kms.service
    echo 'Description=Python KMS Server' >> /etc/systemd/system/py-kms.service
    echo >> /etc/systemd/system/py-kms.service
    echo '[Service]' >> /etc/systemd/system/py-kms.service
    echo 'ExecStart=/usr/bin/python /opt/py-kms/' >> /etc/systemd/system/py-kms.service
    echo 'User=kms' >> /etc/systemd/system/py-kms.service
    echo 'Restart=always' >> /etc/systemd/system/py-kms.service
    echo 'RestartSec=1' >> /etc/systemd/system/py-kms.service
    echo >> /etc/systemd/system/py-kms.service
    echo '[Install]' >> /etc/systemd/system/py-kms.service
    echo '' >> /etc/systemd/system/py-kms.service
    systemctl enable py-kms.service
    systemctl start py-kms.service

See also:

Adding UUID's for Windows 10 and Office 2016:

computer/python_kms_server.1451783070.txt.gz · Last modified: 2016/01/02 19:04 by tdobes
Recent changes RSS feed Driven by DokuWiki Valid XHTML 1.0 Valid CSS