Temps Deployment and Usage Guide
Temps is an open-source, self-hosted deployment platform written in Rust. It allows you to deploy, observe, and scale your applications from a single binary, replacing multiple SaaS tools.
Prerequisites
To deploy and run Temps, you'll need the following:
- Operating System:
- Ubuntu 24.04 / 22.04 (recommended)
- macOS
- Other Linux distributions may work but are not officially tested.
- Rust: Version 1.70+
- Install Rust and Cargo using
rustup:curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
- Install Rust and Cargo using
- Git: For cloning the repository and Git-based deployments.
- Docker: Required for building and running containerized applications.
- Domain Name: A domain name is essential for Temps to provision TLS certificates via Let's Encrypt and manage custom domains.
- DNS Provider Access: If you plan to use DNS-01 challenges for Let's Encrypt or manage DNS records through Temps, you'll need API access to your DNS provider (e.g., Azure DNS credentials if using Azure).
Installation
The quickest way to install Temps on a fresh server is using the provided deploy.sh script. This script handles the download, setup, and initial configuration.
curl -fsSL https://temps.sh/deploy.sh | bash
This command will:
- Download the latest Temps binary.
- Set up necessary system configurations.
- Start the Temps service.
- Provide instructions for accessing your Temps dashboard.
Configuration
Temps is primarily configured via environment variables. While the deploy.sh script handles initial setup, you might need to adjust or add variables for specific functionalities.
Key configuration areas include:
- Database: Temps uses a database (e.g., PostgreSQL) for storing application data.
- DNS Provider: For automatic TLS and domain management.
- Email: For transactional emails and authentication.
- External URL: The public URL where Temps is accessible.
Example environment variables (these are illustrative; the deploy.sh script will generate a more complete set):
# Core Configuration
TEMPS_EXTERNAL_URL=https://your-temps-domain.com
# Database Configuration (Example for PostgreSQL)
DATABASE_URL=postgres://user:password@host:port/database
# Email Configuration (for transactional emails and auth)
EMAIL_SERVICE_PROVIDER=smtp # or other supported provider
SMTP_HOST=smtp.example.com
SMTP_PORT=587
SMTP_USERNAME=your_email@example.com
SMTP_PASSWORD=your_email_password
SMTP_FROM_ADDRESS=no-reply@your-temps-domain.com
# DNS Provider Configuration (Example for Azure)
# If using Azure DNS, you'll need these:
AZURE_TENANT_ID=your_azure_tenant_id
AZURE_CLIENT_ID=your_azure_client_id
AZURE_CLIENT_SECRET=your_azure_client_secret
AZURE_SUBSCRIPTION_ID=your_azure_subscription_id
AZURE_RESOURCE_GROUP_NAME=your_dns_resource_group
# Security
TEMPS_JWT_SECRET=a_very_long_and_random_string_for_jwt_signing
TEMPS_ENCRYPTION_KEY=a_very_long_and_random_string_for_encryption
# Other
TEMPS_LOG_LEVEL=info
Note: The deploy.sh script will guide you through initial setup and generate some of these for you. For advanced configurations, you will typically edit a .env file or systemd service file.
Build & Run
If you want to build Temps from source or run it locally for development, follow these steps.
Build
- Clone the repository:
git clone https://github.com/gotempsh/temps.git cd temps - Build the project:
This will compile the Temps binary and place it incargo build --releasetarget/release/temps.
Run Locally (Development)
For local development, you'll need a database and potentially other services. Docker Compose is often used for this.
- Set up environment variables: Create a
.envfile in the project root with necessary configurations (e.g.,DATABASE_URL,TEMPS_JWT_SECRET). - Run the application:
This will start the Temps server, usually accessible atcargo runhttp://localhost:8000(or as configured).
Run in Production (Self-Hosted)
The recommended production deployment is using the deploy.sh script, which sets up Temps as a systemd service.
If you are deploying manually after building:
-
Place the binary: Copy the
target/release/tempsbinary to a suitable location (e.g.,/usr/local/bin/temps). -
Create a service user:
sudo useradd -r -s /bin/false temps sudo chown temps:temps /usr/local/bin/temps # Adjust permissions as needed -
Create a systemd service file: Create
/etc/systemd/system/temps.service(example below). -
Environment variables: Ensure all required environment variables are set. This can be done in
/etc/default/tempsor directly in the systemd service file.Example
/etc/systemd/system/temps.service:[Unit] Description=Temps Deployment Platform After=network.target [Service] User=temps Group=temps EnvironmentFile=/etc/default/temps # Or specify variables directly ExecStart=/usr/local/bin/temps Restart=always RestartSec=5 StandardOutput=journal StandardError=journal [Install] WantedBy=multi-user.target -
Enable and start the service:
sudo systemctl daemon-reload sudo systemctl enable temps sudo systemctl start temps sudo systemctl status temps
Deployment
Temps is designed for self-hosting. The primary deployment method is on a Linux server (like Ubuntu) using the deploy.sh script.
Steps for a typical self-hosted deployment:
- Provision a Virtual Private Server (VPS): Choose a provider like DigitalOcean, Linode, Vultr, AWS EC2, Google Cloud, or Azure. A server with at least 2GB RAM and 2 CPU cores is recommended.
- Point your domain: Configure your domain's A record to point to the public IP address of your VPS. For example,
temps.yourdomain.com->YOUR_VPS_IP. - SSH into your server:
ssh your_user@your_vps_ip - Run the quick start script:
Follow the prompts to configure your initial setup, including yourcurl -fsSL https://temps.sh/deploy.sh | bashTEMPS_EXTERNAL_URL(your domain) and database details. - Access the dashboard: Once the script completes, Temps will be running, and you can access its web dashboard via the
TEMPS_EXTERNAL_URLyou provided (e.g.,https://temps.yourdomain.com).
From the dashboard, you can:
- Connect your Git repositories.
- Configure custom domains.
- Provision managed services (Postgres, Redis, S3).
- Monitor deployments, logs, and analytics.
Troubleshooting
Here are some common issues and their solutions:
1. curl -fsSL https://temps.sh/deploy.sh | bash fails
- Network connectivity: Ensure your server has outbound internet access.
curlnot installed: Installcurlif it's missing (sudo apt install curl).- Script errors: Review the output for specific error messages. It might indicate missing dependencies or permission issues.
2. Temps dashboard is not accessible after deployment
- Firewall: Ensure ports 80 (HTTP) and 443 (HTTPS) are open on your server's firewall.
- For
ufw:sudo ufw allow 80/tcp,sudo ufw allow 443/tcp,sudo ufw enable.
- For
- DNS propagation: Verify your domain's A record has fully propagated. Use tools like
digor online DNS checkers. TEMPS_EXTERNAL_URLmismatch: Make sure theTEMPS_EXTERNAL_URLenvironment variable is correctly set to your domain (e.g.,https://temps.yourdomain.com) and matches the domain you pointed.- Temps service status: Check if the Temps service is running:
sudo systemctl status temps. If it's not running, check logs:sudo journalctl -u temps.service. - Let's Encrypt issues: If you're seeing SSL errors, check the Temps logs for Let's Encrypt certificate acquisition failures. This often points to DNS configuration problems or firewall blocks on port 80.
3. Git push to deploy fails
- SSH key setup: Ensure your SSH public key is correctly added to your Temps account (via the dashboard) and your Git client is using the correct private key.
- Repository URL: Verify you are pushing to the correct Git remote URL provided by Temps.
- Build errors: Check the deployment logs in the Temps dashboard. Your application might have build-time dependencies or configuration issues.
- Dockerfile issues: If using a custom Dockerfile, ensure it's valid and correctly builds your application.
4. Managed services (Postgres, Redis) fail to provision
- Resource availability: Ensure your server has enough disk space, RAM, and CPU to run the requested services.
- Docker issues: Verify Docker is running correctly on your server:
sudo systemctl status docker. - Temps logs: Check the Temps service logs for errors related to service provisioning.
5. LogAggregatorError::ChunkNotFound or ContainerNotFound
These errors (seen in crates/temps-log-aggregator/src/handlers/log_handler.rs) indicate that the log aggregator cannot find specific log chunks or container information.
- Check container status: Ensure the deployed application containers are running.
- Temps internal state: Restarting the Temps service might resolve transient issues with internal state management.
- Disk space: Insufficient disk space could prevent log storage.
6. AuthError (e.g., DatabaseError, AuthenticationError)
These errors (seen in crates/temps-auth/src/auth_service.rs) relate to authentication or database access.
- Database connection: Verify
DATABASE_URLis correct and the database server is accessible from the Temps host. - Credentials: Double-check user credentials for database access.
- JWT secret: Ensure
TEMPS_JWT_SECRETis set and consistent if you've manually configured it.
7. CustomDomainError (e.g., InvalidDomain, DuplicateDomain)
These errors (seen in crates/temps-projects/src/services/custom_domains.rs) occur during custom domain configuration.
- Domain validation: Ensure the domain name is correctly formatted and not already in use by another project or conflicting with the Temps host domain.
- DNS records: If you're adding a custom domain, make sure the necessary CNAME or A records are correctly pointed to Temps as instructed in the dashboard.
For further assistance, consult the official Temps documentation or GitHub issues.