Making your software open source probably quite heavily depends on how much of an ideologue you are. That is, if you don’t have a solid business model behind doing so. Many big corpo projects like Facebook’s React are open source as a way to get free work from other developers, and developers are happy to do so because they like using React.
As others have said, offering your software in its entirety as self hosted if its a cloud option, and then just be the best and most authoritative source for hosting it if people don’t want to go through the self-hosted hassle.
Other reasons may include being a personal project that you want help with, similar to the previously mentioned React model.
Some may do so as a “giving back” model. Many coders know their success wouldnt have happened without open source. They enjoy coding, dont need the money and viola.
Another incentive is perhaps you have an employer or client who is paying you for work. If you have a strong negotiating position, you can make your contract stipulate that some or all code be made open source.
Thank you for this input
reply