In a large pot, cover the whole, unpeeled ube potatoes with cold water and bring to a boil over high heat. Boil until tender all the way through when poked with a fork or knife, about 30 minutes. (If the potatoes are very large or very small the time may vary.) Drain the potatoes and cool slightly. When cool enough to handle but still warm, remove the peels and discard. Place in a large bowl and mash with a potato masher.
Transfer the mashed ube to a large pot or saucepan along with the butter, coconut milk, sugar, and salt. Stir until the butter melts, then puree the mixture with an immersion blender. (See recipe notes above for other options if you don’t have an immersion blender!)
Bring the mixture to a boil, then reduce heat to low and stir frequently. Cook 25 minutes for jam-like consistency, and 40 minutes for a thicker, more custardy consistency. When the halaya has reached your desired consistency, remove from heat and stir in the vanilla. Transfer to clean jars or containers. Allow to cool to room temperature, then cover and refrigerate. Store in the refrigerator for up to 10 days.