在 claw run 上部署酒馆

通过 claw 免费额度来部署酒馆,下面教程开始。

首先获取 5$ 条件

  • 首次注册赠送 5$:有效期一个月
  • 每个月赠送 5$:注册账号后一个月内绑定 GitHub 账户,同时要求绑定的 GitHub 账户注册时间超过 180 天

SillyTavern部署
点击 App Launchpad ,点击 Create App


容器参数如下
Application Nmaesillytavern
Image Nameghcr.io/sillytavern/sillytavern:latest
UsageFixed,0.5C512M
Container Port8000 Enable Internet Access开启
Environment Variables

NODE_ENV=production
FORCE_COLOR=1

Configmaps

  • File Name:/home/node/app/config/config.yaml
  • File content
# -- DATA CONFIGURATION --
# Root directory for user data storage
dataRoot: ./data
# -- SERVER CONFIGURATION --
# Listen for incoming connections
listen: true
# Listen on a specific address, supports IPv4 and IPv6
listenAddress:
  ipv4: 0.0.0.0
  ipv6: '[::]'
# Enables IPv6 and/or IPv4 protocols. Need to have at least one enabled!
# - Use option "auto" to automatically detect support
# - Use true or false (no qoutes) to enable or disable each protocol
protocol:
    ipv4: true
    ipv6: false
# Prefers IPv6 for DNS. Enable this on ISPs that don't have issues with IPv6
dnsPreferIPv6: false
# The hostname that autorun opens.
# - Use "auto" to let the server decide
# - Use options like 'localhost', 'st.example.com'
autorunHostname: "auto"
# Server port
port: 8000
# Overrides the port for autorun in browser.
# - Use -1 to use the server port.
# - Specify a port to override the default.
autorunPortOverride: -1
# -- SSL options --
ssl:
  enabled: false
  certPath: "./certs/cert.pem"
  keyPath: "./certs/privkey.pem"
# -- SECURITY CONFIGURATION --
# Toggle whitelist mode
whitelistMode: false
# Whitelist will also verify IP in X-Forwarded-For / X-Real-IP headers
enableForwardedWhitelist: true
# Whitelist of allowed IP addresses
whitelist:
  - ::1
  - 127.0.0.1
# Automatically whitelist Docker host and gateway IPs
whitelistDockerHosts: true
# Toggle basic authentication for endpoints
basicAuthMode: true
# Basic authentication credentials
basicAuthUser:
  username: "admin"
  password: "123456"
# Enables CORS proxy middleware
enableCorsProxy: false
# -- REQUEST PROXY CONFIGURATION --
requestProxy:
  # If a proxy is enabled, all outgoing HTTP/HTTPS requests will be routed through it.
  enabled: false
  # Proxy URL. Possible protocols: http, https, socks, socks5, socks4, pac
  url: "socks5://username:[email protected]:1080"
  # Proxy bypass list. Requests to these hosts won't be routed through the proxy.
  bypass:
    - localhost
    - 127.0.0.1
# Enable multi-user mode
enableUserAccounts: false
# Enable discreet login mode: hides user list on the login screen
enableDiscreetLogin: false
# Enable's authlia based auto login. Only enable this if you
# have setup and installed Authelia as a middle-ware on your
# reverse proxy
# https://www.authelia.com/
# This will use auto login to an account with the same username
# as that used for authlia. (Ensure the username in authlia
# is an exact match with that in sillytavern)
autheliaAuth: false
# If `basicAuthMode` and this are enabled then
# the username and passwords for basic auth are the same as those
# for the individual accounts
perUserBasicAuth: false

# User session timeout *in seconds* (defaults to 24 hours).
## Set to a positive number to expire session after a certain time of inactivity
## Set to 0 to expire session when the browser is closed
## Set to a negative number to disable session expiration
sessionTimeout: -1
# Disable CSRF protection - NOT RECOMMENDED
disableCsrfProtection: false
# Disable startup security checks - NOT RECOMMENDED
securityOverride: false
# -- LOGGING CONFIGURATION --
logging:
  # Enable access logging to access.log file
  # Records new connections with timestamp, IP address and user agent
  enableAccessLog: true
  # Minimum log level to display in the terminal (DEBUG = 0, INFO = 1, WARN = 2, ERROR = 3)
  minLogLevel: 0
# -- RATE LIMITING CONFIGURATION --
rateLimiting:
  # Use X-Real-IP header instead of socket IP for rate limiting
  # Only enable this if you are using a properly configured reverse proxy (like Nginx/traefik/Caddy)
  preferRealIpHeader: false
# -- ADVANCED CONFIGURATION --
# Open the browser automatically
autorun: true
# Avoids using 'localhost' for autorun in auto mode.
# use if you don't have 'localhost' in your hosts file
avoidLocalhost: false

## BACKUP CONFIGURATION
backups:
  # Common settings for all backup types
  common:
    # Number of backups to keep for each chat and settings file
    numberOfBackups: 50
  chat:
    # Enable automatic chat backups
    enabled: true
    # Maximum number of chat backups to keep per user (starting from the most recent). Set to -1 to keep all backups.
    maxTotalBackups: -1
    # Interval in milliseconds to throttle chat backups per user
    throttleInterval: 10000

# THUMBNAILING CONFIGURATION
thumbnails:
  # Enable thumbnail generation
  enabled: true
  # Image format of avatar thumbnails:
  # * "jpg": best compression with adjustable quality, no transparency
  # * "png": preserves transparency but increases filesize by about 100%
  # Changing this only affects new thumbnails. To recreate the old ones, clear out /thumbnails folder in your user data.
  format: "jpg"
  # JPG thumbnail quality (0-100)
  quality: 95
  # Maximum thumbnail dimensions per type [width, height]
  dimensions: { 'bg': [160, 90], 'avatar': [96, 144] }

# PERFORMANCE-RELATED CONFIGURATION
performance:
  # Enables lazy loading of character cards. Improves performances with large card libraries.
  # May have compatibility issues with some extensions.
  lazyLoadCharacters: false
  # The maximum amount of memory that parsed character cards can use. Set to 0 to disable memory caching.
  memoryCacheCapacity: '100mb'

# Allow secret keys exposure via API
allowKeysExposure: false
# Skip new default content checks
skipContentCheck: false
# Allowed hosts for card downloads
whitelistImportDomains:
  - localhost
  - cdn.discordapp.com
  - files.catbox.moe
  - raw.githubusercontent.com
# API request overrides (for KoboldAI and Text Completion APIs)
## Note: host includes the port number if it's not the default (80 or 443)
## Format is an array of objects:
## - hosts:
##   - example.com
##   headers:
##     Content-Type: application/json
##   - 127.0.0.1:5001
##   headers:
##     User-Agent: "Googlebot/2.1 (+http://www.google.com/bot.html)"
requestOverrides: []

# EXTENSIONS CONFIGURATION
extensions:
  # Enable UI extensions
  enabled: true
  # Automatically update extensions when a release version changes
  autoUpdate: true
  models:
    # Enables automatic model download from HuggingFace
    autoDownload: true
    # Additional models for extensions. Expects model IDs from HuggingFace model hub in ONNX format
    classification: Cohee/distilbert-base-uncased-go-emotions-onnx
    captioning: Xenova/vit-gpt2-image-captioning
    embedding: Cohee/jina-embeddings-v2-base-en
    speechToText: Xenova/whisper-small
    textToSpeech: Xenova/speecht5_tts

# Additional model tokenizers can be downloaded on demand.
# Disabling will fallback to another locally available tokenizer.
enableDownloadableTokenizers: true
# -- OPENAI CONFIGURATION --
# A placeholder message to use in strict prompt post-processing mode when the prompt doesn't start with a user message
promptPlaceholder: "[Start a new chat]"
openai:
  # Will send a random user ID to OpenAI completion API
  randomizeUserId: false
  # If not empty, will add this as a system message to the start of every caption completion prompt
  # Example: "Perform the instructions to the best of your ability.\n" (for LLaVA)
  # Not used in image inlining mode
  captionSystemPrompt: ""
# -- DEEPL TRANSLATION CONFIGURATION --
deepl:
  # Available options: default, more, less, prefer_more, prefer_less
  formality: default
# -- MISTRAL API CONFIGURATION --
mistral:
  # Enables prefilling of the reply with the last assistant message in the prompt
  # CAUTION: The prefix is echoed into the completion. You may want to use regex to trim it out.
  enablePrefix: false
# -- OLLAMA API CONFIGURATION --
ollama:
  # Controls how long the model will stay loaded into memory following the request
  # * -1: Keep the model loaded indefinitely
  # * 0: Unload the model immediately after the request
  # * N (any positive number): Keep the model loaded for N seconds after the request.
  keepAlive: -1
  # Controls the "num_batch" (batch size) parameter of the generation request
  # * -1: Use the default value of the model
  # * N (positive number): Use the specified value. Must be a power of 2, e.g. 128, 256, 512, etc.
  batchSize: -1
# -- ANTHROPIC CLAUDE API CONFIGURATION --
claude:
  # Enables caching of the system prompt (if supported).
  # https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching
  # -- IMPORTANT! --
  # Use only when the prompt before the chat history is static and doesn't change between requests
  # (e.g {{random}} macro or lorebooks not as in-chat injections).
  # Otherwise, you'll just waste money on cache misses.
  enableSystemPromptCache: false
  # Enables caching of the message history at depth (if supported).
  # https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching
  # -- IMPORTANT! --
  # Use with caution. Behavior may be unpredictable and no guarantees can or will be made.
  # Set to an integer to specify the desired depth. 0 (which does NOT include the prefill)
  # should be ideal for most use cases.
  # Any value other than a non-negative integer will be ignored and caching at depth will not be enabled.
  cachingAtDepth: -1
# -- SERVER PLUGIN CONFIGURATION --
enableServerPlugins: false
# Attempt to automatically update server plugins on startup
enableServerPluginsAutoUpdate: true

Local Storage

  • Capacity2
  • Mount Path/home/node/app/data

部署样例



确认无误,点击 Deploy Application

之后等待启动就可以了

21 Likes

厉害噢佬

一个月肯定不够的吧

1 Like


够用

据不确定消息,这个预估真的就只是预估,似乎实际费用有点不一样

我先测测吧

先等你观测几天 :tieba_087:


有谁能教教我, 为什么我设置了cname, 还不能用我的域名访问


这里配置了吗?

提示失败

小黄云关了

1 Like

cf那里的小黄云要关掉,claw这边添加完自定义域名之后,才可以开小黄云

1 Like

我关掉小黄云后 claw加上自定义域名了, 但还是访问不了自定义域名, 开启小黄云也是一样

还要等一段时间让dns生效?

对的,需要等一段时间才能生效

1 Like

自己电脑ping一下自定义域,结果是你解析的域名就已经生效了

1 Like

:rofl:自定义域可以ping通, 但是还是访问不了

你的项目已经运行起来了吗?
image

1 Like

起来了, 用claw给的域名可以进去

:scream:我的问题, claw加上自定义域后我没有点更新

:face_holding_back_tears:感谢佬友的解答

非常不错,感谢大佬

1 Like