It is required to have a webserver for DokuWiki. But it is possible to keep everything offline on your computer:
https://www.dokuwiki.org/install:dokuwiki_on_a_stick
Btw: if you later decide that you want to put your wiki online, you still can do that with DokuWiki on a stick. Just copy the dokuwiki-folder to your webspace then.