Skip to main content

Veloren - Open Source, Self Hosted, Multi-player, Endless World Exploration, and Adventure Game

My daughter, and nieces have all been playing an MMO Game called Roblox for a couple of years.  I have no issue with MMOs in general for adults, but for pre-teens, I don't like the idea of a game that has uncontrolled servers, and unknonw safety and security controls in it.  As always, my first thought was, :...there must be something open source that we can all play, that I can host, and secure myself..."

And, of course, there is.  There are actually quite a few online games that can be self hosted.  I was really looking for something similar to Roblox, and thanks to the Reddit community again for giving some great suggestions.  

I know, you can pay to host a Roblox server yourself, but let's be honest.  Hositing a server, and having access to know what's really going on behind the scenes, just isn't the same thing.  

Today we setup a really fun, really cool game that you can run on your homelab server.  You can even run the server piece on a Raspberry Pi...so it's not a heavy-weight server portion.  The game client, however, does require a bit of machine power.  My 2 year old sub-five-hundred dollar build machine with a Ryzen 3 processor and on-board graphics runs it fine with a couple of tweaks to the graphics themselves, but if you want the full bore gaming experience, you'll want a decent GPU along with a system with the min specs listed on thier page.   https://veloren.net/download/

As of the writing of this post... they suggest:

  • GPU with either Vulkan, Metal, or DirectX 11.2+ support
  • 4GB RAM
  • multi-core CPU
  • 2GB of free disk space

If you happen to get hte client to run well on a Raspberry Pi, please go over to my dicussion site at https://discuss.opensourceisawesome.com and post something about it in the General chat channel.  I would love to know what you did, what settings you used, the model Pi, etc.

Let's get into the install.

Installation

As always, I love to use docker when I install servers, as it allows me to make the most out of my server hardware, while keeping the installs segregated and easy to update / remove without affecting other server software I'm running.  

What You'll Need

  • Docker and Docker-Compose installed on your machine (see below for instructions)
  • (optional) A domain / sub-domain if you want to reach your server from outside of your local network.
  • (optional) A reverse proxy (I liek NGinX Proxy Manager)
  • About 10 minutes of your time.

Installing Docker-CE and Docker-Compose

If you already have Docker and Docker-Compose installed, feel free to skip down to the next section.

You may want to install some pre-requisite softwre as well:

Debian / Ubuntu

sudo apt install git curl wget

Fedora / Redhat

dnf install git curl wget

Arch

sudo pacman -Sy git curl wget

You can easily install Docker-CE, Docker-Compose, Portainer-CE, and NGinX Proxy manager by using this quick install script I created and maintain on Github.  Just use the command:

wget https://gitlab.com/bmcgonag/docker_installs/-/raw/main/install_docker_nproxyman.sh

To download the script to your desired host.

Change the permissios to make the script executable:

chmod +x ./install_docker_nproxyman.sh

and then run the script with the command:

./install_docker_nproxyman.sh

When run, the script will prompt you to select your host operating system, then will ask you which bits of software you want to install.

Simply enter 'y' for each thing you want to install.

For instance, you may want to answer 'y' to NGinX Proxy Manager, and Portainer-CE if you don't already use these in your system.

At some point, you'll be asked for your super user (sudo) password as well.

Allow the script to complete installation.

At this point, you might want to log out and back in, as this will allow you to use the docker and docker-compose commands without the need of sudo in front of them.

Installing Veloren Server

You should note, that if you want to setup whitelists of users allowed to use the server, along with a host of other options, you can 100% do that, but you need to modify the server configuration files inside the docker container.  For this type of work, I highly recommend something like Portainer as a great tool for accessing the CLI inside the docker container.  It can also be done fairly easily with the regular CLI when needed.

Having docker-compose setup and ready, we'll create our folder structure first.  If you don't already have a "docker" folder setup, I like to create a parent "docker" where I keep all of my other docker folders so I only have to zip up and backup the parent "docker" folder to get a solid backup of my working system.  Within that parent folder, we'll create a folder for our new server called "veloren". We can do this with a single command that will create the "docker" folder for you if it doesn't already exist.  If it does, it will just create the "veloren" folder inside your existing docker folder.

mkdir -p docker/veloren

Now, move into your new "veloren" folder with the command:

cd docker/veloren

Next, we'll create a new file called "docker-compose.yml" inside of our "veloren" folder.

nano docker-compose.yml

Now, copy the code block below into that new file:

version: "3.5"

services:
  game-server:
    image: registry.gitlab.com/veloren/veloren/server-cli:nightly
    stdin_open: true
    tty: true
    container_name: veloren-game-server-master
    ports:
      - "14004:14004"
      - "14005:14005"
    restart: on-failure:0
    volumes:
        - "./userdata:/opt/userdata"
    environment:
        - RUST_LOG=debug,common::net=info
  watchtower:
    image: containrrr/watchtower
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    command: --interval 30 --stop-timeout 130s --cleanup veloren-game-server-master

Occasionally, I'll ask you to change something in a docker-compose.yml file that would be specific to your setup, however, in this case, you really don't need to change anything.  The only exception being if you have either ports 14004 or 14005 already in use on your host machine.  If so, please change the left side of either or both of the port mappings to a port number that is not in use.  

Save the file with CTRL + O, press Enter to confirm, and then exit the nano text editor with CTRL + X.

Now, we just need to bring up our server.  

We can do this with the command:

docker-compose up -d

Give the server time to pull down the lates images, and start.  When you seee the word 'done' in the command line, and are back at the prompt you are set. As long as you don't see any error messages you are ready to move to the client install.

Installing the Veloren Client

Go to the client downloa dpage for Veloren. They have installers for Windows, MacOS, and Linux OSes.  For Linux, I like the flatpak installer as it's containerized, and very easy to get and run.  

Note, unless you are running the server software on the same desktop / laptop machine you are running the client on, you should install the client on a different machine...not the server.

You'll see two options on the client download page.  One is for the actual game "Veloren".  The other is for a manager called "Arishipper".  I highly recommend you get Airshipper.

Airshipper will pulldown Veloren for you on the first run, and then also keep the game client up to date as updates come out every few days.

If you use ubuntu, and you don't have Flatpak installed yet, do the following command to install Flatpak, and add the Flathub repo to it.

sudo apt install flatpak -y

flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

Now reboot your client machine.

Once rebooted, you can run the command to install Airshipper via flathub.

flatpak install flathub net.veloren.airshipper

This will ask you a couple of questions most likely, just answer 'y' to them, and allow Airshipper to complete installation.

Once installed, you may have to reboot, or at least log out and back in...but see if you can find Airshipper in your distro menu first.

Start Airshipper, and you'll be presented with a window that shows an 'Update' button. Click it. Wait for Veloren to download.  The button will change to say 'Installing' after download completes, then finally change to say 'Play'.

Click Play.  

You'll now be presented with a screen, and in the top right, you'll see a note about creating an account for authentication.  You can absolutely use your own authentication server for your account, but you'll need to set thta up, and it's outside the scope of this tutorial.  I have simply used the authentication server provided by Veloren, as it simply authenticates me as a user, and then I still play from my own server.

If you want to create an account on the Veloren server go to https://veloren.net/account/ and create an account. Make sure to make a note of your username / password in a password manager like Vaultwarden or Bitwarden.

Once created, return to your game window and enter your credentials.  Now enter the IP of your server, or the domain / sub-domain if you have setup one up.

If you haven't setup a domain / sub-domain, and you are running the server on your local network only, you can use setup a domain or sub-domain you own, and can create an A-record for.  Just put your public IP address into the A-record of the domain or sub-domain (I have tutorials on how to do this as well), then on your router, forward ports 14004 and 14005 to your host server's private IP address from the outside internet (WAN).

Enter that into the server field. The nice thing about this, is your friends and family can also run servers, or share yours.  If they run a server, you can join other's servers and play, and the client keeps track of different servers you've joined over time, so you can switch back an forth more easily.

Now click Single Player if you intend to game alone, or Multi-player if you want to play with others.  Create a Character, and start exploring your new game world.

Make sure to check out the video above to see some highlights of game play!  It really is a fun game, and we have been having a blast with it.

Support my Channel and Content

Support my Channel and ongoing efforts through Patreon:
https://www.patreon.com/bePatron?u=234177