# Secure a new server

Checks for a new server: login keys instead of passwords, only the security rules you need, security fixes installed, two-step login on your account.

Every server Fuzops sets up starts with a firewall that only allows web traffic and remote login, login protection, and automatic security updates. This guide takes it further in about 15 minutes.

## What you need

- A server that is **Online**.
- The public half of your own login key (a line starting with `ssh-ed25519`), if you or your developer log in to the server directly.

## Steps

1. **Turn on two-step login for yourself.** Open **Your account** › **Login and security** › **Set up two-step login** and save your recovery codes. As the team owner, also turn on **Require two-step login for this team** under **Members**.

   ![Login and security with Set up two-step login](https://internal.fuzops.com/docs-img/account-security.webp)

2. **Save your login key once.** Under **Your account** › **My login keys**, choose **Save a key**, and turn on **Add my keys to every new server** of your team.

3. **Add the key to this server.** Open the server, then **Security** › **Users and login keys** › **Add login key**, or add your saved key in one click.

4. **Turn password login off.** On the same page, under **Logging in with a password**, choose **Turn password login off** once you have logged in with your key. Keep your cloud company's console as a way back in.

   ![Users and login keys with password login and Turn password login off](https://internal.fuzops.com/docs-img/server-login-keys.webp)

5. **Check the security rules.** Open **Security rules**. Keep web traffic (HTTP and HTTPS). If you always work from the same address, replace the open remote login rule with **Allow remote login from one address only…**. Remove rules you do not recognise.

   ![Security rules: web traffic and remote login](https://internal.fuzops.com/docs-img/server-security-rules.webp)

6. **Install security fixes.** Open **Security updates** and choose **Fix everything that can be fixed**. Check that **Maintenance** › **Automatic updates** is **On**.

7. **Run the health check.** Open **Health check** and choose **Check now**. Fix what it lists.

8. **Choose where alerts go.** On **Team and settings** › **Notifications**, make sure security problems and "something was changed outside Fuzops" go to a place you read.

## What you should see

You log in with your key only, the server shows no fixable security problem, and the security rules list only what you need.

## If it goes wrong

- **You locked yourself out of remote login**: open the cloud company's web console, or use **Terminal and files** in Fuzops, and add your address or key again. Your sites and Fuzops keep working meanwhile.
- **A fix needs a restart**: **Security updates** says when the server must restart. Choose a quiet time and restart from **Maintenance**.
- **An address is blocked that should not be**: under **Security rules** › **Addresses blocked automatically**, unblock it.
