server.properties is the main settings file for a Java Edition server. It sits in the top folder of your server: open the Files tab and click it to edit. Changes take effect after a restart.
Most of the file can be left alone. These are the lines worth knowing.
Performance
view-distance (default 10): how many chunks around each player are sent to them. Every extra chunk of radius adds a ring of chunks per player, so this is the biggest single setting for memory and CPU. 6 to 8 is plenty for most survival servers.
simulation-distance (default 10): how far from players the world actually runs (mobs move, crops grow, redstone ticks). Keep it at or below view distance. 4 to 6 takes a lot of load off a busy server and most players never notice.
max-players (default 20): the most people who can be online. It doesn't reserve any memory, so set it to what your plan can really handle rather than an optimistic number.
entity-broadcast-range-percentage (default 100): how far away entities are shown to players, as a percentage. Dropping it to 75 saves bandwidth on busy servers.
Who can join
online-mode (default true): checks every player owns Minecraft. Leave it true. Turning it off lets anyone join under any name, including yours. The only exception is a server behind a Velocity or BungeeCord proxy, where the proxy does the check.
white-list and enforce-whitelist: turn on the whitelist so only listed players can join. See how to whitelist your server.
enforce-secure-profile (default true): requires players to have chat signing keys. If players get kicked with "chat message validation failure", see that error.
Gameplay
difficulty: peaceful, easy, normal or hard.
gamemode: what new players start in: survival, creative, adventure or spectator. Add force-gamemode=true to put everyone back in it each time they join.
pvp: true or false.
hardcore: true makes death permanent (players become spectators).
spawn-protection (default 16): the radius around spawn that only operators can build in. Set it to 0 if you want everyone to build at spawn.
allow-flight: set to true if you use any mod or plugin that lets players fly (jetpacks, elytra mods, creative-style abilities). Otherwise the server kicks them for flying.
The world
level-name (default world): the folder the world is loaded from. Change it to switch between worlds you've uploaded. See how to upload your own world.
level-seed: the seed for a new world. It only applies when the world is first created, so changing it on an existing world does nothing.
level-type: minecraft:normal, minecraft:flat, minecraft:large_biomes or minecraft:amplified. Like the seed, it only applies to a new world.
generate-structures: villages, temples and so on. Also only for a new world.
How it looks in the server list
motd: the message under your server's name. See how to set a server icon and MOTD for colours.
Don't change these
server-port and server-ip are set for you and must match what the panel gives your server. Changing them stops the server starting or stops players reaching it. If you need another port for a plugin, add one on the Network tab.
Questions
I changed a setting and nothing happened. Why?
server.properties is only read when the server starts. Save the file, then restart the server from the Console tab.
What view distance should I use?
Start at 8 with simulation distance 6. If the server lags with several players online, drop simulation distance first, then view distance.
Can I change the seed of my current world?
No. The seed is only used when a world is created. To use a new seed, set level-seed and change level-name to a new folder name, or delete the old world after taking a backup.