Coder Social home page Coder Social logo

linuxcloudgaming's Introduction

Linux Cloud Gaming

This is a setup script for Linux cloud gaming instance on GCP. It should be setup as a startup script.

Some firewall settings needed for Steam Remoteplay and Vnc over web. Also setup your keys for ssh login if you need it.This REAME needs more updating.

Allow HTTPS (tcp 443) and following ports for Steam Remote Play:

tcp:27036
tcp:27037
udp:27031
udp:27036

USAGE

Add this as startup script to your instance metadata:

wget -O - https://raw.githubusercontent.com/komurlu/LinuxCloudGaming/master/setupInstance.sh | bash

Add following as custom metadata (without semicolons)

vncpass: "A password you'll chose for Remote Desktoping to your VM over the web"
linuxuser: "Your local username for the VM"

alt text

Disks: Attach an additional disk when creating your instance for installing your games. You can select SSD/Standart persistent disk or local SSD scratch disk. (Local SSD will be terminated if you delete your instance, your game download will be lost) This disk will be mounted under /mnt/game.

On Steam GUI, you should add a Library folder, under /mnt/game

It takes approximately 5 minutes for script to complete. After that connect your VM using this address https://VM-IPAddress:5901/

Instance template is as follows:

{
  "creationTimestamp": "2020-04-10Txxxxxx",
  "description": "",
  "id": "862409xxxxxx",
  "kind": "compute#instanceTemplate",
  "name": "script-gpu-euro-ubuntu-2",
  "properties": {
    "scheduling": {
      "onHostMaintenance": "TERMINATE",
      "automaticRestart": false,
      "preemptible": true
    },
    "tags": {
      "items": [
        "steam",
        "http-server",
        "https-server"
      ]
    },
    "disks": [
      {
        "type": "PERSISTENT",
        "deviceName": "script-gpu-euro-ubuntu-2",
        "autoDelete": true,
        "index": 0.0,
        "boot": true,
        "kind": "compute#attachedDisk",
        "mode": "READ_WRITE",
        "initializeParams": {
          "sourceImage": "projects/ubuntu-os-cloud/global/images/ubuntu-1804-bionic-v20200218",
          "diskType": "pd-standard",
          "diskSizeGb": "10"
        }
      },
      {
        "type": "SCRATCH",
        "deviceName": "local-ssd-0",
        "autoDelete": true,
        "index": 1.0,
        "kind": "compute#attachedDisk",
        "mode": "READ_WRITE",
        "initializeParams": {
          "diskType": "local-ssd"
        },
        "interface": "NVME"
      }
    ],
    "networkInterfaces": [
      {
        "network": "projects/YourProject/global/networks/default",
        "accessConfigs": [
          {
            "name": "External NAT",
            "type": "ONE_TO_ONE_NAT",
            "kind": "compute#accessConfig",
            "networkTier": "PREMIUM"
          }
        ],
        "kind": "compute#networkInterface"
      }
    ],
    "reservationAffinity": {
      "consumeReservationType": "ANY_RESERVATION"
    },
    "canIpForward": false,
    "machineType": "n1-standard-8",
    "metadata": {
      "fingerprint": "xxxxxx",
      "kind": "compute#metadata",
      "items": [
        {
          "value": "yourpass",
          "key": "vncpass"
        },
        {
          "value": "youruser",
          "key": "linuxuser"
        },
        {
          "value": "#!/bin/bash\nwget -O - https://raw.githubusercontent.com/komurlu/LinuxCloudGaming/master/setupInstance.sh | bash",
          "key": "startup-script"
        }
      ]
    },
    "shieldedVmConfig": {
      "enableSecureBoot": false,
      "enableVtpm": true,
      "enableIntegrityMonitoring": true
    },
    "shieldedInstanceConfig": {
      "enableSecureBoot": false,
      "enableVtpm": true,
      "enableIntegrityMonitoring": true
    },
    "serviceAccounts": [
      {
        "email": "[email protected]",
        "scopes": [
          "https://www.googleapis.com/auth/devstorage.read_only",
          "https://www.googleapis.com/auth/logging.write",
          "https://www.googleapis.com/auth/monitoring.write",
          "https://www.googleapis.com/auth/servicecontrol",
          "https://www.googleapis.com/auth/service.management.readonly",
          "https://www.googleapis.com/auth/trace.append"
        ]
      }
    ],
    "guestAccelerators": [
      {
        "acceleratorCount": 1.0,
        "acceleratorType": "nvidia-tesla-t4"
      }
    ],
    "displayDevice": {
      "enableDisplay": false
    }
  },
  "selfLink": "projects/YourProject/global/instanceTemplates/script-gpu-euro-ubuntu-2"
}

linuxcloudgaming's People

Contributors

komurlu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

oczkers

linuxcloudgaming's Issues

nvidia driver install fails with: NV_BUILD_MODULE_INSTANCES is not defined

I ran into https://stackoverflow.com/questions/63118028/problems-with-installing-nvidia-grid-driver/63124587 when setupInstance.sh tries to install the nvidia driver.

bash NVIDIA-Linux-x86_64-418.70-grid.run -a -q -N --ui=none

Using a newer version of the driver, like https://storage.googleapis.com/nvidia-drivers-us-public/GRID/GRID11.0/NVIDIA-Linux-x86_64-450.51.05-grid.run from the stackoverflow answer, got past the issue.

It also helped to not set the virtual screen size in nvidia-xconfig in order to let games use a resolution higher than 1280x720.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.