<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Install CoD4xWebadmin on Ubuntu 16.04, 17.04, 18.04]]></title><description><![CDATA[<p dir="auto">Install CoD4x Webadmin on Ubuntu 16.04 17.04 18.04 from scratch</p>
<p dir="auto"><strong>1. Create a user for our Game Servers (if you already have a user and run some cod4 servers you dont need this part)</strong></p>
<p dir="auto">Open the terminal(putty) and type</p>
<pre><code>adduser cod4
</code></pre>
<p dir="auto">You will be asked some additional questions.<br />
First, you will need to enter and confirm a password for this user.<br />
Then you will be asked for some additional information about the user, such as full name, room number, work phone, home phone and other. This information is optional and you can just press ENTER on each question to skip it.<br />
In the end, you will be asked for confirmation of all the information you have entered so far. If everything is correct just press Y and then Enter.</p>
<p dir="auto">This is the output that you should get, for our new user called “cod4”:</p>
<pre><code>Adding user `cod4' ...
Adding new group `cod4' (1000) ...
Adding new user `cod4' (1000) with group `cod4' ...
Creating home directory `/home/cod4' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for cod4
Enter the new value, or press ENTER for the default
Full Name []:
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [Y/n] Y
</code></pre>
<p dir="auto">With this, a new user and group named “cod4” have been successfully created. Its home directory has also been created at the following location on your server: /home/cod4</p>
<p dir="auto">You can now log in as the “cod4” user to your server using the password you have set up.</p>
<p dir="auto">Add User to the sudo Group on Ubuntu 16.04 17.04 18.04 with next command</p>
<pre><code>usermod -aG sudo cod4
</code></pre>
<p dir="auto">You can also verify if our user is now a member of the sudo group , with the groups commands:</p>
<pre><code>groups cod4
</code></pre>
<p dir="auto">You should get the following output, showing that “cod4” is a member of both cod4 and the sudo group:</p>
<pre><code>cod4 : cod4 sudo
</code></pre>
<p dir="auto"><strong>2 Install Node js and NPM</strong></p>
<p dir="auto">Refresh your local package index by typing</p>
<pre><code>sudo apt update
</code></pre>
<p dir="auto">Install Node.js from the repositories:</p>
<pre><code>sudo apt install nodejs
</code></pre>
<p dir="auto">If the package in the repositories suits your needs, this is all you need to do to get set up with Node.js. In most cases, you'll also want to also install npm, the Node.js package manager. You can do this by typing:</p>
<pre><code>sudo apt install npm
</code></pre>
<p dir="auto">Finally, verify that Node.js is installed</p>
<blockquote>
<p dir="auto">indicates output</p>
</blockquote>
<pre><code>node -v
 
&gt; v10.9.0
</code></pre>
<p dir="auto">Also, check the version of NPM.</p>
<pre><code>npm -v

&gt; 6.2.0
</code></pre>
<p dir="auto"><strong>3 Install MongoDB and setup a user for our database</strong></p>
<p dir="auto">First, it’s essential to update the server before attempting to install MongoDB:</p>
<pre><code>sudo apt update
</code></pre>
<p dir="auto">When the server is finishing updating, it’s time to install MongoDB:</p>
<pre><code>sudo apt install -y mongodb
</code></pre>
<p dir="auto">Once MongoDB is installed, you will need to start and stop MongoDB, verifying that it functions correctly:</p>
<pre><code>sudo systemctl start mongodb
sudo systemctl stop mongodb
</code></pre>
<p dir="auto">This will output the current database version, the server address and port, and the output of the status command:</p>
<pre><code>mongo --eval 'db.runCommand({ connectionStatus: 1 })'
</code></pre>
<p dir="auto">Its time to add our user for database called "cod4xwebadmin", in order to do that we need to open the mongodb shell in terminal(putty)</p>
<pre><code>mongo
</code></pre>
<p dir="auto">Lets first create our admin user, we switch to database admin with next command</p>
<pre><code>use admin
</code></pre>
<p dir="auto">Then we create the admin user with next command (change user and pwd to yours)</p>
<pre><code>db.createUser({user:"admin",pwd:"admin",roles:[{role:"root",db:"admin"}]})
</code></pre>
<p dir="auto">Lets create the user for our cod4xwebadmin database with next command (change user and pwd to yours)</p>
<pre><code>use cod4xwebadmin
db.createUser({user:'database_user',pwd:'newdatabasepass',roles:[{role:'readWrite',db:'cod4xwebadmin'}]})
</code></pre>
<p dir="auto">Lets start the mongoDB with authentication turned ON (if u keep the default port behind firewall that's a plus security, so if you would like to use mongoDB only locally there is no need to allow access to port 27017 - default mongoDB port)</p>
<p dir="auto">Locate the Config file and edit it /etc/mongodb.conf, uncoment auth</p>
<pre><code># Turn on/off security.  Off is currently the default
#noauth = true
auth = true
</code></pre>
<p dir="auto">If you would like to use Robo 3T (formerly Robomongo) (<a href="https://robomongo.org/" target="_blank" rel="noopener noreferrer nofollow ugc">https://robomongo.org/</a>) change also</p>
<pre><code>bind_ip = 127.0.0.1
</code></pre>
<p dir="auto">to</p>
<pre><code>bind_ip = 0.0.0.0
</code></pre>
<p dir="auto">Robo 3T is something similar to phpmyAdmin so you can see your database Collections</p>
<p dir="auto">We need to restart our mongoDB after this changes</p>
<pre><code>systemctl restart mongodb
</code></pre>
<p dir="auto"><strong>4. Clone the latest CoD4x application from github page, with command git <a href="https://github.com/byNeHo/CoD4x-WebAdmin" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/byNeHo/CoD4x-WebAdmin</a></strong></p>
<p dir="auto">Examples for git installation if you don't have it already</p>
<p dir="auto">Ubuntu:</p>
<pre><code>sudo apt update

sudo apt install git
</code></pre>
<p dir="auto">Debian 9:</p>
<pre><code>sudo apt update

sudo apt install git
</code></pre>
<p dir="auto">Debian 8:</p>
<pre><code>sudo apt update

sudo apt-get install git-core
</code></pre>
<p dir="auto">Centos 7:</p>
<pre><code>sudo yum install git
</code></pre>
<p dir="auto">I will use in this example next path "/var/www/"</p>
<pre><code>git clone https://github.com/byNeHo/CoD4x-WebAdmin.git html
</code></pre>
<p dir="auto">After you have cloned the CoD4x Webadmin files it is time to change the config.json file so that we can start our application</p>
<p dir="auto">Navigate to</p>
<pre><code>/app/config/config.json
</code></pre>
<p dir="auto">We need to change here multiple lines, first we have to change the mongoDB users username and password</p>
<pre><code>"db": {
	"username": "db_username",
	"password": "db_password",
	"host": "localhost",
	"port": "27017",
	"name": "cod4xwebadmin"
},
</code></pre>
<p dir="auto">Next change the session secret to some random text</p>
<pre><code>"sessionSecret": "somerandomsecrettext_change_it^{",
</code></pre>
<p dir="auto">Change the website name to yours</p>
<pre><code>"website_name": "CoD4x Webadmin",
</code></pre>
<p dir="auto">Change the website URL (i will create a separated tutorial how to setup the nginx file and how to keep the application running with an npm package called PM2)</p>
<pre><code>"website_url": "http://your_server_IP:3000",
</code></pre>
<p dir="auto">In order to be able to sign up after we start the application we have to get a google recaptcha secret key and site key (<a href="https://www.google.com/recaptcha/admin#list" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.google.com/recaptcha/admin#list</a>)</p>
<pre><code>"g_recaptcha": {
	"SITE_KEY" : "SITE_KEY",
	"SECRET_KEY" : "SECRET_KEY"
},
</code></pre>
<p dir="auto">Change ssh access, we need this part to manage our Local CoD4 servers later. Since i have created a user called cod4 on the beginning i will use that username and password here</p>
<pre><code>"ssh_access": {
	"host" : "your-server-ip",
	"user" : "cod4",
	"password" : "cod4_users_password"
},
</code></pre>
<p dir="auto">Change cod4 server plugin to use the cod4 users root directory</p>
<pre><code>"cod4_server_plugin": {
	"download_link" : "http://files.linuxgsm.com/CallOfDuty4/cod4x18_dedrun.tar.bz2",
	"servers_root" : "/home/cod4"
}
</code></pre>
<p dir="auto">The other config json fields are used for some plugins, i will explain that part separated, we don't need it for now</p>
<ol start="5">
<li>Install the required NPM packages</li>
</ol>
<p dir="auto">Navigate to the website root</p>
<pre><code>cd /var/www/html/
</code></pre>
<p dir="auto">Install</p>
<pre><code>npm install
</code></pre>
<p dir="auto"><strong>6. Seed/populate the MongoDB with some default data</strong></p>
<p dir="auto">Navigate in terminal(putty) to the applications seed folder</p>
<pre><code>cd /var/www/html/app/seed
</code></pre>
<p dir="auto">Seed/Populate the MongoDB</p>
<pre><code>nodejs dbseed.js
</code></pre>
<p dir="auto">Our application is ready to be started</p>
<p dir="auto">Navigate to the website root</p>
<pre><code>cd /var/www/html/
</code></pre>
<p dir="auto">Start the application</p>
<pre><code>npm start
</code></pre>
<p dir="auto">If you are using firewall don't forget to enable the port 3000</p>
<p dir="auto">Open the browser and navigate to your application</p>
<p dir="auto">http://my_server_IP:3000</p>
<p dir="auto">Sign up with your Username, email and password</p>
<p dir="auto">After you have signed up you will be redirected to the profile page, ignore that you can change the avatar later, sign out</p>
<p dir="auto">Now login with the default Admin (100 power) user what we have added when we have populated the MongoDB in previous step</p>
<pre><code>//Default user login information's on seed/first install
//username: admin
//email: admin@gmail.com
//password: password
</code></pre>
<p dir="auto">After you have logged in go to Admin, under profile menu. Locate Users link click on your profile what you have just created and set yourself as admin with 100 power. If you have changed your power to 100 relogin with your account, go again back to Admin/users and delete the default admin user (for security reason since this admin is public it would be not nice if others would use this email and password and manage your servers bans users etc...)</p>
<p dir="auto">This is the complete installation for CoD4x Webadmin on Ubuntu 16.04 17.04 18.04</p>
]]></description><link>http://localhost:4567/topic/37/install-cod4xwebadmin-on-ubuntu-16-04-17-04-18-04</link><generator>RSS for Node</generator><lastBuildDate>Sun, 19 Apr 2026 05:16:21 GMT</lastBuildDate><atom:link href="http://localhost:4567/topic/37.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 14 Sep 2018 10:46:49 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Install CoD4xWebadmin on Ubuntu 16.04, 17.04, 18.04 on Sat, 02 Mar 2019 15:31:38 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="http://localhost:4567/uid/31">@DA3K-DRAGON</a> ignore that for now, its a low issue, and please post in support when you have questions</p>
]]></description><link>http://localhost:4567/post/296</link><guid isPermaLink="true">http://localhost:4567/post/296</guid><dc:creator><![CDATA[NeHo]]></dc:creator><pubDate>Sat, 02 Mar 2019 15:31:38 GMT</pubDate></item><item><title><![CDATA[Reply to Install CoD4xWebadmin on Ubuntu 16.04, 17.04, 18.04 on Sat, 02 Mar 2019 12:31:13 GMT]]></title><description><![CDATA[<p dir="auto">how to fix that...</p>
<pre><code> npm install
audited 14143 packages in 12.874s
found 1 low severity vulnerability
  run `npm audit fix` to fix them, or `npm audit` for details

</code></pre>
]]></description><link>http://localhost:4567/post/295</link><guid isPermaLink="true">http://localhost:4567/post/295</guid><dc:creator><![CDATA[DA3K DRAGON]]></dc:creator><pubDate>Sat, 02 Mar 2019 12:31:13 GMT</pubDate></item></channel></rss>