Dodge Ram 2500 Diesel won't start

My 2003 Dodge Ram cummins 5.9 diesel has a hard time starting, acting like it is not getting fuel. Replaced the fuel filter and it worked fine for a week. It may take several minutes of cranking for it to start, after that is seems to run fine. Is it losing prime?? Fuel rail or injectors, fuel relay HELP!!

I experienced this same issue on my '01 cummins last summer. after several weeks of just living with it I did find a rubber fuel hose at the injector pump fuel inlet (you probably have a common rail pressure pump but they both need a fuel supply line) that was cracked just enough to allow air into fuel line over night while the engine was off but did not leak fuel externally for quite some time.
Don’t be cheep like me. Check to be sure any / all fuel line connections are tight (perhaps have rubber O rings within fittings), be sure the seal of the fuel filter is good, be sure the water drain valve on the fuel filter is completely closed, if nothing there replace rubber fuel lines that are above the height of the fuel tank.

I just after replying noticed the date of several years ago. I hope you fixed it by now. Ha ha