# Connect a server

> Add a server so Weemuus can read it, choose which Weemuu may change things there, and let them use the server weemuu runs on.

Only you can connect a server. You need to be able to run commands as root on it.


![Connections: Claude, GitHub, a server and Telegram connected](/shots/connections.png)

## Add a server

1. Open **Connections** under **Setup** in the sidebar, press **Add a connection**, then **Server**.
2. Write a **Name** you'll know it by, such as `web1`, and the **Server address**, such as `web1.example.com`. Add `:port` if it isn't 22.
3. Optional: open **Only from one address** to let the key work only from the address weemuu connects from.
4. Press **Make the key**.
5. Under **1 · Run this on the server, as root**, press **Copy the block**, and run it on the server as root. It makes a user called `weemuu` that can only run Weemuu's read-only checks.
6. Under **2 · Test**, press **Test**.

Weemuu signs in once and pins the server's identity. The panel then shows *Host key pinned: … Weemuu refuses to sign in if it ever changes.* Press **See it in Servers** to see what runs there. See [Check your servers and fix what needs a look](/how-to/servers/).

To sign in as a user you already have instead, open **Use an existing user** and write the **User** before step 4. Then add the line weemuu shows to that user's `~/.ssh/authorized_keys`, and press **Test**. That key can run any command, and the server's card says so.

## Choose who can use it

1. Open the server's connection.
2. Under **Who can use it**, pick a level for each Weemuu:
   - **No access**
   - **Read only**
   - **Read and change**
3. Press **Save**.

Every Weemuu may run Weemuu's read-only checks on every server you connect, whatever its level. A Weemuu never gets the key: Weemuu runs each command with its own key and logs every one.

A change on a server works like this:

| The Weemuu's mode | With Read and change | Without it |
| --- | --- | --- |
| Plan | Not run: reads only | Not run: reads only |
| Auto | Runs without asking | Asks you once per task |
| Manual, Accept edits, Design | Asks you once per task | Asks you once per task |

The ask is an **Allow for this task** card in [Needs you](/how-to/answer-needs-you/), with the exact command. Once you allow it, changes on that server run for the rest of that task. See [Change how a Weemuu works](/how-to/weemuu-settings/) for modes.

A server added with the setup block refuses any change, whatever the level: its key only runs Weemuu's checks.

## Let Weemuus use the server weemuu runs on

The server weemuu runs on is **This server**. Weemuu checks it as its own user, with no key. Add it from **Add a connection**, then **This server**, then **Check this server**.

Weemuus may not use this server until you let them.

1. Open **This server** in Connections.
2. Turn on **Let Weemuus use this server**.
3. Read the warning in *Let your Weemuus use this server?* and press **Let them use it**, or **Not now**.

The page says *Your Weemuus may use this server now. It's logged.* **Who can use it** then appears, as above. Press **Turn off** to take it back.

The switch needs the agent user set up on that machine. Without it, the page says so, and nothing runs.

Source: https://docs.weemuu.com/how-to/connect-server/
