Keycyte PAM 3.2 · Deployment Guide
Running the Installer
The installer install.sh installs Keycyte PAM on the host from the prepared installation package. It is a bash script and must be run with sudo from the package folder.
Before You Begin
- Prepare the installation package as described in Preparing the Installation Package.
- Know the IP address of the primary DNS server that the containers will use, and optionally of a secondary DNS server.
Installer Options
| Option | Description |
|---|---|
--dns <ip> | Sets the primary DNS server and skips the DNS prompts. The secondary DNS server is set to the same address. --dns=<ip> is also accepted. |
--skip-load | Skips loading the images from keycyte-pam.tar.gz. Use it when you run the installer again and the images are already loaded. |
-h, --help | Shows the usage text. |
What the Installer Does
The installer runs the following steps:
- Prerequisites. Checks that Docker is installed, that the Docker daemon is running and accessible, and that Docker Compose is available. Checks that
keycyte-pam.tar.gz,docker-compose.ymland.envare in the package folder. - Images. Extracts
keycyte-pam.tar.gzand loads every image in it withdocker load. Then checks that the imageskeycyte-pam:latest,keycyte-ssh-proxy:latest,keycyte-password-manager:latest,keycyte-radius-server:latestandguacamole/guacd:latestexist. The check also runs with--skip-load. - DNS. Asks for the primary and secondary DNS servers and writes them to
.env(PRIMARY_DNS,SECONDARY_DNS). - Docker group. Finds the group ID of the host’s
dockergroup and writes it to.env(DOCKER_GID), so that the PAM server can read the Docker socket. - Host directories. Creates
~/keycyte,~/driveand~/recordin the home directory of the user who ransudo, makes that user their owner, and writes the paths and the user and group IDs to.env(KEYCYTE_BASE,KEYCYTE_DRIVE,KEYCYTE_RECORD,RUN_UID,RUN_GID). The containers run with this user and group ID. - Certificates. Copies
localhost.p12,cacerts.pemandkeycyte-ca.crt(those that exist) to~/keycyte. Warns iflocalhost.p12orcacerts.pemis missing. - Database check. If
.envpoints to an external database server by IP address, checks that its port is reachable. - Start. Starts all containers with
docker compose up -d, waits a few seconds, shows the container status and the last log lines of any container that is not running. - Master account. Waits until PostgreSQL is ready and the PAM server has created the database schema, then runs
initdb/10-master-user.sqlto create themasteraccount. If the account already exists, it is left unchanged.
Running the Installer
To run the installer:
-
Open a shell on the host and go to the installation package folder.
-
Run the installer:
sudo ./install.shTo set the DNS server without prompts:
sudo ./install.sh --dns 10.0.0.53 -
When prompted, enter the IP address of the primary DNS server, and press Enter.
The prompt shows the current value from
.envin brackets. Press Enter without typing to keep it. The installer accepts only an IPv4 address and asks again if the value is not valid. -
When prompted, enter the IP address of the secondary DNS server, or press Enter to skip it.
If you skip it, the secondary DNS server is set to the primary one.
-
Wait until the installer finishes.
The installer prints the status of every container. If all containers run, it prints a message that the installation is complete and all services are up. It then applies the master account script and prints the commands for viewing logs and stopping the services.
Keycyte PAM is installed. Continue with Signing In for the First Time.
Checking the Installation
To check the containers after installation, run the following command in the package folder:
sudo docker compose --env-file .env -f docker-compose.yml ps
All containers (pam, ssh-proxy, guacd, password-manager, radius, postgres-db) should be in the running state.
To follow the PAM server log:
sudo docker compose --env-file .env -f docker-compose.yml logs -f pam
If the Master Account Was Not Created
If PostgreSQL or the database schema was not ready in time, the installer skips the master account script and prints a warning with the command to run. In that case, wait until the PAM server has started, then run the script manually in the package folder:
sudo docker exec -i postgres-db psql -U <db-user> -d <db-name> < initdb/10-master-user.sql
Use the database user and database name from .env (DB_USER, DB_NAME). The installer prints the command with these values filled in.
Running the Installer Again
You can run the installer again, for example after you add a missing certificate file. The installer updates the values it manages in .env and leaves existing directories and the existing master account unchanged. Use --skip-load if the images are already loaded.
Note
If a required certificate file was missing, you can also copy it to ~/keycyte and restart the PAM server:
sudo docker compose --env-file .env -f docker-compose.yml restart pam
Stopping the Services
To stop and remove the containers, run in the package folder:
sudo docker compose --env-file .env -f docker-compose.yml down
The database volume and the host directories are kept. Run sudo docker compose --env-file .env -f docker-compose.yml up -d to start the services again.