Install Simple Machines Forum on the One-Click LEMP Application

Updated on May 12, 2015
Install Simple Machines Forum on the One-Click LEMP Application header image


Simple Machines Forum (SMF) is a popular open-source forum. In this article, I will show you how to install Simple Machines Forum on a Vultr VPS. At the time of writing, Vultr did not offer a one click forum.


I assume that you have just launched a "One-Click LEMP" Vultr App, and are currently logged into it as the root user.

Step one: Create a database

Log into the MySQL console. It will prompt you for the root password, which you can learn by opening /root/.my.cnf with your favorite text editor.

mysql -u root -p

Create a database for SMF. The database name smf, user name myusername, and password mypassword may be replaced with your own values.

create database smf;
create user 'myusername'@'localhost' identified by 'mypassword';
grant all privileges on smf.* to 'myusername'@'localhost' identified by 'mypassword' with grant option;
flush privileges;

Step two: Download the Simple Machines Forum package

First, create a folder to store the program.

mkdir /usr/share/nginx/html/forum/

At the time of writing, the latest stable version of Simple Machines Forum is 2.0.10.

Visit SMF official website from your browser. Click the "tar.bz2 icon" under "Full install" to download the archive file smf_2-0-10_install.tar.bz2. Once the download finishes, upload it to the forum folder that we just created on your VPS by using an SCP/SFTP tool.

Go back to the terminal window, unzip and delete the package.

cd /usr/share/nginx/html/forum/
tar -jxvf smf_2-0-10_install.tar.bz2
rm -f smf_2-0-10_install.tar.bz2

Step three: Configure and install SMF from your browser

Visit http://[SERVER_IP]/forum/ in your browser. Substitute the [SERVER_IP] with the IP address of your VPS.

  1. On the step of "Welcome", Click the button "Continue" to initiate the installation wizard. Follow the on-screen instructions to configure your SMF installation.

  2. On the step of "Writable Check", the installation wizard will prompt you to add write permissions to some directories and files. To do so, input the following command from your terminal window.

    chmod 0777 attachments avatars cache Packages Packages/installed.list Smileys Themes agreement.txt Settings.php Settings_bak.php

Then, from your browser, click the link titled "Click here" at the left bottom to recheck write permissions on these items.

  1. On the step of "Database Settings", you need to input database parameters as specified below.

Remember to replace the database username myusername, the database password mypassword, the database name smf, and the table prefix smf_ with your own ones.

Server name: localhost
Username: myusername
Password: mypassword
Database name: smf
Table prefix: smf_

Click "Continue".

  1. On the step of "Forum Settings", you need to input some configuration settings to your forum.
  • Forum name: input the name you'd like to use.
  • Forum URL: use the default value, it is usually correct.
  • Gzip Output: check it to save bandwidth.
  • Database Sessions: check it.
  • UTF-8 Character Set: check it if you would like to use languages other than English.
  • Allow Stat Collection: check it only if you want to help the Simple Machines team optimize their software.

Click "Continue".

  1. On the step of "Database Population", just click "Continue".

  2. On the step of "Admin Account", input the administrator's username, password, and email address. Also, you need to input database password again for security purposes.

  3. On the step of "Finalize Install", click the link "your newly installed forum" to visit your forum.

Step four: Interface maintenance

Occasionally, you will find that the interface of your forum doesn't display properly. This is because the SMF program cannot recognize the website base URL. When this happens, you need to fix the bug manually with a script from SMF.

Visit the SMF official wiki from your browser, and click the "repair_settings.php" link under "Download the Repair Settings Tool". This will download the script to your local machine. Then upload it to the directory where SMF is installed - for example: /usr/share/nginx/html/forum/.

After uploading, access http://[SERVER_IP]/forum/repair_settings.php in your web browser. Substitute the [SERVER_IP] with the IP address of your VPS. Review all values carefully, modify any improper values to recommended ones. Then click the button "Save Settings" at the right bottom.

Visit http://[SERVER_IP]/forum/ again, you will find the bug has been fixed.

Finally, you MUST remove repair_settings.php and install.php for security purposes.

rm -f repair_settings.php install.php

That's it. You have installed Simple Machines Forum onto your Vultr VPS.