We present measurements of the superconducting critical temperature T-c and upper critical field H-c2 as a function of pressure in the transition metal dichalcogenide 2H-NbS2 up to 20 GPa. We observe that Tc increases smoothly from 6 K at ambient pressure to about 8.9 K at 20 GPa. This range of increase is comparable to the one found previously in 2H-NbSe2. The temperature dependence of the upper critical field H-c2(T) of 2H-NbS2 varies considerably when increasing the pressure. At low pressures, H-c2(0) decreases, and at higher pressures both T-c and H-c2(0) increase simultaneously. This points out that there are pressure induced changes of the Fermi surface, which we analyze in terms of a simplified two-band approach. DOI: 10.1103/ PhysRevB. 87.134502