1)Start Selenium server as Hub just placing a cmd : java -jar selenium....jar -role hub hubconfig.json
2) Start two appium servers as nodes for two devices as,
i)appium --nodeconfig path\to\nodeconfig1.json -p 4723
ii)appium --nodeconfig path\to\secondconfigfile\nodeconfig2.json -p 4724
3) You can call them through testng.xml as parallel tests.
Regards,
Bhaskar.