☁️ The Most Secure and Easy Selfhosted Home Server. Take control of your data and privacy without sacrificing security and stability (Authentication, anti-DDOS, anti-bot)
☁️ Cosmos is the most secure and easy way to self-host a Home Server. It acts as a secure gateway to your application, as well as a server manager. It aims to solve the increasingly worrying problem of vulnerable self-hosted applications and personal servers.
Whether you have a server, a NAS, or a Raspberry Pi with applications such as Plex, HomeAssistant or even a blog, Cosmos is the perfect solution to run and secure them all. Simply install Cosmos on your server and connect to your applications through it to enjoy built-in security and robustness for all your services, right out of the box.
Cosmos is:
It has been built to be:
And a lot more planned features are coming!
Cosmos has a few key differences with other alternatives such as YunoHost, Unraid, etc…
* Only containers created with their UI, with no customization, ** No alerts
You might also wonder about cloudflare proxy and cloudflare tunnel when it comes to security. But unlike popular beliefs those are not solutions on their own as:
SmartShield is a modern API protection package designed to secure your API by implementing advanced rate-limiting and user restrictions. This helps efficiently allocate and protect your resources without manual adjustment of limits and policies.
Key Features:
If you have your own self-hosted data, such as a Plex server, or may be your own photo server, you expose your data to being hacked, or your server to being highjacked (even on your local network!).
It is becoming an important threat to you. Managing servers, applications and data is very complex, and the problem is that you cannot do it on your own: how do you know that the server application where you store your family photos has a secure code? it was never audited.
Even a major application such as Plex has been hacked in the past, and the data of its users has been exposed. In fact, the recent LastPass leak happened because a LastPass employee had a Plex server that wasn’t updated to the last version and was missing an important security patch!
That is the issue Cosmos Server is trying to solve: by providing a secure and robust way to run your self-hosted applications, you can be sure that your data is safe and that you can access it without having to worry about your security.
Here’s a simple example of how Cosmos can help you:
Another example:
Additionally, because every new self-hosted applications re-implement crucial systems such as authentication from scratch everytime, the large majority of them are very susceptible to being hacked without too much trouble. This is very bad because not only Docker containers are not isolated, but they also run as root by default, which means it can easily be used to offer access to your entire server or even infrastructure.
Most tools currently used to self-host not specifically designed to be secure for your scenario. Entreprise tools such as Traefik, NGinx, etc… Are designed for different use-cases that assume that the code you are running behind them is trustworthy. But who knows what server apps you might be running? On top of that, a lot of reverse-proxies and security tools lock important security features behind 3 to 4 figures business subscriptions that are not realistic for self-hosting.
If you have any further questions, feel free to join our Discord!
Cosmos Server can automatically generate and renews HTTPS certificates for your applications using Let’s Encrypt. It is compatible with wildcard certificates, using the DNS challenge. In order to do it, you need to add DNSChallengeProvider
to the HTTPConfig
in your config (or in the UI). And then add the proper API token via environment variables. To know what providers are supported and what environment variable they need, please refer to this page.
If you’re a self-hosted application developer, integrate your application with Cosmos and enjoy secure authentication, robust HTTP layer protection, HTTPS support, user management, encryption, logging, backup, and more - all with minimal effort. And if your users prefer not to install Cosmos, your application will still work seamlessly.
Authentication is very hard (how do you check the password match? What encryption do you use? How do you store tokens? How do you check if the user is allowed to access the application?). Cosmos Server provides a secure authentication system that can be used by any application, and that is easy to integrate.
Cosmos is using the Apache 2.0 Licence with the Commons Clause 1.0. This is a common clause among open source infrastructure software, such as databases, reverse proxies, etc…
TL;DR: You can use it freely. You can also fork it and redistribute it, But you are not allowed to sell it, a derivative or to sell a service based on it (ex. SaaS or PaaS).
Note that you are allowed to use it to host a monetized business website, a blog etc… as long as your business does not involve selling Cosmos or its features.
Installation is simple using Docker:
sudo docker run -d --network host --privileged --name cosmos-server -h cosmos-server --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket -v /:/mnt/host -v /var/lib/cosmos:/config azukaar/cosmos-server:latest
DO NOT USE UNRAID TEMPLATES, CASAOS OR PORTAINER STACKS TO INSTALL COSMOS. IT WILL NOT WORK PROPERLY. JUST RUN THE DOCKER RUN
COMMAND!. You can use Docker-Compose but if you are on mac or windows (so no host mode) without a domain, that will prevent Cosmos from binding ports to itself! (preventing ip:port from working properly)
IF YOU ARE USING WINDOWS OR MAC OS YOU CANNOT USE THE HOST MODE OF DOCKER. Please replace --network host
with -p 80:80 -p 443:443 -p 4242:4242/udp
In this command, -v /:/mnt/host
is optional and allow to manage folders from Cosmos, you can remove it if you don’t want it but you will have to create your container’s bind folders manually.
--privileged
is also optional, but it is required if you use hardening software like AppArmor or SELinux, as they restrict access to the docker socket. It is also required for Constellation to work. If you don’t want to use it, you can add the following capabilities: NET_ADMIN for Constellation.
Once installed, simply go to http://your-server-ip
and follow the instructions of the setup wizard. always start the install with the browser in incognito mode to avoid issues with your browser cache.
Port 4242 is a UDP port used for the Constellation VPN.
Make sure you expose the right ports (by default 80 / 443). It is best to keep those ports intacts, as Cosmos is meant to run as your reverse proxy. Trying to setup Cosmos behind another reverse proxy is possible but will only create headaches.
You also need to keep the docker socket mounted, as Cosmos needs to be able to manage your containers.
You can tweak the config file accordingly. Some settings can be changed before end with env var. see here.
If you are having issues with the installation, please contact us on Discord!