--- url: https://docs.codefox.ai/get-started/install.md --- # Install Foxden on one server This page takes you from an empty Linux server to your first sign-in as the Owner, in the fewest steps. For every choice the installer offers, and for installing from your own computer instead of on the server, read [Install Foxden](/self-host/install). ## Before you start * A server running Ubuntu or Debian, that you can open a terminal on over SSH as root or as a user who can use `sudo`. * Ports 80 and 443 free on the server and reachable from the internet. * Enough processors, memory and disk for the apps you want. The apps on one server add up; [Server sizes](/reference/sizing) lists what each needs, and the installer checks the server before it installs anything. * A domain you can add DNS records to, such as `yourcompany.com`. Each app gets its own name under it, such as `admin.yourcompany.com` and `crm.yourcompany.com`. * An email address you read. It becomes the Owner's address. * A public release of Foxden to install. Until the first one is published, the installer asks for an install code; [Install Foxden](/self-host/install) says what that means. ## Install 1. On the server, download and install the `foxden` command: ```bash curl -fsSL https://admin.codefox.ai/cli | bash ``` The script downloads the latest release, checks it against its published checksum (and its signature, when `cosign` is installed), and puts `foxden` in `/usr/local/bin`. 2. Become root: ```bash sudo -i ``` 3. Start the installer on this machine: ```bash FOXDEN_LOCAL=1 foxden init ``` `FOXDEN_LOCAL=1` tells `foxden` that this machine is the server. Signed in as root over SSH, you can run `foxden init` alone: it asks whether to install here, and you answer yes. 4. At **Which products go on this box?**, select the apps you want with the space bar, then press Enter. The bars under the list show how much of the server they use. When you pick two or more apps, the installer adds Foxden Admin to them. 5. Type your domain when the installer asks for the web address. 6. If your domain does not point at the server yet, the installer shows the record to create where you manage the domain: an `A` record with the server's address, such as one for `*.yourcompany.com`. Create it, then choose **wait**. The installer checks every 10 seconds for up to 10 minutes. 7. Type your email address. You become the Owner, and the address is the contact for the site's security certificates. 8. When the installer asks whether to add the optional settings now, answer no. You set sign-in, email and AI in Admin on your first day. 9. Read the review screen, then confirm it. The installer sets up the firewall and Docker, installs the apps, gets their certificates, starts them and schedules their nightly backups. ## Sign in as the Owner When the installer finishes, it shows a hand-over screen. 1. Copy the link under **Open this link to finish setting up**. Keep it private: it signs in whoever opens it, until someone signs in another way. If you lose it, `foxden console link` prints it again. 2. Copy the secrets and backup passphrase files listed under **These cannot be recovered if the box is lost. Escrow them today** to a safe place away from the server. 3. Open the link in your browser. Admin shows **Welcome to your Foxden**. 4. Select **Continue as** with your address. You are signed in as the Owner, and Admin opens on **Home**. ## If something is not right * **A web address "did not answer over https"**: the certificate is not issued yet. Reload the address after a minute. If it stays red, check that the `*.yourcompany.com` record points at the server and that no firewall in front of the server blocks ports 80 and 443, then run `foxden doctor`. * **The installer stops before installing**: it names the check that failed, such as a port already in use or a server too small for the apps you picked. Fix that and run `foxden init` again. If it stopped after you answered its questions, `foxden init --resume` carries on where it stopped. More fixes are in [Troubleshoot your server](/self-host/troubleshoot). ## Next [Set up your company on your first day](/get-started/first-day): name your company, choose how people sign in and invite your team.