TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Software licensing excluding military use?

59 pointsby atroynalmost 8 years ago
I have a piece of software in the robotics &#x2F; computer vision domain I&#x27;ll be open sourcing soon. I want to prevent any military from legally using it (I know that if they find it useful, they&#x27;ll just use it anyway - that&#x27;s not the point).<p>Does anyone know of a well behaved license that has this feature?<p>EDIT: I understand that restricting usage would make this not &#x27;free as in speech&#x27; software, however I don&#x27;t really mind.<p>Further clarification: I mean use by a military organisation for any purpose. If it makes it (somehow) into accounting software used for running military procurement&#x2F;payroll or medical devices used in a military hospital, I also want that to be against the license.

24 comments

tiffanyhalmost 8 years ago
What does &quot;military use&quot; even mean?<p>E.g. Armies operate hospitals for it wounded soldiers. Can your software be used in an army hospital?<p>E.g. What happens if private company ABC Inc. Is using your software, and then they are contracted by the military to perform work - is that allowed? You say you &quot;want to prevent any military from legally using it&quot; - who&#x27;s using your software in this situation ... the military or private company ABC?<p>EDIT: and even if you figure out the exact language to restrict military use, how do you enforce it and what are the consequences of breaking it?<p>EDIT2: Linked below is an example to restrict military use. Note though, it&#x27;s so broad reaching that it might scare away even non-military organizations for using your software. And it still doesn&#x27;t address how you enforce such license. So there&#x27;s lots of questions about the applicable of this example license. <a href="http:&#x2F;&#x2F;web.cs.ucdavis.edu&#x2F;~rogaway&#x2F;ocb&#x2F;license2.pdf" rel="nofollow">http:&#x2F;&#x2F;web.cs.ucdavis.edu&#x2F;~rogaway&#x2F;ocb&#x2F;license2.pdf</a><p>EDIT3: the problem you are going to have is that you&#x27;re breaking a fundamental principle of open source software. And that is that <i>anyone</i> can use your software so long as they do so based on your stipulations. What you want to do is restrict <i>who</i> can even use your software. Read the FAQ for &quot;what is open source software&quot;. <a href="https:&#x2F;&#x2F;opensource.org&#x2F;faq" rel="nofollow">https:&#x2F;&#x2F;opensource.org&#x2F;faq</a>
评论 #14864495 未加载
评论 #14864760 未加载
Freak_NLalmost 8 years ago
Proprietary licences give you the most control. You as the licence holder would simply refuse to grant a licence to any party involved in matters you do not condone. You could add an EULA that explicitly states this, and have legal staff at hand to follow up on any misuse. This is a costly option though.<p>Free software licences are not an option. Forbidding specific use of your software goes against the intent of the commonly accepted free software licences — you would run afoul of freedom 0:<p>&gt; The freedom to run the program as you wish, for any purpose¹<p>There probably exist other open source (but not free software) licences that do limit the audience, but you probably won&#x27;t be able to enforce them, and they tend not to be taken seriously. You would on the other hand frustrate users outside of the military who want to legally use your software in ways normally permitted by free software licences — e.g., by reusing parts of it, forking it, combining it with other free software, etc.<p>Lastly, the absolute sure-fire way of preventing any military use of your software is not releasing it at all.<p>I don&#x27;t think it&#x27;s worth the hassle to add such a clause. If the point is not to actually prevent its use, but to make a statement, then make a statement on the project&#x27;s homepage and in the documentation. It will have the same effect without resorting to weird software licences, and you can choose a well-known free software or merely open source licence.<p>1: <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;The_Free_Software_Definition" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;The_Free_Software_Definition</a>
评论 #14864409 未加载
SonOfLilitalmost 8 years ago
David Crockford puts a &quot;don&#x27;t use this for evil&quot; clause in the license for all software he releases, creating some interesting situations: <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=-hCimLnIsDA" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=-hCimLnIsDA</a> (2:44 and worth it)
评论 #14864554 未加载
评论 #14864371 未加载
venningalmost 8 years ago
As a former DoD contractor and someone who has spent the majority of his life around the US military [1], I have three points:<p>1) The majority of the DoD struggles to get <i>permission</i> to use open source software. There are plenty of developers, DBAs, and IT technicians who would love to use some piece of software that they are not allowed to use specifically <i>because</i> it is open source. I once spent 11 months trying to get approval to use a single Google-produced library. I was unsuccessful.<p>2) Related to the above, agencies responsible for approving software for use are <i>very</i> concerned with licensing issues. After all, they are used to negotiating licensing terms for multi-million dollar contracts. The fact that OSS essentially guarantees that you have no one to call [2] when you have an issue (for the entire lifespan of the project) is a large part of why they will not approve OSS. Beyond that, compliance is a real concern. Popular opinion may be of heartless assholes, but these are real people working jobs. I would not be so cavalier in saying &quot;they&#x27;ll just use it anyway&quot;.<p>3) I am always disappointed, though never surprised, when people assume that the military works solely to execute war. I was specifically contracted to a (large) part of the military that works on exactly the kind of thing that prevents and reduces violence (sorry to be vague). The kind of domain that would probably translate improved computer vision into saving lives (domestic, foreign, combatant, and civilian). That is, if they could get approval.<p>[1] I have no idea how other countries&#x27; militaries operate.<p>[2] Literally call. On a phone.
评论 #14864762 未加载
Flimmalmost 8 years ago
If you do find or use such a license, it&#x27;s definitely not open source. According to the OSI, the only authority on what constitutes open source, open source license must not discriminate against fields of endeavour:<p>&gt; 6. No Discrimination Against Fields of Endeavor<p>&gt; The license must not restrict anyone from making use of the program in a specific field of endeavor. For example, it may not restrict the program from being used in a business, or from being used for genetic research.<p>See the open source definition: <a href="https:&#x2F;&#x2F;opensource.org&#x2F;osd" rel="nofollow">https:&#x2F;&#x2F;opensource.org&#x2F;osd</a><p>I would encourage you to use a normal open source license, like MIT, and to not worry about trying to control who uses the software for what.
评论 #14864349 未加载
评论 #14864367 未加载
Kosticalmost 8 years ago
You can&#x27;t discriminate against any fields of endeavor[0] if you wish for your software to be under any OSI approved open source license.<p>[0] <a href="https:&#x2F;&#x2F;opensource.org&#x2F;osd-annotated" rel="nofollow">https:&#x2F;&#x2F;opensource.org&#x2F;osd-annotated</a>
评论 #14885317 未加载
评论 #14864297 未加载
cvshalmost 8 years ago
&gt;I want to prevent any military from legally using it (I know that if they find it useful, they&#x27;ll just use it anyway - that&#x27;s not the point).<p>So... you don&#x27;t <i>actually</i> want to prevent any military from using it, you just want to virtue-signal?<p>I&#x27;m not even being sarcastic here; this distinction is pretty important to the license you choose and how you enforce it.
评论 #14864668 未加载
评论 #14864670 未加载
评论 #14864671 未加载
评论 #14864669 未加载
1001101almost 8 years ago
PETA helped develop the Harm-Less Permissive License (HPL) which I have used in the past. You may have to dig for it. It explicitly prohibits causing harm to humans and animals, which may serve your purposes. You may also want to think about prohibiting surveillance as well. Good luck!<p>Edit: found it!: <a href="https:&#x2F;&#x2F;4zm.org&#x2F;files&#x2F;2010&#x2F;HPL&#x2F;index.html" rel="nofollow">https:&#x2F;&#x2F;4zm.org&#x2F;files&#x2F;2010&#x2F;HPL&#x2F;index.html</a>
评论 #14864591 未加载
dsr_almost 8 years ago
No. However, there&#x27;s nothing preventing you from taking the BSD license and adding a fourth clause:<p>4. This software cannot be used for military purposes under this license. You must negotiate for a license from the original author, AUTHOR NAME.
评论 #14864439 未加载
评论 #14864300 未加载
bjpbakkeralmost 8 years ago
Some projects have added a &quot;no military use&quot; clause to the GPL [1] to do this.<p><a href="https:&#x2F;&#x2F;www.linux.com&#x2F;news&#x2F;open-source-project-adds-no-military-use-clause-gpl" rel="nofollow">https:&#x2F;&#x2F;www.linux.com&#x2F;news&#x2F;open-source-project-adds-no-milit...</a>
评论 #14864487 未加载
评论 #14864596 未加载
wolfgkealmost 8 years ago
There are lots problem with this kind of terms:<p>- What kind of use is to considered military? Dual use goods? Software running on some computer in a military department that is used for &quot;civil purposes&quot; (think of some accounting software in the accounting department)? Projects that are also financed by some military pot of money (lots of civil research e.g. in the USA is financed by DARPA)? Consider that the precursor of the internet (ARPAnet) belongs to this category. Civil defense systems that are not owned&#x2F;built by the military but by private security companies?<p>- If OSS people would tolerate such a restriction, the next people will come and also want to add restrictions to the usage of their software. At the beginning these will even serve noble purposes, but the time will come when people will use this kind of restructions to build their political agenda, such as<p>* must not be used for military purposes<p>* must not be used for animal experiments<p>* must not be used to produce hate speech<p>* must not be used for misogynistic purposes<p>* must not be used for homophobic purposes<p>* must only used by white people<p>* must not be used on Intel processors<p>* must only be used on RISC-V processors<p>* must only be used by citizens of democratic states<p>* only for noncommercial purposes<p>* only for research purposes<p>etc. So it is accepted practise in FOSS communities not to consider usage restrictions as acceptable.
评论 #14864490 未加载
matt_morganalmost 8 years ago
StackExchange discussion of the more general case: <a href="https:&#x2F;&#x2F;softwareengineering.stackexchange.com&#x2F;questions&#x2F;319308&#x2F;software-license-which-discriminates-on-ethical-grounds" rel="nofollow">https:&#x2F;&#x2F;softwareengineering.stackexchange.com&#x2F;questions&#x2F;3193...</a><p>Interesting related historical item (java used to disallow usage in nuclear power facilities): <a href="https:&#x2F;&#x2F;www.quora.com&#x2F;The-license-agreement-of-Java-says-You-can%E2%80%99t-use-Java-to-run-a-nuclear-power-plant-Why-do-you-think-SUN-cared-to-incorporate-this-point" rel="nofollow">https:&#x2F;&#x2F;www.quora.com&#x2F;The-license-agreement-of-Java-says-You...</a><p>Neither really addresses an important point made by user venning here--that simply writing any license that makes it more complicated for someone to get approval to use your software will actually work, in cases where the &quot;someone&quot; is part of an organized operation that generally operates according to standard processes. But RMS (paraphrased and linked in the SE article) has thoughts on how that may not apply in many states.
viennoalmost 8 years ago
Similar question here: <a href="https:&#x2F;&#x2F;softwareengineering.stackexchange.com&#x2F;questions&#x2F;199055&#x2F;open-source-licenses-that-explicitly-prohibit-military-applications" rel="nofollow">https:&#x2F;&#x2F;softwareengineering.stackexchange.com&#x2F;questions&#x2F;1990...</a>
4adalmost 8 years ago
Be careful, some people like the FSF and Debian won&#x27;t like it:<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=4762035" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=4762035</a><p><a href="https:&#x2F;&#x2F;wiki.debian.org&#x2F;qa.debian.org&#x2F;jsonevil" rel="nofollow">https:&#x2F;&#x2F;wiki.debian.org&#x2F;qa.debian.org&#x2F;jsonevil</a><p>Personally, I applaud it and I would live with these consequences, but be aware of these consequences.
binarymaxalmost 8 years ago
I used to! Please see my old comment here: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=5506623#5507187" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=5506623#5507187</a><p>I took the repo down shortly after, and can&#x27;t seem to find the original :(<p>I&#x27;ll keep looking...
jrimbaultalmost 8 years ago
While I <i>&quot;like&quot;</i> the idea, I think it&#x27;s a lot like DRM.<p>It will prevent law abiding persons (natural&#x2F;legal) to use your software and make their experience with it worse, while not blocking anyone who&#x27;d really want to use it.
jankotekalmost 8 years ago
Some old software had BSD license with clause &#x27;do not use for evil&#x27;. It was useless for corporate use. &#x27;Evil&#x27; has different meaning for each individual and is impossible to define.
评论 #14864316 未加载
评论 #14864312 未加载
ameliusalmost 8 years ago
I have the same problem, but I want to exclude its use in the domains of advertisement and user tracking, as well as military.
arethuzaalmost 8 years ago
What if military organizations are doing something that isn&#x27;t really &quot;military&quot; in the normal sense?<p>e.g. The RAF used to run search and rescue helicopters in the UK until a couple of years ago - my wife was rescued by them after a climbing accident in Glencoe.
评论 #14864363 未加载
throwaway927890almost 8 years ago
Probably you can get some inspiration here: <a href="http:&#x2F;&#x2F;web.cs.ucdavis.edu&#x2F;~rogaway&#x2F;ocb&#x2F;license.htm" rel="nofollow">http:&#x2F;&#x2F;web.cs.ucdavis.edu&#x2F;~rogaway&#x2F;ocb&#x2F;license.htm</a>
dannyftalmost 8 years ago
Check the licens for JSLint<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;JSLint#License" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;JSLint#License</a>
cmcgintyalmost 8 years ago
You mean like this <a href="http:&#x2F;&#x2F;mindprod.com&#x2F;contact&#x2F;nonmil.html" rel="nofollow">http:&#x2F;&#x2F;mindprod.com&#x2F;contact&#x2F;nonmil.html</a>
cyborgx7almost 8 years ago
I&#x27;m seeing a lot of people throwing around &quot;definitions&quot; and &quot;authorities&quot; of what constitutes free or open source software in here. I disagree with them. You are ethically in the right to want to keep your work from being used in such a way. I don&#x27;t know of any licence that as this provision in a legally enforceable way, but I hope you find it. I really like the thought,
评论 #14864443 未加载
sebastianconcptalmost 8 years ago
Not doable. Not for the ones protecting your country much much less for the ones planning an attack to it.
评论 #14885320 未加载