In the work the distribution of stresses and strains as well as temperature field within the welding chamber of the porthole die were determined. The analysis was performed by the use of the computer program DEFORM based on a finite element method. The direct hot extrusion of 2024 aluminum alloy was investigated with the use of the porthole dies of different geometry. Particularly, a different height of the welding chamber was adopted in calculations. The calculations allowed determining both pressure and temperature levels and their distributions within the welding chamber leading to the best welding conditions for the alloy tested.