# Docker Installation

# Installation

# Linux

  1. Install Docker by following the Docker installation guide here.

  2. Follow the steps in Manage Docker as a non-root user in the Docker Post-Installation Guide.

  3. Install Git using your package manager.

    • Debian (Ubuntu/Pop! OS/etc.)

      sudo apt install git
    • Arch Linux (Manjaro/EndeavourOS/etc.)

      sudo pacman -S git
    • Fedora, Red Hat Enterprise Linux (RHEL), etc.

      sudo dnf install git
  4. Clone the SillyTavern repository.

    • Release (Stable Branch)

      git clone https://github.com/SillyTavern/SillyTavern && cd SillyTavern/docker
    • Staging (Development Branch)

      git clone https://github.com/SillyTavern/SillyTavern -b staging && cd SillyTavern/docker
  5. Execute docker compose by running the following command within the Docker folder.

    docker compose up -d
  6. Execute the following Docker command to obtain the IP of your SillyTavern Docker container.

    docker network inspect docker_default

    You should receive some sort of output similar to the following below.

    [
        {
            "Name": "docker_default",
            "IPAM": {
                "Config": [
                    {
                        "Subnet": "172.18.0.0/16",
                        "Gateway": "172.18.0.1"
                    }
                ]
            }
        }
    ]

    Copy down the IP you see in Gateway as this will be important.

  7. Using sudo, open nano and run the following command.

    sudo nano config/config.yaml

    Within nano, go down to whitelist. You should see something similar to the following below.

    whitelist:
        - 127.0.0.1

    Add a new line below 127.0.0.1 and put in the IP you copied from Docker. It should look something similar to the following afterwards.

    whitelist:
        - 127.0.0.1
        - 172.18.0.1

    Save the file by pressing Ctrl+S then exit nano by pressing Ctrl+X.

  1. Restart the Docker Container to apply the new configuration.

    docker compose restart sillytavern
  2. Open an new browser and go to http://localhost:8000. You should see SillyTavern load in a few moments.

  3. Enjoy! :D

# Windows

  1. Install Docker Desktop by following the Docker installation guide here.

  2. Install Git for Windows.

  3. Clone the SillyTavern repository.

    • Release (Stable Branch)

      git clone https://github.com/SillyTavern/SillyTavern && cd SillyTavern/docker
    • Staging (Development Branch)

      git clone https://github.com/SillyTavern/SillyTavern -b staging && cd SillyTavern/docker
  4. Execute docker compose by running the following command within the Docker folder.

    docker compose up -d
  5. Execute the following Docker command to obtain the IP of your SillyTavern Docker container.

    docker network inspect docker_default

    You should receive some sort of output similar to the following below.

    [
        {
            "Name": "docker_default",
            "IPAM": {
                "Config": [
                    {
                        "Subnet": "172.18.0.0/16",
                        "Gateway": "172.18.0.1"
                    }
                ]
            }
        }
    ]

    Copy down the IP you see in Gateway as this will be important.

  6. Running Notepad or a code editor of your choice with administrator rights, go to config and open config.yaml.

    Within the editor of your choice, you should see something similar to the following below.

    whitelist:
        - 127.0.0.1

    Add a new line below 127.0.0.1 and put in the IP you copied from Docker. It should look something similar to the following afterwards.

    whitelist:
        - 127.0.0.1
        - 172.18.0.1

    Save the file by pressing Ctrl+S then exit your editor.

  1. Restart the Docker Container to apply the new configuration.

    docker compose restart sillytavern
  2. Open an new browser and go to http://localhost:8000. You should see SillyTavern load in a few moments.

  3. Enjoy! :D

# macOS

  1. Install Docker Desktop by following the Docker installation guide here.

  2. Install git using Homebrew.

    brew install git
  3. Clone the SillyTavern repository.

    • Release (Stable Branch)

      git clone https://github.com/SillyTavern/SillyTavern && cd SillyTavern/docker
    • Staging (Development Branch)

      git clone https://github.com/SillyTavern/SillyTavern -b staging && cd SillyTavern/docker
  4. Execute docker compose by running the following command within the Docker folder.

    docker compose up -d
  5. Execute the following Docker command to obtain the IP of your SillyTavern Docker container.

    docker network inspect docker_default

    You should recieve some sort of output similar to the following below.

    [
        {
            "Name": "docker_default",
            "IPAM": {
                "Config": [
                    {
                        "Subnet": "172.18.0.0/16",
                        "Gateway": "172.18.0.1"
                    }
                ]
            }
        }
    ]

    Copy down the IP you see in Gateway as this will be important.

  6. Using sudo, open nano and run the following command.

    sudo nano config/config.yaml

    Within nano, go down to whitelist. You should see something similar to the following below.

    whitelist:
        - 127.0.0.1

    Add a new line below 127.0.0.1 and put in the IP you copied from Docker. It should look something similar to the following afterwards.

    whitelist:
        - 127.0.0.1
        - 172.18.0.1

    Save the file by pressing Ctrl+S then exit nano by pressing Ctrl+X.

  1. Restart the Docker Container to apply the new configuration.

    docker compose restart sillytavern
  2. Open an new browser and go to http://localhost:8000. You should see SillyTavern load in a few moments.

  3. Enjoy! :D

# Configuring SillyTavern

SillyTavern's configuration file (config.yaml) will be located within the config folder. Configuring the config file should be no different than configuring it without Docker, however you will need to run nano or a code editor with administrator rights in order to save your changes.

# Locating User Data

SillyTavern's data folder will be within the data folder. Backing up your files should be easy to do, however, restoring or adding content into it may require you to do so with administrator rights.

# Running Server Plugins

Running plugins like HoYoWiki-Scraper-TS or SillyTavern-Fandom-Scraper within Docker is no different from running it on your system without Docker, however we will need to do a slight modification to the Docker Compose script in order to do so.

  1. Using nano or a code editor, open docker-compose.yml and add the following line below volumes.
    volumes:
        - "./config:/home/node/app/config"
        - "./data:/home/node/app/data"
        - "./plugins:/home/node/app/plugins"
  1. Create a new folder within the docker folder called plugins.
  2. Follow your plugin's instructions on installing the plugin.
  3. Using nano or a code editor with administrator rights, open config.yaml (within the config folder) and enable enableServerPlugins
enableServerPlugins: true
  1. Restart the Docker container.
docker compose restart sillytavern
  1. Profit.