Cloudron Deployment
One-click installation on Cloudron. Automated backups, SSL certificates, and updates handled automatically.
Deploy Tymeslot on any server with Docker installed. This guide covers everything from prerequisites to production deployment.
First, clone the Tymeslot repository from GitHub to your server:
git clone https://github.com/tymeslot/tymeslot.git\ncd tymeslot
Copy the example environment file and configure it for your deployment:
cp .env.example .env
Edit the .env
file with your configuration. Here are the essential variables you must set:
# REQUIRED: Secret key for security (generate with: openssl rand -base64 64)
SECRET_KEY_BASE=your_generated_secret_here
# REQUIRED: Your domain name
PHX_HOST=tymeslot.yourdomain.com
# REQUIRED: Database configuration
POSTGRES_DB=tymeslot
POSTGRES_USER=tymeslot
POSTGRES_PASSWORD=your_secure_password_here
# Application settings
PORT=4000
DEPLOYMENT_TYPE=docker
# Email configuration (choose one adapter)
EMAIL_ADAPTER=smtp
EMAIL_FROM_NAME="Your Company Name"
EMAIL_FROM_ADDRESS="hello@yourdomain.com"
# SMTP Settings (if using SMTP)
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USERNAME=your_email@gmail.com
SMTP_PASSWORD=your_app_password
openssl rand -base64 64 | tr -d '\n'
Use this value for SECRET_KEY_BASE.
Create a
docker-compose.yml
file in your project directory:
version: '3.8'
services:
postgres:
image: postgres:16-alpine
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
tymeslot:
build: .
depends_on:
postgres:
condition: service_healthy
environment:
SECRET_KEY_BASE: ${SECRET_KEY_BASE}
PHX_HOST: ${PHX_HOST}
PORT: ${PORT}
DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres/${POSTGRES_DB}
DEPLOYMENT_TYPE: docker
EMAIL_ADAPTER: ${EMAIL_ADAPTER}
EMAIL_FROM_NAME: ${EMAIL_FROM_NAME}
EMAIL_FROM_ADDRESS: ${EMAIL_FROM_ADDRESS}
SMTP_HOST: ${SMTP_HOST}
SMTP_PORT: ${SMTP_PORT}
SMTP_USERNAME: ${SMTP_USERNAME}
SMTP_PASSWORD: ${SMTP_PASSWORD}
ports:
- "4000:4000"
volumes:
- uploads:/app/data/uploads
- tzdata:/app/data/tzdata
restart: unless-stopped
volumes:
postgres_data:
uploads:
tzdata:
Build the Docker image and start all services:
docker-compose up -d --build
Check the logs to verify everything started successfully:
docker-compose logs -f tymeslot
You should see output indicating the Phoenix server has started. Press
Ctrl+C
to exit the logs view.
For production use, you'll want to set up SSL. Here's an example using Caddy (recommended for its simplicity):
tymeslot.yourdomain.com {\n reverse_proxy localhost:4000\n encode gzip\n}
Or if you prefer Nginx:
server {
listen 80;
server_name tymeslot.yourdomain.com;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl http2;
server_name tymeslot.yourdomain.com;
ssl_certificate /path/to/fullchain.pem;
ssl_certificate_key /path/to/privkey.pem;
location / {
proxy_pass http://localhost:4000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
Open your browser and navigate to your domain:
https://tymeslot.yourdomain.com
Click "Sign Up" to create your first account. You'll be guided through the setup process where you can:
To update to the latest version:
# Pull latest changes\ngit pull origin main\n\n# Rebuild and restart\ndocker-compose down\ndocker-compose up -d --build
To view logs:
docker-compose logs -f tymeslot
To backup your database:
docker-compose exec postgres pg_dump -U tymeslot tymeslot > backup.sql
To restore from backup:
docker-compose exec -T postgres psql -U tymeslot tymeslot < backup.sql
One-click installation on Cloudron. Automated backups, SSL certificates, and updates handled automatically.
Add your booking widget to any website. Works with WordPress, Webflow, Wix, custom sites, and more.