Setup VyHub Selfhosting
This is the setup guide for VyHub Selfhosting. The Selfhosting version allows to host VyHub on your own server.
Prerequisites
For hosting VyHub, some requirements must be met:
- Someone who knows how to use linux and docker
- A linux server (virtual or dedicated)
- At least 2 CPU cores and 4GB RAM
- If a virtual server is used, make sure that the vCPU supports
x86-64-v2
or higer. A script that displays the supported architecture can be found attools/cpucheck
in thevyhub-onprem
repository. - Recommended: A recent Debian or Ubuntu LTS version
- Install Docker Server
- Install Docker Compose Plugin
- A domain
- Create an A (and if available AAAA) DNS record that points to your server
- If using Cloudflare, set the security level for the
/api
path toLow
- An SSL certificate
- When not using Cloudflare: Setup certbot to get a LetsEncrypt certificate
- When using Cloudflare: Generate a free origin certificate on the Cloudflare dashboard
- Backup
- You should regularily create backups of your server, including the VyHub database
Creating and activating the selfhosting instance
- Navigate to https://app.vyhub.net/new-instance and select
Self-Hosted
- Insert the name of your instance and your domain
- Finish the instance creation
- Got to your instance dashboard and activate your instance by choosing a plan and finishing the payment
Installing
- Connect to your server via SSH (all following steps are done on the server)
-
Clone the
vyhub-onprem
repository: -
Navigate into the
vyhub-onprem
folder and runfirst-setup.sh
: -
Put your SSL certificate and key in the folder
/opt/vyhub-onprem/nginx/certs/
. They should be in PEM format and namedvyhub.crt
andvyhub.key
.If you are using certbot, consider creating a symbolic link to the actual cert/key with
ln -s
. -
SWITCH Go the the dashboard of your instance at app.vyhub.net and click on the
Setup
button. Follow the instructions there. -
SWITCH BACK After finishing the setup dialog, go back to this page.
-
In
.env
, insert your Steam API key that can be generated here.If you know wht you are doing, you can further adjust config parameters. They are documented here.
-
In
docker-compose.override.yml
, change the vyhub image version to the newest version (see changelog) -
Start VyHub via docker compose:
Check that all 6 containers are running:
If a container is missing or is not running, check the logs with:
-
Visit your VyHub instance and check that everything works.
Updating
To update your VyHub instance, follow these steps:
-
Update the
vyhub-onprem
repository: -
Adjust the version number in
docker-compose.override.yml
The version numbers are built like this:
{major}.{minor}.{patch}
. To be sure, only update one minor version after another.Example: You want to update from
2.0.7
to2.2.1
Solution: Update to the newest version of
2.1
(e.g.2.1.3
) first and update to2.2.1
afterwards. -
Restart the containers:
-
Check that all 6 containers are running:
If a container is missing or is not running, check the logs with: