There are two methods I'm aware of that make riding a handstand on a skateboard less difficult.
My answer is assuming you are going to be using a standard popsicle deck with nose and tail angling up slightly past the truck base and some concave along the wheelbase.
One method is to set your hands flat on the top of the deck, fingers apart, over where the trucks are mounted or as far apart as they can be without being on the angled portions of the nose and tail. For this method your fingers should all generally face one edge of the deck. This method is most like doing a handstand on the ground with your fingers perpendicular to plane created by your back.
Another method is the old school wrap style. You see in vintage skateboarding pictures and footage when the boards were flat. Wrap your fingers around either end of the board on the nose and tail with your inner forearms facing the center of the deck. When executing the handstand, rest your weight on the heels of your palms on the nose and tail. My father taught me this method in his fifties on a modern skateboard so it translates even if the board is not flat. The big thing back in the day was to lock out your elbows, point your feet straight up and slalom down a hill.
Be aware if you intend to become advanced with freestyle skateboarding the first method is generally used as a precursor to doing things like fingerflips back to a standing position.
Pick whichever method feels more natural. Find a clean, flat block of concrete to practice on. You might don some bulky layers and a helmet then sweep your practice area well because you'll almost certainly wind up rolling on the ground while you learn to handstand on a skateboard.