Elm website licensing


I’m looking for directions on how to license a website written in Elm. I have written a website for my employer and I would like it to be open-sourced. I want to do my research and present a plan to my bosses on how we can do this.

Will I have to look at each of the individual licenses in my node_modules folder and in my elm.json deps?


hello Ananth! That sounds like an interesting project.

As far as I understand, in my capacity as a non-lawyer who cannot offer official legal advice, your path forward looks like this:

1. Make sure you are compliant with the licenses of your dependencies

If you have already published your app, but are not sure about this, get the license text for each dependency to your employer’s legal counsel and ask for their opinion. This is something you should do regardless of the decision to open-source.

One uncommon, but tricky situation: if any of your dependencies are licensed under the GPL then you are required to open-source your code or discontinue use of the dependency. This is uncommon in both the JavaScript and Elm ecosystems, so it probably doesn’t affect you (and is a bit of an oversimplification—ask your counsel), but it’s worth being aware of.

2. Decide why you want to publish your code

Most employers will not see open-sourcing projects for which they paid as intrinsically good. You will need convince them why open-sourcing this project at all is good for them before you pick a license. The specific license matters much, much less than this act of convincing.

One common argument, which I generally agree with, is that publishing open-source code will raise the company’s profile for the purposes of recruitment. People will be able to see what kind of work you do, and that you’re willing to open source it. It may follow that their code written for you will be open-sourced, which can be nice to put on a future resume. If you think that your code is high-quality enough as it is, and would only need to add license text and turn it public on Github, this is a nice way in.

I also see a common argument that I do not agree with: that any open-source code will benefit from community bug fixes and features. This is only true if people have both the skills and motivation to improve your code, or if you create that motivation (say, by hiring them or by cultivating an enthusiastic community around your product—a full-time job.) You may see this if you open-source a library, but it probably will not happen for a website.

3. Decide on a license for the code you wrote

Github has a guide on choosing a license at https://choosealicense.com/. Ask your counsel about their preferences for licensing; you can go through that site together and have a discussion after you convince them that open-source is a good idea here.

The Elm community commonly uses the BSD 3-clause license (the three clauses being that redistributions in source and binary forms must retain the license, the author(s) names cannot be used as an endorsement of derivatives, and that the software comes without a warranty and with a waiver of liability.)

Best of luck!


For information, here is the list of licenses currently used in Elm packages (all versions):

License %
BSD-3-Clause 67.17%
MIT 26.11%
Apache-2.0 3.12%
MPL-2.0 1.83%
BSD-2-Clause 1.02%
GPL-3.0 0.43%
ISC 0.24%
AGPL-3.0 0.03%
LGPL-3.0 0.01%

And here is the current list of packages using *GPL licenses (Elm 0.19 and 0.18 only, based on the information provided in the json file):

Elm 0.19

Package License
sh4r3m4n/elm-piano GPL-3.0
tad-lispy/springs GPL-3.0
lattyware/elm-fontawesome GPL-3.0 *
Kurren123/k-dropdown-container GPL-3.0
Bastes/the-validator AGPL-3.0

* lattyware/elm-fontawesome 2.3.0 is now MIT

Elm 0.18

Package License
sh4r3m4n/elm-piano GPL-3.0
billstclair/elm-recovered-utf8 LGPL-3.0
ryanolsonx/elm-time-range GPL-3.0
xarvh/elm-styled-html GPL-3.0
valberg/elm-django-channels GPL-3.0
Bastes/the-validator GPL-3.0
lovasoa/elm-median GPL-3.0

Also some tools may help gathering the licenses, for example (I haven’t used them yet, but I should):

Not sure if there is one for Elm yet, if not it would be a valuable contribution…

1 Like

Also not a lawyer but…

If I understand it correctly, it is only AGPL packages that you could not use without open sourcing your web project. GPL only kicks in if you distribute your application to a third party, like say someone installing Linux on their computer - but deploying the binary to a server over the web doesn’t count. AGPL was conceived to cover that scenario too.

Was discussed here:


This is true for code running on the server. I doubt it is for JavaScript code distributed to the user browser, which is the case for elm packages, except if they are used only on the server in nodejs. Not a lawyer though either.


You may well be correct:


I did say it was an oversimplification :wink:

1 Like

I just want to add that this is quite an enterprise and author centric view of open source.

Nothing wrong with that, but what started this movement was an ethical initiative, specifically free software, which refers to four core freedoms:

  • the freedom to run the software
  • the freedom to study and modify the software
  • the freedom to redistribute the software,
  • and the freedom to distribute your modifications

I naively hope that some people and even some companies may want to open source some software to give these freedoms to users, even before considering the benefits to them. That said it’s true that it matters more for some software (for example compilers) than for others (maybe a non-reusable news website).

Anyway, to each its own, and opensource.com has a quite comprehensive list of motivations to use open source: https://opensource.com/life/15/12/why-open-source.

Lastly David A. Wheeler wrote a much more comprehensive answer in 2002, revised in 2015.

1 Like

This discussion seems a bit upside down to me :upside_down_face: It seems pretty weird that an open-source package license would cause issues with open-sourcing your software! It’s rather that according to a few licenses, you could be in violation if you did NOT publish your code.

Obviously if you’ve purchased some proprietary license you can’t publish that code, but you know that already.

1 Like

Thanks for the detailed response. My employers are receptive to the idea of open-sourcing. Although they are driven more by the recognition they stand to gain. I am fine with this as long as I still get to contribute the open source community. Lots to think about here.

1 Like

I just updated the elm-fontawesome package, and it’s MIT licensed now.

To be clear, there are two licenses at play, the package is generated code. It used to be listed as GPL because I hadn’t thought about the distinction between the generation code and the generated code.

The code generation is done by GPL-3.0 licensed code, but the resulting generated code does not inherit that license - I’ve changed the license there to be MIT (the same as the FontAwesome javascript library the code is generated from) to make this more clear.

closed #13

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.