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 Hosts 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 first, then on any shared platform machines in that region. 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 your community page with Open servers. 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 first, then on the shared pool. A 30-car server open for 30 days takes 30 drivers of a machine's capacity for those 30 days.
  • 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.

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.
Community hosted sim racing. Ratings, standings and stewarding in one place. Help