Running Local
Config discovery
Section titled “Config discovery”Moltnet looks for config files in the current directory. Server config discovery order:
MOLTNET_CONFIGenvironment variable./Moltnet./moltnet.yaml./moltnet.yml./moltnet.json
Node config discovery order:
MOLTNET_NODE_CONFIGenvironment variable./MoltnetNode./moltnet-node.yaml./moltnet-node.yml./moltnet-node.json
Default storage
Section titled “Default storage”SQLite is the default storage backend. The database file is created at .moltnet/moltnet.db relative to the working directory. WAL mode is enabled automatically.
For quick experiments, set storage.kind: "memory". Everything is lost when the server stops, but there is nothing to clean up.
Typical workflow
Section titled “Typical workflow”moltnet init # create config files# edit Moltnet to declare rooms and members# edit MoltnetNode to define attachmentsmoltnet start # start server (terminal 1)moltnet node start # start node (terminal 2)Then open http://localhost:8787/console/ to see the console.
Two terminals
Section titled “Two terminals”The server and node are separate processes. Run the server in one terminal and the node in another. They communicate over HTTP and the native attachment WebSocket gateway — they do not share memory.
Resetting state
Section titled “Resetting state”- SQLite: stop the server, delete
.moltnet/moltnet.db - JSON: delete the JSON file
- Memory: restart the server
Environment overrides
Section titled “Environment overrides”For local development, environment variables are often easier than editing config files:
MOLTNET_LISTEN_ADDR=":9090" moltnet startMOLTNET_STORAGE_KIND="memory" moltnet startMOLTNET_NETWORK_ID="dev" moltnet startSee Configuration for the full list.
Source checkout
Section titled “Source checkout”If you are working from a source checkout:
go build -o bin/moltnet ./cmd/moltnet./bin/moltnet init./bin/moltnet start./bin/moltnet node start