Prerequisites
Before you begin, ensure you have the following installed:- Docker (version 20.10 or higher)
- Docker Compose (version 2.0 or higher)
- Git
- At least 4GB of RAM
- At least 10GB of free disk space
Installation
Configure environment variables
Copy the example environment file and configure it:Edit the
.env file and configure the following required variables:Generate a secure 32-character encryption token at CodeBeautify Random String Generator.
Build and start containers
Use the production Docker Compose file to build and start all services:This will:
- Build the API and Client Docker images
- Start the PostgreSQL database
- Start the API server on port 8080
- Start the Client server on port 3000
The initial build may take 10-20 minutes depending on your server’s resources.
Verify installation
Check that all containers are running:You should see three containers:
snaily-cad-postgressnaily-cad-apisnaily-cad-client
Docker Compose Configuration
Theproduction.docker-compose.yml file defines three services:
Managing Your Installation
Updating SnailyCAD
To update to the latest version:Stopping Services
Restarting Services
Viewing Logs
Database Backup
Backup your PostgreSQL database:Troubleshooting
Containers Won’t Start
Check the logs for error messages:Port Already in Use
If ports 3000 or 8080 are already in use, change them in your.env file:
Database Connection Issues
EnsureDB_HOST is set to postgres (the Docker service name) in your .env file:
Out of Memory
Increase Docker’s memory limit in Docker Desktop settings or your Docker daemon configuration.Next Steps
Reverse Proxy Setup
Configure nginx or Caddy for SSL and domain routing
Environment Variables
Complete environment variable reference