WARNING: The forum is now in read-only mode as we will soon be transitioning to different forum software. Feel free to join our Discord server in the meantime.
User avatar
Rodney
Posts:427
Joined:Mon Dec 17, 2012 7:56 pm
Location:On the Battlefield
Contact: Website WLM Yahoo Messenger AOL Facebook Skype Twitter YouTube
Venice Unleashed Dedicated Server Tutorial

Thu Dec 24, 2015 12:27 am

Server.key files are not publicly available yet. Do not create forum threads about it and do not message me about it.

Hosting your own server using the VU client is a core feature of Venice Unleashed. This tutorials aims to provide you with most information and instructions necessary to use this feature to set up your own Venice Unleashed dedicated server.
It only covers the basic setup, more advanced topics (i.e. centralized management of multiple instances) are not covered.

Index
  1. General
  2. Setup instructions
  3. Configuration and Remote Administration
  4. Linux (experimental)
  5. FAQ

1. General

Prerequisites
  • OS Windows 7/Windows Server 2008 R2 or newer recommended
  • RAM 512 MB free
  • CPU 30 Hz (default) 1st gen i7, 5600-Series Xeon, AMD FX-6000 Series
  • CPU 60/120 Hz 3rd gen i7/i5, E3/E5 v2 Xeon or newer. AMD no es bueno
  • Network 5+ Mbps up/down
  • HDD 50 GB (SSD or 10k/15k SAS recommended)
  • An Origin account with BF3, DLCs/Premium are optional but recommended
  • A server.key file for your server instance (see above!)
  • Common Sense
The server will run on bare metal as well as in virtualized environments. VMware and kvm based solutions have been used in the past and worked without issues.

Further information
You can see this thread for more details on CPU, Network and memory consumption under load: Some Notes on High Frequency Server Performance

OS
VU Servers should run on any 32-Bit and 64-Bit versions of Windows newer than XP. My personal recommendation is Windows Server 2012 R2. Running it on Vista / Windows Server 2008 is not recommended.

RAM
VU servers can use up several hundred Megabytes of RAM. Make sure that you have at least 500 MB available for each of your VU instances.

CPU
The main simulation of BF3/VU runs in a single thread. This means a CPU with 4 or even 2 powerful cores is better for high frequency servers than a CPU with 6 or more cores that has a better overall but lower single-thread performance. 120 Hz with more than 32 players is almost impossible and even less than or equal to 32 players will require one of the most powerful single-thread CPUs on the market, i.e. the i7 4790K/6700K or the Xeon 1281v3.
AMD CPUs have not been tested but given their comparatively poor performance in single-threaded benchmarks it is safe to assume that they will not perform well for high frequency servers.
See the thread linked above for more details.

HDD
Currently a Venice Unleashed dedicated server requires a full installation of Battlefield 3 and VU. This might change soon™ since a lot of the content that makes up the huge files is not needed for a server (sound, textures, etc.).
Since the server needs to load its resources from the large game files SSDs or 10k/15k SAS drives are recommended. Especially for non-DLC maps.

Network
Normal frequency servers do not require as much bandwidth as high frequency servers. More than 5 Mbps are recommended. See the thread linked above for more details.

DLCs
DLCs are not required to play VU or host a VU server. However at the moment there is no way for a client or server to check which maps are installed. Joining a server that is running a map your client does not have or switching a server to a map that it does not have will result in a crash.


2. Setup Instructions
Install BF3
The installation is straightforward and mostly the same as for a client:
  1. Install Origin and log in with your account
  2. (optional) change your install location, i.e. to C:\Servers
  3. Install BF3 (you can uncheck "install Punkbuster")
  4. Install VU
  5. Activate your game (see below)
  6. (optional) uninstall Origin after you have activated your game
In order for your server to work correctly you must activate BF3. You can do this in several ways:
  • Launch vu.exe, a window asking you to activate the game will pop up, do that and you are done
  • Open a command prompt inside your BF3 Folder (Or VU Folder if you used the new installer) and execute the following to activate your game:
    vu.com -activate -o_mail <your_origin_email> -o_pass <your_origin_password>
Set up your first instance
You can download the attachment of this post and use the "VU_Sample_Instance" Folder and "startscript.bat" included to get a basic instance. If you do so you can skip step 1, though you might want to move the example instances folder somewhere else.
  1. Create a folder for your Instance. For example "C:\Servers\VU_Instances\VU_Sample_Instance". Create a folder called "Admin" inside of that folder
  2. Decide on ports for your server (see below for a list of default ports). Make sure the ports are forwarded and opened up in your firewall(s)
  3. Create a new or edit an existing start script (i.e. from the example instance, make sure to change paths to the VU installation directory instead of your Battlefield installation location if you used the new installer). See the required and optional launch parameters below
  4. Copy the "server.key" file into the instance folder (Server keys are not available to the general public yet)
  5. Launch your server by double-clicking the script or executing it from a command prompt
  6. Once your servers says "Game successfully registered with Zeus." it should be visible on the server list and joinable!
Once you have completed those steps and verified that you can join your server you can go to the next point in this tutorial which will deal with configuring the instance. If you want your sever to be running in high frequency mode use the command line parameter for the frequency you wish to use from the list below.

Ports
  • mHarmony Default: 7948 | Type: UDP
  • Game Default: 25200 | Type: UDP
  • RCON Default: 47200 | Type: TCP
Command line parameters
  • -server -dedicated required to launch a server instead of a client!
  • -listen <IP>:<Port> specifies IP:Port that the game server listens on.
  • -RemoteAdminPort <IP>:<Port> specifies IP:Port that the RCON server listens on.
  • -mHarmonyHost <IP>:<Port> specifies IP:Port that the mHarmony server listens on.
  • -serverInstancePath specifies the path to your Instance folder
  • -name (optional) Server name, will be overwritten if you set the variable in your startup script
  • -high60 / -high120 (optional) will run the server in 60 or 120 Hz mode respectively
  • -headless (optional) will run the server without GUI
  • -noUpdate Skips checking for updates. If you want to update during a scheduled time you might want to use this option to keep the server from automatically updating during startup. This also allows you to run multiple instances off of one installation without having to worry about not being to restart once an update has been pushed
  • vu.com (instead of vu.exe) will also run the server without GUI but with log output redirected to the console

3. Configuration and Remote Administration
Remote Administration is mostly the same as with a vanilla BF3 server.
Here are some good sources you can use for creating/editing your startup file (the start up configuration) and learn more about the configuration option as I will not cover all of them in this section:
If you downloaded the attached sample instance you are pretty much set for a normal VU instance, just change the values (i.e. the admin password) in Admin/Startup.txt to your linking and start up your instance.
You can also create a startup script using Procon's Startup.txt generator. Write your startup commands in a file called 'Startup.txt' and put it in the 'Admin' folder in your instance directory.
The map list can be created using RCON tools, it will be written to disk automatically if you use Procon. Other RCON tools might require additional actions to send the "mapList.save" command.

Generally you want to use a RCON client with a GUI, here are some I have used in the past:
  • Procon (optional Procon layer to run 24/7, can be self-hosted on windows or linux with the help of mono)
  • Procon for Android (not free)/iOS (free)
  • BF3CC
  • BFRCON (not free, monthly cost [4€/server/month], many plugins for stats and logging, nice Web UI)
  • rconNET (limited free version, monthly cost [2.99€/server/month, cheaper if you have several servers], many plugins and logging)
General differences
  • The maximum player count is not set using launch parameters, use the "vars.maxPlayers" variable in Startup.txt instead.
  • The maximum player count displayed in Procon (or other rcon tools) is player slots + spectator slots
  • At the moment there is no way to configure spectator slots
  • Passwords for spectators and players are the same
VU specific RCON commands
  • vu.ColorCorrectionEnabled enable/disable the infamous blue-tint
  • vu.DesertingAllowed enable/disable leaving the combat area
  • vu.DestructionEnabled enable/disable destruction
  • vu.FrequencyMode read-only: get the current frequency (high60/high120 or regular)
  • vu.HighPerformanceReplication Improves replication of things happening further away from the player. Requires more bandwidth
  • vu.LimitTeams enable/disable switching to a team that has more players
  • vu.ModList.Add add a VeniceExt mod to the mod list
  • vu.ModList.Clear clear the mod list
  • vu.ModList.List list the enabled mods
  • vu.ModList.ReloadExtensions reload mods from disk
  • vu.ModList.Remove remove a mod from the list
  • vu.ModList.Save save the list to disk
  • vu.ModList.UnloadExtensions unload all mods
  • vu.SetTeamTicketCount Set the amount of tickets for the specified team (1 or 2)
  • vu.SpectatorCount read-only: returns current number of spectators
  • vu.SunFlareEnabled enable/disable the flares of light sources
  • vu.SuppressionMultiplier Controls the amount of suppression, 0 disables it entirely. Only accepts integers
  • vu.TimeScale Range: 0 - 2.0, changes the simulation speed of the game (requires more/less CPU power depending on setting)
  • vu.VehicleDisablingEnabled enable/disable vehicle disabling (harder controls + damage over time when damaged below a certain health threshold)


4. Linux (experimental)
Linux support is something a lot of people have asked for and it was added late 2015. It relies on Wine and will work on most if not all popular linux distributions. It does not require an X server and thus works on headless servers.

WARNING: This is experimental and for advanced users only. This has not been tested with more than 3 connected players at once. You might encounter bugs and crashes. It is also not known how the performance is compared to running the server on windows.

Wine versions <= 1.6 do not work. Wine 1.7 and 1.8-rc3 have been successfully tested.
In general it seems that as long as Wine >= 1.7 is available on your system VU servers should run.

Notes for all tested distributions:
  • Ubuntu Server 14.04.3 (64 Bit) The default repositories only offer Wine 1.6. For instructions see below
  • Debian 8 (jessie, 64 Bit) The default repositories's Wine package version is 1.6, use "wine-development" instead. You can also use wine-development from backports for a more recent version
  • Fedora Server 23 (64 Bit) (probably RHEL/CentOS too) Wine 1.7 is available from default repositories, make sure the firewall is configured correctly to allow connections to your VU instance
  • openSUSE Leap 42.1 (64 Bit) Wine 1.7 can be installed from default repositories. An additional repository offers 1.8 (see Wine website)
All of those tests have been completed before Wine 1.8 was released. The available packages might change, i.e. be updated to the new stable 1.8 release.
They were conducted in virtual machines virtualized using VMware ESXi. But there is no reason it would not work on a bare metal installation or other hypervisors as well.
The installation of BF3/VU is the same for all distributions, see the last steps of the Ubuntu tutorial below.

Step-by-step installation on Ubuntu Server 14.04
  • Prerequisites
    • an up to date installation of Ubuntu server 14.04
    • at least 512 MB of free RAM
    • about 40 GB of free disk space
    • a windows machine with BF3 (+ VU) installed and up to date
  • Installation of Wine
    Add the Wine ppa and install wine1.9 like this (press Enter if asked. Skip the first step if you don't have a 64 bit system):

    Code: Select all

    sudo dpkg --add-architecture i386
    sudo add-apt-repository ppa:wine/wine-builds
    sudo apt-get update
    sudo apt-get install --install-recommends winehq-staging

    Congratulations, that's it for Wine!
  • Installation of BF3/VU
    Copy over your BF3 installation from the Windows machine.
    If the VU files are not included in your BF3 installation (this is the case if you used the new installer) then you can either copy them from your VU installation directory or download the VU client zip file from the VU website instead.
    Make sure that the VU files are inside of your BF3 directory, unless you manually created the required entries in your Wine registry.

    Once you have done that activate and test the game/VU like this:

    Code: Select all

    wine vu.com -activate -o_mail <your_origin_email> -o_pass <your_origin_password>
    wine vu.com -server -dedicated

    - The first command will activate your game's copy. This step is required because VU does not bypass the game's DRM.
    - The second command will start your VU server. It should terminate with a message saying that you do not have a 'server.key' file in your instance directory.
  • Example instance and start script
    Instance setup is mostly the same as on windows. Use the instructions above to create your instance but skip the steps that require you to launch it. If you want a template for a Linux start script use the 'starscript.sh' file included in the example instance. When you are done setting up your instance, make your start script executable and start your server like this:

    Code: Select all

    chmod +x startscript.sh
    ./startscript.sh

    If your server is visible and joinable continue with the Configuration and Remote Administration part of the tutorial.
Tips and Tricks
  • To remove Wine errors from the console output you can change prepend "WINEDEBUG=-all" to your start command, i.e. "WINEDEBUG=-all wine vu.com [...]".
  • To access your home directory (i.e. if your instances are stored there) use "Z:\home\<user>\<path_to_instance>"
  • Make sure your firewall (if any) has the necessary ports opened to the outside (see windows instructions for ports)
  • Run your server in a screen session

5. FAQ
  • Q: Can I bind the server to a specific IP-Address if my server has more than one?
  • A: Currently binding the server to an IP-Address is not working correctly, see this issue on the Community Issue Tracker: https://github.com/EmulatorNexus/Venice ... issues/153
  • Q: Can I update a VU installation that has multiple instances running off of it?
  • A: No, you need to close all instances running off of the VU installation you want to update.
Attachments
example_instance.zip
(2.77KiB)Downloaded 1415 times
Last edited by Rodney on Fri Jan 08, 2016 4:09 pm, edited 1 time in total.
Reason: Updated ubuntu install guide to reflect changes on the Wine website.
There used to be a signature here.

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 15 guests