Warning
This image is available for versions starting from alt:V 15, which is currently under development and not available for productive use. Until the final alt:V 15 release this image will be only available for thedev
branch. For productive use see the unofficial image ↗ meanwhile.
To start a minimal release server run:
docker run --rm -it -p 7788:7788 -p 7788:7788/udp altmp/altv-server:release
The alt:V server is located at the path /altv
inside the Docker container.
There are two ways to specify server configurations:
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 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.
Example:
docker run --rm -it \
-p 7788:7788 -p 7788:7788/udp \
-e ALTV_PLAYERS=100 -e ALTV_DEBUG=true \
altmp/altv-server:release
You can provide your own server.toml
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 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
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
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
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:
FROM altmp/altv-server:release
ENV ALTV_NAME="My cool server"
ENV ALTV_DEBUG=true
COPY my-cool-resource /altv/resources/my-cool-resource
Special thanks to @pixlcrashr at @eisengrind who created and has been maintaining the unofficial alt:V server Docker image ↗.
See LICENSE for more information.