How To Launch Your Site on a New Ubuntu 14.04 Server with LAMP, SFTP, and DNS

Published on May 13, 2014
How To Launch Your Site on a New Ubuntu 14.04 Server with LAMP, SFTP, and DNS


Getting your Linux server running can be a troubling experience for beginners, but it doesn’t have to be difficult. We have a number of articles written in our community that go over the basics of getting set up on a server.

In this guide, we’ll leverage some of those articles to get you up and running by pointing you to some of the common procedures that users implement to get their site up quickly.

Step One — Create the Server

Before you can do anything else, you need to deploy a server. This is very simple using DigitalOcean, but we have a guide to walk you through the process in case you’re still unsure.

For consistency, in this guide, we’re going to be using the Ubuntu 14.04 distribution for our operating system. This can be either 32-bit or 64-bit. You can get the details by following our getting started with DigitalOcean tutorial. Just select Ubuntu 14.04 when given the option.

Step Two — Basic Server Setup

Once your server is up and running, there are some standard procedures that you should complete in order to build a good foundation. We call this our initial server setup.

You should go through this guide before continuing, especially steps 1-4. This will show you how to get logged in, create a regular user account, and give that user administrative privileges.

Step Three — Install LAMP

After you get your account created and configured, we can move on to the actual web server software.

One of the most popular ways to serve content on the internet is through a set of components known as the “LAMP” stack. This is an acronym that stands for a Linux operating system, the Apache web server, a MySQL database, and a PHP script processor. These components work together to allow you to serve a dynamic website or application.

You can learn how to install a LAMP stack on Ubuntu 14.04 by following this guide. It may look complicated, but follow each step carefully and you should have it up and running in no time.

Step Four — Set Up your Domain Name

Once you have your LAMP stack installed, your server is ready to start serving web content. However, right now, you can only access it using the server’s public IP address.

We can set up a domain name (like example.com) so that visitors can access our site easier. You’ll need to purchase your desired domain name from a domain name registrar, and then come back here to continue.

When you have a domain name, you can follow this guide to learn how to point your domain name to your server. The changes you make may take awhile to propagate, but you can move on to the next step while this happens.

Step Five — Move your Files with SFTP

After you have installed and configured your server software, and you have a domain name set up pointed to your server, you can copy your website files to your server.

The best way to do this is probably by using an SFTP client. SFTP is a protocol that leverages the SSH protocol in order to securely transfer files to and from remote computers. What all of this means is that you can use it to transfer your files in a secure fashion.

There are many SFTP client programs and FTP clients with SFTP capabilities. One option is to connect to your remote server using the sftp command line utility like this guide shows.

If you’d rather use a graphical client, there are many options. One popular choice is Filezilla. You can follow this guide to learn how to use Filezilla with SFTP.

You want to place your files into a directory called the “document root” of the server. For Ubuntu 14.04, the document root is at /var/www/html by default. Place your files there.

When you are finished (provided that your domain name has been updated around the world), you should be able to access your site in your web browser.


If you have gotten this far, your site should be off and running. If your web files require extra components or are doing something outside of the norm, you may have to do some additional configuration. But simple sites should work without any additional steps.

If you want to leverage the capabilities of something like WordPress, we have an article that you can use to get started with WordPress on Ubuntu 14.04. There are many other possibilities and enhancements that you can make to your site to make it better. Check out the other articles in our community to get some more ideas.

<div class=“author”>By Justin Ellingwood</div>

Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.

Learn more about our products

About the authors

Still looking for an answer?

Ask a questionSearch for more help

Was this helpful?

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

I am trying to connect with forklift on a Mac. I have installed LAMP with ssh keys and get an error: permission denied (publickey). - How do I get sftp to work? I have the correct keys on my machine?

I have followed these steps. When I enter my droplet ip address it comes up with the appropriate apache 2 website, indicating that the website is under /var/www/html/index.html.

when I log into my server through the console and do an ls command or when i go in using filezilla i do not see the folder var. what do i do ?

This comment has been deleted

    This comment has been deleted

      This comment has been deleted

        I setup my website and its working but now I want to host another website on same Server, how i can achieve this? Can you please explain me

        after I created the var/www/html it was not exist folder so I decided to add new a file info.php I inserted as <?php phpinfo(); ?> and nothing happen.

        Try DigitalOcean for free

        Click below to sign up and get $200 of credit to try our products over 60 days!

        Sign up

        Join the Tech Talk
        Success! Thank you! Please check your email for further details.

        Please complete your information!

        Featured on Community

        Get our biweekly newsletter

        Sign up for Infrastructure as a Newsletter.

        Hollie's Hub for Good

        Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

        Become a contributor

        Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

        Welcome to the developer cloud

        DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

        Learn more
        DigitalOcean Cloud Control Panel