Skip to content

feat(install): one-command install with Docker Swarm and Traefik (IP by default, HTTPS with a domain), and Docker-first docs (#226) - #241

Merged
alexevladgabriel merged 5 commits into
feat/docs-landing-stylefrom
feat/docker-swarm-installer
Nov 15, 2026
Merged

alexevladgabriel merged 5 commits into
feat/docs-landing-stylefrom
feat/docker-swarm-installer

Conversation

@alexevladgabriel

@alexevladgabriel alexevladgabriel commented Nov 15, 2026 •

Copy link
Copy Markdown
Member

Stacked on #240 (it builds on its Hub look and its AI guide): review and merge #240 first, then this PR's base becomes feat/fumadocs-next.

Why

Installing the Panel by hand (PHP, a web server, certificates, the queue worker, cron) is where most new installs get stuck. The goal Scai set is the Coolify/Dokploy experience: one command on a fresh server gets you a working Panel with HTTPS. Afterwards you can change it in one place, and an AI assistant can drive it through plain options. #226 already makes Docker the recommended install on the old Docusaurus site. This PR brings that structure to the Fumadocs site and adds the script that makes Docker the easy path.

What changes

1. pelican.dev/install.sh (public/install.sh)

curl -fsSL https://pelican.dev/install.sh | sudo bash                                   # the Panel on http://<server IP>
curl -fsSL https://pelican.dev/install.sh | sudo bash -s -- --domain panel.example.com --email you@example.com --profile production
curl -fsSL https://pelican.dev/install.sh | sudo PELICAN_DOMAIN=panel.example.com PELICAN_EMAIL=you@example.com bash
curl -fsSL https://pelican.dev/install.sh | sudo bash -s -- --interactive                # asks, with explanations
  • The Coolify/Dokploy model: it asks nothing. Anything not passed takes its default: the server's IP, the quick profile, no Wings. Every option is also a PELICAN_* environment variable (the option wins when both are set), which suits cloud-init and provisioning tools. --interactive (or PELICAN_INTERACTIVE=1) asks for each choice with explanations, and needs a terminal. A domain without an email, or Wings without its own domain next to a Panel domain, stops with an error naming both the option and the variable. --yes is still accepted but does nothing.

  • No domain needed (the default): the Panel is served on http://<the server's external IPv4>. The script finds that address itself (--ip to choose another, e.g. behind NAT), and the summary explains that this is plain HTTP and how to add a domain. Adding one later means running the script again with --domain/--email (keys, passwords and data are kept), or setting PANEL_DOMAIN + LE_EMAIL in pelican.env and running deploy.sh. The Panel then switches to HTTPS, and plain-HTTP visits to the old IP are redirected (302) to the domain, path and query kept.

  • Checks the server before touching anything: root; Linux on x86_64/arm64; a virtualization Docker works on (openvz/lxc stop it); ports 80/443 free (or already this stack's Traefik); DNS pointing at the server.

  • Installs Docker with Docker's script if it's missing, and starts a one-node Swarm.

  • Deploys the pelican stack from /opt/pelican:

    • Traefik v3 on 80/443 in host mode (real client IPs). Its routes are in traefik/pelican.yml, which deploy.sh writes from pelican.env. Without a domain: the Panel on port 80 at any address. With a domain: HTTPS with a Let's Encrypt HTTP-01 certificate on the first request (renewed by Traefik), and HTTP redirected to HTTPS. Traefik doesn't need the Docker socket.
    • The Panel with APP_URL following the mode (https://<domain> or http://<IP>), BEHIND_PROXY=true, and TRUSTED_PROXIES set to the overlay network it shares with Traefik (10.203.250.0/24).
  • Profiles: quick (SQLite) or production (MariaDB 11.4 + Redis 7 on an internal overlay network, passwords generated).

  • --wings: installs Wings the way the Wings docs do (binary and systemd unit, enabled, started once configured). Without a domain, Wings is on http://<IP>:8080, and ufw opens 8080 and 2022. With a Panel domain, Wings needs its own: Traefik routes it to the host's docker_gwbridge address on port 8080, so Wings gets HTTPS with no certbot.

  • Changing it afterwards: settings live in pelican.env (0600), stack.yml reads every value from it, and deploy.sh applies them; running deploy.sh again also updates the Panel. A second run of the installer keeps APP_KEY and the passwords, and refuses to switch profiles over existing data.

  • For automation and LLMs: every answer is an option or a variable, nothing is required, and errors name the missing option. --dry-run shows the plan and writes the files without root or any change to the server.

  • Network decisions found while building it:

    • docker_gwbridge is created on 10.204.0.0/24 before swarm init. Otherwise Docker gives it 172.18.0.0/16, which is Wings' pelican_nw (the "Pool overlaps" error in Troubleshooting).
    • Swarm uses 10.203.0.0/16, not 10.0.0.0/x, which cloud private networks use.
    • All three ranges can be overridden.
  • Found by running it:

    • Traefik's readTimeout is raised to 600s; v3 defaults to 60s, which breaks large uploads.
    • Traefik is pinned to an exact version, v3.7.19 (the latest v3 release; Dokploy pins v3.6.25). Running the script again moves an install to the version it pins; PELICAN_TRAEFIK_IMAGE chooses another.
    • Every service is pinned to this node, so the local volumes stay next to their service.
    • Before its final check, the script waits for Swarm to finish rolling out the services. A changed setting replaces the Panel's container, and the check used to reach the old one, so it reported success too early.
    • The swarm join token never reaches the output or the root-only log.
    • Let's Encrypt refuses example.com contact addresses, so those are rejected up front. (Seen on the first VM run.)
  • Registered as a root file in router/paths.mjs, so check-paths, pack-docs and the router serve it; the README tables are updated.

2. Docker first, as in #226

  • guides/docker becomes the top-level Getting Started (requirements, the virtualization check, Docker, swap). It now opens with the one command.
  • panel/advanced/docker becomes panel/install: first the install script (profiles, options, files, changing settings, updating, Wings on the same server, troubleshooting, backups and removal), then Docker Compose by hand, with Make Docker the recommended Panel install #226's pelican-plugins volume and its note on the old ghcr.io/pelican-dev/panel path.
  • The install without Docker moves to panel/standalone/* ("Standalone Install").
  • Redirects for the six old paths, in netlify.toml. pack-docs builds the Hub's redirects.json from it, and I checked that all six are in the packed output.
  • Inbound links, the sidebar (meta.json), the OG motifs and ui/nav.json ("Get started" and "Install guide" now go to Getting Started) are updated. The interim landing pages (/, /faq) are untouched; the redirects catch their old links.

3. The AI guide drives the script

The recommended prompt in guides/ai-assistant now has the assistant:

  • ask the questions that pick the options (OS and virtualization, domain and DNS, a real email, quick vs production with a recommendation, Wings);
  • write the exact command, and run --dry-run first;
  • walk through the real run;
  • finish on a production checklist (the certificate, backing up pelican.env, firewall, Wings).

The old prompt becomes the "Standalone install" tab, and the prompt URLs follow the new paths.

Screenshots

Light Dark
Installing the Panel, top (1440) docs-panel-install-1440 docs-panel-install-1440-dark
Installing the Panel, top (390) docs-panel-install-390 docs-panel-install-390-dark
Getting Started (1440) docs-getting-started-1440 docs-getting-started-1440-dark

Verification

  • bun test: 138 pass, 0 fail. scripts/install-sh.test.mjs adds 23 tests, and lib/og-motifs.test.mjs adds 34: each share-image motif must quote text that is on its page, which stops a motif from being dropped quietly. They run the real script in --dry-run, parse the generated stack.yml with yaml, and run deploy.sh against a stub docker. They also run shellcheck on install.sh and the deploy.sh it writes. One of them caught a real bug: ${SWARM_NODE_ID} inside a [...] YAML flow list. Docker reads the YAML before filling in variables, so a real deploy would have failed.
  • bun run typecheck passes. bun run build passes: check-content 36 pages, and check-paths: ok with out/install.sh byte-identical to public/install.sh.
  • Piped, with variables (the real curl | sudo … shape): cat install.sh | sudo PELICAN_DOMAIN=panel.pelican.test PELICAN_EMAIL=… PELICAN_STAGING=1 PELICAN_SKIP_DNS_CHECK=1 bash re-ran an install with no questions (stdin not a terminal). It kept the keys and moved Traefik from traefik:v3 to traefik:v3.7.19, which its log confirms. Afterwards HTTPS answers 200, and the IP redirects to the domain.
  • --interactive through a pseudo-terminal: answering an empty domain, production and y gave the Panel on the IP, the production profile and Wings on :8080.
  • Macroscope's review, fixed in 5dde764 and checked in the VM:
    • A running /usr/local/bin/wings makes the old download fail (curl exit 23, "text file busy"), and the installer now replaces the binary anyway.
    • A --staging run, then a run without it, moves caServer and the certificate store (acme-…staging….json → acme.json) to production.
    • Unit tests cover the saved PUBLIC_SUBNET, a custom CA being kept, and dry runs with an example.com email.
  • No domain, then a domain, then back (same VM):
    • A fresh install.sh --ip 192.168.5.4: exit 0. /installer answers 200 on http://192.168.5.4, also with any other Host header. APP_URL is http://192.168.5.4, and all 31 asset URLs on the page use it. Traefik's only mounts are letsencrypt and /opt/pelican/traefik; no Docker socket. detect_ip found the public address the VM is seen from.
    • Running it again with --domain panel.pelican.test --email … --wings --wings-domain node.pelican.test --staging: right after exit, https://…/installer answers 200 and APP_URL is https://panel.pelican.test. http://panel.pelican.test/ redirects 301 to HTTPS; http://192.168.5.4/installer?x=1 redirects 302 to https://panel.pelican.test/installer?x=1; Wings' domain reaches the stand-in on 8080.
    • Clearing the domain in pelican.env and re-running switches back to http://192.168.5.4, answering 200 right after exit.
  • End to end in a Linux VM (the first round, with a domain). Colima, Ubuntu 24.04 arm64, systemd, Docker 29.5.2: the release that broke older Traefik versions' Docker API client, so this also covers traefik:v3. The run used the real script as root: --profile production --wings --wings-domain node.pelican.test --staging --skip-dns-check, with the test domains in /etc/hosts.
    • Exit 0. pelican_traefik, pelican_panel, pelican_database and pelican_cache all at 1/1.
    • Subnets: docker_gwbridge 10.204.0.0/24, ingress 10.203.0.0/24, pelican_public 10.203.250.0/24, pelican_internal 10.203.1.0/24. Wings' 172.18.0.0/16 stays free.
    • http://panel.pelican.test/ returns 301 to https; https://…/installer returns 200 through Traefik, and the page's assets load as https:// (proxy trust works).
    • Wings route: a stand-in HTTP server on the host's port 8080 answered https://node.pelican.test/ through Traefik, reached from Traefik's docker_gwbridge address 10.204.0.3.
    • wings v1.0.0-rc.2 is installed and wings.service is enabled. pelican.env is 600, stack.yml 644, deploy.sh 700.
    • Second run: keeps APP_KEY and both passwords (same hashes); recognises its own Traefik on 80/443; updates the four services in place. The new log is 600 with no join token.
  • pack-docs hands the Hub all 6 new redirects and install.sh as a root file.

Not checked

  • A real Let's Encrypt certificate: the VM's test domains aren't public, so Traefik served its default certificate after ACME refused them. Scai will run the script on a VPS before merge: first with no options (the IP), then with --domain/--email.
  • A Panel set up over plain HTTP, then moved to HTTPS: not tried. That means running the web installer and logging in on http://<IP> first, and checking sessions and passkeys after the switch.
  • IPv6: --ip and the address detection are IPv4 only.
  • Wings with a real node configuration from the Panel. Only the Traefik → host:8080 route was tested, with a stand-in. Also unchecked: the Panel's node form fields ("Behind Proxy", the 443/8080 ports) and whether the generated config.yml has api.ssl.enabled: false.
  • The quick profile live: it's covered only by the unit tests; the VM ran production, which includes everything quick runs.
  • Other systems: Debian, RHEL-family and x86_64 servers; IPv6-only servers; firewalld (only ufw rules are added); an existing multi-node swarm.
  • Moving an existing Compose or standalone install to the script: not supported yet, and the docs don't claim it.
  • The Hub: pelican/hub's DocsBuildService::ROOT_FILES needs install.sh before pelican.dev/install.sh is served from Forge. Not changed here.
  • Old .md addresses: they have no redirects (only the HTML paths do).

Note

Add one-command Pelican installer with Docker Swarm, Traefik, and Docker-first docs

  • Adds public/install.sh, an interactive installer that installs Docker, initializes a single-node Swarm, and deploys the Panel behind Traefik. It serves over the server IP by default and switches to HTTPS with Let's Encrypt when a domain and email are supplied.
  • Supports quick and production profiles (production adds database and cache services), optional Wings installation with a systemd service, UFW firewall rules, dry-run mode, saved settings for repeat runs, and configuration via CLI flags or PELICAN_* environment variables.
  • Adds a full test suite in scripts/install-sh.test.mjs covering options, generated files, Traefik routing, staging certificates, and repeat-run behavior.
  • Reworks the docs: new Getting Started and Panel install pages, standalone install pages moved under panel/standalone, the Docker guide removed, and legacy paths redirected in netlify.toml. Serves install.sh at the site root via router/paths.mjs.
  • Behavioral Change: installer enables Wings' systemd service without starting it, and a running Wings service may need a manual restart after installation. Documentation links and share-image motifs now point to the new page paths.

Macroscope summarized 5dde764.

… Traefik and automatic HTTPS

One command on a fresh server, in the spirit of Coolify and Dokploy:

  curl -fsSL https://pelican.dev/install.sh | sudo bash

It checks the server (Linux, x86_64/arm64, virtualization, ports 80/443, DNS),
installs Docker if missing, starts a one-node Swarm and deploys the "pelican"
stack from /opt/pelican: Traefik on 80/443 (HTTP to HTTPS, Let's Encrypt on the
first request, renewals on its own) and the Panel behind it (BEHIND_PROXY,
TRUSTED_PROXIES set to the network it shares with Traefik). Profiles: quick
(SQLite) or production (MariaDB 11.4 and Redis 7, passwords generated). With
--wings it installs Wings as the docs do and routes its domain through Traefik.

- Guided: asks for what's missing; with --yes every answer is an option, so
  automation and AI assistants can drive it. --dry-run shows the plan and
  writes the files without root and without touching the server.
- Configurable afterwards: settings in pelican.env (0600), stack.yml reads
  them, deploy.sh applies them (and updates the Panel). A second run keeps
  APP_KEY and passwords and refuses to switch profiles over existing data.
- Networks clear of Wings: docker_gwbridge is created on 10.204.0.0/24 before
  "swarm init" (it would take Wings' 172.18.0.0/16), and Swarm uses
  10.203.0.0/16 rather than 10.0.0.0/x, which cloud private networks use.
- Traefik in host-mode ports (real client IPs), readTimeout 600s for uploads,
  every service pinned to this node (local volumes).
- Safe output: the swarm join token is never printed; the log is root-only;
  Let's Encrypt's forbidden example.com contacts are refused up front.

Served as a root file (router/paths.mjs ROOT_FILES; the Hub's
DocsBuildService::ROOT_FILES needs it too). Tested in
scripts/install-sh.test.mjs (dry runs, generated stack parsed as YAML,
deploy.sh with a stub docker, shellcheck) and end to end in an Ubuntu 24.04 VM.
Ports #226 (Lance) to the Fumadocs site:
- guides/docker becomes the top-level Getting Started (requirements, the
  virtualization check, Docker, swap), now opening with the one-command install.
- panel/advanced/docker becomes panel/install, the recommended install: the
  install script (profiles, options, files, changing settings, updating, Wings on
  the same server, troubleshooting, backups) and then Docker Compose by hand,
  with #226's plugins volume and the note on the old ghcr.io/pelican-dev path.
- The install without Docker moves to panel/standalone/*.
- Redirects for the six old paths (netlify.toml, which the Hub's redirects.json
  is built from), inbound links, the sidebar, the OG motifs, ui/nav.json.
- The AI guide's recommended prompt now drives the install script (asks the
  questions, writes the command, dry run first); the old prompt becomes the
  "Standalone install" tab.
@coderabbitai

coderabbitai Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6e2de516-e892-4e19-98cb-5d54af9eba4b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Comment thread content/docs/panel/install.mdx Resolved
Comment thread content/docs/panel/install.mdx Resolved
Comment thread lib/og-motifs.ts Resolved
Comment thread public/install.sh Resolved
…, no domain needed

Without --domain (or an empty answer), the Panel is served on
http://<external IPv4> (found automatically, or --ip), with the quick profile
and no other questions under --yes. A domain is still the way to HTTPS: give it
at install, or later by running the script again with --domain/--email (keys,
passwords and data kept) or setting PANEL_DOMAIN and LE_EMAIL and running
deploy.sh. After the switch, plain HTTP to the old IP lands on the domain.

- Traefik's routes now live in traefik/pelican.yml, written by deploy.sh from
  pelican.env (IP: the Panel on port 80 at any address; domain: HTTPS with
  Let's Encrypt, HTTP to HTTPS, Wings' domain). The Panel's APP_URL follows
  (PANEL_URL). Traefik no longer needs the Docker socket.
- Wings without a domain is reached on http://<IP>:8080 (ufw opens it); with a
  panel domain it needs its own, as before.
- The install waits for Swarm to finish rolling the services out before
  checking the Panel: a changed setting replaces the Panel, and the check used
  to reach the old one.
- Traefik's healthcheck runs every 10s, so it counts as 1/1 sooner.

Verified in the Ubuntu 24.04 VM: a fresh install with no domain, then adding a
domain (and Wings on one), then back, checking the new Panel right after each.
@alexevladgabriel alexevladgabriel changed the title feat(install): one-command install with Docker Swarm and Traefik, and Docker-first docs (#226) feat(install): one-command install with Docker Swarm and Traefik (IP by default, HTTPS with a domain), and Docker-first docs (#226) Nov 15, 2026
Comment thread public/install.sh Resolved
…Traefik

The model Coolify and Dokploy use: the installer runs straight through and
anything not given takes its default.

- No questions unless --interactive (or PELICAN_INTERACTIVE=1), which asks for
  each choice with explanations and needs a terminal. With no options it
  installs the Panel on the server's IP, quick profile, no Wings. A domain
  without an email, or Wings without its domain next to a Panel domain, stops
  with the option and the variable to set. --yes is still accepted, unused.
- Every option can be an environment variable (PELICAN_DOMAIN, PELICAN_EMAIL,
  PELICAN_PROFILE, PELICAN_WINGS, PELICAN_WINGS_DOMAIN, PELICAN_IP, PELICAN_DIR,
  PELICAN_IMAGE, PELICAN_STAGING, PELICAN_SKIP_DNS_CHECK, PELICAN_DRY_RUN,
  PELICAN_INTERACTIVE); the option wins. With sudo they go after it:
  curl ... | sudo PELICAN_DOMAIN=panel.example.com PELICAN_EMAIL=... bash
- Traefik pinned to v3.7.19 (was the moving v3 tag). Running the script again
  moves an install to the version it pins; PELICAN_TRAEFIK_IMAGE for another.

Docs and the AI prompt drop --yes and list the variables. Verified in the VM:
the script piped into sudo with variables re-ran an install with no questions
and moved Traefik to 3.7.19; --interactive answered through a pseudo-terminal.
…et, dry runs, share image

- Running again without --staging now moves a staging install to Let's Encrypt
  production (it kept the saved staging server). A CA set by hand is kept. Each
  CA gets its own certificate store (deploy.sh names it from LE_CA_SERVER), so
  staging certificates and the staging account don't carry over.
- Re-running with Wings running no longer fails: the binary is downloaded to
  wings.new and renamed over the running one (writing to it gave "text file
  busy", curl exit 23, before the stack was deployed).
- A second run keeps the PUBLIC_SUBNET saved in pelican.env (it reset it to
  10.203.250.0/24, moving TRUSTED_PROXIES and the network) unless
  PELICAN_PUBLIC_SUBNET asks for another.
- A dry run warns about example.com emails instead of stopping, so the docs'
  dry-run example works; a real run still refuses them.
- The panel/install share image quotes lines that are on the page (it was
  dropped). New lib/og-motifs.test.mjs checks every motif against its page.

Verified in the VM: a running /usr/local/bin/wings blocks the old download
(curl exit 23) and not the new one; staging, then a run without --staging,
switches caServer and the store to production.
@alexevladgabriel
alexevladgabriel marked this pull request as ready for review November 15, 2026 19:40
@alexevladgabriel
alexevladgabriel merged commit 16e3bfd into feat/docs-landing-style Nov 15, 2026
3 checks passed
@alexevladgabriel
alexevladgabriel deleted the feat/docker-swarm-installer branch November 15, 2026 19:40
alexevladgabriel added a commit that referenced this pull request Nov 15, 2026
…th an AI assistant (#240)

* feat(docs): style the docs like the Hub's redesigned pages

The docs shared the header idea and tokens with the Hub's pages but still
drew hard offset shadows, rounded Fumadocs chrome and white code, so they
read as another site. They now use the Hub's pieces: square corners, 3px
edges on cards and controls, 2px rules, no offset shadows, navy code in both
themes, sky only as an accent.

- Top bar: the Hub nav's buttons, theme switch and search input; navy ground
  and a slate line in the dark theme.
- Sidebar and TOC: the Hub's app sidebar (light sky current item, sky edge)
  and the plugin page's section links.
- Page: the plugin page's kicker and title; the Hub's prose links, inline
  code chips, square lists, Markdown tables (3px edge, sky head).
- Code blocks: the egg page's navy install script, with Shiki's dark colours.
- Callouts: the Hub's alerts (3px edge, 8px tone edge). Tabs: the plugin
  page's tabs. "Your setup": a Hub card with its form fields.
- Page footer, search dialog: square, edged, no shadows. Mermaid: classic
  look in the site's colours.
- ui/tokens.css: the Hub's page roles as --pl-* tokens (additive).

Everything is scoped to .dt-root (or :root:has(.dt-root) for the search
dialog), so the interim landing pages are pixel-identical.

* feat(docs): copy pages for AI assistants, and a guide to installing with one

Every docs page gets three actions under its title:
- Copy page: the page as Markdown (/docs/md/<page>.md). When the reader has
  filled in "Your setup", a "My setup: ..." line goes on top, so an assistant
  answers for their install; the page text itself is not changed.
- Copy all docs: /llms-full.txt, every page in one file (~60k tokens).
- Open: Fumadocs' menu (GitHub, Markdown, ChatGPT, Claude, Cursor, Scira).

New page guides/ai-assistant ("Installing with an AI Assistant"): how to give
an assistant the docs (the buttons, llms.txt, llms-full.txt, <page>.md), a
prompt for a production Panel install (asks for OS, domain, web server,
database and Wings first, one step at a time, no secrets in chat, and ends on
a checklist: HTTPS with renewal, firewall ports, queue worker and cron,
permissions, APP_KEY kept off the server, backups and updates), prompts for
Wings, troubleshooting and updating, and rules for agents with shell access.
Linked from Getting Started.

Code blocks: a `wrap` flag (lib/shiki-setup.ts) wraps long lines, used by the
prompts; empty lines in plain-text blocks keep their height (they collapsed).

* fix(docs): show wrapped prompts in full, without the code block's 600px cap

* feat(install): one-command install with Docker Swarm and Traefik (IP by default, HTTPS with a domain), and Docker-first docs (#226) (#241)

* feat(install): pelican.dev/install.sh, the Panel on Docker Swarm with Traefik and automatic HTTPS

One command on a fresh server, in the spirit of Coolify and Dokploy:

  curl -fsSL https://pelican.dev/install.sh | sudo bash

It checks the server (Linux, x86_64/arm64, virtualization, ports 80/443, DNS),
installs Docker if missing, starts a one-node Swarm and deploys the "pelican"
stack from /opt/pelican: Traefik on 80/443 (HTTP to HTTPS, Let's Encrypt on the
first request, renewals on its own) and the Panel behind it (BEHIND_PROXY,
TRUSTED_PROXIES set to the network it shares with Traefik). Profiles: quick
(SQLite) or production (MariaDB 11.4 and Redis 7, passwords generated). With
--wings it installs Wings as the docs do and routes its domain through Traefik.

- Guided: asks for what's missing; with --yes every answer is an option, so
  automation and AI assistants can drive it. --dry-run shows the plan and
  writes the files without root and without touching the server.
- Configurable afterwards: settings in pelican.env (0600), stack.yml reads
  them, deploy.sh applies them (and updates the Panel). A second run keeps
  APP_KEY and passwords and refuses to switch profiles over existing data.
- Networks clear of Wings: docker_gwbridge is created on 10.204.0.0/24 before
  "swarm init" (it would take Wings' 172.18.0.0/16), and Swarm uses
  10.203.0.0/16 rather than 10.0.0.0/x, which cloud private networks use.
- Traefik in host-mode ports (real client IPs), readTimeout 600s for uploads,
  every service pinned to this node (local volumes).
- Safe output: the swarm join token is never printed; the log is root-only;
  Let's Encrypt's forbidden example.com contacts are refused up front.

Served as a root file (router/paths.mjs ROOT_FILES; the Hub's
DocsBuildService::ROOT_FILES needs it too). Tested in
scripts/install-sh.test.mjs (dry runs, generated stack parsed as YAML,
deploy.sh with a stub docker, shellcheck) and end to end in an Ubuntu 24.04 VM.

* docs: Docker first, as in #226, with the install script

Ports #226 (Lance) to the Fumadocs site:
- guides/docker becomes the top-level Getting Started (requirements, the
  virtualization check, Docker, swap), now opening with the one-command install.
- panel/advanced/docker becomes panel/install, the recommended install: the
  install script (profiles, options, files, changing settings, updating, Wings on
  the same server, troubleshooting, backups) and then Docker Compose by hand,
  with #226's plugins volume and the note on the old ghcr.io/pelican-dev path.
- The install without Docker moves to panel/standalone/*.
- Redirects for the six old paths (netlify.toml, which the Hub's redirects.json
  is built from), inbound links, the sidebar, the OG motifs, ui/nav.json.
- The AI guide's recommended prompt now drives the install script (asks the
  questions, writes the command, dry run first); the old prompt becomes the
  "Standalone install" tab.

* feat(install): serve the Panel on the server's external IP by default, no domain needed

Without --domain (or an empty answer), the Panel is served on
http://<external IPv4> (found automatically, or --ip), with the quick profile
and no other questions under --yes. A domain is still the way to HTTPS: give it
at install, or later by running the script again with --domain/--email (keys,
passwords and data kept) or setting PANEL_DOMAIN and LE_EMAIL and running
deploy.sh. After the switch, plain HTTP to the old IP lands on the domain.

- Traefik's routes now live in traefik/pelican.yml, written by deploy.sh from
  pelican.env (IP: the Panel on port 80 at any address; domain: HTTPS with
  Let's Encrypt, HTTP to HTTPS, Wings' domain). The Panel's APP_URL follows
  (PANEL_URL). Traefik no longer needs the Docker socket.
- Wings without a domain is reached on http://<IP>:8080 (ufw opens it); with a
  panel domain it needs its own, as before.
- The install waits for Swarm to finish rolling the services out before
  checking the Panel: a changed setting replaces the Panel, and the check used
  to reach the old one.
- Traefik's healthcheck runs every 10s, so it counts as 1/1 sooner.

Verified in the Ubuntu 24.04 VM: a fresh install with no domain, then adding a
domain (and Wings on one), then back, checking the new Panel right after each.

* feat(install): ask nothing by default, take PELICAN_* variables, pin Traefik

The model Coolify and Dokploy use: the installer runs straight through and
anything not given takes its default.

- No questions unless --interactive (or PELICAN_INTERACTIVE=1), which asks for
  each choice with explanations and needs a terminal. With no options it
  installs the Panel on the server's IP, quick profile, no Wings. A domain
  without an email, or Wings without its domain next to a Panel domain, stops
  with the option and the variable to set. --yes is still accepted, unused.
- Every option can be an environment variable (PELICAN_DOMAIN, PELICAN_EMAIL,
  PELICAN_PROFILE, PELICAN_WINGS, PELICAN_WINGS_DOMAIN, PELICAN_IP, PELICAN_DIR,
  PELICAN_IMAGE, PELICAN_STAGING, PELICAN_SKIP_DNS_CHECK, PELICAN_DRY_RUN,
  PELICAN_INTERACTIVE); the option wins. With sudo they go after it:
  curl ... | sudo PELICAN_DOMAIN=panel.example.com PELICAN_EMAIL=... bash
- Traefik pinned to v3.7.19 (was the moving v3 tag). Running the script again
  moves an install to the version it pins; PELICAN_TRAEFIK_IMAGE for another.

Docs and the AI prompt drop --yes and list the variables. Verified in the VM:
the script piped into sudo with variables re-ran an install with no questions
and moved Traefik to 3.7.19; --interactive answered through a pseudo-terminal.

* fix(install): Macroscope's review: staging, Wings re-runs, saved subnet, dry runs, share image

- Running again without --staging now moves a staging install to Let's Encrypt
  production (it kept the saved staging server). A CA set by hand is kept. Each
  CA gets its own certificate store (deploy.sh names it from LE_CA_SERVER), so
  staging certificates and the staging account don't carry over.
- Re-running with Wings running no longer fails: the binary is downloaded to
  wings.new and renamed over the running one (writing to it gave "text file
  busy", curl exit 23, before the stack was deployed).
- A second run keeps the PUBLIC_SUBNET saved in pelican.env (it reset it to
  10.203.250.0/24, moving TRUSTED_PROXIES and the network) unless
  PELICAN_PUBLIC_SUBNET asks for another.
- A dry run warns about example.com emails instead of stopping, so the docs'
  dry-run example works; a real run still refuses them.
- The panel/install share image quotes lines that are on the page (it was
  dropped). New lib/og-motifs.test.mjs checks every motif against its page.

Verified in the VM: a running /usr/local/bin/wings blocks the old download
(curl exit 23) and not the new one; staging, then a run without --staging,
switches caServer and the store to production.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant