Skip to content

begonia599/sillytavern-one-click-deploy

Repository files navigation

SillyTavern One-Click Deployment Scripts

GitHub Stars GitHub Issues License

πŸš€ Complete solution for one-click deployment of SillyTavern on Ubuntu servers

English | δΈ­ζ–‡

✨ Features

  • 🎯 One-Click Deployment - Single script completes all configurations
  • 🐳 Docker Support - Automatic Docker environment installation and configuration
  • πŸ”’ Security Configuration - Automated whitelist and user account management
  • 🌐 Global Optimization - Official Docker repositories with fallback mirrors
  • πŸ“š Comprehensive Documentation - Includes troubleshooting and maintenance guides

πŸ“ Script Files Overview

This project provides the following script files:

πŸš€ Recommended (One-Click Deployment)

  • one-click-sillytavern.sh - One-click deployment script that automatically handles Docker installation, SillyTavern deployment, and configuration

πŸ”§ Alternative (Step-by-Step Deployment)

  • install-docker.sh - Docker environment installation script
  • deploy-sillytavern.sh - SillyTavern container deployment script
  • configure-whitelist.sh - Whitelist configuration and account creation script

πŸ“‹ Prerequisites

Before starting, ensure you have:

  • An Ubuntu server (Ubuntu 20.04 or higher recommended)
  • Port 8000 open on your server (for SillyTavern access)
  • SSH access with sudo privileges
  • Stable internet connection

πŸš€ Option 1: One-Click Deployment Script (Recommended)

This is the recommended approach. The script automatically handles Docker installation, SillyTavern deployment, and whitelist configuration.

1.1 Download and Run the One-Click Script

  1. Upload the one-click-sillytavern.sh script to any directory on your server

  2. Connect via SSH and run the following commands:

# Grant execution permissions
chmod +x one-click-sillytavern.sh
# Run the one-click deployment script
sudo ./one-click-sillytavern.sh

1.2 Script Execution Process

The script executes in three automated stages:

πŸ”§ Stage 1: Docker Environment Check & Installation

  • Automatically detects if Docker and Docker Compose are installed
  • If not installed, automatically installs using official Docker repositories
  • Configures user permissions (if Docker is installed for the first time, the script will prompt for re-login)

πŸ“¦ Stage 2: SillyTavern Automated Deployment

  • Creates /opt/sillytavern project directory
  • Generates docker-compose.yml configuration file
  • Creates initial configuration files
  • Pulls and starts SillyTavern container

βš™οΈ Stage 3: Whitelist Configuration & Account Creation

  • Prompts you to obtain your public IP address
  • Automatically configures whitelist and restarts container
  • Guides you through user account creation
  • Finally disables whitelist mode

1.3 Operation Guide

When the script reaches Stage 3:

  1. Get IP Address: Visit http://YourServerIP:8000 in your browser and note the public IP displayed on the page
  2. Enter IP Address: Return to terminal, enter your public IP address and press Enter
  3. Create Account: Refresh the browser page, complete user account creation and login
  4. Confirm Completion: Return to terminal and press y to complete final configuration

πŸŽ‰ Done! The entire deployment process takes about 5-10 minutes, after which you can use SillyTavern normally.


πŸ”§ Option 2: Step-by-Step Deployment Scripts (Alternative)

If you prefer more granular control over the deployment process, or if the one-click script encounters issues, you can use the following step-by-step approach.

2.1 Step 1: Install Docker

Docker is the foundation for running SillyTavern in containers. This step automatically installs Docker and Docker Compose.

Upload and Run Installation Script

  1. Upload the install-docker.sh script to any directory on your server

  2. Connect via SSH and run the following commands:

# Grant execution permissions
chmod +x install-docker.sh
# Run installation script
sudo ./install-docker.sh

Note: The script uses official Docker repositories with fallback mirror sources to ensure successful installation.

Restart and Verify Installation

After the script completes, you need to re-login to your SSH session:

# Re-login SSH
exit
# Then reconnect SSH

After logging in, verify Docker installation:

docker --version
docker compose version

βœ… Success Indicator: If both commands return version numbers, your Docker environment is ready.

2.2 Step 2: Deploy SillyTavern

Upload and Run Deployment Script

  1. Upload the deploy-sillytavern.sh script to any directory on your server

  2. Grant permissions and run:

# Grant execution permissions
chmod +x deploy-sillytavern.sh
# Run deployment script
sudo ./deploy-sillytavern.sh

Check Container Status

After the script completes, check if the container started successfully:

docker ps

βœ… Success Indicator: You should see the sillytavern container with STATUS showing Up.

2.3 Step 3: Configure Whitelist and Create Account

Upload and Run Configuration Script

  1. Upload the configure-whitelist.sh script to any directory on your server

  2. Grant permissions and run:

# Grant execution permissions
chmod +x configure-whitelist.sh
# Run configuration script
sudo ./configure-whitelist.sh

Complete Whitelist Configuration and Account Creation

Follow the script prompts to complete IP address input, account creation, etc. The specific operations are the same as the one-click script.


πŸ“š Frequently Asked Questions & Troubleshooting

❓ What if the one-click script is interrupted midway?

If the one-click script is interrupted after Stage 1 (Docker installation), you can re-run the script and it will automatically skip Docker installation and continue with subsequent steps.

❓ What if the container fails to start?

# View container logs
sudo docker logs sillytavern

# Restart container
cd /opt/sillytavern
sudo docker compose restart

❓ How to stop/restart SillyTavern?

# Navigate to deployment directory
cd /opt/sillytavern

# Stop service
sudo docker compose down

# Start service
sudo docker compose up -d

# Restart service
sudo docker compose restart

❓ What if I forgot my account credentials?

You can reset the configuration to recreate an account:

# Stop container
cd /opt/sillytavern
sudo docker compose down

# Delete user data (Note: this will clear all chat history)
sudo rm -rf data/

# Restart container
sudo docker compose up -d

# Then re-run the whitelist configuration script
sudo ./configure-whitelist.sh

❓ How to update SillyTavern to the latest version?

cd /opt/sillytavern
sudo docker compose pull
sudo docker compose up -d

❓ Where is data stored?

User data and configuration files are stored in the /opt/sillytavern/ directory:

  • config/ - Configuration files
  • data/ - User data
  • plugins/ - Plugins
  • extensions/ - Extensions

πŸ”’ Security Recommendations

  1. Regular Updates: Regularly update SillyTavern images and system security patches
  2. Firewall Configuration: Ensure only necessary ports are open (e.g., 8000, 22)
  3. Strong Password Policy: Set strong passwords for SillyTavern accounts
  4. Data Backup: Regularly backup important data in the /opt/sillytavern/ directory

🀝 Contributing

We welcome Issues and Pull Requests to help improve this project!

How to Contribute

  1. Fork this repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

⭐ Star History

If this project helps you, please give us a Star!

Star History Chart

πŸ“ž Support

If you encounter any issues:


Thank you for using! If this project helps you, please consider giving it a ⭐️

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages