Create and manage an API key
Your ALightVPN client uses an API key to request VPN profiles. The website encrypts the key for the public key generated by your client. You transfer the encrypted result back to that same client; you do not type a raw API key into OpenVPN or strongSwan.
1. Generate a public key in your client
| Client | First-run action |
|---|---|
| Windows desktop | Select Generate Key Pair. The app copies the public key to the clipboard. |
| Android downloader, when available | Tap Generate Public Key, then Copy Key to Clipboard. |
| Linux, macOS, or Windows console | First run automatically starts API Key Setup. If clipboard access fails, copy the public key printed in the terminal. |
Keep the app or console session open until import finishes. Generating another key pair or restarting setup can make a transfer created for the previous pair unreadable.
2. Create the API key on the website
- Sign in at vpn.alightservices.com, then open API Keys.
- If redirected to Billing, check that your subscription, activated Travel Pass, or other granted access is currently valid.
- In Generate New API Key, enter an optional label such as
Work laptop. Use letters, numbers, and spaces, up to 50 characters. - Paste the public key into ML-KEM Public Key (base64). Paste the full value without adding quotes.
- Select Generate API Key.
- In the result, select Copy to Clipboard or download the encrypted
.keyfile. The transfer is shown only once; import it before leaving the page.
3. Import the encrypted transfer
- Windows desktop: select Read from Clipboard or Browse .key File.... After successful provisioning, select Done.
- Android: tap Read from Clipboard or Select .key File, then Decrypt and Save.
- Console: at the encrypted-blob prompt, press Enter to read the clipboard, paste the entire transfer, or enter the path of the downloaded
.keyfile. Enter a file path without surrounding quotes.
Successful import shows a key ID and API address. Continue with your platform guide to download a profile and connect.
Rotate, revoke, or replace a key
- You can have up to five active API keys. If the limit is reached, identify and revoke an unused device key from Your API Keys.
- For a replacement, start Re-provision API Key in the client (
pin the console), generate a fresh public key, and repeat the transfer. Re-provisioning clears the client's stored credentials and may revoke its current profile. - If using the website's Rotate action, supply the fresh public key requested by the form and import the new encrypted transfer. The client needs the replacement key after rotation.
- Revoking an API key prevents future API requests using that key. To invalidate a downloaded VPN credential, also revoke its profile from VPN Dashboard or the client's Revoke Current Profile action. Disconnect the VPN connection in the app that owns the tunnel.
Troubleshooting
- Decryption failed
- Use the complete transfer generated for the public key from this app session. If that session was lost, generate a fresh pair and replace the unused key.
- API key rejected
- Check the website for a revoked or rotated key and confirm current VPN access. Re-provision the client if needed.
- Profile allowance reached
- Review profiles in VPN Dashboard, revoke unused profiles, and allow pending server revocation to finish before requesting another.
- Clipboard unavailable
- Use the printed public key and the
.keyfile transfer. This is useful over SSH and on Linux desktops without clipboard integration.
Protect the saved credentials
Provision each device separately. Windows credentials are protected for the current Windows user. The console's Linux and macOS credentials are stored in ~/.alightvpn/credentials with owner-only permissions; they are not encrypted by this client. Keep that file and downloaded VPN profiles out of shared folders, source control, and support attachments.