The easiest way is to download the twitch app (https://app.twitch.tv/
Click on the Mods tab – Find Minecraft – You’ll see a tab that says my modpacks, it will be empty.
Next to that is Browse all Modpcks – search for FTB Presents Direwolf20 1.12 and select that.
Next, go back to My Modpacks and play Direwolf20
The Minecraft Launcher will open and the Direwolf20 profile will be selected. You will need to edit the profile.
Select Launch Options and click on the direwolf profile – under JVM arguments, change -Xmx307sm to -Xmx4g or -Xmx6g
This changes the amount of ram allocated to the game. It needs to be at least 4g, however, we have found that 5g or 6g works better. Play with this setting if you cannot connect or keep crashing.