A full guide for installing, configuring and running Ghost on your Ubuntu 20.04 or 22.04 server, for use in production
ghost
causes conflicts with the Ghost-CLI, so it’s important to use an alternative name.ufw
was activated, the firewall allows HTTP and HTTPS connections. Open Firewall:
npm
or yarn
.
ghost help
to see a list of available commands.
ghost-cli
is installed, you can install Ghost itself. The following steps are the recommended setup. If you need more fine-grained control, the CLI has flags and options that allow you to break down and customise the install steps.
https://example.com
. If you use HTTPS, Ghost-CLI will offer to set up SSL for you. Using IP addresses will cause errors.
localhost
(press Enter
to use the default value). If MySQL is installed on another server, enter the name manually.
root
. Then supply the password for your user.
https
Blog URL and have already pointed your domain to the right place, Ghost-CLI can automatically set up SSL for you using Let’s Encrypt. Alternatively you do this later by running ghost setup ssl
at any time.
SSL certification setup requires an email address so that you can be kept informed if there is any issue with your certificate, including during renewal.
systemd
is the recommended process manager tool to keep Ghost running smoothly. We recommend choosing yes
but it’s possible to set up your own process management.
yes
runs Ghost, and makes your site work.
https://example.com/ghost
. When you get there, you’ll be prompted to create your account as the site owner.
ghost help
for a list of available commands, or explore the full Ghost-CLI documentation.
ghost uninstall
to remove it and try again. This is preferable to deleting the folder to ensure no artifacts are left behind.
If an install is interrupted or the connection lost, use ghost setup
to restart the configuration process.
For troubleshooting and errors, use the site search and FAQ section to find information about common error messages.