Keep first-run setup browser-first

This commit is contained in:
Nick Sweeting 2026-08-19 03:02:45 -07:00
parent f2ce574a1c
commit 83185154c8
No known key found for this signature in database
10 changed files with 18 additions and 14 deletions

View File

@ -189,7 +189,7 @@ docker compose pull
<li>Start the server, which initializes a new collection automatically.
<pre lang="bash"><code style="white-space: pre-line">docker compose up -d --wait
</code></pre></li>
<li>Open <a href="http://admin.archivebox.localhost:8000">http://admin.archivebox.localhost:8000</a> and follow the setup wizard to create the first admin and configure web access.
<li>Open <a href="http://admin.archivebox.localhost:8000/admin/">http://admin.archivebox.localhost:8000/admin/</a> to create the first admin. If <code>BASE_URL</code> is not configured yet, continue through the web setup wizard.
<pre lang="bash"><code style="white-space: pre-line">
# run CLI commands inside the server container started above
docker compose exec archivebox archivebox add 'https://example.com'
@ -214,7 +214,7 @@ docker run --rm -v $PWD:/data -it archivebox/archivebox:dev init
docker run --rm -v $PWD:/data -it archivebox/archivebox:dev install
</code></pre>
</li>
<li>Optional: Start the server then log in to the Admin UI at <a href="http://admin.archivebox.localhost:8000">http://admin.archivebox.localhost:8000</a>.
<li>Optional: Start the server, then open <a href="http://admin.archivebox.localhost:8000/admin/">http://admin.archivebox.localhost:8000/admin/</a> to create the first admin. If <code>BASE_URL</code> is not configured yet, continue through the web setup wizard.
<pre lang="bash"><code style="white-space: pre-line">docker run -v $PWD:/data -p 8000:8000 archivebox/archivebox:dev
# completely optional, CLI can always be used without running a server
# docker run -v $PWD:/data -it archivebox/archivebox:dev [subcommand] [--help]
@ -270,7 +270,7 @@ archivebox init # initialize a new collection
archivebox install # install all the runtime dependencies (e.g. chrome, single-file, yt-dlp, etc.)
</code></pre>
</li>
<li>Optionally start the server, then open the Admin UI at <a href="http://admin.archivebox.localhost:8000">http://admin.archivebox.localhost:8000</a> and follow the same setup wizard used by Docker installs.
<li>Optionally start the server, then open <a href="http://admin.archivebox.localhost:8000/admin/">http://admin.archivebox.localhost:8000/admin/</a> to create the first admin. If <code>BASE_URL</code> is not configured yet, continue through the same web setup wizard used by Docker installs.
<pre lang="bash"><code style="white-space: pre-line">archivebox server 0.0.0.0:8000
# completely optional, CLI can always be used without running a server
# archivebox [subcommand] [--help]
@ -306,7 +306,7 @@ archivebox add 'https://example.com'
</code></pre>
<br/>
</li>
<li>Optionally start the server, then open the Admin UI at <a href="http://admin.archivebox.localhost:8000">http://admin.archivebox.localhost:8000</a> and follow the same setup wizard used by Docker installs.
<li>Optionally start the server, then open <a href="http://admin.archivebox.localhost:8000/admin/">http://admin.archivebox.localhost:8000/admin/</a> to create the first admin. If <code>BASE_URL</code> is not configured yet, continue through the same web setup wizard used by Docker installs.
<pre lang="bash"><code style="white-space: pre-line">archivebox server 0.0.0.0:8000
# completely optional, CLI can always be used without running a server
# archivebox [subcommand] [--help]
@ -339,7 +339,7 @@ archivebox init
archivebox install
</code></pre>
</li>
<li>Optionally start the server, then open the Admin UI at <a href="http://admin.archivebox.localhost:8000">http://admin.archivebox.localhost:8000</a> and follow the same setup wizard used by Docker installs.
<li>Optionally start the server, then open <a href="http://admin.archivebox.localhost:8000/admin/">http://admin.archivebox.localhost:8000/admin/</a> to create the first admin. If <code>BASE_URL</code> is not configured yet, continue through the same web setup wizard used by Docker installs.
<pre lang="bash"><code style="white-space: pre-line">archivebox server 0.0.0.0:8000
# completely optional, CLI can always be used without running a server
# archivebox [subcommand] [--help]

View File

@ -97,6 +97,7 @@
</form>
{% endif %}
{% if not first_admin_setup %}
<center>
<br/><br/>
<hr/>
@ -117,6 +118,7 @@ archivebox manage changepassword &lt;username&gt;
</pre>
<br/>
</center>
{% endif %}
</div>

View File

@ -166,6 +166,10 @@ async function main() {
await page.goto(config.loginUrl, {waitUntil: "networkidle2", timeout: 15000});
const firstAdminForm = await page.$("#first-admin-form");
if (!firstAdminForm) throw new Error("First admin setup form was not shown");
const firstAdminText = await page.$eval("body", (element) => element.innerText);
if (firstAdminText.includes("archivebox manage createsuperuser")) {
throw new Error("First admin setup showed the alternate CLI account flow");
}
await page.type('input[name="username"]', config.username);
await page.type('input[name="password1"]', config.password);
await page.type('input[name="password2"]', config.password);

View File

@ -202,7 +202,7 @@ docker run --rm -it -v "$PWD:/data" archivebox/archivebox:dev init
docker run -d --name archivebox -v "$PWD:/data" -p 8000:8000 archivebox/archivebox:dev
```
Then open <http://admin.archivebox.localhost:8000> and follow the setup wizard.
Then open <http://admin.archivebox.localhost:8000/admin/> to create the first admin. If `BASE_URL` is not configured yet, continue through the web setup wizard.
*(You can create a collection in any directory you want, `~/archivebox/data` is just used as an example here)*

View File

@ -76,7 +76,7 @@ If you're on macOS or Ubuntu, there is an optional auto-setup script provided.
curl -fsSL 'https://get.archivebox.io' | bash
# shortcut to run https://raw.githubusercontent.com/ArchiveBox/ArchiveBox/dev/bin/setup.sh
```
The script uses Docker Compose when available, otherwise plain Docker when it can pull the released image. If Docker is unavailable, it shows the native `uv` install plan and pauses so you can cancel before continuing. It initializes the collection, installs ArchiveBox's runtime dependencies, and starts the server. Open the printed Admin UI URL and follow the setup wizard to create the first admin and configure web access.
The script uses Docker Compose when available, otherwise plain Docker when it can pull the released image. If Docker is unavailable, it shows the native `uv` install plan and pauses so you can cancel before continuing. It initializes the collection, installs ArchiveBox's runtime dependencies, and starts the server. Open the printed Admin UI URL to create the first admin. If `BASE_URL` is not configured yet, continue through the web setup wizard.
Run it as your normal user unless you want a system-owned deployment. When run as root, the script creates the `archivebox` service user and places the collection under that account's home directory; it prints the exact path and follow-up commands when finished.

View File

@ -75,7 +75,7 @@ WHERE username = 'someUsernameHere';
#### Example: Adding a new user with a hashed password
*Note: this is just an example to demonstrate direct database usage. If you are trying to create a user on initial setup, use the [`ADMIN_USERNAME` & `ADMIN_PASSWORD`](https://github.com/ArchiveBox/ArchiveBox/wiki/Configuration#admin_username--admin_password) configuration options.*
*Note: this is just an example to demonstrate direct database usage. For initial setup, open the Admin UI and create the first admin there.*
1. First, generate the hashed password in a Python shell using Django's `make_password` function.

View File

@ -14,7 +14,7 @@ archivebox server 0.0.0.0:8000
Open <http://admin.archivebox.localhost:8000/admin/> in a browser to create the first admin and finish web setup. To create additional accounts from the CLI, use `archivebox manage createsuperuser`.
This server is enabled out-of-the-box if you're using `docker-compose` to run ArchiveBox.
If hosting publicly, complete the first-run wizard before exposing ArchiveBox. It guides you through choosing a security mode and shows the settings to enter in Cloudflare, Nginx Proxy Manager, Caddy, Traefik, Tailscale, or your hosting platform's ingress UI. Configure HTTPS there, then open the canonical URL you chose in the wizard.
If `BASE_URL` is not configured yet, complete the first-run wizard before exposing ArchiveBox. It guides you through choosing a security mode and shows the settings to enter in Cloudflare, Nginx Proxy Manager, Caddy, Traefik, Tailscale, or your hosting platform's ingress UI. Configure HTTPS there, then open the canonical URL you chose in the wizard. Existing `BASE_URL` and security settings are trusted, so configured servers skip this wizard.
After ingress is working, set the permissions depending on how public you want the archive to be:

View File

@ -71,7 +71,8 @@ docker compose up -d
# or without Docker:
archivebox server
# Visit http://web.archivebox.localhost:8000 in a browser
# Visit http://admin.archivebox.localhost:8000/admin/ to create the first admin.
# If BASE_URL is not configured yet, continue through the web setup wizard.
```
---

View File

@ -43,9 +43,6 @@ archivebox manage changepassword <username>
# equivalent: docker run -v $PWD:/data archivebox/archivebox:dev manage [...]
```
> [!TIP]
> If using Docker, you can set [`ADMIN_USERNAME` & `ADMIN_PASSWORD`](https://github.com/ArchiveBox/ArchiveBox/wiki/Configuration#admin_username--admin_password) to auto-create an admin account on first run.
Existing users can be managed from the Admin UI here: [`/admin/auth/user/`](http://admin.archivebox.localhost:8000/admin/auth/user/),
and you can change your password here: [`/admin/password_change/`](http://admin.archivebox.localhost:8000/admin/password_change/).

View File

@ -163,7 +163,7 @@ version = 2
# docs/Quickstart.md
"d81b70ce03456db1-1" = "illustration"
"40cbdd365d234433-1" = "illustration"
"f3fd34dae6f6f6ab-1" = "illustration"
"c84835e713d1c625-1" = "run"
# docs/Scheduled-Archiving.md