Introducing Indie Web Server (video)
I just recorded a short video demonstrating just how simple and seamless Indie Web Server really is.
To install and run a secure local development web server and serve the current directory without certificate warnings:
npm i -g @ind.ie/web-server web-server
To install and run a secure production web server and serve the current directory without certificate warnings, on the production machine (e.g., VPS server) that you have already pointed a domain name to, do:
npm i -g @ind.ie/web-server web-server --global
Then hit your site at your domain name. The first time you hit the site, it will take a few seconds to load as Let’s Encrypt certificates are seamlessly provisioned for you and used. That’s it.
Note: If you want to run your production server so that it restarts should it crash or should the computer restart,you should use a process manager like pm2. Using pm2, the number of commands you need to set up a fire and forget personal web server balloon to a whopping four:
# Install pm2. npm i -g pm2 # Set pm2 to run itself and your servers at startup. # (This will output a command and ask you to copy and paste it. Do that.) pm2 startup # Install Indie Web Server. npm i -g @ind.ie/web-server # Run Indie Web Server using pm2. pm2 start web-server -- --global
That’s it! You now have a production web server that restarts should it crash and is automatically launched on server restarts. It has never been this easy to run your own secure personal web server. Enjoy and please do let me know you get on with it.
For full details of the command-line syntax (and the API), please see the documentation.