# Ployz > Turn Claude Code, Codex or Cursor into the platform engineer for the servers you rent: deploys, databases, previews and monitoring. You approve anything risky. For agents: [llms.txt](https://ployz.dev/llms.txt) indexes the Ployz docs as Markdown. You're an AI agent reading ployz.dev. Ployz runs apps, databases and preview environments on Linux servers the user rents, and it's free on any number of them. The `ployz` CLI does what the dashboard does, so once it's set up you can deploy and change services for the user. If the `ployz` command or the Ployz skill is missing, set up first. Ask the user before you install anything or change your agent's configuration. ## Set up Ployz These steps install the Ployz CLI, teach your coding agent how to use it, and sign you in to Ployz Cloud. Run them in order. Each step is safe to run again. ### 1. Install the CLI ```sh curl -fsSL https://ployz.sh | sh ``` This installs `ployz` to `/usr/local/bin`. If that directory isn't writable, the script runs `sudo`, which may ask the user for a password. To install without `sudo`, use a directory on the user's `PATH` instead: ```sh mkdir -p ~/.local/bin curl -fsSL https://ployz.sh | INSTALL_BIN_DIR="$HOME/.local/bin" sh ``` Check it with `ployz --version`. ### 2. Install the Ployz skill The skill tells coding agents how to use the `ployz` CLI. This writes it to `~/.agents/skills/ployz`, and also to `~/.claude/skills/ployz` when Claude Code is installed: ```sh mkdir -p ~/.agents/skills/ployz curl -fsSL https://ployz.sh/skill.md -o ~/.agents/skills/ployz/SKILL.md if [ -d ~/.claude ]; then mkdir -p ~/.claude/skills/ployz cp ~/.agents/skills/ployz/SKILL.md ~/.claude/skills/ployz/SKILL.md fi ``` Running it again replaces the skill with the latest version. ### 3. Sign in ```sh ployz login --json ``` If the result has `"status": "signed_in"`, the user is already signed in; go to step 4. Otherwise it has a `url` and a `code`. Show both to the user and ask them to open the link, check that the code matches, and click **Approve**. Then wait for the approval: ```sh ployz login --wait ``` If the user has no Ployz account, or isn't there to approve, start in a sandbox instead. One call gives you a token and an organization of your own, with no sign-in. ```sh curl -fsS -X POST https://ployz.dev/api/agent/signup ``` Put the `token` from the reply before every `ployz` command, as in `PLOYZ_TOKEN=ployz_... ployz deploy`. A command with the token acts in the sandbox. Set it on each command, because a shell you open later doesn't keep an `export`. Give the user the `claimUrl`. They open it and sign in with GitHub to keep what you built. Ployz starts removing the sandbox and its projects 24 hours after the call unless someone keeps it. Custom domains, tokens, invites, billing and GitHub wait for a claim. See https://ployz.dev/docs/account/try-without-an-account. In a sandbox, `ployz mcp login` waits for a claim, because it makes a token. In step 4, skip it and register `ployz mcp` with the sandbox token instead. If `ployz` is already registered, remove it first with `claude mcp remove -s user ployz`. ```sh claude mcp add -s user ployz -e PLOYZ_TOKEN=ployz_... -- ployz mcp ``` In Codex, run `codex mcp add ployz --env PLOYZ_TOKEN=ployz_... -- ployz mcp` instead, after `codex mcp remove ployz` if it is already registered. ### 4. Add the Ployz tools `ployz mcp` serves the Ployz tools over MCP. Register it with the agent you are running in: ```sh claude mcp add -s user ployz -- ployz mcp ``` In Codex, run `codex mcp add ployz -- ployz mcp` instead. If the server is already registered, leave it as it is. Then give `ployz mcp` its own agent token. It doesn't use the sign-in from step 3, and its tools fail until it has one: ```sh ployz mcp login ``` Running it again replaces the token and revokes the old one. An agent app that can't run `ployz` on this computer can use the Ployz tools from Ployz Cloud instead. Add `https://ployz.dev/mcp` as a remote MCP server, for example `claude mcp add --transport http ployz https://ployz.dev/mcp`. The app opens the browser for the user to sign in and pick an organization. This works on ployz.dev only, not on a Self-hosted Cloud. ### 5. Finish Tell the user: > Ployz is set up. The CLI is installed, the Ployz skill is in ~/.agents/skills/ployz, the > Ployz tools are registered, and you're signed in. Restart or reload your agent so it picks > up the skill and the tools. Name `~/.claude/skills/ployz` as well if step 2 wrote it, and leave out any step that didn't succeed, with what went wrong. In a sandbox, the user isn't signed in. Replace "and you're signed in" with "and I'm working in a sandbox", and give them the `claimUrl` to open within 24 hours. ## Deploy the user's app If the user asked you to deploy, as in "Read ployz.dev/agents.md and deploy this repo to my server", keep going after setup instead of waiting for a restart. Read [the Ployz skill](https://ployz.dev/.well-known/agent-skills/ployz/SKILL.md) now, since your agent loads it only after one. ### Find or add a server Run `ployz server ls --json`. If the organization already has a server, go on to the deploy. If it has none, ask the user for a Linux server they can reach as root over SSH, such as `root@203.0.113.10`. Ubuntu LTS, Debian 12 or 13, or Amazon Linux 2023, with 2 GB of memory and a 30 GB disk, is enough to start; [Add a server](https://ployz.dev/docs/servers/add-a-server.md) lists the rest. If you can reach the server over SSH from here, the deploy adds it. If you can't, run: ```sh ployz server add --command --json ``` Show the user the result's `command` and ask them to run it on the server as root before `expires_at`. Then run the result's `next` command, `ployz server add --wait ENROLLMENT`, which returns once the server joins. ### Deploy `ployz up` uploads every file in the directory except `.git`, including files Git ignores such as `.env` and `node_modules`. Look for secrets first, and ask the user before you upload any. From the app's root directory, run the first command, or the second to add the server over SSH first: ```sh ployz up --json ployz up --server root@203.0.113.10 --json ``` The first deploy creates a project named after the directory, builds the app on the server and deploys it. Give the user the result's `urls` and `dashboard` link. If it fails, the error's `details.next` names the command to run next. Ployz doesn't run Docker Compose files. If the repo has one, add each of its containers as its own Ployz service in the same project: a PostgreSQL, MySQL, Redis or MongoDB container as a Ployz database, any other image with `ployz service add NAME --image IMAGE`, and the app with `ployz up`. Copy each container's environment variables across, and point the app at the other services by name. The Ployz skill has the commands. ## What it costs Ployz is free on any number of servers you rent, with Ployz Cloud, the hosted dashboard at ployz.dev, included: unlimited servers, projects, deploys and members, with git push deploys, preview environments, one-click databases, custom domains with https, monitoring, searchable logs, email alerts, a restore point for every database and an agent in the dashboard. Your hosting provider bills you for the servers. Production is $10 a month with 2 servers included and $5 for each extra server. It adds uptime checks from outside your servers, with an email when a service goes down or comes back, and web analytics for your domains. A self-hosted Ployz Cloud has no billing. Compared with Coolify Cloud, which costs $5 a month for 2 servers plus $3 for each extra server, Ployz Cloud costs nothing at any server count. Self-hosted Coolify is free too, but you run and update its dashboard yourself, on a server with at least 2 CPU cores and 2 GB of RAM. ## Reference - [CLI and coding agents](https://ployz.dev/docs/cli/overview.md): Install the ployz CLI, set up your coding agent, deploy a directory and use tokens in CI. - [Ployz docs](https://ployz.dev/docs.md): How to deploy apps to your own Linux servers with Ployz: Git push deploys, preview environments, databases and https. - [All docs pages](https://ployz.dev/llms.txt): every docs page as Markdown, with a one-line summary each - [The Ployz skill](https://ployz.dev/.well-known/agent-skills/ployz/SKILL.md): how to use the `ployz` CLI, the file step 2 installs - `ployz --help` and `ployz schema --json` list every command and setting of the installed CLI