Ubuntu 18.04

Tutorials, projects and questions about Ubuntu 18.04, Bionic Beaver, a long-term support release that was released April 26, 2018 and will be supported by Canonical until April of 2023.

Ubuntu 18.04 subscription active
You will receive email notifications for new publications on Ubuntu 18.04.
1612 Results
  • Question

    connect() failed (111: Connection refused) while connecting to upstream

    Hi all, Followed this (https://lengstorf.com/code/deploy-nodejs-ssl-digitalocean/) tutorial to get Let's Encrypt working on my Nest.js/Node server. Everything works - running sudo nginx -t returns: nginx: the configu...
    Accepted Answer: Hello, You can only have 1 service listening on 1 port. So as you have Nginx listening on port 80 at the moment, you can not have your Node on the same port. Also as you currently have your Nginx set to work as a reve...
    11 By hbendixlewis Nginx API Let's Encrypt DigitalOcean Ubuntu 18.04
  • Question

    How do I forward client IP instead of proxy IP in Nginx Reverse Proxy?

    Overview I have a setup that looks like this: * Nginx Reverse Proxy with a Floating IP * Reverse Proxy is configured to forward requests from users to a 3rd party SaaS application, BigCommerce which then handles the r...
    Accepted Answer: Hi @cvanorman I think that what you have in place is correct in terms of the 4 headers that you've configured already. What is the output of the Nginx access logs? Are you seeing the correct IP there?
    3 By cvanorman Nginx Ubuntu 18.04 Networking
  • Question

    Ansible playbook error: mapping values are not allowed in this context

    I am trying to play with Ansible a little bit and I've created a test playbook but it is failing for some reason and I can't figure out why. I've tested the connectivity between my control node and the worker node but...
    Accepted Answer: Hello, The playbook looks good, there's only a slight indentation error, Yaml is very strict about the indentations and the spacing. You need to make sure that you have two spaces before the - name part of your playb...
    5 By bitmap Ansible Ubuntu 18.04
  • Question

    How to Reset The Firewall on Ubuntu

    What You'll Need A Droplet running Ubuntu 16.x or 18.x SSH or Console Access (https://www.digitalocean.com/docs/droplets/resources/console/#log-in-with-the-console) to your Droplet Why Reset The Firewall? If you find ...
    Accepted Answer: If you'd prefer to use a one-liner that you can copy and paste to perform the same actions noted in the guide above, please feel free to use: sudo ufw --force disable \ && sudo ufw --force reset \ && sudo ufw default...
    2 By jtittle Firewall Ubuntu Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
  • Question

    Ubuntu 20.04 upgrade : "Please install all available updates for your release before upgrading" even after packages updating

    Hello ! :) I would like to upgrade my 18.04.5 Ubuntu to 20,04. Of course, before doing it, I've updated all installed packages : sudo apt update && sudo apt -y full-upgrade && sudo apt autoremove But even after this...
    Accepted Answer: Hi @BlackBelt35, I've had cases where a third-party repositories with a broken-dependency, which showed up via sudo apt list --upgradable - the package in question did require another package, which was unavailable du...
    1 By BlackBelt35 Ubuntu 20.04 Ubuntu 18.04 PHP
  • Question

    How can I run a rake task in my production environment?

    I have set up a rake task that I want to run once an hour using a cron expression. I got it working on my local dev environment, but I can't get it to work on my production environment hosted here. I have the followin...
    Accepted Answer: HI! Let me see if I can help. The first thing that comes to mind is that you do need to set the environment and use bundle. Be sure you're in the root of your rails app, and that you're using the user your app runs as...
    1 By donkerbc Ruby on Rails PostgreSQL Ruby Ubuntu 18.04
  • Question

    Cannot deploy a ruby udp server and open port on ubuntu droplet

    Hi. I have a working ruby 2.7.2 app that is a simple udp server on my local development machine which uses the ruby UDPSocket library. I have created a ubuntu 18.04 droplet and created a cloud firewall with a custom i...
    Accepted Answer: My bad. This was working with the original socket.bind call using 0.0.0.0 I guess that I expected netstat to report LISTEN for this port as my app was indeed listening. Thanks for looking
    1 By megazoic Ubuntu 18.04 Networking Deployment
  • Question

    Disable old TLS versions (1.0/1.1 ) for Apache/Nginx on Ubuntu 18.04 or CentOS 7

    I recently got asked how we can disable old TLS versions on a server. The user was applying for a PCI compliance and wanted to have only TLS 1.2 running on their machine in order to pass the scan of the PCI vendor.
    Accepted Answer: Here is a little step by step guide on how to set this on a CentOS server. <^>Before you start, please keep in mind that you can always run into some issues and it's really important to make a working copy of your con...
    3 By alexdo Ubuntu 18.04 CentOS Apache Nginx
  • Question

    Why does my droplet have a lot of used space?

    I have a droplet with 80GB of space, however it reports that it has used 75GB. /dev/vda1 78G **75G** 2.8G 97% / When I use the command du -h --max-depth=1 / I get the following in reply: ``` 274M /lib ...
    Accepted Answer: Hello, In some cases, when deleting a file in Linux, it doesn't get actually deleted. This could happen when a process is holding the file open, preventing it from being deleted. The solution would be to either resta...
    1 By jfernandezAxolotl Ubuntu 18.04
  • Question

    How to permanently change DNS nameservers in Ubuntu 18.04.3? Wiki article is not working.

    Hello, I am trying to permanently change the DNS nameserver being using on my droplet. I following this article: https://www.digitalocean.com/community/questions/how-do-i-switch-my-dns-resolvers-away-from-google But t...
    Accepted Answer: Hello, With the older Ubuntu distributions, you could do that with the /etc/resolv.conf however, with Ubuntu 18.04 you should make the change in the netplan configs at /etc/netplan/*.yaml files. The file would look so...
    2 By Aerience Ubuntu 18.04 DNS
  • Question

    Process kswapd0 triggers 100% CPU usage

    Hi, I installed the Docker Droplet (https://marketplace.digitalocean.com/apps/docker) of DO and loaded a modest docker-compose service. After a week of working ok and uninterrupted for 8 days. Suddenly cpu fired up ...
    Accepted Answer: Just for the record: finally I the rebuild the project with the new swap configuration and everything it is going smoothing and with a 0.65% of CPU. I learned that when the project runs low in memory, the operatives...
    4 By willypregliasco Docker Ubuntu 18.04
  • Question

    Can't login to mysql as root user even though I have the password

    I followed this tutorial on how to set up phpMyAdmin on Ubuntu 18.04: https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-phpmyadmin-on-ubuntu-18-04 In step 2 I'm trying to log in to mysql using...
    Accepted Answer: Hi there @maxRay, It looks like that the MySQL password that you are trying to use is not correct. In case that you've lost the MySQL root password I could suggest following the steps from this tutorial here on how to...
    2 By maxRay MySQL Ubuntu 18.04
  • Question

    Ansible problem: Shared connection to server closed

    I have two servers, one is my control node and one is the worker. I've installed Ansible on the control node with the following command: apt update -y && apt install ansible -y And it seems to be working fine. I als...
    Accepted Answer: Hello, I've seen this problem before. I think that by default python 2 is not installed on Ubuntu 18.04 . So a quick fix here is to just add the path to python 3 in your inventory file. It would look something like th...
    1 By bitmap Ansible Development Ubuntu 18.04
  • Question

    Can't reach my Node.js application

    Hello world! I've created a Ubuntu NodeJS 8.10.0 on 18.04 droplet. I've deployed a Node.js app, tested on my computer. I can reach my app from inside the Droplet. curl http://localhost:3000 I can't reach my app from ...
    Accepted Answer: Greetings! I would bet that your application is listening on 127.0.0.1, as opposed to the public interface. If you run netstat -tulpn you should see the applications listening, and it might look something like this: ...
    2 By juliojordan Node.js Ubuntu 18.04
  • Question

    How to configure NGINX to avoid 502 Bad Gateway when communicates with a Docker container?

    Hi, my case is that after having set up a new Droplet with an Ubuntu 18.04 server and have followed the DO tutorials to: 1. Install Nginx 2. Secure Nginx with Let's Encrypt 3. Install Jenkins 4. Configure Jenkins with...
    Accepted Answer: OK just add an update that some days after my latest post, I realized that the main and only reason the server was going down was a lack of resources in the droplet. So I was using a droplet with 1GB of RAM, 25GB HD, ...
    5 By jlbb Nginx Docker Ubuntu 18.04 CI/CD Node.js
  • Question

    #2002 - No such file or directory &mdash; The server is not responding (or the local server's socket is not correctly configured).

    When I try to login my PHPMyAdmin, I get the following error messages: ``` 2002 - No such file or directory &mdash; The server is not responding (or the local server's socket is not correctly configured). mysqlirealc...
    Accepted Answer: Hello, I would recommend changeinglocalhost to 127.0.0.1 in your config.inc.php PHPmyAdmin file. It should look something like this after the change: $cfg['Servers'][$i]['host'] = '127.0.0.1'; That way when using 12...
    2 By bepari662 MySQL PHP Apache Ubuntu 18.04
  • Question

    Can not access my droplet in SG1, is your server in Singapore down?

    Hello DO team, I can not access my droplet either by pinging to my public ip or go to your website and login (I got stuck with a blank page "https://cloud.digitalocean.com/projects"). Please help.
    Accepted Answer: Hello, I've just checked the DigitalOcean status page and there are no incidents reported for SG1. You can find the status page here: https://status.digitalocean.com/ Regarding the white screen, I would recommend disa...
    1 By rreaksmey DigitalOcean Droplets Ubuntu 18.04
  • Question

    Mail from single-droplet getting unauthorized failures from reipient mail servers

    I have a single droplet running my application, and hosting a postfix mail server for sending notifications, etc. However, mail is not working. When I run a cmd-line test mail to a gmail account, I get a rejected resp...
    Accepted Answer: Hello, It sounds like that your PTR record might be the problem I could suggest following the steps from this answer here by @alexdo on how to setup a PTR record: https://www.digitalocean.com/community/questions/how-t...
    1 By blgtechnologylimited DNS Ubuntu 18.04
  • Question

    phpmyadmin suddently gives http error 500

    Hi, I have 3 Droplets all with ubuntu 18.04, Php 7.2.24, phpmyadmin ver. 4.6.6. Until yesterday phpmyadmin worked fine, but now it gives me HTTP Error 500. Otherwise there is nothing wrong with the servers - (not th...
    Accepted Answer: SOLVED!! After many hours i finally found what was wrong. In /etc/phpmyadmin/config.inc.php last line there was a ";" missing $cfg['TempDir'] = '/usr/share/phpmyadmin/tmp'; <-- ;
    5 By kenboye MySQL Ubuntu 18.04
  • Question

    error duplicate listen options for [::]:443 when trying to add a subdomain to my nginx setup

    I followed this DigitalOcean guide on how to setup Nginx (https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-20-04)on an Ubuntu 18.04 droplet. I set up my domain's nameservers to point to ...
    Accepted Answer: Ok so I looked at this guide (https://www.digitalocean.com/community/tutorials/how-to-set-up-nginx-server-blocks-virtual-hosts-on-ubuntu-14-04-lts) and found this: In this new file, we’re going to have to look at the...
    1 By faizanjamilwork Nginx Let's Encrypt Ubuntu 18.04