In large stockpot, combine tomatoes and onons. Cook over medium heat, stirring often until onions are soft.
Transfer mixture to a cloth juice bag and hang to drain for 2 hours or until thickened to your liking.
Run the drained pulp through a food mill or use an immersion blender to smooth out any seeds and skins.
Return the smooth pulp mixture to the pot over medium high heat. Stir in sugar, vinegar, salt, cloves, cinnamon, mustard and red pepper flakes. Bring to a boil and boil for 10 minutes, stirring frequently.
Ladle hot ketchup into your jars, leaving 3/4 inch headspace if pressure canning, or fill to your preferred level if refrigerating.
If canning, remove air bubbles, wipe rims and seal jars hand-tight. If refrigerating, wipe rims and add lids.
If pressure canning, use USDA approved methods and pressure can for 15 minutes at 10 lbs pressure.
Ketchup can be frozen or used within 2 weeks if kept in the refrigerator.