diff --git a/docs/docker-compose.md b/docs/docker-compose.md index 3a508e5..1a0b593 100644 --- a/docs/docker-compose.md +++ b/docs/docker-compose.md @@ -9,7 +9,7 @@ Follow these instructions to configure a docker-compose.yml for your system. > Depending on how you have installed this, the commands to execute docker compose may vary. -## PREPARE DIRECTORY: +## PREPARE DIRECTORIES: > __Warning__ > @@ -18,17 +18,24 @@ Follow these instructions to configure a docker-compose.yml for your system. > If you do run these commands as root, you may need to manually fix the permissions and ownership after. Create a directory for your service: -``` +```shell sudo mkdir -p /opt/container-services/steam-headless sudo chown -R $(id -u):$(id -g) /opt/container-services/steam-headless ``` Create a directory for your service config data: -``` +```shell sudo mkdir -p /opt/container-data/steam-headless/{home,.X11-unix,pulse} sudo chown -R $(id -u):$(id -g) /opt/container-data/steam-headless ``` +(Optional) Create a directory for your game install location: +```shell +sudo mkdir /mnt/games +sudo chmod -R 777 /mnt/games +sudo chown -R $(id -u):$(id -g) /mnt/games +``` + Create a Steam Headless `/opt/container-services/steam-headless/docker-compose.yml` file. Populate this file with the contents of the default [Docker Compose File](./compose-files/docker-compose.default.yml). @@ -39,3 +46,19 @@ Populate this file with the contents of the default [Docker Compose File](./comp Create a Steam Headless `/opt/container-services/steam-headless/.env` file with the contents found in this example [Environment File](./compose-files/.env). Edit these variables as required. + +## EXECUTE: + +Navigate to your compose location and execute it. +```shell +cd /opt/container-services/steam-headless +sudo docker-compose up -d --force-recreate +``` + +After container executes successfully, navigate to your docker host URL in your browser on port 8083 and click connect. +http://:8083/ +![img.png](../images/vnc_connect.png) + +If using a `/mnt/games` volume mount, wait until Steam installs and executes, then restart the container. This step +is necessary to create the required steamapps folder in the /mnt/games volume after initial installation. If this +doesn't occur, you will receive a "disk write error" when trying to install to this location. diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index 9557053..da2f090 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -7,4 +7,24 @@ Steam runs with Flatpak. These Flatpaks are instlled into the `default` user's h 3) Re-create the container. Don't just restart it. This will trigger an update of the required Flatpak runtimes in the home directory. 4) Reinstall any missing Flatpaks from the Software app. -Once your Flatpak refresh is complete, everything should work correclty and your configuration for each application should have remained intact. \ No newline at end of file +Once your Flatpak refresh is complete, everything should work correctly and your configuration for each application should have remained intact. + +## An error occurred while installing : "disk write error" + +![img.png](../images/disk_write_error.png) + +1) Stop the container +2) Verify your mounted /mnt/games volume is owned by the executing UID/GID, and 777 permissions are set. +3) Verify the `steamapps` directory exists within the library location. + +> __Note__ +> +> The directory in the below commands are the default /mnt/games library locations installed upon first execution of this container. +> +> Depending on how you have installed this, the directory path may vary. + +```shell +sudo mkdir /mnt/games/GameLibrary/SteamLibrary/steamapps +sudo chmod -R 777 /mnt/games +sudo chown -R $(id -u):$(id -g) /mnt/games +``` diff --git a/images/disk_write_error.png b/images/disk_write_error.png new file mode 100644 index 0000000..790feb0 Binary files /dev/null and b/images/disk_write_error.png differ diff --git a/images/vnc_connect.png b/images/vnc_connect.png new file mode 100644 index 0000000..d6ed2d9 Binary files /dev/null and b/images/vnc_connect.png differ diff --git a/overlay/etc/cont-init.d/100-configure_steam_mnt_games.sh b/overlay/etc/cont-init.d/100-configure_steam_mnt_games.sh new file mode 100644 index 0000000..7ae3775 --- /dev/null +++ b/overlay/etc/cont-init.d/100-configure_steam_mnt_games.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +echo "**** Configure Steam /mnt/games steamapps folder ****" + +# Upon first execution of this container, /opt/scripts/install_steam.sh will create a library location named "Mounted +# Games into the /mnt/games/GameLibrary/SteamLibrary location, but not create the required steamapps folder" +# Check /mnt/games to see if it is configured as a Steam Library, and if it is, make sure the steamapps folder exists +MNT_LIBRARY_PATH="/mnt/games/GameLibrary/SteamLibrary" + +if [ -f "$MNT_LIBRARY_PATH/libraryfolder.vdf" ] && [ ! -d "$MNT_LIBRARY_PATH/steamapps" ]; then + mkdir -pm 777 "$MNT_LIBRARY_PATH/steamapps" +fi