All the items listed below are required to get the CAD up and running smoothly.
- Node.js (16.6+ is required.) (Video Guide)
- yarn (
npm install --global yarn) (Video Guide)
- Docker Desktop (Windows), Docker (Linux)
Once you've got all the items installed, we can get started with installing SnailyCADv4. Open the Command Prompt on Windows or the Terminal on Linux.
1. Cloning the GitHub repository
To fix this, run the following command:
Firstly, we need to clone the GitHub repository to our local machine:
git clone https://github.com/SnailyCAD/snaily-cadv4.git
Once the files have been cloned from GitHub, we can enter that folder:
2. Installing dependencies
Now we will install the dependencies that are required for SnailyCADv4 to function properly.
Configuration can be a bit complicated, so pay close attention. The following steps will help you configure SnailyCADv4's environment variables.
These variables are used by SnailyCADv4 to connect to the database and store special tokens used for SnailyCAD's features.
Tip: In support channels, this will be referenced as the
We must first copy the
.env.example file to
copy .env.example .env
cp .env.example .env
Now we can start configuring the variables in the
.env file. See next step 3.1 .env file.
3.1 .env info
POSTGRES_PASSWORD: The password to the PostgreSQL database.
POSTGRES_USER: The username to the PostgreSQL database.
DB_HOST: The database host. Most likely
DB_PORT: The port to the database.
POSTGRES_DB: The database name.
JWT_SECRET: This is a random value to keep the CAD secured.
CORS_ORIGIN_URL: The URL/IP to where the CAD is hosted at, e.g.,
NEXT_PUBLIC_PROD_ORIGIN: The URL/IP to where the API is hosted at, e.g.,
PORT_API: The port where the API should run on. (Default 8080)
PORT_CLIENT: The port where the client should run on. (Default: 3000)
ENCRYPTION_TOKEN: Used to generate encrypted values. Must be 32 characters long
DATABASE_URL: Do not change unless you know what you're doing!
3.2 Docker network
Now we must setup a Docker network so the CAD can communicate with it's services.
docker network create cad_web
4. Building everything
Now we must build all the packages again. (client, schemas, config, types)
yarn turbo run build
5. Starting SnailyCADv4
After completing all the steps above, we are ready to startup the CAD. To do this run the following command:
Note: When running the command for the fist time, this will pull down all services from the Docker Hub. This can take a few minutes.
docker-compose -f production.docker-compose.yml up -d
- To stop SnailyCADv4, enter
docker-compose downin a command prompt/terminal in the directory where you installed the CAD and wait for the services to stop.
- To view Docker's logs for SnailyCAdv4, enter
docker-compose logsin a command prompt/terminal in the directory where you installed the CAD.
6. Accessing SnailyCADv4
You can open SnailyCADv4 via a web browser, on your LAN IP and the
SnailyCADv4 also supports domains, WAN IP, etc.
8080 must be forwarded in your firewall if you're not using some proxy.
Do not use
localhost for Accessing SnailyCAD. It will not work!