All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Script for a single "app" hosted on a VPS?
Hi all -- got another noob-esque question if anyone has a suggestion. I've gathered a handful of VPS services and want to put some of them to use in different ways. For example, I have a locally-hosted TheLounge install that works well, but also disconnects too often for my liking (probably my home net blipping sometimes). If I was going to install a Lounge instance on a VPS, and access it via some domain or subdomain, is there an easy script to install the requisite structure to host just one app? Presumably nginx and letsencrypt or some equivalents?
I've found plenty of "seedbox scripts" such as swizzin that let you install multiple apps and host them, but a) those don't always seem to have the most up-to-date versions of things from what I've seen and b) that feels like overkill for a single app hosting, since I wouldn't care about the panel and other parts which could use extra resources.
Suggestions appreciated! If it just boils down to "install nginx and letsencrypt from apt" then I can manage that I'm sure, but I don't know how much I trust my own security settings
Comments
Make a docker container
I've used docker on my Unraid box -- is it lightweight enough on a low-resource VPS?
https://hub.docker.com/r/thelounge/thelounge/ Someone already did what your looking at doing. :-)
Hah, that often seems to be the case!
Caddy (auto https with letsencrypt) + docker compose
After reading a bit about caddy vs nginx, I do think I'll give caddy a try. I've only used nginx via the proxy manager gui before, only sometimes dabbling in the config files directly, so it would be a learning experience either way, and caddy seems to be more straightforward for simple tasks at least (based on 15 minutes of gooling, lol).
caddy might more easy to set than nginx, but you might have to try it to know
I love caddy server, it is powerful, fast, and pretty easy to setup. The docker file is pretty straightforward as well.
# Webserver
caddy:
image: caddy:alpine
container_name: webserver
ports:
- 80:80
- 443:443
volumes:
- ./wordpress:/var/www/html
- ./caddy_data:/data
- ./caddy_config:/config
- ./Caddyfile:/etc/caddy/Caddyfile
Auto SSL on your domains. Great and powerful project.
That's a really clean example! Definitely less messy than nginx, lol.
But can you only run one caddy container per vps / host, or can you use multiple behind something like nginx proxy manager?
@nocloud, honestly I have not tried this, but I would assume with either some fancy networking or running on different ports this should be a problem. However again, I have not done this, so I have authority on this.
Why would you want multiple? In theory you could probably run caddy behind caddy. I typically use it to serve static files and as a reverse proxy to several node services, nextcloud, rutorrent, pgadmin etc.
I expose a file server on port 9000 like this:
:9000 {
root * /data
file_server browse
}
and then use caddy on another server as a reverse proxy to port 9000 on this box. In theory you could do that on the same box if you really wanted to