This Video will show you how to ensure that a service or program starts on boot on Linux. This video was recorded on CentOS 8 but the method shoudl work on most Linux Distros including Ubuntu.
The command that you need to run is:
sudo chkconfig servicename on
This command will ensure that the service starts on boot on Linux