This article takes you from an empty server to a running HAIMDALL installation using Docker Compose. No Docker on your host? See Installing on Node.js Hosting. It takes about half an hour, most of it setting up HTTPS.
Before you start
You need:
a Linux server with Docker Engine and the Docker Compose plugin (starting from a brand-new AWS, Azure or other cloud server? Follow Preparing a New Server first);
a domain name for your help site, and an HTTPS certificate for it;
a reverse proxy to handle HTTPS (see HTTPS and Reverse Proxy);
the HAIMDALL package: the image file (
haimdall-<version>.tar) anddocker-compose.yml.
1. Load the image
Copy the image file to the server and load it into Docker:
docker load -i haimdall-<version>.tar
docker image ls haimdallThe second command shows the image's tag, for example haimdall:0.1.0.
2. Put the files in place
Create a folder for HAIMDALL (for example /opt/haimdall), copy docker-compose.yml into it, and work in that folder from now on.
3. Configure
Create a .env file in the same folder:
HAIMDALL_IMAGE=haimdall:0.1.0
SESSION_SECRET=replace-with-the-output-of-openssl-rand-base64-48
POSTGRES_PASSWORD=replace-with-a-long-random-passwordGenerate the two secrets rather than typing them, for example with openssl rand -base64 48 and openssl rand -hex 24. Then make the file private: chmod 600 .env. Every setting is described in Configuration Reference.
The Compose file publishes HAIMDALL (port 3000) and the database (port 5432) on this server only (127.0.0.1), so neither is reachable from the network until your reverse proxy forwards to HAIMDALL. If either port is already in use on the server, choose others with HAIMDALL_PORT and POSTGRES_PORT in .env. If your reverse proxy runs on a different machine, also set HAIMDALL_BIND_ADDRESS (see HTTPS and Reverse Proxy).
4. Start HAIMDALL
docker compose up -d
docker compose psBoth services should be running, and the database healthy. The first start sets up the database by itself; you can watch it in the log:
docker compose logs appLook for [startup] database is up to date. If HAIMDALL can't set up the database, it stops instead of starting half-ready, and the log says why. HAIMDALL also refuses to start with a default or obvious database password.
5. Get the setup code
A new installation has no accounts. You create the first administrator in the browser in step 6, and HAIMDALL asks for a one-time setup code to prove it's you. It's in the log:
docker compose logs app | grep "\[setup\]"The line ends with the code, for example [setup] Nobody can sign in yet. Open /login and create the first administrator with this setup code: K7QM-2XPA-9RTB-4HWN. It's also in the file setup-code.txt in the data volume. A new code is made each time HAIMDALL restarts, until the first account exists. If you'd rather choose the code yourself, set HAIMDALL_SETUP_CODE in .env (at least 12 characters) before starting.
Or use the command line to create the account instead:
docker compose exec app node tools/user-password.cjs you@example.com --create --name "Your Name"This creates an admin account and prints a temporary password once. You'll sign in with it and immediately choose your own password (at least 10 characters).
The same command, without --create, is also how you recover access later: it gives an existing account a new temporary password, signs it out everywhere and clears any sign-in pause. For other people's accounts, admins normally use Access › People in the editor instead.
6. Put HAIMDALL behind HTTPS
Configure your reverse proxy as described in HTTPS and Reverse Proxy (it has complete examples for nginx, Caddy and IIS), forwarding to http://127.0.0.1:3000.
Then open https://<your help-site address>/login. It shows Set up HAIMDALL: enter the setup code from step 5, your name, email address and a password (at least 10 characters), and click Create administrator and sign in. (If you used the command line instead, sign in with your email and the temporary password, and choose your own password.) You're now in the editor, and the setup code no longer works.
HAIMDALL starts as a 7-day free trial, with a banner showing the days left. Enter the licence key your supplier sent you whenever you're ready: open System › Licence key, paste it and click Activate HAIMDALL (see Licensing). If the trial ends before a key is entered, HAIMDALL locks until you enter one: no other editor screen opens and the public help site isn't available. Nothing is lost.
Next, tell HAIMDALL its address: on Customer site › Domain, click Use this address (or type the address customers will use) and Save. HAIMDALL builds the links in search-engine metadata, the AI feeds and the API from it. You can set it in .env with HAIMDALL_PUBLIC_URL instead; see Your Help Site's Addresses.
Because this is a new installation, HAIMDALL then opens its Welcome page: it confirms the installation worked and lists the screens to visit next (see step 8).
7. Check the installation
The public help site at
https://<your help-site address>/starts closed: visitors see a "This help site isn't available yet" page. Signed in, you see the site itself, with a notice that it's closed — so you and your team can build and check it before anyone else can read it. You'll open it at the end of step 8.In the editor, Help › Open-source notices lists the software inside HAIMDALL, including your server's Alpine Linux packages.
System › Health shows the database connected and up to date, the background jobs running and enough disk space, and its Recent errors list is empty. Only Customer site needs attention: it says Closed until you open the site. Public address shows your help-site address; if it warns that the page arrived on a different address or over plain HTTP, check that your proxy forwards the
HostandX-Forwarded-Protoheaders.docker compose logs appshows no errors.
8. Before you go live
Work through the Security Checklist.
Set up Backups.
Once the help site is open, tell search engines about it: add
https://<your help-site address>/sitemap.xmlto Google Search Console and Bing Webmaster Tools (see Your Help Site's Addresses).Work through the editor's Setup guide (Help › Setup guide — the list on the Welcome page). It takes you to each admin screen in turn: create accounts for your team (Access › People), set up your languages (Customer site › Languages; English is there to start with) and decide whether you need territories (Customer site › Territories; they're optional — a new installation has a single territory called Default, and customers don't see a territory choice until you add a second one), brand and publish your theme (Customer site › Appearance), name your help centre (Customer site › Appearance › Home page title), set your public address (Customer site › Domain, if you haven't already), create a folder and publish at least one article, and — last of all — open the help site to customers (Customer site › Site on/off). Steps tick themselves off as HAIMDALL notices them done; you can tick the others yourself. Until every step is done, admins see a reminder on the Articles screen (Hide the reminder on the guide turns it off).