Migrate from Vercel
Legacy guide - retired af CLI
This page was written for the retired af CLI and the sites/storage workflow.
The current CLI is acc (compute services), which does not include these
commands yet. Commands on this page will not work with acc. Kept for
reference while this functionality is rebuilt.
Move your static sites from Vercel to Alternate Futures for decentralized hosting with IPFS, Filecoin, and Arweave storage options.
Time to complete: 15-30 minutes per site
Why Migrate?
| Feature | Vercel | Alternate Futures |
|---|---|---|
| Hosting model | Centralized (AWS) | Decentralized (IPFS/Arweave/Filecoin) |
| Censorship resistance | No | Yes |
| Permanent storage | No | Yes (Arweave) |
| Free tier | Limited (Hobby) | Generous free tier |
| Vendor lock-in | Yes (Vercel-specific features) | No (standard IPFS/web protocols) |
| Crypto payments | No | Yes (ETH, AR, FIL, SOL) |
| AI agents | No | Yes |
| Web3 integration | No | ENS, IPNS, wallets |
Best For
Migrating from Vercel works best for static sites and static exports (Next.js with output: 'export', React SPAs, Vue, Astro, etc.). Server-side rendering (SSR) features are handled by Cloud Functions.
Prerequisites
- An Alternate Futures account -- Sign up at clouds.alternatefutures.ai
- Node.js 18+ installed
- Your project source code (not just the Vercel deployment)
Step 1: Install and Authenticate
# Install the Alternate Futures CLI
npm install -g @alternatefutures/cli
# Authenticate
af loginStep 2: Configure Your Build
Next.js (Static Export)
Add static export to your next.config.js:
// next.config.js
const nextConfig = {
output: 'export', // Required for static hosting
images: {
unoptimized: true, // Required for static export
},
trailingSlash: true, // Recommended for IPFS compatibility
};
module.exports = nextConfig;Build and deploy:
npm run build
af sites init # Set output directory to ./out
af sites deployReact (Vite or Create React App)
npm run build
af sites init # Set output directory to ./dist (Vite) or ./build (CRA)
af sites deployOther Frameworks
Any framework that produces static output works. Set the correct output directory:
| Framework | Output Directory |
|---|---|
| Next.js (export) | ./out |
| React (Vite) | ./dist |
| React (CRA) | ./build |
| Vue (Vite) | ./dist |
| Astro | ./dist |
| SvelteKit (static) | ./build |
| Nuxt (static) | ./.output/public |
Step 3: Migrate Custom Domains
Remove Domain from Vercel
- Go to your Vercel project settings
- Navigate to Domains
- Remove the domain (do not delete DNS records yet)
Add Domain to Alternate Futures
# Add the domain to your site
af domains create --siteSlug my-site --hostname example.com
# Get the required DNS records
af domains detail --hostname example.comUpdate DNS Records
Update your DNS at your registrar:
For subdomains:
Type: CNAME
Name: www
Value: cname.alternatefutures.aiFor root domains:
Type: A
Name: @
Value: [IP from af domains detail]# Verify DNS configuration
af domains verify --hostname example.comStep 4: Migrate CI/CD
Replace Vercel GitHub Integration
Remove the Vercel GitHub integration and add an Alternate Futures deploy workflow:
Create .github/workflows/deploy.yml:
name: Deploy to Alternate Futures
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Deploy
run: npx @alternatefutures/cli sites deploy
env:
AF_TOKEN: ${{ secrets.AF_TOKEN }}
AF_PROJECT_ID: ${{ secrets.AF_PROJECT_ID }}Add Secrets
- Go to your GitHub repository Settings > Secrets and variables > Actions
- Add
AF_TOKEN-- your personal access token (create one withaf pat create --name "CI/CD") - Add
AF_PROJECT_ID-- your project ID (find it withaf projects list)
Step 5: Migrate Environment Variables
If your Vercel project uses environment variables:
- Note your variables from Vercel project settings
- For build-time variables, add them to your CI/CD workflow
- For runtime variables (API routes), configure them in your Cloud Functions
Step 6: Remove Vercel
- Remove the Vercel GitHub integration from your repository
- Delete
vercel.jsonfrom your project - Optionally uninstall the Vercel CLI:
npm uninstall -g vercel - Delete the project from your Vercel dashboard
Vercel Features vs Alternate Futures
| Vercel Feature | Alternate Futures Equivalent |
|---|---|
| Preview deployments | Every deployment gets a unique CID URL |
| Serverless functions | Cloud Functions with SGX encryption |
| Edge functions | Cloud Functions (edge deployment) |
| Analytics | Observability & APM |
| Image optimization | Build-time optimization (recommended) |
| ISR/SSR | Static export + Cloud Functions for dynamic routes |
| Cron jobs | Cloud Functions with external scheduling |
Next Steps
- Deploying Sites -- Learn about storage networks and deployment options
- Cloud Functions -- Replace Vercel serverless functions
- CI/CD Integration -- Advanced CI/CD patterns
- Custom Domains -- Full domain configuration guide