Documentation
Docs
Introduction
Getting Started
Tutorial: build an app
Core Concepts
Routing
Server-Side Rendering
Mimir, state management
Pages & Layouts
API Routes
Styling & Theming
Building & Deploying
API Reference
Guides
Recipes
FAQ (use cases)
Tutorial , 8. Build and deploy
Notes is done. Let us build it for production and put it on a server behind HTTPS. The full reference is Building & Deploying; here is the concrete path for our app.
1. Build the client
On your machine, produce the browser bundle and manifest:
This writes .ekko/build/client/* (content-hashed chunks) and .ekko/build/manifest.json. Ship this
folder, the production box does not rebuild client code (it has no esbuild in its store).
2. What ships
Three things, from your machine to the server:
- The runtime , the
ekkobinary + its native lib (built elsewhere; on a host already running another
rune app it is already installed).
- The app bundle , the
notes/folder including.ekko/build, plus any dependency.eklarchives
it resolves from ekko.lock.
- The ekko store ,
~/.ekko/store(the packagesekko.locksources from"store",@ekko/react,
@ekko/react-dom, ...).
3. Install on the host
4. Run under systemd
/etc/systemd/system/notes.service:
[Unit]
Description=Notes (rune SSR)
After=network.target
[Service]
Type=simple
User=ubuntu
Environment=HOME=/home/ubuntu
Environment=PORT=3100
WorkingDirectory=/home/ubuntu/apps/notes
ExecStart=/usr/local/bin/ekko run server.tsx --allow=fs,net,env
Restart=always
RestartSec=3
[Install]
WantedBy=multi-user.target5. nginx + HTTPS
createApp binds 0.0.0.0:3100; keep it private and let nginx reach it on 127.0.0.1:3100:
/etc/nginx/sites-available/notes.example.com:
server {
listen 80;
server_name notes.example.com;
location / {
proxy_pass http://127.0.0.1:3100;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}6. Verify
Updating later
The runtime rarely changes; usually you just rebuild the client, re-ship the folder, and restart the service.
You built a full-stack app
Notes uses every part of rune: file-based and dynamic routing, a persistent layout, Mimir atoms and a selector with a persisted session, SSR with seeded state and a cached list page, API routes in the same process with cache invalidation, SCSS theming, and a production build + deploy. That is the whole framework, in one small app.
From here, deepen any area with its chapter, or browse the API Reference and Recipes.