Podmaker
All pages
Start

Install on your own server

Any Debian or Ubuntu server you can SSH into (another cloud, a VPS, on-premises), automated or by hand.

Install on your own server

Use this guide when the server already exists: another cloud provider, a rented VPS, a machine in your office. Two ways:

  • Automated: deploy.sh with the ssh provider. It does everything in the cloud guide except creating the server.
  • By hand: every step below, if you want to understand or adapt the setup.

Requirements

OS Debian 12/13 or Ubuntu 22.04/24.04, 64-bit (amd64 or arm64)
Size 2 vCPU / 4 GB minimum; 4 vCPU / 8 GB if projects also run on it
Disk 40 GB+
Network public IPv4; inbound 22, 80, 443 reachable
Access SSH key login as root or as a user with passwordless sudo
DNS two A records pointing at the server (panel + Agent API)
deploy/production/deploy.sh
# Where should Podmaker run?  → 5) ssh
# Server IP address or hostname: 203.0.113.10
# SSH user (root or a sudo user) [root]: debian
# SSH port [22]:

Then answer the domain and admin questions as in the cloud guide. Non-interactive:

IMP_PROVIDER=ssh SERVER_IP=203.0.113.10 SSH_USER=debian IMP_NAME=podmaker \
IMP_DOMAIN=panel.podmaker.sh IMP_ADMIN_EMAIL=you@example.com IMP_SELF_NODE=1 \
deploy/production/deploy.sh

Open ports 22, 80 and 443 in the provider’s firewall yourself. The ssh provider does not manage firewalls.

By hand

These are the steps deploy/production/server/bootstrap.sh performs. Run them as root.

1. Packages

apt-get update && apt-get install -y ca-certificates curl gnupg unzip git openssl jq
# PHP 8.4 (Debian 13 has it; Debian 12: packages.sury.org, Ubuntu: ppa:ondrej/php)
apt-get install -y php8.4-fpm php8.4-cli php8.4-pgsql php8.4-redis php8.4-mbstring \
  php8.4-xml php8.4-curl php8.4-zip php8.4-intl php8.4-bcmath php8.4-gmp php8.4-opcache
# PostgreSQL 18 from apt.postgresql.org
apt-get install -y postgresql-common && /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -y
apt-get install -y postgresql-18 postgresql-client-18 redis-server
# Caddy (official repository), Node.js 26 (NodeSource), Composer (getcomposer.org)
# Docker (only if projects run on this server): curl -fsSL https://get.docker.com | sh

2. Database and Redis

The application role must not be a superuser and must not have BYPASSRLS. Otherwise PostgreSQL skips row-level security, which isolates organizations from each other.

sudo -u postgres psql -c "CREATE ROLE podmaker LOGIN NOSUPERUSER NOBYPASSRLS PASSWORD '<random>'"
sudo -u postgres createdb -O podmaker podmaker
echo "requirepass <random>" >> /etc/redis/redis.conf && systemctl restart redis-server

3. Code and configuration

useradd --system --home-dir /srv/podmaker --shell /bin/bash podmaker
# copy the whole repository (not only apps/control-plane: schemas and the
# agent installer are read from the monorepo) to /srv/podmaker/current
cd /srv/podmaker/current/apps/control-plane
cp .env.example .env    # then edit, see below

Production values in .env:

APP_ENV=production
APP_DEBUG=false
APP_URL=https://panel.podmaker.sh
DB_DATABASE=podmaker
DB_USERNAME=podmaker
DB_PASSWORD=...
REDIS_CLIENT=phpredis
REDIS_PASSWORD=...
SESSION_SECURE_COOKIE=true
IMP_AGENT_API_URL=https://agent.panel.podmaker.sh/agent/v1
IMP_AGENT_INSTALL_SCRIPT_URL=https://agent.panel.podmaker.sh/install.sh
IMP_AGENT_TRUSTED_PROXIES=127.0.0.1,::1
IMP_AGENT_BINARIES_DIR=/srv/podmaker/shared/bin   # imp-agent-linux-amd64/arm64 from `make build`
IMP_REGISTRATION_ENABLED=false
IMP_METRICS_TOKEN=<24+ random characters>
sudo -u podmaker composer install --no-dev -o
sudo -u podmaker php artisan key:generate
sudo -u podmaker php artisan podmaker:master-key        # writes IMP_MASTER_KEY: back it up
sudo -u podmaker npm ci && sudo -u podmaker npm run build
sudo -u podmaker php artisan migrate --force
sudo -u podmaker php artisan podmaker:permissions:sync
sudo -u podmaker php artisan podmaker:pki:init
sudo -u podmaker php artisan podmaker:pki:export-ca /etc/caddy/agent-ca.pem
sudo -u podmaker php artisan optimize
sudo -u podmaker php artisan podmaker:user:create you@example.com --organization=Podmaker
sudo -u podmaker php artisan podmaker:security:check

4. Processes

Install deploy/production/server/podmaker-fpm.conf into /etc/php/8.4/fpm/pool.d/. Install podmaker-horizon.service and podmaker-scheduler.service into /etc/systemd/system/. Then:

systemctl daemon-reload
systemctl enable --now php8.4-fpm podmaker-horizon podmaker-scheduler

5. Caddy

The Agent API needs TLS client certificates (mTLS) and must reach PHP from 127.0.0.1 together with the verified certificate fingerprint. The panel’s domain and your projects’ domains share ports 80/443. Configure all of this with the provided script. It switches Caddy to API mode (caddy-api) and creates the routes:

bash deploy/production/server/caddy.sh panel.podmaker.sh agent.panel.podmaker.sh \
  you@example.com "$(openssl rand -hex 32)" /srv/podmaker/current/apps/control-plane/public

If you prefer a Caddyfile and no projects will use this server’s ports 80/443, a Caddyfile works as well. Copy the agent block from deploy/caddy/Caddyfile.dev and replace tls internal with a public certificate. Agent API requests must reach PHP with REMOTE_ADDR in IMP_AGENT_TRUSTED_PROXIES.

6. Check

curl -fsS https://panel.podmaker.sh/up

Sign in, then add servers.

Updating a hand-made install

Copy the new code to a new directory, then:

  1. Run composer install, npm ci && npm run build, migrate --force, podmaker:permissions:sync and optimize.
  2. Switch the directory.
  3. Reload PHP-FPM.
  4. Restart podmaker-horizon and podmaker-scheduler.

deploy.sh update only knows installs it created itself (state in ~/.config/podmaker-deploy/).