Depends on the speed you need, but 18km isn't that long. There is a single mode 300km link active in Europe, with no repeaters. Practically, I would put about 100km as the upper limit on a high quality single mode fiber at around 3Gbs.
And you install it as you would anything else.
Make sure the path is completely clear of all utilities, get a mole digger, run some semi-flexible pipe in the ground, pull the fiber through it.