Updated project metadata. The piRNA pathway is a small RNA-based immune system that silences mobile genetic elements in animal germlines. In Drosophila ovaries, piRNAs are produced from discrete genomic loci, called piRNA clusters, which are composed of inactive transposon copies and fragments and thus constitute a genetically encoded memory of past transposon challenges. Two types of piRNA clusters exist in flies: dual-strand clusters, expressed only in the germline via a highly specialised machinery, and uni-strand cluster, which are predominantly expressed in the somatic follicle cells. Flamenco (flam) is the major uni-strand piRNA cluster in Drosophila, giving rise to the majority of somatic piRNAs. Flam resembles a canonical RNA polymerase II transcriptional unit, nonetheless it can be specifically recognised by the piRNA pathway and directed to the biogenesis machinery. Recent work has implicated the RNA helicase Yb in the licensing of somatic piRNA production, however a detailed understanding of the molecular mechanisms underlying flam export and specification is still lacking. Here, we show that flam export triggers the assembly of peri-nuclear condensates of Yb and provide evidence that piRNA production from flam specifically requires subunits of the Nuclear Pore Complex (NPC). In the absence of some NPC subunits, transposons become de-silenced and piRNA biogenesis is compromised exclusively from flam. We also show that Yb transiently associates with the NPC to promote flam export. Taken together, our data shed light on how the export of uni-strand cluster transcripts is achieved and suggest the evolution of a specialised machinery that couples transcription, nuclear export and piRNA production.