Skip to content

Run a server

  • The OSL CLI
  • The Go version declared by src/go.mod
  • A public HTTP or HTTPS URL for the server
  • A Rotur account for the initial owner

From the originchats-osl repository:

Terminal window
./run.sh

On first run, this compiles src/main.osl to originchats-osl and starts the interactive setup because db/config.json does not exist. Setup asks for the public URL and authenticates the owner with Rotur. It uses browser login on local port 56199 when possible and falls back to manual token entry.

Later runs reuse db/ and start the server directly.

Build without starting, initialize a chosen directory, then run it:

Terminal window
cd src
osl compile main.osl -o ../originchats-osl
cd ..
./originchats-osl init ./server-db
./originchats-osl use ./server-db

use requires an existing directory containing config.json. Relative database paths are resolved before the process changes its working directory. All configured and conventional storage paths are then relative to that database directory.

  • config.json with server name, owner name, public URL, icon, and banner
  • users.json containing the owner with the owner role
  • roles.json with owner, admin, moderator, and user
  • channels.json with about, announcements, welcome, general, random, and moderators sections
  • storage folders and indexes used by messages, threads, unreads, assets, reports, polls, audit logs, webhooks, and attachments

The default listener is 127.0.0.1:5613. Both websocket.host and websocket.port are used to build the HTTP/WebSocket bind address. IPv6 host values are bracketed automatically.