# Run tests on Ubuntu Server

> Put your project in an Ubuntu Server device, run its tests there and get the result back, without installing anything on your Mac.

You will end up with your test results from a Linux machine that has no screen, with nothing installed on your Mac.

## The situation

Your backend or command line tool should run on Linux, or you want its tests to run somewhere other than your Mac.

## Ask your agent

Connect [Claude Code or Codex](https://castle.cx/docs/get-started/connect-your-agent.md) first. Then paste something like this:

> Use an Ubuntu Server device from Castle. Put this project in it, install what it needs, run the tests and tell me which ones fail and why. Give the device back when you are done.

## What the agent does

1. It asks Castle for an Ubuntu device. A plain Ubuntu request takes a ready one nobody is on, or makes a Server.
2. It copies the files it needs into the device, installs what the project needs, and runs the tests there.
3. It reads the exit status and the output, and brings back anything you want from the device.
4. It tells you the exit status and the name of each failing test, then gives the device back with `done`.

Castle's guide tells the agent to run the tests in the device and not on your Mac, and to say if it installed anything.

## What you see

Ubuntu comes as Desktop, with a screen, or Server, for the command line. A Server has no screen to watch. The device card shows what is happening, and Activity gets one line for each command. Your agent tells you in chat what it ran and what came out.

If the job needs a screen, such as a browser, a Server can't do it and your agent will say so. Ask for an Ubuntu Desktop instead.

## Good to know

- **The first Ubuntu downloads its system.** Your agent should tell you first; give it time.
- **Long installs.** A long install can take a few minutes. Your agent starts it and checks back.
- **Sharing a folder.** On an Ubuntu device you can also share a folder with the device, live.

## Next

Leave a job going while you do something else: [Let a long job run in the background](https://castle.cx/docs/guides/let-a-long-job-run-in-the-background.md).

---
Section: Guides · Last updated: 2026-11-20 · Source: https://castle.cx/docs/guides/run-tests-on-ubuntu-server
