Note that hardcore mode only exists in Minecraft Java Edition.
Hardcore mode locks your game to the highest difficulty and prevents players from respawning after they die.
Enable hardcore mode for new worlds:
You can enable hardcore mode when generating a new world on the Worlds page:
Enable hardcore mode for existing worlds:
You have to enable hardcore mode in your server.properties settings here:
https://exaroton.com/files/server.properties
And enable it for your existing world(s) in the level.dat file here:
https://exaroton.com/worlds/files/level.dat
It's recommended to do this while your server is offline.
Disable hardcore mode for existing worlds:
You can generate a new world or disable hardcore mode in your current world by first disabling it in the server.properties settings here:
https://exaroton.com/files/server.properties
And disable it for your existing world(s) in the level.dat file here:
https://exaroton.com/worlds/files/level.dat
If you've died in hardcore mode, and you are still in spectator mode, you have to change your gamemode.