# FigCraft server — public share links for Coordenadas Self-hosted `figcraft-server`, so FigCraft files can be published from the app and shared with a public `wss://` link and a join code, instead of depending on `collab.craftapps.dev` (the free public server, which is full — *"the server keeps at most 1000 files"*). Once this is up it serves **every** Coordenadas brand, not just PayGo. --- ## Why a server is needed at all `figcraft-server` is **Linux only** — releases ship `figcraft-server--linux-x86_64.tar.gz` and `-linux-aarch64`, and there is no Windows build. It also speaks **plain `ws://`**; the `wss://` a public link needs comes from a reverse proxy (Caddy) in front of it. The upstream `packaging/server/install.sh` sets up the binary, the `figcraft` user, systemd, Caddy and `ufw` in one run, so the work below is mostly provisioning. Reference: --- ## What you need to do (I can't do these for you) These three need your accounts and your money, so they're yours: ### 1. Rent the server Ubuntu 24.04, x86_64 or arm64, **1 GB of memory is enough**. Add your SSH key during creation. | Provider | Plan | Price | Note | |---|---|---|---| | Hetzner | CX22 (Ashburn, VA) | ~€3.79/mo | Cheapest; Ashburn is the closest region to Trinidad | | Hetzner | CAX11 (arm64, EU only) | ~€3.29/mo | Cheapest overall, but EU latency | | DigitalOcean | Basic 1 GB (NYC) | $4–6/mo | Simplest UI if you've not used Hetzner | Note the server's IPv4 (and IPv6, if it has one). ### 2. Point DNS at it At whoever runs `coordenadas.co`, add: ``` figcraft.coordenadas.co. A figcraft.coordenadas.co. AAAA # only if the server has one ``` Caddy needs this resolving *before* step 3, or it can't get the certificate. ### 3. Run the installer ```sh ssh root@figcraft.coordenadas.co VERSION=$(curl -fsSL https://api.github.com/repos/storytold/figcraft/releases/latest \ | sed -n 's/.*"tag_name": *"v\([^"]*\)".*/\1/p') curl -fLO "https://github.com/storytold/figcraft/releases/download/v$VERSION/figcraft-server-$VERSION-linux-$(uname -m).tar.gz" tar -xzf figcraft-server-*.tar.gz && cd figcraft-server-*/ sudo ./install.sh \ --host figcraft.coordenadas.co \ --email pabloej1994@gmail.com \ --private \ --backups ``` **`--private` matters.** Without it the server is *open to the public*: anyone who finds the address can publish their files to it, and you become responsible for moderating what strangers upload. `--private` means only someone holding the server key publishes — you. That's what you want here. `--backups` turns on the nightly backup to `/var/backups/figcraft-server` (it stops the server for a few seconds). The archives contain every file **and the server key**, so treat them as secrets. The script prints the server key when it finishes. **Send me that line** (or just the `wss://figcraft.coordenadas.co/?key=…` address) and I'll do the rest. --- ## Then I take over With the address and key I'll: 1. Point FigCraft's preference at the server (`pref.publishServer`). 2. Publish `PayGo App Design.figcraft` to it. 3. Hand you the **view link** and **join code** to share, and the edit link for Ian and the devs. That's `_server/publish.py` — one command. --- ## Checking it ```sh curl https://figcraft.coordenadas.co/healthz # answers: ok journalctl -u figcraft-server -f # live log ``` `/healthz` is worth pointing an uptime monitor at. ## Day-to-day All of these run on the server: ```sh ADMIN="sudo -u figcraft figcraft-server --config /etc/figcraft-server/server.toml" $ADMIN key # show the server key again $ADMIN files list --sort size # what's published $ADMIN files remove FILE # delete one ``` Upgrading is the same `install.sh` run again — it only restarts when something actually changed. ## Settings `/etc/figcraft-server/server.toml`, then `systemctl restart figcraft-server`. The defaults the installer writes are fine; the ones worth knowing: | Key | Default | Meaning | |---|---|---| | `max_files` | 1000 | Most files kept — the exact limit the public server hit | | `max_file_mb` | 64 | Largest file snapshot (PayGo is 0.13 MB, so no concern) | | `public_url` | — | Set to `wss://figcraft.coordenadas.co/` by the installer; links name this | | `open_publish` | false | Left false by `--private`. Don't turn it on unless you mean to host strangers | | `idle_days` | 30 | Only applies to files published *without* the key, so not ours | ## Two things to be clear about - **Files are not end-to-end encrypted.** Whoever runs the server can read them. On a server you rent, that's you — which is strictly better than the public server, where it was `hello@storyteller.ai`. It still means the VPS provider's disk holds readable design files. - **A view link is still a FigCraft link.** Whoever opens it needs FigCraft (desktop or the browser build). For a client who just wants to look at screens, the published HTML page is the better thing to send.