-
Notifications
You must be signed in to change notification settings - Fork 252
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.
- 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 setup:
- Generate a key, shove the public key in openssh format in
~/.authorized_keys
looks likessh_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
- Edit
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'
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
andace_world
CREATE DATABASE db_name;
- Create 3 users,
ace_auth
,ace_shard
andace_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]
pathUSE 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
- Install MySQL or MariaDB
-
MySQL minimum required version - 5.7.17+
- When installing on the same instance the ACE server will run on (recommended), select "Server Machine" as the server type.
- The optional "MySQL Workbench" application can be used to interface with the database to apply new and updated .sql files.
- MariaDB minimum required version - 10.2+
- Optionally install SQLYog editor on Github for the following steps
-
MySQL minimum required version - 5.7.17+
- Create three databases named
ace_auth
,ace_shard
, andace_world
- Load AuthenticationBase.sql and ShardBase.sql for their respective databases. These can be found in the Database\Base directory.
- 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.
- 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.
- Download the latest release of world data, extract and load into your ace_world database.
- 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.
-
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 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
Shard specific configurations are done in game, or on the console, using ACE commands.
- Create your first account as an admin at the ACE prompt:
accountcreate testaccount testpassword 5
- Launch ACClient directly with this command:
acclient.exe -a testaccount -v testpassword -h 127.0.0.1:9000
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