# Ghost

> Ghost 6 for blogs, newsletters and memberships, with Ghost's own Docker setup and HTTPS.

We clone Ghost's ghost-docker repository to /opt/ghost, generate its database passwords and pull its images. Ghost needs a domain and working email before it can run, so it starts when you run `vps9-https` with your domain and email: its Caddy gets the certificate, and the owner account is created with a generated password in /root/ghost-admin.txt.

## Details

- Installs on: Ubuntu and Debian; AlmaLinux, Rocky Linux and Fedora
- Smallest plan: Budget (1 vCPU, 2 GB RAM)
- Public ports: 80/tcp, 443/tcp
- Project site: https://ghost.org/

## After the server is ready

1. Put your mail service's SMTP details in /opt/ghost/.env (the mail__ lines). Ghost needs email to log you in, so it won't start without it.
2. Point your domain at the server and allow ports 80 and 443 in the panel firewall.
3. Run `vps9-https blog.example.com you@example.com` with your domain and email. Ghost starts and your owner login is written to /root/ghost-admin.txt.
4. Log in at https://blog.example.com/ghost/ and change the site title and your name in Settings.

## Questions

### Why does Ghost need email before it starts?

Ghost's own configuration says transactional email is required for logins, staff invites and password resets. Any SMTP service works (Mailgun, Postmark, Amazon SES or your own mail server). It's separate from newsletter sending.

### Can I send newsletters?

Yes, newsletters are built into Ghost. Bulk newsletter sending goes through Mailgun, set up in Ghost's settings; the SMTP details in .env are only for transactional mail such as logins.

### Why Docker and not Ghost-CLI?

Ghost recommends Ghost-CLI on Ubuntu with MySQL and nginx, and offers Docker as a preview that is also the only way to run its self-hosted analytics and ActivityPub. We use Ghost's Docker setup because it runs on every distribution we offer and keeps Ghost, MySQL and Caddy together. Ghost includes a script (scripts/migrate.sh) for moving a Ghost-CLI site into it.

### Can I move an existing Ghost site here?

Yes. Export your content from the old site (Settings, Import/Export), import it into the new one, and copy your images from the old content/images folder into /opt/ghost/data/ghost/images.

## Order it

Pick Ghost in the order form, or use `"app": "ghost"` in the API or `vps9 servers create --app ghost`. See [all one-click apps](https://vpsnine.com/apps) and [plans](https://vpsnine.com/plans).
