Skip to content

Installation

Michael Green edited this page Jun 28, 2024 · 11 revisions

Prerequisites for all deployment types

Docker

Deploy with the prebuilt Docker image

Dockerfile and docker-compose.yml files have been provided to make deployment of the server as easy as possible.

  1. Download the docker-compose.yml file for the database type you would like to use.
  2. Open the docker-compose.yml file and edit the environment variables igdbclientid and igdbclientsecret to the values retrieved from your IGDB account. Other environment variables that can be configured can be found here: https://github.com/gaseous-project/gaseous-server/wiki/Configuration-File
  3. Run the command docker-compose up -d
  4. Connect to the host on port 5198

Build and deploy a Docker image from source

Dockerfile and docker-compose-build.yml files have been provided to make deployment of the server as easy as possible.

  1. Clone the repo with git clone https://github.com/gaseous-project/gaseous-server.git
  2. Change into the gaseous-server directory
  3. Open the docker-compose-build.yml file and edit the environment variables igdbclientid and igdbclientsecret to the values retrieved from your IGDB account. Other environment variables that can be configured can be found here: https://github.com/gaseous-project/gaseous-server/wiki/Configuration-File
  4. Run the command docker-compose --file docker-compose-{database}-build.yml up -d
  5. Connect to the host on port 5198

Build and deploy from source

  1. Install and configure a MariaDB or MySQL instance - this is beyond the scope of this document
  2. Install the dotnet 7.0 packages appropriate for your operating system
  3. Create a database user with permission to create a databse. Gaseous will create the new database and apply the database schema on it's first startup.
  4. Clone the repo with git clone https://github.com/gaseous-project/gaseous-server.git
  5. Change into the gaseous-server directory
  6. As the main branch is the development branch, you might want to change to a stable version - these are tagged with a version number. For example to change to the 1.5.0 release, use the command git checkout v1.5.0
  7. Download the emulator files from https://cdn.emulatorjs.org/releases/4.0.9.zip and extract the files to gaseous-server/wwwroot/emulators/EmulatorJS
  8. Create a directory in the home directory of the user that will run the server. For example, if running as the user gaseous, create the directory /home/gaseous/.gaseous-server
  9. Change into the .gaseous-server directory created in the previous step
  10. Copy the JSON from the config file above into a new file named config.json
  11. Update the database section with the database server hostname, username, password, and port. A full description of the configuration options can be found here: https://github.com/gaseous-project/gaseous-server/wiki/Configuration-File
  12. Compile the server by changing back to the repo cloned earlier and executing:
    • dotnet restore "gaseous-server/gaseous-server.csproj"
    • dotnet publish "gaseous-server/gaseous-server.csproj" --use-current-runtime --self-contained false -c Release -o <output directory>
    • replace <output directory> with the directory of your choosing. The compiled application will be copied there. For this example we'll use /opt/gaseous-server
  13. Download the EmulatorJS package from https://cdn.emulatorjs.org/releases/4.0.9.7z and extract the contents to the /opt/gaseous-server/wwwroot/emulators/EmulatorJS directory
  14. The server can then be started by executing dotnet /opt/gaseous-server/gaseous-server.dll
    • If you would like the server to run on a different ip address and port (for example 0.0.0.0:8080), add the --urls argument: dotnet /opt/gaseous-server/gaseous-server.dll --urls http://0.0.0.0:8080

Note: The above instructions were tested on macOS Ventura, and Ubuntu 22.04.3. There was a report that Debian 11 had an issue with the git submodule commands (see: https://github.com/gaseous-project/gaseous-server/issues/71). This was possibly due to an older git package.

Updating from source

  1. Stop the server
  2. Switch to the source directory
  3. Update your repo:
    • If running from the main branch, run git pull to update the repo
    • If running from another branch or tag, run:
      • git fetch
      • git checkout <branch or tag name>
  4. Run steps 12 and 13 from the above Build guide

Deploy to Unraid

With thanks to Tom1243 for building this process.

These steps describe a FRESH INSTALL. REMOVE ANY OLD CONTAINERS AND old APPDATA if you had any other attempts.

  1. Copy the following into a file named gaseous.xml
<?xml version="1.0"?>
<Container version="2">
  <Name>gaseous-server</Name>
  <Repository>gaseousgames/gaseousserver:latest</Repository>
  <Registry>https://hub.docker.com/r/gaseousgames/gaseousserver/</Registry>
  <Network>gaseous</Network>
  <MyIP/>
  <Shell>sh</Shell>
  <Privileged>false</Privileged>
  <Support>https://discord.gg/Nhu7wpT3k4</Support>
  <Project>https://github.com/gaseous-project/gaseous-server?ref=selfh.st</Project>
  <Overview>This is the server for the Gaseous system. It offers ROM and title management, as well as some basic in browser emulation of those ROMs. &#xD;
IMPORTANT!!!!!!&#xD;
You will need to run these on a custom network. Paste "docker network create gaseous" into the terminal. if you change this you will have to edit both the network setting and the post arg setting.</Overview>
  <Category>GameServers:</Category>
  <WebUI>http://[IP]:[PORT:5198]</WebUI>
  <TemplateURL/>
  <Icon>https://raw.githubusercontent.com/gaseous-project/gaseous-server/main/logo.png</Icon>
  <ExtraParams/>
  <PostArgs>;/usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker create --name='gsdb' --net='gaseous' -e HOST_CONTAINERNAME="gsdb" -e 'MARIADB_ROOT_PASSWORD'='gaseous' -e 'MARIADB_USER'='gaseous' -e 'MARIADB_PASSWORD'='gaseous' -l net.unraid.docker.managed=dockerman -l net.unraid.docker.icon='https://raw.githubusercontent.com/gaseous-project/gaseous-server/main/logo.png' -v '/mnt/user/appdata/gaseous/database':'/var/lib/mysql':'rw' -v '/etc/localtime':'/etc/localtime':'ro' 'mariadb'</PostArgs>
  <CPUset/>
  <DateInstalled>1707708636</DateInstalled>
  <DonateText/>
  <DonateLink/>
  <Requires>https://api-docs.igdb.com/#account-creation&#xD;
https://imgur.com/QwtHouv</Requires>
  <Config Name="gs" Target="/root/.gaseous-server" Default="" Mode="rw" Description="" Type="Path" Display="always" Required="false" Mask="false">/mnt/user/appdata/gaseous/data</Config>
  <Config Name="port" Target="80" Default="5198" Mode="tcp" Description="" Type="Port" Display="always" Required="false" Mask="false">5198</Config>
  <Config Name="igdbclientid" Target="igdbclientid" Default="" Mode="" Description="https://imgur.com/uLXxNG8" Type="Variable" Display="always" Required="false" Mask="false">changeme</Config>
  <Config Name="igdbclientsecret" Target="igdbclientsecret" Default="" Mode="" Description="https://imgur.com/SZAhptG" Type="Variable" Display="always" Required="false" Mask="false">changeme</Config>
  <Config Name="dbhost" Target="dbhost" Default="" Mode="" Description="" Type="Variable" Display="advanced" Required="false" Mask="false">gsdb</Config>
  <Config Name="dbuser" Target="dbuser" Default="" Mode="" Description="" Type="Variable" Display="advanced" Required="false" Mask="false">root</Config>
  <Config Name="dbpass" Target="dbpass" Default="" Mode="" Description="" Type="Variable" Display="advanced" Required="false" Mask="false">gaseous</Config>
</Container>
  1. In unraid terminal paste: docker network create gaseous
  2. In Main -> BootDevice -> config -> plugins -> dockerMan -> templates-user click UPLOAD (at the bottom) then select the gaseous.xml files
  3. In Docker click ADD CONTAINER, select a template, make one of the Gaseous. Click APPLY.