---
title: Install on bare metal
description: Run Cuitty as a single Bun binary on a Linux VM, with systemd-managed services for production durability.
section: Install
order: 3
updatedAt: 2026-04-27
slug: install/bare-metal
---
# Install on bare metal

Cuitty ships a single Bun-bundled binary suitable for running directly on a Linux VM without containers. This is the lowest-overhead deployment option.

## Prerequisites

- Linux x86_64 or arm64
- Postgres 15+ (local or remote)
- A SpiceDB binary on `PATH`
- Bun 1.3+ (only required to rebuild from source)

## Download

```bash
curl -fsSL https://releases.cuitty.com/portal/latest/portal-linux-x86_64 \
  -o /usr/local/bin/cuitty-portal
chmod +x /usr/local/bin/cuitty-portal
```

## Configure

Create `/etc/cuitty/portal.env`:

```dotenv
DATABASE_URL=postgres://cuitty@localhost/cuitty
SPICEDB_URL=localhost:50051
SPICEDB_TOKEN=...
BETTER_AUTH_SECRET=...
PORT=7700
DATA_DIR=/var/lib/cuitty
```

## systemd unit

`/etc/systemd/system/cuitty-portal.service`:

```ini
[Unit]
Description=Cuitty Portal
After=network.target postgresql.service

[Service]
Type=simple
EnvironmentFile=/etc/cuitty/portal.env
ExecStart=/usr/local/bin/cuitty-portal
Restart=on-failure
User=cuitty
Group=cuitty
WorkingDirectory=/var/lib/cuitty

[Install]
WantedBy=multi-user.target
```

```bash
systemctl daemon-reload
systemctl enable --now cuitty-portal
```

## Reverse proxy

Run Caddy or nginx in front of the portal for TLS termination. The portal expects to be reached over HTTPS in production for cookie-based auth to work correctly.