  We report a novel approach to the design and implementation of a tunable
cavity on an optical nanofiber (ONF). The key point is to create a composite
photonic crystal cavity (CPCC), by combining an ONF and a chirped period defect
mode grating. Using numerical simulations we design the CPCC with low
scattering loss while tuning the cavity resonance wavelength of \pm10 nm around
the designed wavelength. We experimentally demonstrate the tunability of the
CPCC, showing good agreement with the simulation results. Our results lay the
foundation for a versatile platform for ONF cavity-quantum-electrodynamics with
narrow bandwidth quantum emitters.
