Serversinc

Servers

Details on server management, including setup and configuration.

In ServerSinc, a server is any remote machine (usually a VPS or cloud VM) that you use to host and run Dockerized applications.

What happens during provisioning?

When you provision a server, ServerSinc performs the following steps:

  1. Creates a new server instance on your chosen cloud provider.
    • By default, ServerSinc uses the ubuntu-24.04 image for the server.
  2. Runs an installer script to set up:
  3. Configures SSH access for ServerSinc (in case we need to connect to the server later).
  4. Sets up a secure connection between ServerSinc and the server's Tugboat instance.

Managing Servers

You can manage your servers through the ServerSinc dashboard. Here are some common actions:

  • Start/Stop: Control the server's power state.
  • Reboot: Restart the server.

Deleting a Server

When deleting a server, ServerSinc will:

  • Remove any and all Application data associated with that server.
  • Stop and delete all Containers running on that server.
  • Remove the server from your account.

You will need to remove the VPS or VM instance from your cloud provider manually, as ServerSinc does not handle this automatically yet.

Tugboat

Tugboat is a small node.js web server that runs on your server and allows Serversinc to manage your server's resources. It's installed during provisioning and runs in a docker container, by default Tugboat listens for requests on port 7567.

During provisioning, Tugboat is configured to connect to Serversinc's API and register your server. This allows Serversinc to manage your server's Docker containers, trigger builds, and stream logs.

Tugboat is designed to be lightweight and efficient, ensuring minimal impact on your server's performance while providing essential management capabilities.

Features

  • Heartbeat: Tugboat sends a heartbeat to Serversinc every 60 seconds to let us know your server is online, and the status of your containers.
  • Docker Management: Tugboat allows Serversinc to manage your server's Docker containers, including starting, stopping, and removing containers.
  • Builds: Tugboat can trigger builds on your server, allowing you to deploy new versions of your applications.
  • Logs: Tugboat can stream logs from your server's containers to Serversinc, allowing you to view logs in real-time.
  • Metrics: Tugboat collects metrics from your server and containers, allowing you to monitor resource usage and performance.

Security

Tugboat is secured by a token that is generated during it's first run. This token is stored locally on your server and is used to authenticate requests from Serversinc.

Open Source

As Tugboat runs on your server, it's open source and available on GitHub.

Deployments

The deployments tab contains a list of all deployments for an Application, allowing you to manage and monitor the deployment history. Each deployment entry includes:

  • Deployer: The user who initiated the deployment.
  • Commit / Tag: The commit hash or tag associated with the deployment.
  • Created At: The timestamp when the deployment was created.
  • Duration: The time taken for the deployment to complete.
  • Status: The current status of the deployment (e.g., success, failed, in progress).

Manual Deployment

Applications can be manually deployed in two ways, either by clicking the "redeploy" button, or by clicking the menu next to the "redeploy" button and selecting "Rebuild and Redeploy". The first option will redeploy the latest commit or tag, while the second option will rebuild the application from the source code if it's a Github Application.

Automatic Deployment

Applications can be automatically deployed in two ways:

On Push to GitHub

If the Application is built from a GitHub repository, it can be configured to automatically deploy on every push to the branch specified in the Application settings. This is done by setting up a webhook in the GitHub repository that triggers a deployment in ServerSinc.

Via Webhook

Every Application has a unique webhook URL that can be used to trigger deployments. This URL can be used in CI/CD pipelines or other automation tools to trigger deployments programmatically.

When using the webhook, you can specify the docker tag to deploy by adding it to the request body as {"tag": "your-tag"}. If no tag is specified, the latest commit or tag will be deployed.

Building from Github

When deploying an Application from source, ServerSinc uses the Cloud Native Buildpacks approach to turn your code into a runnable container image.

Under the hood, this is done using the pack CLI inside a temporary container on your server. The process uses the heroku/builder image, which includes a set of common buildpacks for languages like Node.js, Python, PHP, Go, and more.

This process:

  • Clones your GitHub repository onto the server.
  • Runs pack build inside a container using the Heroku builder.
  • Produces a runnable Docker image, which is then deployed as a container.

No Dockerfile is required — the buildpacks detect your app type and handle compilation automatically.

This method is great for standard web apps and APIs. For more complex setups, it's recommended to use a Docker image instead.