Often, when people think of FOSS (Free and Open Source Software), they don't consider that it can bring monetary benefits. It is a prevailing myth that open source software is not compatible with a successful business model. This is part of the reason why open source tends to remain a hobby for most people and never develops into a "profession".
A Small Talk on FOSS
The core of this misunderstanding is the word "Free". FOSS need not be free of cost. "Free" refers to the software giving users certain rights and freedoms. I'll borrow text for the four essential freedoms from the GNU website.
- The freedom to run the program as you wish, for any purpose (freedom 0).
- The freedom to study how the program works, and change it so it does your computing as you wish (freedom 1). Access to the source code is a precondition for this.
- The freedom to redistribute copies so you can help others (freedom 2).
- The freedom to distribute copies of your modified versions to others (freedom 3). By doing this you can give the whole community a chance to benefit from your changes. Access to the source code is a precondition for this.
These never mention that the program needs to be provided free of cost to users. Software that is free of cost is better referred to as "gratis", which does not contain any ambiguity as to the word "free". Often, FOSS users or devs will refer to "free" as "libre" to avoid misunderstanding.
Why will users pay for code that is open source?
You are not selling your code. You are selling a product, that is not your code. What can you sell? A compiled binary of your code, or hassle-free deployment services for your application. You can sell server services for your application. Users will pay for the service you provide. I'll list some examples that I like.
- Threema is an instant messenger like WhatsApp, that is built around security and privacy. All their tools are open source and can be freely accessed on GitHub. They offer their application for a one time charge of approx 4.5USD. They also have communication solutions for businesses and educational institutes. Their licence for educational institutes costs 10.10USD, which is quite affordable considering that it's a lifetime license. If you want, you can also self-host Threema on your server using Nginx.
- Ardour is a professional digital audio workstation. The developers constantly push out new features and they have an active community. Their code is open source, however, the binary can be aquired on a pay what you want model.1 You can get all features at as low as 1USD per month. The project also accepts donations to fund itself.
- FastHub is a feature-packed unofficial GitHub client for Android. A basic version of the app is free to download. For extra features and themes, you need to pay a one time charge for a license. These license charges keep the project running. If you want, you can manually build the app from source.
- Matrix is a Discord like communication, but the protocol is open source and federated. It is an open standard for interoperable, decentralised, real-time communication over IP. The application is free to deploy on your VPS or elsewhere. The creators of Matrix provide a Matrix hosting service called Element that helps them fund the project.
- Linux is certainly the software that has maximum influence on the services we use. It powers most of the servers and many supercomputers. The Linux Foundation offers courses, among which the advanced ones are paid.
You can find many more examples where open source software helps earn money. As you saw, this profit need not necessarily come from selling the software itself. You can sell services that are built around your software.
One insecurity around open sourcing software that often comes up is the possible competition you face from forks. Take the example of FastHub I listed above. A user forked that repository and created a version with all pro features enabled by default. He then posted it on F-Droid. The upstream developer was not happy with that move.
Your open-source application faces a constant threat from forks. These forks may not be as simple as just enabling some locked settings. Forks can add new features and create their own identity. Since the code is open to all, you need to create your identity around the services you provide. Large open source organizations often have good support channels for customers that help them stay in demand.
Is it viable?
Both yes and no. This depends on the scale of your application and the number of users. Do you receive enough donations? Do your services get enough users?
A new project does not start generating revenue from day one. You keep working on it, and somewhere down the line, you get contributors and happy users who willingly donate to keep your project alive. When you feel you have enough users, you can think about making that initial investment to launch your paid services around your software.
Selling FOSS or FOSS related services is a win-win for users and developers. Users will be paying for software that they trust and like. The developers can continue to develop ethical software and keep the community alive. The market will get aligned with ethics and that's in favour of all of us. Creating an atmosphere where users pay for FOSS can heavily incentivise ethical software.
1. Since Ardour is open source, you will find binaries available in repositories of Linux distros. While that is available for free and it is totally legal to do so, it is recommended to donate to the project as a means of supporting development.