# Install Skald *on your own server*

> The page https://skaldanalytics.com/install/ as Markdown. Every page and guide: https://skaldanalytics.com/llms.txt . Skald is source-available (Elastic License 2.0).

install · free to self-host

There are four ways, and Docker is the fastest: one command starts it with your log mounted read-only, one makes the first owner.

Free to self-host · source-available (Elastic License 2.0) · [source on GitHub](https://github.com/spcaeo/skald)

four ways in · quickest on the leftsame code, same files

1. **Docker**  4 commands  needs Docker
2. **Docker Compose**  3 commands  needs Docker and git
3. **Install script**  download, check, run  needs Debian or Ubuntu, and root
4. **From source**  clone, install, run  needs git and root; Python 3.11+

Each step is one way to install, a little more hands-on than the one before. Pick one to see its commands below. All four read the log read-only and keep the history in one data folder.

[01] before you start

## What you need to install Skald

A server, its web server's access log, and Docker or Python. Nothing to compile and no database server to run.

Site on Vercel, Netlify or behind Cloudflare? Skald can take a log drain, a CDN log or the Skald Worker instead (a day read only from a CDN log is withheld until the second count reads CDN logs): see the [hosting guide](https://github.com/spcaeo/skald/blob/main/docs/HOSTING.md). Rather not run a server at all? [Start a 30-day free trial of hosted Skald](https://skaldanalytics.com/beta/).

- **An access log Skald can read** from nginx, Apache or Caddy. In Docker it must be readable by group `adm` (gid 4), as it is on stock Debian and Ubuntu.
- **Docker, or Python 3.11 or newer** on Debian, Ubuntu or similar. The standard library is enough; the Docker image brings its own Python.
- **HTTPS in front, on a remote server** Sign-in uses a secure cookie, so plain `http://` works only at `localhost`.

[02] pick a way

## Four ways to install, from quickest to most hands-on

All four run the same code and keep the same files. Pick one; the commands copy with one click. Every option and fix is in [INSTALL.md on GitHub](https://github.com/spcaeo/skald/blob/main/docs/INSTALL.md).

### Docker, the fastest way

1. Start it, with your web server's log mounted read-only.

start Skald

```
docker run -d --name skald --restart unless-stopped \
  -p 127.0.0.1:8080:8080 \
  -v /var/log/nginx:/logs:ro \
  -v skald-data:/var/lib/skald \
  -e SKALD_SITE=example.com \
  ghcr.io/spcaeo/skald:2
```

`:2` follows every 2.x release. To pin this one exactly, use `ghcr.io/spcaeo/skald:2.62.1`.

2. Make the first owner. It prints a link to set your password, valid for 60 minutes.

the first owner

```
docker exec -it skald skald accounts init --org "Example Co" --owner-email owner@example.com
```

3. Fill the history from the days your log still holds, then check every part.

fill and check

```
docker exec skald skald backfill --days 14
docker exec skald skald doctor
```

Not sure Skald can read your log? `docker exec skald skald try-log /logs/access.log` reads its first 500 lines, says which reader fits and why any line fails, and stores nothing.

The container checks each crawler's address against its owner's published list by default (`SKALD_VERIFY_BOTS=off` stops it), and once mail is set up it sends one summary mail a day at 01:00 to each person who gets security alerts, with what is open on their sites (`SKALD_SUMMARY_AT` moves it; `off` stops it).

The whole walk-through, with HTTPS in front and the upgrade, is [self-hosted analytics with Docker](https://skaldanalytics.com/self-host/docker/).

[03] check the download

## Make sure the file you downloaded is the one we published

Each release on GitHub has a `SHA256SUMS` file beside the download. If the hash of your file matches the line in it, the file was not changed on the way.

`sha256sum --ignore-missing -c SHA256SUMS` does the comparing for you. If you would rather see it, paste both values here. The comparing runs in your browser and nothing is sent anywhere.

The line from SHA256SUMS What `sha256sum skald-2.62.1.tar.gz` printed on your machine

Paste both values to compare them.

[04] after the install

## Upgrades, and where to get help

Upgrading keeps your history: newer code brings the files up to date in place, after taking a copy.

- **Upgrade with Docker** Take a backup with `docker exec skald skald backup`, then `docker pull ghcr.io/spcaeo/skald:2`, remove the old container with `docker rm -f skald`, and start it again with the same `docker run` command. The volume keeps every figure.
- **Upgrade an install** `sudo skald upgrade` takes a backup, runs the migrations, checks health and rolls back if it has to. See [the upgrade guide](https://github.com/spcaeo/skald/blob/main/docs/UPGRADING.md).
- **Stuck?** Run `skald doctor` first. Then ask in [Discussions](https://github.com/spcaeo/skald/discussions) or [report a problem](https://github.com/spcaeo/skald/issues/new).
- **What changed** Every release in plain words is on [what's new](https://skaldanalytics.com/whats-new/); hardening is in [SECURITY.md](https://github.com/spcaeo/skald/blob/main/SECURITY.md).

Not sure yet? [Click around the live demo](https://spcaeo.github.io/skald/), read [every feature](https://skaldanalytics.com/features/), or see [why we built it](https://skaldanalytics.com/story/).

keep reading

## More on Install Skald

- [Docker](https://skaldanalytics.com/self-host/docker/): One container beside nginx, or Compose with its own HTTPS. Also the install script, without Docker.
- [Self-host Skald free](https://skaldanalytics.com/self-host/): One Docker image, one disk, your server's log. Free for your sites and your clients' sites.
- [What's new in Skald](https://skaldanalytics.com/whats-new/): Every release in plain words, newest first.

questions

## Install Skald FAQ

Straight answers, including what Skald does not do.

[Read the docs](https://skaldanalytics.com/docs/) [Ask us a question](https://skaldanalytics.com/contact/)

**Which Docker tag should I use?**

`:2`. It moves to every 2.x release, fixes and features, but never to a 3.0 that could break something. To stay on one exact release, use its full number in place of `:2`, as the Docker steps on this page show.

**Does Skald need a database server?**

No. Its history, accounts and conversions are SQLite files in one data folder, in a Docker volume or in `/var/lib/skald`.

**My site is on Vercel, Netlify or Cloudflare. Can I still use it?**

Yes. Skald can take a log drain, a CDN log or the Skald Worker in place of a log file (a day read only from a CDN log is withheld until the second count reads CDN logs). See the [hosting guide](https://github.com/spcaeo/skald/blob/main/docs/HOSTING.md), or let us run it for you with a [30-day free trial](https://skaldanalytics.com/beta/).
