Deploying content management systems should not involve complex server configurations or heavy database provisioning. Instatic, an open-source, self-hosted visual CMS built on Bun and TypeScript, offers a lightweight, high-performance editor that outputs clean static files with zero hydration bloat.
In this tutorial, you will learn how to configure and deploy Instatic CMS on a Virtual Private Server (VPS) using Docker and Docker Compose. We will set it up with SQLite for local, server-contained storage, which is ideal for small-to-medium marketing sites.
Prerequisites
Before starting, ensure you have:
- A VPS running a modern Linux distribution (e.g., Ubuntu 22.04 LTS).
- A domain name pointed to your VPS IP address (e.g.,
cms.example.com). - Docker and Docker Compose installed on the host.
1. Directory Structure Setup
Log into your VPS via SSH and create a dedicated directory for your Instatic deployment:
mkdir -p ~/instatic-cms/data
cd ~/instatic-cms
The ./data directory will be mounted as a volume inside the container to persist the SQLite database and uploaded media assets.
2. Docker Compose Configuration
Create a docker-compose.yml file using your preferred text editor:
version: '3.8'
services:
instatic:
image: corebunch/instatic:latest
container_name: instatic-cms
restart: unless-stopped
ports:
- "3000:3000"
volumes:
- ./data:/app/data
environment:
- PORT=3000
- DATABASE_URL=file:/app/data/instatic.db
- JWT_SECRET=change-this-to-a-secure-random-string
- NODE_ENV=production
[!IMPORTANT] Make sure to replace
change-this-to-a-secure-random-stringwith a long, randomly generated secret to secure user logins. If you choose to scale, you can configure PostgreSQL credentials here.
3. Deployment and Startup
To pull the latest image and launch the container in the background (detached mode), run:
docker compose up -d
Verify that the service is running and listening on port 3000:
docker compose ps
4. Configuring Reverse Proxy with Caddy
For production environments, you must run Instatic behind a reverse proxy to secure client sessions with HTTPS. We recommend Caddy because it automatically requests and renews Let’s Encrypt certificates.
Create a Caddyfile in your setup folder:
cms.example.com {
reverse_proxy localhost:3000
}
Start Caddy, and your Instatic editor will be secure and accessible at https://cms.example.com.
Video Walkthrough
For a visual demonstration of the editor’s responsive canvas, CSS variables token management, and plugin architecture, watch the walkthrough below:
Key Takeaways & Alpha Warnings
- Self-Hosted Control: Instatic combines a visual builder with Bun/TypeScript execution in a single container.
- SQLite Storage: Eliminates database overhead for solo projects or marketing sites.
- Clean Static Output: Deploys server-contained visual styling rules as static HTML, CSS, and JS.
- Alpha Warnings: Given the early alpha/pre-1.0 status of the project, make sure to set up regular backups of your SQLite volume database to prevent data loss.


