Opens in a new tab
Server setup

Host a Fantasy Tennis server

Get the tools you need, build the emulator and connect a Fantasy Tennis client to your server.

Before you start

Tools and services for your server

Versions below come from the project README.

Build tools

  • JDK 21 to compile and run JFTSE
  • Maven 3.6.3 or later to build the project
  • Git to get the source

Server services

  • MySQL 8.0 to store game data
  • RabbitMQ 3.12 for messages between server components
  • Docker Compose if you use the container setup

Game client

  • Fantasy Tennis Thai 1.706 to connect to your server
Setup at a glance

From source code to your first connection

This path uses Maven to build JFTSE and runs the Java services locally. You can run MySQL and RabbitMQ locally or in containers.

  1. Prepare the services

    Start MySQL and RabbitMQ. Set the database and broker credentials in the server configuration.

  2. Build JFTSE

    Clone the repository and run mvn clean install from the project root.

  3. Initialize the server

    Run the auth server once with -import, then restart it without that flag. Check server.conf for each service. Import the remaining game data with scripts/import_sql.sh, then start the game and relay servers.

  4. Connect the client

    Launch the client once to create Serverinfo.ini. Set the auth server address and port there, then relaunch and sign in with the account you set up.

Before launching a service: Use the JAR your build produced in the module’s target directory. If the build placed server.conf and runtime assets under target/dist, launch from that directory so the service can find them.

After the first login

Configure and run your server

Start with a working local setup. Then check each connection from a player’s machine before inviting others. For what each service does, see the emulator module guide.

01 / LoginClient → Auth server

Serverinfo.ini tells the client where to sign in.

02 / ChannelClient → Game server

The GameServer row advertises the host and port for the channel.

03 / MatchPlayers → Relay

The relay carries match traffic. Test a match with a second client.

Configure each service

server.conf

Set the listening ServerPort for each service. The game server also reads RelayPort here. The default location is the working directory. To load it from another directory, set the JVM property conf.path.

application.properties

Configure database, RabbitMQ and service-to-service connections here. Start with the settings shipped with each module in your checkout.

Client and database endpoints

Serverinfo.ini points the client to authentication. GameServer records advertise game and relay endpoints. Check reachability from a player’s machine.

Database tables to know

GameServer
Check the channel’s advertised host and port. A loopback address only works for a client on the server machine. Check the corresponding relay record if players can join a channel but cannot enter a match.
Config
Look here for gameplay settings such as progression limits and reward multipliers. Check the key and value type for your build before changing it.
S_Maps and M_Scenarios
Maps and scenarios are separate records. Use Map_2_Scenarios to associate a scenario with a map.
S_Relationships
These records connect game entities for rules such as Guardian drops and rewards. Check the relationship type and role before editing either end of a link.
S_LotteryItemPool and S_Rarity
Lottery pools group products by gacha index and use rarity, quantity, weight and status to configure rewards. The lottery.* keys in Config control rules such as pity thresholds.
Product and K_Status
Check that the reward points to the intended product and that the pool entry is active.
Guardian_2_Maps and Skill_2_Guardians
Trace which Guardians appear on a map for a given scenario and which skills they can use.

Before changing game data: Back up your database, test one change at a time and verify it with a client on a test instance.

Setup help

Common questions

Find answers about joining a server, running one and troubleshooting connections.

Do I need to set up a server just to play?

You can join an existing community server. Pick one from the server directory and follow its instructions for downloading the client and creating an account.

What does Docker Compose set up?

The Compose file in the repository defines MySQL, RabbitMQ and an emulator container. The steps above use a local Java build. If you follow those steps, you only need the MySQL and RabbitMQ services from Compose.

Do I need to run the database import on every start?

Use -import for the initial auth-server import. Once it finishes, start the auth server without the flag. The remaining game data has its own import steps in the installation guide.

What should I check if the client cannot connect?

If login fails, check that the auth server is running and that Serverinfo.ini points to it. If login works but joining a channel fails, check the GameServer table. Its host and port must point to the game endpoint the client can actually reach. See the operator guide for the distinction.

Why does a service say server.conf is missing?

Check the working directory you launched it from. Put the module’s server.conf there or pass -Dconf.path=/path/to/config before -jar. Use the directory that contains the file.

Why can I connect locally but my friends cannot?

Check the addresses in Serverinfo.ini and the relevant GameServer records. An address such as 127.0.0.1 points to each player's own computer. Use addresses players can reach and check firewall rules and any router forwarding for the game endpoints they need.

Why are my lottery changes not showing up?

Check that the pool row is active and has the intended gacha index and product. The game server caches the pool. Check LotteryPoolCacheRefreshInterval in server.conf and allow for a refresh before testing again.

Why can players join a channel but not play a match?

Check that the relay is running and that its listening port matches the game server’s RelayPort and the corresponding GameServer record. Verify that the advertised endpoint is reachable from another client.

How can I test game-data changes safely?

Back up the database, then try the change on a test instance using a copy of the data. Change one thing at a time and verify the result in the client. The database table guide shows where to start for maps, Guardians and lottery rewards.