Two Deployment Modes
Luax Pro sites can be deployed in two modes:
Mode 1: Netlify with Git Gateway — Decap CMS works in production. Editors log in through Netlify Identity. Changes commit to GitHub and trigger a rebuild. This mode is covered in the previous guide.
Mode 2: Any static host with local CMS — Decap CMS runs only on your local machine. You edit content locally, build the site, then upload the dist/ folder to any host. No production CMS, no authentication service, no vendor lock-in.
This guide covers Mode 2. It works on Cloudflare Pages, Vercel, GitHub Pages, AWS S3, cPanel, VPS, and any host that serves static files.
How Local CMS Works
On your local machine:
1. Run luax start in one terminal
2. Run npx decap-server in another terminal
3. Open http://localhost:8080/admin/ and edit content
4. Changes are saved to src/ markdown files
5. Run luax build to regenerate dist/
6. Upload dist/ to your host
The CMS never runs on the production server. You edit locally, build locally, deploy the static output.
Cloudflare Pages
1. Push your project to GitHub
2. Go to dash.cloudflare.com → Pages → Create a project
3. Connect your GitHub account and select the repo
4. Set build settings:
| Setting | Value |
|---|---|
| Framework preset | None |
| Build command | chmod +x luax && ./luax build |
| Build output directory | dist |
BUILD COMMAND OPTION:
curl -sL https://www.lua.org/ftp/lua-5.5.1.tar.gz -o /tmp/lua.tgz && tar -xzf /tmp/lua.tgz -C /tmp && cd /tmp/lua-5.5.1 && make posix && cp src/lua /tmp/lua && cd - && /tmp/lua build.lua
5. Click Save and Deploy
Cloudflare Pages gives you a free *.pages.dev subdomain. To add a custom domain:
1. Go to your Pages project → Custom domains
2. Click Set up a custom domain
3. Enter your domain (e.g., luaxpro.axcora.com)
4. If your domain is already on Cloudflare, DNS is configured automatically
5. If not, Cloudflare shows you the CNAME record to add
Cloudflare provides free SSL automatically.
Vercel
1. Push your project to GitHub
2. Go to vercel.com → Add New → Project
3. Import your GitHub repo
4. Set build settings:
| Setting | Value |
|---|---|
| Framework preset | Other |
| Build command | chmod +x luax && ./luax build |
| Output directory | dist |
5. Click Deploy
For custom domain:
1. Go to project → Settings → Domains
2. Click Add
3. Enter your domain
4. Add the DNS records Vercel shows at your registrar
Vercel provides free SSL automatically.
GitHub Pages
GitHub Pages does not run build commands on its own. You must build locally and push the dist/ folder.
1. Build locally:
chmod +x luax
./luax build
2. Copy the contents of dist/ to a docs/ folder in your repo root:
rm -rf docs
cp -r dist docs
3. Commit and push:
git add docs
git commit -m "Deploy to GitHub Pages"
git push
4. Go to your repo → Settings → Pages
5. Under Source, choose Deploy from a branch
6. Select branch main and folder /docs
7. Click Save
GitHub Pages publishes the site at https://YOUR-USERNAME.github.io/YOUR-REPO/.
For a custom domain:
1. In Pages settings, enter your domain under Custom domain
2. Add a CNAME record at your registrar pointing to YOUR-USERNAME.github.io
3. Enable Enforce HTTPS
Note: If your site uses absolute paths like /images/logo.png, GitHub Pages at a subpath (/YOUR-REPO/) will break images. Either use a custom domain (which serves at the root) or change all paths to relative (images/logo.png without leading slash).
AWS S3 + CloudFront
1. Build locally:
chmod +x luax
./luax build
2. Create an S3 bucket with static website hosting enabled
3. Upload the contents of dist/ to the bucket
4. Create a CloudFront distribution pointing to the S3 bucket
5. Add your custom domain via Route 53 or your DNS provider
6. Attach an ACM certificate for HTTPS
For updates, re-upload the dist/ folder after each build.
cPanel or Shared Hosting
1. Build locally:
chmod +x luax
./luax build
2. Open cPanel File Manager
3. Navigate to public_html/
4. Upload the contents of dist/ (not the folder itself, just its contents)
5. Your site is live at your domain
For updates, delete old files in public_html/ and upload the new dist/ contents.
VPS (Ubuntu, Debian, etc.)
1. Build locally:
chmod +x luax
./luax build
2. Upload dist/ to your VPS via SCP or SFTP:
scp -r dist/* user@your-server:/var/www/html/
3. Point Nginx or Apache to /var/www/html/
4. Configure SSL with Let's Encrypt (certbot --nginx)
For updates, re-upload after each build.
Summary Table
| Host | Decap CMS in Production? | Build Command Runs on Host? | Custom Domain |
|---|---|---|---|
| Netlify | Yes (Git Gateway + Identity) | Yes | Yes |
| Cloudflare Pages | No | Yes | Yes |
| Vercel | No | Yes | Yes |
| GitHub Pages | No | No (build locally) | Yes |
| AWS S3 | No | No (build locally) | Yes (CloudFront) |
| cPanel | No | No (build locally) | Yes |
| VPS | No | No (build locally) | Yes |
Choosing a Host
If you want CMS in production — use Netlify. It is the only host with built-in Git Gateway and Identity.
If you edit content yourself — use Cloudflare Pages or Vercel. Both run build commands automatically and provide free SSL and CDN.
If you want the simplest setup — use cPanel or any static host. Build locally, upload dist/, done.
If you want no vendor lock-in — use a VPS. You own the server, you control the deployment.
Common Mistake: Uploading the Wrong Folder
Always upload the contents of dist/, not the dist/ folder itself. If you upload the folder, your site lives at /dist/index.html instead of /index.html.
Common Mistake: Linux Binary Missing
If your build fails on Cloudflare Pages or Vercel with "cannot execute binary file", your luax binary was compiled for macOS or Windows. Replace it with the Linux binary from Gumroad before pushing.
Final Step
You now know how to deploy Luax Pro to any static host. Choose the host that fits your workflow. If you want CMS in production, use Netlify. If you edit yourself, use Cloudflare Pages. If you want full control, use a VPS.