Skip to main content

Linux Installation

Lattice works on Ubuntu 20.04+, Debian 11+, Fedora 35+, and other modern distributions.

Quick Install

bash
curl -fsSL https://uselovelace.com/lattice/install.sh | sh

This installs to /usr/local/bin/ and sets up systemd service.

Detailed Installation

Step 1: Download and Install

bash
# Run the installation script
curl -fsSL https://uselovelace.com/lattice/install.sh | sh

# Verify
lattice-ctl --version

Step 2: Start the Daemon

bash
# Start the lattice daemon
lattice-ctl daemon start

# Verify it's running
lattice-ctl ping

Step 3: Enable Auto-Start (Optional)

bash
# If you used the installation script, systemd service is already set up
# To ensure it starts on boot:
sudo systemctl enable lattice

# To start the service now:
sudo systemctl start lattice

# Check service status:
sudo systemctl status lattice

Manual Installation

bash
# Download latest release (check GitHub for actual version)
curl -L https://github.com/lovelace-ai/lattice/releases/latest/download/lattice-linux-x86_64 \
  -o lattice-ctl

# Make executable and install
sudo install -m 755 lattice-ctl /usr/local/bin/

# Create config directory
mkdir -p ~/.lovelace/lattice/

Set up systemd:

bash
# Create systemd service file
sudo tee /etc/systemd/system/lattice.service > /dev/null << 'EOF'
[Unit]
Description=Lattice Daemon
After=network.target

[Service]
Type=simple
User=$USER
ExecStart=/usr/local/bin/lattice-ctl daemon
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target
EOF

# Note: Replace $USER with your actual username

# Enable service
sudo systemctl daemon-reload
sudo systemctl enable lattice
sudo systemctl start lattice

Linux-Specific Issues

"Permission denied"

bash
# Fix directory ownership
sudo chown -R $USER ~/.lovelace/

# Or run with sudo
sudo lattice-ctl start

SELinux Blocking

If using SELinux on Fedora/RHEL:

bash
# Check status
getenforce

# Temporarily disable (not recommended for production)
sudo setenforce 0

# Or add proper SELinux policy (advanced)

AppArmor Blocking (Ubuntu)

bash
# Check status
aa-status

# If lattice-ctl is blocked, disable AppArmor for it (advanced)

Service Management

bash
# Check status
sudo systemctl status lattice

# View logs
sudo journalctl -u lattice -f

# Restart
sudo systemctl restart lattice

# Stop
sudo systemctl stop lattice

# Disable auto-start
sudo systemctl disable lattice

Uninstalling

bash
# Stop service
sudo systemctl stop lattice
sudo systemctl disable lattice

# Remove files
sudo rm /usr/local/bin/lattice-ctl
rm -rf ~/.lovelace/lattice/

# Remove systemd file
sudo rm /etc/systemd/system/lattice.service
sudo systemctl daemon-reload

Troubleshooting

"Connection refused"

bash
# Check service status
sudo systemctl status lattice

# View recent logs
sudo journalctl -u lattice -n 20

# Restart
sudo systemctl restart lattice

Socket permission errors

bash
# Check socket
ls -la /run/user/$(id -u)/lattice.sock

# Fix permissions if needed
chmod 600 /run/user/$(id -u)/lattice.sock

"lattice-ctl: command not found"

bash
# Verify installation
which lattice-ctl

# Reload PATH
source ~/.bashrc

# Or reinstall
curl -fsSL https://uselovelace.com/lattice/install.sh | sh

Next Steps