In this paper we describe the main features of the Bergm package for the open-source Rsoftware which provides a comprehensive framework for Bayesian analysis of exponentialrandom graph models: tools for parameter estimation, model selection and goodness-of-t diagnostics. We illustrate the capabilities of this package describing the algorithmsthrough a tutorial analysis of three network datasets.