Since I set up things like this frequently this is mostly a reference/checklist for myself, but feel free to follow along at home!
Total cost should max out around $5USD/mo for your first install, though there are free trials and other options if you want to deviate from these instructions.
Things to install first:
- PuTTY for connecting to the server
- GitKraken for testing
You need a server to run your website; if you want to get fancy you can host multiple blogs/domains on a single server, or you can provide a server in your own closet or from any hosting provider. Here's how I set up mine through Digital Ocean:
- Log in to DigitalOcean.com
- Create a new droplet. Ubuntu, cheapest option to start (you can upgrade later)
- Log in to RunCloud.io
- Create a new server. Point the IP address at the IP issued to you by digital ocean.
- You might get a notification to “install runcloud” - if so,
- Check your email. You should have login details from digitalocean for your new server. Use PuTTY to connect to your server IP.
- Pro tip: username is probably root
- Pro tip: right click in the putty window acts as paste for the password, even if you see no visual confirmation of that. Just right click and hit enter.
- The server will probably ask you to change the password now.
- You should now be in shape to copy and paste the RunCloud setup script from their window. Let that finish.
- RunCloud will now continue setup on the web interface and show you a dashboard when complete.
You need a domain name to point at your blog/site/instance. I recommend domains.google.com or a service like namecheap.com.
- In your domain manager such as NameCheap, enter a "Custom DNS" for the domain
- Set the dns to "ns1.digitalocean.com", "ns2.digitalocean.com", "ns3.digitalocean.com"
- DNS propogation might take 24 hours so that part is annoying.
- In the DigitalOcean.com interface, go to the Networking tab and Add a domain.
- Set up your domain with an "A" record for "yourdomain.com" directing to your IP address (as received in your DigitalOcean confirmation email from before)
- Also set up an "A" record for "www.yourdomain.com" also directing to that IP
- DigitalOcean should set up default NS entries for ns1, ns2, and ns3.digitalocean.com
Server Software Setup
Now that your hardware is up and running, each instance of the LUX Web Engine (each blog/site/domain of yours) needs a new "Web Application" installed on to your hardware.
- Go to your server summary page on RunCloud.io
- Click on the "Web Application" tab and "Add new application"
- Fill in the details.
- You probably want a pithy name, and to put "*.yourdomain.com"
- PHP version to 7.3 (it should work with whatever though)
- I use Native NGINX (but whatever works for you)
- Stack mode: Production
- After you complete WebApplication setup, you can set this application as "default" for this server if you wish. This will allow you to access the site via IP address (which is useful if you are waiting for the domain DNS entries to propogate around the planet)
- You should now be able to enter your server IP address (or domain, if ready) and get a "403 Forbidden" error that lets you know you set everything up correctly so far!
Set up a Git repository
- Log in to Github.com
- Create a new repository
- In RunCloud.io, for your web application, go to the Git tab and add github integration.
- You will need to set up a deployment key - click the link displayed to generate one.
- In Github, in repository settings, go to "Deployment Keys" and paste the code there.
- Back on RunCloud.io, after setting up the git integration, you'll be given a webhook for git pushes. Copy that URL,
- and paste that webhook into the "github.com" webhooks tab on your repo settings. Make sure the webhook is in "json" format, it defaults to an unsupported type!
- this is a lot of back-and-forth in browser tabs, I know.
You should now be all set up!
- Open up a text editor and create index.html in your git repo. Plop a hello world in there!
- Push changes in your git client. It should update to the website immediately!
You are now ready to install the LUX Web Engine! (which is just cut n pasting one file really so you're basically done)