Server Configuration Basics

Spin ensures your application can be 100% replicated from development to production without any vendor lock-in. Spin also gives you the flexibility to choose if you want Spin to manage your servers or not.

👉 Important: Spin doesn't need to manage your servers if you don't want it to

It's kind of weird to start a document to talk about how NOT to use a feature, but we want to show the flexibility that Spin gives you. If you're satisfied with your current hosting provider, you don't need to use Spin to manage your servers. You can easily configure your PaaS to use the same Dockerfiles that you're using in development with Spin. You'll just need to reference your PaaS's own documentation on how to do this.

All you need to do is delete the .spin.yml and any docker-compose.*.yml files that you don't want and spin up will still work perfectly fine.

If you prefer to not have any vendor lock-in from a PaaS provider and you're interested in the full control of your own servers, keep reading! Spin will give you the power of a PaaS without the restriction of running your application on a specific platform.

How servers work with Spin

Spin places all of its configuration in the .spin.yml file. This file is used to configure your servers, users, connections to providers, and more. When you run spin provision, Spin will pull down our Ansible Docker image and use the Spin Ansible Collection to configure your providers and servers.

Spin Provision Diagram

Connect a provider or bring your own server

You can see our ever expanding list of providers on the left sidebar. If you'd like to use a provider that isn't listed, you can easily use your own server. This means you can run Spin on any host that meets the Spin Server Requirements, including big cloud providers down to an old computer running in your grandmother's basement 🤠.

If you connect a provider via an API token, you'll get added benefits of automated server creation, backups, firewalls, and more.

The .spin.yml file

The main configuration file for using servers with Spin is the .spin.yml file. Whenever you run spin new or spin init, this file is created. By default, the .spin.yml file is not included in your Git repository. You could think of it as an .env file for your servers. The file can contain sensitive information, so be sure to keep it secure.

Learn how to use the .spin.yml file →

Provision your server on any host

Once you have your .spin.yml file configured, we can use spin provision to provision your server on any host that meets the Spin Server Requirements.

Pick the provider you'd like to use to learn more: