Self-Hosted Frontend
On VyHub Self-Hosted, a custom frontend can be used. Self-hosting the frontend allows for 100% customizability of your theme! This allows you to customize the look and feel of the frontend to match your brand or to add additional functionality.
The frontend is built with Vue 3 and Vuetify using Vite.
Preparing the Frontend files
- Clone the vyhub-web repository from GitHub:
git clone https://github.com/matbyte-com/vyhub-web.git
-
Install Node.js (which includes
npm) and runnpm installin the cloned folder to install the required dependencies. -
Copy
public/config.js.exampletopublic/config.jsand adjust the values to match your VyHub instance:window.vyhubConfig = { backend_url: 'https://your-domain.com/v1', // API URL of your VyHub instance (including /v1) default_title: 'VyHub', // title shown in the browser tab demo_mode: false, // keep this false };public/config.jsis git-ignored, so your local changes will not be committed. -
Run
npm run devto start the development server. You can open VyHub in your browser by navigating tohttp://localhost:8050. -
Adjust the frontend code to your needs.
-
Run
npm run buildto build the frontend. The build files will be located in thedistfolder.You can preview the production build locally with
npm run serve(also served onhttp://localhost:8050).
Deploying the Frontend
-
In
.env, setVYHUB_CUSTOM_FRONTENDtotrue. -
Recreate the containers with
docker compose up -d. -
Delete all files from the
webfolder (located in the directory where yourdocker-compose.ymlis located). -
Upload all files from the
distfolder to thewebfolder. -
Run
docker compose restart app.