aa
-
Update all
sudo apt update && sudo apt upgrade -y && sudo apt full-upgrade -y
-
Install Docker
sudo apt install ca-certificates curl sudo install -m 0755 -d /etc/apt/keyrings sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc sudo chmod a+r /etc/apt/keyrings/docker.asc # Add the repository to Apt sources: sudo tee /etc/apt/sources.list.d/docker.sources <<EOF Types: deb URIs: https://download.docker.com/linux/ubuntu Suites: $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") Components: stable Signed-By: /etc/apt/keyrings/docker.asc EOF sudo apt update sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
-
Install Caddy
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https curl curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list chmod o+r /usr/share/keyrings/caddy-stable-archive-keyring.gpg chmod o+r /etc/apt/sources.list.d/caddy-stable.list sudo apt update sudo apt install caddy
Because it is installed via apt, Caddy will run as a system service and is enabled on boot by default.
-
Clone the repo
git clone https://github.com/nacho-time/nacho-time-server.git cd nacho-time-server -
Create a
.envfilecp .env.example .env
Edit the
.envfile to set your desired configuration, includingDOMAIN_NAME,TMDB_API_KEY, andPROWLARR_API_KEY.Make sure
DOMAIN_NAMEpoints to your server's domain or IP address.Example:
DOMAIN_NAME=http://yourdomain.com TMDB_API_KEY=your_tmdb_api_key PROWLARR_API_KEY=your_prowlarr_api_key POSTGRES_USER=nacho POSTGRES_PASSWORD=nacho_password POSTGRES_DB=nacho_db DATABASE_URL=postgresql://nacho:nacho_password@postgres:5432/nacho_db?schema=public -
Edit the Caddyfile
nano Caddyfile
Replace the contents with:
yourdomain.com { reverse_proxy localhost:8123 }Replace
yourdomain.comwith your actual domain or server IP. Don't forget to validate the Caddyfile syntax:sudo caddy validate --config Caddyfile
-
Move Caddyfile to /etc/caddy/Caddyfile (or manually append if you are using other sites)
sudo cp Caddyfile /etc/caddy/Caddyfile
-
Restart Caddy to apply changes
sudo systemctl restart caddy
-
Start Nacho Server with Docker Compose
sudo docker compose up
-
Connect to your prowlarr instance via
http://prowlarr.yourdomain.com/(or your server IP) and set up your indexers as needed. You will also need to head into Settings -> General and retrieve your prowlarr API key to add to your Nacho Server.envfile underPROWLARR_API_KEY. This unfortunately cannot be automated due to prowlarr security restrictions. -
Restart Nacho Server to apply the new API key
sudo docker compose up- Verify everything is working by accessing Nacho Server at
http://nacho.yourdomain.com/(or your server IP). You can then run the following to enable the docker containers to start on boot:
SERVICE_NAME="nacho-server"
WORKDIR="$(pwd)"
sudo bash -c "cat > /etc/systemd/system/${SERVICE_NAME}.service" <<EOF
[Unit]
Description=Docker Compose Service: ${SERVICE_NAME}
Requires=docker.service
After=docker.service
[Service]
Type=oneshot
WorkingDirectory=${WORKDIR}
ExecStart=/usr/bin/docker compose up -d
ExecStop=/usr/bin/docker compose down
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable ${SERVICE_NAME}
sudo systemctl start ${SERVICE_NAME}