Install from the terminal

DocsSelf-hosting

Install from the terminal

Install on a server with one command, by hand with compose.yaml, from a clone, or with the webbites-server command.

Which way

Four ways in, all ending in the same place: a folder with the compose setup and an .env of fresh secrets, running in Docker. Pick by where WebBites will run.

WayBest forUpgrade by
One commandA Linux server or VPS over SSH. The quickest.Running the same command again
The webbites-server commandA server you also want to start, stop, update and read logs on with short commands.webbites-server update
By hand with compose.yamlSeeing every line, or fitting WebBites into a setup you already have.Downloading the file again, then docker compose pull
From a cloneFollowing the code, or contributing.git pull

On your own Mac, PC or Linux desktop, the WebBites Server app does all of this without a terminal.

One command

On a machine with Docker, run:

Terminal
curl -fsSL https://raw.githubusercontent.com/elrumo/webbites_public/master/deploy/get.sh | sh

It downloads only the deployment files of the latest release into ./webbites (no clone, nothing to build), asks a few questions, writes .env with fresh secrets, pulls the images and starts WebBites. The questions:

  1. Domain: your domain, such as bookmarks.example.com, for HTTPS from anywhere. Or localhost to try it on this machine.
  2. Email: only an account with this address can become the administrator. Leave it empty and the first account to sign up does.
  3. Page previews: the screenshot service, about 1 GB of memory.
  4. Separate file storage: a bundled S3 store for uploads instead of the database.

Give the answers up front to skip the questions, for a script or a provisioning tool:

Terminal
curl -fsSL https://raw.githubusercontent.com/elrumo/webbites_public/master/deploy/get.sh \
  | sh -s -- --domain bookmarks.example.com --email you@example.com --yes
OptionDoes
--domain <name>Your domain, or localhost.
--email <address>The only address that can become the administrator.
--http-port <port>For localhost: the port to use if 80 is taken (for example 8080).
--no-screenshotsNo page previews; saves about 1 GB of memory.
--rustfsKeep uploads in the bundled S3 store.
--yesAsk nothing; use the answers given and the defaults.
--dir <folder>Where WebBites lives (default ./webbites).
--version <x.y.z>A specific release instead of the latest.
--no-startSet up or upgrade the files only; start later with docker compose up -d.

To upgrade, run the same command again in the same place. The deployment files are replaced by the new release's (the old ones are kept in webbites/.previous), and .env is kept with its WEBBITES_VERSION moved on.

Want to read it before running it? It is short: deploy/get.sh. Or download it first: curl -fsSLO https://raw.githubusercontent.com/elrumo/webbites_public/master/deploy/get.sh, read it, then sh get.sh.

The webbites-server command

The WebBites Server app is also a command-line tool, so a server without a desktop can use it too. Download it for Linux:

Terminal
# x64 servers; use linux-arm64 on Arm
curl -fsSL https://github.com/elrumo/webbites_public/releases/latest/download/WebBites-Server-linux-amd64.tar.gz | tar xz
sudo install WebBites-Server-linux-amd64/webbites-server /usr/local/bin/

Then:

Terminal
webbites-server install          # the same questions (or --domain ... --email ... --yes)
webbites-server status           # running? which version, which address
webbites-server update           # to the latest release (--version x.y.z for another)
webbites-server start | stop | restart
webbites-server logs api -f      # one part's logs: web, api, parse, mongo, ...
webbites-server ui               # the setup page, through an SSH tunnel

Every command takes --dir <folder>; the default is the folder used last, or ~/WebBites. It manages installs made the other ways too: point it at their folder.

webbites-server ui starts the same setup page as the app, on 127.0.0.1 only. From your own computer, reach it through an SSH tunnel to the port it prints:

Your computer
ssh -L 8765:127.0.0.1:<port> you@your-server
# then open the address it printed, with 8765 in place of its port

By hand with compose.yaml

Make a folder, download compose.yaml into it and write a .env next to it with your address and fresh secrets. Change PUBLIC_URL to your domain first, or use http://localhost to try it on one machine.

Terminal
mkdir webbites && cd webbites
curl -fsSLO https://www.webbites.io/self-hosting/compose.yaml

# Your address and fresh secrets
cat > .env <<EOF
PUBLIC_URL=https://notes.example.com
INITIAL_ADMIN_EMAIL=you@example.com
MONGO_PASSWORD=$(openssl rand -hex 24)
PARSE_APP_ID=$(openssl rand -hex 8)
PARSE_JS_KEY=$(openssl rand -hex 24)
PARSE_MASTER_KEY=$(openssl rand -hex 32)
CUSTOM_API_KEY=$(openssl rand -hex 32)
AUDIO_TOKEN_SECRET=$(openssl rand -hex 32)
SHARE_LINK_SECRET=$(openssl rand -hex 32)
BACKUP_ENCRYPTION_KEY=$(openssl rand -hex 32)
SETTINGS_ENCRYPTION_KEY=$(openssl rand -hex 32)
MEILI_MASTER_KEY=$(openssl rand -hex 24)
SCREENSHOT_API_KEY=$(openssl rand -hex 24)
EOF
chmod 600 .env

docker compose up -d

That is the whole install. compose.yaml is the setup, the same for everyone, and is shown in full below. .env holds what is yours: the address and the secrets. Keep it private and back it up; upgrading replaces compose.yaml and never touches it.

The images are published on Docker Hub as elrumo/webbites-web, elrumo/webbites-api, elrumo/webbites-parse and elrumo/webbites-screenshot, for both amd64 and arm64.

The compose file

Download it from https://www.webbites.io/self-hosting/compose.yaml or copy it from here. Email, AI, file storage and the rest are set from the admin page, so they are not in it.

compose.yaml
# WebBites, self-hosted, in one file. Guide: https://www.webbites.io/developers/docs/self-hosting
#
# Put this next to a .env holding PUBLIC_URL and the secrets (the guide has a command that writes
# it), then run:  docker compose up -d
#
# Only Caddy publishes ports (80 and 443). Email, AI, file storage and the rest are set from
# /admin -> Settings, so they are not here. Needs Docker Compose 2.23 or newer.

name: webbites

x-defaults: &defaults
  restart: unless-stopped
  logging:
    driver: json-file
    options:
      max-size: "10m"
      max-file: "3"

services:
  caddy:
    image: caddy:2.8-alpine
    <<: *defaults
    ports:
      - "80:80"
      - "443:443"
      - "443:443/udp"
    configs:
      - source: caddyfile
        target: /etc/caddy/Caddyfile
    volumes:
      - caddy_data:/data
      - caddy_config:/config
    depends_on:
      web:
        condition: service_healthy
      api:
        condition: service_healthy
      parse:
        condition: service_healthy

  web:
    image: elrumo/webbites-web:${WEBBITES_VERSION:-latest}
    <<: *defaults
    environment:
      SELF_HOSTED: "true"
      VITE_APP_URL: ${PUBLIC_URL:?set PUBLIC_URL in .env, e.g. https://notes.example.com}
      VITE_BACKEND_URL: ${PUBLIC_URL}/
      VITE_PARSE_URL: ${PUBLIC_URL}/parse
      VITE_PARSE_ID: ${PARSE_APP_ID:?}
      VITE_PARSE_JS_KEY: ${PARSE_JS_KEY:?}
      BACKEND_INTERNAL_URL: http://api:3000/
      PARSE_INTERNAL_URL: http://parse:1337/parse
      PARSE_MASTER_KEY: ${PARSE_MASTER_KEY:?}
      CUSTOM_API_KEY: ${CUSTOM_API_KEY:?}
    depends_on:
      api:
        condition: service_healthy
      parse:
        condition: service_healthy

  api:
    image: elrumo/webbites-api:${WEBBITES_VERSION:-latest}
    <<: *defaults
    environment:
      PORT: "3000"
      NODE_ENV: production
      BILLING_PROVIDER: none
      QUEUE_DRIVER: redis
      SITE_URL: ${PUBLIC_URL}
      VITE_WEBSITE_URL: ${PUBLIC_URL}
      VITE_BACKEND_URL: ${PUBLIC_URL}/
      VITE_PARSE_URL: http://parse:1337/parse
      VITE_PARSE_ID: ${PARSE_APP_ID}
      VITE_PARSE_JS_KEY: ${PARSE_JS_KEY}
      VITE_PARSE_MASTER_KEY: ${PARSE_MASTER_KEY}
      REDIS_URL: redis://redis:6379
      MEILISEARCH_HOST: http://meilisearch:7700
      MEILISEARCH_API_KEY: ${MEILI_MASTER_KEY:?}
      CUSTOM_API_KEY: ${CUSTOM_API_KEY}
      VITE_AUDIO_TOKEN_SECRET: ${AUDIO_TOKEN_SECRET:?}
      SHARE_LINK_SECRET: ${SHARE_LINK_SECRET:?}
      BACKUP_ENCRYPTION_KEY: ${BACKUP_ENCRYPTION_KEY:?}
      SETTINGS_ENCRYPTION_KEY: ${SETTINGS_ENCRYPTION_KEY:?}
      # Delete these two lines along with the screenshot service to run without it.
      SCREENSHOT_SERVICE_URL: http://screenshot:3000
      SCREENSHOT_API_KEY: ${SCREENSHOT_API_KEY:?}
    networks: [default, screenshots]
    depends_on:
      redis:
        condition: service_healthy
      parse:
        condition: service_healthy
      meilisearch:
        condition: service_started
    healthcheck:
      test: ["CMD", "bun", "-e", "fetch('http://127.0.0.1:3000/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"]
      interval: 15s
      timeout: 5s
      start_period: 30s
      retries: 8

  parse:
    image: elrumo/webbites-parse:${WEBBITES_VERSION:-latest}
    <<: *defaults
    environment:
      PORT: "1337"
      PARSE_APP_ID: ${PARSE_APP_ID}
      PARSE_JS_KEY: ${PARSE_JS_KEY}
      PARSE_MASTER_KEY: ${PARSE_MASTER_KEY}
      DATABASE_URI: mongodb://webbites:${MONGO_PASSWORD:?}@mongo:27017/parse?authSource=admin
      PARSE_PUBLIC_URL: ${PUBLIC_URL}/parse
      SITE_URL: ${PUBLIC_URL}
      BACKEND_URL: http://api:3000/
      CUSTOM_API_KEY: ${CUSTOM_API_KEY}
      BILLING_PROVIDER: none
      # The first account becomes the administrator. Set this so only that address can claim it.
      INITIAL_ADMIN_EMAIL: ${INITIAL_ADMIN_EMAIL:-}
      SETTINGS_ENCRYPTION_KEY: ${SETTINGS_ENCRYPTION_KEY}
    depends_on:
      mongo:
        condition: service_healthy

  mongo:
    image: mongo:7
    <<: *defaults
    environment:
      MONGO_INITDB_ROOT_USERNAME: webbites
      MONGO_INITDB_ROOT_PASSWORD: ${MONGO_PASSWORD}
    volumes:
      - mongo_data:/data/db
    healthcheck:
      test: ["CMD", "mongosh", "--quiet", "--eval", "db.adminCommand('ping').ok"]
      interval: 10s
      timeout: 5s
      start_period: 20s
      retries: 10

  redis:
    # Not just a cache: developer API keys and queued jobs live here, hence the append-only file.
    image: redis:7-alpine
    <<: *defaults
    command: ["redis-server", "--appendonly", "yes", "--appendfsync", "everysec", "--save", "60", "1000"]
    volumes:
      - redis_data:/data
    healthcheck:
      test: ["CMD", "redis-cli", "ping"]
      interval: 10s
      timeout: 3s
      retries: 10

  meilisearch:
    image: getmeili/meilisearch:v1.12
    <<: *defaults
    environment:
      MEILI_ENV: production
      MEILI_MASTER_KEY: ${MEILI_MASTER_KEY}
      MEILI_NO_ANALYTICS: "true"
    volumes:
      - meili_data:/meili_data
    healthcheck:
      test: ["CMD-SHELL", "wget -q --spider http://127.0.0.1:7700/health || exit 1"]
      interval: 10s
      timeout: 5s
      start_period: 10s
      retries: 10

  # Optional, about 1 GB of RAM: screenshots pages and renders JavaScript-heavy sites. It sits on its
  # own network, shared with the API only, so a hostile page can't reach Mongo, Redis or Parse.
  screenshot:
    image: elrumo/webbites-screenshot:${WEBBITES_VERSION:-latest}
    <<: *defaults
    environment:
      SCREENSHOT_API_KEY: ${SCREENSHOT_API_KEY}
      MAX_CONCURRENCY: "2"
    networks: [screenshots]
    shm_size: 1gb

configs:
  caddyfile:
    # Behind another proxy (Cloudflare, a load balancer)? Trust it, or rate limits see its address
    # instead of the client's. Add this above the site block, with the proxy's address range:
    #   { servers { trusted_proxies static 203.0.113.0/24 } }
    content: |
      ${PUBLIC_URL} {
        encode zstd gzip

        # Uploads (PDF, audio, imports) go through here.
        request_body {
          max_size 600MB
        }

        header {
          X-Content-Type-Options nosniff
          Referrer-Policy strict-origin-when-cross-origin
          -Server
        }

        # The MCP sign-in consent page lives in the web app at the API's starting path;
        # only the API's request carries a client_id.
        @oauth_start {
          path /oauth/authorize
          query client_id=*
        }
        handle @oauth_start {
          reverse_proxy api:3000
        }

        @api {
          path /v1/* /mcp /mcp/* /oauth/* /.well-known/oauth-* /extension-auth /verify-extension-token
          path /deleteSession /isPageSaved /saveUserImage /saveUserPdf /saveUserAudio /batchDelete
          path /removeDuplicates /validateImportAccess /raycast /raycast-user /health /_docs/*
        }
        handle @api {
          reverse_proxy api:3000 {
            transport http {
              response_header_timeout 120s
            }
          }
        }

        handle /parse* {
          reverse_proxy parse:1337
        }

        handle {
          reverse_proxy web:3000
        }
      }

networks:
  default: {}
  screenshots: {}

volumes:
  caddy_data:
  caddy_config:
  mongo_data:
  redis_data:
  meili_data:

From a clone

Terminal
git clone https://github.com/elrumo/webbites_public.git
cd webbites_public/deploy
./install.sh            # or: ./install.sh --domain bookmarks.example.com --email you@example.com --yes
docker compose pull
docker compose up -d

install.sh asks the same questions as the one-line installer, takes the same options, and never overwrites an existing .env. To upgrade, git pull, then docker compose pull and docker compose up -d in deploy/.

Then

Open the address it prints and create your account straight away: the first account becomes the administrator. See Claim the install, then configuration, backups and upgrades.