Self-Hosted Frontend
In both VyHub Cloud and Self-Hosted, a custom frontend can be used. Selfhosting 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.
Self-hosting the frontend is not required to use a custom domain. Please check out the custom domain guide for more information on how to set up a custom domain.
Preparing the Frontend files
- Clone the vyhub-web repository from GitHub:
git clone https://github.com/matbyte-com/vyhub-web.git
-
Install
npmand runnpm installin the cloned folder to install the required dependencies. -
Copy
public/config.js.exampletopublic/config.jsand adjust thebackend_urlto the API URL of your VyHub instance. -
Run
npm run serveto 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 buildto build the frontend. The build files will be located in thedistfolder.
Deploying the Frontend
VyHub Cloud
-
You need a webserver and a custom domain to host the frontend.
-
Upload all files from the
distfolder to the root directory of your webserver. -
Make sure that
config.jscontains the correct backend URL. -
On the instance overview at vyhub.net, click on
Edit Instance, set your custom domain and enable theSelf-Hosted Frontendoption. -
Save the changes and open your custom domain in your browser.
VyHub Self-Hosted
-
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.