Create a folder somewhere that will be the server folder.
Open the pack folder.
Select everything in pack folder.
Now copy that selection. For example right click the selection and choose copy.
Open the server folder you made in step #1.
Paste. for example right click and choose paste.
Download the installer for the version of Forge that you used to make the pack from files.minecraftforge.net
Move this installer jar to the server folder
Open your shell/terminal/cmd/powershell
Enter the server folder you created, you might have to navigate to it in your file manager.
Use the command java -jar name_of_installer.jar --installServer
A bunch of stuff will happen
At this point the server is created but not debugged
I recommend deleting installer jar as you don’t need it anymore.
Start the server
In your shell get a directory listing of the jars (Linux: ls *.jar Windows: dir *.jar)
If you haven’t done so already, delete the installer jar.
There will be a new jar file that doesn’t say installer and starts with Forge, this is the file you will be executing, note it down.
From your shell to start the server do java -jar forge_no_installer.jar
The server has started.
Debug the server (do not run the client here)
The server you created will likely crash because quite a few mods are not server friendly or coded in such a way that they will try to load client side classes on a server. When it happens there will be a crash report. Open the file and look at the top trace block to see what crashed.
Check to see if there is an update for the mod, if yes, update it on both the server and the client, rerun the server
If the server crashes again on the same mod, try a lower version, make sure the client matches
If it crashes again, remove the mod from both the server and the client
Eventually you’ll have a running a server and client that should connect to it
Debug the client
Great job on creating a functioning server
now run the client that was adjusted alongside the server
if it crashes look at the crash report and either update, rollback or remove the mod from the client and on the server if it exists
eventually you’ll have running client
Final Step
start the server
start the client
enter multiplayer button on client
click on direct connect
enter the ip address of the server and hit connect
in a short few moments you should now be connected to your server