How to Install Oracle VirtualBox On Ubuntu 18.04 LTS Headless Server

Install Oracle VirtualBox On Ubuntu 18.04

31 Responses

  1. Gianni Franceschinis says:

    This is a great guide.
    Thanks so much!!!

  2. Daryl Lee says:

    Nice work. But when I browse to phpvirtualbox and log in, I get a failure to connect to “”. Any idea what that’s all about? The userid/pwd is correct

  3. Chuck Razalas says:

    Great tutorial but like every other time I have tried I get the same issue about failure to connect to “” and I have changed the IP and I have changed the usernames and I have made sure to allow the port 18083 and no matter what I do it NEVER works. I have tried on CentOS 7 and now Ubuntu 16.04 LTS and same issue every single time no matter what tutorial I try. I followed this guide to a “T” and same as all the rest. Why is this so complicated and why does it NEVER work?

    • Chuck Razalas says:

      Ok never mind. I finally got it to work. I didn’t change the this time and most importantly, I made sure I did all the steps with the correct User this time. So overall your tutorial was 100% dead on I just didn’t follow the users clause so that was on me. Thanks so much for providing a tutorial that was easy to follow and that actually worked for me.

  4. Chuck Razalas says:

    Quick question SK. Ok so I have everything working perfectly and I did end up having to change the IP to my actual server IP after all. I can login to the PHP Virtual box login and I can see the VM I created and it’s running and all is well except one problem. I can only see it in the console screen and I cannot access the VM from a web browser. My VM is Univention Corporate Server and again I can see it running in the Console but I need to access the Univention Portal from a web browser and not the Virtual Box console. How can I see a VM I create from the outside? No matter what I do I just can’t access it. Thanks in advance.

    • SK says:

      If both systems (VM and the host) are in the same network, you can access it from the web browser. Check the network settings of your VM and make sure you have selected the “Bridged network” option.

      • Chuck Razalas says:

        One problem with that SK. My hosting company 1&1 doesn’t allow Bridging, go figure right? So what I have tried is using adapter 1 as Host Only and adapter 2 as Nat but no luck. I even tried port forwarding from my server ip to and still no luck. Also tried adding the following command in IP Tables: iptables -t nat -A PREROUTING -p tcp -d my.server.ip –dport 80 -j DNAT –to-destination and also no luck. I have tried with Ubuntu 16.04 LTS and now trying again with CentOS 7 as the base. The VirtualBox install process goes off without a hitch. I am then trying to install Univention Corporate Server as a VM in VirtualBox and it installs but always says it could not set a default route and makes me manually enter my netwwork details. I input my server ip, then the submask comes up and it’s different than what the host server submask actually is. I change it to what it is on the actual host server, then when Gateway comes up I try what my hosting company says the host Gateway IP is and always get an error saying it’s unreachable. I then try again with the auto defaults that pop up and again nothing. I’m so frustrated with this at this point. Any other ideas?

        • SK says:

          Hello Chuck, enabling bridge network on VM has nothing to do with hosting provider as far as I know. Because, you’re enabling it on your VM, not in the host system. The VM (The univention server) should be reachable in-order to access it from a remote system. I am not a expert in networking. I don’t know how to do it. My apologies.

  5. Lucien Bunel says:

    Hello !
    I just switched from Ubuntu server 16.04 LTS to Ubuntu server 18.04 LTS
    and I lost my PhPvirtualbox … so I did your tutorial like I did for 16.04, but the Apache2 does not want to start?
    root @ proliant: ~ # journalctl -xe
    – Support:

    – The vboxdrv.service unit (unit) has completed its startup, with the RESU result
    Aug 30 10:58:40 proliant systemd [1]: Starting The Apache HTTP Server …
    – Subject: The unit (unit) apache2.service started to start
    – Defined-By: systemd
    – Support:

    – The unit (unit) apache2.service started to start.
    Aug 30 10:58:40 proliant apachectl [5348]: (98) Address already in use: AH00072:
    Aug 30 10:58:40 proliant apachectl [5348]: (98) Address already in use: AH00072:
    Aug 30 10:58:40 proliant apachectl [5348]: no listening sockets available, shutt
    Aug 30 10:58:40 proliant apachectl [5348]: AH00015: Unable to open logs
    Aug 30 10:58:40 proliant apachectl [5348]: Action ‘start’ failed.
    Aug 30 10:58:40 proliant apachectl [5348]: The Apache error log
    Aug 30 10:58:40 proliant systemd [1]: apache2.service: Control process exited, c
    Aug 30 10:58:40 proliant systemd [1]: apache2.service: Failed with result ‘exit-
    Aug 30 10:58:40 proliant systemd [1]: Failed to start The Apache HTTP Server.
    – Subject: The unit (unit) apache2.service failed
    – Defined-By: systemd
    – Support:

    – The unit (unit) apache2.service failed, with result RESULT.
    proliant root @: ~ #
    do you have an idea ?
    Thanks part ahead

  6. Lucien Bunel says:

    hello it works now after installing
    soap extension

  7. Tanvir says:

    Thank you .
    it worked fine

  8. Gary Cuppett says:

    Are these instructions complete and working for Ubuntu 18.04.1 LTS ???

  9. John Anderson says:

    Just as a note, I was not able to install until I enabled the Canonical universe libraries too.

  10. Shaly says:

    It fails to install virtualbox package expecting few libraries as dependencies – and those libraries are not available as packages from the default repo’s from what I’m seeing. Is that die to the canonical universe libraries?

  11. Jens G says:

    Thanks for this. But I get:

    The following packages have unmet dependencies:
    virtualbox-5.2 : Depends: libqt5x11extras5 (>= 5.6.0) but it is not installable
    Recommends: libsdl-ttf2.0-0 but it is not installable
    Recommends: pdf-viewer

    When running sudo apt install virtualbox-5.2

    Any ideas?

  12. Robin van Ruitenbeek says:

    Hmm.. everything seems to be working but when i try to login it says:

    Exception Object
    [message:protected] => DTD are not supported by SOAP (
    [string:Exception:private] =>
    [code:protected] => 64
    [file:protected] => /var/www/html/phpvirtualbox/endpoints/api.php
    [line:protected] => 134
    [trace:Exception:private] => Array

    [previous:Exception:private] =>

  13. greg says:

    i make it work try this
    vboxwebsrv -H

  14. Toby says:

    Your instructions are on the mark! Much gratitude!

  15. germanguy32 says:

    Oracle Homepage looses against you!
    after a short periode reading on your site, it can be seen: there’s a checker on work! good to know…
    Thx man. can be soo easy—

  16. Ben says:

    Brilliant guide, thankyou!

    Just a heads up on Ubuntu server 18.04 I couldn’t for the life of me get virtualbox to run until I disabled secureboot, followed these instructions to do it :

  17. jfgvtyfyu says:

    ok service not corect start

    juste restart use full command line

    /usr/lib/virtualbox/ stop

    /usr/lib/virtualbox/ start

    and working please update your tutorial

    for add this command

  18. Based on you tutorial I automated the installation and config, also updated the phpvirtualbox to latest and VirtualBox too. Anyone can use this script in terminal copy and execute this –> bash <(curl -sS installVBoxClient –logon-password 'The current user's password'.

    The –logon-password is to install and configure the vbox 6.0 and phpvirtualbox 5.2-1 unattended.

    After installation remember to change the admin/admin credentials.

    Give it a try.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.