Skip to content

Setting up PostgreSQL

Create a PostgreSQL database and user for the Skyport panel.

Skyport can talk to several databases through Laravel, but PostgreSQL is the recommended production choice.

On Debian or Ubuntu:

Terminal window
sudo apt update
sudo apt install -y postgresql postgresql-contrib

Switch to the PostgreSQL superuser:

Terminal window
sudo -u postgres psql

Then run:

CREATE DATABASE skyport;
CREATE USER skyport WITH ENCRYPTED PASSWORD 'change-me';
GRANT ALL PRIVILEGES ON DATABASE skyport TO skyport;

Then exit with:

\q
DB_CONNECTION=pgsql
DB_HOST=127.0.0.1
DB_PORT=5432
DB_DATABASE=skyport
DB_USERNAME=skyport
DB_PASSWORD=change-me
Terminal window
php artisan migrate --force
Terminal window
php artisan tinker
DB::connection()->getPdo();

If that succeeds without an exception, the panel can reach PostgreSQL correctly.

For production, keep PostgreSQL on a private interface or private network, not exposed to the public internet.