Just add a resistor in series with the LED and connect them between a rail and GND or between rails, like in the image below.
The resistor value is calculated as follows:
R = (U-1.5)/I
R in kohms
U is the voltage over resistor and LED, in volts
1.5 is the voltage drop over the LED (this value varies, depending on the color of the LED)
I is the current through the LED, in milliampers
Example: For 30V rail and 5mA the value of the resistor is 5k7. The closest standard resistor value is 5k6.