Establishment and development of gut microbiota during vertebrates' early life are likely to be important predictors of health and fitness. Host-parental and host-environment interactions are essential to these processes. In oviparous reptiles whose nests represent a source of the parent's microbial inocula, the relative role of host-selection and stochastic environmental factors during gut microbial assemblage remains unknown. We sampled eggs incubated in artificial nests as well as hatchlings and juveniles (up to 30 days old) of the yellow-spotted Amazon river turtle (Podocnemis unifilis) developing in tubs filled with river water. We examined the relative role of the internal egg microbiota and the abiotic environment on hatchling and juvenile turtle's cloacal microbiota assemblages during the first 30 days of development. A mean of 71% of ASVs in hatched eggs could be traced to the nest environmental microbiota and in turn a mean of 77% of hatchlings' cloacal ASVs were traced to hatched eggs. Between day 5 and 20 of juvenile turtle's development, the river water environment plays a key role in the establishment of the gut microbiota (accounting for a mean of 13%–34.6% of cloacal ASVs) and strongly influences shifts in microbial diversity and abundance. After day 20, shifts in gut microbiota composition were mainly driven by host-selection processes. Therefore, colonization by environmental microbiota is key in the initial stages of establishing the host's gut microbiota which is subsequently shaped by host-selection processes. Our study provides a novel quantitative understanding of the host-environment interactions during gut microbial assemblage of oviparous reptiles.