I have written multiple opensource programs as part of my PhD, and some of these programs require a dedicated server somewhere on the internet to work. Mainly it is online databases, but also things like project homepages, version update checks, usage-metric logging, etc.
I currently host all these website/databases for free from my own stipend, but as the services have grown, I'm now paying about 10-20% of my monthly stipend on hosting bills. It's not much, only about €100 a month, but you certainly feel it when you're main source of nutrition is unguarded coffee and biscuits.
So my question is how best to monetize software to academics if you're a one-man-band. I could set up a paypal account, or something similar - but never in a million years could I see my PI setting up a lab PayPal account. Donations for server costs would then most likely come from generous students/post-docs, and I don't really see that as a fair or acceptable system. I want people to pay from their grant money, as it should be. What is the best way to do this?
EDIT:
In light of the answers, I feel that "pay for it with your own grant money" is somewhat of a non-starter. Here's two reasons why:
The software developed was not a requirement or goal of the PhD. It was created as a side-reaction of the PhD as the software I wanted to use to analyze my data was difficult to use, expensive, non-existant, etc. Based on no real data, just my observations from working in the Open Source community, 99% of OS software is written to solve the author's current problem, which then gets generalized to solve other people'e problems too, so I don't see my situation as being unusual. Still, I cannot reasonably ask my PI for money on something that was never originally part of the PhD plan. One would even have a hard time justifying that the software was required for the PhD, if the original plan did not foresee using it. For example, one program gives highly-detailed Quality Control reports. Our data passes all of these strict/new QC tests. Therefore, was it even a requirement?
Following on from point 1, but really this is a separate issue, what my PI would be paying for would be for other people to use the software. To handle just the needs of my project, I don't need any online servers - I could make do with just local services and disk space. In fact i've already applied all this software to the project, so now it could just be deleted. No need to register domain names, no AWS hosting costs, no evenings spent making sure the community around my software is happy and productive, etc. In short, if my PI was generous enough to see my software as an integral part of the PhD and worthy of funding (part 1), he would also have to come to the conclusion that it's worth spending his grant money on other people's projects, which I am confident he not only would do out of principle, he might not even be allowed to.
So - I really only see two possible options going forward:
I apply for a new grant, totally separate from my PhD project, to cover the costs of hosting.
The community using the software/services pay directly, using some mechanism that I currently do not know about. Some way a PhD student can buy software online and charge it directly to their grant, rather than with personal funds.