Java -jar forge-x.xx.x-installer.jar -installServer If you're installing Forge on a headless server with no graphical interface, run the following command in the directory where you downloaded the jar installer (replace 'x.xx.x' with the correct version number for the installer you downloaded):
Once downloaded, launch it and choose option 'Install server'. Firstly, you need the Forge installer, which can be downloaded from the official Forge download page.