To allow access from others on the internet to your server you need to make it public. In this guide we will set your internal IP as static, open the correct port, and publish it under a domain. We will also make it more secure by adding SSL.

Please give us feedback if there is anything you think we should add to the guide, or if there is something we can improve. Have fun!


    Type the address to your router in the browser window. It’s usually or depending on your router and settings.

    Some routers have a sticker on the back with the routers address.


  2. OPEN PORT 80 OR 443

    Go to your port configuration on your router and open port 80 or 443 on the internal IP that you will use as static. Once you’ve done that you should test if the port is open for traffic. Here is a free tool that you can use.


    Your own domain

    Choose the domain name that you want to use. CityNetwork is both cheap and reliable. Visit their site and see if the domain name you want is available:

    This is the one we use as our DNS and it works great! The cost is about 13 USD / year. You will also get mailboxes so that you can use your own domain as an email-address, i.e [email protected]

    Dynamic DNS

    If you don’t need email or your own domain, you could sign up for a DynDNS service. We recommend deSEC which is free and will give you an address that looks like this:

    You can find more information here.


    Get your external IP adress. Then add your external IP to your CityNetwork Setup.

  5. Add your external IP to Citynetwork

    CityNetwork will act as your DNS for the domain, and you have to add your external IP to the DNS settings to be able to reach your server from outside.


    Note: Most ISPs doesn’t provide a static external IP, but as long as you don’t shut down your router for a longer period of time, the external IP shouldn’t change. If it does, you have to manually add it to your domain provider’s DNS settings. You could also set up a DynDNS software on your server that keeps the same IP at all times.

  6. Wait for the DNS to propagate

    Normally this takes around 12 hours. If you want to check the status, you can enter your domain name here. Meanwhile, you can continue this guide.

  7. Add your domain to /etc/hosts
    :~$ sudo nano /etc/hosts

    It should look something like this: localhost
    # The following lines are desirable for IPv6 capable hosts
    ::1 localhost ip6-localhost ip6-loopback
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters

    Notice that you don’t have to do this if you are using any of our VMs as it’s done automatically when setting up SSL.

  8. Get a SSL cert

    For better security we advice you to buy an SSL cert. You can get one for a trial period of 90 days. When the trial period is due, you can buy a cert for only 5.95 € / year. If you are using the ownCloud, Nextcloud, or WordPress VM you can simply just run this command:

    $~: sudo bash /var/scripts/

    The script will automatically create a virtual host and activate it, so you don’t have to continue with the following steps.

  9. Install SSL on the server

    On Apache you install the certs in


    You have to let the server know where your folders and files that you want to publish are located. Without a Virtual Host the server won’t be able to access your site because it won’t find it.

  11. Visit your site

    When the DNS is propagated you can test if it works by visiting your site,

Pro Tip

If you host a regular website, then Cloudflare protects your server. Check it out!