2. Installation
This will tell you how to setup a private mirror of Athena.

Installing Athena

Ensure that you have followed and completed the Before Setup instructional page. The prerequisites inside of that page are deeply important for making alt:V Athena function out of the box.

Table of Contents

Setup Private Repo

Create a bare clone of the Athena Repository
1
git clone https://github.com/Stuyk/altv-athena --bare altv-athena-bare
Copied!
Create a new private repistory on github. Let's call it altv-athena-private
Copy your URL from github.
Move into the bare directory from your command line tool of choice
1
cd altv-athena-bare
Copied!
Mirror the bare repository to your private mirror.
1
git push --mirror <your_github_url_here>
Copied!
Delete the bare repository.
1
cd ..
2
rmdir altv-athena-bare
Copied!

Set Private Repo Main Branch to Master

Download from Private Repo

Clone the repository down from github.
1
git clone <your_github_url_here>
Copied!
Add the upstream of the original athena repository.
1
git remote add upstream [email protected]:Stuyk/altv-athena.git
2
git remote set-url --push upstream DISABLE
Copied!

Updating Submodules

This downloads all of our other repository dependencies such as the Ares Authorization Service.
1
git submodule update --init --recursive --force --remote
Copied!

Installing Dependencies

This installs all NodeJS packages and dependencies that help run the server.
1
npm install
Copied!

Installing Server Files

From this point forward you can simply run this npm command to update dependencies.
1
npm run update
Copied!

Using License Key

The license key is unique to your Gumroad Transaction. The license key should be kept a secret.
The Official alt:V Athena Discord will allow you to manage your license key and IP(s) which can use it through the Athena Key Manager Bot.
Please make sure to join and and !help to get information about the bot.
You should either refresh your email and key to keep it active. The backend service will check the validity of the key.
1
!refresh <gumroad_email> <key>
Copied!
After binding the license you can append your IP to your license or any of your developer(s).
1
!append <key> <ip>
Copied!

Important Configuration

Creating the .env File
In the same directory as your package.json file. Create a file called .env and open it up in whatever text editor you like to use. Add the following lines to your .env file depending on what you need.
This file should not have ANY EXTENSION make sure it doesn't say it's a text document. You have to modify the extension of the file to make this work. Pick up a program like VSCode to do this. I cannot stress this enough .env.txt is not the same as a .env file. Make sure your file is actually called .env with no extension.
Bare Minimum Configuration
Configuration Options
1
# Optional Discord Bot Integration
2
DISCORD_BOT=<DISCORD_BOT_KEY>
3
4
# Optional Discord Whitelist Role ID
5
WHITELIST_ROLE=<SOME_ID>
6
7
# A connection string for MongoDB. If using localhost don't bother.
8
MONGO_URL=<MONGODB_CONNECTION_STRING>
9
10
# List of Collections to Generate Besides the Default(s)
11
# Collections are also known as tables.
12
MONGO_COLLECTIONS=SomeCollection,SomeOtherCollection,SomeMoreCollection
13
14
# You must specify your localhost here with port :9111
15
# Only used for development mode on a local machine.
16
# Otherwise import 'webserver' as a resource.
17
WEBSERVER_IP=127.0.0.1:9111
Copied!

Obtaining your Own IP

Windows
Just google what is my IP.
Linux
Run the following in your terminal.
1
curl ipinfo.io/ip
Copied!

Port Forwarding

You will need to port forward for the following ports on TCP & UDP.
1
7788
Copied!

Checking Ports

Append your IP into this website with both ports while your server is running to verify that the ports are open.

Running the Server

Running the server should always be done through your command line, terminal, or powershell interface. You should use the npm scripts that included inside of package.json.
HEY, LISTEN!
When you run a server in production mode that means that your server is running without development node. You should be modifying your server.cfg and removing debug mode and adding the webserver resource before core.
Example:
1
resources: ["webserver", "core"],
Copied!
Please do not forget to do this!
Make sure you follow the full setup before running any of this.

Running Production on Windows

1
npm run windows
Copied!

Running Production on Linux

1
npm run linux
Copied!

Running in Debug / Auto Refresh Mode

You need to run one simple command. This will start your server, webserver, and an auto-reconnection client.
Only works on Windows.
1
npm run dev
Copied!
Replace windows with linux if you are using linux.

What is Next?

Read the next page of this tutorial to fully understand how to save your changes and work with incoming Athena updates.
Last modified 3mo ago