Jump to content
AC Tool Forums
Sign in to follow this  

How to host a ACEmulator server for Asheron's Call [NEW VERSION]


Description

This is a Tutorial on how to setup a ACEmulator server to host your own Asheron's Call server. This is a new version of the Tutorial based on the current version of ACEmulator and how to install it. Updated: 2021/02/21 10:32 (UTC -7)

Sometime ago I created a Tutorial on how to setup and host your own ACEmulator server. It required Micro$ucks Visual Studio 2017 to compile the binaries and that it could only be deployed on a Windows system. Since that time the Devs of ACEmulator has made it easier to deploy the server. You no longer need Visual Studio and you can now deploy the server to Windows, Linux, even a Raspberry Pi 4 (64-bit).

As such I thought it was time to create a new Tutorial. So, let's get to hosting our own Asheron's Call ACEmulator server.

My full recommendation is that if you had used the previous Tutorial to create your ACEmulator host. That you completely uninstall Micro$ucks Visual Studio 2017, and all the packages and extensions that Visual Studio had installed, and the Database server software prior to your installing the current version of ACE and the Database. Then perform a complete fresh clean install following this Tutorial.

 

 

 

ACE Hosting

ACE consists of two main components. The database and the server (executable).

ACE is very demanding on the database. This load increases with player count. For this reason, it is highly recommended your database be installed on the same instance as your server.

 

Recommended System Requirements

  • 1-10 Players
    • 2 Threads
    • 4 GB RAM
  • 11-49 Players
    • 4 Threads
    • 8 GB RAM
  • 50-499 Players
    • 6 Threads
    • 16 GB RAM
  • 500+ Players
    • 8 Threads
    • 32 GB RAM
    • 2 Mbps incoming network traffic
    • 12 Mbps outgoing network traffic

Now that we know the minimum required spec for the hardware. Let's move on to deciding our server setup.

I created the following check list to help decide on software side of things.

Database

Operating System

_____ Windows     _____ Linux

Database software

_____ MySQL v5.7.17 or newer     _____ MariaDB v10.2 or newer

ACE Server

Deploy on what Operating System

_____ Windows (64-bit)     _____ Linux (64-bit)     _____ Raspberry Pi 4 (64-bit)

Windows deployment

_____ Using precompiled Binaries     _____ Build the Binaries

 

Download

Now that we have decided on the software side of the server(s). We will now download what we need.

 

Required

AC DAT files: Here
World data (for database): Latest release

.Net Core 3.1.0 package

Deployed on Windows

Using precompiled Binaries: Runtime 3.1.0, Windows x64

Build Binaries: SDK 3.1.100, Windows x64

Deployed on Linux: .Net Core SDK

ACE Server

Latest Release (Source Code and Windows Binaries): Here

Linux Users may use git to clone the project: git clone https://github.com/ACEmulator/ACE.git

Database

MySQL, minimum required 5.7.17 or newer

Windows: Here

Linux: Here

MariaDB, minimum required 10.2 or newer: Here

Optional:

SQLYog editor (to help create the database): Here

 

Installing the Server:

ACE Hosting Windows

Windows (64-bit)

This will go into installing the ACE server specifically on Windows.

 

ACE can be deployed in two different ways.

  1. Using precompiled binaries obtained from a release, or a different build computer
  2. Building the binaries on the host from a local source repository.

Both scenarios share some common prerequisites.

Create the following directories:

  • C:\ACE\Dats
  • C:\ACE\Logs
  • C:\ACE\Server

Extract the AC DAT files archive. And copy the following files to the "C:\ACE\Dats" folder:

  • client_cell_1.dat
  • client_local_English.dat
  • client_portal.dat


Method 1. Using precompiled Binaries

Method 1. Using precompiled Binaries
  1. Install the .Net Core Runtime 3.1.0, Windows x64 that you downloaded previously
    • You do not need the full SDK if you're using the precompile binaries.
  2. Extract and/or copy the ACE server binaries to "C:\ACE\Server"
    • The file "C:\ACE\Server\ACE.Server.exe" should now be present

 

Method 2. Building your own binaries locally

Method 2. Building your own binaries locally
  1. Install the SDK 3.1.100, Windows x64 that you downloaded previously
    • This includes the runtime necessary to run the server.
  2. Extract the Source Code repository archive, that you downloaded earlier
    • Create another folder "C:\ACE\Repository"
    • Copy the contents of the Source Code repository to the new folder.
  3. Locate the file "Config.js.example" and copy it to "Config.js"
    • This may be in a path like ".\Source\ACE.Server\Config.js.example"
    • You don't need to edit this file now. We will edit it later.
  4. Open a command prompt and navigate to the directory that contains the ACE.sln
    • This will likely be in the root of your repository
  5. Build the server files with the following command
    • dotnet build ace.sln --configuration Release --output C:\ACE\Server\

 

Configuring the Server (Host)

  • Host specific configuration is done via the Config.js file.
  • Logging is configured via the log4net.config file.

Edit the "C:\ACE\Server\Config.js"

  • If you don't have an existing Config.js, you'll need to start fresh by copying over the "Config.js.example" to a new file named Config.js.
  • If your distribution does not contain a Config.js.example, you can obtain the latest one from here.
  • This file is very well commented. Please read the comment for each property. Configuring the server properly can make a big impact on both server performance and performance troubleshooting.

Edit the "C:\ACE\Server\log4net.config"

  • If your distribution does not contain a log4net.config, you can obtain the latest one from here.
  • Location the following line:
    • value="ACE_Log.txt"
  • and replace with
    • value="C:\ACE\Log\ACE_Log.txt"

ACE Hosting Linux

Spoiler

This will go into deploying the ACE server specifically on Windows.

Code

  1. Install .NET Core SDK that you had download earlier.
  2. Clone the project with git, If you have not already done so earlier.
  3. Copy ACE.Server\Config.js.example to ACE.Server\Config.js and modify settings, such as DAT folder, passwords and other server settings.
  4. In ACE/Source, run:
    
    dotnet build

     

Raspberry Pi 4 (64-bit): Here

Instead of providing the information to install ACE on a Raspberry Pi 4. I provided the link original Wiki page for those few people that wish to install ACE on a Raspberry Pi 4.

 

Database

Database
  1. Install MYSQL or MariaDB
    • MySQL minimum required version - 5.7.17 or newer
      • When installing on the same system that the ACE server will run on (recommended), Select "Server Machine" as the server type.
      • The option "MySQL Workbench" application can be used to interface with the database to apply new and updated .sql files
    • MariaDB minimum required version - 10.2 or newer
    • Optionally install SQLYog editor for the following steps.
  2. Create three databases name ace_auth, ace_shard, and ace_world
  3. Load AuthenticationBase.sql and ShardBase.sql for their respective databases. These can be found in the:
    • Windows
      • If using precompile binaries: C:\ACE\Server\DataBaseSetupScripts\Base
      • If building binaries: C:\ACE\Repository\Database\Base
    • Linux: .\Database\Base
  4. Load all incremental SQL updates found in following sub-directory in the order of oldest to newest.
    Skip this step if there are no updates in this directory:
    • Windows
      • If using precompile binaries: C:\ACE\Server\DataBaseSetupScripts\Base
      • If building binaries: C:\ACE\Repository\Database\Base
    • Linux: .\Database\Base
  5. Load all incremental SQL Updates found in the following sub-directory in the order of oldest to newest.
    Skip this step if there are no updates in this directory.
    • Windows
      • If using precompile binaries: C:\ACE\Server\DataBaseSetupScripts\Base
      • If building binaries: C:\ACE\Repository\Database\Base
    • Linux: .\Database\Base
  6. Extract the world data archive (ac_update.zip), that you downloaded earlier, and load it into your ace_world database.
  7. SKIP THIS STEP IF USING DOWNLOADED WORLD DATA FROM THE PREVIOUS STEP.
  8. If using a custom database, you may need to update the schema for the emulator to operate correctly.
    If you're using the official release data, this step is not recommended.
  9. Load WorldBase.sql from the following sub-directory into your ace_world database
    • Windows
      • If using precompile binaries: C:\ACE\Server\DataBaseSetupScripts\Base
      • If building binaries: C:\ACE\Repository\Database\Base
    • Linux: .\Database\Base
  10. Load all incremental SQL updates found in the following sub-directory in the order of oldest to newest.
    Skip this step if there are no updates in this directory.
    • Windows
      • If using precompile Binaries: C:\ACE\Server\DataBaseSetupScripts\Base
      • If building binaries: C:\ACE\Repository\Database\Base
    • Linux: .\Database\Base

 

Recommended Database Configuration

  • inno_db_buffer_pool_size This setting can have a significant impact on your database performance. The minimum size recommended for a public server is 2G. As the server approaches 500+ active players, the recommended buffer pool size will grow to over 5G. You will need to manage the memory consumed by your database and the ACE server vs the total system memory available. The buffer pool size should not exceed more than half of your total system memory. Using about 25% of your system memory for the buffer pool is a likely safe number for a common ACE configuration, assuming your system is provisioned at or greater than the recommended system requirements described above.

 

Host Agnostic Config.js Recommendation

Host specific information can be found in both the Windows and Linux Specific Instructions above.

The Config.js already has documentation. However, we have found the following settings pair well with typical servers of the given player counts:

  • 1-10 Players
    • WorldThreadCountMultiplier: 0.34
    • MultiThreadedLandblockGroupPhysicsTicking: false
    • MultiThreadedLandblockGroupTicking: false
  • 11-49 Players
    • WorldThreadCountMultiplier: 0.5
    • MultiThreadedLandblockGroupPhysicsTicking: true
    • MultiThreadedLandblockGroupTicking: false
  • 50-499 Players
    • WorldThreadCountMultiplier: 0.5
    • MultiThreadedLandblockGroupPhysicsTicking: true
    • MultiThreadedLandblockGroupTicking: true
  • 500+ Players
    • WorldThreadCountMultiplier: 0.5
    • MultiThreadedLandblockGroupPhysicsTicking: true
    • MultiThreadedLandblockGroupTicking: true

 

Running the Server

Start the server with the following commands:

  • Windows:
    "C:\ACE\Server\ACE.Server.exe"

     

  • Linux:

    • In ACE/Source/ACE.Server/bin/x64/Debug/netcoreapp3.1, run the server with
      dotnet ACE.Server.dll

 

Configuring the Server (Shard)

Shard specific configurations are done in game, or on the console, using ACE Commands.

 

Connecting to the Server

  1. Create your first account as an admin at the ACE prompt:
    accountcreate testaccount testpassword 5

     

  2. Launch ACClient directly with this command:
    acclient.exe -a testaccount -v testpassword -h 127.0.0.1:9000

 

Resources

View the ACE Wiki for additional and/or new information.

ACE provides help for server operators. The ACE Discord can be a great resource with advice available from other server operators as well as developers.

Tutorial Videos

Optionally you can add videos from Youtube or Vimeo to your tutorial



Recommended Comments

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Add a Comment

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and to our Privacy Policy.