Asparagine-linked glycosylation is a post-translational modification of proteins containing the conserved sequence motif Asn-X-Ser/Thr. The attachment of oligosaccharides is implicated in diverse processes such as protein folding and quality control, organism development or host-pathogen interactions. The reaction is catalysed by oligosaccharyltransferase (OST), a membrane protein complex located in the endoplasmic reticulum. The central, catalytic enzyme of OST is the STT3 subunit, which has homologues in bacteria and archaea. Here we report the X-ray structure of a bacterial OST, the PglB protein of Campylobacter lari, in complex with an acceptor peptide. The structure defines the fold of STT3 proteins and provides insight into glycosylation sequon recognition and amide nitrogen activation, both of which are prerequisites for the formation of the N-glycosidic linkage. We also identified and validated catalytically important, acidic amino acid residues. Our results provide the molecular basis for understanding the mechanism of N-linked glycosylation.