Getting started
Quick start
Install Hubstruct with Docker Compose, start it, and open it for the first time.
This page takes you from nothing to Hubstruct running on your machine. It takes about ten minutes, plus however long the first download takes: the images and the AI models come to about 30 GB.
Before you start, check the requirements. You need Docker with Compose v2 and, for the AI steps, an NVIDIA GPU with the NVIDIA Container Toolkit installed.
1. Make a folder for it
Everything Hubstruct needs lives next to its Compose file: the settings, and the folder that holds uploaded media. Make a folder of its own:
mkdir hubstruct && cd hubstruct
2. Download the Compose file and the settings
curl -fsSL https://hubstruct.com/install/compose.yml -o compose.yml
curl -fsSL https://hubstruct.com/install/env.example -o .env
compose.yml describes every service and how they connect. .env holds your settings; Compose reads it by itself.
3. Fill in the secrets
Open .env in an editor. Four values have no safe default and must be set before the first start:
| Setting | What it is |
|---|---|
POSTGRES_PASSWORD | The database's password. Anything long and random. |
S3_RPC_SECRET | A secret the storage service uses internally: 64 hex characters. |
S3_ACCESS_KEY | The storage service's access key: GK followed by 24 hex characters. |
S3_SECRET_KEY | The storage service's secret key: 64 hex characters. |
Generate each with openssl:
openssl rand -hex 32 # POSTGRES_PASSWORD, S3_RPC_SECRET, S3_SECRET_KEY
echo "GK$(openssl rand -hex 12)" # S3_ACCESS_KEY
Your .env then starts like this:
POSTGRES_USER=tagging
POSTGRES_PASSWORD=7d1f0c…
POSTGRES_DB=mediadb
S3_RPC_SECRET=9a42be…
S3_ACCESS_KEY=GK3f9c21a0b7de44c1e5a9
S3_SECRET_KEY=c0ffee…
Everything else in .env is optional, with sensible defaults. The environment reference lists every setting.
4. Start it
docker compose up -d
On the first start, Compose:
- Downloads the images.
- Starts PostgreSQL, and then the migrator, which creates the database's tables and exits.
- Downloads the models (about 20 GB, once), then starts the storage service, the models server, the vision service, the API, the worker and the app.
Check that everything came up:
docker compose ps
Every service should be running (or healthy), except migrator, which shows exited (0) once it has done its work. If something keeps restarting, see Troubleshooting.
5. Open it
Go to http://localhost:4173, or the machine's address on port 4173 if it's another computer on your network.
The first visit opens setup, where you make the owner account: your first and last name, a username, and a password of at least 8 characters. The owner is the first account and can't be removed. You can add more people later in Settings → Users.
To skip setup, and set up the rest of the app the same way, give the owner, settings, libraries and more in the config file before you start.
6. Add your first library
Hubstruct has nothing to show until it has a library. After setup it takes you to Settings → Libraries:
- Add a library and give it a name, then choose Upload in the top bar and drop files on the dialog. See Uploading.
As media arrives, the worker starts on it. Thumbnails appear within seconds, and the rest fills in as each step finishes. The Dashboard shows how far along it is.