> ## Documentation Index
> Fetch the complete documentation index at: https://docs.arct.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Security

> Account and server security.

## Account Security

### Password

Use a strong, unique password (12+ characters, mix of letters, numbers, and symbols).

### Two-Factor Authentication (MFA)

1. Go to **Settings** > **Security**
2. Click **Enable MFA**
3. Set up an authenticator app (Google Authenticator, Authy, etc.)

<Warning>Save your recovery codes. You'll need them if you lose access to your authenticator app.</Warning>

## Server Security

### Use SSH Keys

SSH keys are more secure than passwords. See [SSH Keys](/compute/virtual-machines/ssh-keys).

### Keep OS Updated

```bash theme={null}
sudo apt update && sudo apt upgrade -y
```

### Firewall

Open only the ports your application requires. The example below shows SSH, HTTP, and HTTPS:

```bash theme={null}
sudo ufw allow 22/tcp
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw enable
```

<Warning>Always allow SSH (port 22) before enabling the firewall.</Warning>

### Disable Root Login (Optional)

```bash theme={null}
adduser yourusername
usermod -aG sudo yourusername
mkdir -p /home/yourusername/.ssh
cp ~/.ssh/authorized_keys /home/yourusername/.ssh/
chown -R yourusername:yourusername /home/yourusername/.ssh
sudo sed -i 's/^PermitRootLogin.*/PermitRootLogin no/' /etc/ssh/sshd_config
sudo systemctl restart ssh
```

<Warning>Verify you can log in as the new user before disabling root login.</Warning>
