Contents
Vue.js runs in the visitor’s browser, so what you host is the build output, not Vue itself. A project created with npm create vue@latest uses Vite and produces a dist folder of static files you can put on any host. Most deployment problems come down to two things: Vue Router’s history mode, and the base path when the app lives in a subfolder.
What you host, by project type
| Project type | Build output | Plan that fits |
|---|---|---|
| Vue 3 with Vite | A dist folder of static files |
Any hosting plan |
| Vue CLI (legacy) | A dist folder of static files |
Any plan; moving to Vite is better |
Nuxt with nuxi generate |
A static .output/public folder |
Any hosting plan |
| Nuxt in SSR mode | A Node.js server in .output/server |
AI/Developer plans |
| Vue inside Laravel via Inertia | A Laravel app with Vite assets | See Laravel hosting |
What a Vue app needs in production
- Node.js on your computer for the build: Vite 7 needs Node.js 20.19, 22.12 or newer.
- History mode:
createWebHistoryneeds a server-side fallback rule;createWebHashHistorydoesn’t. - The base path: set
baseinvite.config.jswhen the app isn’t at the domain root. - Build-time variables: anything prefixed
VITE_is inlined and visible to visitors, so keep secrets out. - An API: if the app saves data it needs a server, such as PHP on any plan or Node.js on AI plans.
Example: a Vue app in a subfolder
If the app will live at example.com/app/, set the base path:
// vite.config.js
export default defineConfig({
plugins: [vue()],
base: '/app/',
})
// src/router/index.js
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
routes,
})
Then create an .htaccess file inside public_html/app/:
RewriteEngine On
RewriteBase /app/
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /app/index.html [L]
At the domain root, use / instead of /app/ on both lines. These rules are explained in what is .htaccess.
Deploying, in short
- Run
npm ci && npm run build, then check the result locally withnpm run preview. - Zip the contents of
dist, upload topublic_htmlin the File Manager and extract. - Add the
.htaccessfile if you usecreateWebHistory. - Open an inner page and refresh it to confirm routing works.
The same steps are covered in detail for Vite apps in the React deployment guide, and general uploading in the HTML upload guide. To run Nuxt in SSR mode, follow the Node.js deployment guide with .output/server/index.mjs as the startup file.
What every account includes
- LiteSpeed, which serves static files directly and reads
.htaccessrules. - Free SSL issued automatically, daily JetBackup backups and Imunify360 security.
- Each account isolated in CloudLinux CageFS, and deploys from GitHub through Git Version Control and
.cpanel.yml. - On AI plans: SSH and Node.js 20 and 24 for building on the server, plus Claude Code and Codex over SSH.
- The Araby AI assistant in the panel, which reads error logs and explains the fix, plus support in Arabic.
Limits to know
- Shared hosting doesn’t run Node.js, so build on your computer. Nuxt in SSR mode needs an AI/Developer plan.
- A single-page app’s content appears only after JavaScript runs. If search visibility matters, use
nuxi generateto produce ready-made HTML pages. - No root access and no Docker, and resources are limited per plan.
On ArabyHost
For a static Vue app, any hosting plan on the pricing page will do. If you need Nuxt in SSR mode or a Node.js API, pick one of the AI/Developer plans.
FAQ
Should I use createWebHistory or createWebHashHistory?
createWebHistory gives clean URLs like /about and needs an .htaccess rule. createWebHashHistory puts a # in the URL and needs no server setup, but it's less friendly to search engines.
Does Nuxt run on ArabyHost?
Yes, in two ways: nuxi generate produces a static site that runs on any plan, while Nuxt in SSR mode runs as a Node.js app on the AI/Developer plans.
My project is on Vue 2. Will it work?
Yes, the build output is static files like any other project. But Vue 2 reached end of life at the end of 2023 and gets no security fixes, so plan a move to Vue 3 and Vite.