Auto Start Openfire

I have installed Openfire on my Ubuntu server, if I reboot my server I have to start Openfire server manually, is there some code I can place somewhere so Openfire will start automatically.

Which download did you use to install Openfire? I think the .deb file should automatically register such a script. If you used the .tar.gz file, there are various scripts in the /bin/ folder that can be used.