Heat olive oil in a dutch oven or high-sided skillet over medium heat. Add onions and sauté until translucent, about 5 minutes. Add garlic and continue to cook just until garlic is fragrant (1-2 minutes).
Add tomato sauce, paste, chili sauce, brown sugar, vinegar, cinnamon, and ginger. Stir well to combine. Bring to a boil and then lower heat and simmer for 35-40 minutes, or until slightly thickened and darker in color.
Transfer to a large (quart-size) wide-mouth mason jar, add the flax, and use an immersion blender to pureé until smooth (or blend in a food processor until smooth). Let it cool to room temperature before screwing the lid on the jar and storing in the refrigerator.