3
config.json
96LawDawg edited this page 2023-09-29 01:05:21 -05:00

If there's no config.json in the main directory, it will be created by copying config.template.json.

Possible options:

serverName

Displays the server name in the browser tab. The default is "VirtualTabletop.io." The customTab property also allows users to specify what will appear in the browser tab, but you can only use serverName or customTab and not both.

port

The port the server is listening on. The default is 8272. If VTT is all you want to host, you might want to use port 80 which is the default for HTTP. If you want to host VTT in addition to other services and/or want to encrypt the connection using HTTPS, it is recommended to run an nginx web server in front of it.

externalURL

The URL used from the internet to access this instance. It might be very different if you're running behind an nginx proxy. This is only used and required if you configure betaServers (see below) because the beta server has to find your server to hand back control of the room.

urlPrefix

If you set this to "/vtt", a random room URL would look like http://example.com/vtt/d71i. This is useful if you proxy VTT behind nginx (or something similar) and only want to serve VTT in a subdirectory of the server.

minifyJavascript

If this is set to true, all Javascript will be minified when starting the server. This saves a bit of bandwidth to the clients but it makes debugging using the browser tools (F12) nearly impossible.

allowPublicLibraryEdits

If this is set to true, you will be able to make changes to public library games on a local instance of the VTT engine. This is necessary to create pull requests for changing the public library.

directories.library

The path on the server to the library. The default is a directory called "library" inside the main VTT directory. You might want to provide your own library on your own server or have multiple instances of VTT point to the same directory. Absolute paths work as well.

directories.save

Same thing as directories.library but for the save directory. The save directory is the only directory VTT writes to. It contains rooms, saved states, user uploaded assets and some other details.

directories.assets

The user uploaded assets are usually inside the save directory. If you run multiple instances of VTT on the same machine, this is a good candidate for pointing all of them to the same assets directory because it can become quite big.

betaServers

VTT can show a list of beta servers on the "about" overlay which can contain experimental changes users can test. As of 2022-03-13 the production server config looks like this:

  "betaServers": {
    "Stable": {
      "url": "https://beta.virtualtabletop.io",
      "return": false,
      "description": "This server contains all non-draft PRs that could be merged automatically and passed automatic tests."
    },
    "Editor": {
      "url": "https://beta.virtualtabletop.io/editor",
      "return": true,
      "description": "This server only contains updates to the JSON editor and lets you return the state to the production server so you can edit your production games using the latest editor features."
    },
    "Handpicked": {
      "url": "https://beta.virtualtabletop.io/handpicked",
      "return": false,
      "description": "This server contains handpicked critical bugfixes that should receive thorough testing."
    },
    "Unstable": {
      "url": "https://beta.virtualtabletop.io/unstable",
      "return": false,
      "description": "This server contains all PRs that could be merged automatically and can be very broken."
    }
  }

The two servers ("this" one and the beta server) have to be able to communicate with each other. Also make sure to set externalURL on "this" server because that's where the Return button will go to.

legacyServers

Not implemented yet. This will work similar to betaServers but for older legacy servers. The idea is that older games, that might have been broken by recent changes, are loaded in older versions of VTT instead.