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.
Asseto Corsa requires two ports, game port is UDP and WEB HTTP port is TCP.
Port | default |
---|---|
Game | 9600 |
HTTP | 8081 |
9600 is the default port, but any port can be used.
Name | Tag |
---|---|
Dotnet_8 | ghcr.io/ptero-eggs/yolks:dotnet_8 |
Name | Description | Environment Variable | Default Value | User Viewable | User Editable |
---|---|---|---|---|---|
Server name | The name off the server | SERVER_NAME | AC_Server | Yes | Yes |
Server Password | SERVER_PASSWORD | Yes | Yes | ||
Http port | HTTP_PORT | Yes | No | ||
Admin Password | ADMIN_PASSWORD | Yes | Yes | ||
Max clients | MAX_CLIENTS | 18 | Yes | Yes |
#!/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 "-----------------------------------------"