Skip to content

Internet Play ‐ Setting up a VPS host

Parracodea edited this page Mar 23, 2024 · 1 revision

For general internet play information, see Internet Play.

If port forwarding doesn't work for you, you can create an inexpensive virtual private server (VPS) and run your EmptyEpsilon host on it. The game's low system requirements mean you can run games for less than US$0.01/hour.

You can use several VPS hosts to host an EmptyEpsilon game, such as:

Vultr

Vultr is a VPS provider that offers servers for as little as $0.007/hour, with hosts located around the world.

Create a server on Vultr

After signing up for a Vultr account:

  1. Create a new server.

  2. Select the "Cloud Compute" (Shared vCPU) server type.

  3. Select the "Regular Performance" CPU & Storage Technology option.

  4. For best performance, select a server location that's close to you and all of your players.

  5. Select a Linux operating system image.

    • The easiest option for running the GM interface is "Ubuntu Desktop with XFCE".
      1. Select the "Marketplace Apps" tab under "Server Image".
      2. Search for "Ubuntu Desktop".
      3. Select "Ubuntu Desktop (XFCE)".
    • The easiest option for running a headless server is "Ubuntu".
      1. Select the "Operating System" tab under "Server Image".
      2. Select "Ubuntu".
      3. Select the latest LTS version from the dropdown.
  6. Under Server Size, select the cheapest option, which as of Jan. 2023 is either $2.50/month ("1 vCPU/512 MB Memory") or $5/month ("1 vCPU/1 GB Memory").

    If you destroy the server after the end of your game, you won't have to pay for the full month, only the time that the server's running.

  7. Disable Auto Backups to save a little money.

  8. If you selected the "Ubuntu Desktop (XFCE)" server image, enter a user name that you'll use to log in.

  9. Optionally add a SSH public key, if you have one.

    The server uses this key instead of a password to authenticate you if you login via secure shell (SSH), which is the only login option for "Ubuntu" without a desktop running a headless server.

  10. Select the "Deploy Now" button.

    This initializes the server, which can take a few minutes.

    image

Install and run EmptyEpsilon on Ubuntu Desktop (XFCE)

If you selected the "Ubuntu Desktop (XFCE)" server image, you can connect to the running server using a VNC client and control its desktop. This is ideal for running the Game Master screen directly on the server.

  1. When the server is finished installing, click the name of the server from the list of running servers.

    If you closed the tab or navigated away from that list, you can return to it by selecting the "Products" tab in the left sidebar of the vultr interface.

  2. Read the contents of the "App Instructions" section, which contains your desktop username and password, and a VNC address and password.

  3. Install a VNC client.

    • If you use Windows, download and install TightVNC.
    • If you use macOS, open Safari and enter vnc://<VNC ADDRESS>:5900 in the address bar, replacing <VNC ADDRESS> with the listed VNC address. If prompted, allow Safari to open "Screen Sharing".
  4. Connect to your server at the VNC address from the server's "App Instructions".

    If your VNC client takes the address and port separately, remove :5900 from the end of the address and enter 5900 as the port.

  5. Enter the VNC password from the server's "App Instructions" when prompted.

    Upon connection, you should see a login screen with a password prompt.

  6. Enter the Desktop password from the server's "App Instructions" to login.

    Wait a moment while the desktop loads.

  7. Open a web browser by clicking the globe icon in the bottom application dock.

    Wait a moment while the browser loads. If you click multiple times while waiting, multiple browser windows will open.

  8. In the browser's address bar, go to the EmptyEpsilon website at https://daid.github.io/EmptyEpsilon.

  9. Select the "Download" tab from the EmptyEpsilon website.

  10. Select the "Linux" .deb file for the EmptyEpsilon version you want to host.

    This downloads the file to the server's Downloads directory.

  11. Open a terminal window by clicking the black square with a $_ symbol in the bottom applications dock.

  12. Open EmptyEpsilon's port 35666 in the server's firewall. Enter:

    sudo ufw allow 35666
    

    If prompted, enter the Desktop password from the server's "App Instructions".

  13. Install EmptyEpsilon and its dependencies. In the terminal, enter:

    cd ~/Downloads
    sudo dpkg -i Linux_EmptyEpsilon_EE-2022.10.28.deb
    sudo apt -f install
    

    replacing the .deb file above with the EE version you downloaded. If prompted, enter the Desktop password from the server's "App Instructions".

  14. Run EmptyEpsilon. In the terminal, enter:

    EmptyEpsilon
    

    The command is case-sensitive.

The EmptyEpsilon interface should appear. You can start a server, select a scenario, and enter the GM screen. Players can connect by using the server's IP address, which is listed in the server's "Overview" tab on Vultr or in the server creation screen in the server's EmptyEpsilon instance.

Install and run EmptyEpsilon without a desktop

If you selected "Ubuntu" under "Server Image" while creating the server, Vultr installs Ubuntu without a desktop environment and provides only secure shell (SSH) command-line access to the server. You can use this to run EmptyEpsilon in Headless Dedicated Server mode.

If you provided an SSH public key during server creation, you can login from any system with the corresponding private key without needing the root password.

  1. Find the server's IP address and root password.

    • The IP address is listed next to the server name in the "Products" tab of Vultr's interface, or next to "IP Address" in the "Overview" tab of the server details in Vultr.
    • The root password is listed as "Password", under "IP Address", in the "Overview" tab of the server details in Vultr. It's obscured by default, but you can view it by clicking the eye icon next to the obscured password, or copy it to your clipboard by clicking the copy icon.
  2. SSH to the server.

    • On macOS, an SSH client is built in.
      1. Open the Terminal app (Applications > Utilities > Terminal).
      2. In Terminal, run ssh root@<IP ADDRESS>, replacing <IP ADDRESS> with the server address.
      3. Enter the root password if prompted.
    • On recent versions of Windows 11, ssh is built in.
      1. Open the PowerShell app.
      2. In PowerShell, run ssh root@<IP ADDRESS>, replacing <IP ADDRESS> with the server address.
      3. Enter the root password if prompted.
    • On older versions of Windows, download and install PuTTY, an SSH client.
      1. Open the PuTTY app.
      2. In the "Host Name" box, enter the server's IP address.
      3. Select the SSH connection type.
      4. Click "Open" to connect.
      5. If prompted, click "Accept" to trust the server's host key.
      6. If prompted to login as:, enter root.
      7. If prompted for a password, enter the root password from the server's "Overview" tab.
      8. Enter the root password if prompted.

    After connecting, the server will output a welcome message and end with a prompt that looks like:

    root@EmptyEpsilon:~#
    

    replacing EmptyEpsilon with whatever name you gave the server during creation, or a random hostname.

  3. Download the EmptyEpsilon installation package. Run:

    wget https://github.com/daid/EmptyEpsilon/releases/download/EE-2022.10.28/Linux_EmptyEpsilon_EE-2022.10.28.deb
    

    replacing 2022.10.28 in both places with the EmptyEpsilon version number you want to download.

  4. Install EmptyEpsilon and its dependencies. Run:

    dpkg -i Linux_EmptyEpsilon_EE-2022.10.28.deb
    apt -f install
    

    replacing the .deb file above with the EE version you downloaded. If prompted, enter the Desktop password from the server's "App Instructions".

  5. Open EmptyEpsilon's port 35666 in the server's firewall. Run:

    ufw allow 35666
    
  6. Run EmptyEpsilon:

    EmptyEpsilon headless=scenario_10_empty.lua
    

    replacing scenario_10_empty.lua with the name of the scenario script you want to run. The command is case-sensitive. For more headless options, see Headless Dedicated Server.

    For a list of all available scenario scripts, run:

    ls /usr/local/share/emptyepsilon/scripts/scenario_*
    

At this point the EmptyEpsilon server is running the selected scenario. Players can connect by using the server's IP address.

Take a snapshot

To make future setup easier, you can optionally take a snapshot of the server after installation. You should take a snapshot only when EmptyEpsilon isn't actively running on your server. As of Jan. 2023, Vultr snapshot storage costs US$0.05 per GB per month.

  1. On the server, exit EmptyEpsilon and any other running apps.

  2. Select the "Products" tab in the left sidebar of the Vultr interface.

  3. Click the name of the server you created that's running the EmptyEpsilon server.

    This opens the server overview page and adds new tabs above it.

  4. Select the "Snapshots" tab.

  5. Enter a label to help you identify the snapshot later.

  6. Select "Take Snapshot".

When the snapshot is complete, you can destroy the running server, which stops billing.

To run the server again, follow the instructions to create a new server until you reach the step to select a server image. Then:

  1. Select the "Snapshot" tab under "Server Image".
  2. Select the snapshot you created.
  3. Select "Deploy Now".

When the server deploys the snapshot, it'll contain everything you had previously installed at the time of the snapshot, with the same user accounts and passwords to log in, same SSH keys (if added), and same stored settings and files, just how you left it.

Clone this wiki locally