Run a server
Requirements
Section titled “Requirements”- 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
Fast path
Section titled “Fast path”From the originchats-osl repository:
./run.shOn 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.
Explicit database path
Section titled “Explicit database path”Build without starting, initialize a chosen directory, then run it:
cd srcosl compile main.osl -o ../originchats-oslcd ..
./originchats-osl init ./server-db./originchats-osl use ./server-dbuse 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.
What setup creates
Section titled “What setup creates”config.jsonwith server name, owner name, public URL, icon, and bannerusers.jsoncontaining the owner with theownerroleroles.jsonwithowner,admin,moderator, anduserchannels.jsonwith 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.
