Project ZomboidGuideSet an Admin Password on your dashboard, restart, then join the server with the account username admin and that password. That account has every admin power, and from it you can promote your normal character with one command. Becoming an admin changes nothing about your world; it is just an account.
Open your server's settings and set Admin Password.
Save. Like every setting, it applies on the next restart, so restart the server.
Launch Project Zomboid and join your server. On the join screen, enter admin as the account username and your Admin Password as the account password.
You are in as the server's built-in admin account.
Project Zomboid accounts are per-server: the username and password fields when joining are for your account on this server, not your Steam login. The admin password goes in the account password field, paired with the username admin.
If zombies walk right past you or you cannot take damage on the admin account, check the in-game admin panel: admin protections like god mode and invisibility are often switched on for that account. Toggle them off there if you want to play normally, or better, play on your own character and keep the admin account for admin work.
Most people do not want to play on the admin account; they want powers on their main. While logged in as admin, with your friend (or your other account) online:
Open the chat.
Run: /setaccesslevel "TheirUsername" admin (quotes matter if the name has spaces).
Their name tag updates and they have admin powers on their own character.
To take it back later, run /setaccesslevel "TheirUsername" none.
Only give this to people you trust: an admin can spawn items, teleport players, and generally bend the world.
Putting the admin password in the server password field. It goes in the account password field, with admin as the username.
Using your own username with the admin password. The built-in account is literally named admin.
Changing the password without restarting. Settings apply on restart, but only after you hit Save, and the old password stays active until then.
Admin powers pair well with a friendly Welcome Message for new joiners; it is a regular setting on your dashboard.
Every sandbox setting from the dashboard: see "Project Zomboid: Change Any Sandbox Setting".