To start with you need to download the installer, you can do this in one of two ways. You can either download from the website, look for the modpack you'd like to install, then click the server files tab, circled in green. You then get the option to download the server installer for either Windows, Linux or Mac, circled in red.
On Windows, this file will have an exe extension, you can put the executable into an empty folder that you would like to install the server into. You can just double click the installer to start the install process, for the purposes of showing the options available I'll be using the command line.
On Linux and Mac, the file will not have an extension and you will need to grant execute permissions on it with the command the numbers at the end of the file will change depending on which pack and version you are trying to install. You can then execute the file with note that there is a period and a forward slash in front of the filename.
The rest of the instructions are the same no matter which OS you are using to install the server. The first prompt you will get when you run the installer is to confirm the directory that you'd like to install into:
You can either press <Enter> to use the default and install into the current directory, or enter an alternative install directory to install into and then press enter.
This is now asking you if you are sure that you want to install into an already existing directory, press enter again to confirm.
Now it confirms the modpack and version that you are installing, if this is correct, press enter, if not type n and then enter to cancel.
The installer will then proceed to download all the relevant files:
Depending on the pack and your internet connection this could take a few minutes. Once it's finished you will see the last lines similar to this:
The directory should then look something like this:
If you are on Mac or Linux you will have start.sh instead of start.bat.
You can now start the server by running that start script. If you would like to update the server to a new version at a later date, you can run the installer again with the --latest switch to grab the latest update.
There are a few command line switches that you can use to further customise how the installer runs. You can see a full list of these by executing the file with --help:
Using the various command line options listed here you can have the installer run without user prompts for a completely scriptable install/update or integrity check. I was going to go into a little more detail about some of these options but they explain themselves quite well. Note that the installer initially pulls the modpack id and version id from the filename of the installer itself.