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.
Create a bare clone of the Athena Repository
git clone https://github.com/Stuyk/altv-athena --bare altv-athena-bare
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
Mirror the bare repository to your private mirror.
git push --mirror <your_github_url_here>
Delete the bare repository.
cd ..rmdir altv-athena-bare
Clone the repository down from github.
git clone <your_github_url_here>
Add the upstream of the original athena repository.
git remote add upstream [email protected]:Stuyk/altv-athena.gitgit remote set-url --push upstream DISABLE
This downloads all of our other repository dependencies such as the Ares Authorization Service.
git submodule update --init --recursive --force --remote
This installs all NodeJS packages and dependencies that help run the server.
From this point forward you can simply run this
npm command to update dependencies.
npm run update
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.
!refresh <gumroad_email> <key>
After binding the license you can append your IP to your license or any of your developer(s).
!append <key> <ip>
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
# Optional Discord Bot IntegrationDISCORD_BOT=<DISCORD_BOT_KEY># Optional Discord Whitelist Role IDWHITELIST_ROLE=<SOME_ID># A connection string for MongoDB. If using localhost don't bother.MONGO_URL=<MONGODB_CONNECTION_STRING># List of Collections to Generate Besides the Default(s)# Collections are also known as tables.MONGO_COLLECTIONS=SomeCollection,SomeOtherCollection,SomeMoreCollection# You must specify your server's IP Address here.WEBSERVER_IP=<YOUR_SERVER_IP>
Just google what is my IP.
Run the following in your terminal.
You will need to port forward for the following ports on TCP & UDP.
DO NOT SKIP THIS. NOBODY CAN JOIN WITHOUT IT.
Append your IP into this website with both ports while your server is running to verify that the ports are open.
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
Make sure you follow the full setup before running any of this.
npm run windows
npm run linux
You need to run one simple command. This will start your server, webserver, and an auto-reconnection client.
Only works on Windows.
npm run dev
Replace windows with linux if you are using linux.
Instead of being super ineffecient and merging files in one at a time, you're going to be using git to pull down changes. Which does things mostly automatically.
Here are some notes before you perform these actions (SUPER IMPORTANT):
Close All Open Files
Push All Current Change to Private Repository
Create a backup of your current folder
Run the two commands below.
git fetch upstreamgit pull upstream master
If you run into merge conflicts... see the video below. It will help you understand what needs to be done to resolve merge conflicts.
Don't worry I made a simple video to help explain merge conflicts. Check out this video:
Merge conflicts only occur when you are pulling in new data from an existing repository. This means that it found similar code but isn't sure if you want to override your current code or mix the two. A merge conflict can easily be seen inside vscode when pulling dwon from the upstream.
If you make changes in your private clone. You can now simply push to the private repository and pull it down anywhere. Which is really great.
Here's how you can push changes.
git add .git commit -m "What did I commit to the repo"git push origin master