Skip to content
acurast.dev

Rent a phone like a VPS

Phones on Acurast run Ubuntu with SSH, reachable from anywhere over HTTPS. Pick a size, run one command, and you’re root on a phone somewhere in the world.

Pick a size

On mainnet, Acurast prices a deployment from what the processor earns in rewards over the same time, times a network-wide multiplier (pricing). Set a ceiling with --max-cost-per-execution.

Four steps

  1. Install the Acurast CLI

    Needs Node.js.

    terminal
    npm install -g @acurast/cli
  2. Get an account with test tokens

    Create an address, then fill it with free cACU from the Canary faucet. Put its mnemonic in a .env next to where you run the CLI, and keep that file out of git.

    .env
    ACURAST_MNEMONIC="your twelve or twenty-four words"
  3. Deploy it

    This is the Medium size. Add --dry-run to check the deployment before any tokens are locked; without flags, acurast deploy vps asks for each value instead.

    terminal
    acurast deploy vps \
      --network canary \
      --min-memory 7GB \
      --min-storage 32GB \
      --authorized-ssh-key "$(cat ~/.ssh/id_ed25519.pub)" \
      --duration 24h
  4. Connect

    Put in the clientId of your VPS from the deploy output. SSH goes through the Acurast tunnel over port 443, so it works even though the phone has no public IP.

    terminal
    ssh -o ProxyCommand='openssl s_client -quiet -servername %h -connect %h:443' \
      root@<clientId>.acu.run

    Done early? acurast cancel <deployment-id> stops it and returns the unused tokens.

What gets deployed

Ubuntu (aarch64) in an isolated rootfs on the phone, your key in /root/.ssh/authorized_keys and a tunnel to a public *.acu.run address. Key login only, no passwords.

Serve a website

Add --http-port 8080 and whatever listens on 8080 inside the VPS is served over HTTPS on the same subdomain.

Going to mainnet

Use --network mainnet and an account with ACU. No ACU? The Deploy Agent takes USDC on Base.

Or ship your own code

A deployment is a JavaScript bundle that runs on as many phones as you ask for, once or on an interval. This one checks the ACU price every ten minutes, six times, on three phones.

index.js, what runs on the phone
// index.js: runs on every phone the deployment is assigned to
const id = _STD_.job.getId();
print("deployment " + JSON.stringify(id) + " on " + _STD_.device.getAddress());

httpGET(
  "https://api.coingecko.com/api/v3/simple/price?ids=acurast&vs_currencies=usd",
  { Accept: "application/json" },
  (payload) => print("ACU price: " + payload),
  (error) => print("request failed: " + error),
);
terminal
npx @acurast/cli new price-check
cd price-check && npm install
npm run bundle          # writes dist/bundle.js
acurast estimate-fee    # what it will cost
acurast deploy
acurast.json
{
  "projects": {
    "price-check": {
      "projectName": "price-check",
      "fileUrl": "dist/bundle.js",
      "network": "canary",
      "onlyAttestedDevices": true,
      "assignmentStrategy": { "type": "Single" },
      "execution": {
        "type": "interval",
        "intervalInMs": 600000,
        "numberOfExecutions": 6,
        "maxExecutionTimeInMs": 30000
      },
      "maxAllowedStartDelayInMs": 10000,
      "usageLimit": { "maxMemory": 0, "maxNetworkRequests": 0, "maxStorage": 0 },
      "numberOfReplicas": 3,
      "requiredModules": [],
      "minProcessorReputation": 0,
      "maxCostPerExecution": 100000000000,
      "includeEnvironmentVariables": [],
      "processorWhitelist": []
    }
  }
}

Read next