• Examples (iOS)
• Examples (Java/Android)
• Examples (C++)
Server API Documentation


» SmartFoxServer 2X Installation

The installation of the SmartFoxServer 2X platform is a very simple operation that requires only a few steps. We recommend to review the system requirements and proceed consulting the specific installation guide for the operating system of your choice.

» System Requirements

SFS2X is a truly multi-platform solution supporting all major operating systems capable of running the Oracle/OpenJDK Java Virtual Machine (JVM). This includes Windows (all versions), Linux, macOS (10.8+) and other Unix variants.

In order to evaluate and develop with SFS2X you just need 64MB of free memory and a 1.0Ghz processor.
For production environments we recommend a machine with at least 512MB of physical RAM and a 2.0Ghz processor.

A step-by-step video tutorial showing how to install SmartFoxServer is also available in our YouTube channel.


We have several partners offering advanced solutions to automatically deploy SFS2X in cloud environments
with a few clicks.

They all offer full featured dashboards to manage your virtual servers, allocate server resources and much more.


Find more informations and introductory videos on this page.


» Post-installation tasks

After the installation your SFS2X instance is ready to be started. By default the server binds exclusively the localhost IP address ( on the default TCP port 9933. This will enable you to immediately test the server locally without worrying of security problems. Only your local machine will be able to talk to the server initially.

In order to begin your evaluation just start the server and point your browser to http://localhost:8080.
This will bring up the welcome page referencing the Administration Tool and some example applications.

» Configuration Migration

If you have a previous SmartFoxServer installation and you wish to migrate its settings, extensions and data files you can use our Migration Tool or migrate the settings manually.

» Local firewall settings

If you have any problems accessing the server locally we recommend to check the settings of your personal firewall (every recent OS today provides one). You should make sure that traffic for TCP port 9933 is allowed bidirectionally.

» Exposing the server to the local network

NOTE: If you are running SFS2X version 2.9.0 or higher, you can skip to the next step. By default the server will use the unspecified address (IPv4) which binds all available addresses.

In order to allow other computers in the LAN to access your SFS2X instance you will have to configure the server to listen on your private LAN address. Launch the Administration Tool, choose the Server Configurator module in the sliding Administration modules panel on the left and add one or more local addresses to the list of bound IPs.

Add IP address

Click on the Add button. The list of available IP addresses will be auto-detected and presented in the dropdown. Select one of the available addresses, and leave the the other values to default (unless you need to change port number). Finally hit Submit and restart the server.

Select IP dialogue

» Exposing the server to the outside world

If your server/computer connects to the internet via a router you will need to setup port-forwarding, also known as NAT service, otherwise you can can skip this section entirely.

Setting up the NAT on your router will allow you to map your public IP address and port to the physical machine inside your network that runs the service (SFS2X in this case). In other words when the router will receive data on TCP port 9933 (SFS2X default) it will redirect those packets to the machine in your LAN running SmartFox.

A specific step-by-step guide on how to configure your router cannot be provided here because each brand and model differs from the others. We highly recommend to check the documentation coming with your router and follow their instructions. Typically it's a very quick operation that can be done via a convenient control panel.

If you are unsure about what your public address is, simply check this website.
For more help on port forwarding we also suggest this website.

All the examples provided with SFS2X are pre-configured to connect to (the localhost). In order to use them when your server is exposed in the LAN or the internet you will have to change the IP address in the xml configuration file (usually called sfs-config.xml) bundled with each example.

» SFS2X setup on a remote server

In order to setup SmartFoxServer 2X on a remote machine, for example an Amazon EC2 instance, after the installation you have to make some manual changes to the configuration before being able to access the Administration Tool. You should follow these steps:

  1. locate and open (in a text editor) the main SFS2X xml configuration file: {sfs-install-dir}/SFS2X/config/server.xml;
  2. under the <socketAddresses> tag, substitute the address with the private IP address of yor server (alternatively you can leave the localhost and add a new <socket> entry for the private IP);
  3. make sure that the <allowedRemoteAddresses> list have no entries (delete them if necessary), then save the changes;
  4. check the firewall settings: you have to allow communication over ports 8080 and 9933 (at least);
  5. start SmartFoxServer 2X, open a browser and type http://your-public-ip:8080 to have access to the page which links the Administration Tool and some examples (please notice that the examples won't work – see the previous note);
  6. open the AdminTool, enter the public IP of the server in the host field and the default username/password: you should now have access to your SFS instance.