Deploy guide

Palace Server on one machine (Docker Compose)

One machine runs Caddy (automatic HTTPS), Palace Server and Postgres with pgvector. This is the simplest production setup and the best way to try Palace.

At a glance

WhatValue
Good forTrials and teams up to about 25 people
MachineLinux with Docker 24+ and Compose v2, 2 GB RAM or more
Time to deployAbout 10 minutes
CostOnly the machine. For example a DigitalOcean 1 vCPU / 2 GiB droplet is $12/month (pricing ↗, checked 2026-11-29)

Palace Server uses about 115 MiB idle and about 500 MiB at peak while it embeds memories, so 2 GB leaves room for Postgres and Caddy.

What this sets up

  • Caddy on ports 80 and 443 with a certificate for your domain, HTTP to HTTPS redirect and HSTS. /metrics and /bootstrap are not reachable from outside.
  • Palace Server on the private network only, as a non-root user, with a read-only filesystem, all Linux capabilities dropped and no privilege escalation.
  • Postgres 18 with pgvector, private, data in the palace_postgres_data volume. Palace connects as palace_app, a role that cannot bypass row-level security, so tenant isolation is enforced.

Steps

01

Prepare

  • A DNS record for your domain (for example palace.yourco.com) pointing at the machine. Ports 80 and 443 must be open.
  • A license key from palacememory.com.
02

Configure

Get the recipe
git clone https://github.com/AncientiCe/palace-server-examples.git
cd palace-server-examples/compose
cp .env.example .env

Edit .env. Generate each secret with openssl rand -hex 32 (JWT secret) or openssl rand -hex 24 (passwords and bootstrap token).

03

Start

Start the stack
docker compose up -d
docker compose ps        # all three services become healthy

Migrations run automatically. docker compose logs palace-server should show license verified and embedding model loaded; semantic search enabled.

04

Create the first admin

Bootstrap is blocked at Caddy, so run it on the machine itself:

Bootstrap the first admin
docker compose exec palace-server curl -s -X POST http://127.0.0.1:8080/bootstrap \
  -H "X-Bootstrap-Token: $(grep ^PALACE_BOOTSTRAP_TOKEN= .env | cut -d= -f2)" \
  -H "Content-Type: application/json" \
  -d '{"org_name":"Your Co","org_slug":"yourco","admin_email":"[email protected]"}'

Save the api_key and org_id from the response. Then clear PALACE_BOOTSTRAP_TOKEN in .env and run docker compose up -d again. Bootstrap works only once; after that it returns 409.

05

Connect your team

Follow Connect clients with https://<your domain> as the endpoint. Add people with SSO (OIDC) or the admin API, as described in the docs.

Upgrade

Change PALACE_VERSION in .env, then:

Upgrade
docker compose pull && docker compose up -d

Back up and restore

Back up and restore
# Back up (run daily, copy the file off the machine)
docker compose exec -T postgres pg_dump -U palace -Fc palace > palace-$(date +%F).dump

# Restore into a fresh install (before the first start of palace-server)
docker compose up -d postgres
docker compose exec -T postgres pg_restore -U palace -d palace --clean --if-exists < palace-YYYY-MM-DD.dump
docker compose up -d

Monthly plans

Monthly licenses last 35 days and renew online. Uncomment PALACE_LICENSE_API_URL in docker-compose.yml. Annual licenses work fully offline, so leave it commented out.

Local trial

Set PALACE_DOMAIN=localhost. Caddy then uses its own local certificate authority, so your browser and clients will warn until you trust it.

Troubleshooting

  • palace-server restarts: docker compose logs palace-server. An expired or wrong license stops startup.
  • No certificate: check the DNS record and that ports 80 and 443 are open. docker compose logs caddy shows the reason.
  • 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

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) · Linux without Docker (systemd)

Put your knowledge to work

Give your next session
a head start.

Start your team trial

60 days · 10 seats · No credit card