Hi Harry - read up on the 500-rule.
But depends on if you are shooting with crop sensor or FF, you might want to go conservative and use 400-rule instead.
Basically you want to divide 500 (or 400) by your focal length to get your exposure time to avoid star trails.
For example, if you are shooting with 24mm, 500/24 = 20 sec, or 400/24 = about 16 sec.
This also means wider the lens the better. 16mm would get you longer exposure time before you start getting star trails.
You want to shoot with relatively high ISO, wide-open as possible.
I have tried with 1.4 and 2.8, and from what i read you want to be 2.8 or wider.
OR, you can invest in some tracking mounts and do a really longer exposure at lower ISO... but personally I wouldn't go that far unless you are doing this that professionally.