Websites

The Websites app allows you to add, remove and edit websites to your arkOS server. It automatically downloads the configuration data for each app type and configures them in the background.

How to Use
To add a website to your arkOS node, click the Add website button. This will bring up a dialog to choose a website type. Presently there are four types of addable websites:


 * Jekyll: A static site generator popular for hosting lightweight blogs and personal pages. Uses Markdown for parsing and generating blog posts. Requires knowledge of HTML/CSS and website development.
 * ownCloud: A personal cloud system, based in PHP, with a convenient and easy-to-use webapp interface. Hosts your files, calendars, contacts, photos, music and more, accessible from anywhere.
 * WordPress: The classic blogging engine, for keeping others up to date on your latest musings and interests. Also a formidable system for hosting regular websites.
 * Website: This entry is for creating a website that you already have generated with HTML, CSS, JS, etc. It will create a record in the Webapps page and you will have the opportunity to customize it extensively based on your needs.

Once you choose a site type to add, a second window will display with options. This window contains three fields:


 * Site Name: An internal name to identify this site by in Genesis and on your hard drive. Does not affect the site at all. Required.
 * Address: usually a domain name (such as ) or an IP address (such as  ) or a local alias (such as  ). If you want to access your site via multiple addresses (such as public IP address and local IP address), list all of them and separate each address with a space. If you list a domain name you'll also need to configure DNS (explained below). Default: localhost. Required.
 * Port: A port number for this site to respond on. The default is fine, but you will need a separate port number if you want to host multiple sites on your arkOS server without separate DNS names. Default: 80 (443 if SSL is enabled). Required.

The second tab in this screen contains setup information for the individual app you have chosen, such as database credentials or initial user data. This varies depending on the app, and many include mandatory or optional options. Make sure to check it out before you click OK.

Clicking OK will begin the process of downloading the selected webapp’s code and installing it on your server. Once the installation process is complete, the webapp will be visible in your list of websites. Click on the link in the list to see your new site running.

To activate or deactivate an individual site, click the Enable/Disable button to the right. To reconfigure the site, click the Tools icon to the right. This will display a window, allowing you to change your site name, address or port (see above). Individual webapps may have custom options displayed here as well. To delete the host, click Delete.

Of course, remember to check the server status in the above toolbar by clicking Status. It will display in red if any one of its services is not running. Some of your sites may not work properly if a required service is not running.

Public websites
Initially your arkOS website is only visible on the local network. To publish your site on the public Internet you need access to your router or wireless router.

Initial setup in Genesis

 * 1) Set up your website using the Websites tab of Genesis.
 * 2) * Hostname: Use your full domain name (or public IP address if you don't want to use a domain name).
 * 3) * Port: Use port 80. If you want to visit your website over https use port 443 instead (see also step 4 below).
 * 4) Visit your website on the local network to check that it works locally
 * 5) Review the Genesis security recommendations
 * 6) If your website has a log in screen (such as WordPress and ownCloud) then set up a certificate. A certificate lets you access the site through https (the "s" stands for "secure"). Any traffic over http (without the "s") is publicly visible during transit (including passwords and private data). In contrast traffic over https is encrypted to prevent eavesdropping.

Router setup

 * 1) Log in to your router via its web interface. (Read the instructions that came with your router, or find the instructions for your router online).
 * 2) Look for the "Port forwarding" settings. Often these settings are hidden under an "Advanced" section.
 * 3) Forward port 80 (or port 443 if you plan to use https) on your router to the local IP address of your arkOS server.
 * 4) If you find that the local IP address of your arkOS server changes from time to time, you may need to assign a static local IP address. To do so, follow the instructions here: https://bbs.arkos.io/t/set-a-static-ip-address/76
 * 5) Visit your public IP address to verify that the website works. If you do not know your public IP address see http://whatismyipaddress.com/

DNS and domain names
Public IP addresses for most residential and small business Internet connections may change from day to day or week to week. If this is the case then:
 * 1) Register for a dynamic DNS service, such as no-ip.com or another. (arkOS has a dynamic DNS service of its own in the works.)
 * 2) Install the ddclient application via the Package Manager pane of your arkOS device, or via the Terminal with pacman -S ddclient. Follow the |official instructions for ddclient to learn how to use it. After it is configured properly, start the ddclient server on boot with systemctl enable ddclient
 * 3) Verify your website works with the new address you obtained in step 1 above.

If you happen to have a static IP address from your Internet service provider you can either use those numbers as your website address, or register for a domain name. After you obtain a domain name create an "A" record in the DNS settings of your domain registrar. This "A" record must point to your static IP address.

Backup and testing environment
A backup of the website lets you restore the website if something goes wrong. If you have a simple static website that you rarely change, manual backups maybe sufficient. However, automatic backups save time in the long run, and prevent significant loss of data.

(backup instructions to be written)

If website downtime would significantly affect you or others (e.g. an ownCloud site with several users), consider setting up a testing environment. Testing environments let you test upgrades and other administrative changes locally before publishing them on the public Internet.

(testing environment instructions to be written)