Skip to content
Chatto v0.5.0

Standalone Binary

The standalone binary includes embedded NATS and optional automatic TLS. It does not use an external database.

You can use the automatic TLS function in Chatto. You can also put Chatto behind your reverse proxy.

SINGLE PROCESS BrowserSvelteKit SPA :443ChattoConnectRPC · WebSocket · TLS NATS embedded ./data/ HTTPS WSS

By default, chatto run starts an embedded NATS server with JetStream. Chatto reads chatto.toml from the current working directory. It stores embedded NATS data in ./data/ by default.

Prepare these items:

  • A Linux, macOS, or FreeBSD host with Chatto installed.
  • A domain that points to the host, such as chat.example.com.
  • Persistent storage for the Chatto data directory.
  • Inbound TCP ports 80 and 443 when Chatto terminates TLS.

Install Chatto with Homebrew on macOS or Linux:

Terminal window
brew install chattocorp/tap/chatto

You can also download an archive from GitHub Releases.

Use the Quick Start guide to generate chatto.toml.

Before you use the configuration in production, do these steps:

  • Set webserver.url to the public URL.
  • Add at least one verified email address to owners.emails.
  • Configure SMTP (the default transport) or JMAP if Chatto must send registration or verification email.
  • Select automatic Chatto TLS or TLS in a reverse proxy.
  • Put nats.embedded.data_dir on persistent storage.
  • Set nats.embedded.sync_interval to always for the strongest protection against data loss when the host stops without a normal shutdown.
  • Select the permitted login methods.
  • Do a test of an external login provider before you set auth.direct_login to false.

Examine these optional sections for the specified features:

  • Use [core.assets.s3] for S3-compatible upload storage.
  • Use [push] for push notifications.
  • Use [video] and [asset_processing] for video uploads.
  • Use [livekit] for calls.

For a single embedded NATS server, use this setting:

[nats.embedded]
sync_interval = 'always'

This setting syncs each JetStream write to disk before NATS acknowledges it. It reduces write throughput. If you omit it, Chatto keeps the NATS default sync interval.

On Linux, use systemd to start Chatto and restart it after a failure. Create this unit:

/etc/systemd/system/chatto.service
[Unit]
Description=Chatto
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=chatto
Group=chatto
WorkingDirectory=/opt/chatto
ExecStart=/opt/chatto/chatto run -c chatto.toml
Restart=always
RestartSec=5
AmbientCapabilities=CAP_NET_BIND_SERVICE
[Install]
WantedBy=multi-user.target

Make sure that the chatto user can read chatto.toml and write the data directory. Then, enable and start the service:

Terminal window
sudo systemctl enable --now chatto

The standalone binary does not include LiveKit. Select one of these methods to add calls:

  1. Use Docker Compose with the included LiveKit service.
  2. Run a separate LiveKit server. Then, configure the LiveKit environment variables.