A device for producing a spacer by curing bone cement paste, wherein the spacer is provided in the medical field for temporarily replacing a joint or part of a joint comprising an articulating surface of the joint, in particular for temporarily replacing a hip joint or a shoulder joint, the device having a casting mold (1, 61) for molding the spacer from bone cement paste, the casting mold (1, 61) having at least one filling opening (2, 62) for introducing a bone cement paste; a valve seat (3, 63, 163), the valve seat (3, 63, 163) being connected to the casting mold (1, 61) in the region of the at least one filling opening (2, 62), wherein the valve seat (3, 63, 163) has a regionally closed head side (4, 64, 164) with at least one first feed-through (5, 65, 165), wherein the at least one first feed-through (5, 65, 165) opens into the at least one filling opening (2, 62); a valve body (6, 66, 166) which is mounted so as to be rotatable relative to the valve seat (3, 63, 163) and which has a sealing face (7, 67, 167), wherein the sealing face (7, 67, 167) is oriented in the direction of the regionally closed head side (4, 64, 164) of the valve seat (3, 63, 163), wherein at least one second feed-through (8, 68, 168) is arranged in the sealing face (7, 67, 167); wherein the valve seat (3, 63, 163) and the valve body (6, 66, 166) together form a valve, wherein the valve is reversibly transferable into an open position and into a closed position by rotation of the valve body (6, 66, 166) relative to the valve seat (3, 63, 163), wherein, in the open position of the valve, the at least one first feed-through (5, 65, 165) of the valve seat (3, 63, 163) and the at least one second feed-through (8, 68, 168) of the valve body (6, 66, 166) are located above one another at least in places and provide a connection permeable to bone cement through the valve into the casting mold (1, 61), wherein, in the closed position of the valve, the at least one first feed-through (5, 65, 165) of the valve seat (3, 63, 163) is covered by the sealing face (7, 67, 167) of the valve body (6, 66, 166), wherein, in the closed position of the valve, the at least one filling opening (2, 62) of the casting mold (1, 61) is covered and closed for bone cement paste and wherein the valve is connected on the side remote from the casting mold (1, 61) to a port (11, 71, 171) for liquid-tight connection of a bone cement cartridge (10, 70) or the valve has such a port (11, 71, 171). a casting mold (1, 61) for molding the spacer from bone cement paste, the casting mold (1, 61) having at least one filling opening (2, 62) for introducing a bone cement paste; a valve seat (3, 63, 163), the valve seat (3, 63, 163) being connected to the casting mold (1, 61) in the region of the at least one filling opening (2, 62), wherein the valve seat (3, 63, 163) has a regionally closed head side (4, 64, 164) with at least one first feed-through (5, 65, 165), wherein the at least one first feed-through (5, 65, 165) opens into the at least one filling opening (2, 62); a valve body (6, 66, 166) which is mounted so as to be rotatable relative to the valve seat (3, 63, 163) and which has a sealing face (7, 67, 167), wherein the sealing face (7, 67, 167) is oriented in the direction of the regionally closed head side (4, 64, 164) of the valve seat (3, 63, 163), wherein at least one second feed-through (8, 68, 168) is arranged in the sealing face (7, 67, 167); wherein the valve seat (3, 63, 163) and the valve body (6, 66, 166) together form a valve, wherein the valve is reversibly transferable into an open position and into a closed position by rotation of the valve body (6, 66, 166) relative to the valve seat (3, 63, 163), wherein, in the open position of the valve, the at least one first feed-through (5, 65, 165) of the valve seat (3, 63, 163) and the at least one second feed-through (8, 68, 168) of the valve body (6, 66, 166) are located above one another at least in places and provide a connection permeable to bone cement through the valve into the casting mold (1, 61), wherein, in the closed position of the valve, the at least one first feed-through (5, 65, 165) of the valve seat (3, 63, 163) is covered by the sealing face (7, 67, 167) of the valve body (6, 66, 166), wherein, in the closed position of the valve, the at least one filling opening (2, 62) of the casting mold (1, 61) is covered and closed for bone cement paste and wherein the valve is connected on the side remote from the casting mold (1, 61) to a port (11, 71, 171) for liquid-tight connection of a bone cement cartridge (10, 70) or the valve has such a port (11, 71, 171).