This paper develops a path for the global energy system up to 2050, presenting a new application of the open source energy systems model OSeMOSYS to the community. Itallows quite disaggregate energy and emission analysis: GENeSYS-MOD (Global Energy System Model) uses a system of linear equations of the energy system to search for lowest-cost solutions for a secure energy supply, given externally defined constraints, mainly in terms of CO2-emissions. The General Algebraic Modeling System (GAMS) version of OSeMOSYS is updated to the newest version and, in addition, extended and enhanced to include e.g. a modal split for transport, an improved trading system, and changes to storages. The model can be scaled from small-scale applications, e.g. a company, to cover the global energy system. The paper also includes an application of GENeSYS-MOD to analyze decarbonization scenarios at the global level, broken down into 10 regions. Its main focus is on interdependencies between traditionally segregated sectors: electricity, transportation, and heating. Model calculations suggests that in order to achieve the 1.5°-2° C target, a combination of renewable energy sources provides the lowest-cost solution, solar photovoltaic being the dominant source. Average costs of electricity generation in 2050 are about 4 €cents/kWh (excluding infrastructure and transportation costs).