Deployment

AdminLTE 4 is a static HTML/CSS/JS template — there's nothing exotic about deploying it. Build the production assets with npm run production, then host the static files anywhere: Netlify, Cloudflare Pages, GitHub Pages, S3, or any web server. For zero-build sites, point straight at the CDN.

Build the production assets

From a clone of the repo, the full production pipeline cleans, lints, compiles, and runs the bundle-size check:

npm install
npm run production

The compiled output lands in dist/:

dist/
├── css/
│   ├── adminlte.css
│   ├── adminlte.min.css
│   ├── adminlte.rtl.css
│   └── adminlte.rtl.min.css
├── js/
│   ├── adminlte.js          ← UMD bundle
│   ├── adminlte.min.js
│   ├── adminlte.esm.js      ← ESM bundle (new in 4.1.0)
│   ├── adminlte.esm.min.js
│   └── types/               ← TypeScript declarations
└── assets/          ← demo images / fonts (replace with your own)

What to deploy

Ship the dist/css/ and dist/js/ files plus your own HTML / server-rendered templates. Do not deploy src/, node_modules/, or the demo HTML pages when embedding AdminLTE in your own app.

Since 4.0.4 the npm package ships only the compiled assets and SCSS source — the demo HTML pages are no longer on npm (the package went from 12.7 MB to 9 MB). If you want the full static demo to start from, download the release archive from GitHub Releases instead.

Always serve the .min variants in production (adminlte.min.css, adminlte.min.js). The non-minified files are for source-map debugging only. Strip *.map files before deploy — they leak source to anyone who opens devtools.

Always use minified assets

AssetDevelopmentProduction
Stylesheetdist/css/adminlte.cssdist/css/adminlte.min.css
Scriptdist/js/adminlte.jsdist/js/adminlte.min.js
RTL stylesheetdist/css/adminlte.rtl.cssdist/css/adminlte.rtl.min.css

Approximate size budget (gzipped)

AssetSize
adminlte.min.css~40 KB
adminlte.min.js~5 KB

The CI build enforces a bundlewatch check that fails if any asset crosses its budget.

Hosting on any static host

Because the output is plain files, deploying is a copy. With rsync (excluding dev-only files):

rsync -avz --delete \
  --exclude='*.map' \
  dist/ user@server:/var/www/your-app/

For Netlify / Cloudflare Pages / GitHub Pages, set the publish directory to your built output and let the platform serve it. These platforms gzip/brotli automatically. On a self-managed server, enable compression for text assets:

# nginx
gzip on;
gzip_types text/css application/javascript text/html image/svg+xml;

Zero-build: use the CDN

If you don't want a build step at all, reference the prebuilt files from jsDelivr and host only your own HTML:

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/admin-lte@4.2.0/dist/css/adminlte.min.css">
<script src="https://cdn.jsdelivr.net/npm/admin-lte@4.2.0/dist/js/adminlte.min.js"></script>

For CDN loads, add a Subresource Integrity hash so a compromised CDN can't silently serve malicious code — copy the SRI line from the jsDelivr file page:

<link rel="stylesheet"
  href="https://cdn.jsdelivr.net/npm/admin-lte@4.2.0/dist/css/adminlte.min.css"
  integrity="sha384-PASTE_THE_HASH_HERE" crossorigin="anonymous">

Caching

AdminLTE ships fixed filenames, so either append a version query string and use a short TTL, or let a bundler emit fingerprinted filenames and cache them for a year:

<link rel="stylesheet" href="/css/adminlte.min.css?v=4.2.0">

AdminLTE is a UI template, not a security boundary. Deploy only the compiled assets and your own application files — never node_modules/, the src/ directory, or the example demo pages. See the repository's SECURITY.md for production guidance.


AdminLTE 4 · HTML port Edit on GitHub