Recommendations for simple, secure personal server setup (lucli, Commandbox, etx)

I’m getting ready to rebuild a public server I use for personal stuff and trying to figure out the most optimal way of getting Lucee setup and minimize risk/maintenance.

For critical production environments, I’ve also stuck with provisioning scripts to install Nginx, Tomcat, Java & Lucee so I can patch any with the latest security fixes at any given moment. The downside to this approach, is it does take some time/effort to keep things updated.

This personal, public server will be running behind Cloudflare’s free tier, running on a low end Digital Ocean droplet that’s locked down to only allow HTTP/S traffic from Cloudflare’s IP ranges.

I see that Lucee is promoting lucli on the home page as the a way to install in the “Get Started” section. I know this was created by Mark Drew, but I’m wondering if this is really going to be “officially” supported. The GitHub page lists the project as still being in “alpha”, so I’m not sure how ready it is for real usage.

Ideally, I’d like to simplify the stack to reduce risk and make it easier to manage and keep things updated. Since we’re talking about a server where probably 99% of the traffic will be bots (likely probing for vulnerabilities), I’m also well aware that there’s risk w/any solution.

I’m just wondering if lucli is appropriate method of simplifying the stack.

If not, I might stick with Commandbox to simplify things, since I know the Ortus team is constantly keeping this updated.

Is lucli ready for this usage?

Would Commandbox be a better option?

Does anyone else have recommendations for an easy to maintain solution to keep a simple personal project secure?

For a low-maintenance personal server I’d go with the official Lucee Docker image. Pin the Java and Tomcat versions and rebuild regularly to pick up security patches. Declare extensions in .CFConfig.json with pinned Maven coordinates and set LUCEE_ENABLE_WARMUP=true, so they are installed at build time. Put Nginx or Caddy in front and keep the admin locked down. Which of those fits your setup? I can go into more detail.

I’d prefer to avoid containers, just to keep things a little simpler and the reason lucli or Commandbox was appealing, because both would allow pretty simple development environments that are cross platform and I can get things set up via configs that could be deployed to any environment.

If I wanted to run Commandbox to setup a single server which serves multiple “sites” (probably w/Nginx as a proxy) where the “production” server is running a RHEL-9 compatible OS and development is mainly under Windows, how would you recommend setting up the environment.

We’ve been running lucli without any issues for a couple of months now, so it’s definitely ready for this kind of use. I’ll ask Mark whether we can drop the alpha label and do a proper release.

Honestly, containers are the best answer. If you are greenfield, it’s easy to get into, and you can deploy on something like AWS Lightsail in about 5 minutes and $5/month. And the nice thing is that it can scale up as you need to move it over to ECS/EKS or any other container service. The only thing that gets folks is that any filesystem changes won’t survive – so you do need to dump things that may have been upload onto durable storage somewhere. But upgrades, patches, etc., are as complicated as bumping the version number in a Dockerfile, testing and then pushing the image.

Having not used lucli, I can’t speak to that, but I can affirm that CommandBox is professionally supported open source (via ad-hoc support or a CommandBox Pro license) so we can provide support SLAs if this is important to you. CommandBox also has full web server capabilities that can make it a single moving part that drops in replacement for Nginx/IIS/Apache as well as your servlet container, and CF engine. We have a lot of CF-centric lockdowns out of the box so it’s very solid from a security standpoint, and support client cert, SSL SNI, unlimited HTTP/S/AJP bindings, and certs. And, even though we use Docker for prod deploys, ComandBox lets you get 95% the same setup locally without any complication-- including flags to force file system case sensitivity or insensitivity if you wish.

Anyway, as the lead developer of CommandBox, I’m obviously biased :slight_smile: but I’m happy to answer any questions you may have about it.