Melt the butter in a skillet over medium heat. Add the onion, garlic, and thyme and cook, covered, until the onion is tender and lightly colored, about 25 minutes.
Meanwhile add the celery tops, peppercorns, and bay leaves to 6 cups water in a saucepan. Bring to a boil, reduce the heat, and simmer for 10 minutes.