The exploration of the Moon cannot be carried out without the creationof long-term lunar bases (LB), as well as other objects that ensure the livelihoods and work of expeditions. These can be assembly and assembly operations during the creation of space complexes or repair and maintenance work related to ensuring the duration of operation of existing systems. Experiments on automatic welding in space, which were carried out on the “Vulkan” equipment, as well as welding with the manual electron beam tool «URI» in outer space, showed that electron beam welding (EBW) is the optimal technological process for performing welding work in space conditions. In this process, the effective efficiency is 85—90 %, which is the maximum compared to other welding methods. EBW in the conditions of terrestrial gravity allows us to ensure the mechanical and chemical properties of welded joints, as well as their density almost at the level of the base metal of the structure, which is impossible with other welding methods. Thus, the strength coefficient of the weld metal of welded joints from aluminum alloys obtained by EBW is 0.85...0.93, and with arc and plasma-arc methods, it is 0.7…0.8. At the same time, obtaining such properties of welded joints in space conditions is difficult. Of course, reduced gravity, low temperatures, and ultra-high vacuum, which are the natural environment on the lunar surface, contribute to the formation of internal leaks in the form of pores in welds (PW). This is primarily manifested in the welding of aluminum alloys, which are used as the main material in spacecraft structures.To obtain high-quality welded joints and exclude such defects as pores, cracks, and non-fusion of edges in the weld roots to be welded, a system of equipment for periodic deflection of the electron beam with a programmable heating intensity along a given trajectory was developed and manufactured. As a result of technological work carried out using a complex of equipment with a discrete deviation of the electron b eam, welded joints (WJ) were obtained from alloys AMg6, A1570, and 1201 with a thickness of 2 to 8 mm. The obtained PW was subject to visual inspection and X-ray control to determine external and internal defects in the WJ. Also, mechanical tests for the strength of resistance by tearing were carried out, the chemical composition was determined, and metallographic studies of PW obtained by the proposed method were performed. The results of the tests and studies showed the high quality of PP from aluminum alloys obtained by EBW using a discrete deflection of an electron beam with a programmable heating intensity along a given trajectory. The purpose of this work was to analyze the methods of degassing the molten metal of the weld pool, as well as the development and testing of the elements of the technological process of the EBW of aluminum alloys using the created equipment, which, when performing installation and repair and restoration work on the surface of the moon, will allow us to obtain high-quality WJ that meets the requirements for space designs.