Coordinator setup (one command)#
koordinator-kur.sh turns a Linux server into a working reference coordinator in a few minutes. The coordinator only validates and averages adapters; no GPU is needed, a small server is enough.
Status (alpha). The script is tested automatically on clean GitHub Ubuntu and Arch Linux machines (service-less mode). The systemd service, its hardening and the management commands were tried by hand on a real Ubuntu server. The HTTPS path with Caddy has not yet been tried with a real domain (the generated config is validated with Caddy). If you run into problems, report them on GitHub.
What you need first#
- A Linux server (Ubuntu, Debian, Arch and other glibc-based distributions; x86_64 or aarch64) with root (sudo) access, at least ~2 GB of memory and ~3 GB of free disk (more as your data grows).
- A domain name with an A record pointing to the server (for HTTPS) and ports 80 and 443 open.
- Your training data: plain text files (
.txt,.md,.jsonl). The source and licence of the data are your responsibility; Modelen neither provides nor selects data. See Integration options.
Install#
curl -fsSL https://github.com/macbyclp/modelen-tr/releases/latest/download/koordinator-kur.sh -o koordinator-kur.sh
bash koordinator-kur.sh --dene # see what it would do first (installs nothing)
sudo bash koordinator-kur.sh --alan-adi coordinator.example.org --veri ./texts/When it finishes, the coordinator is running, the protocol conformance test has run by itself, and your shared key and the next steps are printed.
| Option | Meaning |
|---|---|
--alan-adi NAME | Domain for HTTPS; Caddy is installed and the certificate is obtained automatically. Without it only 127.0.0.1 is listened on |
--veri PATH | A .txt / .md / .jsonl file or folder (tokenised for you) or a ready .safetensors |
--tur N | Total rounds (20) |
--en-az N | Results needed to close a round (2) |
--ic-adim N | A volunteer's local steps per round (20) |
--parca N | Number of data shards (4); each volunteer downloads only one |
--port N | Coordinator port (8750; local only) |
--acik | No key: a publicly open coordinator. Default: a random shared key (closed group) |
--hedef DIR | Install folder (default /opt/modelen-koordinator) |
--sistemsiz | Run in the background without systemd and Caddy (testing; no root needed) |
--surum TAG | A specific release (default: latest) |
What gets installed?#
| Part | Description |
|---|---|
| Python 3.12 + PyTorch (CPU) | In .venv via uv; your system Python is untouched |
| Coordinator scripts | From the release's modelen-istemci.zip, with SHA-256 verified |
| Starting adapter | Generated without the model (adaptor_uret.py); no 1.2 GB base-model download |
| Training data | Tokenised by veri_hazirla.py with the base model's tokenizer (only tokenizer files, ~10 MB, are downloaded) |
| systemd service | modelen-koordinator.service, run by a dedicated modelen-koordinator user, memory-limited, istemci/ read-only |
| HTTPS | Caddy (with --alan-adi), if 80/443 are free. If the server already has another web server it is not installed; a ready config snippet is printed |
modelen-koordinator | Management command (below) |
After install: connecting to the portal#
- DNS. Point your domain's A record at the server and open 80 and 443 (Caddy then gets the certificate).
- Application. Create an account on modelen.tr, verify your e-mail, and apply via Panel → Application; use
https://your-domainas the address. See Becoming a coordinator. - Address verification. The portal gives you a value; publish it with this command, then have the portal check it: ``
bash sudo modelen-koordinator dogrulama modelen-dogrulama-AbC123...`` Details: Address verification. - Heartbeat. Create a key under Panel → API keys and start the heartbeat service; your coordinator then shows as "online" in the directory: ``
bash sudo modelen-koordinator nabiz mdl_...`` It works even when your coordinator is key-protected (closed). See Heartbeat. - Volunteers. In a closed group you hand the key to volunteers (
modelen-koordinator anahtar). To open it to everyone:modelen-koordinator acik.
Management commands#
| Command | What it does |
|---|---|
modelen-koordinator durum | Service status and a /durum summary |
modelen-koordinator anahtar | Shows the shared key |
modelen-koordinator acik / kapat | Keyless (open to everyone) / keyed (closed group) mode; the service restarts |
modelen-koordinator dogrulama <value> | Writes the file for the portal's address verification |
modelen-koordinator nabiz <API_KEY> | Starts sending heartbeats to the portal (systemd service) |
modelen-koordinator uyum | Runs the protocol conformance test |
modelen-koordinator gunluk | Recent logs |
modelen-koordinator baslat / durdur / yeniden-baslat | Service control |
modelen-koordinator kaldir | Removes the services (the data folder is kept) |
Security notes#
- The key is not visible in the process list (
ps): it lives in an environment file (koordinator.env, readable only by root and the service user). - The coordinator listens only on 127.0.0.1; only the HTTPS proxy faces the outside. A per-IP rate limit and a worker-count limit are on (Reference coordinator).
- Open mode (no key) lets anyone submit results. Poisoning protection is only simple outlier elimination and structural validation; it is not enough against a determined attacker (Security). We recommend starting with a closed group.
- The content and licence of your training data are your responsibility.
Updating and removing#
- Update: run the script again with the same options. The existing key, round state and work folder are kept.
- Remove:
sudo modelen-koordinator kaldir, then, if you like,sudo rm -rf /opt/modelen-koordinator.
If the server already runs a web server#
If 80/443 are in use, Caddy is not installed. At the end the script prints a ready snippet. For an existing Caddy:
coordinator.example.org {
handle /.well-known/modelen-dogrulama.txt {
root * /opt/modelen-koordinator/dogrulama
rewrite * /dogrulama.txt
file_server
}
reverse_proxy 127.0.0.1:8750
}For nginx: location / { proxy_pass http://127.0.0.1:8750; } plus location = /.well-known/modelen-dogrulama.txt { alias /opt/modelen-koordinator/dogrulama/dogrulama.txt; }. If you gave the script --alan-adi, the coordinator starts with --vekil, so the IP limit sees the real client address the proxy forwards (X-Forwarded-For).
Troubleshooting#
| Symptom | What to do |
|---|---|
| Service does not start | sudo modelen-koordinator gunluk |
HATA: port 8750 in use | Give another port with --port |
| No certificate | Is the A record right, are 80 and 443 reachable from outside? DNS propagation can take a few minutes |
veri hazırlanamadı (data preparation failed) | Check the --veri path and extensions (.txt, .md, .jsonl); make sure the server can reach Hugging Face (for the tokenizer) |
Volunteers get 401 | The group is closed: give them the key or run modelen-koordinator acik |
By hand (without the script)#
If you prefer not to use the script you can set everything up yourself: see Reference coordinator and Write your own coordinator.