---
title: Run your first attack/defence event
description: Take a small attack/defence event from creation to an open game network, one step at a time.
---

In this tutorial you'll create an attack/defence event, register one service with its checker, lock the roster, reserve the event host and open the game network. You'll need a workspace on the Pro or Enterprise plan, a service image and a checker image in a container registry you control, and at least two players with accounts on the event site.

:::note
If you haven't built a checker yet, read [The checker contract](/organizers/attack-defence/reference/checker-contract) first. If you already have one written for ctf-gameserver, Hackerdom checksystem, ForcAD or enochecker3, see [Import an existing checker](/organizers/attack-defence/how-to/import-an-existing-checker).
:::

1. **Create the event**

    On the dashboard, click **Create Event**. Under **Basic details**, set
    **Format** to **Attack/defence**. The format can't be changed after
    creation.

    Fill in the name, slug, flag prefix and schedule as for any event. An
    **Attack/defence host** section then appears:

    - **Host region** and **Host image**: where the event host runs and which
      qualified host image it boots. Both are fixed at creation.
    - **Declared host size**: a starting point only. The real size is quoted
      later from the locked roster.
    - **vCPU per team**, **Memory per team (MiB)** and **Disk per team (GiB)**:
      what each team's box receives.
    - **Admitted teams (cap)**: the most teams the roster may admit.
    - **Tick (seconds)**, **Flag validity (ticks)** and **Checker timeout
      (seconds)**: the game's clock. The checker timeout must be shorter than
      a tick.
    - **Roster deadline**: when team creation closes and the roster locks, if
      you haven't locked it yourself before then.
    - **Network profile**: the network policy the host applies. Fixed at
      creation.

    Submit the form. The platform builds the event site; the event host
    doesn't exist yet.

2. **Register a service**

    Open **Services** in the event dashboard and click **Register a service**.
    Give it a name and a slug (for example `notes-api`), then enter:

    - **Service image**: the image every team's box runs.
    - **Checker image**: your checker. Teams never receive it.
    - **Ports**: every port and protocol the service listens on. Port 22 is
      reserved for box administration, and no two enabled services may share
      a port and protocol, because they run in the same box.
    - **Flag stores**: how many separate places the service keeps flags.
    - **Checker timeout**: leave it on **Event default** unless this service
      needs a different one.

    If either image is in a private registry, add its pull credentials. Click
    **Register service**. Athena resolves both references to their digests
    against your registry and pins those digests; nothing is copied.

    Attach a **source archive** if teams should get the service's source.
    Teams can download it once the network opens.

3. **Let teams form, then lock the roster**

    Players create teams on the event site's **Team** page and join them with
    the team's handle and join password, until the roster deadline. When every
    team you expect exists, open the event overview and, under **Game state**,
    click **Lock roster**.

    Locking admits and numbers every team that exists at that moment. Team
    creation and disbanding are refused for the rest of the event, because the
    host is sized from this roster. Players can still join or leave an admitted
    team.

4. **Get a quote and reserve the host**

    Open **Event host**. Under **Sizing quote**, click **Get a quote**. If something
    is missing, the card lists it instead, for example an unlocked roster or a
    settings change that hasn't finished synchronizing.

    The quote shows the host size, any extra storage volume, how many teams
    fit and the hourly price. Click **Reserve host** and confirm. The hold is
    taken from your wallet and the host is created. Allocation takes several
    minutes: the host boots, pulls your images, creates one box per team and
    runs its own checks.

5. **Check that everything is ready**

    Watch **Event host** until it reports ready, then open **Team boxes**:
    every admitted team has a box with an address. Open **Checker runner** to
    see that the runner is connected.

    Before you open the network, run a diagnostic from **Checks** against one
    team's service to confirm your checker reaches it. Diagnostics never
    change scores.

6. **Open the game network**

    On the event overview, click **Request open** under **Game state** and
    confirm. The platform snapshots every box, applies the event's network
    policy and starts ticks. From that moment teams can reach each other's
    services, and the game settings are frozen.

    The request can't be withdrawn. If a prerequisite isn't met yet, the
    network opens as soon as it is.

## What you did

You created an attack/defence event, registered a service and its checker, locked a roster, reserved a dedicated host and opened the game. To run it from here, see [Run the game](/organizers/attack-defence/how-to/run-the-game) and [Diagnose failing checks](/organizers/attack-defence/how-to/diagnose-failing-checks).
