Skip to main content

Prerequisites

Before deploying, make sure you have:
  1. A valid linkapp.config.ts with required manifest fields
  2. A production build in dist/ (or linkapp will build automatically)
  3. Authentication credentials (run npx @linktr.ee/linkapp login first)

Authenticate

Log in to Linktree before your first deployment:
This opens a browser window for OAuth device flow authentication. Your tokens are stored in ~/.config/linkapp/auth-token.json.

Deploy your LinkApp

Deploy to production:
Or use the CLI directly:

Deploy to QA

To deploy to the QA environment:

Deployment process

When you run linkapp deploy:
  1. Validates your project and config
  2. Builds the app (if needed)
  3. Uploads to Linktree

Deployment flags

Example:

After deployment

After a successful deployment, you’ll see:
Use the test link to preview your LinkApp on a real Linktree profile before publishing.

Troubleshooting

Validation errors

If you see config validation errors:
Fix these in your linkapp.config.ts and redeploy.

Bundle size warnings

If your bundle exceeds 5MB:
Consider using dynamic imports, removing unused dependencies, or optimizing images.

Authentication errors

If you see 401 Unauthorized:

Build errors

If the build fails during deployment:

Config schema errors

Check your config against the schema:

Deployment fails

Enable verbose logging:

Multiple environments

You can maintain separate LinkApps for development and production:
linkapp.config.ts
Deploy to QA:
Deploy to production:

CI/CD integration

Deploy from CI/CD pipelines:
.github/workflows/deploy.yml
Store your authentication token as a secret. Never commit auth-token.json or tokens to version control.

Next steps

CLI Reference

See all deploy command options

Build

Learn about the build process