Aims. We extract groups of galaxies as flux-limited and volume-limited samples from the SDSS Data Release 7 (DR7) to study the supercluster-void network and environmental properties of groups therein. Volume-limited catalogues are particularly useful for a comparison of numerical simulations of dark matter halos and the large-scale structure with observations. Methods. The extraction of a volume-limited sample of galaxies and groups requires special care to avoid excluding too much observational data. We use a modified friends-of-friends (FoF) method with a slightly variable linking length to obtain a preliminary flux-limited sample. We take the flux-limited groups as the basic sample to include as many galaxies as possible in the volume-limited samples. To determine the scaling of the linking length we calibrated group sizes and mean galaxy number densities within groups by magnitude dilution of a nearby group sub-sample to follow the properties of groups with higher luminosity limits. Results. Our final flux-limited sample contains 78800 groups and volume-limited subsamples with absolute magnitude limits M r = −18, −19, −20, and −21 contain 5463, 12 590, 18 973, and 9139 groups, respectively, in the DR7 main galaxy main area survey. The group catalogue is available at the CDS. Conclusions. The spatial number densities of our groups within the subsamples, as well as the mean sizes and rms velocities of our groups practically do not change from sub-sample to sub-sample. This means that the catalogues are homogeneous and well suited for a comparison with simulations.