🚤 How to use this image - zhliau/fika-headless-docker GitHub Wiki

[!NOTE] This image is confirmed to work on Unraid, Proxmox

This image will not run on WSL2 because of permissions issues.

This image will not run on ARM hosts.

Prerequisites

  • An SPT backend server running somewhere reachable by your docker host. Best if running on the same host.
  • A host with a CPU capable of running EFT+SPT Client (the actual game itself). This will be a disaster running on something underpowered like a Pi since the headless client will host the raid and run all of the AI and raid logic.
  • A directory on your host containing a working copy of the FIKA SPT Client.
    • This is the folder including the BepInEx folder with all your plugins, and the EscapeFromTarkov.exe binary. This copy must have been run at least once to be considered working. You can copy your working install from wherever you normally run your Fika client.
  • The Fika.Headless.dll plugin file (or Fika.Dedicated.dll if running SPT version < 3.11.0) in the FIKA SPT Client's BepInEx/plugins folder.

Steps

1. Prepare a Headless Client Installation

  • Copy SPT Installation: Locate your existing SPT installation folder (where you play SPTarkov + Fika) and create a copy of it in another location. This will serve as the headless client's installation. For example, if your SPT install is at D:\Games\SPT3.9, copy it to D:\Games\SPT3.9Headless. Or install a fresh SPT + Fika installation in a different directory.

2. Install Fika Dedicated Client Plugin

  • Download Fika Dedicated Plugin: Download the Fika.Headless.dll plugin file (or Fika.Dedicated.dll if running SPT version < 3.11.0) from the Fika Dedicated Releases.

  • Install the Plugin: Place the Fika.Headless.dll plugin into the headless client's BepInEx/plugins folder.

  • Ensure Fika Core Plugin is Installed: Verify that the Fika.Core.dll plugin is also present in the headless client's BepInEx/plugins folder.

3. Generate the Headless Client Profile and Launch Script

  • Stop the SPT Server: If your SPT + Fika server is running, close it.

  • Edit Fika Configuration: Open the fika.jsonc file located at <SPT server folder>/user/mods/fika-server/assets/configs/fika.jsonc in a text editor.

    • Find the headless section (or dedicated if SPT version < 3.11) and set "amount" to 1:

      "headless": {
          "profiles": {
              "amount": 1
          },
          // ...
      }
      
  • Start the SPT Server: Launch the SPT + Fika server (e.g. SPT.Server.exe or fika-spt-server-docker container) and wait until it fully loads. It should generate the headless client profile and launch script. Look for a message like Created 1 headless client profiles! in the server logs.

  • Retrieve Profile ID: The newly generated profile will have a username starting with headless_. The profile ID is the filename (excluding the .json extension) of the profile generated in the server's user/profiles directory. For example, if the profile is named 670c0b1a00014a7192a983f9.json, the profile ID is 670c0b1a00014a7192a983f9.

4. Configure the Headless Client

  • Edit Fika Core Configuration: Open the com.fika.core.cfg file located in the headless client's BepInEx/config/ directory.

    • Update values for Force Bind IP and/or Force IP. Set Force Bind IP to Disabled, and set Force IP to the IP of the docker host's interface. If you are running a VPN, then this is your VPN IP.

      ## Force Bind IP
      # Set to Disabled
      Force Bind IP = Disabled
      
      ## Force IP
      # Set to the IP address of your host interface (e.g., your LAN IP or VPN IP)
      Force IP = your.host.interface.ip
      

5. Run the Docker Image

  • Mount the Fika Client Directory: Ensure that your headless client installation directory is mounted to the directory /opt/tarkov in the container.

  • Set Environment Variables: When running the docker image, set the following environment variables:

    • PROFILE_ID to the profile ID obtained in step 3.

    • SERVER_URL to your server's URL or IP address.

    • SERVER_PORT to your server's port (usually 6969).

  • Run the Docker Container:

    docker run --name fika_dedicated \
      -v /path/to/fika:/opt/tarkov \
      -e PROFILE_ID=blah \
      -e SERVER_URL=your.spt.server.ip \
      -e SERVER_PORT=6969 \
      -p 25565:25565/udp \
      ghcr.io/zhliau/fika-headless-docker:latest
    

    With docker-compose file:

    services:
      fika_headless:
        image: ghcr.io/zhliau/fika-headless-docker:latest
        volumes:
          - /host/path/to/fika:/opt/tarkov
        environment:
          - PROFILE_ID=deadbeeffeed
          - SERVER_URL=your.spt.server.ip
          - SERVER_PORT=6969
        ports:
          - 25565:25565/udp
    

    If you are running the SPT server as a service in the same docker-compose stack, you can make use of docker-compose's network DNS to resolve the SPT server from the dedicated client:

    services:
      fika:
        # See https://github.com/zhliau/fika-spt-server-docker
        image: ghcr.io/zhliau/fika-spt-server-docker:latest
        volumes:
          - /host/path/to/serverfiles:/opt/server
        ports:
          - 6969:6969
      fika_headless:
        image: ghcr.io/zhliau/fika-headless-docker:latest
        # ...
        environment:
          # ...
          # Use service DNS name instead of IP
          - SERVER_URL=fika
          - SERVER_PORT=6969
        # ...
    

6. Verify the Headless Client is Running

  • Check Server Logs: Look for messages in the server logs indicating that the headless client has connected. Note that this may take a few minutes to happen (~5 minutes).

  • Start a Raid Using Headless Client:

    • Launch your SPT + Fika client, log in, and go to the raid selection screen.

    • Click on Host Raid and ensure that the Use Headless Host checkbox is available (not greyed out).

    • Check the box to host a raid using the headless client.