Skip to main content

Install Homarr Dashbaord

Install Updates

Update and upgrade your server's packages using the following commands:

  • For Ubuntu/Debian: sudo apt update && sudo apt upgrade -y

  • For RedHat/CentOS/Fedora/Alma/Rocky: sudo dnf update -y

Create a Non-Root User

Create a non-root user with superuser (sudo) privileges:

  1. Add a new user using adduser <username>

  2. Set the password for this user.

  3. Enter the relevant information (optional)

  4. Enter 'Y', then press Enter.

  5. Add the user to the "sudo" group:

    • For Ubuntu/Debian: usermod -aG sudo <username>

    • For RedHat/CentOS/Fedora/Alma/Rocky: usermod -aG wheel <username>

Ubuntu / Debian

usermod -aG sudo <username>

RedHat / CentOS / Fedora / Alma / Rocky

usermod -aG wheel <username>

Now, you can log out of the system, and log back in as your new non-root super user.

Step 2: Install Docker and Docker Compose

Install Docker and Docker Compose on your server:

  1. Install the curl utility:

    • For Ubuntu/Debian: sudo apt install curl -y

    • For RedHat/CentOS/Fedora/Alma/Rocky: sudo dnf install curl -y

  2. Run the command to install Docker and Docker Compose: curl https://get.docker.com | sh

Add Your User to the Docker Group

Add your non-root user to the docker group so you can use Docker commands without sudo:

sudo usermod -aG docker <username>

Install Homarr in Docker

First we'll create a new folder to hold our applications and services files.

mkdir -p docker/homarr

Now we'll move into that folder.

cd docker/homarr

Here we'll create a new file in this location. It will be compose.yaml, which is our docker compose configuration file for the application. Copy the configuration text below, and paste it into the new file you just created.

---
services:
  homarr:
    container_name: homarr
    image: ghcr.io/homarr-labs/homarr:latest
    restart: unless-stopped
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock # Optional, only if you want docker integration
      - ./homarr/appdata:/appdata
    environment:
      - SECRET_ENCRYPTION_KEY=< use 'openssl rand -hex 32' >
    ports:
      - '7575:7575'

In the configuration above, you'll notice any values surrounded by less than '<' and greater than '>' signs. These need to be replaced with the actual values you need.

In this case you only need to generate a secret encryption key. We can do this by exiting nano with CTRL + x, then using the command:

openssl rand -hex 32

in the command line to generate a 32 character hexadecimal value. Once generated, copy the value and go back into the file in nano with

nano compose.yaml

Now, erase the placeholder for the SECRET_ENCRYPTION_KEY value between '<' and '>', including the less tan and greater than signs, and paste in your generated key. It should look like this, when you've done it.

SECRET_ENCRYPTION_KEY=f387d2a8bdae825763...

Now save you file with CTRL + O, then press Enter to confirm. Exit nano with CTRL + X.

Next, we'll pull down our image for Homarr with

docker compose pull

Once pulled down, we will start our docker virtual machine with

docker compose up -d.

I like to watch the logs the first time I start up a new docker virtual machine, to check for any errors I may need to correct. If you'd like to do that then use the command:

docker compose logs -f

after bringing up the virtual machine.

You can also just type them both in one line by concatenating the commands with &&.

docker compose up -d && docker compose logs -f

When you are done checking the logs, you can stop following them with CTRL + C.

Now, open your favorite modern browser, and go to the IP address of your host machine where you have the docker virtual machine running on port 7575.

I went to http://192.168.50.115:7575 and was greeted with a login screen.

You'll be greeted and put through a quick on-boarding where you'll create your initial (administrative) account. Once done, you can go through, setup the system the way you prefer, and get started setting up your dashboards.

Support this Channel and Content

Become a Patron at Patreon

https://patreon.com/awesomeopensource

Be me a Coffee or Beer at Paypal

https://paypal.me/brianmcgonagill

Get the Awesome Open Source Merchandise

https://osia.printify.me