How to product a terrain service with lighting information?

It is available to create a lighting effect on terrain, just like the sample Lighting Sample. I tried to make this in my cesium application, but I failed. I realised that it must contains lighting information in terrain server. But my cesium application is used in localhost, it’s impossible to use cesium terrain resource. I need to product a terrain service by myself to realise the lighting effect.
I hope anyone knowing this helps me. Thank you!