How to Install and Configure EmDash CMS on Ubuntu 24.04
EmDash is a modern, serverless CMS introduced by Cloudflare as a secure alternative to WordPress. It is built using Astro and runs plugins in sandboxed environments, improving security and performance.
Prerequisites
- A VPS running Ubuntu 24.04
- Root or sudo access
- Minimum 2GB RAM recommended
- Basic knowledge of Linux commands
- Node.js v22+ required
Update the System
sudo apt update && sudo apt upgrade -y
Install Required Packages
sudo apt install git curl -y
Install Node.js 22 (Required)
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt install nodejs -y
Verify installation:
node -v
npm -v
Output:
v22.22.2
10.9.7
Install pnpm (Package Manager)
npm install -g pnpm
Verify:
pnpm -v
Output:
10.33.0
Clone EmDash Repository
git clone https://github.com/emdash-cms/emdash.git
cd emdash
Output:
Cloning into 'emdash'...
remote: Enumerating objects: 3041, done.
remote: Counting objects: 100% (324/324), done.
remote: Compressing objects: 100% (87/87), done.
remote: Total 3041 (delta 251), reused 237 (delta 237), pack-reused 2717 (from 1)
Receiving objects: 100% (3041/3041), 10.02 MiB | 41.53 MiB/s, done.
Resolving deltas: 100% (1106/1106), done.
Install Dependencies
pnpm install
Output:
devDependencies:
+ @axe-core/playwright 4.11.1
+ @changesets/changelog-github 0.5.2
+ @changesets/cli 2.29.8
+ @e18e/eslint-plugin 0.2.0
+ @playwright/test 1.58.0
+ @types/node 24.10.13
+ @typescript/native-preview 7.0.0-dev.20260213.1
+ emdash 0.1.0 <- packages/core
+ knip 5.84.1
+ oxfmt 0.34.0
+ oxlint 1.49.0
+ oxlint-tsgolint 0.15.0
+ prettier 3.8.1
+ prettier-plugin-astro 0.14.1
+ typescript 6.0.0-beta
╭ Warning ─────────────────────────────────────────────────────────────────────╮
│ │
│ Ignored build scripts: @parcel/watcher@2.5.4, sharp@0.34.5. │
│ Run "pnpm approve-builds" to pick which dependencies should be allowed │
│ to run scripts. │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
Done in 27.7s using pnpm v10.28.0
If prompted for build approvals:
pnpm approve-builds
Press:
a
Then press:
Enter
(This selects all required packages like sharp and @parcel/watcher)
Build the Project (Important)
pnpm build
Configure Allowed Host (VERY IMPORTANT)
Edit Astro config:
nano ~/emdash/demos/playground/astro.config.mjs
Replace or ensure the config contains:
import cloudflare from "@astrojs/cloudflare";
import react from "@astrojs/react";
import { playgroundDatabase } from "@emdash-cms/cloudflare";
import { defineConfig } from "astro/config";
import emdash from "emdash/astro";
export default defineConfig({
output: "server",
adapter: cloudflare(),
server: {
host: true,
allowedHosts: ["emdash.domain.com"]
},
image: {
layout: "constrained",
responsiveStyles: true,
},
integrations: [
react(),
emdash({
database: playgroundDatabase({ binding: "PLAYGROUND_DB" }),
playground: {
middlewareEntrypoint: "@emdash-cms/cloudflare/db/playground-middleware",
},
}),
],
devToolbar: { enabled: false },
});
👉 This fixes:
Blocked request. This host is not allowed
Run EmDash Playground
cd demos/playground
pnpm dev --host
Access EmDash
Open in your browser:
Main App:
http://YOUR_SERVER_IP:4321/playground
Admin Panel:
http://YOUR_SERVER_IP:4321/_emdash/admin
Setup Nginx Reverse Proxy (Domain Access)
Install Nginx:
sudo apt install nginx -y
Create a new config file:
sudo nano /etc/nginx/sites-available/emdash
Add the following configuration:
server {
listen 80;
server_name emdash.domain.com;
location / {
proxy_pass http://127.0.0.1:4321;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
Enable the site:
sudo ln -s /etc/nginx/sites-available/emdash /etc/nginx/sites-enabled/
Test configuration:
sudo nginx -t
Output:
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
Restart Nginx:
sudo systemctl restart nginx
Update DNS
Create an A record:
Host: emdash
Type: A
Value:YOUR_SERVER_IP
Wait for DNS propagation.
Access via Domain
Now open:
http://emdash.domain.com
Admin Panel:
http://emdash.domain.com/_emdash/admin
You should see the service listening on port 4321
Notes
- EmDash runs on Astro framework
- Default port: 4321
- Uses Cloudflare adapter
- The main repo is a monorepo — use
demos/playground - This is currently beta software
Troubleshooting
Node version error
node -v
Ensure version is 22+
Port not accessible
pnpm dev --host
Reinstall dependencies
rm -rf node_modules
pnpm install
Build issues
pnpm build
Conclusion
EmDash can be successfully installed on Ubuntu 24.04 using Node.js 22 and pnpm.
Due to its monorepo structure, additional build steps are required before running the demo environment.
CrownCloud - Get a SSD powered KVM VPS at $4.5/month!
Use the code WELCOME for 10% off!
1 GB RAM / 25 GB SSD / 1 CPU Core / 1 TB Bandwidth per month
Available Locations: LAX | MIA | ATL | FRA | AMS