Skip to content
Rayisken edited this page Dec 7, 2021 · 81 revisions

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

SSH & Firewall setup [Linux - Ubuntu] 

  SSH setup:

  • Generate a key, shove the public key in openssh format in ~/.authorized_keys looks like ssh_rsa 'DASFASFASVFHDASVFHDASVFDASFDSAFASDFDASFADFSFVASFVDASFVHASDVFHASDVFHADSVFHDASVFHDASV somecomment you'll be able to login as the user you shove the key into the folder of.
  • if using WinSCP for sftp management import key and save in .ppk format in your .ssh folder as well
  • Check you can login without a password (using the key)
    • Edit /etc/ssh/sshd_config
    • Change port, this isn't a security measure, it is just to avoid getting your logs spammed by bots
    • Optionally set PermitRootLogin to yes, some will argue you should never login as root to a server some will
    • Set PasswordAuthentication to no, make sure the key works before doing this
    • sudo systemctl restart sshd
    • sudo systemctl status sshd ensure its running

Firewall setup:

  • sudo ufw allow [yoursshport] make sure you rebooted sshd otherwise it won't have your new port and will refuse connections
  • sudo ufw allow 9000 allow game port
  • sudo ufw allow 9001
  • sudo ufw enable this will enable the firewall, possibly dropping your ssh connection

Github

  • Fork Repository and clone using git clone 'repository url'
  • Create a /DAT/ directory in /ACE/ and place your DAT files there

MariaDB setup:

  • sudo apt install mariadb-server
    • sudo mysql_secure_installation, say yes to everything and change the root password
    • sudo mysql -p to login
  • Create 3 databases, ace_auth, ace_shard and ace_world
    • CREATE DATABASE db_name;
  • Create 3 users, ace_auth, ace_shard and ace_world with respective access to their databases (ideally you'd limit the access further) Now the firewall setup will prevent you from connecting to your DB externally but that is fine, many sql clients will have an option to use an ssh tunnel to connect for sql clients, dbeaver or heidisql are options that support ssh tunneling.
    • USE db_name Selects the DB
    • CREATE USER 'username'@localhost IDENTIFIED BY 'password'; Creates the user and password
    • GRANT ALL PRIVILEGES ON 'db_name'.* TO 'username'@localhost; To grant privileges only for the DB in use
    • FLUSH PRIVILEGES; It’s crucial to refresh the privileges once new ones have been awarded
  • Load AuthenticationBase.sql ShardBase.sql WorldBase.sql for their respective databases. These can be found in the [Database\Base] path
    • USE db_name
    • SOURCE [use the full path to 'AuthenticationBase.sql' 'ShardBase.sql' 'WorldBase.sql']
  • Download the latest release of world data, extract and load into your ace_world database https://github.com/ACEmulator/ACE-World-16PY + https://github.com/ACEmulator/ACE-World-16PY-Patches

Dotnet SDK+Runtime:

  • https://docs.microsoft.com/en-gb/dotnet/core/install/linux-ubuntu#2004, use 5.0
  • From: /home/asheron/ACE/Source/ACE.Server Copy ACE.Server`Config.js.example to ACE.Server\Config.js(change it's name when prompted as a duplicate file) and modify settings, such as DAT folder, passwords and other server settings per your need. (WinSCP if headless comes in handy here) *In ACE/Source, run dotnet build *InACE/Source/ACE.Server/bin/x64/Debug/net5.0runsudo dotnet ACE.Server.dll` ACE Server should now launch

Database

  1. Install MySQL or MariaDB
  2. Create three databases named ace_auth, ace_shard, and ace_world
  3. Load AuthenticationBase.sql and ShardBase.sql for their respective databases. These can be found in the Database\Base directory.
  4. Load all incremental SQL updates found in the Database\Updates\Authentication sub directory in the order of oldest to newest. Skip this step if there are no updates in this directory.
  5. Load all incremental SQL updates found in the Database\Updates\Shard sub directory in the order of oldest to newest. Skip this step if there are no updates in this directory.
  6. Download the latest release of world data, extract and load into your ace_world database.
  7. SKIP THIS STEP IF USING DOWNLOADED WORLD DATA FROM PREVIOUS STEP.
    • 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.
    • Load WorldBase.sql from Database\Base into your ace_world database
    • Load all incremental SQL updates found in the Database\Updates\World sub directory in the order of oldest to newest. Skip this step if there are no updates in this directory.

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.  
     

Installing and Running the Server

Host Agnostic Config.js Recommendations

Host specific information can be found in both the Windows and Linux Specific Instructions.
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

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

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