  Let $(G, \Lambda)$ be a self-similar $k$-graph with a possibly infinite
vertex set $\Lambda^0$. We associate a universal C*-algebra
$\mathcal{O}_{G,\Lambda}$ to $(G,\Lambda)$. The main purpose of this paper is
to investigate the ideal structures of $\mathcal{O}_{G,\Lambda}$. We prove that
there exists a one-to-one correspondence between the set of all $G$-hereditary
and $G$-saturated subsets of $\Lambda^0$ and the set of all gauge-invariant and
diagonal-invariant ideals of $\mathcal{O}_{G,\Lambda}$. Under some conditions,
we characterize all primitive ideas of $\mathcal{O}_{G,\Lambda}$. Moreover, we
describe the Jacobson topology of some concrete examples, which includes the
C*-algebra of the product of odometers. On the way to our main results, we
study self-similar $P$-graph C*-algebras in depth.
