Currently after every system restart we are running Fredhopper by starting deployment agent and then starting indexer.
is there any way to configure fredhopper as a service so that is should restart automatically whenever system restarts.
There are no Windows services delivered with Fredhopper.
Fredhopper recommends using the Windows Task Scheduler to start the deployment agent. They have a page on their Learning Center to help you with that (requires login). That is what I typically do and have not have any issues with it.
There is no mention of the indexer or other processes, but presumably you can use the same mechanism -- but only once the deployment agent is up and running.