{"id":1528,"date":"2020-12-02T15:42:15","date_gmt":"2020-12-02T15:42:15","guid":{"rendered":"https:\/\/smartfoxserver.com\/blog\/?p=1528"},"modified":"2021-06-24T07:52:26","modified_gmt":"2021-06-24T07:52:26","slug":"launching-smartfoxserver-in-the-cloud","status":"publish","type":"post","link":"https:\/\/smartfoxserver.com\/blog\/launching-smartfoxserver-in-the-cloud\/","title":{"rendered":"Launching SmartFoxServer in the cloud"},"content":{"rendered":"\n<p>In early November 2020 we have launched a new cloud service called <a rel=\"noreferrer noopener\" aria-label=\"Overcast (opens in a new tab)\" href=\"https:\/\/overcast.smartfoxserver.com\" target=\"_blank\">Overcast<\/a> which joins the family of SmartFoxServer products.<\/p>\n\n\n\n<p>In this short series of articles we will be taking a look at how Overcast works, how to get started and and how it can help new or existing projects based on SmartFoxServer.<\/p>\n\n\n\n<!--more-->\n\n\n\n<h2>SmartFoxServer in the cloud<\/h2>\n\n\n\n<p>Essentially <a rel=\"noreferrer noopener\" href=\"https:\/\/overcast.smartfoxserver.com\/\" target=\"_blank\">Overcast<\/a> provides SmartFoxServer in the cloud, meaning that you can get <strong>all of the SFS2X features<\/strong> you&#8217;ve learned and used, directly in the cloud, from a convenient web interface, and without having to manually set up the hosting and server yourself.<\/p>\n\n\n\n<p>This includes also the database side of things, as Overcast allows you to deploy one or more <strong>MySQL<\/strong> servers for your storage needs that can be accessed from you SmartFox instances.<\/p>\n\n\n\n<h3>\u00bb Launching servers<\/h3>\n\n\n\n<p>To give you an idea of how <a rel=\"noreferrer noopener\" href=\"https:\/\/overcast.smartfoxserver.com\/\" target=\"_blank\">Overcast<\/a> works in practice here&#8217;s a quick example of how a new SmartFoxServer instance is created from the Overcast HQ.<\/p>\n\n\n\n<p>Once you have created an account you will start by creating an <strong>Application<\/strong> which will contain your SmartFox and database servers.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"624\" height=\"149\" src=\"https:\/\/smartfoxserver.com\/blog\/wp-content\/uploads\/2020\/11\/oc_createServer_1.png\" alt=\"\" class=\"wp-image-1531\" srcset=\"https:\/\/smartfoxserver.com\/blog\/wp-content\/uploads\/2020\/11\/oc_createServer_1.png 624w, https:\/\/smartfoxserver.com\/blog\/wp-content\/uploads\/2020\/11\/oc_createServer_1-300x72.png 300w\" sizes=\"(max-width: 624px) 100vw, 624px\" \/><\/figure>\n\n\n\n<p>Click on <strong>Create new<\/strong> and enter the details.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"624\" height=\"247\" src=\"https:\/\/smartfoxserver.com\/blog\/wp-content\/uploads\/2020\/11\/oc_createServer_2.png\" alt=\"\" class=\"wp-image-1533\" srcset=\"https:\/\/smartfoxserver.com\/blog\/wp-content\/uploads\/2020\/11\/oc_createServer_2.png 624w, https:\/\/smartfoxserver.com\/blog\/wp-content\/uploads\/2020\/11\/oc_createServer_2-300x119.png 300w\" sizes=\"(max-width: 624px) 100vw, 624px\" \/><\/figure>\n\n\n\n<p>The Application is now created and you can proceed by creating a <strong>new server <\/strong>via the &#8220;+&#8221; icon on the right side.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"624\" height=\"181\" src=\"https:\/\/smartfoxserver.com\/blog\/wp-content\/uploads\/2020\/11\/oc_createServer_3.png\" alt=\"\" class=\"wp-image-1534\" srcset=\"https:\/\/smartfoxserver.com\/blog\/wp-content\/uploads\/2020\/11\/oc_createServer_3.png 624w, https:\/\/smartfoxserver.com\/blog\/wp-content\/uploads\/2020\/11\/oc_createServer_3-300x87.png 300w\" sizes=\"(max-width: 624px) 100vw, 624px\" \/><\/figure>\n\n\n\n<p><strong>Step 1<\/strong>: choose the Region of the world where to launch the server and &#8220;SmartFoxServer&#8221; as its type.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"624\" height=\"264\" src=\"https:\/\/smartfoxserver.com\/blog\/wp-content\/uploads\/2020\/11\/oc_createServer_4-1.png\" alt=\"\" class=\"wp-image-1545\" srcset=\"https:\/\/smartfoxserver.com\/blog\/wp-content\/uploads\/2020\/11\/oc_createServer_4-1.png 624w, https:\/\/smartfoxserver.com\/blog\/wp-content\/uploads\/2020\/11\/oc_createServer_4-1-300x127.png 300w\" sizes=\"(max-width: 624px) 100vw, 624px\" \/><\/figure>\n\n\n\n<p><strong>Step 2<\/strong>:  assign a server name and choose the size of the hardware that will run the server.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"624\" height=\"350\" src=\"https:\/\/smartfoxserver.com\/blog\/wp-content\/uploads\/2020\/11\/oc_createServer_5.png\" alt=\"\" class=\"wp-image-1547\" srcset=\"https:\/\/smartfoxserver.com\/blog\/wp-content\/uploads\/2020\/11\/oc_createServer_5.png 624w, https:\/\/smartfoxserver.com\/blog\/wp-content\/uploads\/2020\/11\/oc_createServer_5-300x168.png 300w\" sizes=\"(max-width: 624px) 100vw, 624px\" \/><\/figure>\n\n\n\n<p><strong>Step 3<\/strong>: choose the SFS2X version you want to install and assign an Admin password.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"624\" height=\"186\" src=\"https:\/\/smartfoxserver.com\/blog\/wp-content\/uploads\/2020\/11\/oc_createServer_6.png\" alt=\"\" class=\"wp-image-1549\" srcset=\"https:\/\/smartfoxserver.com\/blog\/wp-content\/uploads\/2020\/11\/oc_createServer_6.png 624w, https:\/\/smartfoxserver.com\/blog\/wp-content\/uploads\/2020\/11\/oc_createServer_6-300x89.png 300w\" sizes=\"(max-width: 624px) 100vw, 624px\" \/><\/figure>\n\n\n\n<p>Finally double check the summary and choose a billing plan.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"624\" height=\"325\" src=\"https:\/\/smartfoxserver.com\/blog\/wp-content\/uploads\/2020\/11\/oc_createServer_7.png\" alt=\"\" class=\"wp-image-1550\" srcset=\"https:\/\/smartfoxserver.com\/blog\/wp-content\/uploads\/2020\/11\/oc_createServer_7.png 624w, https:\/\/smartfoxserver.com\/blog\/wp-content\/uploads\/2020\/11\/oc_createServer_7-300x156.png 300w\" sizes=\"(max-width: 624px) 100vw, 624px\" \/><\/figure>\n\n\n\n<h3>\u00bb Managing your servers<\/h3>\n\n\n\n<p>After launching one or more servers you will find all of your instances listed in the Application page.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"624\" height=\"260\" src=\"https:\/\/smartfoxserver.com\/blog\/wp-content\/uploads\/2020\/11\/app-list.png\" alt=\"\" class=\"wp-image-1554\" srcset=\"https:\/\/smartfoxserver.com\/blog\/wp-content\/uploads\/2020\/11\/app-list.png 624w, https:\/\/smartfoxserver.com\/blog\/wp-content\/uploads\/2020\/11\/app-list-300x125.png 300w\" sizes=\"(max-width: 624px) 100vw, 624px\" \/><\/figure>\n\n\n\n<p>From here you can access the details page, which contains runtime statistics and data about the server. Also you can click the <strong>tool box icon<\/strong> to launch the AdminTool or the <strong>gear icon<\/strong> to access more options, such as restarting the server, creating a snapshot and terminating the instance.<\/p>\n\n\n\n<h2>\u00bb Setup and connection<\/h2>\n\n\n\n<p>Via the <strong>toolbox icon<\/strong> you can launch the server&#8217;s <strong>AdminTool<\/strong> and login with username &#8220;<em>sfsadmin<\/em>&#8221; and the password you specified at the time of creation.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"624\" height=\"376\" src=\"https:\/\/smartfoxserver.com\/blog\/wp-content\/uploads\/2020\/11\/OC-admin.png\" alt=\"\" class=\"wp-image-1610\" srcset=\"https:\/\/smartfoxserver.com\/blog\/wp-content\/uploads\/2020\/11\/OC-admin.png 624w, https:\/\/smartfoxserver.com\/blog\/wp-content\/uploads\/2020\/11\/OC-admin-300x181.png 300w\" sizes=\"(max-width: 624px) 100vw, 624px\" \/><\/figure>\n\n\n\n<p>By default a SmartFoxServer instance launched in Overcast starts with no <strong>Zones<\/strong> defined, so we recommend to start setting up the server by creating one.<\/p>\n\n\n\n<p>Select the<strong> Zone Configurator<\/strong> tab and in the left hand panel click on the <strong>+Z<\/strong> button to add a new Zone.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"624\" height=\"385\" src=\"https:\/\/smartfoxserver.com\/blog\/wp-content\/uploads\/2020\/11\/OC-ZoneMgmt.png\" alt=\"\" class=\"wp-image-1611\" srcset=\"https:\/\/smartfoxserver.com\/blog\/wp-content\/uploads\/2020\/11\/OC-ZoneMgmt.png 624w, https:\/\/smartfoxserver.com\/blog\/wp-content\/uploads\/2020\/11\/OC-ZoneMgmt-300x185.png 300w\" sizes=\"(max-width: 624px) 100vw, 624px\" \/><\/figure>\n\n\n\n<p>When you&#8217;re done with the Zone settings hit the <strong>Submit<\/strong> button. This will store the configuration on the server side. Now you can select the Zone name from the left hand menu and click the &#8220;<strong>Play<\/strong>&#8221; button (right arrow) to start up the Zone. <\/p>\n\n\n\n<p>You can now test the server from the client side, by opening a connection and logging in the Zone.<\/p>\n\n\n\n<p>Here&#8217;s an example client code in Unity \/ C# to connect to your server:<\/p>\n\n\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\npublic class ConnectionExample : MonoBehaviour\n{\n    private SmartFox sfs;\n     \n    void Start()\n    {\n        \/\/ Create the SmartFox client instance\n        sfs = new SmartFox();\n         \n        \/\/ Add event listeners\n        sfs.AddEventListener(SFSEvent.CONNECTION, OnConnection);\n        sfs.AddEventListener(SFSEvent.LOGIN, OnLogin);\n         \n        ConfigData config = new ConfigData();\n        config.host = &quot;10.11.12.13&quot;;    \/\/ replace with your server IP\n        config.port = 9933;\n        config.zone = &quot;MyGameZone&quot;;     \/\/ replace with the correct Zone name\n         \n        \/\/ Connect\n        sfs.Connect(config);\n    }\n     \n    \/\/ Handle connection event\n    private void OnConnection(BaseEvent evt)\n    {\n        if ((bool)evt.Params[&quot;success&quot;])\n        {\n            sfs.Send(new LoginRequest(&quot;TestClient&quot;));\n        }\n        else\n        {\n            Debug.Log(&quot;Failed connecting to server!&quot;);\n        }\n    }\n\n    \/\/ Handle login event\n    private void OnLogin(BaseEvent evt)\n    {\n        Debug.Log(&quot;Login success!&quot;);\n    }\n}\n<\/pre>\n\n\n\n<h2>\u00bb Next steps<\/h2>\n\n\n\n<p>In the next installment we will walk you through the deployment of a game example in Overcast, including server side code and client, so that players can access it from the web.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In early November 2020 we have launched a new cloud service called Overcast which joins the family of SmartFoxServer products. In this short series of articles we will be taking a look at how Overcast works, how to get started and and how it can help new or existing projects based on SmartFoxServer.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[23,1,5],"tags":[79,58,125,132,41,7],"_links":{"self":[{"href":"https:\/\/smartfoxserver.com\/blog\/wp-json\/wp\/v2\/posts\/1528"}],"collection":[{"href":"https:\/\/smartfoxserver.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/smartfoxserver.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/smartfoxserver.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/smartfoxserver.com\/blog\/wp-json\/wp\/v2\/comments?post=1528"}],"version-history":[{"count":20,"href":"https:\/\/smartfoxserver.com\/blog\/wp-json\/wp\/v2\/posts\/1528\/revisions"}],"predecessor-version":[{"id":1738,"href":"https:\/\/smartfoxserver.com\/blog\/wp-json\/wp\/v2\/posts\/1528\/revisions\/1738"}],"wp:attachment":[{"href":"https:\/\/smartfoxserver.com\/blog\/wp-json\/wp\/v2\/media?parent=1528"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/smartfoxserver.com\/blog\/wp-json\/wp\/v2\/categories?post=1528"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/smartfoxserver.com\/blog\/wp-json\/wp\/v2\/tags?post=1528"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}