Tutorial:Setup Linux Server

From alt:V Wiki
Jump to navigation Jump to search

Setup alt:V server for Linux

You need to run alt:V server at least on Debian 10 or Ubuntu 18.04.

If you want use JavaScript for server-side you should install NodeJS firstly, same thing for C# .NET Core and .NET Core SDK If you want to develop them by yourself.


It is recommended to use altv-serverupdater to have easy downloaded server-files (and in future updated). Remember that you need to have installed dependencies on your linux for that updater (coreutils, wget, >=jq_1.4). However, you can also just download the serverfiles from our website and upload them manually to your server.

Running the alt:V-serverupdater:

sudo apt update && sudo apt upgrade && sudo apt-get install libc-bin && sudo apt-get install libatomic1 && sudo apt install wget && sudo apt-get install jq && sudo apt install curl #if it doesn't work run this
mkdir server && cd server
wget -O 'update.sh' 'https://raw.githubusercontent.com/Lhoerion/altv-serverupdater/master/update.sh'
chmod +x ./update.sh
chmod +x ./altv-server

Creating a config file

Make a new file in server root folder named server.cfg and paste this:

name: 'alt:V Server'
port: 7788
players: 128
#password: ultra-password
announce: false
#token: YOUR_TOKEN
gamemode: Freeroam
website: example.com
language: en
description: 'alt:V Sample Server'
modules: [ js-module ]
resources: [

Starting a server

Now you have all server files that you need. Let's try to start server with start.sh


Done. :)

Running alt:V server as a systemd.service

It is possible to run the alt:V server as a systemd.service. This gives you the following advantages:

  • You can make the server automatically restart when it crashes
  • You can easily start/stop it with simple commands, without navigating to the server directory
  • You can add the alt:V server to the autostart

Adding the service

Create the file /lib/systemd/system/altv.service with any editor of your choice. In this example we're using nano.

sudo nano /lib/systemd/system/altv.service

Paste the following snippet inside this file and modify it to your needs. Make sure to change the paths and user/group, otherwise it won't work.

Description=alt:V Server
ExecStop=kill -15 $MAINPID

Now save the file and enable the service with

systemctl enable altv.service

Congratz! The service has been successfully added. alt:V will now automatically boot with your server and restarts, if it crashes. You also now have access to the following commands:

service altv start # start the server
service altv stop # stop the server
service altv status # get the current status of your server with console output
service altv restart # restart the server

Keep in mind to never run applications as root user, as this might be a security risk.