Deploy guide

Palace Server on Linux without Docker (systemd)

The Palace Server binary as a locked-down systemd service, with Caddy for HTTPS and a local PostgreSQL with pgvector, all from your distribution's packages. For servers where Docker isn't allowed.

At a glance

WhatValue
Good forOps teams that don't run Docker on servers
NeedsDebian 13 or Ubuntu 24.04 or later (the binary needs glibc 2.39+), x86_64 or arm64, 2 GB RAM or more, root
Time to deployAbout 10 minutes
CostOnly the machine, for example a $12/month 2 GiB VM

What this sets up

  • palace-server from the official release (checksum verified) in /usr/local/bin, running as the unprivileged palace user, bound to 127.0.0.1:8080 only. The unit drops every capability, makes the filesystem read-only to the service and limits system calls. systemd-analyze security palace-server rates it 1.3 ("OK").
  • The embedding model in /opt/palace/model: the same pinned files as the official Docker image, checksum verified, so Palace needs no internet after install.
  • PostgreSQL with pgvector on localhost. Palace connects as palace_app, a role that cannot bypass row-level security.
  • Caddy with automatic HTTPS for your domain. /metrics and /bootstrap are not reachable from outside.
  • Settings in /etc/palace/palace.env, readable only by root and the palace group.

Steps

01

Prepare

  • A DNS record for your domain pointing at the machine, ports 80 and 443 open.
  • A license key from palacememory.com.
02

Install

Install
git clone https://github.com/AncientiCe/palace-server-examples.git
cd palace-server-examples/linux-systemd
sudo PALACE_DOMAIN=palace.yourco.com PALACE_LICENSE_KEY='your-license-key' sh install.sh

Options, set the same way:

  • PALACE_VERSION to pick a version (default 0.8.2).
  • PALACE_TARBALL=/path/to/palace-server-...tar.gz to install a release you already downloaded.
  • DATABASE_URL=postgres://palace_app:...@host:5432/palace to use an existing database instead of installing one. Run kubernetes/db-setup.sql ↗ on it first.
  • PALACE_LICENSE_API_URL=https://api.palacememory.com/api/licenses/validate for monthly plans.
03

Create the first admin

Bootstrap the first admin
sudo palace-bootstrap 'Your Co' yourco [email protected]

Save the api_key and org_id. The helper turns bootstrap off afterwards.

04

Connect your team

Follow Connect clients with https://<your domain>.

Upgrade

Upgrade
sudo PALACE_VERSION=<new version> PALACE_DOMAIN=palace.yourco.com PALACE_LICENSE_KEY='your-license-key' sh install.sh

Re-running the installer replaces the binary and keeps your database. It writes a new palace.env (new JWT secret, so browser and SSO sessions sign in again; API keys keep working), so to upgrade only the binary you can instead download the release tarball and sudo install -m 0755 palace-server /usr/local/bin/ && sudo systemctl restart palace-server.

Back up and restore

Back up and restore
sudo -u postgres pg_dump -Fc palace > palace-$(date +%F).dump
sudo -u postgres pg_restore -d palace --clean --if-exists palace-YYYY-MM-DD.dump

Copy dumps off the machine.

Tested

Ran install.sh from scratch in a Debian 13 container with systemd: Palace, PostgreSQL 17 with pgvector and Caddy came up; Palace ran as palace on 127.0.0.1 with the hardened unit; HTTPS worked, /metrics was blocked, the bootstrap helper created the admin and turned bootstrap off, and a memory was stored, embedded and found by search. Ubuntu 24.04 was not tested.

Troubleshooting

  • journalctl -u palace-server -e shows why Palace stopped. A wrong or expired license stops startup.
  • journalctl -u caddy -e shows certificate problems.
  • Something else? Open an issue ↗

View on GitHub ↗

Running something different?

Nomad, Hetzner, OpenShift, another IaC tool? Request a setup ↗. Never paste license keys, passwords, tokens or database URLs in an issue.

Other setups

Docker Compose on one machine · DigitalOcean (Terraform) · AWS (Terraform, ECS Fargate + RDS) · Google Cloud (Terraform, Cloud Run + Cloud SQL) · Azure (Terraform, Container Apps + PostgreSQL Flexible Server) · Kubernetes (Helm) · Kubernetes (plain kubectl) · Air-gapped (no internet)

Put your knowledge to work

Give your next session
a head start.

Start your team trial

60 days · 10 seats · No credit card