altmp/altv-server

By altmp

Updated 12 days ago

Official alt:V game server Docker image

Image
Languages & frameworks
3

100K+

altmp/altv-server repository overview

Quick Reference

What is alt:V?

alt:V is a free alternative multiplayer client for GTA:V.

How to use this image

See GitHub readme for up-to-date information.
See altmp/altv-voice-server for voice server Docker image.
See example docker-compose.json for reference on how to deploy game server with voice.

Usage

To start a minimal game server run:

docker run --rm -it -p 7788:7788 -p 7788:7788/udp altmp/altv-server:release

Configuration

The alt:V server is located at the path /altv inside the Docker container.

Server settings

There are two ways to specify server configurations:

Configuration via environment variables

This image allows you to set all existing server settings by specifying environment variables. All variables follow the syntax ALTV_SETTING_NAME, for a complete list of options look at the game server setup script.

In case of array values (arr('...')) specify a comma separated string.
In case of boolean values (bool('...')) specify true, yes, y or 1 for true, or false, no, n, or 0 for false.
In case of JSON values (jsonObj('...')) specify a valid JSON object

Example:

docker run --rm -it \
    -p 7788:7788 -p 7788:7788/udp \
    -e ALTV_PLAYERS=100 -e ALTV_DEBUG=true \
    altmp/altv-server:release
Configuration via volumes

You can provide your own config file to configure your server. To do this, mount the file to /altv/server.toml and specify the environment variable ALTV_USE_ENV_CONFIG=false.

Example:

docker run --rm -it \
    -p 7788:7788 -p 7788:7788/udp \
    -v ./server.toml:/altv/server.toml \
    -e ALTV_USE_ENV_CONFIG=false \
    altmp/altv-server:release
Arguments

Arguments of the Docker image get passed directly to altv-server. See CLI arguments ↗ for more info.

Example:

docker run --rm -it \
    -p 7788:7788 -p 7788:7788/udp \
    altmp/altv-server:release \
    --convert-config-format

Resources

If server is configured using environment variables by default the Docker image loads all resources located in /altv/resources. You can override this behavior by specifying custom resources array via configuration.

Example:

docker run --rm -it \
    -p 7788:7788 -p 7788:7788/udp \
    -v ./resources:/altv/resources \
    -e ALTV_RESOURCES=resource1,resource2 \
    altmp/altv-server:release

Modules

By default, this image includes JS Module ↗ and C# Module ↗ on all branches. On release branch this image also includes JS Bytecode Module ↗.
To load custom modules add them to /altv/modules, and specify custom modules array via configuration.

Example:

docker run --rm -it \
    -p 7788:7788 -p 7788:7788/udp \
    -v ./my-module.so:/altv/modules/my-module.so \
    -e ALTV_MODULES=js-module,csharp-module,my-module \
    altmp/altv-server:release
``

## Usage as a base image

In a lot of cases it will be much more convinient to create your own Dockerfile, that is using this image as a base. This way you can modify every part of the server, include your resources, setup configuration, etc.

Example:
```dockerfile
FROM altmp/altv-server:release

ENV ALTV_NAME="My cool server"
ENV ALTV_DEBUG=true

COPY my-cool-resource /altv/resources/my-cool-resource

Tag summary

Content type

Image

Digest

sha256:1665cac13

Size

432.1 MB

Last updated

12 days ago

docker pull altmp/altv-server:16.4-csharp