CLI Authentication
Before you can deploy applications, you need to authenticate the CLI with your Slipway server.
Login
Run the login command:
slipway loginServer URL
You'll be prompted for your Slipway server URL:
$ slipway login
Slipway CLI
Server URL: http://203.0.113.50:1337The CLI looks for the server URL in this order:
--serverflag (e.g.,slipway login --server http://...)SLIPWAY_SERVERenvironment variable- Previously saved server URL
- Prompt the user
Browser Authentication
After entering the server URL, your browser will open to complete authentication:
Opening browser for authentication...
If the browser doesn't open, visit:
http://203.0.113.50:1337/cli/authorize?code=abc123
Waiting for authorization...In your browser:
- Log in to Slipway (if not already logged in)
- Review the CLI authorization request
- Click Authorize
The CLI will detect the successful authorization:
✓ Authenticated as [email protected]
✓ Team: Acme Inc
✓ Credentials saved to ~/.slipway/credentials.jsonEnvironment Variable
For CI/CD or automation, set the server URL as an environment variable:
export SLIPWAY_SERVER=https://slipway.example.com
slipway loginThis skips the server URL prompt.
Credentials Storage
The CLI stores credentials in ~/.slipway/credentials.json:
{
"server": "https://slipway.example.com",
"token": "your-api-token",
"email": "[email protected]",
"team": "Acme Inc"
}Security
Keep this file secure. It contains your authentication token which grants access to your Slipway server.
Check Current Session
Verify your authentication status:
slipway whoamiOutput:
Logged in as [email protected]
Team: Acme Inc
Server: https://slipway.example.comLogout
To remove saved credentials:
slipway logoutThis removes the credentials file and logs you out.
Multiple Servers
If you work with multiple Slipway servers (e.g., staging and production), you can specify the server for each command:
# Deploy to staging
slipway slide --server https://slipway-staging.example.com
# Deploy to production
slipway slide --server https://slipway.example.comOr use environment variables:
# In your staging environment
export SLIPWAY_SERVER=https://slipway-staging.example.com
# In your production environment
export SLIPWAY_SERVER=https://slipway.example.comCI/CD Authentication
For automated deployments, use API tokens instead of browser authentication:
# Generate a token in the dashboard
# Settings → API Tokens → Generate
# Use in CI/CD
export SLIPWAY_TOKEN=your-api-token
export SLIPWAY_SERVER=https://slipway.example.com
slipway slideComing Soon
API token authentication is coming in a future release.
Troubleshooting
Browser Doesn't Open
If the browser doesn't open automatically, copy the authorization URL and open it manually:
If the browser doesn't open, visit:
http://203.0.113.50:1337/cli/authorize?code=abc123Authorization Timeout
If authorization times out, run slipway login again. The authorization code expires after a few minutes.
Invalid Credentials
If you see "Invalid credentials" errors, try logging out and in again:
slipway logout
slipway loginWhat's Next?
Now that you're authenticated, explore the CLI Commands Reference to learn what you can do.