Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add assetto corsa eggs with server manager #101

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 19 additions & 6 deletions assetto_corsa/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,28 @@ Assetto Corsa is a sim racing video game developed by the Italian video game dev

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

| Port | default |
|-------------|---------|
| Game | 9600 |
| HTTP | 8081 |
| Port | default |
|----------------|---------|
| Game | `9600` |
| HTTP | `8081` |

### Notes

<!--Notes about the server ports.-->
9600 is the default port, but any port can be used.
`9600` is the default port, but any port can be used.

## Freeroam + AI
This egg uses: [GitHub](https://github.com/compujuckel/AssettoServer) [Website](https://assettoserver.org/)
This egg uses: [GitHub](https://github.com/compujuckel/AssettoServer) [Website](https://assettoserver.org/)

## Assetto Server Manager

This egg uses: [Github](https://github.com/JustaPenguin/assetto-server-manager)

`8772` is the default HTTP port for Assetto Server Manager, but any port can be used.

| Default login | |
|---------------|-------------------|
| User | `admin` |
| Password | `servermanager` |

After first login you will be ask to change the default password.
84 changes: 84 additions & 0 deletions assetto_corsa/egg-assetto-corsa-server-manager.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
"meta": {
"version": "PTDL_v2",
"update_url": null
},
"exported_at": "2024-12-19T13:28:26+01:00",
"name": "Assetto Corsa Server Manager",
"author": "[email protected]",
"description": "Assetto Corsa (Italian for \"Race Setup\") 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",
"features": [
"steam_disk_space"
],
"docker_images": {
"ghcr.io\/parkervcp\/games:source": "ghcr.io\/parkervcp\/games:source"
},
"file_denylist": [],
"startup": ".\/server-manager",
"config": {
"files": "{\r\n \"config.yml\": {\r\n \"parser\": \"yaml\",\r\n \"find\": {\r\n \"steam.username\": \"\",\r\n \"steam.password\": \"\",\r\n \"steam.install_path\": \"\/home\/container\"\r\n }\r\n }\r\n}",
"startup": "{\r\n \"done\": \"starting assetto server manager on: 0.0.0.0:8772\"\r\n}",
"logs": "{}",
"stop": "^C"
},
"scripts": {
"installation": {
"script": "#!\/bin\/bash\r\n\r\napt -y update\r\napt -y --no-install-recommends install unzip wget ca-certificates\r\n\r\n# Download server-manager\r\n\r\nif [ ! -d \/tmp\/server-manager\/ ]; then\r\n mkdir \/tmp\/server-manager\/\r\nfi\r\n\r\ncd \/tmp\/server-manager\/\r\nwget https:\/\/github.com\/JustaPenguin\/assetto-server-manager\/releases\/download\/v1.7.9\/server-manager_v1.7.9.zip -q --progress=dot --show-progress\r\nunzip -o server-manager_v1.7.9.zip\r\n\r\ncp linux\/config.yml linux\/config.yml.default\r\n\r\nrm server-manager_v1.7.9.zip\r\n\r\n# Copy linux build to server\r\n\r\nif [ ! -d \/mnt\/server\/ ]; then\r\n mkdir \/mnt\/server\/\r\nfi\r\n\r\nmv linux\/* \/mnt\/server\/\r\n\r\ncd \/mnt\/server\r\n\r\nchmod -R 777 .\/*\r\n\r\n## just in case someone removed the defaults.\r\nif [[ \"${STEAM_USER}\" == \"\" ]] || [[ \"${STEAM_PASS}\" == \"\" ]]; then\r\n echo -e \"steam user is not set.\\n\"\r\n echo -e \"Using anonymous user.\\n\"\r\n STEAM_USER=anonymous\r\n STEAM_PASS=\"\"\r\n STEAM_AUTH=\"\"\r\nelse\r\n echo -e \"user set to ${STEAM_USER}\"\r\nfi\r\n\r\n# Download and install steamcmd\r\ncd \/tmp\r\nmkdir -p \/mnt\/server\/steamcmd\r\ncurl -sSL -o steamcmd.tar.gz https:\/\/steamcdn-a.akamaihd.net\/client\/installer\/steamcmd_linux.tar.gz\r\ntar -xzvf steamcmd.tar.gz -C \/mnt\/server\/steamcmd\r\nrm -fr steamcmd.tar.gz\r\nmkdir -p \/mnt\/server\/steamapps # Fix steamcmd disk write error when this folder is missing\r\ncd \/mnt\/server\/steamcmd\r\n\r\n# SteamCMD fails otherwise for some reason, even running as root.\r\n# This is changed at the end of the install process anyways.\r\nchown -R root:root \/mnt\r\nexport HOME=\/mnt\/server\r\n\r\n# Install game using steamcmd\r\n.\/steamcmd.sh +force_install_dir \/mnt\/server +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $( [[ \"${WINDOWS_INSTALL}\" == \"1\" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +app_update ${SRCDS_APPID} ${INSTALL_FLAGS} validate +quit\r\n\r\n## set up 32 bit libraries\r\nmkdir -p \/mnt\/server\/.steam\/sdk32\r\ncp -v linux32\/steamclient.so ..\/.steam\/sdk32\/steamclient.so\r\n\r\n## set up 64 bit libraries\r\nmkdir -p \/mnt\/server\/.steam\/sdk64\r\ncp -v linux64\/steamclient.so ..\/.steam\/sdk64\/steamclient.so\r\n\r\nif [ \"${STEAM_USER}\" == \"anonymous\" ]; then\r\n echo -e \"ERROR - STEAM USER NOT SET\\n\"\r\n echo -e \"Steam account must have the dedicated server in library to install and host the game\\n\"\r\n echo -e \"You must configure Steam account in the server startup variables, after that reinstall the server\\n\"\r\nfi\r\n\r\necho \"Server Succesfully Installed Enjoy!\"",
"container": "ghcr.io\/parkervcp\/installers:debian",
"entrypoint": "bash"
}
},
"variables": [
{
"name": "Steam Username",
"description": "A steam username of an account that owns the game is required",
"env_variable": "STEAM_USER",
"default_value": "",
"user_viewable": true,
"user_editable": true,
"rules": "required|string",
"field_type": "text"
},
{
"name": "Steam Password",
"description": "Steam User Password",
"env_variable": "STEAM_PASS",
"default_value": "",
"user_viewable": true,
"user_editable": true,
"rules": "nullable|string",
"field_type": "text"
},
{
"name": "Steam Auth Code",
"description": "Steam Auth Code required if the Steam Account is using Steam Auth. Slow installs will cause the code to expire before it can be used.",
"env_variable": "STEAM_AUTH",
"default_value": "",
"user_viewable": true,
"user_editable": true,
"rules": "nullable|string",
"field_type": "text"
},
{
"name": "SRCDS_APPID",
"description": "",
"env_variable": "SRCDS_APPID",
"default_value": "302550",
"user_viewable": false,
"user_editable": false,
"rules": "required|string|max:20",
"field_type": "text"
},
{
"name": "Windows param",
"description": "Required to always install and update the correct version of the game.",
"env_variable": "WINDOWS_INSTALL",
"default_value": "1",
"user_viewable": false,
"user_editable": false,
"rules": "required|string|max:20",
"field_type": "text"
}
]
}