Tutorial

How To Add Swap Space on Ubuntu 16.04

How To Add Swap Space on Ubuntu 16.04
Not using Ubuntu 16.04?Choose a different version or distribution.
Ubuntu 16.04

Introduction

One of the easiest way of increasing the responsiveness of your server and guarding against out-of-memory errors in applications is to add some swap space. In this guide, we will cover how to add a swap file to an Ubuntu 16.04 server.

What is Swap?

Swap is an area on a hard drive that has been designated as a place where the operating system can temporarily store data that it can no longer hold in RAM. Basically, this gives you the ability to increase the amount of information that your server can keep in its working “memory”, with some caveats. The swap space on the hard drive will be used mainly when there is no longer sufficient space in RAM to hold in-use application data.

The information written to disk will be significantly slower than information kept in RAM, but the operating system will prefer to keep running application data in memory and use swap for the older data. Overall, having swap space as a fall back for when your system’s RAM is depleted can be a good safety net against out-of-memory exceptions on systems with non-SSD storage available.

Check the System for Swap Information

Before we begin, we can check if the system already has some swap space available. It is possible to have multiple swap files or swap partitions, but generally one should be enough.

We can see if the system has any configured swap by typing:

  1. sudo swapon --show

If you don’t get back any output, this means your system does not have swap space available currently.

You can verify that there is no active swap using the free utility:

  1. free -h
Output
total used free shared buff/cache available Mem: 488M 36M 104M 652K 348M 426M Swap: 0B 0B 0B

As you can see in the “Swap” row of the output, no swap is active on the system.

Check Available Space on the Hard Drive Partition

The most common way of allocating space for swap is to use a separate partition devoted to the task. However, altering the partitioning scheme is not always possible. We can just as easily create a swap file that resides on an existing partition.

Before we do this, we should check the current disk usage by typing:

  1. df -h
Output
Filesystem Size Used Avail Use% Mounted on udev 238M 0 238M 0% /dev tmpfs 49M 624K 49M 2% /run /dev/vda1 20G 1.1G 18G 6% / tmpfs 245M 0 245M 0% /dev/shm tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs 245M 0 245M 0% /sys/fs/cgroup tmpfs 49M 0 49M 0% /run/user/1001

The device under /dev is our disk in this case. We have plenty of space available in this example (only 1.1G used). Your usage will probably be different.

Although there are many opinions about the appropriate size of a swap space, it really depends on your personal preferences and your application requirements. Generally, an amount equal to or double the amount of RAM on your system is a good starting point. Another good rule of thumb is that anything over 4G of swap is probably unnecessary if you are just using it as a RAM fallback.

Create a Swap File

Now that we know our available hard drive space, we can go about creating a swap file within our filesystem. We will create a file of the swap size that we want called swapfile in our root (/) directory.

The best way of creating a swap file is with the fallocate program. This command creates a file of a preallocated size instantly.

Since the server in our example has 512MB of RAM, we will create a 1 Gigabyte file in this guide. Adjust this to meet the needs of your own server:

  1. sudo fallocate -l 1G /swapfile

We can verify that the correct amount of space was reserved by typing:

  1. ls -lh /swapfile
  1. -rw-r--r-- 1 root root 1.0G Apr 25 11:14 /swapfile

Our file has been created with the correct amount of space set aside.

Enabling the Swap File

Now that we have a file of the correct size available, we need to actually turn this into swap space.

First, we need to lock down the permissions of the file so that only the users with root privileges can read the contents. This prevents normal users from being able to access the file, which would have significant security implications.

Make the file only accessible to root by typing:

  1. sudo chmod 600 /swapfile

Verify the permissions change by typing:

  1. ls -lh /swapfile
Output
-rw------- 1 root root 1.0G Apr 25 11:14 /swapfile

As you can see, only the root user has the read and write flags enabled.

We can now mark the file as swap space by typing:

  1. sudo mkswap /swapfile
Output
Setting up swapspace version 1, size = 1024 MiB (1073737728 bytes) no label, UUID=6e965805-2ab9-450f-aed6-577e74089dbf

After marking the file, we can enable the swap file, allowing our system to start utilizing it:

  1. sudo swapon /swapfile

We can verify that the swap is available by typing:

  1. sudo swapon --show
Output
NAME TYPE SIZE USED PRIO /swapfile file 1024M 0B -1

We can check the output of the free utility again to corroborate our findings:

  1. free -h
Output
total used free shared buff/cache available Mem: 488M 37M 96M 652K 354M 425M Swap: 1.0G 0B 1.0G

Our swap has been set up successfully and our operating system will begin to use it as necessary.

Make the Swap File Permanent

Our recent changes have enabled the swap file for the current session. However, if we reboot, the server will not retain the swap settings automatically. We can change this by adding the swap file to our /etc/fstab file.

Back up the /etc/fstab file in case anything goes wrong:

  1. sudo cp /etc/fstab /etc/fstab.bak

You can add the swap file information to the end of your /etc/fstab file by typing:

  1. echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab

Tweak your Swap Settings

There are a few options that you can configure that will have an impact on your system’s performance when dealing with swap.

Adjusting the Swappiness Property

The swappiness parameter configures how often your system swaps data out of RAM to the swap space. This is a value between 0 and 100 that represents a percentage.

With values close to zero, the kernel will not swap data to the disk unless absolutely necessary. Remember, interactions with the swap file are “expensive” in that they take a lot longer than interactions with RAM and they can cause a significant reduction in performance. Telling the system not to rely on the swap much will generally make your system faster.

Values that are closer to 100 will try to put more data into swap in an effort to keep more RAM space free. Depending on your applications’ memory profile or what you are using your server for, this might be better in some cases.

We can see the current swappiness value by typing:

  1. cat /proc/sys/vm/swappiness
Output
60

For a Desktop, a swappiness setting of 60 is not a bad value. For a server, you might want to move it closer to 0.

We can set the swappiness to a different value by using the sysctl command.

For instance, to set the swappiness to 10, we could type:

  1. sudo sysctl vm.swappiness=10
Output
vm.swappiness = 10

This setting will persist until the next reboot. We can set this value automatically at restart by adding the line to our /etc/sysctl.conf file:

  1. sudo nano /etc/sysctl.conf

At the bottom, you can add:

/etc/sysctl.conf
vm.swappiness=10

Save and close the file when you are finished.

Adjusting the Cache Pressure Setting

Another related value that you might want to modify is the vfs_cache_pressure. This setting configures how much the system will choose to cache inode and dentry information over other data.

Basically, this is access data about the filesystem. This is generally very costly to look up and very frequently requested, so it’s an excellent thing for your system to cache. You can see the current value by querying the proc filesystem again:

  1. cat /proc/sys/vm/vfs_cache_pressure
Output
100

As it is currently configured, our system removes inode information from the cache too quickly. We can set this to a more conservative setting like 50 by typing:

  1. sudo sysctl vm.vfs_cache_pressure=50
Output
vm.vfs_cache_pressure = 50

Again, this is only valid for our current session. We can change that by adding it to our configuration file like we did with our swappiness setting:

  1. sudo nano /etc/sysctl.conf

At the bottom, add the line that specifies your new value:

/etc/sysctl.conf
vm.vfs_cache_pressure=50

Save and close the file when you are finished.

Conclusion

Following the steps in this guide will give you some breathing room in cases that would otherwise lead to out-of-memory exceptions. Swap space can be incredibly useful in avoiding some of these common problems.

If you are running into OOM (out of memory) errors, or if you find that your system is unable to use the applications you need, the best solution is to optimize your application configurations or upgrade your server.

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?
 
25 Comments
Leave a comment...

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’m not too sure I understand the warning about having a swap file being “dangerous” for your hardware. If that is true, wouldn’t it be a problem if my application writes several MB of logs every day, enlarge it’s database by many MB every day… etc.

Is there is a difference between a swap file or other files that make them so dangerous?

If swap is heavily used on a daily basis it experiences way more writes per day than any combination of your db a app writes, so SSDs degrade faster. Basically, swap is an emergency tool in your belt. If your server starts to use it - get ready to refactor your app or to upgrade your droplet soon. If swap is used all the time, 20% or more - you should upgrade your droplet immediately. Used swap means you’re running out of memory.

Is there an easy way to know how active swapping is over time? I always get a little bit of swap used over time, but that generally does not tell me how much is used in 1h, 1 day, 1 month…

Google sysstat and sar. This tool might help.

vmstat can also tell you if memory is moving in and out of swap

Hi - thanks for a great article. I have configured swap on ubuntu 16.04 with an Nginx web server, Wordpress underneath, it has plenty of spare memory on a $20 server but it seems to be all eaten up with 1.2GB of buff/cache, and is entering swap even with swappiness set to 10. Of course I would prefer swap space is only used in an emergency. Any thoughts - is this Ubuntu or Nginx eating it up? Here is the extract from Top.

KiB Mem :  2048444 total,   100876 free,   719396 used,  1228172 buff/cache
KiB Swap:  2097148 total,  1655576 free,   441572 used.  1082492 avail Mem

… and from “free”

              total        used        free      shared  buff/cache   available
Mem:        2048444      713328      121088       58368     1214028     1087688
Swap:       2097148      441608     1655540

I’m pretty sure it’s MySQL. Incorrect db buffers/cache settings can really eat a lot of memory. Use mysqltuner to check it.

Yeah … did that at the beginning, the suggested mysql settings made no difference to this.

As a side note, certain buffers may be saved to swap and never accessed again in which case it stays in the swap memory and does not do anything one way or the other until the applications “using” (i.e. “not using”) that buffer quits. Thus, it is normal that you would eventually see large buffer/cache memory available and swap being used.

Thanks. Reply to your WARNING - generally, swap on SSD might be ‘evil’ but it’s necessary to run some apps or to be able to upgrade some apps on basic 512 MB RAM droplet (in my case, I’ve tried to upgrade MariaDB; without swap it just failed and I was unable to run it again ever, with swap it upgraded like charm and runs smoothly).

I’ll leave this here as it can help someone in the future: Heads up on “Make the Swap File Permanent” step.

I had to destoy one droplet because it was entering on “linux emergency mode” after finishing up this tutorial and I couldn’t find the reason. As I created a brand new droplet and finished this tutorial again, it was entering on emergency mode just like the last one.

After some minutes thinking what would be the problem, I realized that I got wrong the step “You can add the swap file information to the end of your /etc/fstab file by typing:echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab

The command above should be inserted and commited on the bash line command, and I have inserted it as is on the last line of the file /etc/fstab.

A very simple mistake, but I’m a begginer here and I got used to sudo nano files and insert the codes by hand on the other 10 previous tutorials from DO that I’ve consumed. I hope this save someone droplet one day…

On the permanent part; you could also add the swapon and sysctl commands to your .bashrc.

I also found a solution to seeing ‘Device or resource busy’ everytime:

sudo swapon /swapfile > swap.log
if [ -s ./swap.log ]
then
echo "Error. Check swap.log for more details."
sudo sysctl vm.swappiness=10 
sudo sysctl vm.vfs_cache_pressure=50
else
echo "Swap on. Continuing..."
fi

The article is spot on, and works like charm. Thanks. :-)

I think to say SSDs will degrade (fail) quicker was true with earlier SSDs. Newer ones don’t seem to have this issue, and by the time it eventually failed, the SSD would be outdated and need replacing anyhow.

This isn’t to say you should use swap on a regular basis to replace physical memory.

Using Ubuntu 16.04.1 x64 w/ 512MB RAM … without swap there was not enough Mem to run apt-get. Nice straight forward tutorial. Enjoyed learning about swappiness and cache pressure :)

“We can verify that the swap is available by typing:” “sudo swapon --show”

When I do that to verify, it gives no output, and the output of free -h is still the same as before:

me@server:/var/www$ sudo fallocate -l 1G /swapfile
me@server:/var/www$ ls -lh /swapfile
-rw-r--r-- 1 root root 1.0G Dec  3 07:15 /swapfile
me@server:/var/www$ sudo chmod 600 /swapfile
me@server:/var/www$ ls -lh /swapfile
-rw------- 1 root root 1.0G Dec  3 07:15 /swapfile
me@server:/var/www$ sudo mkswap /swapfile
Setting up swapspace version 1, size = 1024 MiB (1073737728 bytes)
no label, UUID=some uuid
me@server:/var/www$ sudo swapon --show
me@server:/var/www$ free -h
              total        used        free      shared  buff/cache   available
Mem:           488M        190M        175M         15M        122M        251M
Swap:            0B          0B          0B

This is on Ubuntu 16.04.

Justin Ellingwood
DigitalOcean Employee
DigitalOcean Employee badge
December 5, 2016

@b9ac4679230fd17: Looks like you missed the first swapon command that actually activates the new area as swap.

After the mkswap command, use swapon without the --show flag to activate the file you created:

  1. sudo swapon /swapfile

Afterwards, you should be able to see the new swap space.

Thank you for the effort you put into this. So well written, and helped me learn more about the topic!

Last time I read one of these guides, there was no warning about swap. I’ve not noticed any ill effects from using swap other than that my stuff no longer crashes, so is it worth doubling or quadrupling how much I pay…?

I have just set up a fresh new Droplet with Ubuntu 16.04 and when I run

$ fallocate ‐l 2G /swapfile

I get an error:

fallocate: unexpected number of arguments

Any idea what’s wrong here? I’ve successfully used this tutorial for other droplets in the past. Now it seems not to work any longer and I have absolutely no idea why?!

Justin Ellingwood
DigitalOcean Employee
DigitalOcean Employee badge
April 10, 2017

@manuelbieh Hey there. I’m only able to reproduce the problem you are describing when I copy and paste your example. If I type it in directly, it works fine.

It appears that the character you’re using for the dash in -l is not the same character that it’s expecting. There are a number of different characters that look the same. It looks like the character it is expecting is the hyphen-minus sign, while your keyboard is supplying a regular hyphen. You can view the slight difference here. If you use the hyphen-minus symbol within the command instead of the hyphen, it should work correctly.

On another note, we don’t recommend setting up swap on DigitalOcean Droplets because it can increase the likelihood of hardware failures for both you and anyone else on the same physical server. If at all possible, it is always a better idea to increase the amount of RAM instead.

Hope that helps.

Indeed! After typing it (instead of copy+paste it) it worked. I saved this article as PDF and copy+pasted it from there. Seems like ‘Save as PDF’ smuggled some invisible characters into it. Thanks!

I’ve made this into a quicky .sh script, with a one line copy and paste into the terminal to download it, run it, and then cleanup. Figured I’d share it with you guys since this is my 7th time doing this.

Kinda seems silly that this isn’t done when a droplet is created.

https://github.com/spikeon/digitalocean_swapfile

i used your script and this created 2gb swap space in just a sec. Does this make swap permanent a described in tutorial. Thanks a lot. :)

After creating swap how to cleaup this from server. I have used sftp but it said permission denied to delete swapfile in root.

Just found the swapfile in root i was deleteing is the actual swap created not .sh script. Sorry. Does your script automatically clean itself

The script should clean itself. it would be located in the home folder at .swap (~/.swap) if it failed to cleanup after itself.

I should’ve mentioned that I changed it to 2gb, my bad.

I wrote it to be run as root or sudo, probably forgot to mention that as well.

It does do the extra steps to make the swapfile permanent, don’t want it going away after a system reboot.

If you need to delete the swapfile you’ll need to run swapoff first to ensure it’s not being used, and then sudo rm, however the swapfile in root is there for a reason, if you want the swapfile you probably don’t want to delete it.

This comment has been deleted

    If u are newbie and bought 512mb set swapfile 4GB

    Here is a simple one-liner to replace all that stuff:

    apt install swapspace
    

    Why bother with all of that plumbing - if there is already a module for that?)

    Great description! I followed it in detail but the boot time in Ubuntu 16.04.3 increased from 35s to 380s. Is there a way to reduce the boot time? Thanks. Styl.

    Justin Ellingwood
    DigitalOcean Employee
    DigitalOcean Employee badge
    November 13, 2017

    @styl It sounds like you might have a timeout occurring. You may need to double check your entries to make sure they’re correct. Viewing the boot logs will probably help you find the culprit too.

    Another option is to do swaping with a zram device. It is basically a compressed ramdisk for swapping.

    See https://www.kernel.org/doc/Documentation/blockdev/zram.txt

    It can help a lot if the swapped out data is good compressible.

    I followed this guide to add swap space in my machine. Everything goes fine till I reach this step:

    sudo swapon /swapfile
    

    Here, it throws this error:

    swapon: /swapfile: swapon failed: Input/output error

    Has anyone faced this error? How to deal with it?

    KFSys
    Site Moderator
    Site Moderator badge
    November 18, 2023

    The error message swapon: /swapfile: swapon failed: Input/output error when trying to enable the swap file can be caused by several issues. Let’s troubleshoot this step by step:

    1. Correct Swap File Creation: Firstly, ensure that the swap file was created correctly. The typical steps are:

      • Create the swap file: sudo fallocate -l size /swapfile, where size is the desired size of your swap file (e.g., 1G for 1 GB).
      • Set the correct permissions: sudo chmod 600 /swapfile to make it readable and writable only by the root user.
      • Format the file for swap: sudo mkswap /swapfile.

      If any of these steps were missed or executed incorrectly, it could result in the error you’re seeing.

    2. Filesystem Support: Make sure your filesystem supports the swap file. Some filesystems, particularly network file systems or some special filesystem types, might not support swap files properly.

    3. Use of fallocate vs dd: If you used fallocate to create your swap file, some filesystems might not correctly allocate the space. Although fallocate is faster, it might not work on all filesystems. In such cases, you can use dd to create a swap file:

      bashCopy code sudo dd if=/dev/zero of=/swapfile bs=1M count=1024 sudo chmod 600 /swapfile sudo mkswap /swapfile

      This example creates a 1 GB swap file (count=1024 with a block size of 1M). Adjust the count value for a different size.

    4. Filesystem Errors: Check for filesystem errors. Sometimes, input/output errors can be a result of filesystem corruption or issues. You can check and repair your filesystem with tools like fsck, but be cautious as running fsck on a mounted filesystem can cause data loss. It’s safer to run it from a live CD/USB or in single-user mode.

    5. Kernel Messages: Look at the kernel log messages for any clues. Use dmesg | tail immediately after you get the error. This might provide more information on what is going wrong.

    6. Swap Support in Kernel: Ensure that your kernel supports swap files. This is usually not an issue with standard distributions and kernels, but it’s something to consider if you’re using a custom kernel.

    7. Swap File Integrity: Check the integrity of the swap file. An interrupted or incomplete fallocate or dd process could result in a corrupted swap file.

    8. Reboot the System: In some rare cases, a system reboot can resolve temporary issues that might be causing the swap file to be unreadable.

    9. Alternative Swap Method: If nothing works, consider creating a swap partition instead of a swap file, especially if you have unallocated space on your disk.

    If you continue to face issues, it might be helpful to provide more context or error logs for a more specific diagnosis.

    Top notch. Well ordered and easy to follow. Good explanations.

    Hi, I’m new here. I use ubuntu 16.04 I made a swap space, looks everything ok to me. But when I open Gparted, I only see /dev/sda1. From used space I understand, that I created a swap space, but I don’t see seperate line with swap? Thax in advance.

    KFSys
    Site Moderator
    Site Moderator badge
    November 18, 2023

    When you create a swap space on a Linux system like Ubuntu, there are two main ways to do it: using a swap partition or a swap file. The method you choose can affect how the swap space is displayed in tools like GParted.

    1. Swap Partition vs. Swap File:

      • A swap partition is a dedicated partition on your hard drive that is used solely for swap space. This type of swap space would be visible as a separate partition in GParted.
      • A swap file, on the other hand, is a file on an existing file system (like your root partition) that is used for swap. This type of swap space will not show up as a separate partition in GParted.
    2. Checking Your Swap Setup:

      • Since you mentioned that you don’t see a separate line for swap in GParted, you likely created a swap file rather than a swap partition.
      • To confirm this, you can use the command swapon --show or cat /proc/swaps in the terminal. These commands will display your current swap configurations. If you see a file path (like /swapfile), it indicates a swap file. If you see a device path (like /dev/sdaX), it’s a swap partition.
    3. Understanding GParted Display:

      • GParted primarily shows partitions, not files. So, if you used a swap file, it will not be listed as a separate entry in GParted.
      • If you created a swap file, the space it occupies will be part of your root partition (or whichever partition you placed the swap file on). This might explain why you see an increase in used space in /dev/sda1.
    4. Benefits of Swap File:

      • Swap files are generally easier to manage, as they don’t require partitioning and can be resized more easily.
      • For most users, especially on personal or smaller servers, a swap file is sufficient and simpler to set up.
    5. Performance Considerations:

      • There used to be performance differences between swap partitions and swap files, but with modern Linux kernels, these differences are negligible.
      • The choice between a swap file and a swap partition is more about convenience and flexibility than performance.

    In summary, if you don’t see a separate swap partition in GParted, it’s likely you’ve created a swap file, which is a common and efficient way to add swap space on modern Linux systems.

    Very detailed step by step tutorial… perfect!!

    Very clear and useful tutorial. My mongorestore command was crashing on my staging server when trying to set it up with production data. After setting up a swap of 2GB (droplet has only 1GB or ram) the import went well. It’s a one time process, with no time pressure, so upgrading the ram just for the import felt like overkill.

    I am not able to create the swap file even though I have enough space in the root directory. This is what my df -h returns:

    root@droplet1:/var/log# df -h
    Filesystem      Size  Used Avail Use% Mounted on
    udev            234M  4.0K  234M   1% /dev
    tmpfs            49M  340K   49M   1% /run
    /dev/vda1        20G   11G  8.4G  55% /
    none            4.0K     0  4.0K   0% /sys/fs/cgroup
    none            5.0M     0  5.0M   0% /run/lock
    none            245M     0  245M   0% /run/shm
    none            100M     0  100M   0% /run/user
    

    Can anyone please help? My MySQL db isn’t starting and giving an error of low memory so I wanted to add swap space until I figure out what’s eating up my RAM.

    KFSys
    Site Moderator
    Site Moderator badge
    November 18, 2023

    From the df -h output you’ve shared, it appears you have sufficient space on your /dev/vda1 partition (8.4 GB available) to create a swap file. If you’re encountering difficulties in creating a swap file on your Ubuntu 16.04 system, there could be several reasons. Let’s troubleshoot this step by step:

    1. Check Permissions: Ensure you have the necessary permissions to create and modify files in the root directory. You should be using sudo to execute the commands, especially if you’re not logged in as the root user.

    2. Correct Swap File Creation Command: The typical command to create a swap file is sudo fallocate -l size /swapfile, where size is the size of the swap file you want to create. For example, sudo fallocate -l 1G /swapfile will create a 1GB swap file. Make sure you’re using the correct command and size.

    3. Filesystem Quotas: If you’re using filesystem quotas on your server, they might be preventing you from creating large files even if there appears to be available space. You can check this with quota -s.

    4. Existing Swap Space: Check if there’s already existing swap space configured using swapon --show. If there’s existing swap space, consider whether it’s sufficient or if you still need more.

    5. Filesystem Integrity: Run a filesystem check to ensure there’s no corruption or issues. You can use fsck, but be cautious with this tool, especially if you’re checking your root filesystem.

    6. Creating Swap File with dd: If fallocate isn’t working for some reason, you can try using dd to create a swap file. For example: sudo dd if=/dev/zero of=/swapfile bs=1G count=1 for a 1GB swap file. However, be very careful with the dd command as it can cause data loss if used improperly.

    thx very clear and useful and this solve my problem restoring huge mysql backup file with hundreds of thousand rows (none of online suggestions to increase max_allowed_packets and other time setting works)

    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!

    Become a contributor for community

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

    DigitalOcean Documentation

    Full documentation for every DigitalOcean product.

    Resources for startups and SMBs

    The Wave has everything you need to know about building a business, from raising funding to marketing your product.

    Get our newsletter

    Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

    New accounts only. By submitting your email you agree to our Privacy Policy

    The developer cloud

    Scale up as you grow — whether you're running one virtual machine or ten thousand.

    Get started for free

    Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

    *This promotional offer applies to new accounts only.