Dashboards
Homarr logo

How to install Homarr v1 with Docker (with optional Authentik SSO)

Homarr guide cover
Difficulty: BeginnerTime: 20 minutesTested with: Homarr v1.77.2

Homarr is a modern dashboard for your homelab. Instead of a page of bookmarks, you get a drag-and-drop board of tiles that can show live information: which containers are running, what is downloading, what is playing on Jellyfin, the weather, your calendar and plenty more. Version 1 was a complete rewrite, with proper user accounts, multiple boards, permissions and single sign-on built in.

In this guide we will install Homarr v1 with Docker, give it (read-only) access to Docker so it can show your containers, and optionally hook it up to Authentik so you log in with your existing SSO account.

πŸ’‘
Note: This guide works with Homarr v1.77.2, the latest release at the time of writing.

βœ… Before you start

  • A Linux host with Docker and Docker Compose v2.
  • openssl on the host (it is installed on almost every distro) to generate a secret key.
  • Optional: a reverse proxy such as Traefik, and a hostname like home.example.com.
  • Optional: an Authentik (or other OIDC) server if you want single sign-on.
πŸ’‘
Note: Coming from Homarr 0.x?
The old 0.x releases used a different image (ghcr.io/ajnart/homarr) and folder layout. Version 1 can import an old export during onboarding, but treat it as a fresh install: new container, new folder.

STEP 1: Create the folders

mkdir -p /path/to/appdata/homarr/appdata
cd /path/to/appdata/homarr
/path/to/appdata/homarr/
    docker-compose.yml
    .env                          # your secrets live here, never in the compose file
    appdata/                      # database, uploaded icons and certificates
Folder layout

STEP 2: Generate the encryption key

Homarr encrypts the passwords and API keys you give it for integrations (Jellyfin, Sonarr and so on). It needs a 64-character hex key to do that:

openssl rand -hex 32

Copy the output into a new .env file next to where your compose file will live, and lock the file down:

cat > .env <<'ENV'
SECRET_ENCRYPTION_KEY=CHANGE_ME_PASTE_THE_64_CHARACTER_KEY_HERE
ENV
chmod 600 .env
Create .env
β›”
Important: Keep this key safe
If you lose SECRET_ENCRYPTION_KEY, Homarr cannot decrypt any of the saved integration secrets and you will need to re-enter them all. Back the key up in your password manager, and never reuse one key across two installs.

STEP 3: Create a Docker network

If your other homelab apps already share a network, use that. Otherwise create one:

docker network create homelab

STEP 4: The compose file

Pick the tab that suits you. If you are not sure, start with Local accounts; you can switch to SSO later without losing anything.

Option A: Local accounts

services:
  homarr:
    image: ghcr.io/homarr-labs/homarr:v1.77.2
    container_name: homarr
    restart: unless-stopped
    environment:
      - TZ=Europe/London
      - SECRET_ENCRYPTION_KEY=${SECRET_ENCRYPTION_KEY}
    volumes:
      - /path/to/appdata/homarr/appdata:/appdata
      - /var/run/docker.sock:/var/run/docker.sock:ro
    ports:
      - 7575:7575
    healthcheck:
      test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:7575/ || exit 1"]
      interval: 1m30s
      timeout: 10s
      retries: 3
    networks:
      - homelab

networks:
  homelab:
    external: true
docker-compose.yml

Option B: With Authentik SSO

services:
  homarr:
    image: ghcr.io/homarr-labs/homarr:v1.77.2
    container_name: homarr
    restart: unless-stopped
    environment:
      - TZ=Europe/London
      - SECRET_ENCRYPTION_KEY=${SECRET_ENCRYPTION_KEY}
      # Single sign-on through Authentik (OIDC)
      - AUTH_PROVIDERS=oidc,credentials
      - AUTH_OIDC_CLIENT_ID=${OIDC_CLIENT_ID}
      - AUTH_OIDC_CLIENT_SECRET=${OIDC_CLIENT_SECRET}
      - AUTH_OIDC_ISSUER=https://auth.example.com/application/o/homarr/
      - AUTH_OIDC_CLIENT_NAME=Authentik
      - AUTH_OIDC_SCOPE_OVERWRITE=openid email profile groups
      - AUTH_OIDC_GROUPS_ATTRIBUTE=groups
      - AUTH_LOGOUT_REDIRECT_URL=https://auth.example.com/application/o/homarr/end-session/
      # Skip Homarr's login page and go straight to Authentik
      - AUTH_OIDC_AUTO_LOGIN=false
    volumes:
      - /path/to/appdata/homarr/appdata:/appdata
      - /var/run/docker.sock:/var/run/docker.sock:ro
    ports:
      - 7575:7575
    healthcheck:
      test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:7575/ || exit 1"]
      interval: 1m30s
      timeout: 10s
      retries: 3
    networks:
      - homelab

networks:
  homelab:
    external: true
docker-compose.yml

Add the client ID and secret from Authentik (see STEP 9 below) to your .env file:

SECRET_ENCRYPTION_KEY=CHANGE_ME_PASTE_THE_64_CHARACTER_KEY_HERE
OIDC_CLIENT_ID=CHANGE_ME_CLIENT_ID
OIDC_CLIENT_SECRET=CHANGE_ME_CLIENT_SECRET
.env

STEP 5: The settings explained

Setting What it does
image: ...:v1.77.2 Pins a specific release so updates only happen when you choose. You can use latest instead if you prefer.
SECRET_ENCRYPTION_KEY Encrypts integration secrets in the database. Read from .env so it never sits in the compose file.
/appdata Everything Homarr stores: the SQLite database, uploaded icons and trusted certificates. This is the folder to back up.
docker.sock:ro Lets Homarr list your containers and show whether they are running. :ro stops the mount itself being written to (see the caution below).
AUTH_PROVIDERS Which login methods are enabled. oidc,credentials keeps a local login as a fallback in case your SSO server is down.
AUTH_OIDC_ISSUER Your Authentik application's issuer URL. For Authentik this must end with a trailing slash.
AUTH_OIDC_GROUPS_ATTRIBUTE The claim Homarr reads group names from. Groups with matching names in Homarr are assigned automatically.
AUTH_OIDC_AUTO_LOGIN Set to true to send people straight to Authentik instead of showing Homarr's login page.
⚠️
Warning: About the Docker socket
Access to the Docker socket is powerful, even with :ro, because the Docker API itself still accepts commands. If that worries you (it should a little!), put a socket proxy such as tecnativa/docker-socket-proxy in front of it with only container listing allowed, and point Homarr's Docker integration at that instead. You can also skip the mount entirely if you do not need container tiles.

STEP 6: Start Homarr

cd /path/to/appdata/homarr
docker compose up -d
docker compose logs -f

When you see that the server is listening, press Ctrl+C and open http://192.168.1.20:7575 (swap in your Docker host's IP).

STEP 7: First-run setup

  1. Choose how to start. Pick Start from scratch, or Import if you have an export from an older Homarr.
  2. Create the admin account. Enter a username and a strong password such as CHANGE_ME_STRONG_PASSWORD. Even if you plan to use SSO, this local account is your way back in if Authentik is ever down.
  3. Basic settings. Choose whether to send anonymous usage data and whether search engines may index your dashboard (say no for a private dashboard).
  4. Create your first board. Click New board, give it a name such as home, and make it the default board under Settings β†’ Boards (or from the board's own menu).
  5. Add the Docker integration. Go to Management β†’ Integrations β†’ New integration β†’ Docker. It uses the socket we mounted, so there is nothing else to fill in.
  6. Add apps and tiles. Open your board, click the pencil to enter edit mode and add items: App tiles for links, Docker containers, Calendar, Media server and so on. Integrations such as Jellyfin or Sonarr need the app's URL and an API key, which Homarr stores encrypted.
πŸ‘
Tip: For app URLs, use the internal address (http://192.168.1.20:8096 or http://jellyfin:8096 on a shared Docker network) for the integration, and your public HTTPS address for the link people click. Homarr lets you set both.

STEP 8: Put Homarr behind a reverse proxy

SSO only works over the same hostname that you registered as the redirect URI, so set up the proxy before testing logins.

Option A: Traefik (Docker labels)

    labels:
      - traefik.enable=true
      - traefik.http.routers.homarr.rule=Host(`home.example.com`)
      - traefik.http.routers.homarr.entrypoints=websecure
      - traefik.http.routers.homarr.tls.certresolver=cloudflare
      - traefik.http.services.homarr.loadbalancer.server.port=7575
docker-compose.yml (extra lines)

Traefik needs to be on the homelab network for this to work. Match the entry point and resolver names to your own Traefik config.

Option B: Traefik (file provider)

http:
  routers:
    homarr:
      rule: Host(`home.example.com`)
      entryPoints:
        - websecure
      tls:
        certResolver: cloudflare
      service: homarr
  services:
    homarr:
      loadBalancer:
        servers:
          - url: http://192.168.1.20:7575
dynamic.yml

Option C: Cloudflare Tunnel

Add a public hostname of home.example.com to your tunnel pointing at http://192.168.1.20:7575. Consider putting a Cloudflare Access policy in front if Homarr shows anything you would rather keep private.

STEP 9: Single sign-on with Authentik (optional)

If you already run Authentik, logging into Homarr with the same account is a nice touch, and group membership can control who is an admin.

  1. In Authentik, go to Applications β†’ Applications β†’ Create with provider.
  2. Name it Homarr and set the slug to homarr. The slug is part of the issuer URL, so if you pick something else, change AUTH_OIDC_ISSUER to match.
  3. Choose OAuth2/OpenID Connect as the provider type, with client type Confidential.
  4. Add a Strict redirect URI of https://home.example.com/api/auth/callback/oidc (use your real Homarr hostname).
  5. Save, then copy the Client ID and Client Secret into .env as OIDC_CLIENT_ID and OIDC_CLIENT_SECRET.
  6. Create an Authentik group called homarr-admins and add yourself to it.
  7. In Homarr, go to Management β†’ Groups, create a group with exactly the same name, homarr-admins, and give it the permissions you want.
  8. Recreate the container so it picks up the new settings: docker compose up -d.

Log out and you should now see a Sign in with Authentik button. Once you are happy it works, you can set AUTH_OIDC_AUTO_LOGIN=true.

Updating Homarr

  1. Read the release notes for every version between yours and the new one.

Change the version in image: to the new tag (or leave it on latest), then pull and restart:

docker compose pull
docker compose up -d
docker image prune -f

Back up the data folder:

cd /path/to/appdata/homarr
docker compose stop
tar czf ~/homarr-backup-$(date +%F).tar.gz appdata .env

Homarr migrates its database automatically on start-up, so give it a minute before you panic about a blank page.

Troubleshooting

The container exits straight away complaining about the encryption key. SECRET_ENCRYPTION_KEY must be exactly 64 hex characters. Regenerate it with openssl rand -hex 32 and make sure there are no quotes or spaces in .env. Run docker compose config | grep -c SECRET_ENCRYPTION_KEY to check the variable is being picked up (that command prints a count, not the key).

The Docker tiles show nothing. Check the socket mount is present with docker inspect homarr --format '{{json .Mounts}}'. If you use a socket proxy, make sure it allows CONTAINERS=1.

Authentik says redirect_uri does not match. The redirect URI in Authentik must exactly match the hostname you are visiting, including https:// and /api/auth/callback/oidc. Browsing to Homarr by its IP address will not work with SSO.

Login works but I end up back on the login page. Usually the issuer is wrong. For Authentik it looks like https://auth.example.com/application/o/homarr/, with the trailing slash. Check the container logs for the exact error.

SSO users are not admins. Group names must match exactly in both Authentik and Homarr, and the groups scope must be included. Log out and back in after changing groups; memberships are synced at login.

And that's your dashboard sorted. Spend a happy evening arranging tiles until it is just right. 🧩