Skip to content

Installation

Michael Green edited this page Jan 25, 2024 · 16 revisions

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-{database}.yml file for the database type you would like to use.
  2. Open the docker-compose.yml file and edit the igdbclientid and igdbclientsecret to the values retrieved from your IGDB account
  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-{database}-build.yml file and edit the igdbclientid and igdbclientsecret to the values retrieved from your IGDB account
  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
  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. 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 https://github.com/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 gsdb.xml
<?xml version="1.0"?>
<Container version="2">
  <Name>gsdb</Name>
  <Repository>mariadb</Repository>
  <Registry>https://hub.docker.com/r/gaseousgames/gaseousserver/</Registry>
  <Network>gaseous</Network>
  <MyIP/>
  <Shell>sh</Shell>
  <Privileged>false</Privileged>
  <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. PART2&#xD;
THIS IS THE Data Base, you also need the FRONTEND!!!!</Overview>
  <Category>Cloud: GameServers:</Category>
  <WebUI/>
  <TemplateURL/>
  <Icon>https://i.imgur.com/A1X3Gcf.png</Icon>
  <ExtraParams/>
  <PostArgs/>
  <CPUset/>
  <DateInstalled>1706104502</DateInstalled>
  <DonateText/>
  <DonateLink/>
  <Requires/>
  <Config Name="Host Path 1" Target="/var/lib/mysql" Default="" Mode="rw" Description="" Type="Path" Display="always" Required="false" Mask="false">/mnt/user/appdata/gaseous/database</Config>
  <Config Name="MARIADB_ROOT_PASSWORD" Target="MARIADB_ROOT_PASSWORD" Default="" Mode="" Description="" Type="Variable" Display="advanced" Required="false" Mask="false">gaseous</Config>
  <Config Name="MARIADB_USER" Target="MARIADB_USER" Default="" Mode="" Description="" Type="Variable" Display="advanced" Required="false" Mask="false">gaseous</Config>
  <Config Name="MARIADB_PASSWORD" Target="MARIADB_PASSWORD" Default="" Mode="" Description="" Type="Variable" Display="advanced" Required="false" Mask="false">gaseous</Config>
</Container>
  1. Copy the following into a file named gaseous.xml
<?xml version="1.0"?>
<Container version="2">
  <Name>gaseous-server</Name>
  <Repository>gaseousgames/gaseousserver:v1.7.0-preview.8</Repository>
  <Registry>https://hub.docker.com/r/gaseousgames/gaseousserver/</Registry>
  <Network>gaseous</Network>
  <MyIP/>
  <Shell>sh</Shell>
  <Privileged>false</Privileged>
  <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. PART 1&#xD;
You also need the DataBase.</Overview>
  <Category>GameServers:</Category>
  <WebUI>http://[IP]:[PORT:5198]</WebUI>
  <TemplateURL/>
  <Icon>https://i.imgur.com/A1X3Gcf.png</Icon>
  <ExtraParams/>
  <PostArgs/>
  <CPUset/>
  <DateInstalled>1706105663</DateInstalled>
  <DonateText/>
  <DonateLink/>
  <Requires>YOU NEED THE DATABASE GaseousDB</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="" Type="Variable" Display="always" Required="false" Mask="false">clientid</Config>
  <Config Name="igdbclientsecret" Target="igdbclientsecret" Default="" Mode="" Description="" Type="Variable" Display="always" Required="false" Mask="false">clientsecret</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 two .xml files
  3. In Docker click ADD CONTAINER, select a template, make one of the Gaseous. Click APPLY. Repeat for the other one.

gas

Clone this wiki locally