Thermal effects may affect the velocity dependence of friction on the nanoscale in different ways. In a dry environment the stick-slip motion of a nanotip sliding across a crystalline surface is modified by thermal vibrations, which leads to a logarithmic increase of friction with the sliding velocity at very low speeds (v < 10 μm/s). At higher speeds the role of thermal activation is negligible, and friction becomes velocity-independent. An analytical expression, which explains both regimes of friction vs. velocity, is introduced. In a humid environment the situation is complicated by water capillaries formed between tip and surface, which act as obstacles for thermally activated jumps. Depending on the wettability of the surface, different tendencies in the velocity dependence are observed.