Host a Domain from a Local or Cloud Linux Server
The Vircadia packages can help you get your own domain up and running quickly.
You can run these same commands on an existing Vircadia domain to upgrade it if the original domain was installed using the package. Packages are currently available for the following distributions:
Ubuntu Server 18.04 LTS (2022.1.1 Selene)
wget https://github.com/vircadia/vircadia/releases/download/2022.1.1/vircadia-server-2022.1.1-Selene-Ubuntu18.04_amd64.deb sudo apt-get update && sudo apt-get install ./vircadia-server-2022.1.1-Selene-Ubuntu18.04_amd64.deb
Ubuntu Server 20.04 LTS (2022.1.1 Selene)
wget https://github.com/vircadia/vircadia/releases/download/2022.1.1/vircadia-server-2022.1.1-Selene-Ubuntu20.04.4_amd64.deb sudo apt-get update && sudo apt-get install ./vircadia-server-2022.1.1-Selene-Ubuntu20.04.4_amd64.deb
Rocky Linux 8.x (2022.1.1 Selene)
sudo yum install https://github.com/vircadia/vircadia/releases/download/2022.1.1/vircadia-server-2022.1.1-Selene.Rocky8.x_x86_64.rpm
If you do not see your distribution listed here, you may compile your own server from source with the Linux build guide.
The installation packages will create a domain at the default port location and configure a service to keep it running on that machine.
For the list of network ports that you will need to open and manage, see here.
Connect a web browser to the server at port 40100. (If you are on the machine that the server is running on, this would be http://localhost:40100) Complete the initial setup wizard and you should have a functioning domain.
Files and Server Configuration
The program files are installed in /opt/vircadia:
/opt/vircadia contains the executables
/opt/vircadia/lib contains libraries required for operation
/opt/vircadia/plugins is currently used for audio codecs
/opt/vircadia/resources is required for the administrative website
The executables in this folder (with the exception of
new-server) cannot be launched from the command prompt without first setting
/etc/opt/vircadia/default.conf contains any environment variables necessary to running the domain.
All content is stored under
/var/lib/vircadia/default. All files underneath
/var/lib/vircadia are owned by the user
vircadia, which is also the user that runs all domain-related processes.
The installation packages setup the following systemd services to manage the Vircadia domain:
email@example.com: Manages the core domain server
firstname.lastname@example.org: Spawns and manages the assignment clients
email@example.com: Controls startup and shutdown of the above services
firstname.lastname@example.org service is the only one that is set to auto-start. Starting or stopping it will bring the other two services down.
The first two services log a large amount of data to their service journal. Checking their logs (via
systemctl status) is a good way to ensure they are operating properly.
The installation package is configured to permit multiple domains to run on a single server at different port numbers. New servers can be created using the following command:
/opt/vircadia/new-server <name> <base-port>
name is a word used to name and manage the domain and
base-port must be the the first of a range of four contiguous port numbers not overlapping with any other use on the system.
Assuming you created a new server with the name my-server-two, this would setup the following:
Environment variables in
Content stored in
Services launched as
Deleting a Vircadia Server
Uninstall the package.
# Ubuntu # Note: 'apt-get purge' will remove configuration files as well. Use 'apt-get remove' to keep them. sudo apt-get purge vircadia-server # Amazon Linux 2 sudo yum remove vircadia-server
Deleting a Domain from a Multiple Domain Installation
Find the name of the domain that you want to remove.
sudo ls ~vircadia
Pick the name of the domain that you want to remove from the list and then stop it.
sudo systemctl stop [email protected]<INSERT NAME HERE>.target
Disable the service for the domain.
sudo systemctl disable [email protected]<INSERT NAME HERE>.target
Remove the associated environment variables.
sudo rm /etc/opt/vircadia/<INSERT NAME HERE>.conf
Remove all data and configurations.
sudo rm -rf ~vircadia/<INSERT NAME HERE> sudo rm -rf /var/lib/vircadia/<INSERT NAME HERE>
There are a number of tweaks that are made to the default configuration to simplify storage and the ability to run multiple domains on one server. In case you would like to remove this logic and run the servers closer to how a Vircadia server compiled from source would run, this is provided as an option.
Systemd services named
vircadia-server.target(without the @name) have simplified configuration
No file is provided to specify environment variables for the server
Content would be stored in