---
title: "(Optional) Set up the Agent | InvarDB Docs"
description: "(Optional) Set up the Agent: InvarDB documentation"
---
# (Optional) Set up the Agent

### Note

Running an agent is an optional step allowing you to expose your own private resources to the routing mesh. If you're using [Lattice](https://invardb.com/docs/guides/hardpoint-lattice), agents are automatically provisioned and managed.

### Overview

Our lightweight agent (aka `hardpointd`) connects your private infrastructure to your serverless functions.

It's a standalone binary which creates a secure, outbound-only tunnel to our network mesh and handles traffic coming from functions without exposing anything to the internet.

We support Linux and container-based deployments (MacOS support is coming soon).

It's developed in the open in its own [public GitHub repo](https://github.com/hardpointlabs/agent).

### Installation & setup

#### 1. Prerequisite: Getting your Org ID

You need your Org ID to identify agent instances on your Hardpoint network

Find your Org ID on the [Settings](https://dashboard.hardpoint.dev/#settings) page in your dashboard. It starts with the `org_` prefix. You'll need to pass this to the agent to identify & admit it to your Hardpoint network.

#### 2. Install the agent

  Docker

#### Run the agent directly

You can pull and run the agent inline using the normal `docker run` command:

```
docker run --rm -e HARDPOINT_ORG_ID=<YOUR_ORG_ID> --rm -it ghcr.io/hardpointlabs/agent:latest connect
```

This is great for experimentation, however you'll have to manually approve agents in the dashboard each time it starts up via Docker. If you need a longer-lived solution and auto-approval, consider a Kubernetes-based deployment.

   Kubernetes   Linux (Ubuntu & Debian)  

The agent supports most recent Debian & Ubuntu-based distros and has no additional dependencies

We release Debian packages of the agent through our APT repository. There is a one-line install script to expedite this process:

#### One-liner

```
curl -fsSL https://pkg.hardpoint.dev/setup.sh | bash -s <YOUR_ORG_ID>
```

This will configure our repo with your local apt and install the agent.

#### Manual APT setup

Add our GPG key:

```
curl -fsSL https://pkg.hardpoint.dev/apt/hardpoint.gpg | sudo gpg --dearmor -o /usr/share/keyrings/hardpoint-archive-keyring.gpg
```

Add our repository:

```
echo "deb [signed-by=/usr/share/keyrings/hardpoint-archive-keyring.gpg] https://pkg.hardpoint.dev/apt/ stable main" | sudo tee /etc/apt/sources.list.d/hardpoint.list
```

Update your local apt cache:

```
sudo apt-get update
```

Set your Org ID:

Make sure you set this value **before** installing the agent.

```
echo "hardpointd hardpointd/org_id string <YOUR_ORG_ID>" | sudo debconf-set-selections
```

Install the agent:

```
sudo apt-get install hardpointd
```

Check that it's running:

```
sudo service hardpointd status
```

#### 3. Approve the agent on your network

Go to the [Agents](https://dashboard.hardpoint.dev/#agents) page in your dashboard. You should see a new entry for the agent that you just installed, with the fingerprint corresponding to the one in the agent logs.

If you are sure the fingerprints match, hit the Approve button.

The agent is now a member of your Hardpoint network!

### Next step: add services

You now have a tunnel to your private network. To allow your agents to accept traffic, you need to explicitly expose services you want your functions to connect to.
