NextPress documentation

The nextpress command

Every nextpress command and option for installing, upgrading, checking, exporting, resetting and removing a NextPress server.

On this page

The installer puts the nextpress command at /usr/local/bin/nextpress. Run nextpress help to see the commands on your server, and nextpress --version to see the command's version.

Commands

CommandWhat it does
nextpress installSets up and starts NextPress in the install folder
nextpress upgradeMoves to the latest version. See Upgrade NextPress
nextpress statusLists each service and whether it is running
nextpress logsFollows the logs of all services. Press Ctrl+C to stop
nextpress logs appFollows only the named services: app, postgres, caddy
nextpress restartRestarts all services
nextpress reloadRestarts Caddy, the web server
nextpress exportWrites your data to a file. See Back up and move your data
nextpress import <file>Loads an export file
nextpress reset-password <email or username>Sets a new password. See Passwords and reset
nextpress update-helper on, off or statusTurns updates from the dashboard on or off, or shows whether they are on and how the last one went
nextpress resetErases all data and uploaded media and starts fresh
nextpress uninstall --yesRemoves NextPress from the server
nextpress helpShows the commands
nextpress version, -v or --versionPrints the command's version

Options for any command

OptionWhat it does
-d <path>, --install-dir <path>Uses another install folder. The default is /opt/nextpress
Shell
nextpress --install-dir "$HOME/nextpress" status

Options for install and upgrade

OptionCommandWhat it does
--version <tag> or -V <tag>install, upgradeUses one version, such as beta-v1.5.0
--latestupgradeUses the latest version. This is the default
--overrideupgradeErases the database after a backup when the versions are too far apart
--yes or -yupgradeSkips the override confirmation

Options for reset-password

OptionWhat it does
--password-stdinReads the password from a pipe, for scripts

Settings the command reads

Set these in the environment before you run the command.

SettingWhat it does
NEXTPRESS_INSTALL_DIRThe install folder, when --install-dir is not given
NEXTPRESS_COMPOSE_URLWhere install and upgrade download the setup file from
NEXTPRESS_PUBLIC_IPThe public address shown at the end of the install, without asking
NEXTPRESS_SKIP_DOCKER_INSTALLWhen 1, the installer stops if Docker is missing instead of installing it

Reset

nextpress reset erases all data and uploaded media, then sets the database up again with the default templates and themes, like a new install. It saves a database backup in backups/ first, and asks you to type yes. Add --yes to skip the question.

To keep your content across a reset:

Shell
nextpress export --out ~/nextpress-data.json
nextpress reset
nextpress import ~/nextpress-data.json

Uninstall

nextpress uninstall --yes stops the services, removes the database, the uploaded files and the certificates, removes the NextPress images and the dashboard update service, and deletes the install folder. Without --yes it refuses to run.

Your content is gone afterwards unless you kept an export somewhere else.

Commands that need sudo

nextpress update-helper on needs root and systemd. Run off with sudo too, so it can remove the background service. Other commands need a user who can use Docker and write to the install folder.

Next steps