log in
substrata logo

Running your own Substrata Server

Running your own Substrata server is (hopefully) relatively easy, as it's just a single executable to run. It will require some technical proficiency though.

You can run a Substrata server on your personal computer, or on a cloud server somewhere. It's free to run.

The instructions below are generally written for running a server on your personal computer, though they can be adapted for e.g. a cloud Linux server.

Download

Download the server distribution for your operating system:

Windows - SubstrataServer_v1.6.32.7z

MacOS - SubstrataServerMacOS_v1.6.32_x64.tar.gz

Linux - SubstrataServer_v1.6.32.tar.gz

Extract the contents into a convenient directory, e.g. c:/substrata_server

(You will need 7-zip to extract the Windows distribution)

Executables are signed by Glare Technologies Limited on Windows and Mac: on Windows, check that server.exe has a digital signature from Glare Technologies Limited. (right click on exe, Properties, Digital Signatures tab)

Run the server

Run the server executable from the files you just extracted.

This will create the server_state_dir (if it does not already exist) described in the next section.

Locating server_state_dir

This is the top level directory where config files will be placed, and will have subdirectories where various files will be saved.

This directory will be automatically created, if it does not already exist, when the substrata server is run.

server_state_dir is:

On Windows: APPDATA/Substrata/server_data

Where APPDATA is your application data directory, something like C:\Users\YOURNAME\AppData.

On Mac: /Users/USERNAME/cyberspace_server_state

On Linux: /home/USERNAME/cyberspace_server_state

Where USERNAME is the current user name.

Copy some distribution files

Copy the webserver_public_files directory from your unpacked server distribution files to your server_state_dir.

Copy the webserver_fragments directory from your unpacked server distribution files to your server_state_dir.

Copy the file server_config_files/substrata_server_config.xml from your unpacked server distribution files to your server_state_dir.

Copy the file server_config_files/example_substrata_server_credentials.txt from your unpacked server distribution files to your server_state_dir, and rename the file to substrata_server_credentials.txt.

Downloading webclient files

For the webclient server files, download this zip file: substrata_webclient_1.6.32.zip, and extract the contents into a dir called 'webclient' in your server_state_dir.

Server_state_dir layout

Your server_state_dir (i.e. C:\Users\YOURNAME\AppData\Roaming\Substrata\server_data), should now look something like:

C:\Users\YOURNAME\AppData\Roaming\Substrata
   |
   --------server_data    <--This is your server_state_dir
               |
               -----------substrata_server_config.xml, substrata_server_credentials.txt
               |
               -----------webserver_public_files
               |           |
               |           ---------- logo_main_page.png, logo_small.png, main.css, map.js
               |
               -----------webserver_fragments
               |           |
               |           ---------- about_chatbots.htmlfrag, about_luau_scripting.htmlfrag, ...
               |
               -----------webclient
                           |
                           |---------- data
                           |            |
                           |            ---- gl_data, resources
                           |
                           ----------- gui_client.data, gui_client.js, gui_client.wasm, webclient.html
              
                          

Now open up substrata_server_config.xml with a text editor. You will need to set webclient_dir: The location where the webclient files are found. Set it to the dir called 'webclient' in your server_state_dir as used above, e.g.

<webclient_dir>C:\Users\YOURNAME\AppData\Roaming\Substrata\server_data\webclient</webclient_dir>

Run the server

In cmd.exe or powershell, change into the directory you extracted the server distribution, and run the server, e.g.

cd c:/substrata_server
./server.exe

Read the output carefully, there will probably be some warning messages, but if it doesn't exit by itself, then your server is ready to use!

Visiting in your Substrata client

Run Substrata, then enter sub://localhost (sub://127.0.0.1 on Mac) in the URL bar:

Substrata connecting to localhost

You should see an empty Substrata world.

Create a user in your Substrata client using the 'Sign Up' link in the top right of your Substrata client. The first user you create will be the admin user, and will have permissions to create and destroy objects anywhere, as well as to administer the server via the admin web interface.

Visiting the local web interface

In your web browser, visit https://localhost/. Note that because we used a self-signed certificate, your browser will probably complain that the certificate is invalid ('site not secure'). Just skip these warnings.

You should see a basic Substrata website:

Substrata localhost website

You can log into the web interface using the same username and password you just created in your Substrata client.

Once you have logged in, you can click on your name in the upper right of the page, then click on 'Admin Page' on the upper right of the page again, to access the administrator web interface:

Substrata admin web interface

Substrata server configuration options

These are the options that can be set in the substrata_server_config.xml file described above.

webserver_fragments_dir

Directory where .htmlfrag files are found. Default is server_state_dir + "/webserver_fragments" on Mac+Win and /var/www/cyberspace/webserver_fragments on Linux.

webserver_public_files_dir

This directory holds files used by the website, such as CSS files, images, javascript files (map.js) etc. Default is server_state_dir + "/webserver_public_files" on Mac+Win and /var/www/cyberspace/public_html on Linux.

webclient_dir

This directory holds files used for the webclient, such as gui_client.js, webclient.html etc. Default is server_state_dir + "/webclient" on Mac+Win and /var/www/cyberspace/webclient on Linux.

tls_certificate_path

Path to a X.509 certificate for TLS. Default is server_state_dir + "/MyCertificate.crt". If the default path is used, and no certificate is found at server_state_dir + "/MyCertificate.crt", then a self-signed certificate will be generated there.

tls_private_key_path

Path to a private key. Default is server_state_dir + "/MyKey.key". If the default path is used, and no key is found at server_state_dir + "/MyKey.key", then a new private key will be generated there.

allow_light_mapper_bot_full_perms

Allow lightmapper bot (User account with name "lightmapperbot") to have full write permissions. Default value: false.

update_parcel_sales

Should land parcel auctions be run? Default value: false.

do_lua_http_request_rate_limiting

Should we rate-limit HTTP requests made by Lua scripts? Can be turned off for local testing. Default value: true.

enable_LOD_chunking

Should we generate LOD chunks? Default value: true.

enable_registration

Should we allow new users to register? Default value: true.

AI_model_id

LLM model to use for chatbots. Default value = "xai/grok-4-1-fast-non-reasoning"

shared_LLM_prompt_part

A part of the prompt that all chatbots share. Default value = "You are a helpful bot in the Substrata Metaverse." etc.

Substrata server credential options

These are the options that can be set in substrata_server_credentials.txt

email_sending_smtp_servername

Hostname of SMTP server for sending emails (for password resets etc.). Example: smtp.mailgun.org

email_sending_smtp_username

Username for SMTP server. Example: postmaster@myserver.com

email_sending_smtp_password

Password for the username account.

email_sending_from_name

Name to appear in the From: field of emails from the server. Example: Substrata

email_sending_from_email_addr

Email address to appear in the From: field of emails from the server. Example: support@glaretechnologies.com

email_sending_reset_webserver_hostname

Hostname of the substrata server for reset email links. Example: substrata.info

screenshot_bot_password

Password for the screenshot bot. Needs to be the same as in the substrata screenshot bot config.

discord_photo_webhook_URL

A webhook URL so that new screenshots/photos will show up in a #photo channel in your Discord. Example: https://discord.com/api/webhooks/5567676...

xai_api_key

xAI API key for the Grok AI model, which is the default model for Substrata chatbots.

Video tutorial

Here is a slightly out of date, but still very helpful tutorial, walking you through similar steps.

Support

Need help running your own server? Come and chat about it on our Discord server.