Installs the Velocity Minecraft Proxy.
After the role is run, a velocity service will be available on the server. You can use service velocity [start|stop|restart|status] to control the proxy.
Java 17 or higher must be installed. You can install it using the geerlingguy.java role or your own method.
Available variables are listed below, along with default values (see defaults/main.yml):
velocity_version: 3.4.0-SNAPSHOTThe version of Velocity to install.
velocity_path: /opt/velocityThe installation directory for Velocity.
velocity_group: velocityThe system group under which Velocity will run.
velocity_user: velocityThe system user under which Velocity will run.
velocity_java_maximum_memory: 2048MThe maximum Java heap size allocated to Velocity.
velocity_java_initial_memory: 2048MThe initial Java heap size allocated to Velocity.
velocity_config: velocity.tomlThe name of the Velocity configuration file.
velocity_bind_addr: 0.0.0.0:25565The IP address and port Velocity will listen on.
velocity_motd: <#09add3>A Velocity ServerThe server MOTD (Message of the Day) shown to players.
velocity_show_max_players: 500The number of maximum players displayed in the server list.
velocity_online_mode: trueWhether Velocity should enforce online mode (player authentication with Mojang/Microsoft).
velocity_force_key_authentication: trueForces Velocity to verify player keys to ensure connection security.
velocity_prevent_client_proxy_connections: falsePrevents players from connecting using other proxies.
velocity_player_info_forwarding_mode: "NONE"The method used to forward player information (e.g., NONE, BUNGEEGUARD, MODERN).
velocity_forwarding_secret: ""The secret key used for player information forwarding (if enabled).
velocity_announce_forge: falseEnables or disables announcing Forge support to clients.
velocity_kick_existing_players: falseIf true, existing players will be kicked if they log in again.
velocity_ping_passthrough: "DISABLED"Whether server ping requests should be passed through to a backend server.
velocity_sample_players_in_ping: falseIf true, Velocity will sample players in the server list ping.
velocity_enable_player_address_logging: trueIf true, Velocity will log the IP addresses of players connecting.
velocity_servers:
- name: lobby
addr: 127.0.0.1:30066
- name: factions
addr: 127.0.0.1:30067
- name: minigames
addr: 127.0.0.1:30068The list of backend servers available to Velocity.
velocity_try:
- lobbyThe list of servers Velocity should attempt to connect players to by default.
velocity_forced_hosts:
lobby.example.com:
- lobby
factions.example.com:
- factions
minigames.example.com:
- minigamesMapping of hostnames to backend servers.
velocity_advanced_compression_threshold: 256The threshold (in bytes) for compressing packets.
velocity_advanced_compression_level: -1Compression level for packets (-1 uses the default).
velocity_advanced_login_ratelimit: 3000Rate limit for login attempts (in milliseconds).
velocity_advanced_connection_timeout: 5000Timeout for client connections (in milliseconds).
velocity_advanced_read_timeout: 30000Timeout for reading data from clients (in milliseconds).
velocity_advanced_haproxy_protocol: falseEnables or disables HAProxy protocol support.
velocity_advanced_tcp_fast_open: falseEnables or disables TCP Fast Open.
velocity_advanced_bungee_plugin_message_channel: trueIf true, Velocity will use the BungeeCord plugin messaging channel.
velocity_advanced_show_ping_requests: falseIf true, logs all ping requests for debugging.
velocity_advanced_failover_on_unexpected_server_disconnect: trueIf true, players are moved to another server if their current server disconnects unexpectedly.
velocity_advanced_announce_proxy_commands: trueIf true, proxy commands are announced to the connected servers.
velocity_advanced_log_command_executions: falseIf true, executed commands are logged.
velocity_advanced_log_player_connections: trueIf true, player connections are logged.
velocity_advanced_accepts_transfers: falseEnables support for plugin-based server transfers.
velocity_advanced_enable_reuse_port: falseIf true, enables SO_REUSEPORT for improved performance.
velocity_advanced_command_rate_limit: 50Maximum allowed commands per second before rate-limiting applies.
velocity_advanced_forward_commands_if_rate_limited: trueIf true, rate-limited commands will still be forwarded.
velocity_advanced_kick_after_rate_limited_commands: 0Number of rate-limited commands before a player is kicked. 0 disables kicking.
velocity_advanced_tab_complete_rate_limit: 10Maximum allowed tab completions per second before rate-limiting applies.
velocity_advanced_kick_after_rate_limited_tab_completes: 0Number of rate-limited tab completions before a player is kicked. 0 disables kicking.
velocity_query_enabled: falseEnables or disables the server query protocol.
velocity_query_port: 25565The port for query requests.
velocity_query_map: "Velocity"The map name returned by query requests.
velocity_query_show_plugins: falseIf true, query responses will include the list of installed plugins.
velocity_plugins_src: plugins/Directory containing plugins to be deployed to Velocity.
None.
- hosts: server
vars_files:
- vars/main.yml
roles:
- role: geerlingguy.java
- role: niklaszerozero.velocityInside vars/main.yml:
velocity_bind_addr: 0.0.0.0:25565
velocity_motd: "<#09add3>My Custom Proxy"
velocity_servers:
- name: lobby
addr: 192.168.1.100:30066
velocity_try:
- lobby
velocity_forced_hosts:
proxy.example.com:
- lobbyMIT
This role was created in 2025 by Niklas Vlach.