Q: Do you use open source programs, does the licensing agreement let you sell the website or the programs or both?
A: Yes, both Joomla CMS and cPanel are open source.
There are 2 main platforms, Windows and Unix/Linux.
The platform is open source Unix/Linux/LAMP, the business process is what is proprietary. This will be the case on whatever platform you choose. If you create a new extension in Joomla/PHP, that is your extension, you can sell it or donate it, you still do not own Joomla but you do own the new extension.
What does happen if your process uses free/commercial extensions and you customize them, you do not own those customizations, you can keep it for yourself or donate it back to the original developers. You can't sell it as yours.
It is a little different than using, as an example, Microsoft, you do not own the patents on Windows OS & Office, and you have to pay for a license to use them, but Microsoft does not own the work and the process you created on their platform. You can sell your work and process, and even the computer and software, but you can't resell the license on the software, over and over, you need to by a new one each time.
With open source you never need to sell the license, it is open for all to use, you only sell what work and process you created and the new extensions and even the computer. Since the software and license is free and open source, all the client needs to sell is the Project components and management for the open source platform. Concerning selling the Domain Name, website and hosting, you transfer them to the new owner, you never own them you only lease the rights or accounts, that is why you register a Domain Name, you buy the right to lease the name but you never own it outright, and this is why you have to renew your registration every year. This is the same for hosting. The website design and creation you own, if you use HTML...etc. you conform to a standard, but you and everybody else do not own the standard.
The above is the very concept of my business model, most of my packages are about Management and Maintenance and standardizing on a stable platform.
In conclusion, there is a paradigm shift in the technology that you are considering to develop on, the internet will take over most of the functions that were only available to main frames and personal computers, the process, functions and management will be important, not the platforms.