Dice up the onions and bacon.
½ onion, 2 slices bacon
In a medium saucepan, melt the butter over medium heat, then add the bacon.
1 tablespoon salted butter, 2 slices bacon
Cook the bacon until it starts to get crispy, then add the onions. Don't drain the grease unless there is a lot.
½ onion
Cook the onions until they soften and become translucent.
Add the brown sugar, and cook for about two minutes until it becomes a little syrupy.
3 tablespoons light brown sugar
Add the salt, chili powder, paprika, cayenne, black pepper, cumin, garlic powder, and diced chipotle peppers with a little of the liquid from the can.
1 ½ teaspoons garlic powder, 1 teaspoon chili powder, 1 teaspoon ground cumin, 1 teaspoon sweet paprika, 1 teaspoon kosher salt, ½ teaspoon black pepper, ¼ teaspoon cayenne pepper, 1-2 tablespoons chipotle chile peppers in adobo sauce
Add the ketchup and optional water. Water will make the sauce thinner, so if you want the sauce to be really thick, you can leave it out and cook the sauce down.
1 ½ cups ketchup, ¼ cup water
Cook the sauce for another few minutes, then add the vinegar.
¼ cup apple cider vinegar
Finally, let the sauce cool for a bit, then blend it up using an immersion blender, a food processor, or a blender. You can keep it a little chunky or make it very smooth.
If desired, after blending you can return the sauce to the stove to simmer for 5-10 more minutes.