From source
Installing from source is a bad idea in many ways:
- No isolation between applications
- Dependency conflicts on your root operating system
- Cumbersome update process
- Permission management
- Handling of conflicts
Therefore, we highly discourage you from using this as a normal user. This method is only useful, when you want to develop on Homarr or extend it with your own functionality.
Prerequisites
Steps
Clone the Repository using
git clone https://github.com/homarr-labs/homarr.gitEnter the created directory using
cd homarrInstall all dependencies using
pnpm installCopy
.env.exampleto.envand setDB_URLto an absolute writable path, such asDB_URL='/home/username/homarr/db.sqlite'. Migration and application commands run from different workspace directories, so a relative path can point them at different databases.Run
openssl rand -hex 32twice and setAUTH_SECRETandSECRET_ENCRYPTION_KEYto the two different generated values. Keep both values secret and preserveSECRET_ENCRYPTION_KEYwith your backups.- Run
pnpm run db:migration:sqlite:runand wait that it completes - Build the source using
pnpm build Copy better-sqlite3.node files with
mkdir buildandcp ./node_modules/better-sqlite3/build/Release/better_sqlite3.node ./build/better_sqlite3.node- Start a redis server using
redis-server - Run the server using
pnpm start - Open
http://localhost:3000in your browser