How can I execute headless server on AWS EC2 ?

Options
I use mac and make unity build the (file called HeadlessServer) that can open new room.
I use (Desktop/HeadlessServer.app/Contents/MacOS/HeadlessServer -batchmode -nographics -map Level1)
and it executes perfectly.

I upload entire (Contents directory) to my EC2 which is (Amazon Linux).
I also use (Contents/MacOS/HeadlessServer -batchmode -nographics -map Level1) and it gives me
(cannot execute binary file).

What kind of (file directory ) I need to upload that I can execute Headless server on EC2?
Do I need to change EC2(Amazon Linux) to EC2(Window) to execute ? I hope not.
Any Suggestion?

Thank!


Comments

  • ramonmelo
    Options
    Hello @evility,

    You should be able to export a Linux build from your game and run it on EC2. The process is similar to what you do for MacOS but you need to choose Linux as the `Target Platform` (https://docs.unity3d.com/Manual/PublishingBuilds.html).

    Once you have the build, you need to upload the executable binary file and the game data folder.
    To run the game, you should use the same arguments that you use to run locally.