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.
1571 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...
    10 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

    Mattermost + SendGrid = What am I doing Wrong?

    After what feels like decades trying to get postfix to work on Mattermost install, I've given up and decided to try SendGrid as an SMTP email provider. When I set the connection security to STARTLS I get the followi...
    Accepted Answer: Hi there, I believe that you need to specify the Notification from address and the Notification Reply to address in the Site Configuration\Notifications sectioin. The address needs to match the SendGrid domain name th...
    1 By watrall Email Ubuntu 18.04
  • 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...
    4 By bitmap Ansible 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
  • 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

    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

    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...
    2 By alexdo Ubuntu 18.04 CentOS Apache Nginx
  • 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

    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

    #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

    Certbot error curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to acme-v02.api.letsencrypt.org:443

    I'm doing certbot using snap and PPA, both fails miserably. and some people on internet ask whether you can do a curl manually or not. Then I tried to curl it, and it returns error curl: (35) OpenSSL SSLconnect: SSLE...
    Accepted Answer: Just created a snapshot and build a new droplet with the snapshot. Certbot worked normally. I think it's because of other droplet (lowest droplet uses shared CPU).
    2 By noviceboy17 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

    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

    Websocket Connection limit how to set ?

    Hi there, I programmed a WebSocket server in Java, with the Javax WebSocket library My operating systems are local Windows 10, Cloud Server on Ubuntu, Web Server Apache2 + Tomcat I'm doing my tests on both sides My p...
    Accepted Answer: Hi @cihad, I might be wrong buf if you are using Apache, you might have filled up Apache's available workers. I think the default value was exactly 256. You can open your Apache configuration file. In there you shoul...
    2 By cihad Apache Java Node.js Ubuntu 18.04
  • Question

    No Internet connection after update Ubuntu to 18.04

    Hi. So after update OS I cannot connect to my droplet by SSH. Only way I can access my machine is using "Access Console" page in DO site. When I try to ping anything - I get error "Network is unreachable" (8.8.8.8 too...
    Accepted Answer: Hi, @d3m1doff What happens when you execute ifconfig -a can you see the eth0 interface listed? If this one is not present then we will need to sort this out. I know that sometimes some packages can be uninstalled som...
    1 By d3m1doff Ubuntu 18.04 Networking
  • 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

    Can't upgrade from 18.04 LTS to 20.04 LTS

    I've been trying for weeks to no avail to upgrade my VPS from Ubuntu 18 LTS to 20 LTS. It keeps erroring out, and I haven't been able to figure out why. ``` root@www:/etc/apt# do-release-upgrade Checking for a new Ub...
    Accepted Answer: I found a solution on my own.. I completely replaced sources.list with the real ubuntu 18.04 one, rather than the digital ocean mirror list. It seems the Digital Ocean mirrors are problematic. Original source.list ca...
    3 By MegaTech Ubuntu 18.04 Ubuntu 20.04