## Summary - move the complete GitBook documentation tree and assets into Builder under `/docs` - generate the exhaustive MCP page from the local CLI source in the same change - publish GitBook from a release-gated `docs` branch containing the exact successfully released revision - run MCP documentation tests, typechecking, and stale-output checks with the existing generated-docs check - remove links to the Community Discussions repository ## Technical choices - Import the current documentation as a linear snapshot so the branch satisfies Builder's required-linear-history protection. - Keep the Markdown wrapper separate from the TypeScript generator at `scripts/docs/mcp-page.md`. - Generate through `packages/cli/local.js` so CLI guidance and its documentation are reviewed together. - Let `check:generated-docs` reject CLI changes that leave the committed MCP page stale. - After both GitHub release creation and package publication succeed, fast-forward the read-only `docs` branch to the immutable release tag commit. A divergent update fails instead of publishing a different revision. - Configure GitBook to publish `/docs` from the `docs` branch, not directly from `main`. - Exclude `/docs` from the repository-wide `oxfmt` scan so imported GitBook Markdown retains its established formatting; generator tests and stale-output checks still validate the MCP page. - Exclude `transcripts/` and GitHub Discussions from the migration. ## Todo - [x] Import documentation, navigation, includes, and assets under `/docs`. - [x] Generate the MCP page from the local CLI source. - [x] Move MCP generation and validation into Builder. - [x] Require MCP documentation updates alongside CLI changes. - [x] Publish released revisions through a read-only `docs` branch. - [x] Remove Community repository links from Builder and the migrated docs. - [x] Preserve and verify a final Community Git bundle locally. - [ ] Merge this pull request. - [ ] Let the next successful release create or advance the `docs` branch. - [ ] Repoint GitBook Git Sync to `webstudio-is/webstudio`, branch `docs`, root directory `/docs`. - [ ] Verify `docs.webstudio.is`, navigation, assets, anchors, and the MCP page in production. - [ ] Delete `webstudio-is/webstudio-community`. ## Verification - `pnpm check:generated-docs` - `pnpm lint` - `pnpm oxfmt --check` - `git diff --check origin/main...HEAD` - generator regression test demonstrated failing when the GitBook wrapper behavior was removed, then passing after restoration - no fixture inputs or outputs are affected ## Known limitation All documentation merged after the previous release waits for the next successful release before GitBook publishes it. This deliberately keeps the public MCP reference aligned with an installable CLI revision. Ref #5986
4.2 KiB
▶️ VPS with Docker
Webstudio CLI Docker Deployment on a VPS (Step by Step)
This guide explains how to build a Webstudio project locally using the Docker template and deploy it on an Ubuntu VPS using Docker, Nginx as a reverse proxy, and Let’s Encrypt SSL.
1. Build the Website Locally
On your local machine, inside your Webstudio project:
webstudio build --template docker
This generates a Docker-ready build that runs a Node.js server (React Router) inside a container.
You should end up with a folder containing at least:
Dockerfilepackage.jsonbuild/
2. Prepare the VPS (Ubuntu)
Connect to your VPS via SSH:
ssh user@VPS_IP
Update the system:
sudo apt update && sudo apt upgrade -y
Install Docker:
curl -fsSL https://get.docker.com | sudo sh
sudo systemctl enable docker
sudo systemctl start docker
(Optional) Allow running Docker without sudo:
sudo usermod -aG docker $USER
logout
Reconnect via SSH.
3. Upload the Build to the VPS
From your local machine:
scp -r ./example-site user@VPS_IP:/home/user/example-site
On the VPS:
cd ~/example-site
4. Build the Docker Image on the VPS
docker build -t webstudio-site .
5. Run the Webstudio Container
The Webstudio Docker template runs a Node.js server on port 3000.
docker run -d \
--name webstudio \
-p 3000:3000 \
--restart unless-stopped \
webstudio-site
Verify locally on the VPS:
curl http://localhost:3000
If HTML is returned, the container works correctly.
6. Install Nginx on the VPS
Nginx will act as a reverse proxy and handle ports 80 and 443.
sudo apt install -y nginx
sudo systemctl enable nginx
sudo systemctl start nginx
7. Configure Nginx Reverse Proxy
Create a new site configuration:
sudo nano /etc/nginx/sites-available/example-site
Paste the following configuration:
server {
listen 80;
server_name example-site.tld;
location / {
proxy_pass http://127.0.0.1:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
Enable the site:
sudo ln -s /etc/nginx/sites-available/example-site /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx
Test in the browser:
http://example-site.tld
8. Install Let’s Encrypt SSL (Certbot)
Install Certbot and the Nginx plugin:
sudo apt install -y certbot python3-certbot-nginx
Request the SSL certificate:
sudo certbot --nginx -d example-site.tld
Choose the option to redirect HTTP to HTTPS.
9. Verify SSL and Auto-Renewal
Access the site:
https://example-site.tld
Test renewal:
sudo certbot renew --dry-run
10. Updating the Website
When you need to update the site:
-
Rebuild locally:
webstudio build --template docker -
Upload the updated files to the VPS
-
Rebuild and restart the container:
docker stop webstudio docker rm webstudio docker build -t webstudio-site . docker run -d -p 3000:3000 --restart unless-stopped webstudio-site
Final Architecture
- Webstudio runs as a Node.js app inside Docker (port 3000)
- Nginx listens on ports 80 and 443
- Nginx proxies requests to Docker
- Let’s Encrypt provides SSL
This setup is simple, stable, and production-ready.
Related
- CLI – Export and build your project using the command line
- Digital Ocean with Coolify – Simplified Docker deployment using Coolify
- Hetzner with Coolify – Deploy to Hetzner using Coolify
- AWS with Flightcontrol – Deploy to AWS using Flightcontrol
- Publishing and custom domains – Set up custom domains for your site