# Install your 6ammart code

> Source: https://www.allsweb.com/sixpanel/docs/install-app
> Markdown for agents: https://www.allsweb.com/sixpanel/docs/install-app.md
> Publisher: AllsWeb (www.allsweb.com)

Part of: SixPanel documentation

**What this page is for.** Get the 6ammart code you bought onto the server and make the project live.

**You need**

- Your 6ammart admin (Laravel) code, as **either**:
  - the **zip** from your CodeCanyon download, or
  - a **git repository** of your own, and its address, branch and a read token
    if it is private. Never done that? **[Put your code in a git
    repository](https://www.allsweb.com/sixpanel/docs/put-your-code-in-git)**.
- **Do this first** — the project's domain must already be saved on the
  **Domain & SSL** page. The install writes your site address into the app's
  settings, so it refuses to start without one. See **[Domains and
  HTTPS](https://www.allsweb.com/sixpanel/docs/domain-ssl)**.

---

## Zip or git — pick one

Open **Deploys**. The first screen says the project is not installed yet and
offers **Install 6ammart Admin**. Inside, the source is a choice of two:

| | Upload the CodeCanyon zip | From a git repository |
|---|---|---|
| What you provide | the zip you already downloaded | the repository address, branch, and a read token if private |
| Updating later | upload the next zip | **Get the latest code**, with a preview of what changed |
| Rollback | to a previous zip you installed here | to any previous version |
| Deploy on `git push` | not available | available |
| Setup effort | none | about twenty minutes, once |

Neither is second-class. If you have never used git and want the site up
today, upload the zip; you can move to git later by installing again from a
repository. If you plan to change the code, or want one-button updates, use
git.

If the page says **Add my domain first** instead, do that on the **Domain &
SSL** page and come back — the install has to know your project's web address.

---

## And then: automatic or the browser wizard

Whichever source you picked, there are two ways to finish the install:

| Way | What happens | When to choose it |
|---|---|---|
| **Automatic install (recommended) — the panel does everything, no browser wizard** | One job installs the code, creates the database contents and your admin login. The project is live when it finishes. | Almost always. It also works before DNS points here. |
| **Browser wizard — walk through 6amMart's own installer yourself** | The panel puts the code in place, then you complete 6ammart's own installer in a browser tab. | If you want to see 6ammart's own installer, or your copy of the code does not support the automatic way. |

---

## The automatic install

1. Open **Deploys**.
2. Press **Install 6ammart Admin**.
3. Choose your source:
   - **Upload the CodeCanyon zip** — choose the file. It can be the "Admin
     panel new install" zip, or the whole CodeCanyon download; the panel finds
     the right part inside it. Big uploads take a while and the page shows the
     progress.
   - **From a git repository** — fill in **Git repository URL**, **Branch**,
     and **Access token** if the repository is private.
4. Leave **Automatic install (recommended)** selected.
5. Fill in **Admin email**, **Admin password** and, if you like, a **business
   name**. These become your login for 6ammart's own admin panel — not for
   SixPanel. **Suggest a strong password** generates one and shows it once, so
   copy it before you move on.
6. Press the install button and watch the live log.

Use a plain English-letter email address here. 6ammart's installer rejects
addresses with accented or non-Latin characters, and the panel stops you early
rather than seven minutes into the job.

The panel unpacks or clones the code, creates this project's own Linux user,
PHP-FPM pool and database if they do not exist yet, writes the settings this
server manages, installs the PHP libraries with Composer as that project's own
user, creates the app key, starts the web services, runs 6ammart's install,
rebuilds the caches and starts the background workers.

The library step takes a few minutes on a small server. That is normal.

**The automatic install does not ask for your CodeCanyon purchase code.** It
does not open 6ammart's own installer, and that installer is the only place
that asks for the code. Nothing asks for it after the install either. Keep the
code safe anyway: you need it to download new versions from CodeCanyon, and
6ammart asks for it again if you ever activate a paid add-on inside its own
admin panel.

**Expected result:** the log ends with the site being live, and a message
telling you to log in with the admin email you set.

---

## The browser-wizard install

1. Steps 1 to 3 as above, but choose **Browser wizard — walk through 6amMart's
   own installer yourself**.
2. Start the install and let the code land.
3. When the job finishes, open `https://your-domain/install` in a new tab.
4. Complete 6ammart's own installer. It asks for your CodeCanyon purchase code
   and creates the first admin user.
5. Come back to the panel and press the button that finishes the setup.

Step 5 is not optional. It switches the app out of installer mode and starts
the queue worker and the scheduler. Until you press it, the project is not
finished.

### A 500 error before you press Finish is normal

Between step 2 and step 5 the app is in installer mode. Any page other than
`/install` can answer with a 500 error. That is expected. Complete the
installer, press the finish button, and the error goes away.

---

## How to check it worked

- The **Deploys** page now says the project is live and shows the version it is
  running.
- `https://your-domain` opens your site.
- You can log in to 6ammart's own admin panel at
  `https://your-domain/login/admin` with the **Admin email** and **Admin
  password** you typed above. That address is 6ammart's own login page, not
  SixPanel's — `/admin` and `/login` on their own do not open it.
- **Server → Health** is green, and the project's **Advanced → Services** tab
  shows the queue worker and the scheduler running.
- The health check **The app answers requests** is green. That one asks your
  own site, on this server, what `/api/v1/config` gives back — the first call
  every 6ammart phone app makes. If it is red while everything else is green,
  read its line: it is the app, not the machine.

## If it went wrong

**The button is greyed out, with a note about the domain**
Save the project's domain on the **Domain & SSL** page first.

**"artisan install:headless failed"**
Your copy of the 6ammart code does not include the command the automatic mode
uses. Choose **Browser wizard** instead and follow the steps above.

**The zip upload failed, or the panel says it could not find `artisan`**
The zip must contain a Laravel root — the folder holding `artisan`. The panel
looks inside nested folders for exactly one such place, and says what it found
when there is none or more than one. Re-download the admin zip from CodeCanyon
if the file may be damaged.

**The shop name in the browser tab is not the name I chose**
That name is 6ammart's own `APP_NAME` setting, and the panel deliberately never
writes it — Laravel builds the login cookie and the cache keys from it, so
changing it signs everyone out. Your customer-facing shop name belongs in
6ammart's admin panel, under its business settings. See **[Rename a
project](https://www.allsweb.com/sixpanel/docs/project-name)** for what changing `APP_NAME` costs.

**"admin app already present — use Update instead"**
The code is already installed. To bring in newer code, use the update path —
see **[Deploy and update](https://www.allsweb.com/sixpanel/docs/deploy-update)**.

**The install failed part-way**
Fix what the log complains about and press the same button again. A failed
install is retried in place: the panel refreshes the existing copy of the code
rather than making you clean anything up.

**The clone step fails**
Check the repository address, the branch name, and the token. A token only
works with an `https://` repository address. A private repository with no token
fails here. See **[Put your code in a git
repository](https://www.allsweb.com/sixpanel/docs/put-your-code-in-git)**.

**"is not empty — clear it before installing"**
Something is already in the app folder from an earlier attempt. Contact support
rather than deleting folders by hand.

**You are moving a project that already exists somewhere else**
Do not run 6ammart's installer at all. Install the code here, then use the
transfer wizard — see **[Move an existing site
here](https://www.allsweb.com/sixpanel/docs/move-existing-site)**.

More causes and fixes: **[When something is broken](https://www.allsweb.com/sixpanel/docs/troubleshooting)**.
