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.
1243 Results
  • Question

    No internet connection after command poweroff in Ubuntu 18.04 LAMP server

    I don't know why it happened . I just rebooted my droplet in order to make some maintenance and now no internet connection. I have a message which says network is unrecheable when I ping 8.8.8.8 and if I perform sudo ...
    Accepted Answer: Hello, @randomspider 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 uninstal...
    1 By randomspider Ubuntu 18.04 Networking
  • 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: Hi there @willypregliasco, It sounds like that you might not have enough RAM and the processes are moved to SWAP too frequently which could cause the high CPU load. There are a few options that you can configure that ...
    2 By willypregliasco Docker 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

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

    How do I host 2 nextcloud instances under 2 domains on the same droplet?

    I have a mailinabox+nextcloud server on my droplet hosted at example1.com and I want to use the same droplet to host a seperate nextcloud + other selfhosted tools instance at example2.com. How would I go about doing ...
    Accepted Answer: Hi @Lumiobyte, You'll need to install NextCloud in different directories or subdomains. Basically you'll need a different DocumentRoot for both applications. Additionally, each instance will need it's own Database. A...
    1 By Lumiobyte Nginx Ubuntu 18.04
  • Question

    Problem with copy-paste into DigitalOcean Droplet´s Console window

    I am trying to import the RSA-key of an SSH key-pair by copy-pasting into the Console, the windowed terminal application that opens when you click "console" on the Droplet page. The prompt only seems to accept normal...
    Accepted Answer: The issue with the console app doesn´t seem to be improving and there is no solution, but this is another one: @cjw199 answer to “copy and paste into console (https://www.digitalocean.com/community/questions/copy-and-...
    2 By lausguy Ubuntu 18.04 Linux Commands Ubuntu Apache
  • 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...
    2 By devdojo Ansible Ubuntu 18.04
  • Question

    how to force TLS/SSL in the Wordpress one-click app

    Ubuntu 18.04, no virtual server setup, single website only, following directions from marketplace, closed port 80, but there was no instructions on how to force all web traffic to use https. Any help would be appreci...
    Accepted Answer: Hi @johnnyrook, I won't recommend closing port 80 just redirecting all traffic from HTTP to HTTPS. There are a few ways to do so. Redirect to https using .htaccess Redirect to https using a WordPress plugin Redirect ...
    1 By johnnyrook One-Click Install Apps Ubuntu 18.04 WordPress
  • Question

    My Sites Have Been Hacked - Whats the Best Security Prevention

    Hi Guys I have several wordpress sites hosted on an Ubuntu server driven by Nginx. Ive had to clean out many bogus php files and clean up my sites following an obvious hack I have fail2ban installed and ssl Hardening...
    Accepted Answer: Hello, @thinknew I will recommend you to check the folder's structure and make sure that the permissions are not set too high. This should prevent people from accessing certain directories and also prevent them from ...
    1 By thinknew Ubuntu 18.04 Nginx Security WordPress
  • 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...
    1 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?
    1 By cvanorman Nginx Ubuntu 18.04 Networking
  • Question

    ClamAV installation

    Hi! I install ClamAV on DO Ubuntu bionic VDS: ``` apt install clamav clamav-daemon service clamav-daemon stop freshclam service clamav-daemon start ``` Freshclam updates database successfull: Tue Mar 3 15:17:58 2020...
    Accepted Answer: SOLVED: addition of 2GB swap solved problem. ClamAV eats much memory: ``` free -m total used free shared buff/cache available Mem: 985 888 67 0 ...
    1 By sirevtov Ubuntu 18.04
  • Question

    Why won't my one-click Wordpress site load?

    Hi, I've successfully created a One-Click Wordpress Droplet, logged in via SSH, and completed the configuration. I've also created / edited DNS records on Digital Ocean and my domain name registrar, and am routing tra...
    Accepted Answer: Ok, I have solved this issue by setting up Apache virtual hosts as suggested in the document here: https://marketplace.digitalocean.com/apps/wordpress And running the certbot configuration wizard. Thank you! Jesse
    3 By Charmed WordPress One-Click Install Apps 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 devdojo Ansible Development 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, ...
    3 By jlbb Nginx Docker Ubuntu 18.04 CI/CD Node.js
  • Question

    Dokku app cannot access via domain

    I bought this domain coshop-nozzha.academy from Namecheap and I move it to Digitalocean DNS After that I pointed the domain to my droplet (dokku droplet) Then I accessed my dokku app via domain api.coshop-nozzha.acade...
    Accepted Answer: I was accessing the app using https however the connection wasn't secure so I solved this problem by accessing the app using http as the follwing http://api.coshop-nozzha.academy or by secure the app connection using ...
    1 By amjedomar Ubuntu 18.04 DNS Dokku Nginx
  • Question

    Lets Encrypt SSL no renewals were attempted

    I'm trying to renewal my SSL certificate on my sit, when I run: certbot renew I get "No renewals were attempted" and when I run certbot certificates, I get "no certs found". I can see files in the /etc/letsencrypt for...
    Accepted Answer: Hi all, As this turned out to be a long discussion, I will summarize it so that it is easier for anyone else who comes across this to find the solution: The problem affected the Ghose droplets created from the Digital...
    7 By graemeb401f102bf96424ef668 Ubuntu 18.04 Let's Encrypt
  • Question

    How to 301 redirect from www to non-www using nginx as reverse-proxy for node.js app?

    I am trying to 301 redirect https://www.tankienews.com to https://tankienews.com without any extreme modifications to the nginx setup in /etc/nginx/sites-enabled/tankienews.com, but have been unable to get the redirec...
    Accepted Answer: Hi there @jimmydeal16, Have you tried following the steps from this tutorial here: https://www.digitalocean.com/community/tutorials/how-to-redirect-www-to-non-www-with-nginx-on-centos-7 Basically it suggests creating ...
    1 By jimmydeal16 Nginx Ubuntu 18.04
  • Question

    How to add an Lets encrypt certificate dynamically using CNAME verification?

    I have been working on a web app where users can create custom profiles of them and see it on their custom domain by adding an A record and CNAME record. If they have their profile on https://webapp.com/profile they c...
    Accepted Answer: Hello, If I understand this correctly, it sounds like that you need some kind of automation to create a new Nginx server block for each website, and then install the Let's Encrypt SSL certificate for the new domain. T...
    1 By Cybil Apache PHP MySQL Ubuntu 18.04 Security
  • 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...
    1 By Aerience Ubuntu 18.04 DNS