<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mindattic.com/wiki/docs/index.php?action=history&amp;feed=atom&amp;title=Unity.Multiplayer%2Farticles%2Fhosting%2Faws-lightsail</id>
	<title>Unity.Multiplayer/articles/hosting/aws-lightsail - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mindattic.com/wiki/docs/index.php?action=history&amp;feed=atom&amp;title=Unity.Multiplayer%2Farticles%2Fhosting%2Faws-lightsail"/>
	<link rel="alternate" type="text/html" href="https://mindattic.com/wiki/docs/index.php?title=Unity.Multiplayer/articles/hosting/aws-lightsail&amp;action=history"/>
	<updated>2026-12-05T16:30:04Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.3</generator>
	<entry>
		<id>https://mindattic.com/wiki/docs/index.php?title=Unity.Multiplayer/articles/hosting/aws-lightsail&amp;diff=913&amp;oldid=prev</id>
		<title>Docs Sync: md2wiki: sync from MindAttic.Docs</title>
		<link rel="alternate" type="text/html" href="https://mindattic.com/wiki/docs/index.php?title=Unity.Multiplayer/articles/hosting/aws-lightsail&amp;diff=913&amp;oldid=prev"/>
		<updated>2026-11-29T20:36:44Z</updated>

		<summary type="html">&lt;p&gt;md2wiki: sync from MindAttic.Docs&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Hosting on AWS Lightsail (AwsLightsail) =&lt;br /&gt;
&lt;br /&gt;
The simpler of the two AWS profiles (UM-T27): one Lightsail instance running the same Docker image&lt;br /&gt;
&lt;br /&gt;
* rendezvous side-car compose stack as GenericVps, booted by a cloud-init document passed as &amp;lt;code&amp;gt;userData&amp;lt;/code&amp;gt;. Lightsail has no separate security-group resource the way EC2 does -- each instance carries its own built-in firewall, opened with &amp;lt;code&amp;gt;PutInstancePublicPorts&amp;lt;/code&amp;gt; -- so there is one fewer resource for &amp;lt;code&amp;gt;mp-host&amp;lt;/code&amp;gt; to create and tear down than &amp;lt;code&amp;gt;AwsEc2&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== What &amp;lt;code&amp;gt;mp-host deploy&amp;lt;/code&amp;gt; does here ==&lt;br /&gt;
&lt;br /&gt;
# Builds (or reads an already-built) &amp;lt;strong&amp;gt;GenericVps-profile&amp;lt;/strong&amp;gt; server package and image (same package shape as every other Linux-VM profile), pushes it to GHCR.&lt;br /&gt;
# Renders the compose file + bootstrap script into a &amp;lt;code&amp;gt;#cloud-config&amp;lt;/code&amp;gt; document and calls &amp;lt;code&amp;gt;CreateInstances&amp;lt;/code&amp;gt; with it as &amp;lt;code&amp;gt;userData&amp;lt;/code&amp;gt;, your chosen blueprint (OS image), bundle (size) and key pair.&lt;br /&gt;
# Calls &amp;lt;code&amp;gt;PutInstancePublicPorts&amp;lt;/code&amp;gt;, which &amp;lt;strong&amp;gt;replaces&amp;lt;/strong&amp;gt; the instance&amp;#039;s whole port list, to open SSH (22/tcp), the rendezvous port (8080/tcp) and your declared game port.&lt;br /&gt;
# Polls &amp;lt;code&amp;gt;GetInstance&amp;lt;/code&amp;gt; for a public IP, then over SSH for &amp;lt;code&amp;gt;GET http&amp;amp;#58;//127.0.0.1:&amp;amp;lt;healthPort&amp;gt;/healthz&amp;lt;/code&amp;gt; once it&amp;#039;s up, exactly like GenericVps.&lt;br /&gt;
# Watches &amp;lt;code&amp;gt;docker compose logs game&amp;lt;/code&amp;gt; over SSH for the join-code line and prints it.&lt;br /&gt;
&lt;br /&gt;
== Before you deploy ==&lt;br /&gt;
&lt;br /&gt;
You need an AWS account and a Lightsail key pair already created in the region/zone you&amp;#039;ll deploy to (Lightsail&amp;#039;s own console can create one, or reuse an EC2 key pair imported into Lightsail), plus the matching private key locally.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;md-code&amp;quot;&amp;gt;mp-host credentials set-aws --access-key-id &amp;amp;lt;AKIA...&amp;gt; --secret-access-key &amp;amp;lt;secret&amp;gt; --region us-east-1&lt;br /&gt;
mp-host credentials set-ghcr --username &amp;amp;lt;github-username&amp;gt; --token &amp;amp;lt;PAT with write:packages&amp;gt;&lt;br /&gt;
mp-host credentials set-cloud-options --profile AwsLightsail --name prod-lightsail \&lt;br /&gt;
  --opt keyPairName=my-lightsail-keypair --opt availabilityZone=us-east-1a \&lt;br /&gt;
  --opt sshUser=ubuntu --opt sshKeyPath=C:\Users\me\.ssh\my-lightsail-keypair.pem&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The AWS credential is shared with the &amp;lt;code&amp;gt;AwsEc2&amp;lt;/code&amp;gt; profile. &amp;lt;code&amp;gt;blueprintId&amp;lt;/code&amp;gt; (default &amp;lt;code&amp;gt;ubuntu_22_04&amp;lt;/code&amp;gt;) and &amp;lt;code&amp;gt;bundleId&amp;lt;/code&amp;gt; (default &amp;lt;code&amp;gt;nano_3_0&amp;lt;/code&amp;gt;, Lightsail&amp;#039;s cheapest tier) are optional overrides -- see &amp;lt;code&amp;gt;LightsailProvisioner&amp;lt;/code&amp;gt;&amp;#039;s class doc for the full list.&lt;br /&gt;
&lt;br /&gt;
Then deploy:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;md-code&amp;quot;&amp;gt;mp-host deploy --profile AwsLightsail --name prod-lightsail --package ./build/GenericVps \&lt;br /&gt;
  --image myorg/mygame --tag v1 --region us-east-1 \&lt;br /&gt;
  --rendezvous-url https&amp;amp;#58;//rendezvous.example.com \&lt;br /&gt;
  --public-address prod-lightsail&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add &amp;lt;code&amp;gt;--dry-run&amp;lt;/code&amp;gt; first to see every Lightsail action (&amp;lt;code&amp;gt;CreateInstances&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PutInstancePublicPorts&amp;lt;/code&amp;gt;, ...) mp-host would make, without creating anything.&lt;br /&gt;
&lt;br /&gt;
== Open ports ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Port&lt;br /&gt;
! Protocol&lt;br /&gt;
! Purpose&lt;br /&gt;
|-&lt;br /&gt;
| your game port&lt;br /&gt;
| UDP (or TCP for WebSocket)&lt;br /&gt;
| Players connect here.&lt;br /&gt;
|-&lt;br /&gt;
| 8080&lt;br /&gt;
| TCP&lt;br /&gt;
| The rendezvous service.&lt;br /&gt;
|-&lt;br /&gt;
| 22&lt;br /&gt;
| TCP&lt;br /&gt;
| SSH -- the only way mp-host reaches the box after boot.&lt;br /&gt;
|-&lt;br /&gt;
| health port&lt;br /&gt;
| TCP, bound to 127.0.0.1&lt;br /&gt;
| Not reachable from the internet by design.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Updating and tearing down ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;mp-host update&amp;lt;/code&amp;gt; restarts the compose stack in place over SSH, same as GenericVps and &amp;lt;code&amp;gt;AwsEc2&amp;lt;/code&amp;gt; -- the instance persists across an image swap. &amp;lt;code&amp;gt;mp-host destroy ... --yes&amp;lt;/code&amp;gt; stops the compose stack then deletes the instance; its built-in firewall goes with it, so there is no second resource to clean up the way EC2&amp;#039;s security group needs.&lt;br /&gt;
&lt;br /&gt;
== Cost and data-transfer notes ==&lt;br /&gt;
&lt;br /&gt;
Lightsail&amp;#039;s pricing is simpler than EC2&amp;#039;s: each bundle (size tier) bundles a fixed monthly data transfer allowance (for example, the cheapest Linux bundle typically includes on the order of 1 TB/ month as of this writing), with overage billed per GB once you exceed it -- check the [https://aws.amazon.com/lightsail/pricing/ Lightsail pricing page] for your bundle&amp;#039;s current allowance and overage rate. Using the same rule-of-thumb send rate as the &amp;lt;code&amp;gt;AwsEc2&amp;lt;/code&amp;gt; guide (roughly 20 KB/s per player, which you should replace with your own game&amp;#039;s actual figure), a player-hour costs about &amp;lt;strong&amp;gt;0.07 GB&amp;lt;/strong&amp;gt; of transfer. At a typical ~1 TB/month bundle allowance, that&amp;#039;s enough for roughly &amp;lt;strong&amp;gt;14,000 player-hours a month before you pay anything extra&amp;lt;/strong&amp;gt; for transfer -- comfortably more than most small-to-medium game servers need, which is Lightsail&amp;#039;s main appeal over EC2&amp;#039;s separately-metered egress. &amp;lt;code&amp;gt;mp-host destroy&amp;lt;/code&amp;gt; after each test run keeps you from paying for an idle instance between events.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;md2wiki-crumb&amp;quot;&amp;gt;Part of [[Unity.Multiplayer]].&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;md2wiki-source&amp;quot;&amp;gt;From [https://github.com/mindattic/Unity.Multiplayer/blob/main/docs/articles/hosting/aws-lightsail.md Unity.Multiplayer/docs/articles/hosting/aws-lightsail.md] via MindAttic.Docs; synced automatically, so edit the repo, not this page.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Unity.Multiplayer]]&lt;/div&gt;</summary>
		<author><name>Docs Sync</name></author>
	</entry>
</feed>