Standalone
Learn how to deploy Infisical in a standalone environment.
Self-Hosting Infisical with Standalone Infisical
Deploying Infisical in a standalone environment is a great way to get started with Infisical without having to use containers. This guide will walk you through the process of deploying Infisical in a standalone environment. This is one of the easiest ways to deploy Infisical. It is a single executable, currently only supported on Debian-based systems.
The standalone deployment implements the “bring your own database” (BYOD) approach. This means that you will need to provide your own databases (specifically Postgres and Redis) for the Infisical services to use. The standalone deployment does not include any databases.
If you wish to streamline the deployment process, we recommend using the Ansible role for Infisical. The Ansible role automates the end to end deployment process, and will take care of everything like databases, redis deployment, web serving, and availability.
Prerequisites
- A server running a Debian-based operating system (e.g., Ubuntu, Debian)
- A Postgres database
- A Redis database
Installing Infisical
Installing Infisical is as simple as running a single command. You can install Infisical by running the following command:
Running Infisical
Running Infisical and serving it to the web has a few steps. Below are the steps to get you started with running Infisical in a standalone environment.
- Setup environment variables
- Running Postgres migrations
- Create system daemon
- Exposing Infisical to the internet
Setup environment variables
To use Infisical you’ll need to configure the environment variables beforehand. You can acheive this by creating an environment file to be used by Infisical.
Create environment file
After creating the environment file, you’ll need to fill it out with your environment variables.
Edit environment file
The minimum required environment variables are DB_CONNECTION_URI
, REDIS_URL
, ENCRYPTION_KEY
, and AUTH_SECRET
. We recommend You take a look at our list of all available environment variables, and configure the ones you need.
Running Postgres migrations
Assuming you’re starting with a fresh Postgres database, you’ll need to run the Postgres migrations to syncronize the database schema. The migration command will use the environment variables you configured in the previous step.
This step will need to be repeated if you update Infisical in the future.
Create service file
Create Infisical service
Create a systemd service file for Infisical. Creating a systemd service file will allow Infisical to start automatically when the system boots or in case of a crash.
Now we need to reload the systemd daemon and start the Infisical service.
You can check the status of the Infisical service by running systemctl status infisical
.
It is also a good idea to check the logs for any errors by running journalctl --no-pager -u infisical
.
Exposing Infisical to the internet
Exposing Infisical to the internet requires setting up a reverse proxy. You can use any reverse proxy of your choice, but we recommend using HAProxy or Nginx. Below is an example of how to set up a reverse proxy using HAProxy.
Install HAProxy
Edit HAProxy configuration
If you decide to use Nginx, then please be aware that the configuration will be different. Infisical listens on port 8080.
Restart HAProxy
And that’s it! You have successfully deployed Infisical in a standalone environment. You can now access Infisical by visiting http://your-server-ip
.
Please take note that the Infisical team cannot provide infrastructure support for free self-hosted deployments.
If you need help with infrastructure, we recommend upgrading to a paid plan which includes infrastructure support.
You can also join our community Slack for help and support from the community.
Troubleshooting
Was this page helpful?