Obtain a token
Automated deployments should use deployment tokens, not interactive device identities. A deployment token provides two secrets:GHOSTABLE_CI_TOKEN— authenticates the runner against Ghostable’s API.GHOSTABLE_DEPLOY_SEED— the private key that lets the runner decrypt environment secrets.
Mint via CLI
Follow the Deploy Tokens guide to create a token from a trusted workstation. The wizard prompts for the environment and name, mints the keypair, re-shares the environment key, and prints both secrets. Store both secrets in your CI (for example,GHOSTABLE_CI_TOKEN and GHOSTABLE_DEPLOY_SEED).
They are only shown once.
Deployment tokens are intentionally CLI-only in v2 to ensure you always have the matching private key
stored locally before uploading it to CI. If you lose either secret, revoke the token with
ghostable deploy token revoke and mint a new one.
Jump to a workflow
Generic CLI Deploy
Use this provider-agnostic flow whenever you just need a plaintext.env file written to the
current working directory (or a custom path)—perfect for Vercel,
Render, Netlify, or any workflow that expects env
files on disk:
- Authenticates with your deployment token (
GHOSTABLE_CI_TOKEN+GHOSTABLE_DEPLOY_SEED). - Downloads the encrypted environment bundle for the token’s scope.
- Decrypts everything locally and writes a ready-to-use
.envfile (preserving existing comments).
Don’t have a token yet? Follow the Deploy Tokens guide before wiring up your CI job.
Override the CI token (defaults to the
GHOSTABLE_CI_TOKEN env var).Output destination for the decrypted
.env. Defaults to .env in the working directory.Limit the deploy to specific keys when you only need a subset of variables.
Laravel Cloud
To use Ghostable during deployments with Laravel Cloud:- Ensure Ghostable CLI is installed in your app.
- Open the application you want to configure.
- Go to Environments and select the one you want to deploy.
- Go to Settings → General → Custom environment variables → Reveal secrets.
- Add your Ghostable secrets:
The deployment seed originates from a trusted workstation and should be stored only in your team’s secure vault (such as 1Password, Bitwarden, or LastPass).
- Go to Settings → Deployments → Build commands
- Add the Ghostable build command before your config:cache step.
Laravel Forge
To use Ghostable during deployments with Laravel Forge:- Ensure Ghostable CLI is installed in your app.
- Open your site in Forge.
- Go to Environment → Reveal Environment Variables.
- Add your Ghostable secrets:
The deployment seed originates from a trusted workstation and should be stored only in your team’s secure vault (such as 1Password, Bitwarden, or LastPass).
Forge simply injects it at deploy time so the runner can derive per-environment keys securely.
Forge simply injects it at deploy time so the runner can derive per-environment keys securely.
- Go to Site → Deployment Script and add the Ghostable deployment command before your
config:cachestep.
Example
Ghostable merges its managed variables with those already in Forge.
Existing keys are updated in place, new keys are added, and anything unmanaged is left untouched.
Existing keys are updated in place, new keys are added, and anything unmanaged is left untouched.
Encryption
Environment file encryption works in Forge just like in Vapor. Pass the--encrypted flag to deploy forge, and Ghostable will bundle variables into an encrypted .env.encrypted file.
The CLI automatically generates and stores the required LARAVEL_ENV_ENCRYPTION_KEY so decryption works at runtime.
Deployment Script
- Eliminates the need to commit encrypted .env files into source control.
- Reduces merge conflicts when working in teams.
FAQS
Do Forge rollbacks still work as expected?
Do Forge rollbacks still work as expected?
Yes — Forge rollbacks behave as normal. But note: - Rollbacks affect the code and
deployment artifact only. - Ghostable-managed variables are not rolled back automatically.
If you need to roll back variables, perform the rollback in Ghostable as well.
Does Ghostable remove variables from Forge when I delete them?
Does Ghostable remove variables from Forge when I delete them?
No — Ghostable only pushes the variables it manages. If you remove a variable from
Ghostable, it is not automatically removed from Forge.
What happens if I switch between plain and encrypted variables?
What happens if I switch between plain and encrypted variables?
Ghostable tracks the delivery mode for each variable, but Forge may still have old copies.
Laravel Vapor
To use Ghostable during deployments with Laravel Vapor:- Ensure Ghostable CLI is installed in your app.
- Store your Ghostable secrets in your CI secrets storage or store in a .env file when running
vapor deploylocally.
The deployment seed originates from a trusted workstation and should be stored only in your team’s secure vault (such as 1Password, Bitwarden, or LastPass).
Vapor injects it securely at build time so Ghostable can derive per-environment keys without exposing any secrets.
Vapor injects it securely at build time so Ghostable can derive per-environment keys without exposing any secrets.
- Open your project’s vapor.yml file.
- Add the Ghostable deploy command to your Vapor build steps, before any caching or optimization commands.
vapor.yml
Variables from Vapor will be pulled down and merge with variable stored in Ghostable, then
pushed back to Vapor.
Secrets
When your project’s deployment provider is set to Laravel Vapor (Project -> Settings -> General -> Deployment Provider), Ghostable exposes an additional toggle in the variable editor: Store as Vapor Secret.
Enabling this option tells Ghostable to sync that variable to Vapor as a secret during
deployment. Vapor then propagates the secret into
AWS Secrets Manager behind the scenes.
This lets you keep larger keys out of the .env file and can help stay under the
2KB environment size limit enforced by AWS Lambda/Vapor.
Encryption
Another way to stay under AWS’s 2KB environment variable size limit is to use environment file encryption. Ghostable supports this directly. Simply pass the —encrypted flag to Ghostable’sdeploy vapor command, and all non-secret environment variables will be bundled into an encrypted
file that Vapor can decrypt at runtime.
Ghostable automatically generates and injects the required LARAVEL_ENV_ENCRYPTION_KEY into your
Vapor environment, so there’s nothing additional to manage.
vapor.yml
FAQs
Do Vapor rollbacks still work as expected?
Do Vapor rollbacks still work as expected?
Yes — Vapor rollbacks continue to function normally when using Ghostable.
However, keep in mind:
- A rollback in Vapor only affects the code and deployment artifact, it does not roll back environment variables or secrets managed by Ghostable.
- Your Ghostable-managed variables will remain as-is unless you explicitly deploy a different set of variables from Ghostable.
If you need your application to match a previous state exactly, remember that
variables and secrets must be rolled back in Ghostable as well — Vapor does not
automatically sync those changes.
Does Ghostable remove secrets from Vapor when I delete?
Does Ghostable remove secrets from Vapor when I delete?
No. Ghostable only syncs and updates the secrets it manages. If you remove a variable marked as
“Store as Vapor Secret” from Ghostable, it will not automatically delete it from Vapor or AWS
Secrets Manager.
What happens if I switch between plain, encrypted, and secret variables?
What happens if I switch between plain, encrypted, and secret variables?
Ghostable keeps track of the delivery mode for each variable, but Vapor may continue
to hold previous copies depending on how you’ve deployed.