Sunshine and Moonlight on AWS G7: 12 Steps, 90 Min [2026]

Renting a cloud gaming subscription starts to feel wasteful once you notice you already own a decent game library and just need horsepower on demand. That is the pitch behind self-hosting: spin up a GPU instance on AWS, install the open-source pair Sunshine and Moonlight, and stream your own games to any laptop, phone, or Steam Deck in the house or across the world. This tutorial walks through building that setup from scratch on Amazon EC2, using the new G7 instance family that AWS launched with NVIDIA RTX PRO 4500 Blackwell Server Edition GPUs, and shows how to layer in Amazon GameLift Streams for session monitoring once your base server is running.

By the end you will have a working cloud gaming rig you can start and stop on demand, paying only for the hours you actually play, plus the security and cost controls to keep that bill predictable. Expect the full build to take about 90 minutes if you follow the steps in order.

This matters right now because two things shifted at once in mid-2026. AWS shipped a new graphics-optimized GPU generation that closes a lot of the gap between “cloud instance” and “gaming PC under a desk,” and the Sunshine project shipped Vulkan Video encoding, which is the first meaningful codec-pipeline upgrade the open-source streaming stack has seen in a while. Neither change is huge in isolation. Together they make this a noticeably better weekend project than it would have been a year earlier, and that is the version this guide builds toward rather than an older, slower configuration you might find in an outdated forum thread.

Google · Preferred Sources

Don't miss new tech stories on Google

Add Tech Insider once in the Google app and our stories appear in your news suggestions.

Add Now

Why Self-Host a Cloud Gaming Server Instead of Renting One

Commercial cloud gaming services bundle hardware, bandwidth, and game licensing into one monthly fee. That is convenient, but it also means paying for idle capacity and living with someone else’s choice of GPU, region, and session limits. A self-hosted stack built on Sunshine and Moonlight flips that arrangement. Sunshine runs on the remote machine and captures the desktop using the same GameStream protocol NVIDIA popularized with Shield, while Moonlight is the free, open-source client that connects to it from a phone, laptop, or handheld. Neither project charges a subscription fee, and neither cares whether the “remote machine” is a gaming PC under your desk or a rented AWS instance.

Running that remote machine on AWS specifically buys you three things a home PC cannot: elastic hardware, pay-per-hour billing, and a public IP with the region and network path AWS controls. You pick a GPU size that matches the game you are playing that night, shut it down after two hours, and get charged for two hours. AWS added Amazon EC2 G7 instances in mid-2026, and they are the newest graphics-optimized family aimed squarely at remote graphics workstations, game streaming, and rendering workloads, according to AWS’s own instance documentation. Earlier families remain available too, so this guide also covers when a smaller G6e or G5 instance makes more financial sense than jumping straight to G7.

The tradeoff is setup time. A subscription service works the moment you sign up. This build asks you to provision infrastructure, install drivers, configure a streaming host, and think about security groups. That is exactly what this tutorial exists to shorten.

Prerequisites: What You Need Before You Start

Gather these before touching the AWS console. Missing any one of them is the most common reason this build stalls halfway through.

  • An AWS account with billing enabled and a card on file, plus a service quota increase request submitted for G-series On-Demand vCPUs if this is your first GPU instance (new accounts default to zero).
  • The AWS CLI v2 installed locally, configured with an IAM user or role that can launch EC2 instances, create security groups, and manage EBS volumes.
  • A Windows Server 2022 or Windows 11 Pro AMI, since Sunshine’s Windows build currently offers the most stable capture path on cloud GPU instances. A Linux build (Ubuntu 22.04 or 24.04) works too if you prefer open-source end to end and are comfortable with PipeWire and KWin capture.
  • Sunshine version 2026.516.143833 or newer. That build, released May 16, 2026, shipped what the project described as a necessary update covering critical security fixes, so anything older should not go on a public-facing instance.
  • Moonlight client installed on whatever device you plan to stream to (Windows, macOS, Linux, Android, iOS, or a Steam Deck via Moonlight’s Linux build).
  • A wired or strong Wi-Fi connection on the client side rated for at least 20 Mbps sustained upload from your ISP’s perspective, since Moonlight’s download stream and your control input both ride that connection.
  • Basic comfort with SSH or RDP, since you will be remoting into the instance to run installers before Sunshine is ready to take over.

You do not need Kubernetes, Terraform, or Docker experience for the base build in this guide. Those come up only in the advanced tips section near the end, for readers who want to automate fleet management across more than one streaming host.

Step 1: Choose the Right AWS GPU Instance (G7 vs G6e vs G5)

Instance choice is the single biggest cost lever in this entire build, so it deserves its own step before you open the EC2 console. AWS currently sells four generations of graphics-focused GPU instances worth considering for streaming: G4 with NVIDIA T4, G5 with NVIDIA A10G, G6e with NVIDIA L40S Tensor Core GPUs, and the new G7 with NVIDIA RTX PRO 4500 Blackwell Server Edition GPUs. G7 instances scale up to eight GPUs per instance, 32 GB of GPU memory per card for up to 256 GB total, up to 192 vCPUs, up to 768 GiB of system memory, and roughly 700 Gbps of network bandwidth on the largest size, per AWS’s official G7 launch announcement.

For a single-player streaming rig, you do not need eight GPUs. The smallest G7 size, built around one RTX PRO 4500 GPU, comfortably drives 4K streaming at high frame rates for modern AAA titles. Reserve the multi-GPU sizes for scenarios where you are running more than one concurrent Sunshine session, or transcoding multiple game streams for friends at once.

Instance familyGPUGPU memory (smallest size)Best forApprox. on-demand price range
G4NVIDIA T416 GB1080p streaming, light titles, budget testingLowest in the graphics lineup
G5NVIDIA A10G24 GB1440p streaming, most current AAA gamesMid-range
G6eNVIDIA L40S Tensor Core48 GB4K streaming, ray tracing, creative workloadsHigher than G5
G7NVIDIA RTX PRO 4500 Blackwell Server Edition32 GB per GPU, up to 256 GB total4K/120 streaming, newest driver and codec supportRoughly $3.36 to $33.14/hr depending on size, per third-party pricing trackers

That G7 pricing range comes from independent instance-pricing research rather than an AWS rate card, so confirm current numbers in the EC2 pricing calculator for your target region before committing. G7 launched initially in US East (Ohio) and US West (Oregon), so pick whichever is geographically closer to your Moonlight client to cut round-trip latency.

Step 2: Launch Your G7 Instance and Configure Storage

With the instance size decided, launch it either through the console or the CLI. The CLI version is worth learning even for a one-off build, because you will reuse the same command (with a stop/start wrapper) every time you want the server back online later.

aws ec2 run-instances \
  --image-id ami-0abcd1234example \
  --instance-type g7.2xlarge \
  --key-name my-streaming-key \
  --security-group-ids sg-0streaminggroup \
  --subnet-id subnet-0examplesubnet \
  --block-device-mappings '[{"DeviceName":"/dev/sda1","Ebs":{"VolumeSize":200,"VolumeType":"gp3","Throughput":250,"Iops":6000}}]' \
  --tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=cloud-streaming-host}]' \
  --region us-west-2

A 200 GB gp3 root volume is a reasonable starting point for the OS, GPU drivers, Sunshine, and two or three installed games. Bump the volume size up if you plan to keep a larger library installed, since attaching and mounting an extra EBS volume mid-session adds friction you do not need on stream night. Set Iops and Throughput above the gp3 defaults, as shown, so large game installs and Windows updates do not bottleneck on disk during setup.

Once the instance reaches the running state, note its public IPv4 address (or better, allocate an Elastic IP so it does not change every time you stop and start the instance). You will need that address for both remote administration and, later, for Moonlight to find the host.

Step 3: Install NVIDIA Drivers and the Vulkan Runtime

GPU instances do not ship with graphics drivers pre-installed on the base AMIs, so this step comes before anything else touches the GPU. On Windows, download the latest NVIDIA data center driver package that supports RTX PRO 4500 Blackwell Server Edition from NVIDIA’s driver portal and run the installer as Administrator. On Ubuntu, the process looks like this:

sudo apt update
sudo apt install -y build-essential dkms
sudo apt install -y nvidia-driver-580-server
sudo reboot
# after reboot:
nvidia-smi
vulkaninfo --summary

The nvidia-smi command should list your GPU with driver version and confirm the card is recognized. The vulkaninfo --summary check matters specifically for this build because Sunshine’s newer releases added Vulkan Video encoding, which offloads H.264/HEVC/AV1 encode work more efficiently than the older NVENC-only path on some driver and kernel combinations. If vulkaninfo errors out, install the vulkan-tools and mesa-vulkan-drivers packages and rerun it before moving on.

Step 4: Install Sunshine on Your Cloud Instance

Sunshine is developed by the LizardByte project and distributed as signed installers for Windows, Linux, macOS, and Docker. For this build, use the standalone installer rather than Docker, since Docker’s GPU passthrough on Windows Server instances adds complexity you do not need for a single streaming host.

# Windows (PowerShell, run as Administrator)
Invoke-WebRequest -Uri "https://github.com/LizardByte/Sunshine/releases/download/v2026.516.143833/sunshine-windows-installer.exe" -OutFile "sunshine-installer.exe"
Start-Process -FilePath ".\sunshine-installer.exe" -Wait

# Ubuntu (deb package)
wget https://github.com/LizardByte/Sunshine/releases/download/v2026.516.143833/sunshine-ubuntu-24.04-amd64.deb
sudo apt install -y ./sunshine-ubuntu-24.04-amd64.deb
sudo systemctl enable --now sunshine

Replace the version tag in those URLs with whatever the current release is on Sunshine’s GitHub releases page at install time, since the project ships updates frequently. After installation, Sunshine’s web configuration UI listens on port 47990 by default. Browse to https://your-instance-ip:47990 from your local machine to complete the first-run setup, which includes creating an admin username and password. Do not skip setting a strong password here. That web UI, if left open to the internet without one, is the single most common way self-hosted Sunshine instances get hijacked.

Step 5: Configure Sunshine for Vulkan Video Encoding

Sunshine’s April 2026 release, version 2026.413.143228, added Vulkan Video encoding support as its headline feature, alongside XDG-based PipeWire integration and KWin direct screencast capture for Linux desktops. Vulkan Video encoding matters on cloud GPU instances because it lets the encoder pipeline run closer to the GPU driver layer instead of routing through an intermediate capture API, which trims a few milliseconds of latency and reduces CPU overhead on the host.

Enable it by editing Sunshine’s configuration file. On Windows this lives under %ProgramData%\Sunshine\config\sunshine.conf. On Linux it is typically ~/.config/sunshine/sunshine.conf.

encoder = vulkan
adapter_name = NVIDIA RTX PRO 4500 Blackwell Server Edition
output_name = 0
capture = nvfbc
min_log_level = info
channels = 1
fec_percentage = 20

Save the file and restart the Sunshine service (sudo systemctl restart sunshine on Linux, or restart the Sunshine service in Windows Services). If Vulkan Video is not yet supported by your specific driver build, Sunshine falls back to NVENC automatically, so this change is safe to try even if you are not certain your driver version supports it.

Step 6: Lock Down Security Groups and Networking

This is the step people skip when they are excited to start playing, and it is the step that gets a public-facing GPU instance compromised. Sunshine needs several ports open: 47984-47990 for HTTPS and the web UI, 48010 for RTSP, and 47998-48000 over UDP for the actual video, audio, and control streams. Do not open those to 0.0.0.0/0. Scope the AWS security group to your own IP address, or better, to a small CIDR range covering your home and any location you actually stream from.

aws ec2 authorize-security-group-ingress \
  --group-id sg-0streaminggroup \
  --ip-permissions \
    IpProtocol=tcp,FromPort=47984,ToPort=47990,IpRanges='[{CidrIp=203.0.113.4/32,Description="home-ip"}]' \
    IpProtocol=udp,FromPort=47998,ToPort=48000,IpRanges='[{CidrIp=203.0.113.4/32,Description="home-ip"}]' \
    IpProtocol=tcp,FromPort=48010,ToPort=48010,IpRanges='[{CidrIp=203.0.113.4/32,Description="home-ip"}]'

If your home IP changes frequently, look at AWS Client VPN or a WireGuard tunnel between your client and the instance instead of constantly editing security group rules. That also means Moonlight traffic never touches the open internet at all, which is the more defensible long-term setup if you plan to stream regularly rather than as a one-off experiment.

Step 7: Install and Pair Moonlight on Your Client Device

Moonlight is the open-source client implementation of NVIDIA’s GameStream protocol, maintained independently of Sunshine but designed to work with it out of the box. Install it from the official moonlight-stream.org site or your platform’s app store (it is free on Windows, macOS, Linux, Android, iOS, tvOS, and several Linux-based handhelds including the Steam Deck).

Open Moonlight, click “Add Host,” and enter your instance’s public IP (or Elastic IP). Moonlight will attempt an HTTPS handshake with Sunshine and display a four-digit PIN. Enter that same PIN in Sunshine’s web UI under the Pairing tab. Once paired, Sunshine’s configured game and desktop shortcuts appear as clickable tiles in Moonlight, and clicking one starts the stream.

Step 8: Install Games and Launch Your First Stream

Install Steam, Epic Games Store, or Battle.net on the instance the same way you would on a physical gaming PC, then log in and install a title. Add it to Sunshine as an “Application” from the web UI so it appears as its own tile in Moonlight rather than requiring you to stream the full desktop and click through manually every time.

Click the game tile in Moonlight. A successful first connection looks like this in the Moonlight overlay (accessible with Ctrl+Alt+Shift+S on most platforms):

Resolution: 3840x2160
Frame rate: 120 fps (capped)
Bitrate: 60 Mbps
Codec: HEVC (Vulkan Video)
Decoder: Hardware
Estimated host processing latency: 4 ms
Estimated network latency: 11 ms
Frames dropped by your network connection: 0.0%

Those numbers are illustrative of a well-tuned local-region connection, not a guarantee. Your actual latency depends heavily on physical distance to whichever AWS region you picked in Step 1 and on your ISP’s routing.

Step 9: Tune Bitrate, Resolution and Latency for Your Connection

Moonlight’s default settings favor compatibility over quality. Once you confirm the base connection works, go back into Moonlight’s stream settings and match them to what your upload and download bandwidth can actually sustain.

Connection typeRecommended resolutionRecommended bitrateFrame rate cap
Wired gigabit, same region as instance4K (3840×2160)60-100 Mbps120 fps
Strong Wi-Fi 6, same region1440p40-60 Mbps90-120 fps
Cross-country connection (US East to US West, for example)1080p or 1440p20-30 Mbps60 fps
Mobile hotspot or congested Wi-Fi1080p10-15 Mbps30-60 fps

If you notice macroblocking or smearing during fast motion, drop the resolution one tier before dropping the bitrate. Moonlight and Sunshine both handle a lower resolution at a stable bitrate far better than a high resolution fighting for bandwidth it does not consistently have.

Step 10: Automate Start/Stop Scheduling to Control AWS Costs

The entire financial case for this build collapses if you leave a G7 instance running around the clock. A simple Lambda function on a schedule, or even a cron job on a small always-on control host, keeps the bill tied to actual play time.

import boto3

INSTANCE_ID = "i-0examplestreaminghost"
ec2 = boto3.client("ec2", region_name="us-west-2")

def stop_if_idle(event, context):
    state = ec2.describe_instances(InstanceIds=[INSTANCE_ID])
    status = state["Reservations"][0]["Instances"][0]["State"]["Name"]
    if status == "running":
        ec2.stop_instances(InstanceIds=[INSTANCE_ID])
        print(f"Stopped {INSTANCE_ID} on idle schedule")

Wire that Lambda to an EventBridge schedule that fires a few hours after your typical play window ends, as a safety net in case you forget to stop the instance manually. Also worth knowing: AWS cut G-series ECS management fees by 35% and P-series and Trainium fees by 60% starting July 1, 2026, which is relevant if you eventually move this workload from raw EC2 onto ECS Managed Instances for easier fleet management across more than one streaming host.

Step 11: Layer In GameLift Streams and Harden the Server

Once the base build works, Amazon GameLift Streams adds two things a plain EC2 instance cannot give you on its own: managed session infrastructure and live debugging tools. GameLift Streams introduced a feature called Stream Session Admin Shell on July 6, 2026, described by AWS as a secure terminal connection to the live runtime environment of a stream session, letting you inspect logs, check GPU utilization, and examine application state in real time without managing SSH keys or opening extra ports. That is a meaningfully different security posture than the raw SSH access this tutorial’s base build relies on.

GameLift Streams also picked up per-session IAM roles in mid-July 2026, letting a streamed application request short-lived, auto-refreshing AWS credentials scoped to that one session via a RoleArn parameter, similar in spirit to ECS task roles. If your streaming setup ever needs to talk to other AWS services (S3 for cloud saves, for example), that is a cleaner integration path than baking long-lived credentials into the instance itself.

Separately, Amazon GameLift Servers expanded its supported EC2 instance catalog in August 2026, adding 21 new instance types across the C8a, C8i, C9g, M8a, M8i, and M9g families, spanning 5th-generation AMD EPYC, custom Intel Xeon 6, and AWS Graviton5 processors. Those are aimed more at dedicated game server logic (matchmaking, session hosting) than at GPU streaming, but they matter if this project grows from a single personal streaming box into hosting a small multiplayer server alongside it.

For hardening the base instance itself: enable automatic OS patching, restrict the Sunshine web UI to your VPN or trusted CIDR only, rotate the Sunshine admin password every few months, and turn on AWS CloudTrail logging on the account so you have an audit trail if the instance’s security group is ever accidentally widened.

Common Pitfalls When Self-Hosting Cloud Gaming on AWS

  • Leaving the instance running overnight. A single forgotten G7 session can add real dollars to your monthly bill. Set the EventBridge safety-net stop job in Step 10 before you ever start playing for real.
  • Opening Sunshine’s ports to 0.0.0.0/0. This is the fastest way to get the instance scanned and probed within hours. Scope security groups to your actual IP or a VPN tunnel.
  • Skipping the GPU quota request. New AWS accounts default to a zero vCPU quota for G-series instances. Submit the increase request days before you plan to build, since approval is not always instant.
  • Running an outdated Sunshine build. Versions older than 2026.516.143833 are missing the security fixes that release shipped. Check the GitHub releases page before every fresh install.
  • Choosing a region far from your physical location. Streaming from US East to a player in Western Europe adds latency no bitrate tuning can fix. Pick the closest supported region first, then optimize settings second.
  • Forgetting an Elastic IP. Without one, the instance’s public IP changes every time you stop and restart it, which breaks your saved Moonlight host entry and forces you to re-pair.

Troubleshooting Sunshine, Moonlight and AWS Networking Issues

  • Moonlight can’t find the host. Confirm the security group allows inbound TCP on 47984-47990 from your current IP, and that Sunshine’s service is actually running (systemctl status sunshine on Linux or check Windows Services).
  • Pairing PIN times out before you can enter it. Sunshine’s pairing window is short. Have the web UI open in a browser tab before you click “Add Host” in Moonlight so you can enter the PIN within seconds of it appearing.
  • Stream connects but shows a black screen. This usually means Sunshine is capturing the wrong display output. Check the output_name value in sunshine.conf and confirm it matches an active virtual display on a headless instance.
  • Vulkan encoder falls back to NVENC unexpectedly. Run vulkaninfo --summary again after any driver update. A driver upgrade can sometimes reset Vulkan Video support until Sunshine is restarted.
  • High latency despite a fast connection. Traceroute from your client to the instance’s IP. If the path bounces through unexpected regions, your ISP may be routing inefficiently, and a different AWS region might actually test faster despite being “farther” on a map.
  • Audio stutters but video is smooth. Lower the audio channel count in sunshine.conf from surround to stereo. Some cloud instances add processing overhead on multi-channel audio encoding that is not worth the tradeoff for most games.
  • Instance won’t start due to insufficient capacity. G7 availability in a given Availability Zone can be limited shortly after launch. Try a different AZ within the same region, or fall back to a G6e size temporarily.
  • Game controller inputs feel delayed. Confirm you are using Moonlight’s native gamepad passthrough rather than a generic USB-over-network tool, and disable any background bandwidth-heavy app (cloud backup, large downloads) on both the client and host during a session.
  • RDP works but Sunshine’s stream is choppy immediately after a Windows reboot. Windows can take a minute or two to fully initialize the GPU driver stack after boot. Wait roughly 90 seconds post-reboot before starting a stream test.

Cost Breakdown: Self-Hosted AWS vs Subscription Cloud Gaming Services

The honest answer on cost depends entirely on how many hours a week you actually play. Subscription cloud gaming services charge a flat monthly rate regardless of usage, while a self-hosted AWS instance bills per hour it is running, plus a small ongoing storage charge for the EBS volume even while stopped.

Usage patternSelf-hosted AWS G7 (pay-per-hour)Fixed monthly subscriptionBetter value
5 hours/week casual playRoughly 20 billed hours plus storageFlat monthly fee regardless of hoursSelf-hosted, usually
20+ hours/week heavy play80+ billed hours can approach or exceed a subscriptionFlat monthly feeDepends on instance size chosen
Sporadic, a few sessions a monthOnly pay for the sessions you runPaying for idle weeksSelf-hosted, clearly

Storage is the quiet cost most people forget. A 200 GB gp3 volume keeps accruing a small per-GB-month charge even while the instance itself is stopped, so if you are not planning to play for an extended stretch, snapshot the volume and delete it rather than paying to keep an idle drive around indefinitely.

Data transfer is the other line item worth watching. Moonlight’s video stream flows out of the instance to your client, and AWS bills outbound data transfer past a modest free tier at a per-GB rate that varies by region. A two-hour session at a 60 Mbps bitrate moves roughly 54 GB, which stays well within typical monthly transfer allowances for a single-player setup, but it adds up quickly if you are streaming to multiple friends simultaneously or running long daily sessions. Check the current EC2 data transfer pricing for your chosen region before assuming the hourly instance rate is the whole story.

Advanced Tips for a Production-Grade Streaming Setup

Once the basic build is solid, a few refinements turn it from a weekend project into something you can hand to a friend or family member without babysitting it. First, bake your fully configured instance (drivers, Sunshine, games) into a custom AMI. That cuts a rebuild from 90 minutes down to the time it takes an instance to boot, which matters if you ever need to switch instance sizes for a specific game.

Second, if you want to support more than one household member streaming independently, look at running multiple Sunshine instances behind separate GameLift Streams sessions rather than sharing a single GPU across simultaneous streams. Contention for encoder resources shows up quickly as dropped frames once two sessions compete for the same card, and splitting sessions across dedicated GPUs avoids that entirely. Third, set a CloudWatch billing alarm at a dollar threshold you are comfortable with, separate from the automated stop job in Step 10, as a second line of defense against a runaway bill. Fourth, if latency to your closest AWS region is still higher than you would like, test AWS Local Zones or Wavelength Zones where available. They place compute physically closer to metro areas than the standard region endpoints and can shave meaningful milliseconds off the round trip for latency-sensitive genres like fighting games or competitive shooters.

A fifth refinement worth the extra hour: script the entire teardown and rebuild as a single shell function you can call from your phone over SSH, using AWS Systems Manager Session Manager instead of a bastion host. That closes off one more inbound port, since Session Manager tunnels through the AWS API rather than opening TCP 22 to the internet at all. Pair it with an AWS Backup plan that snapshots the streaming volume nightly while the instance is stopped, so a corrupted Windows update or a bad driver rollback never costs you a reinstalled game library.

Finally, treat driver and Sunshine updates as a recurring task rather than a one-time install. NVIDIA ships driver updates on its own cadence, and Sunshine’s release history in 2026 shows meaningful feature and security updates landing every few weeks, so schedule a monthly check rather than assuming the software you installed on day one stays current indefinitely.

One more tip that saves real money over a full year: watch AWS Savings Plans and Spot pricing for GPU instances if your play schedule is predictable. A Compute Savings Plan can cut the effective hourly rate meaningfully in exchange for a one- or three-year commitment, which makes sense if you already know you will be gaming most weekends. Spot capacity, by contrast, suits an experimental or backup instance you can tolerate losing mid-session in exchange for a lower price, but it is a poor fit for the primary streaming host in this build given how disruptive an interruption would be in the middle of a game.

The Complete Working Project, Start to Finish

Pulling every step together, here is what the finished build looks like as one continuous pipeline, useful as a checklist to run through before you consider the project done rather than half-configured.

  1. Submit a G-series vCPU quota increase request in Service Quotas and wait for approval.
  2. Launch a g7.2xlarge (or smaller G5/G6e, based on your budget) with a 200 GB gp3 volume, in whichever of US East (Ohio) or US West (Oregon) is closer to you.
  3. Allocate and associate an Elastic IP so the address never changes across stop/start cycles.
  4. Install the NVIDIA data center driver, reboot, and confirm both nvidia-smi and vulkaninfo --summary return clean output.
  5. Install Sunshine version 2026.516.143833 or newer, and complete the first-run web setup at port 47990 with a strong admin password.
  6. Edit sunshine.conf to enable the Vulkan encoder and restart the service.
  7. Scope the security group to your home IP or VPN CIDR only, covering ports 47984-47990, 48010, and 47998-48000 UDP.
  8. Install Moonlight on your client device, pair it with the instance’s Elastic IP, and confirm the PIN handshake completes.
  9. Install a game, add it to Sunshine as an Application, and launch a test stream, checking the Moonlight overlay for resolution, bitrate, and latency.
  10. Tune bitrate and resolution against the connection-type table until frame drops read 0.0% during normal play.
  11. Deploy the Lambda stop-if-idle function on an EventBridge schedule as a cost safety net.
  12. Optionally wire up GameLift Streams for Stream Session Admin Shell access and per-session IAM roles, and set a CloudWatch billing alarm.

Once all twelve of those are checked off, what you have is not a demo. It is a repeatable, cost-controlled cloud gaming rig that boots from a saved AMI in minutes, streams at whatever quality your connection supports, and shuts itself off if you forget to. The only maintenance from here forward is the monthly driver and Sunshine version check covered in the advanced tips above, plus the occasional glance at your AWS billing dashboard to confirm the automated stop job is doing its job.

Frequently Asked Questions

Is self-hosting a cloud gaming server on AWS legal and allowed under AWS’s terms?
Yes. Running a personal GPU instance for gaming falls under standard EC2 usage, provided you are not violating game publishers’ license terms around running licensed software on cloud infrastructure, which varies title by title and is worth checking for competitive multiplayer games with strict anti-cheat requirements.

Do I need a G7 instance, or will a cheaper G5 work fine?
A G5 instance with an NVIDIA A10G GPU handles most current games comfortably at 1440p. Reserve G7 for 4K streaming, ray-tracing-heavy titles, or when you want the newest driver and Vulkan Video encoding support specifically.

Can I use this setup with a Steam Deck?
Yes. Moonlight has a native Linux build that runs well on SteamOS in Desktop Mode, and several community guides cover adding it as a non-Steam shortcut for Gaming Mode access.

Why does AWS require a service quota increase before I can launch a GPU instance?
New accounts default to zero vCPU quota across most G-series and P-series families as an anti-fraud measure, since GPU instances are a common target for cryptomining abuse on stolen credentials. Submit the increase request through the Service Quotas console. Approval typically takes anywhere from minutes to a couple of business days.

How does this compare to just using a commercial cloud gaming subscription?
Subscriptions win on simplicity and predictable monthly cost for heavy daily use. Self-hosting wins on flexibility, control over game selection and licensing, and cost for lighter or sporadic play patterns, at the expense of the setup time this tutorial covers.

Does Sunshine support Vulkan Video encoding on every GPU?
No. Support depends on driver version and GPU generation. If Vulkan Video is unavailable, Sunshine automatically falls back to NVENC, so the stream still works, just without the small latency and CPU-overhead improvements Vulkan Video offers.

What happens to my installed games and save files when I stop the instance?
Nothing, as long as you stop rather than terminate the instance. Stopping preserves the attached EBS volume and everything on it. Terminating deletes the root volume by default unless you explicitly changed that setting at launch.

Is GameLift Streams required for this build to work?
No, it is an optional advanced layer covered in Step 11. The core Sunshine and Moonlight setup in Steps 1 through 9 works entirely on a standalone EC2 instance without touching GameLift at all.

Related Coverage

Nadia Dubois

Nadia Dubois

AI & Innovation Editor

Nadia Dubois is the AI & Innovation Editor at Tech Insider, where she tracks the rapid evolution of artificial intelligence, from foundation models to real-world enterprise deployment. She previously covered AI and startups for La Tribune and contributed to MIT Technology Review's European coverage. Nadia specializes in generative AI, AI regulation, and the intersection of technology and European industrial policy. She holds a dual degree in Computational Linguistics and Journalism from Sciences Po Paris.

View all articles