A locally internal category is an analogue of a large but locally small category relative to an elementary topos, when that topos is thought of as generalizing the category of sets.
Given a topos $E$ and an object $X$ in $E$, one notices that the slice category $E/X$ is a symmetric monoidal category; hence we can consider categories enriched over $E/X$, i.e. $E/X$-categories.
A locally internal category $C$ over $E$ is given by
In the stack semantics of $E$, a locally internal category “looks like” an ordinary locally small category.
Locally internal categories can also be identified with Grothendieck fibrations or indexed categories over $E$ which satisfy a certain “representability” or “comprehensibility” condition.
If we also take care of the appropriate morphisms have the following:
(1) Every indexed functor between locally internal categories is an enriched functor. Elephant, proof of Proposition B2.2.2
(2a) Let $S$ be a locally cartesian closed category, let $F:S\to S$ be an $S$-enriched functor whose underlying (ordinary) functor preserves pullbacks. Then $F$ extends to an $S$-indexed functor.
(2b) (Robert Pare) If this indexed functor preserves pullbacks (as an indexed functor) and if it induces the given enrichment, this extension is unique (up to a canonical isomorphism). Elephant B2.2.8
Of course, $E$ does not have to be a topos. For the definition, it suffices for $E$ to have finite limits, although the notion is best-behaved when $E$ is locally cartesian closed (for instance, in that case the codomain fibration of $E$ is an example).
J. Penon, Categories localement internes, C. R. Acad. Sci. Paris 278 (1974) A1577-1580
Locally internal categories, Appendix in: P. Johnstone, Topos theory, 1977
Chapter B2.2 of Sketches of an Elephant