Skip to content

Installation

Phaset runs on a single host within your infrastructure and is deliberately intended to be straightforward to get working.

Operating System:

  • Linux (any modern distribution)
  • macOS

Runtime:

Hardware:

  • Works on anything from a Raspberry Pi to dedicated servers
  • Should work fine on any lightweight, conventional VPS or VM setup

Network:

  • Internet access during initial installation (to download Phaset)
  • SMTP server access (for authentication emails)
  • Inbound network access for users and integrations

The fastest way to install Phaset is using the one-line installer:

Terminal window
curl -sSL https://releases.phaset.dev/install.sh | bash

This installs the Phaset CLI to ~/.local/bin/phaset. You may need to add this directory to your PATH:

Terminal window
export PATH="$HOME/.local/bin:$PATH"
  1. Install the Phaset CLI using the quick start command above.
  2. Install the Phaset API: phaset install. This downloads and installs the Phaset API to ~/.phaset/.
  3. Create a configuration file in your desired working directory: phaset init. This creates a phaset.config.json template file.
  4. Configure Phaset by editing phaset.config.json with your settings (see Configuration below).
  5. Start Phaset: phaset start. The API server will start and display the URL where Phaset is accessible.

That’s it! Phaset is now running on your infrastructure.

The phaset.config.json file contains all settings for your Phaset instance. Here’s a complete example with explanations:

{
"email": {
"emailSubject": "Sign In To Phaset",
"user": "signin@my_company.cloud",
"password": "your_smtp_password",
"host": "smtp.provider.com",
"port": 465,
"secure": true,
"maxRetries": 2
},
"auth": {
"jwtSecret": "your-secret-key-change-this",
"magicLinkExpirySeconds": 900,
"jwtExpirySeconds": 3600,
"refreshTokenExpirySeconds": 604800,
"maxActiveSessions": 3,
"appUrl": "https://phaset.example.com/app/finishSignIn"
},
"server": {
"allowedDomains": [
"https://phaset.example.com",
"http://localhost:5173"
]
},
"phaset": {
"licenseKey": "",
"demoMode": false,
"bootstrap": {
"organizationName": "My Organization",
"adminEmail": "admin@my_company.cloud"
}
}
}

Phaset uses email for passwordless authentication (magic links).

FieldDescriptionRequired
emailSubjectSubject line for sign-in emailsYes
userSMTP username (often your email address)Yes
passwordSMTP password or app-specific passwordYes
hostSMTP server hostnameYes
portSMTP server port (usually 465 for SSL or 587 for TLS)Yes
secureUse SSL/TLS (recommended: true)Yes
maxRetriesNumber of retry attempts for failed emailsNo (default: 2)

Controls how users authenticate with Phaset.

FieldDescriptionRequired
jwtSecretSecret key for JWT token signing (use a strong random string)Yes
magicLinkExpirySecondsHow long magic links remain valid (default: 900 = 15 minutes)No
jwtExpirySecondsSession token lifetime (default: 3600 = 1 hour)No
refreshTokenExpirySecondsRefresh token lifetime (default: 604800 = 7 days)No
maxActiveSessionsMaximum concurrent sessions per user (default: 3)No
appUrlURL where users complete sign-in (must match your deployment)Yes

Controls CORS and network access.

FieldDescriptionRequired
allowedDomainsArray of allowed origins for CORS. Use ["*"] to allow all (not recommended for production)Yes

Examples:

// Allow specific domains (recommended for production)
"allowedDomains": [
"https://phaset.example.com",
"https://app.example.com"
]
// Allow all domains (development only)
"allowedDomains": ["*"]
// Allow localhost for development
"allowedDomains": [
"http://localhost:5173",
"http://localhost:3000"
]

Organization setup and licensing.

FieldDescriptionRequired
licenseKeyYour Phaset license key. Leave empty for personal use.No
demoModeShould a demo organization with demo data be used?No
bootstrap.organizationNameYour organization name (used during initial setup)Yes
bootstrap.adminEmailAdmin email address (receives first magic link)Yes

The Phaset CLI provides several commands for managing your installation:

Terminal window
# Install the Phaset API
phaset install
# Check for and install updates
phaset upgrade
# Create a config file template
phaset init
# Start the Phaset API server
phaset start
# Validate your Phaset license key
phaset license
# Read the Phaset documentation
phaset docs
# Read the Phaset software agreement
phaset legal
# Remove Phaset from your system
phaset uninstall

For local development and evaluation:

{
"auth": {
"appUrl": "http://localhost:5173/app/finishSignIn"
},
"server": {
"allowedDomains": ["http://localhost:5173"]
}
}

Start Phaset:

Terminal window
phaset start

Access at http://localhost:8080 (or the port shown in the startup logs).

To run Phaset as a background service that starts automatically:

Create /etc/systemd/system/phaset.service:

[Unit]
Description=Phaset API Server
After=network.target
[Service]
Type=simple
User=phaset
WorkingDirectory=/home/phaset/phaset-data
ExecStart=/home/phaset/.local/bin/phaset start
Restart=on-failure
RestartSec=10
Environment="NODE_ENV=production"
[Install]
WantedBy=multi-user.target

Enable and start the service:

Terminal window
sudo systemctl daemon-reload
sudo systemctl enable phaset
sudo systemctl start phaset

Check status:

Terminal window
sudo systemctl status phaset

View logs:

Terminal window
sudo journalctl -u phaset -f

To update to the latest version:

Terminal window
phaset upgrade

This checks for updates and installs them automatically. Your configuration and data are preserved.

Phaset stores all data locally on your host:

  • Installation: ~/.phaset/ (API binary and version info)
  • Configuration: phaset.config.json (in your working directory)
  • Data: Local database files (in your working directory)

Add ~/.local/bin to your PATH:

Terminal window
export PATH="$HOME/.local/bin:$PATH"

Make it permanent by adding to ~/.bashrc or ~/.zshrc.

Phaset requires Node.js 24 or later. Update Node.js:

Terminal window
# Check current version
node --version
# Install latest LTS from https://nodejs.org/

Verify your SMTP settings:

  • Check host and port are correct
  • Ensure firewall allows outbound connections to SMTP port
  • For Gmail, use an app password
  • Test with a simple SMTP tool or telnet

If port 8080 is occupied, specify a different port:

Terminal window
phaset start --port 3000

Ensure the user running Phaset has write permissions to:

  • Working directory (for database files)
  • ~/.phaset/ directory

To completely remove Phaset:

Terminal window
phaset uninstall

This removes:

  • The Phaset CLI (~/.local/bin/phaset)
  • The Phaset API (~/.phaset/)

Now that Phaset is installed:

  1. Sign in using the admin email you configured
  2. Create your first Record — See Your First Record
  3. Set up integrations — See Integration Guide
  4. Explore the architecture — See Architecture