Skip to main content

Installing the Server

The Phatcrack server is deployed with Docker, and should work on any system that supports Docker.

The following operating systems are officially supported:

  • Enterprise Linux 9 distributions (including Rocky, Alma, CentOS, RHEL, and others)
  • Ubuntu 22.04 LTS

Option 1. Quick Install Script

The easiest way to get started is using the quick-start script. This script will install Docker, and then download and run the Phatcrack server.

curl https://get.phatcrack.io | bash

Option 2. Manual Installation

If you prefer to install the server manually, you can follow the steps below.

  1. Install Docker (see official Docker docs) and Docker Compose (see official Docker Compose docs)

  2. Set up the phatcrack-server user:

useradd --system --create-home --home-dir /opt/phatcrack-server phatcrack-server
  1. Download the docker-compose.yml file for the latest release:
cd /opt/phatcrack-server
wget https://github.com/lachlan2k/phatcrack/releases/latest/download/docker-compose.yml
  1. Configure environment variables:
note

Make sure you correctly set the HOST_NAME environment variable and TLS_OPTS environment variable. These are explained below.

touch .env

# Update your hostname here:
echo "HOST_NAME=phatcrack.lan" >> .env
echo "DB_PASS=$(openssl rand -hex 16)" >> .env
echo "PHATCRACK_USER=$(id -u phatcrack-server):$(id -g phatcrack-server)" >> .env
chmod 600 .env

# If you chose a hostname that is publicly accessible and expose this to the world (not recommended), Caddy will automatically deploy TLS.

## Otherwise, use the following for self-signed TLS
# echo "TLS_OPTS=tls internal" >> .env

## If you want to supply custom certificates, place them in a directory called `certs`
## And add ./certs:/etc/caddy/certs:ro as a mount in docker-compose.prod.yml for
# echo "TLS_OPTS=tls /etc/caddy/certs/cert.pem /etc/caddy/certs/key.pem" >> .env
  1. Make a directory to persist files in:
mkdir filerepo
chown phatcrack-server:phatcrack-server filerepo
  1. Start the server:
docker compose up -d