SimpleLogin is a self-hosted email forwarder and identity provider that lets you generate unique email addresses and protect your online privacy. In this tutorial, we will walk you through the steps to install SimpleLogin on Void Linux.
Before we begin, please ensure that you have the following prerequisites:
To update the system, run the following command:
xbps-install -Syu
This will upgrade all packages to their latest version.
SimpleLogin requires the following dependencies to be installed:
You can install these dependencies by running the following command:
xbps-install -y nginx postgresql redis nodejs yarn
To create a PostgreSQL database, run the following command:
su - postgres -c "createdb simplelogin"
To clone the SimpleLogin Git repository, run the following command:
git clone https://github.com/simple-login/app.git /opt/simplelogin
To install SimpleLogin, navigate to the /opt/simplelogin
directory and run the following commands:
yarn install
yarn build
To configure Nginx, create a new file for SimpleLogin in the sites-available
directory by running the following command:
nano /etc/nginx/sites-available/simplelogin.conf
Add the following configuration to the file:
server {
listen 80;
server_name <your-domain-name>;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl http2;
server_name <your-domain-name>;
# SSL
ssl_certificate /etc/letsencrypt/live/<your-domain-name>/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/<your-domain-name>/privkey.pem;
# Security
add_header X-Frame-Options SAMEORIGIN;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
# Logs
access_log /var/log/nginx/simplelogin.access.log;
error_log /var/log/nginx/simplelogin.error.log;
# Serving static files
location /assets {
alias /opt/simplelogin/dist/client/assets;
}
# Proxying to the backend
location / {
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_pass http://127.0.0.1:8080;
proxy_redirect http:// https://;
}
}
Replace <your-domain-name>
with your actual domain name. Save the file and exit the editor.
Create a symlink for the file in the sites-enabled
directory by running the following command:
ln -s /etc/nginx/sites-available/simplelogin.conf /etc/nginx/sites-enabled/simplelogin.conf
To check if there are any syntax errors in the configuration, run the following command:
nginx -t
If there are no errors, restart Nginx by running the following command:
systemctl restart nginx
Create a new .env
file in the /opt/simplelogin
directory by running the following command:
nano /opt/simplelogin/.env
Add the following configuration to the file:
NODE_ENV=production
PORT=8080
DATABASE_URL=postgres://postgres:<your-postgresql-password>@localhost:5432/simplelogin
REDIS_URL=redis://localhost
DOMAIN=<your-domain-name>
COOKIE_DOMAIN=<your-domain-name>
SECRET=<your-secret-key>
PASSWORD_RESET_SECRET=<your-reset-key>
SENDGRID_API_KEY=<your-sendgrid-api-key>
SENDGRID_MAIL_FROM=<your-email-address>
OIDC_ISSUER=https://${DOMAIN}
OIDC_AUDIENCE=https://${DOMAIN}/api/v1/users
OIDC_CLIENT_ID=<your-oidc-client-id>
OIDC_CLIENT_SECRET=<your-oidc-client-secret>
JWT_SECRET=<your-jwt-secret>
BLOCKLIST_UIDS=
SMTP_SERVER=
SMTP_PORT=
SMTP_USER=
SMTP_PASSWORD=
Replace <your-domain-name>
with your actual domain name, <your-secret-key>
and <your-reset-key>
with your own secret keys, <your-sendgrid-api-key>
and <your-email-address>
with your SendGrid API key and email address, and <your-oidc-client-id>
and <your-oidc-client-secret>
with your own OIDC client ID and secret.
Save the file and exit the editor.
To start SimpleLogin, navigate to the /opt/simplelogin
directory and run the following command:
NODE_ENV=production node dist/server.js
SimpleLogin is now installed and running on your server.
Congratulations! You have successfully installed SimpleLogin on your Void Linux server. You can now use SimpleLogin to generate unique email addresses and protect your online privacy.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!