Ok, in Firefox go to Settings. At the top there should be an item called "search" with your current search engine listed. Tap that. On the next page it will say "default search engine" with your current search engine listed. Tap that. The next page will list your current search engine options, but at the bottom it will say "add search engine". Tap that. Then put in the information for your search engine. Mine is SearXNG and the instance is located at search.ononoki.org. So this screen looks like this (make sure to press save when done):