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
│ └── adminlte.min.js
└── 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.
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
| Asset | Development | Production |
|---|---|---|
| Stylesheet | dist/css/adminlte.css | dist/css/adminlte.min.css |
| Script | dist/js/adminlte.js | dist/js/adminlte.min.js |
| RTL stylesheet | dist/css/adminlte.rtl.css | dist/css/adminlte.rtl.min.css |
Approximate size budget (gzipped)
| Asset | Size |
|---|---|
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.0.2/dist/css/adminlte.min.css">
<script src="https://cdn.jsdelivr.net/npm/admin-lte@4.0.2/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.0.2/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.0.2">
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.