Configuration

Configuring Tincan Server

The Tincan Server uses a configuration file named config.json to manage its settings. This file allows you to customize various aspects of the server, such as network settings, privacy options, and user access control. If the config file is not found in the working directory upon start, it will generate a default one and use it. The default config file output looks like this:

{

    "name": "Main Chat Room Server",
    "description": "This is the main chat room server.",
    "admins": ["admin1", "admin2", "admin3"],
    "moderators": ["mod1", "mod2"],
    "port": 3000,
    "whitelist": [],
    "blacklist": ["baduser1", "baduser2"],
    "public": true,
    "rooms": [
      {
        "name": "General Discussion",
        "description": "This is a general chat room for all users."
      },
      {
        "name": "Secret Meeting",
        "description": "This is a private chat room for important discussions."
      },
      {
        "name": "Tech Talk",
        "description": "Discuss the latest tech news and trends."
      }
    ],
    "voicerooms": [
        {
            "name": "General Talk",
            "description": "This is a voice chat room."
        }
    ]

}

Configuration Settings 🛠️

The config.json file includes the following settings:

General

  1. name: The name of the server.
  2. description: A user-friendly description of the server.
  3. admins: An array of usernames that are have administrative control of the server.
  4. moderators: An array of usernames that have moderator privileges over the server.

Accessibility

  1. port: The port number on which the server will listen for incoming connections. Default is 12345.
  2. public: A boolean value indicating whether the server is public or private. Set to true for a public server, false for a private server. Default is true.
  3. whitelist: An array of usernames allowed to connect to the server. Only applicable if the server is private.
  4. blacklist: An array of usernames that are blocked from connecting to the server.

Schema

  1. rooms: An array of chat rooms for the server to setup.
  2. voicerooms: An array of voice chat rooms for the server to setup.

Network 🌐

Tincan is meant to interop with IPv4 and IPv6 and will accept both connection types. If you are hosting a server instance and want to remain compatible for IPv4-only users, it is advised to setup port-forwarding appropriately. If you intend to list your server in the public directory, it is imperative you have a dedicated static IP and port setup. If you are hosting a server intermittently, say for friends, you don't necessarily need a dedicated static IP but you will need to have port-forwarding setup for anyone on IPv4.

Encryption 🔑

TincanServer will create a default key directory \TincanServerKeys within the working directory (where you run the TincanServer.exe from). This directory will store server-side AES keys. This should not be confused with the Tincan client's key directory for AES and PGP keys. The key directory that TincanServer uses is separate and allows the server application to easily access, store, and generate AES encryption keys.

Additional Considerations🤔

  1. Firewall Configuration: Ensure that your system's firewall allows incoming connections on the specified port. Tincan is not a network security application, you will have to configure your firewall and port forwarding.
  2. Security: Users must be logged in to join servers either publicly in the directory, or by manually entering an address and port. You can ban users by their username and this will prevent them from connecting to your server.
  3. Updating Access Control: Regularly check your whitelist and blacklist to control which users can connect to your server.