Self-Hosted Frontend
In both VyHub Cloud and Self-Hosted, a custom frontend can be used. This allows you to customize the look and feel of the frontend to match your brand or to add additional functionality.
Preparing the Frontend files
-
Clone the vyhub-web repository from GitHub:
git clone https://github.com/matbyte-com/vyhub-web.git
-
Install
npm
and runnpm install
in the cloned folder to install the required dependencies. -
Copy
public/config.js.example
topublic/config.js
and adjust thebackend_url
to the API URL of your VyHub instance. -
Run
npm run serve
to start the development server. You can open VyHub in your browser by navigating tohttp://localhost:5080
. -
Adjust the frontend code to your needs.
-
Run
npm run build
to build the frontend. The build files will be located in thedist
folder.
Deploying the Frontend
VyHub Cloud
-
You need a webserver and a custom domain to host the frontend.
-
Upload all files from the
dist
folder to the root directory of your webserver. -
Make sure that
config.js
contains the correct backend URL. -
On the instance overview at vyhub.net, click on
Edit Instance
, set your custom domain and enable theSelf-Hosted Frontend
option. -
Save the changes and open your custom domain in your browser.
VyHub Self-Hosted
-
In
.env
, setVYHUB_CUSTOM_FRONTEND
totrue
. -
Recreate the containers with
docker-compose up -d
. -
Delete all files from the
web
folder (located in the directory where yourdocker-compose.yml
is located). -
Upload all files from the
dist
folder to theweb
folder. -
Run
docker-compose restart app
.