Assetto Corsa (Freeroam + AI)

games
Report Issue

Custom Assetto Corsa server with focus on freeroam

Contributors:
README

Assetto Corsa

Assetto Corsa is a sim racing video game developed by the Italian video game developer Kunos Simulazioni. It is designed with an emphasis on a realistic racing experience with support for extensive customization and moddability.

Server Ports

Asseto Corsa requires two ports, game port is UDP and WEB HTTP port is TCP.

Port default
Game 9600
HTTP 8081

Notes

9600 is the default port, but any port can be used.

Freeroam + AI

This egg uses: GitHub Website

Docker Images (1)
Name Image
Dotnet_8 ghcr.io/ptero-eggs/yolks:dotnet_8
Startup Command
./AssettoServer
Variables (5)

Server name

The name off the server

Environment:
SERVER_NAME
Default:
AC_Server
User Viewable:
User Editable:
Rules:
required|string|max:40

Server Password

Environment:
SERVER_PASSWORD
Default:
None
User Viewable:
User Editable:
Rules:
nullable|string|max:64

Http port

Environment:
HTTP_PORT
Default:
None
User Viewable:
User Editable:
Rules:
nullable|numeric|

Admin Password

Environment:
ADMIN_PASSWORD
Default:
None
User Viewable:
User Editable:
Rules:
required|string|max:64

Max clients

Environment:
MAX_CLIENTS
Default:
18
User Viewable:
User Editable:
Rules:
required|numeric|between:2,25
Installation Script
Container: ghcr.io/ptero-eggs/installers:debian
Entrypoint: bash
#!/bin/bash

apt update
apt -y install curl git jq tar

## get release info and download links
LATEST_JSON=$(curl --silent "https://api.github.com/repos/compujuckel/AssettoServer/releases/latest")
RELEASES=$(curl --silent "https://api.github.com/repos/compujuckel/AssettoServer/releases")
MATCH=$([[ "$(uname -m)" == "x86_64" ]] && echo "linux-x64" || echo "linux-arm64")
VERSION=latest

if [ -z "${VERSION}" ] || [ "${VERSION}" == "latest" ]; then
    DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i ${MATCH})
else
    VERSION_CHECK=$(echo ${RELEASES} | jq -r --arg VERSION "${VERSION}" '.[] | select(.tag_name==$VERSION) | .tag_name')
    if [ "${VERSION}" == "${VERSION_CHECK}" ]; then
        DOWNLOAD_URL=$(echo ${RELEASES} | jq -r --arg VERSION "${VERSION}" '.[] | select(.tag_name==$VERSION) | .assets[].browser_download_url' | grep -i ${MATCH})
    else
        echo -e "defaulting to latest release"
        DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i linux | head -1)
    fi
fi

mkdir -p /mnt/server
cd /mnt/server

curl -sSL -o assetto-server-linux.tar.gz ${DOWNLOAD_URL}

tar xvf assetto-server-linux.tar.gz
rm assetto-server-linux.tar.gz
chmod +x AssettoServer

mkdir cfg/
cd cfg/

[ -f "server_cfg.ini" ] || curl -sSL -o "server_cfg.ini" "https://raw.githubusercontent.com/ptero-eggs/game-eggs/main/assetto_corsa/cfg/server_cfg.ini"
[ -f "extra_cfg.yml" ] || curl -sSL -o "extra_cfg.yml" "https://raw.githubusercontent.com/ptero-eggs/game-eggs/main/assetto_corsa/cfg/extra_cfg.yml"
[ -f "entry_list.ini" ] || touch entry_list.ini



## install end
echo "-----------------------------------------"
echo "Installation completed..."
echo "-----------------------------------------"