How to write a thesis to transform into a book? I am starting to write my thesis by the start of August this year. 
I want to write it in a format so that later I can publish a book out of it.
How is it possible? Any suggestions?

Also, does this account for self-plagiarism? What are the key points I should keep in mind before start writing?
I would just focus on writing the thesis. If it is good enough to be published as a book, you will know when it is done. Regardless of what you do now, getting it into publishable form is going to be a huge job, and the problems will only become apparent once your thesis is finished. So what you do now is pretty much irrelevant when it comes to publishing your thesis as a book.