Machines

Register a machine, run the host agent on it, and fix a machine that is not reporting or has no room.

A machine is a Linux computer that runs your races. One Docker container on it, the host agent, starts an ACC server for each split when a race is due and stops it afterwards. This page explains how machines work and what to do when one isn't working.

How it works

  • You register the machine on bdr and get a host key for it.
  • You install the ACC dedicated server on the machine once and start the host agent with that key.
  • The agent contacts bdr every 30 seconds. bdr never connects to the machine, so the agent needs no inbound ports for the platform.
  • When a race is due, the agent starts one container per split, each on its own game port. When the race is over, it stops them.

Register a machine

  1. Select Register a machine in your community's checklist, or open Machines (the button on your community's Servers card) and select it under your community.
  2. Fill in the form:
    • Name: for example rack-one.
    • Region: where the machine is. Races are only placed on machines in the series' region.
    • Address: the public IP or host name of the machine. You can set it later.
    • Player capacity, Cores, Memory (MB): optional. See Capacity below.
  3. Select Register.

bdr shows the host key once, together with the setup steps.

Warning

Copy the host key before you select Done. bdr only stores a hash of it, so it can't show it again. If you lose it, select Rotate key on the machine's page to get a new one.

You must be an owner or admin of the community to register a machine. A machine only ever runs its own community's races.

Set up the machine

Follow the setup guide on the machine's page. It has every command filled in for your machine. In short:

  1. Prepare a Linux machine with Docker Engine and the compose plugin.
  2. Create /srv/bdr/acc and /srv/bdr/slots and give them to an ordinary user, not root.
  3. Install the ACC dedicated server into /srv/bdr/acc with SteamCMD, or copy the server folder over from a Windows PC. You need a Steam account that owns Assetto Corsa Competizione. The dedicated server can't be downloaded anonymously.
  4. Save the compose file from the guide as /srv/bdr/docker-compose.yml and start it.
  5. Open TCP and UDP ports 9601 to 9620 in the machine's firewall and in your router.
  6. Set Address drivers connect to and select Save.

After an ACC update, run the install command again (or copy the folder again). All race servers on the machine share this one install.

Status and heartbeat

The agent sends a heartbeat every 30 seconds. The machine's badge shows:

Badge Meaning
Online The last heartbeat arrived recently.
Stale Marked online, but no heartbeat for over 2 minutes.
Offline No heartbeat for over 2 minutes, or never.

The machine's page also shows:

  • Last heartbeat, with the agent version.
  • Containers running, with the Docker version and the image new race servers start from.
  • Needs attention: problems worth acting on, such as the agent not reporting while a race is due, a container that won't start, or a clock more than 5 seconds off.
  • Containers: the race servers the agent is running, with the version of the agent inside each. An empty list between races is normal. agent silent means a container is up but the agent inside it has stopped reporting. update pending means a newer image is available; see Updates below.
  • Next four hours: races that have reserved room on this machine.
  • Resource usage: CPU and memory over the last 6 hours. It fills in about two minutes after the agent starts.

Once the agent is reporting, the setup guide moves into Setup, address and ports at the bottom of the page.

Updates

When a new race server image reaches the machine, new race servers start from it at once. A server that is already running only moves to it once nobody has been on it for 15 minutes, so an update never interrupts drivers. A server finishing a race is never moved.

A new image has to run for 5 minutes before the agent trusts it. If its servers stop 3 times before that, the agent holds the image back. It goes back to the last image that worked, and the machine's page lists the image under Held-back images, with the reason. Once you have fixed the cause, select Try again. The agent then tries the image again from scratch.

Note

A held-back image usually points at the machine, not the image, for example a missing or broken ACC install. Check a container's log (see below) before you try again.

Capacity

Player capacity is the most drivers the machine may be booked for at any moment. If you leave it empty, it is 100. You can only set it when you register the machine. Later, the machine's page only lets you change the address.

Each race books room when you generate it, for the largest field it could have: Most splits × Split size. With the defaults that is 2 × 30 = 60 drivers. The booking runs from 5 minutes before the start until the end of the race plus 30 minutes. Races that overlap in time add up.

bdr looks for room on your community's machines in the series' region. The platform's own machines only take the official community's races, and those of a community the platform gave a grant, so a community usually needs at least one machine of its own for this. A grant is shown on your community's page, under Platform machines. A machine only needs to be registered to take bookings. It must be reporting by race time.

Open servers

An open server is an ACC server anyone can join, for open practice. Open one from the Open servers tab on your community's page. Pick a track, the cars, the sessions and how long it stays open. ACC loops the sessions for as long as the server is open. There is no entry list, and nothing on an open server counts for standings. Its results are kept, but they count for ratings only if the platform has made the server ranked. Only servers on the platform's own machines can be ranked; see Ratings.

  • It books room for all its cars for the whole time it is open, on your own machines. Only the official community's servers go on the platform's machines, and those of a community with a grant, as many at a time as the grant says. A 30-car server open for 30 days takes 30 drivers of a machine's capacity for those 30 days.
  • Machine picks which of your machines it runs on. Leave it on Any with room and it goes on the first with room.
  • There is no limit on how many a community opens, only the room on its machines.
  • The ACC settings come in folds: Joining (whether races lock once they start, track medals, SA, RC, a spectator password), Sessions (grid wait, overtime, formation lap), Conditions (time of day, time multiplier, temperature, clouds, rain, weather randomness), Race rules (mandatory pit stops, tyre change, refuelling, pit window) and Assists. Track medals, SA and RC are ACC's own entry checks; -1 lets anyone in. Leave a setting as it is for the platform's default.
  • Drivers find it in the ACC server list under your community's name and the server's name. Set a password to keep it to your community.
  • Select Stop to close it early. Its container stops within a minute and the room is free again.

Change a running server

Select Edit on a running server to change its name, track, cars, password, sessions, room, the ACC settings, or to keep it open longer. ACC reads its settings when it starts, so the server takes the change on once nobody has been on it for 5 minutes. Restart now applies it at once: everyone on the server is dropped, and it is back in the server list within a minute or two.

More cars or more days book room on its machine again. If the machine has no room, nothing changes and you are told why. A server keeps its machine and port; a server can stay open for at most 90 days from now.

Admin password

Each open server has an admin password, shown to owners, admins and stewards under the running server: select Show or Copy. In the game's chat, type /admin and the password. You can then /kick or /ban a car by its race number, or /next to skip to the next session. Keep it within your community's staff.

Balance of Performance

An open server can race on a Balance of Performance set: ACC's bop.json, extra ballast and restrictor per track and car. The server gets the entries for its track, and the set's name goes at the end of its server name, so drivers see whose balance they race on. Without a set, it races on ACC's own balance.

Your community's sets are on the BoP tab. Upload a bop.json under a name; a file under an existing name replaces that set, and servers using it switch once nobody is on them. Pick a set when you open a server, or change it on a running one.

  • Your sets are your community's alone. No other community sees or uses them.
  • You answer for the file. When you upload, you confirm that your community may use it. A balance someone else made comes with their terms. LFM's BoP, for example, is for LFM supporters' own servers, so upload your own copy under your own membership. bdr keeps who uploaded each file.

What a driver costs

The What a driver costs table on the same page lists every minute your pool servers ran, open servers and race splits alike, by how many drivers were on them:

Column Meaning
CPU avg, CPU p95 How busy the server's container was, in cores. 1.00 is one whole core.
Memory max The most memory the container used.
Late steps / min How often per minute ACC reported that the server fell behind ("Server was running late ... not enough CPU power"). A few per second are normal and drivers don't notice them. Watch for a rate that climbs steeply as the field gets bigger: that is where the field size needs more room on the machine.

An open server left running for a few weeks fills in the field sizes that actually turn up. Select Load curve on a server to see its CPU, memory, drivers and late steps over time, minute by minute on one time axis, so you can see whether late steps follow drivers joining or a CPU peak.

The machine's agent records the drivers and late steps together with CPU and memory. If the machine loses its connection to bdr, it keeps these minutes and sends them once it is back, so the table has no gaps.

Troubleshooting

The agent is not reporting

  1. On the machine, check the agent's log: docker compose logs -f host-agent in /srv/bdr.
  2. HTTP 401: the platform rejected the API key means the key is wrong. Rotate the key on the machine's page, put the new key into the compose file, and run docker compose up -d again.
  3. network error means the agent can't reach bdr. Check the platform address in the compose file and that the machine allows outbound HTTPS.

Warning

Rotating the key stops every race server on the machine from authenticating. Don't rotate during a race.

A container won't start

The Containers list shows each container's state, its restarts and, in red, the last error the agent got from Docker. For more detail, read the container's own log on the machine, for example docker logs bdr-1. The containers are named bdr-1, bdr-2 and so on.

The most common cause is a missing ACC install: /srv/bdr/acc/server/accServer.exe must exist. The container's log then says "No accServer.exe in the machine's shared install". Repeat the install step of the setup guide.

Drivers can't join

Check that TCP and UDP ports 9601 to 9620 reach the machine, both in its firewall and in your router. Each race server running at the same time uses one port number. Also check the machine's address.

"No machine has room"

If Generate races fails with "no machine in EU has room for 60 drivers then", the region has no machine with enough free capacity at that time. To fix it:

  • Lower Most splits or Split size in the series.
  • Space the races further apart, or pick another time.
  • Register another machine in that region.