It will mostly depend on your marketing and communication skills. Just knowing the technical aspects, no matter to what depth, will not give you an income that can sustain you, except maybe if you manage to capture a very small niche where you are the world leading specialist. But in our fast paced technology even such a niche is likely to be a short term solution, lasting only a few years at best.
It's definitely not easy to do, with many pitfalls and potential problems. A passion for what you plan to do certainly helps, but you really need to think about how you are going to sell your services. That's where everything starts and also ends. Without some kind of well planned marketing approach, you will continually struggle to make ends meet.
Of course, marketing alone will also not really work. You also need to have something that you can sell, unless you want to end up selling snake oil. 😀