  We develop the gluing theory of contact instantons in the context of open
strings and in the context of closed strings \emph{with vanishing charge}, for
example in the symplectization context. This is one of the key ingredients for
the study of (virtually) smooth moduli space of (bordered) contact instantons
needed for the construction of contact instanton Floer cohomology and more
generally for the construction of Fukaya-type category of Legendrian
submanifolds in contact manifold $(M,\xi)$. As an application, we apply the
gluing theorem to give the construction of (cylindrical) Legendrian contact
instanton homology that enters in our solution to Sandon's question for the
nondegenerate case. We also apply this gluing theory to that of moduli spaces
of holomorphic buildings arising in Symplectic Field Theory (SFT) by
canonically lifting the former to that of the latter.
