Skip to content
This repository has been archived by the owner on Sep 21, 2024. It is now read-only.

Hosting Your Own Server

Henry Sanger edited this page Apr 13, 2023 · 3 revisions

Replit is a free online coding environment that allows you to host your game project for free. Follow the steps below to self-host your game project on Replit:

  1. Clone this repo.

  2. Import the cloned repository into Replit.

  3. Open the console in Replit and run the following command to clone the repository into the public folder:

git clone https://github.com/SurvivReloaded/survivreloaded-client.git public
  1. Run the Replit project. This will install any necessary dependencies.

  2. Run npm dev to preview any changes.

  3. Open the config.json file and change the host from 127.0.0.1 to 0.0.0.0. This is necessary to allow Replit to generate a domain for your project and open a webview tab with it.

  4. You should now see that the game website is online, but when starting the game it will fail to connect to the WebSocket server. To fix this, add a value webSocketAddress to config.json, with the URL generated by Replit, without the https:// prefix. Example:

"webSocketAddress": "survivreloaded-server.replitusername.repl.co:8001",

With these steps, your game project should now be hosted and available online for others to play.

Clone this wiki locally