Viewing a single comment thread. View all comments

twovests wrote (edited )

Hi! I'm the current sysadmin of jstpst and I recently figured out (with lotsa help from emma) how to host it!

Right now we're hosting Jstpst on a DigitalOcean VPS using Docker.

Are you already familiar with selfhosting on Linux? The whole "Rent a VPS or something, set up a domain, host a service, put it behind Nginx or whatever" and all the "sudo nano /etc/blahblahblah"?

If so, you have the prerequisite skills :D I'm using Docker to host Postmill because I've had so many pains with dependency conflicts and upgrades before. Docker's promise that I would never have to worry about that again has held true.

The repo with Dockerfiles is here: https://codeberg.org/Postmill/Postmill

The docker instructions are here: https://codeberg.org/Postmill/Postmill/wiki/Serving-Postmill-using-Docker-and-Caddy

The Docker Compose (which sets up and links the multiple Docker images which a Postmill install uses) is here: https://codeberg.org/Postmill/postmill-docker-example


For directed guidance, are you familiar with using Linux and hosting web services / sites on Linux? (I think you can do this on other OSes too, but I can't speak to BSD or Windows or whatnot)

2

astroaron OP wrote

Hey thank you so much! I know my way roughly around linux, don't know much about self-hosting unfortunately. All my previous website work has been very plug and play haha. But I'll read over the instructions here and see how much I think I can handle.

3

twovests wrote

Learning enough self-hosting to set up Postmill is difficult, but doable! Having some Linux experience is a pretty good start.

I don't know your exact skill level, but I figure you're at least familiar with using the Linux command line and with using Google/StackOverflow/etc.

I'd recommend doing all your learning on a Raspberry Pi (or other spare computer to install Linux on), if you have one, so you aren't paying ~$10/month to a VPS provider.

What is your main OS? (Windows? MacOS? Linux?) This matters a bit for what tools you'd use to manage your server.

If I were to recommend some "milestones" along the way to hosting Postmill, I would break down the goals like this. Except for the Postmill specific steps, you can find good guides for any of these all over the internet:

  1. Learning:
    1. Set up Linux on a Raspberry Pi (or spare computer).
      • You can go straight to the VPS if you want.
    2. Set up SSH (using key auth only) to that Linux machine, and only use SSH to manage it. (No desktop GUI!)
    3. Set up a Caddy server on that Linux machine and set up a 'hello world' page.
      • I very highly recommend Caddy because it's very "production ready" by default, easy to install (because Go compiles to static binaries) and easy to use.
    4. Set up a Postmill instance on your Linux machine using Docker and Docker Compose.
  2. Doing:
    • You'll repeat a lot of the work you did above, but it should go a lot faster once you've done all the trial-and-error. Plus, you'll have your history from the above to refer to.
    1. Set Linux on a VPS with a provider like DigitalOcean.
    2. Buy a domain from a registrar like IWantMyName, and set up the A and AAAA records to point to your VPS.
    3. Set up SSH (using key auth only -- extra important this time!) to the server, if you didn't in part 1.
    4. Set up a Caddy server and set up a hello world to your domain.
    5. Install Postmill on your VPS using Docker and Docker Compose

I luv to talk about this stuff so pls ask any questions you have :3

2

astroaron OP wrote

Alright! I'm working through learning now (getting myself more comfortable with SSH before I start trying the Caddy server), and will let you know when I move on to doing! Thank you so much, again

2

twovests wrote

Yay :D I'm happy to hear that!! Good luck :)

1

astroaron OP wrote

Hi! Slow going (not overly difficult, just real life keeps interfering.), but I've just finished step 3 of part 1, and have my hello world page! I'm a bit confused by Json vs Caddyfile. When I used JSON in caddy and checked with localhost I had the hello world page on one port and the default caddy splash page on my main port. However, when I tried setting it up using a caddyfile, I only got the hello world page on the port, got a refusal to connect on my main port. Do you have any idea why there would be that difference in behaviour?

was following this tutorial

(hoping to get confident enough with caddy to try setting up postmill this coming week! We'll see how it goes!)

2

twovests wrote

Hi! I missed this earlier.

Can you tell me what ports specifically these were on, and were you trying to connect to a Caddy server running locally (i.e. at localhost:1234) or somewhere else?

1

astroaron OP wrote

The tutorial has me use ports 2019 and 2015 (this is all being done locally), with the hello-world showing up on port 2015.

(pushing ahead, I'm looking to get the postmill images as outlined here. When I try to clone it, it says permission denied. This feels like an issue that anyone with some experience with git would not run in to. Am I missing something obvious)

Thank you for all of your help!

2

twovests wrote

Hi, are you in the Postmill directory?

git clone git@codeberg.org:Postmill/Postmill.git
cd Postmill
docker build -t registry.postmill.xyz/postmill/postmill:php-latest --target postmill_php .
docker build -t registry.postmill.xyz/postmill/postmill:web-latest --target postmill_web .

IIRC, these docker build commands look inside the current directory for a matching Dockerfile. It's strange, but the url registry.postmill.xyz/postmill/postmill:php-latest is an identifier.

1