# First-run setup

A new server works the moment it starts, with settings that suit a first look. This page is the list of what to set before real users arrive, in the order that makes sense.

You need: the server running, and an administrator. See [Quick start](Quick-Start.md).

## What a new server has

| | |
|---|---|
| ports | FTP on 21, HTTP on 8080 and 9090, HTTPS on 443, SFTP on 2222 |
| a certificate | a stand-in that browsers do not trust |
| users | the administrator you made, and the default user, from which every user inherits |
| memory | on Linux 512 MB; on Windows and macOS what the control panel was given |
| mail | not set up |
| everything else | off, or at a careful value |

[Startup notices](Admin-Startup-Notices.md) in Server Admin lists what the server itself thinks should be looked at.

## 1. Memory

Give the server what the machine can spare: [Java and memory settings](Java-and-Memory.md).

## 2. A name and a certificate

1. Give the server a DNS name, such as `files.example.com`.
2. Get a certificate for it: free and renewed by itself with the [LetsEncrypt plugin](Plugin-LetsEncrypt.md), or one you bought: [SSL certificates](Security-SSL-Certificates.md).
3. Put it on the HTTPS port, and on FTP if you offer FTP with encryption.

## 3. Ports

In [the ports of the server](Ports.md):

- **Remove what you do not offer.** FTP, if nobody needs it. The second HTTP port.
- **Do not leave logins on a port without encryption.** Make the HTTP port redirect to HTTPS, or remove it.
- **SFTP on 22**, if you want the usual port and nothing else has it.
- **For FTP**: a passive port range, and the public address: [FTP](Ports-FTP.md).

Then open exactly those ports in the firewall: [Ports CrushMFT uses](Ref-Ports.md).

## 4. Mail

The server sends mail for shares, forgotten passwords and alerts. Set the mail server and send a test: [SMTP](Prefs-General-SMTP.md).

## 5. The administrator

- **A second administrator**, for the day the first forgets their password. On a machine with a control panel that is a small matter; on Linux it saves a trip to the command line.
- **A second factor** for administrators: [Two-factor sign-in](Security-Two-Factor.md).
- **From where administration is allowed**: only your own network, if you can: [Hardening](Security-Hardening.md).
- **Roles, not full rights**, for people who only manage users or only look at reports: [Access roles](Security-Roles.md).

## 6. The default user

Whatever you set on the default user holds for everybody who does not set it themselves. Decide there, once:

| | See |
|---|---|
| the rules for passwords | [Passwords](Security-Passwords.md) |
| limits: connections, speed, session length | [Restrictions](Users-Restrictions.md) |
| which protocols users may use | [Protocols](Users-Restrictions-Protocols.md) |
| the buttons and the look of the web interface | [Changing how the WebInterface looks](Web-Customizing.md) |

Then make template users for kinds of users, and real users that inherit from them: [Templates](Users-Templates.md).

## 7. Where users come from

| | See |
|---|---|
| made by hand | [The User Manager](Users.md) |
| from your directory or identity provider | [Every way to sign in](Security-Sign-In-Methods.md), [Plugins overview](Plugins.md) |
| with a folder of their own at first login | [HomeDirectory](Plugin-HomeDirectory.md) |

## 8. Protection

Go through [Hardening](Security-Hardening.md). The short form:

- bans for wrong passwords are on; look at their numbers: [Banning](Prefs-Banning.md)
- old protocol versions and ciphers off: [Ciphers](Prefs-Encryption-Ciphers.md)
- what users may upload: [Filename filters](Prefs-Restrictions-Filename-Filters.md)

## 9. Watching it

| | See |
|---|---|
| alerts for the things that should wake somebody: disk, memory, a port that failed, a certificate about to end | [Alerts](Alerts.md) |
| the log: how much, how long | [Logging](Logging.md) |
| your monitoring | [Health checks](Monitoring-Health.md), [Metrics](Monitoring-Metrics.md) |

## 10. A backup

Before the first real user: [Backup and restore](Backup-and-Restore.md). And try the restore once.

## 11. A licence

Enter it in the About section of Server Admin, or in the control panel under **Registration**.

## Then

| To | See |
|---|---|
| automate what happens to files | [Jobs](Jobs.md), [Events](Users-Events.md) |
| see who does what | [Reports](Reports.md) |
| add a second server | [High availability](High-Availability.md) |
| put a server in front, in the outer network | [DMZ](DMZ.md) |
