Skip to content

Start Site on Raspberry Pi 2

Andrew Dassonville edited this page Nov 17, 2015 · 3 revisions

To follow this guide you need this: - Raspi 2 - Latest Raspbian OS installed already on your raspi 2 - Recomended is atleast 10/10 mbit internet connection if you are to host it at home.

Heavy load on steam? Use this to see if true -> https://steamstat.us/ As example, this is how a secure psw looks like --> >(D]h}`xao)'I2upP/]m<.bqy/skrD2EeqwLoS^o6"p

First we make the raspi a little bit more secure. Save all new passwords in a txt file where u can find it! Use for example http://passwordsgenerator.net/ to generate a more secure psw!


  1. Run the command: sudo raspi-config

  2. Change the password for the user pi (remember to write it down).

  3. Disable BOOT to desktop, instead you want to boot into text mode and NOT auto login.

  4. Update Locale settings. This means the keyboard layout. Keep the raspi in English language!

  5. Set your hostname in Advanced -> Hostname to something clever, eg: MyWebServer

  6. You would want less memory to handle the graphics. This you change in Advanced -> Memory Split. Set only 16 mb to GPU making more free ram to handle your website!

  7. Enable SSH, Advanced -> SSH. This is so that you will be able to connect later on thru your windows computer from software like Putty.

  8. Create your own user. Write "groups" in terminal and you should end up with something like below: pi adm dialout cdrom sudo audio video plugdev games users netdev input

  9. sudo useradd -m -G adm,dialout,cdrom,sudo,audio,video,plugdev,games,users,netdev,input USERNAME dont forget to change USERNAME to your own nickname.

  10. sudo passwd USERNAME <- choose a good new psw for your new user (dont forget to write it down).

  11. sudo shutdown -h now <- will shutdown the raspi.

  12. Unplug the power and network cable from raspi onece then plug them oboth in again. The raspi will boot up in textmode but not login auto becuase you set it not to earlier.

  13. Login with your new user and do: sudo deluser --remove-all-files pi

now the above can take a while cuz we're now deleting everything about the user pi that was on your raspi.

  1. sudo apt-get update

  2. sudo apt-get upgrade


BE AWARE YOU CAN MAKE YOUR SERVER MUCH MORE SECURE WITH iptables BUT THE ABOVE WILL HAVE MAKE THE BEGINNING TO A SECURE WEBSERVER ON YOUR RASPI 2. Now you can switch to your windows computer and login via SSH (Putty).


  1. sudo apt-get install apache2

  2. Start chrome or Firefox when finished and test if your webserver works --> http://IPTOYOURRASPI Tip: The Internal IP of your raspi can be easly found in your routers admin area.

  3. sudo apt-get install mysql-server When u set a psw dont forget to write it down again.

  4. sudo apt-get install php5 libapache2-mod-php5 phpmyadmin

  5. sudo /etc/init.d/apache2 restart (This above will restart your webserver wich is apache2).

  6. Test if PHP works, Use Chrome/Firefox to browse http://IPTOYOURRASPI/phpmyadmin Now login with the credentials to your MySQL as you created before.

  7. Make a new user at Users -> Create new user. Take a good username, eg your new sitename (csgowinbig) In the setup of a new user, also tap in the box "create database with the same name" and give permissions u need.

  8. Get a hold of your Steam API key here ( https://steamcommunity.com/dev/apikey ) and write that down in your psw file also. If you donw have one, create on on that page.

  9. Put your DB stuff and website URL at:

    default.php line 5,6,7 settings.php line 14 support-ticket.php line 30 set your email address. bot-withdraw.php line 6 ( enter the 64bit ID of your Steam bot, you can get it here: http://steamrep.com/ ) index.php line 44 and line 92 modify inside the long link from CSGOwinbig.com to your websites URL. support.html line 96 donations.html line 82 prices.html line 148 script.js line 149 (here you must enter the trade URL of your bot.)

  10. Go into PHPmyadmin again (YOURIP/phpmyadmin) in an web browser. To the left you see your new nickname that you also added as a DATABASE. Click once on this database, at the top click IMPORT and add the file database-config.sql that is included in the CSGOwinbig compressed file.

If your have your website like this --> /var/www/html/(Here you have index.html and the other AKA this is your webroot)

Then one step behind you shall put your password file called "passwords.txt". --> /var/www/passwords.txt In this psw file you should add --> {"default-password":"YOUR DATABASE PASSWORD","steamAPIKey":"YOUR STEAM API KEY"}

Clone this wiki locally