Skip to content

Type a word or two, like firewall or rollback.

Open Coresmith
Browse the docs
Self-hosting Checked against Coresmith 0.8.46.

Back up or remove Coresmith

Open as Markdown

Coresmith's own backups

Every night at 04:00, and before every update, Coresmith backs up its database and its settings, secrets included. It keeps the latest 14. To make one now, choose Back up now under Settings, General, Backups.

The backups are kept on Coresmith's own server, in /opt/coresmith/shared/storage/app/private/backups, so they're lost if that server is. Have Coresmith copy each one to S3 as well.

Copy backups to S3

  1. Under Settings, General, Backups, choose Copy to S3.
  2. Enter the bucket, its region, and an access key that can write to it. For an S3-compatible store such as MinIO, also enter its endpoint and turn on Path-style addressing.
  3. Save.

After each backup, Coresmith copies its database to the bucket, under your path prefix, then coresmith/ and Coresmith's address. The copy leaves out Coresmith's keys, so the secrets in it can't be read from the bucket alone.

Careful

Keep those keys yourself. Copy APP_KEY and CORESMITH_VAULT_KEY from /opt/coresmith/shared/.env into your password manager. You need both to restore a copy.

Coresmith never deletes copies from the bucket, so set a lifecycle rule there that expires old ones. The Backups card shows when the last copy went, or why it didn't.

Restore Coresmith on a new machine

  1. Install Coresmith on the new machine with the same address as before, and point that address at the new machine.
  2. In /opt/coresmith/shared/.env on the new machine, replace APP_KEY and CORESMITH_VAULT_KEY with the values from your password manager.
  3. Download the copy you want from the bucket onto the new machine.
  4. Run this, and confirm when asked:
Terminal
cd /opt/coresmith/app && sudo -u coresmith php artisan coresmith:restore /path/to/coresmith-20261120-040000.tar.gz

Coresmith puts its database back and starts using the keys from .env. Sign in with your usual account. Your teams, servers and apps are all there, and Coresmith uses the same key to reach your servers as before.

Your apps' databases are backed up separately. Back up and restore a database.

Remove Coresmith

An Owner can choose Remove Coresmith under Settings, General. It asks twice, the second time for Coresmith's address, your password and, if you use two-factor sign-in, a code from your authenticator app. Or run this on Coresmith's server, and type uninstall when asked:

Terminal
cd /opt/coresmith/app && sudo php artisan coresmith:uninstall

Either way, Coresmith:

  1. saves its settings, its backups and, if it used SQLite, a copy of its database, in /root;
  2. takes its key off every server it can reach, and lists any it couldn't, with the line to remove from each;
  3. removes itself from the machine.

Your servers, and everything on them, keep running. Apps deployed on Coresmith's own machine keep running too.

If you handed Coresmith's machine over to Coresmith Cloud, remove Coresmith once Coresmith Cloud has taken the machine over. Remove Coresmith asks you to finish the move first if you try sooner, but the command doesn't check, so wait before you run it. Coresmith Cloud keeps its access to the machine afterwards.