skirl

Configuration variables

Skirl needs no configuration. Started with nothing set, it listens on port 8080, keeps everything in its data directory, and the setup wizard does the rest in the browser. The few things that can be set when it starts are below, as environment variables (or the same as flags of skirl serve). Everything else is changed in the browser, in Admin settings.

How to set them#

Give them as environment variables. A flag given to skirl serve wins over its variable, and the variable wins over the default. There is no config file. A variable that is empty counts as not set. Yes-or-no variables take true or false.

In Docker and with systemd, use variables, not flags: the Docker image's health check reads SKIRL_LISTEN just as the server does, but cannot see a flag given to the server. After changing one, start Skirl again: it reads them only when it starts.

In Docker Compose#

Put them in the .env file next to compose.yml (the install guide's files read it with env_file), one per line:

SKIRL_BASE_URL=https://notify.example.com
SKIRL_LOG_FORMAT=json

Then, in that folder, start it again with the new values:

docker compose up -d

With docker run#

Give each one with -e. To change one, remove the container and run it again with the new value; the data stays in its volume.

docker run -d --name skirl -p 8080:8080 -v skirl-data:/data -e SKIRL_BASE_URL=https://notify.example.com ghcr.io/homelabza/skirl:1

With systemd#

The service file sets SKIRL_DATA_DIR=/var/lib/skirl and SKIRL_LISTEN=127.0.0.1:8080. Add or change variables in an override, which stays when the service file is replaced:

sudo systemctl edit skirl

and write, in the editor it opens:

[Service]
Environment=SKIRL_BASE_URL=https://notify.example.com

Then:

sudo systemctl restart skirl

On the command line#

For a server run by hand, put them before the command, or give the flags after it:

SKIRL_LISTEN=127.0.0.1:8080 skirl serve
skirl serve --listen 127.0.0.1:8080 --data-dir /srv/skirl

Every variable and flag#

Made from the program itself, so it is always complete.

Flag Environment Default
--base-url SKIRL_BASE_URL none public address of this server, e.g. https://notify.example.com; given here it cannot be changed in the web app
--behind-proxy SKIRL_BEHIND_PROXY false read client addresses from X-Forwarded-For sent by --trusted-proxies; given here it cannot be changed in the web app
--data-dir SKIRL_DATA_DIR ./data directory for the database, attachments and generated secrets
--database-url SKIRL_DATABASE_URL none PostgreSQL connection URL (empty: SQLite in the data dir)
--dev-web SKIRL_DEV_WEB none development only: proxy the web app to this Vite dev server, e.g. http://localhost:5173
--listen SKIRL_LISTEN :8080 address to listen on
--log-format SKIRL_LOG_FORMAT text log format: text or json
--mode SKIRL_MODE selfhosted selfhosted or cloud
--no-rate-limit SKIRL_NO_RATE_LIMIT false turn off every rate limit except failed logins
--trusted-proxies SKIRL_TRUSTED_PROXIES 127.0.0.0/8,::1/128,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,fc00::/7 comma-separated addresses and CIDRs of proxies whose forwarded headers are believed; given here it cannot be changed in the web app
Environment
SKIRL_SETUP_TOKEN when set, the request that creates the first admin must carry it: the wizard asks for it. For a server reachable from the internet before setup is finished

The other commands' flags: Every flag.

Settings these fix#

Four of them fix a setting that is otherwise changed in the browser: SKIRL_BASE_URL, SKIRL_BEHIND_PROXY, SKIRL_TRUSTED_PROXIES and SKIRL_NO_RATE_LIMIT. The first three fix it whenever they are given, whatever the value (SKIRL_BEHIND_PROXY=false fixes it off); SKIRL_NO_RATE_LIMIT only when it is true. The app then shows the setting as set when Skirl was started and cannot change it, until Skirl is started without it. How that looks: Settings fixed when Skirl was started.

What each one is for#

SKIRL_LISTEN#

The address and port the server listens on: :8080 unless set, which is port 8080 on every address of the machine. 127.0.0.1:8080 lets only programs on the same machine reach it, such as a proxy in front of it; the systemd service does that. Give both parts: 8080 alone is refused ("want host:port, e.g. :8080").

There is one port, plain HTTP, and everything goes through it: the web app, the ntfy-compatible addresses scripts send to, Skirl's own API, and the live connections. HTTPS is the job of a proxy or a tunnel in front: Installing Skirl.

In Docker, leave it at :8080 and choose the port people use with -p or ports: instead.

SKIRL_DATA_DIR#

The folder Skirl keeps everything in: ./data unless set (in the folder it was started in), /var/lib/skirl with the systemd service. The Docker image always uses /data: it gives the server that folder as a flag, which wins over the variable. What is in it: The data directory.

The other commands read the same variable: Running a command.

SKIRL_BASE_URL#

The address people use to reach Skirl, such as https://notify.example.com: https:// or http://, the name, a port only if it is not the usual one, and no path. Anything else is refused ("want http:// or https:// and a host, without a path").

It fixes Public address: what that address is used for is in Public address. Set it here when you know the address before Skirl first starts, as the install guide does; otherwise the setup wizard asks for it.

SKIRL_BEHIND_PROXY#

true when Skirl is reached through a reverse proxy or a tunnel, so that it believes the visitor's address and HTTPS from the proxy's headers. It fixes Skirl is behind a reverse proxy (what it does), and false fixes it off. Usually the setup wizard's Trust this proxy sets it instead.

SKIRL_TRUSTED_PROXIES#

The proxies whose headers Skirl believes, separated by commas: addresses (192.0.2.10) and ranges (10.0.0.0/8). Unless set: this machine and the private networks. It matters only while Skirl is behind a proxy, and fixes Trusted proxy addresses (what it does).

SKIRL_NO_RATE_LIMIT#

true turns off every rate limit except the one on failed sign-ins: for tests and measurements on a closed network, never for a server others can reach. Admin → Settings → Rate limits then shows them as off and cannot change them. What the limits are: Rate limits.

SKIRL_SETUP_TOKEN#

A secret for the very first step: while nobody has an account yet, the setup wizard asks for it under Setup token and creates the first admin only with it; a wrong one counts as a failed sign-in, as a bad token does (Bad tokens). Once anyone has an account it does nothing, and you may remove it.

Set it when the server can be reached from the internet before you have created the admin, so that nobody else gets there first. Make a long random value with:

openssl rand -hex 32

It is a variable only, never a flag, because flags show in the list of running programs. The install guide's Docker paths set one: Before the first admin exists.

SKIRL_LOG_FORMAT#

How the log is written: text unless set (one line per event, readable by people), or json (one JSON object per line, for a log collector). Anything else is refused.

SKIRL_MODE#

selfhosted unless set; cloud is kept for a hosted Skirl later. Nothing depends on it today: leave it.

SKIRL_DATABASE_URL#

Leave it empty: Skirl keeps its database in the data directory. It is kept for a PostgreSQL database later, which is not supported yet: with it set, Skirl does not start, and says "PostgreSQL is not supported yet; leave it empty to use SQLite in the data dir".

SKIRL_DEV_WEB#

Only for working on Skirl itself: the web app is taken from a development server at this address, such as http://localhost:5173, instead of the one built into the program. Leave it empty.

This page on GitHub